1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8944],{18944:function(e,r,t){"use strict";t.d(r,{$I:function(){return H},$V:function(){return W},J0:function(){return D}});var s=t(85893),n=t(90512),l=t(98436),a=t(41664),i=t.n(a),o=t(67294),c=t(86896),d=t(25979),u=t(8497),m=t(82672),h=t(31436),x=t(74677),f=t(98779),p=t.n(f),b=t(46569),g=t(54322),v=t(44863),j=t(58527),N=t(78600),w=t(89535),y=t(42654),k=t(97859),L=t(33699),E=t(15674),C=t.n(E);let S={Uraufführung:{abbr:"UA",borderClass:"border-orange"},"Deutsche Erstauff\xfchrung":{abbr:"DEA",borderClass:"border-gray"},"Deutschsprachige Erstauff\xfchrung":{abbr:"DSE",borderClass:"border-gray"},"\xd6sterreichische Erstauff\xfchrung":{abbr:"\xd6EA",borderClass:"border-grassGreen"},"Schweizer Erstauff\xfchrung":{abbr:"SEA",borderClass:"border-grassGreen"}},A=e=>{let{href:r,children:t}=e;return(0,s.jsx)(i(),{href:r,className:(0,n.Z)(p().metaLink,"text-black"),children:t})},M=e=>{let{name:r}=e,t=S[r];return t?(0,s.jsx)("span",{className:(0,n.Z)("ml-2 inline-block rounded-full border px-2 py-0.5 align-middle font-sans text-xs leading-none",t.borderClass),title:r,children:t.abbr}):(0,s.jsx)("span",{className:"ml-2 inline-block rounded-full border border-gray px-2 py-0.5 align-middle font-sans text-xs uppercase leading-none text-gray",title:r,children:r})},R=e=>{let{name:r,href:t}=e,n=(0,s.jsx)("span",{className:"ml-2 inline-block rounded-full border border-gray px-2 py-0.5 align-middle font-sans text-xs leading-none text-gray",title:r,children:r});return t?(0,s.jsx)(i(),{href:t,className:"no-underline",children:n}):n},B=e=>{let{persons:r}=e;return(0,s.jsx)(s.Fragment,{children:r.map((e,r)=>(0,s.jsxs)(o.Fragment,{children:[r>0&&", ",e.wroteForTdzSince1990||e.text?(0,s.jsx)(A,{href:(0,h.Bt)((0,u.QH)(e)).href,children:(0,L.Z6)(e)}):(0,L.Z6)(e)]},e.id))})};function _(e,r){return e.persons.filter(e=>"author"===r?e.isAuthor:"director"===r?e.isDirector:e.isStageDesigner).map(e=>e.person).filter(Boolean)}function V(e){var r,t;let s=null===(t=e.address)||void 0===t?void 0:null===(r=t.company)||void 0===r?void 0:r.trim();return s?e.venues.map(e=>e.name.trim().toLowerCase()).includes(s.toLowerCase())?"":s:""}function Z(e,r){let t=(0,l.R)(e);return{date:t.toLocaleDateString(r,{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Europe/Berlin"}),monthLabel:t.toLocaleDateString(r,{month:"long",year:"numeric",timeZone:"Europe/Berlin"}),monthKey:t.toLocaleDateString("en-CA",{year:"numeric",month:"2-digit",timeZone:"Europe/Berlin"})}}let D=e=>{let{articles:r,title:t}=e;return(0,s.jsxs)("section",{className:"border-b border-lightGray pb-0 pt-8",children:[(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("p",{className:"mb-1 font-sans text-xs uppercase tracking-wide text-textGreen",children:"Berichte"}),(0,s.jsx)("h2",{className:"mb-1 typo-section-title",children:t})]}),(0,s.jsx)("div",{className:"-mb-6",children:(0,s.jsx)(w._,{articles:r,teaserVariant:"small",cols:3,skipHeader:!0})})]})},G=e=>{let{articles:r,regionName:t}=e;return(0,s.jsx)(D,{articles:r,title:"Neu ".concat((0,k.qZ)(t,"aus"))})},z=e=>{var r,t,l,a,o;let{venue:c,clone:d}=e,m=(0,g.Vh)(c.image)?c.image:c.wikiImage,x=(0,g.Vh)(m),f=(null===(r=c.image)||void 0===r?void 0:r.credits)||(null===(t=c.wikiImage)||void 0===t?void 0:t.credits)||"",p=(null!==(o=null===(l=c.articles)||void 0===l?void 0:l.totalCount)&&void 0!==o?o:0)>0,v=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"relative mb-4 block aspect-[4/3] overflow-hidden bg-lightGray",children:x&&(0,s.jsx)(b._,{src:x,external:!!(null==m?void 0:m.isExternal),sizes:"236px"})}),(null===(a=c.address)||void 0===a?void 0:a.city)&&(0,s.jsx)("span",{className:"mb-1 block typo-base",children:c.address.city}),(0,s.jsx)("span",{className:(0,n.Z)("mb-1 block typo-tile-title",p&&"group-hover:underline"),children:c.name})]});return(0,s.jsxs)("article",{className:"mr-3.5 w-[236px] flex-none overflow-hidden border border-dotted border-black p-2.5 xs:p-4","aria-hidden":d||void 0,children:[p?(0,s.jsx)(i(),{href:(0,h.VU)((0,u.QH)(c)).href,className:"group block cursor-pointer border-b-0 no-underline",tabIndex:d?-1:void 0,children:v}):v,f&&(0,s.jsx)(N.U,{credits:f})]})},F=e=>{let{venues:r,regionName:t}=e,n=(0,o.useRef)(null),l=(0,o.useRef)(null),a=(0,o.useRef)(0),c=(0,o.useRef)(!1),d=(0,o.useRef)(!1),u=(0,o.useRef)(!1),h=(0,o.useRef)(null),x=(0,o.useRef)(!1),[f,p]=(0,o.useState)(3),b=(0,o.useCallback)(()=>{let e=n.current,r=a.current;if(!e||r<=0||e.scrollWidth<2*r+e.clientWidth-1)return 0;let t=e.scrollLeft;return t>=2*r?e.scrollLeft=t-r:t<r&&(e.scrollLeft=t+r),e.scrollLeft-t},[]);(0,o.useEffect)(()=>{let e=n.current,r=l.current;if(!e||!r)return;let t=()=>{let t=r.getBoundingClientRect().width;if(t<=0)return;let s=t/f;a.current=s,p(Math.ceil(e.offsetWidth/s)+2),e.scrollLeft<s&&(e.scrollLeft=s)};if(t(),"undefined"==typeof ResizeObserver)return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t);let s=new ResizeObserver(t);return s.observe(r),s.observe(e),()=>s.disconnect()},[r,f]),(0,o.useEffect)(()=>{let e=n.current;if(!e||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let r=e.scrollLeft;e.scrollLeft=r+.5;let t=.25>Math.abs(e.scrollLeft-(r+.5));e.scrollLeft=r;let s=0,l=0,a=0,i=r=>{s=requestAnimationFrame(i);let n=l?Math.min(r-l,100):0;if(l=r,c.current||n<=0)return;a+=42*n/1e3;let o=t?a:Math.floor(a);if(o<=0||(a-=o,e.scrollLeft+=o,0!==b()))return;let d=e.scrollWidth-e.clientWidth;d>0&&e.scrollLeft>=d-1&&(e.scrollLeft=0)};return s=requestAnimationFrame(i),()=>cancelAnimationFrame(s)},[b]);let g=(0,o.useCallback)(()=>{c.current=d.current||u.current||null!==h.current},[]);return(0,o.useEffect)(()=>{let e=e=>{let r=n.current,t=h.current;if(!r||!t)return;let s=e.clientX-t.x;Math.abs(s)>3&&(x.current=!0),r.scrollLeft=t.from-s,t.from+=b()},r=()=>{h.current=null,g()};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",r),window.addEventListener("pointercancel",r),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",r),window.removeEventListener("pointercancel",r)}},[b,g]),(0,s.jsxs)("section",{className:"border-b border-lightGray py-8",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-end justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1 font-sans text-xs uppercase tracking-wide text-textGreen",children:"Spielorte"}),(0,s.jsxs)("h2",{className:"mb-1 typo-section-title",children:["Theater ",(0,k.qZ)(t,"in")]})]}),(0,s.jsx)(i(),{href:m.V.venues,className:"whitespace-nowrap border-b border-orange pb-0.5 font-sans text-sm text-gray no-underline hover:text-black",children:"Alle Spielorte"})]}),(0,s.jsx)("div",{ref:n,className:C().venueScroller,onScroll:()=>{b()},onPointerEnter:()=>{d.current=!0,g()},onPointerLeave:()=>{d.current=!1,g()},onFocus:()=>{u.current=!0,g()},onBlur:()=>{u.current=!1,g()},onPointerDown:e=>{let r=n.current;r&&"touch"!==e.pointerType&&0===e.button&&(x.current=!1,h.current={x:e.clientX,from:r.scrollLeft},g())},onClickCapture:e=>{x.current&&(x.current=!1,e.preventDefault(),e.stopPropagation())},onDragStart:e=>e.preventDefault(),children:(0,s.jsx)("div",{ref:l,className:C().venueTrack,children:Array.from({length:f},(e,t)=>(0,s.jsx)("div",{className:"flex flex-none","aria-hidden":t>0||void 0,children:r.map(e=>(0,s.jsx)(z,{venue:e,clone:t>0},e.id))},t))})})]})},T=e=>{var r,t,n,l;let{ev:a,locale:i,houseHref:o,extraCredits:c}=e,d=a.venues[0],m=d?(0,k.gR)(d.topics):void 0,x=null==d?void 0:null===(r=d.address)||void 0===r?void 0:r.city,f=null===(t=a.subtype)||void 0===t?void 0:t.name,p=a.topics.filter(e=>{var r;return null===(r=e.parents)||void 0===r?void 0:r.some(e=>"Sparten"===e.title)}),b=V(a),g=_(a,"author"),v=_(a,"director"),j=_(a,"stage"),N=(null!==(l=null==d?void 0:null===(n=d.articles)||void 0===n?void 0:n.totalCount)&&void 0!==l?l:0)>0,w=p.map(e=>{var r;return(0,s.jsx)(R,{name:e.title||"",href:(null===(r=e.defaultSlug)||void 0===r?void 0:r.slug)?(0,h.C7)(e.defaultSlug.slug).href:void 0},e.id)});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("article",{className:"border-t border-dotted border-lightGray pt-3 md:hidden",children:[a.start&&(0,s.jsx)("p",{className:"mb-1 font-serif text-base",children:Z(a.start,i).date}),(0,s.jsxs)("h3",{className:"leading-tight mb-1 text-lg font-medium",children:[a.title,f&&(0,s.jsx)(M,{name:f}),w]}),(g.length>0||a.customAuthor)&&(0,s.jsx)("p",{className:"mb-1 text-base text-gray",children:g.length>0?(0,s.jsx)(B,{persons:g}):a.customAuthor}),b&&(0,s.jsx)("p",{className:"mb-1 text-base font-medium",children:o?(0,s.jsx)(A,{href:o,children:b}):b}),(d||a.customVenue)&&(0,s.jsx)("p",{className:"mb-1 text-base",children:d?(0,s.jsxs)(s.Fragment,{children:[N?(0,s.jsx)(A,{href:(0,h.VU)((0,u.QH)(d)).href,children:d.name}):d.name,x&&(0,s.jsxs)("span",{className:"font-serif",children:[" (",x,")"]}),m&&(0,s.jsxs)("span",{className:"text-gray",children:[" \xb7 ",(0,s.jsx)(A,{href:(0,h.C7)(m.slug).href,children:m.name})]})]}):a.customVenue}),v.length>0&&(0,s.jsxs)("p",{className:"text-base",children:["Regie: ",(0,s.jsx)(B,{persons:v})]}),j.length>0&&(0,s.jsxs)("p",{className:"text-base",children:["B\xfchne: ",(0,s.jsx)(B,{persons:j})]}),(0,s.jsx)(y.fB,{credits:c,className:"mt-0.5 block text-base text-gray"})]}),(0,s.jsxs)("div",{className:"hidden gap-x-6 gap-y-1 border-t border-dotted border-lightGray py-3.5 text-sm md:grid md:grid-cols-[110px_1.5fr_1.4fr_1fr]",children:[(0,s.jsx)("div",{className:"font-serif",children:a.start?Z(a.start,i).date:""}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"font-medium",children:a.title}),f&&(0,s.jsx)(M,{name:f}),w,(g.length>0||a.customAuthor)&&(0,s.jsx)("span",{className:"mt-0.5 block text-gray",children:g.length>0?(0,s.jsx)(B,{persons:g}):a.customAuthor})]}),(0,s.jsxs)("div",{className:"min-w-0",children:[b&&(o?(0,s.jsx)("span",{className:"block",children:(0,s.jsx)(A,{href:o,children:b})}):(0,s.jsx)("span",{className:"block text-black",children:b})),d?N?(0,s.jsx)(A,{href:(0,h.VU)((0,u.QH)(d)).href,children:d.name}):(0,s.jsx)("span",{className:"text-black",children:d.name}):a.customVenue&&(0,s.jsx)("span",{className:"text-black",children:a.customVenue}),x&&(0,s.jsxs)("span",{className:"block font-serif text-xs",children:["(",x,")"]}),m&&(0,s.jsx)("span",{className:"mt-0.5 block",children:(0,s.jsx)(A,{href:(0,h.C7)(m.slug).href,children:m.name})})]}),(0,s.jsxs)("div",{className:"min-w-0",children:[v.length>0&&(0,s.jsxs)("span",{className:"block",children:["Regie: ",(0,s.jsx)(B,{persons:v})]}),j.length>0&&(0,s.jsxs)("span",{className:"mt-0.5 block text-gray",children:["B\xfchne: ",(0,s.jsx)(B,{persons:j})]}),(0,s.jsx)(y.fB,{credits:c})]})]})]})},H=e=>{let{premieres:r,title:t,locale:n}=e,[l,a]=(0,o.useState)(!1),i=r.length>5,m=function(e){let r=(0,c.Z)(),t=(0,o.useMemo)(()=>{let r=new Set;for(let t of e){let e=V(t);e&&r.add(e)}return Array.from(r)},[e]),{data:s}=(0,d.p9i)({variables:{names:t,currentLanguage:r.locale},skip:0===t.length});return(0,o.useMemo)(()=>{var e,r;let t=new Map;for(let n of null!==(r=null==s?void 0:null===(e=s.contentVenues)||void 0===e?void 0:e.list)&&void 0!==r?r:[]){let{href:e}=(0,h.VU)((0,u.QH)(n));e&&t.set(n.name.trim().toLowerCase(),e.toString())}return t},[s])}(r),x=(0,y.Z2)((0,o.useMemo)(()=>r.map(e=>
1e.id).filter(Boolean),[r])),f=(0,o.useMemo)(()=>{let e=l?r:r.slice(0,5),t=new Map;for(let r of e)if(r.start){let{monthLabel:e,monthKey:s}=Z(r.start,n),l=t.get(s);l?l.items.push(r):t.set(s,{label:e,items:[r]})}return Array.from(t.entries()).sort((e,r)=>e[0].localeCompare(r[0])).map(e=>{let[,r]=e;return r})},[r,n,l]);return 0===f.length?null:(0,s.jsxs)("section",{className:"pt-8",children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-wrap items-end justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1 font-sans text-xs uppercase tracking-wide text-textGreen",children:"Kalender"}),(0,s.jsx)("h2",{className:"mb-1 typo-section-title",children:t})]}),i&&(0,s.jsx)("button",{type:"button",onClick:()=>a(e=>!e),className:"whitespace-nowrap border-b border-orange pb-0.5 font-sans text-sm text-gray no-underline hover:text-black",children:l?"Weniger anzeigen":"Alle Premieren"})]}),f.map(e=>(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h3",{className:"text-xl mb-2 font-sans capitalize",children:e.label}),(0,s.jsx)("div",{className:"border-b border-lightGray",children:e.items.map(e=>(0,s.jsx)(T,{ev:e,locale:n,houseHref:m.get(V(e).toLowerCase()),extraCredits:x[e.id]},e.id))})]},e.label))]})},U=e=>{let{premieres:r,regionName:t,locale:n}=e;return(0,s.jsx)(H,{premieres:r,title:"Kommende Premieren ".concat((0,k.qZ)(t,"in")),locale:n})},I=e=>{let{figure:r,intro:t}=e;return r||t?(0,s.jsxs)("div",{className:"mb-8 grid grid-cols-1 items-start gap-6 border-b border-lightGray pb-8 md:grid-cols-[3fr_2fr]",children:[r&&(0,s.jsx)(v.B,{...r,className:"mb-0",sizes:"(min-width: 768px) 58vw, 100vw"}),t&&(0,s.jsx)("div",{className:"typo-base",children:(0,s.jsx)(j.H,{html:t})})]}):null},P=e=>{var r,t,n;let{slug:l,regionName:a,figure:i,intro:u,articles:m}=e,h=(0,c.Z)(),f=(0,d.iTT)({variables:{slug:l,currentLanguage:h.locale}}),p=(0,o.useMemo)(()=>{var e,r,t;return null!==(t=null===(r=f.data)||void 0===r?void 0:null===(e=r.contentCollectionBySlug)||void 0===e?void 0:e.venues)&&void 0!==t?t:[]},[f.data]),b=(0,o.useMemo)(()=>p.map(e=>e.id),[p]),v=(0,o.useMemo)(()=>p.map(e=>e.name).filter(e=>!!e),[p]),j=(0,o.useMemo)(()=>p.filter(e=>{var r;return!(null!==(r=e.topics)&&void 0!==r?r:[]).some(k.oA)&&((0,g.Vh)(e.image)||(0,g.Vh)(e.wikiImage))}),[p]),N=null!==(n=null===(t=(0,d.do7)({variables:{currentLanguage:h.locale,today:(0,x.R)(),venueIds:b,houseNames:v},skip:0===b.length}).data)||void 0===t?void 0:null===(r=t.contentEvents)||void 0===r?void 0:r.list)&&void 0!==n?n:[];return i||u||(null==m?void 0:m.length)||0!==j.length||0!==N.length?(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)(I,{figure:i,intro:u}),m&&m.length>0&&(0,s.jsx)(G,{articles:m,regionName:a}),j.length>0&&(0,s.jsx)(F,{venues:j,regionName:a}),N.length>0&&(0,s.jsx)(U,{premieres:N,regionName:a,locale:h.locale})]}):null},W=e=>{let{slug:r,figure:t,intro:n,articles:l}=e,a=k.BT.get(r);return a?(0,s.jsx)(P,{slug:r,regionName:a.name,figure:t,intro:n,articles:l}):null}},15674:function(e){e.exports={venueScroller:"RegionModule_venueScroller__vE_mI",venueTrack:"RegionModule_venueTrack__hijBb"}}}]);
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.