PageSourceSearch

https://www.macrobertartscentre.org/_next/static/chunks/pages/whats-on-eaba0214c67985ab.js

js macrobertartscentre.org collected 2026-09-25 23:43:43 UTC 10,741 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[508],{6635:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/whats-on",function(){return n(2966)}])},6538:function(e,t,n){"use strict";var r=n(5893),i=n(7294),o=n(7414),a=n(3533),s=n(2779),l=n(2077),c=n(709),d=(n(9034),n(3763)),u=n(9866),f=(0,o.zo)(a.Z,{width:"8rem",display:"flex",alignContent:"center",justifyContent:"center",cursor:"pointer"}),m=(0,o.zo)(d.E.div,{position:"absolute",backgroundColor:"white",boxShadow:"inset 0px 0px 0px 1px $colors$grey4",top:"4rem",right:0,zIndex:1e3});t.Z=function(e){var t=e.date,n=e.handleDateChange,o=e.isOpen,a=e.setIsOpen,d=new Date,p=(0,i.useRef)(null),g=function(e){p.current&&!p.current.contains(e.target)&&a(!1)};return(0,i.useEffect)((function(){return document.addEventListener("click",g),function(){return document.removeEventListener("click",g)}}),[]),(0,r.jsxs)("div",{ref:p,children:[(0,r.jsxs)(f,{alignItemsCenter:!0,onClick:function(e){return a(!o)},children:[(0,r.jsx)(s.Qu,{}),(0,r.jsx)(l.__,{css:{margin:0,marginLeft:"1rem"},colour:"tomato",children:null==t?"PICK A DATE":(0,u.p6)(t)})]}),o&&(0,r.jsxs)(m,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:[(0,r.jsx)("style",{children:"\n  .my-selected:not([disabled]) { \n    font-weight: bold; \n    border: 1px solid #EC643E;\n    color: #EC643E;\n  }\n  .my-selected:hover:not([disabled]) { \n    background-color: #EC643E;\n    color: white;\n  }\n  .my-today { \n    color: #EC643E;\n  }\n"}),(0,r.jsx)(c._W,{captionLayout:"buttons",showOutsideDays:!1,fromDate:d,fromMonth:d,initialFocus:!0,fromYear:d.getFullYear(),toYear:d.getFullYear()+1,mode:"single",selected:t,onSelect:n,disabled:{before:new Date},modifiersClassNames:{selected:"my-selected",today:"my-today"}})]})]})}},1818:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(6042),i=n(9534),o=n(5893),a=(n(7294),n(3533)),s=n(2077),l=(0,n(7414).zo)("input",{WebkitAppearance:"none",MozAppearance:"none",flexShrink:0,height:"1.5rem",width:"1.5rem",outline:"none",display:"inline-block",position:"relative",cursor:"pointer",margin:"1rem 0",boxShadow:"var(--shadow, 0)",borderRadius:"0",border:"1px solid $grey4",background:"white",transition:"background 0.3s, border-color 0.3s, box-shadow 0.2s","&:after":{content:"",display:"block",position:"absolute",opacity:"var(--opacity, 0)",transition:"transform var(--d-t, 0.3s) var(--d-t-e, ease) var(--d-t-d, 0s), opacity var(--d-o, 0.2s)",width:".375rem",height:".625rem",border:"2px solid white",borderTop:"0",borderLeft:"0",left:".5rem",top:".3rem",transform:"rotate(var(--rotation, 20deg))"},"&:checked":{backgroundColor:"$colors$blue","--border-color":"$colors$grey8","--d-o":"0.3s","--d-t":"0.6s","--d-t-e":"cubic-bezier(0.2, 0.85, 0.32, 1.2)","--d-t-d":"0.1s","--opacity":"1","--rotation":"43deg"},"&:disabled":{"--background":"$colors$grey2",cursor:"not-allowed",opacity:"0.65","&:checked":{"--border-color":"$colors$grey4"},"& + label":{cursor:"not-allowed"}},"&:hover":{"&:not(:disabled)":{"&:not(:checked)":{"--border-color":"$colors$blue"},"--shadow":"0px 0px 4px #49BED6"}},"&:focus-visible":{"--border-color":"var(--maximeheckel-form-input-active)","--shadow":"var(--shadow-hover-primary)"}}),c=function(e){var t=e.checked,n=e.disabled,c=e.id,d=e.label,u=(0,i.Z)(e,["checked","disabled","id","label"]);return(0,o.jsxs)(a.Z,{alignItemsCenter:!0,children:[(0,o.jsx)(l,(0,r.Z)({id:c,type:"checkbox",checked:t,disabled:n,"aria-checked":t,role:"checkbox"},u)),d?(0,o.jsx)(s.__,{css:{marginLeft:"1rem"},noMargin:!0,children:d}):null]})}},6726:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(7294),i=function(){var e=(0,r.useState)(new Date),t=e[0],n=e[1],i=(0,r.useState)(new Date),o=i[0],a=i[1],s=(0,r.useState)(!1);return{date:t,displayDate:o,binding:{date:t,isOpen:s[0],setIsOpen:s[1],handleDateChange:function(e){n(e),a(e)}}}}},2966:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return Y},default:function(){return U}});var r,i=n(6042),o=n(9396),a=n(828),s=n(9815),l=n(5893),c=n(7294),d=n(3254),u=n(4951),f=n(2490),m=n(2469),p=n(3763),g=n(5820),h=n(6726),b=n(9081),x=n(7414),v=n(1818),w=n(3533),y=n(2077);!function(e){e.FULL_LISTING="Full Listings",e.CINEMA="Film",e.LIVE_EVENT="Live",e.CREATIVE_ACTIVITY="Classes & Workshops",e.DATE="Date"}(r||(r={}));var j=n(6538),T=n(2531),C=(0,x.zo)("div",{zIndex:"1",padding:"2rem 0",backgroundColor:"#FAFAFA",position:"fixed",top:"6rem",width:"100%","@mobile":{top:"0",position:"relative"}}
1),k=(0,x.zo)(w.Z,{gap:"1rem","@mobile":{marginTop:"1rem",width:"100%",overflowY:"scroll"}}),D=((0,x.zo)(w.Z,{alignItems:"flex-start",gap:"1rem","@mobile":{overflowX:"scroll"}}),(0,x.zo)("div",{display:"flex",alignContent:"center",justifyContent:"space-between","@mobile":{flexDirection:"column",alignItems:"flex-start"}})),E=(0,x.zo)("div",{cursor:"pointer",padding:".5rem .625rem",whiteSpace:"nowrap",variants:{selected:{true:{background:"$grey2"}}}}),_=(0,x.zo)(p.E.div,{padding:"2rem 0",backgroundColor:"#FAFAFA",position:"fixed",top:"12rem",zIndex:10,width:"100%","@mobile":{top:"14rem"}}),I=(0,x.zo)("div",{gap:"1rem",display:"flex",flexDirection:"column","@mobile":{marginTop:"1rem",width:"100%",overflowY:"scroll"}}),S=(0,x.zo)("div",{display:"flex",alignContent:"center",justifyContent:"space-between"}),L=(0,x.zo)("div",{display:"grid",gridTemplateColumns:"1fr 1fr 1fr","@mobile":{gridTemplateColumns:"1fr 1fr",width:"100%"}}),Z=(0,x.zo)("div",{display:"flex",alignItems:"center",justifyContent:"center",transform:"translateY(1px)","svg path":{fill:"$tomato"}}),z=(0,x.zo)("div",{display:"flex",alignContent:"center",justifyContent:"space-between",width:"100%"}),A=function(e){var t=e.setFilter,n=e.filter,o=e.tags,a=e.selectedTags,d=e.setSelectedTags,f=(0,c.useState)(!1),p=f[0],x=f[1],w=(0,b.Z)(),A=(0,c.useState)(n),F=A[0],N=A[1],$=(0,h.t)(),M=($.date,$.displayDate,$.binding),O=(0,T.P)(),P=(O.datePicked,O.setDatePicked);void 0!=M.date&&P(M.date.toString()),(0,c.useEffect)((function(){t(F)}),[F]);var Y=Object.values(r);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(C,{children:(0,l.jsx)(u.Z,{children:(0,l.jsxs)(D,{children:[(0,l.jsxs)(z,{children:[(0,l.jsx)(y.H5,{margin:!1,children:"What's on?"}),w&&(0,l.jsx)(E,{onClick:function(){return x(!p)},children:(0,l.jsxs)(Z,{children:[(0,l.jsxs)(y.__,{noMargin:!0,colour:"tomato",children:[p&&"CLOSE ","FILTERS"]}),(0,l.jsx)(m.AjK,{})]})},"filters")]}),(0,l.jsxs)(k,{children:[Y.map((function(e,t){return(0,l.jsx)(E,{onClick:function(){return N(e)},selected:F===e,children:"Date"==e?(0,l.jsx)(j.Z,(0,i.Z)({},M)):(0,l.jsx)(y.__,{colour:e!=F?"tomato":"default",children:e.toUpperCase()})},e+t)})),!w&&(0,l.jsx)(E,{onClick:function(){return x(!p)},children:(0,l.jsxs)(Z,{children:[(0,l.jsx)(y.__,{noMargin:!0,colour:"tomato",children:"FILTERS"}),(0,l.jsx)(m.AjK,{})]})},"filters")]})]})})}),(0,l.jsx)(g.M,{children:p&&(0,l.jsx)(_,{initial:{opacity:0,y:-100},animate:{opacity:1,y:0},exit:{opacity:0,y:-100},children:(0,l.jsx)(u.Z,{children:(0,l.jsxs)(I,{children:[(0,l.jsx)(y.H6,{noMargin:!0,css:{width:"100%"},colour:"orangeYellow",children:"Event Tags"}),(0,l.jsx)(L,{children:o.map((function(e){return(0,l.jsx)(S,{children:(0,l.jsx)(v.Z,{id:e,"aria-label":e,label:e,checked:a.includes(e),onChange:function(){a.includes(e)?d(a.filter((function(t){return t!==e}))):d((0,s.Z)(a).concat([e]))}})},"")}))})]})})})})]})},F=n(8927),N=n(903),$=(0,x.zo)("div",{marginTop:"5.5rem","@mobile":{marginTop:"0"}}),M=(0,x.zo)("div",{position:"relative",marginBottom:"2rem"}),O=(0,x.zo)("div",{fontWeight:"700",textDecoration:"underline",textUnderlineOffset:"0.25rem",color:"$tomato"}),P=(0,x.zo)("span",{border:"1px solid grey",width:"0.75rem",margin:"0 .75rem"}),Y=!0,U=function(e){var t=e.page,n=(0,a.Z)((0,F.hI)({onSale:!0}),3),m=n[0],p=n[1],g=(n[2],(0,c.useState)([])),h=g[0],b=g[1],x=(0,c.useState)([]),v=x[0],w=x[1],y=(0,c.useState)(!0),j=y[0],C=y[1],k=(0,c.useState)(r.FULL_LISTING),D=k[0],E=k[1],_=(0,T.P)().getDatePicked;(0,c.useEffect)((function(){w([]),S(),I()}),[D,_]);var I=(0,c.useCallback)((function(){var e=t.data.slides,n=e.find((function(e){return e.catagory==D}));return null==n&&(n=e[0]),{title:n.title?n.title:"No Title Provided",content:n.content?n.content:"No Content Provided",image:n.image.url?n.image.url:"/bat.jpg",anchorTitle:n.buttonText?n.buttonText:"Book Now",anchorLink:n.buttonLink?n.buttonLink.url:"/"}}),[D]),S=(0,c.useCallback)((function(){var e=L().map((function(e){return e.tag}));e=e.filter((function(t,n){return e.indexOf(t)==n&&""!=t&&null!=t})),b(e)}),[D]),L=(0,c.useCallback)((function(){if(p)return[];var e=(0,s.Z)(m);return e=e.filter((function(e){return Date.now()<new Date(e.lastInstanceDateTime).getTime()})),D!=r.FULL_LISTING&&D!=r.DATE&&(e=D==r.CINEMA?e.filter((function(e){return"Cinema"==e.attribute_EventType||"Film"==e.attribute_EventType})):e.filter((function(e){return e.attribute_EventType==D}))),D==r.DATE&&(e=e.filter((function(e){return t=function(){var e=_().split(" "),t=e[2]+" "+e[1]+" "+e[3],n=new Date(Date.parse(t)),r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return new Date([r,i,o].join("-"))}(),n=new Date(e.firstInstanceDateTime.split("T")[0]),r=new Date(e.lastInstanceDateTime.split("T")[0]),t.getTime()>=n.getTime()&&t.getTime()<=r.getTime();var t,n,r}))),e=e.filter((function(e){if(0==v.length)return!0;for(var t=e.attribute_EventTagV2.concat(e.attribute_filmCategories),n=0;n<v.length;n++){var r=v[n];if(t.includes(r))return!0;
1if("Captioned"==r&&e.name.toLowerCase().includes("captioned"))return!0;if("Audio Described"==r&&!e.name.toLowerCase().includes("audio"))return!0}})),j&&e.sort((function(e,t){return new Date(e.firstInstanceDateTime).getTime()-new Date(t.firstInstanceDateTime).getTime()})),e.map((function(e){return{tag:e.attribute_EventTagV2,image:{src:""==e.imageUrl?"none":e.imageUrl,alt:e.name},content:{title:e.name,content:e.attribute_ShortDescription,ctaTitle:"More Information",ctaLink:"/shows/"+e.id,certification:e.attribute_Certification?e.attribute_Certification:null,catagory:e.attribute_EventType,startDate:e.firstInstanceDateTime,endDate:e.lastInstanceDateTime}}}))}),[m,D,v,j]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A,{setFilter:E,filter:D,tags:h,selectedTags:v,setSelectedTags:w}),(0,l.jsx)($,{children:(0,l.jsx)(d.Z,(0,o.Z)((0,i.Z)({variant:"half"},I()),{blockColour:"black"}))}),(0,l.jsx)(u.Z,{children:(0,l.jsx)(M,{children:(0,l.jsxs)(N.Z,{style:"outlined",onClick:function(){return C(!j)},children:[j?"A-Z":(0,l.jsx)(O,{children:"A-Z"}),(0,l.jsx)(P,{}),j?(0,l.jsx)(O,{children:"Date"}):"Date"]})})}),(0,l.jsx)(f.Z,{items:L()})]})}}},function(e){e.O(0,[706,944,774,888,179],(function(){return t=6635,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.