PageSourceSearch

https://static.operabase.com/b02d0c7a-dc1f-4b83-8723-114bf8e68402/_next/static/chunks/1805-e3b2e1410325075d.js

js operabase.com collected 2026-09-24 17:09:00 UTC 94,274 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d970a6d9-4872-4f0c-8a43-1b915afa20b6",e._sentryDebugIdIdentifier="sentry-dbid-d970a6d9-4872-4f0c-8a43-1b915afa20b6")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1805],{2789:(e,t,l)=>{"use strict";l.d(t,{A:()=>S});var i=l(95155),r=l(12115),s=l(86194),n=l(92905),o=l(33352),a=l(96286),E=l(48158),T=l(19420),_=l(6097),d=l(28554),c=l(22377),R=l(38002),u=l.n(R);let S=e=>{let{value:t,options:l,onSelect:R,onOpen:S,styles:I,trackingData:O={},variant:p}=e,{t:P}=(0,c.useTranslation)("NS_APP_GLOBALS"),L=(0,E.A)(),A=(0,T.j3)(O,!1),{isMobile:N}=(0,d.Ay)(),[f,C]=(0,r.useState)(!1),h="STICKY_DESKTOP"===p,F="MINIMIZED"===p||"STICKY_MINIMIZED"===p,b="NEW"===p||F||h,g=F||h,y=(0,r.useMemo)(()=>l?.map(e=>({...e,label:"string"==typeof e?.label?`${P(e?.label,{...e?.labelProp})} ${e?.suffix?`(${P(e?.suffix)})`:""}`:e?.label,icon:(0,i.jsx)(n.Ay,{icon:e?.icon||"swap",size:"14",className:u().icon})})),[l,P]),Y=(0,r.useMemo)(()=>y?.find(e=>e?.value===t),[y,t]),m=(0,r.useMemo)(()=>{let e=Y?.label;if("string"!=typeof e)return e;let t=e.match(/\(([^)]+)\)/);return t?t[1]:e.trim()},[Y?.label]),x=(0,r.useMemo)(()=>{if("STICKY_MINIMIZED"===p){let e=P(`${_.TP}.FN_SORTBY`).split(/\s+/)[0];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.Ay,{size:"12",children:`${e}: `}),(0,i.jsx)(a.Ay,{size:"12",children:m})]})}return F?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.Ay,{size:"12",children:`${P(`${_.TP}.FN_SORTBY`)}: `}),(0,i.jsx)(a.Ay,{size:"12",children:m})]}):"NEW"===p||h?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.Ay,{size:"12",children:`${P(`${_.TP}.FN_SORTBY`)}: `}),Y?.label]}):f&&!N?P(`${_.TP}.FN_SORTBY`):Y?.label},[p,Y?.label,m,P,f,N,F,h]);return(0,i.jsx)(o.A,{title:f?P(`${_.TP}.FN_SORTBY`):Y?.label,options:y,label:x,hideLeftIcon:g,leftIcon:Y?.icon,rightIcon:(0,i.jsx)(n.Ay,{icon:"expand_more",size:14,className:u().rightIcon}),value:Y?.value,onChange:e=>{L.click({...O,meta:{id:e?.value}}),R&&R(e?.value)},onOpen:e=>{C(e),"function"==typeof S&&S(e)},styles:{radioBtn:(0,s.default)(u().radioBtn,A),selectedOption:(0,s.default)(u().selectedOption,{[u().selectedOption__new]:b,[I?.selectedOption]:!!I?.selectedOption,[u().collapsed]:N||!f}),...I},alwaysDropdown:!0})}},5765:(e,t,l)=>{"use strict";l.d(t,{P_:()=>eI,HF:()=>eS,rs:()=>en,Ay:()=>eO});var i=l(95155),r=l(12115),s=l(86194),n=l(78411),o=l.n(n),a=l(64311),E=l.n(a),T=l(24461),_=l(15397),d=l(86630),c=l(11348),R=l(40391),u=l(46826),S=l(93614),I=l(49261),O=l(92905),p=l(96286),P=l(43233),L=l(48158),A=l(74906),N=l(8324),f=l(11273),C=l(889
119),h=l(12433),F=l(19420),b=l(6097),g=l(61634),y=l(37222),Y=l(27199),m=l(55667),x=l(60030),D=l(42225),G=l(81649),U=l(35145),v=l(11681),k=l(28554),j=l(27822),w=l(46870),B=l(12634),M=l(52811),W=l(54589),$=l(22377),K=l(42732),V=l(10043),H=l(57778),z=l(49484),Q=l(13669),X=l.n(Q);let Z={DETAILED:"button_group_detailed"},q={GENRE:`${b.TP}.FN_GENRE_STAGING`,MUSICAL_WORK_AND_COMPOSER:`${b.TP}.FN_MW_AND_COMPOSER`,SINCE:`${b.TP}.FN_FILTER_SINCE`,ORGANIZATION:`${b.TP}.FN_PRODUCER_FILTER`,DIRECTOR:`${b.TP}.FN_DIRECTOR`,CONDUCTOR:`${b.TP}.m_CONDUCTOR`,INSTRUMENTALIST:`${b.TP}.FN_INDUSTRY_PRO_INSTRUMENTALISTS_LABEL`,GENRE_MW_COMPOSER:`${b.TP}.FN_GENRE_MW_COMPOSER`,REST_ALL_FILTERS:`${b.TP}.FN_REST_ALL_FILTERS`,ALL_CAST_CREW:`${b.TP}.FN_ALL_CAST_CREW`,ROLE_AND_PROFESSION:`${b.TP}.ROLE_PROFESSIONS_FILTER`},J=[K.FILTER_TYPES.WORK_TYPE,K.FILTER_TYPES.ROLE_PROFESSION],ee=e=>{let{types:t,facetsApiFilters:l,appliedFilters:n,onExpandFilter:a,layout:E,customFilters:T=null,customGroups:_=null,styles:d={},ignoreSmallScreenGroup:c=!1,disable:R}=e,{t:u}=(0,$.useTranslation)("NS_APP_GLOBALS"),{obRouteContext:S}=(0,U.A)(),{linkProps:I}=S,{filters:P}=I||{},L=(0,B.A)(),{entity:A,paths:N}=(0,W.A)(),{isMobile:f}=(0,k.Ay)(),C=(0,V.A)("(max-width:800px)"),h=(0,V.A)("(max-width:1200px)"),F=(e=>{let{enabled:t,facetsApiFilters:l,appliedFilters:i,types:s,layout:n,disable:a}=e,{obRouteContext:E}=(0,U.A)(),{page:T,linkProps:_}=E,{filters:d}=_||{},c=T?.tab===b.ENTITY_MAIN_TABS.DESIRED_ROLE,R=(0,r.useMemo)(()=>s?.filter(e=>J.includes(e))||[],[s]),{data:u,isFetching:S}=(0,g.IT)((0,y.filterCountsList)({types:R,filters:l},{enabled:t&&R?.length>0&&!c&&!a,keepPreviousData:!0})),{data:I,isFetching:O}=(0,g.IT)((0,y.dynamicFiltersList)({filters:{...o()(i,[H.E5[K.FILTER_TYPES.CONTRIBUTION_EXPRESSION],H.E5[K.FILTER_TYPES.PROFESSION]])}},{enabled:!c&&!a,keepPreviousData:!0})),{isDirectorFilterPresent:p,isConductorFilterPresent:P,isInstrumentalistFilterPresent:L,contributionTypesFilterPresent:A={},isRoleProfessionPresent:N=!1}=(0,r.useMemo)(()=>{if(O||!I||S||!u)return{isDirectorFilterPresent:!1,isConductorFilterPresent:!1,isInstrumentalistFilterPresent:!1};let e=I?.flat();return{isMusicalWorkFilterPresent:u?.[K.FILTER_TYPES.WORK]>0,isRoleProfessionPresent:u?.[K.FILTER_TYPES.ROLE_PROFESSION]>0,...e?.reduce((e,t)=>(t?.type===K.FILTER_TYPES.DIRECTOR&&(e.isDirectorFilterPresent=!0),t?.type===K.FILTER_TYPES.CONDUCTOR&&(e.isConductorFilterPresent=!0),t?.parentProfession?.slug===b.CONTRIBUTORS.INSTRUMENTALIST&&(e.isInstrumentalistFilterPresent=!0),b.CONTRIBUTORS.PRODUCER===t?.id&&(e.contributionTypesFilterPresent.producer=t),b.CONTRIBUTORS.VENUE===t?.id&&(e.contributionTypesFilterPresent.venue=t),e),{isDirectorFilterPresent:!1,isConductorFilterPresent:!1,isInstrumentalistFilterPresent:!1,contributionTypesFilterPresent:{}})}},[I,O,S,u]);return({[Z.DETAILED]:[{name:q.GENRE,filterTypes:[K.FILTER_TYPES.WORK_TYPE],isDisabled:!u?.[K.FILTER_TYPES.WORK_TYPE],count:d?.[K.FILTER_TYPES.WORK_TYPE]?.length},{name:q.ROLE_AND_PROFESSION,filterTypes:[K.FILTER_TYPES.ROLE_PROFESSION],isDisabled:!N},{name:q.SINCE,filterTypes:[K.FILTER_TYPES.SINCE_YEAR],isDisabled:!u?.[K.FILTER_TYPES.SINCE_YEAR]},{name:q.ORGANIZATION,count:d?.[K.FILTER_TYPES.PRODUCER]?.length,filterTypes:[K.FILTER_TYPES.CONTRIBUTION_EXPRESSION],subFilterTypes:[b.URL_SLUG_TYPES.CONTRIBUTION_TYPE],ids:Object.keys(A)?.length>0?[A?.producer?.id||A?.venue?.id]:null,isDisabled:!Object.keys(A)?.length},{name:q.DIRECTOR,count:d?.[K.FILTER_TYPES.DIRECTOR]?.length,filterTypes:[K.FILTER_TYPES.CONTRIBUTION_EXPRESSION],ids:[K.FILTER_TYPES.DIRECTOR],subFilterTypes:[H.E5[K.FILTER_TYPES.PROFESSION]],isDisabled:!p},{name:q.CONDUCTOR,count:d?.[K.FILTER_TYPES.CONDUCTOR]?.length,filterTypes:[K.FILTER_TYPES.CONTRIBUTION_EXPRESSION],ids:[K.FILTER_TYPES.CONDUCTOR],subFilterTypes:[H.E5[K.FILTER_TYPES.PROFESSION]],isDisabled:!P},{name:q.INSTRUMENTALIST,filterTypes:[K.FILTER_TYPES.CONTRIBUTION_EXPRESSION],ids:[b.CONTRIBUTORS.INSTRUMENTALIST],subFilterTypes:[H.E5[K.FILTER_TYPES.PROFESSION]],isDisabled:!L,count:L?(d?.[K.FILTER_TYPES.ROLE]||[]).filter(e=>e?.parents?.[0]?.entity?.id===b.PROFESSION_IDS.INSTRUMENTATION).reduce((e,t)=>
1e+(t?.contributors?.length||0),0):0}]})[n]})({enabled:!0,facetsApiFilters:l,appliedFilters:n,types:t,layout:E,disable:R}),Y=(0,r.useMemo)(()=>_[E]||F,[E,_,F]),m=(0,r.useMemo)(()=>Y?Y.map(e=>({...e,isDisabled:!!e?.isDisabled})):[],[Y]),x=(0,r.useMemo)(()=>{let e=(e,t)=>m.slice(e,t).reduce((e,t)=>(t?.isDisabled||(e.isDisabled=!1,t.filterTypes&&t.filterTypes.length&&e.filterTypes.push(...t.filterTypes),t.ids&&t.ids.length&&e.ids.push(...t.ids),t?.subFilterTypes&&t.subFilterTypes.length&&e.subFilterTypes.push(...t.subFilterTypes),t?.count!==void 0&&(e.count=t.count)),e),{filterTypes:[],ids:[],subFilterTypes:[],count:0,isDisabled:!0});return f?[{name:q.GENRE_MW_COMPOSER,...e(0,2)},{name:q.REST_ALL_FILTERS,...e(2)}]:C&&!c?[{name:q.GENRE_MW_COMPOSER,...e(0,2)},{name:q.SINCE,filterTypes:[],isDisabled:!0},{name:q.ALL_CAST_CREW,...e(0,2)}]:h&&!Object.keys(_).length?[...m.slice(0,4),{name:q.ALL_CAST_CREW,...e(4)}]:m},[_,m,c,f,C,h]),D=(0,z.partialDateConversion)({year:A?.stats?.performanceSince})||P?.since_year?.[0]?.slug;return(0,i.jsx)("div",{className:(0,s.default)(X().filterContainer,d?.root,{[X().filterContainerDetailed]:E===Z.DETAILED}),children:x?.map((e,t)=>(0,i.jsxs)("div",{className:(0,s.default)(X().filterContainer__box,{[d?.filterGroupBox]:!!d?.filterGroupBox,[X().disableBtn]:e?.isDisabled}),onClick:t=>((e,t)=>{if(e&&(e.stopPropagation(),e.preventDefault()),t.isDisabled)return;let l=t.filterTypes?.[0],i=t?.ids?.[0];if(l===K.FILTER_TYPES.ROLE_PROFESSION&&N?.[0]===b.URL_STATIC_PATHS.CASTING_ROLE_REPERTOIRE)return void L.scrollTo();a({type:l,...i&&{selectedSubFilterType:{scrollTo:i,type:t?.subFilterTypes?.[0]}}})})(t,e),children:[(0,i.jsxs)(p.Ay,{size:12,className:X().truncateTwoLines,children:[u(e?.name)," ",e.name===q.SINCE&&D,e?.count>=1&&(0,i.jsx)(p.Ay,{size:12,className:X().count,children:e?.count})]}),!e?.isDisabled&&(0,i.jsx)(O.Ay,{className:X().filterContainer__box_icon,icon:"filter_list",size:12})]},t))})};var et=l(37348),el=l(59183),ei=l.n(el);let er={section:A.bP.QUICK_FILTERS},es=()=>void 0,en={HORIZONTAL:"horizontal",VERTICAL:"vertical",QUICK_VIEW:"quickView",BUTTON:"button",BUTTON_GROUP_DETAILED:"button_group_detailed",ICON:"ICON",ICON_COMPACT:"ICON_COMPACT",TEXT:"text"},eo=[K.FILTER_TYPES.PRODUCER,b.CONTRIBUTORS.CREW,b.CONTRIBUTORS.CAST,b.CONTRIBUTORS.INSTRUMENTALIST,b.CONTRIBUTORS.ENSEMBLE];function ea(e){let{type:t,count:l,label:n,appliedCount:o,onClick:a,active:E,disable:T,inline:_,isExpanded:d,hideChevron:c,trackingClasses:R="",styles:u}=e,{t:S}=(0,$.useTranslation)("NS_APP_GLOBALS"),I=(0,r.useRef)(null),P=0===l,L=(0,r.useMemo)(()=>[K.FILTER_TYPES.CAST,K.FILTER_TYPES.CREW,K.FILTER_TYPES.INSTRUMENTALIST,K.FILTER_TYPES.ENSEMBLE].includes(n)?S(K.FILTER_LABELS[n]):n||S(K.FILTER_LABELS[t]),[n,S,t]);return(0,i.jsxs)("div",{className:(0,s.default)(ei().chip,R,{[ei().inlineChip]:!!_,[ei().active]:E,[ei().disabled]:P,[ei().applied]:o>0,[u?.root]:!!u?.root}),ref:I,onClick:e=>{e.stopPropagation(),e.preventDefault(),0!==l&&a({anchor:I?.current,type:t})},children:[(0,i.jsxs)("div",{className:ei().chip__labelWrapper,children:[(0,i.jsx)(p.Ay,{variant:_?"h3":"span",size:12,className:ei().chip__label,weight:d?"medium":"regular",color:P?"tertiary":"primary",truncate:!0,children:_?(0,i.jsx)(N.A,{ns:"NS_APP_GLOBALS",i18nKey:`${b.TP}.FN_FILTER_BY_OPTION`,values:{option:L}}):L}),!c&&(0,i.jsx)(O.Ay,{className:ei().chip__icon,icon:d?"expand_less":"expand_more"})]}),!P&&o>0&&(0,i.jsx)(p.Ay,{variant:"span",size:12,className:ei().chip__applied,color:"white",children:o}),!_&&"number"==typeof l&&(0,i.jsx)(p.Ay,{size:12,className:ei().chip__count,color:P?"tertiary":"secondary",children:l})]})}function eE(e){let{count:t,onClick:l}=e,{t:r}=(0,$.useTranslation)("NS_APP_GLOBALS");return(0,i.jsxs)("div",{className:ei().chip,onClick:()=>l({}),children:[r(`${b.TP}.FN_PLUS_X_MORE_NO_BRACKET`,{number:t}),(0,i.jsx)(O.Ay,{className:ei().chip_icon,icon:"expand_more"})]})}function eT(e){let{inline:t,children:l}=e;return t?(0,i.jsx)("div",{className:ei().overflowItemWrapper,children:l}):l}function e_(e){let{key:t,item:l,appliedFiltersStats:s,isActive:n,onClick:o,trackingClasses:a,trackingData:E,enableScroll:T=!1,inline:_,hideChevron:d,styles:c,isExpanded:R,disable:u}=e,{ref:S}=(e=>{let{enabled:t=!0,onMount:l=!0,resizeObserver:i=!1,behavior:s="smooth",block:n="center",inline:o}=e,a=(0,r.useRef)(null),E=(0,r.useCallback)(()=>{a.current&&a.current.scrollIntoView({behavior:s,block:n,inline:o})}
1,[s,n,o]);return(0,r.useEffect)(()=>{t&&l&&E()},[t,E]),(0,r.useEffect)(()=>{let e;return t&&i&&a.current&&(e=new ResizeObserver(E)).observe(a.current),()=>{e&&e.disconnect()}},[t,E]),{ref:a,scrollIntoView:E}})({enabled:T});return(0,i.jsx)("div",{ref:S,children:(0,i.jsx)(ea,{label:l?.label,type:l?.type,active:n,count:l?.contribCount||l?.total,appliedCount:s?.[l?.slug]||0,onClick:o,trackingData:E,trackingClasses:a,inline:_,hideChevron:d,styles:c,isExpanded:R,disable:u})},`${l?.id}-${t||l?.slug}`)}function ed(e){let{stats:t,subFilterType:l,expandedFilter:n,onExpandFilter:a,disable:E=!1,inline:d=!1,upcoming:c=!1,disabledTypes:S,hideChevron:I=!1,hideFilterCounts:O=!1,scrollable:p,trackingData:P={},commonFilterParams:L,filterGroup:A,filterOptionGroup:N,setFilterOptionGroup:f,clearExpandedStateRef:C}=e,{obRouteContext:h}=(0,U.A)(),{linkProps:Y}=h,{filters:m}=Y,x=(0,F.j3)(P,!1),[D,G]=(0,r.useState)(null),[v,k]=(0,r.useState)(null),j=(0,r.useRef)(null),w=(0,r.useCallback)(()=>{G(null),k(null),j.current=null},[]);(0,r.useEffect)(()=>{C&&(C.current=w)},[w,C]);let B=o()(L,[K.FILTER_TYPES.PAGE]),M=(()=>{let{obRouteContext:e}=(0,U.A)(),{linkProps:t}=e,{filters:l}=t||{};return(0,r.useMemo)(()=>{let e={};if([...l?.[K.FILTER_TYPES.ROLE]||[],...l?.[K.FILTER_TYPES.ENSEMBLE]||[]].forEach(t=>{let{entity:l,contributors:i,parents:r,entityType:s}=t,n=l?.slug;if(n){let t=i?.length||0,o=!i?.length||i?.some(e=>{let{isExcluded:t}=e;return t})||l?.slug?.startsWith("-"),a=t||+!!o;if(e[n]=a,s===K.ENTITY_TYPES.PROFESSION){let t=r?.[0]?.entity?.id;t&&r?.length?t===b.PROFESSION_IDS.INSTRUMENTATION?e[b.CONTRIBUTORS.INSTRUMENTALIST]=(e[b.CONTRIBUTORS.INSTRUMENTALIST]||0)+a:t===b.PROFESSION_IDS.SINGER&&(e[b.CONTRIBUTORS.CAST]=(e[b.CONTRIBUTORS.CAST]||0)+a):e[b.CONTRIBUTORS.CREW]=(e[b.CONTRIBUTORS.CREW]||0)+a}s===K.ENTITY_TYPES.ENSEMBLE_TYPE&&(e[b.CONTRIBUTORS.ENSEMBLE]=(e[b.CONTRIBUTORS.ENSEMBLE]||0)+a)}}),l?.[K.FILTER_TYPES.PRODUCER]?.length){let t=l?.[K.FILTER_TYPES.PRODUCER];e[K.FILTER_TYPES.PRODUCER]=t?.length||0,e={...e,...t?.reduce((e,t)=>{let{entity:l,contributors:i}=t;return e[l?.slug]=i?.length||0,e},{})}}return[K.FILTER_TYPES.CONDUCTOR,K.FILTER_TYPES.DIRECTOR,K.FILTER_TYPES.CO_PRODUCER,K.FILTER_TYPES.VENUE,K.FILTER_TYPES.CHOREOGRAPHER].forEach(t=>{l?.[t]?.length&&(e[t]=l?.[t]?.length||0)}),e},[l])})(),{data:W,isFetching:$}=(0,g.IT)((0,y.dynamicFiltersCastingToolList)({filters:B})),{processedContributionTypes:V,scrollableItem:H}=(0,r.useMemo)(()=>{let e=!!l?.scrollTo&&W?.flat()?.find(e=>e?.slug===l?.scrollTo);return{processedContributionTypes:W,scrollableItem:e||null}},[W,l]),z=(0,r.useCallback)(e=>{if([b.CONTRIBUTORS.INSTRUMENTALIST,K.FILTER_TYPES.PRODUCER].includes(e?.slug)){G({...e,isExpandable:!0}),e?.slug===K.FILTER_TYPES.PRODUCER&&(a({type:K.FILTER_TYPES.CONTRIBUTION_EXPRESSION,selectedSubFilterType:e}),k(e));return}a({type:K.FILTER_TYPES.CONTRIBUTION_EXPRESSION,selectedSubFilterType:e}),k(e)},[a]),Q=(0,r.useCallback)(()=>{eo.includes(l?.slug)||k(l),eo.includes(l?.parent?.slug||l?.slug)&&G(l?.parent||l)},[l]);(0,r.useEffect)(()=>{if(W?.length){if(l?.scrollTo&&H)return void z(H);n===K.FILTER_TYPES.CONTRIBUTION_EXPRESSION&&l&&!l.scrollTo&&Q()}},[W,V,H,l,n,z,Q]);let{data:X,isFetching:Z}=(0,g.IT)((0,y.aggregationsByEntityList)({filters:{...B,...D?.subFilterApiParams,sort:b.SORT_OPTION_TYPES.PROD_COUNT_DESC.value,include_contrib_count:!0},aggregationType:D?.aggregationType},{enabled:D?.slug===K.FILTER_TYPES.PRODUCER,select:e=>({data:e?.data?.map(e=>({...e,label:e?.name,slug:e?.slug||e?.id,filterType:K.FILTER_TYPES.CONTRIBUTION_EXPRESSION,type:D?.type}))})})),q=(0,r.useMemo)(()=>{if(D?.slug===K.FILTER_TYPES.PRODUCER&&X?.data?.length)return X?.data;if([b.CONTRIBUTORS.CREW,b.CONTRIBUTORS.CAST,b.CONTRIBUTORS.INSTRUMENTALIST,b.CONTRIBUTORS.ENSEMBLE].includes(D?.slug)){let e=V?.flat()?.find(e=>e.slug===D?.slug);return e?.data?e.data.map(e=>({...e,label:e.name,slug:e.slug||e.id,filterType:K.FILTER_TYPES.CONTRIBUTION_EXPRESSION,type:D?.type})).sort((e,t)=>(t?.contribCount||0)-(e?.contribCount||0)):[]}return[]},[D,V,X?.data]);(0,r.useEffect)(()=>{l?.parent?.slug||eo.includes(l?.slug)||G(null)},[l]),(0,r.useEffect)(()=>{f&&eo.includes(D?.slug)&&f(null)},[D?.slug,f]),(0,r.useEffect)(()=>
1{if(!a||!D?.slug||!q?.length||[K.FILTER_TYPES.PRODUCER].includes(D?.slug))return;let e=[K.FILTER_TYPES.CAST,K.FILTER_TYPES.CREW].includes(D?.slug),t=e?{...D,parent:D}:{...q[0],parent:D},i=[D.slug,t?.slug,t?.parent?.slug].join(":");if(j.current!==i){if(n===D?.filterType&&l?.slug===t?.slug&&l?.parent?.slug===t?.parent?.slug){j.current=i;return}j.current=i,k(e?D:q[0]),a({type:D?.filterType,selectedSubFilterType:t})}},[n,D,a,l,q]);let{dynamicFiltersMap:J,dynamicFiltersByType:ee}=(0,r.useMemo)(()=>{let e={},t={};return V&&!$&&V.flat().forEach(l=>{let i={...l,isDynamic:!0,appliedCount:M?.[l?.slug]||0,count:l?.contribCount||l?.total,active:!1,disable:!1};e[l.slug]=i,t[l.type]||(t[l.type]=[]),t[l.type].push(i)}),{dynamicFiltersMap:e,dynamicFiltersByType:t}},[V,$,M]),et=(0,r.useMemo)(()=>A?.map(e=>{let i=e.filter(e=>!S?.includes(e)).map(e=>{if(ee[e])return ee[e].map(t=>({...t,active:n===e&&(!l||l?.slug===t.slug)}));if(e===K.FILTER_TYPES.CONTRIBUTION_EXPRESSION){let e=new Set;return A.flat().forEach(t=>{ee[t]&&ee[t].forEach(t=>{e.add(t.slug)})}),Object.values(J).filter(t=>!e.has(t.slug)).map(e=>({...e,active:n===K.FILTER_TYPES.CONTRIBUTION_EXPRESSION&&(!l||l?.slug===e.slug)}))}let{appliedCount:i,count:r,disable:s,total:o}=(e=>{let{type:t,filters:l,stats:i,hideFilterCounts:r,disabledTypes:s}=e;if(t===K.FILTER_TYPES.TICKETS_WATCH_ONLINE){let e=i?.[K.FILTER_TYPES.TICKET]>0&&i?.[K.FILTER_TYPES.WATCH_ONLINE]>0?2:i?.[K.FILTER_TYPES.TICKET]>0||i?.[K.FILTER_TYPES.WATCH_ONLINE]>0?1:null;return{appliedCount:l?.[K.FILTER_TYPES.TICKET]||l?.[K.FILTER_TYPES.WATCH_ONLINE]?1:0,count:r?null:e,disable:s.includes(t)||null===e,total:e}}if(t===K.FILTER_TYPES.COVER_DEBUT&&!r){let e=(i?.[K.FILTER_TYPES.COVER_ROLE]||0)+(i?.[K.FILTER_TYPES.ROLE_DEBUT]||0)+(i?.[K.FILTER_TYPES.PRODUCER_DEBUT]||0);return{appliedCount:l?.[t]?.length||0,count:e,disable:s.includes(t)||0===e,total:e}}return t===K.FILTER_TYPES.COUNTRY?{appliedCount:l?.[t]?.length||l?.[K.FILTER_TYPES.CITY]?.length||0,count:r?null:i?.[t],disable:s.includes(t)||i?.[t]===0,total:i?.[t]}:{appliedCount:l?.[t]?.length||0,count:r?null:i?.[t],disable:s.includes(t)||i?.[t]===0,total:i?.[t]}})({type:e,filters:m,stats:t,hideFilterCounts:O,disabledTypes:S});return{type:e,appliedCount:i,count:r,active:n===e,disable:s,isDynamic:!1,total:o}}).flat().sort((e,t)=>d?t.appliedCount-e.appliedCount:0);return E?i:i.filter(e=>e?.isDynamic?(e?.contribCount||e?.total)>0:e?.total>0)}),[A,S,ee,m,t,O,n,l,J,d,E]),el=(0,r.useCallback)(e=>{let t=eo.includes(e?.slug);t&&e?.slug!==D?.slug?G({...e,isExpandable:!0}):t&&G(null);let[l,...i]=eo;a&&(d||!i.includes(e?.slug))&&(k(e),a({type:e?.filterType,selectedSubFilterType:e}))},[D,d,a]),er=(0,r.useCallback)(e=>{if(a){if(v?.slug===K.FILTER_TYPES.PRODUCER&&f)return void f({...e,aggregationType:K.AGGREGATION_TYPES[K.FILTER_TYPES.PRODUCER]});if([K.FILTER_TYPES.CAST,K.FILTER_TYPES.CREW].includes(D?.slug)&&f){f({...e,aggregationType:K.AGGREGATION_TYPES[K.FILTER_TYPES.AGG_PROFESSION_ID]}),a({type:e?.filterType,selectedSubFilterType:{...e,parent:D}});return}k(e),a({type:e?.filterType,selectedSubFilterType:{...e,parent:v?.parent}})}},[a,f,v?.slug,v?.parent,D]),es=p?_.A:"div";return(0,i.jsx)(es,{className:(0,s.default)(ei().renderFacets,{[ei().renderFacets__inline]:d}),children:(0,i.jsx)(T.A,{className:(0,s.default)(ei().typeList,{[ei().inline]:d}),data:et,renderItem:e=>$&&!p?Array.from({length:3},(e,t)=>(0,i.jsxs)(eT,{inline:d,children:[(0,i.jsx)(u.A,{width:"100%",height:37}),2===t&&!d&&(0,i.jsx)("div",{className:ei().separator})]},`skeleton-${t}`)):e?.map((t,l)=>{if(t?.isDynamic){let r=eo.includes(t?.slug),s=D?.slug===t?.slug||v?.slug===t?.slug&&v?.type===t?.type,n=!d&&r&&D?.slug===t?.slug;return(0,i.jsxs)(eT,{inline:d,children:[(0,i.jsx)(e_,{item:t,appliedFiltersStats:M,isActive:s,onClick:()=>el({...t,isExpandable:r}),trackingClasses:x,trackingData:P,inline:d,hideChevron:!r,isExpanded:n,enableScroll:H?.id===t?.id&&t?.type===
1H?.type,disable:E}),Z&&n&&(0,i.jsx)(R.A,{className:ei().loader,small:!0}),n&&q?.map((e,t)=>(0,i.jsx)(e_,{appliedFiltersStats:M,item:e,isActive:e?.slug===N?.slug||e?.slug===v?.slug||e?.id!==null&&e?.id===N?.id,onClick:()=>er(e),trackingData:P,trackingClasses:x,styles:{root:ei().expandableListItem},hideChevron:!0,inline:d,disable:E},t)),l===e.length-1&&!d&&(0,i.jsx)("div",{className:ei().separator})]},`${t?.slug}-${l}`)}return(0,i.jsxs)(eT,{inline:d,children:[(0,i.jsx)(ea,{type:t?.type,active:t?.active,count:t?.count,appliedCount:t?.appliedCount,onClick:a,disable:E,inline:d,upcoming:c,hideChevron:I,trackingData:P,trackingClasses:x},t?.type),l===e.length-1&&!d&&(0,i.jsx)("div",{className:ei().separator})]},`${t?.type}-${l}`)}),renderRest:e=>(0,i.jsx)(eE,{count:e?.length,onClick:a}),maxCount:p?null:"responsive"})})}function ec(e){let{mainPath:t,upcoming:l,hasFiltersApplied:s,onResetFilters:n,onClose:o}=e,{t:a}=(0,$.useTranslation)("NS_APP_GLOBALS"),E=(0,r.useMemo)(()=>{let e=a(`${b.TP}.FILTERS`);return t===b.ENTITY_MAIN_TABS.PERFORMANCES&&(e+=l?` (${a(`${b.TP}.FN_UPCOMING`)})`:` (${a(`${b.TP}.FN_PAST`)})`),e},[a,t,l]);return(0,i.jsxs)("div",{className:ei().header,children:[(0,i.jsxs)("div",{className:ei().header__label,children:[(0,i.jsx)("div",{className:ei().header__icon,children:(0,i.jsx)(O.Ay,{icon:"filter_list"})}),(0,i.jsx)(p.Ay,{weight:"medium",children:E}),s&&(0,i.jsx)(O.Ay,{icon:"replay-bold",onClick:n})]}),(0,i.jsx)(O.Ay,{className:ei().closeIcon,icon:"close",onClick:o})]})}function eR(e){let{stats:t,appliedFilters:l,expandedFilter:n,onAccessArchives:o,onUpdateFilters:a,onExpandFilter:E,onClose:T,upcoming:_,disable:R,disabledTypes:u,trackingData:S,fullHeight:I=!1,isSticky:L=!1,subFilterType:N,filterGroup:C,hasFiltersApplied:h=!1}=e,{t:F}=(0,$.useTranslation)("NS_APP_GLOBALS"),{obRouteContext:g}=(0,U.A)(),{linkProps:y}=g,{filters:m}=y,{entity:x,entityType:D}=(0,W.A)(),[G,v]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!E||![K.FILTER_TYPES.CAST,K.FILTER_TYPES.CREW].includes(N?.parent?.slug))return;let e=G?.id&&G?.id!=="all"?{...G,type:N?.type,filterType:N?.filterType,parent:N?.parent}:{...N?.parent,type:N?.type,filterType:N?.filterType,parent:N?.parent};(e?.id!==N?.id||e?.slug!==N?.slug)&&E({type:N?.filterType,selectedSubFilterType:e})},[G?.id,G?.slug]);let{showHeader:k,total:j}=(0,r.useMemo)(()=>{let e=(0,Y.Jh)(m?.expression),l=e?.filter(e=>"QUERY"===e.type),i=0;return i=K.FILTER_TYPES.TICKETS_WATCH_ONLINE===n?(t?.[K.FILTER_TYPES.TICKET]||0)+(t?.[K.FILTER_TYPES.WATCH_ONLINE]||0):n===K.FILTER_TYPES.CONTRIBUTION_EXPRESSION?([K.FILTER_TYPES.CAST,K.FILTER_TYPES.CREW].includes(N?.parent?.slug)?N?.parent?.contribCount||N?.parent?.total:N?.contribCount)||t?.total:t?.[n],{showHeader:l?.length>0||x?.name,total:i}},[m?.expression,n,x?.name,t,N?.contribCount,N?.parent?.slug,N?.parent?.contribCount,N?.parent?.total]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:(0,s.default)(ei().filterModal__header,{[ei().filterModal__header_isSticky]:L}),children:[(0,i.jsxs)("div",{className:ei().filterModal__header_filterText,children:[(0,i.jsx)(O.Ay,{icon:"filter_list",className:ei().icon}),(0,i.jsx)(p.Ay,{weight:"bold",className:ei().text,children:F(`${b.TP}.FILTERS`)})]}),(0,i.jsx)("div",{className:ei().filterModal__header_close,onClick:T,children:(0,i.jsx)(c.Ay,{variant:"text",styles:{root:ei().closeButton},leftIcon:(0,i.jsx)(O.Ay,{icon:"modal_close",size:16,className:ei().icon}),onClick:T,disableUnderline:!0,trackingData:{...S,component:A.$j.CLOSE_CTA},children:(0,i.jsx)(p.Ay,{size:"12",weight:"medium",className:ei().cancelText,children:F(`${b.TP}.FN_CLOSE`)})})})]}),k&&(0,i.jsx)("div",{className:(0,s.default)(ei().filterModal__selectedInfo,{[ei().filterModal__selectedInfo_isSticky]:L,[ei().filterModal__selectedInfo_isSticky_hasMultiRole]:L}),children:x?.name?(0,i.jsx)(p.Ay,{weight:"bold",children:(0,i.jsx)(f.A,{entity:x,entityType:D,trackingData:S})}):(0,i.jsx)(d.A,{children:(0,i.jsx)(P.A,{isFilterHeader:!0})})}),(0,i.jsxs)("div",{className:(0,s.default)(ei().filterModal__content,{[ei().filterModal__content_fullHeight]:I}),children:[(0,i.jsx)("div",{className:ei().filterModal__content_left,children:(0,i.jsx)("div",{className:ei().facets,children:(0,i.jsx)(ed,{filterGroup:C,stats:t,subFilterType:N,commonFilterParams:l,onExpandFilter:E,disable:R,expandedFilter:n,disabledTypes:u,upcoming:_,trackingData:S,filterOptionGroup:G,setFilterOptionGroup:v,hideChevron:!0,scrollable:!0})})}),(0,i.jsx)("div",{className:ei().filterModal__content_right,children:n?.trim()?.length>0&&!R&&(0,i.jsx)(et.A,{selectedFilterType:n,total:j,stats:t,filterParams:l,onUpdateFilters:a,onAccessArchives:o,asPopover:!1,upcoming:_,trackingData:S,subFilterType:N,filterOptionGroup:G,onUpdateFilterOptionGroup:v,hasFiltersApplied:h,inline:!0})})]})]})}function eu(e){let{mainPath:t,disable:l=!1,commonFilterParams:n={},disabledTypes:a=[],clearExcludedTypes:T=[],upcoming:_=!1,layout:d=en.VERTICAL,showAppliedFiltersCount:R=!1,shortLabel:u=!1,hideIcon:P=!1,scrollable:N=!1,defaultExpandedFilter:f,openInQuickView:F=!0,trackingData:Y={},onCloseQuickView:V,customGroup:H={},styles:z={},ignoreSmallScreenGroup:Q=!1,defaultSubFilterType:X,truncateInOneLine:Z,viewType:q}=e,{isMobile:J}=(0,k.Ay)(),{obRouteContext:el,isLoggedIn:er}=(0,U.A)(),{linkProps:eo,filterParams:ea,basePath:eE,page:eT}=el,{filters:e_}=eo,{showQuickView:eu,quickViewProps:eS}=(0,C.Ay)(),{setIsLoginDialog:eO,setIsAdvancedSearchAccessModalOpen:ep}=(0,j.b9)(),{permissions:eP}=(0,W.A)(),{advancedFiltersPermissions:eL,isAdmin:eA}=eP,eN=!er||eA||eL?.hasAccess,ef=l||!eN,{t:eC}=(0,$.useTranslation)("NS_APP_GLOBALS"),eh=(0,B.A)(),{entityType:eF,entity:eb,applyFilters:eg,resetFilters:ey,filterTypeUsage:eY,mainPath:em}=(0,W.A)(),ex=(0,L.A)(),{staticFilterTypes:eD,excludeFilterTypes:eG}=(0,w.A)(T),[eU,ev]=(0,r.useState)(null),[ek,ej]=(0,r.useState)(X),ew=(0,r.useRef)(es),eB=(0,r.useMemo)(()=>(0,G.wP)({basePath:eE,page:eT,linkProps:eo}),[eE,eo,eT]),eM=(0,r.useMemo)(()=>eo?.pro?eb?.id?K.FILTER_GROUP.ENTITY_PRO_VIEW:K.FILTER_GROUP.CASTING_TOOL:[K.ROUTE_RESERVED_KEYWORDS.artists,K.ROUTE_RESERVED_KEYWORDS.organisations].includes(eE)?K.FILTER_GROUP.ENTITY_INDEX_PAGE:en.HORIZONTAL===d?eB?K.FILTER_GROUP.PRODUCTION_LISTING:K.FILTER_GROUP.PUBLIC_VIEW_HORIZONTAL_FILTERS:K.FILTER_GROUP.DEFAULT,[eE,eb?.id,eB,d,eo?.pro]),[eW,e$]=(0,r.useState)(()=>eY?.limitExceeded?eY?.focusFilterType||eD[0]:d===en.QUICK_VIEW?f||eM[0][0]:null),eK=d===en.HORIZONTAL,eV=(0,M.A)(),{blocksBodyScroll:eH}=(0,v.A)();(0,r.useEffect)(()=>(eH(eW),()=>{eH(!1)}),[eH,eW]);let{baseAppliedFilters:ez,facetsApiFilters:eQ}=(0,r.useMemo)(()=>
1{let e=ea?.[K.FILTER_TYPES.SINCE_YEAR],t=[K.ROUTE_RESERVED_KEYWORDS.artists,K.ROUTE_RESERVED_KEYWORDS.organisations].includes(eE)&&!eb?.id,l=eB?(0,G.Eo)(ea):o()(ea,[K.FILTER_TYPES.PAGE]),i=t?{...(0,x.Jh)({basePath:eE,filterParams:ea,commonFilterParams:n}),...e&&{date_from:(0,m.JO)(`${e}`).format(b.DATE_FORMATS.FULL_DATE)},include_virtual_contributors:!0}:{...l,...e&&{date_from:(0,m.JO)(`${e}`).format(b.DATE_FORMATS.FULL_DATE)},...n,...eF===K.ENTITY_TYPES.PROFILE&&{include_virtual_contributors:!0}};return{baseAppliedFilters:i,facetsApiFilters:{...o()(i,[K.FILTER_TYPES.SINCE_YEAR])}}},[eE,n,eb?.id,eF,ea,eB]),eX=[K.ENTITY_TYPES.PROFILE,K.ENTITY_TYPES.ORGANIZATION].includes(eF)&&!em&&[en.HORIZONTAL,en.BUTTON].includes(d),eZ=[en.HORIZONTAL,en.VERTICAL,en.QUICK_VIEW].includes(d),eq=(0,r.useMemo)(()=>{if(!eD?.length||!eM?.length)return eD;let e=new Set;return eM.flat().forEach(t=>{if(t===K.FILTER_TYPES.TICKETS_WATCH_ONLINE){e.add(K.FILTER_TYPES.TICKET),e.add(K.FILTER_TYPES.WATCH_ONLINE);return}if(t===K.FILTER_TYPES.COVER_DEBUT){e.add(K.FILTER_TYPES.COVER_ROLE),e.add(K.FILTER_TYPES.ROLE_DEBUT),e.add(K.FILTER_TYPES.PRODUCER_DEBUT);return}t!==K.FILTER_TYPES.CONTRIBUTION_EXPRESSION&&e.add(t)}),eD.filter(t=>e.has(t))},[eD,eM]),{data:eJ}=(0,g.IT)((0,y.filterCountsList)({types:eq,filters:o()(eQ,[K.FILTER_TYPES.PAGE])},{enabled:!ef&&eq?.length>0&&eZ,keepPreviousData:!0})),e0=eq.includes(K.FILTER_TYPES.TICKET),e1=eq.includes(K.FILTER_TYPES.WATCH_ONLINE),e2=(0,r.useMemo)(()=>o()(eQ,[K.FILTER_TYPES.PAGE,K.FILTER_TYPES.TICKET,K.FILTER_TYPES.WATCH_ONLINE,K.FILTER_TYPES.RENTALS]),[eQ]),e5=(0,r.useMemo)(()=>o()(eQ,[K.FILTER_TYPES.PAGE,K.FILTER_TYPES.TICKET,K.FILTER_TYPES.WATCH_ONLINE,K.FILTER_TYPES.RENTALS,K.FILTER_TYPES.DATE,K.FILTER_TYPES.DATE_FROM,K.FILTER_TYPES.DATE_TO]),[eQ]),{data:e4}=(0,g.IT)((0,y.filterCountsList)({types:[K.FILTER_TYPES.TICKET],filters:e2},{enabled:!ef&&eZ&&e0,keepPreviousData:!0})),{data:e3}=(0,g.IT)((0,y.filterCountsList)({types:[K.FILTER_TYPES.WATCH_ONLINE],filters:e5},{enabled:!ef&&eZ&&e1,keepPreviousData:!0})),e8=(0,r.useMemo)(()=>({...e4?.[K.FILTER_TYPES.TICKET]!==void 0&&{[K.FILTER_TYPES.TICKET]:e4[K.FILTER_TYPES.TICKET]},...e3?.[K.FILTER_TYPES.WATCH_ONLINE]!==void 0&&{[K.FILTER_TYPES.WATCH_ONLINE]:e3[K.FILTER_TYPES.WATCH_ONLINE]}}),[e4,e3]),e9=(0,r.useMemo)(()=>({...eJ,...e8}),[eJ,e8]),{validFilters:e7,hasFiltersApplied:e6}=(0,r.useMemo)(()=>{let e=Object.values(K.FILTER_TYPES),t=[...eG||[],K.FILTER_TYPES.PAGE,K.FILTER_TYPES.QUERY],l=Object.keys(e_||{}).reduce((l,i)=>(e.includes(i)&&!t.includes(i)&&(l[i]=e_[i]),l),{}),i=Object.values(l)?.flat().filter(e=>null!=e);return{hasFiltersApplied:i.length>0,validFilters:i}},[eG,e_]);(0,r.useLayoutEffect)(()=>{eS?.type===h.a.FILTERS&&Object.keys(n)?.length>0&&eu(e=>e?.type!==h.a.FILTERS||e?.data?.commonFilterParams===n?e:{...e,data:{...e?.data,commonFilterParams:n}})},[n,eS?.type,eu]);let te=(0,r.useCallback)(e=>{e&&(e.stopPropagation(),e.preventDefault()),ey({entityType:eF,entity:eb}),eh.scrollTo()},[eh,ey,eF,eb]),tt=(0,r.useCallback)(e=>{let{type:l,selectedSubFilterType:i}=e;eu({type:h.a.FILTERS,onClose:()=>{ew.current?.()},data:{types:eD,mainPath:t,commonFilterParams:n,disable:ef,disabledTypes:a,clearExcludedTypes:T,upcoming:_,defaultExpandedFilter:l||eM[0][0],defaultSubFilterType:i,openInQuickView:!1,trackingData:Y}})},[T,n,ef,a,eM,t,eu,Y,eD,_]),tl=(0,r.useCallback)(e=>{let{type:t,anchor:l,trackingData:i,selectedSubFilterType:r}=e,s=("string"==typeof t?t.trim().length>0:!!t)?t:eM[0][0]||eD[0];if(ef){ex.click({...i||Y,section:A.bP.FILTER_ACCESS_BLOCKED,subComponent:A.kU.FILTER_CHIP,meta:{filterTab:s,blocked:!0,reason:er?"NO_PERMISSION":"NOT_LOGGED_IN"}}),V?.(),ev(null),e$(null),er?ep(!0):eO({isOpen:!0});return}d!==en.VERTICAL&&F?tt({type:s,selectedSubFilterType:r}):(ej(r),ev(l),e$(s)),ex.click({...i||Y,subComponent:A.kU.FILTER_CHIP,meta:{filterTab:s}})},[d,F,ex,Y,eD,eM,ef,tt,er,eO,ep,V]),ti=(0,r.useCallback)(()=>{ev(null),e$(null)},[]),tr=(0,r.useCallback)(e=>{let{options:l,isClearAll:i}=e,r={entityType:eF,entity:eb,mainPath:t,subPath:void 0,filters:i?E()(e_,eG):(0,D.cS)({options:l,filters:E()(e_,eG),subFilterType:ek,selectedFilterType:eW})};eg(r),ex.click({...Y,subComponent:Y?.subComponent?`${Y.subComponent} / ${A.kU.SUBMIT_CTA}`:A.kU.SUBMIT_CTA,meta:{filters:r.filters}})},[e_,ek,eW,t,eF,eb,eg,ex,Y,eG]),ts=(0,r.useCallback)(e=>{let{selectedOptions:t,isClearAll:l=!1}=e;d===en.QUICK_VIEW?l||V():ti(),t&&tr({options:t,isClearAll:l})},[d,tr,ti,V]),tn=(0,r.useCallback)(()=>{ti(),eV()},[ti,eV]);if(d===en.QUICK_VIEW)return(0,i.jsx)(eR,{stats:e9,subFilterType:ek,appliedFilters:ez,expandedFilter:eW,onClose:V,onAccessArchives:tn,onUpdateFilters:ts,onExpandFilter:tl,upcoming:_,disable:ef,disabledTypes:a,filterGroup:eM,hasFiltersApplied:e6,fullHeight:!0,isSticky:!0,trackingData:Y});if(d===en.BUTTON_GROUP_DETAILED)return(0,i.jsx)(ee,{types:eD,disable:ef,facetsApiFilters:eQ,appliedFilters:ez,onExpandFilter:tl,layout:d,customGroups:H,styles:z,ignoreSmallScreenGroup:Q,truncateInOneLine:Z,viewType:q});if(d===en.BUTTON)return(0,i.jsxs)(c.Ay,{variant:"grey",shape:"rectangle",styles:{root:(0,s.default)(ei().filterBtn,z.filterBtn,{[ei().filterBtn_disabled]:ef})},size:"medium",onClick:()=>{tl({type:eM[0][0]})},leftIcon:P?null:(0,i.jsx)(O.Ay,{icon:"filter_list",size:16,className:ei().filterBtn__icon}),disableHover:!0,trackingData:{...Y,subComponent:A.kU.FILTER_CTA},children:[u?eC(`${b.TP}.FILTERS`):`${eC(`${b.TP}.m_ALL`)} ${eC(`${b.TP}.FILTERS`)}`,e7?.length>0&&(0,i.jsx)(p.Ay,{variant:"span",size:12,weight:"bold",className:ei().filterBtn__count,color:"white",children:e7.length})]});if(d===en.TEXT)return(0,i.jsx)(c.QW,{size:"medium",onClick:()=>{tl({type:eM[0][0]})},styles:{root:z.filterCta},leftIcon:(0,i.jsx)(O.Ay,{icon:"filter_list",size:14,className:ei().filterBtn__icon}),trackingData:{...Y,subComponent:A.kU.FILTER_CTA},children:eC(`${b.TP}.FILTERS`)});if(d===en.ICON||d===en.ICON_COMPACT){let e=Object.keys(ez).some(e=>e.includes("expression")&&!ez?.expression?.includes("|"));return(0,i.jsxs)(c.Ay,{variant:"grey",styles:{root:(0,s.default)(ei().filterBtn__onlyIcon,{[ei().filterBtn__compactIcon]:d===en.ICON_COMPACT})},size:"medium",disableHover:!0,onClick:()=>{tl({type:e?" ":eD[0]})},trackingData:{...Y,subComponent:A.kU.FILTER_CTA},children:[(0,i.jsx)(O.Ay,{icon:"filter_list",size:14}),R&&e7?.length>0&&(0,i.jsx)(p.Ay,{variant:"span",size:12,className:ei().filterBtn__count,color:"white",children:e7.length})]})}return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:(0,s.default)(ei().root,{[ei().inline]:eK,[z.root]:!!z.root}),children:[(!J||eK)&&(0,i.jsx)(eI,{...eK&&{onClick:()=>tl({type:eD[0]})},appliedFiltersCount:e7?.length||0,isInline:eK,disabled:ef,styles:z}),(0,i.jsx)(ed,{filterGroup:eM,stats:e9,subFilterType:ek,commonFilterParams:ez,onExpandFilter:tl,inline:eK,scrollable:N,disable:ef,expandedFilter:eW,disabledTypes:a,upcoming:_,hideFilterCounts:eX,trackingData:Y,...F&&{clearExpandedStateRef:ew}}),eW&&d===en.VERTICAL&&(0,i.jsx)(I.A,{anchorEl:eU,container:eU,onClose:ti,styles:{root:ei().filterPopover},anchorOrigin:{horizontal:"right"},transformOrigin:{horizontal:"left"},transition:!0,children:(0,i.jsx)(et.A,{stats:e9,selectedFilterType:eW,total:e9?.[eW],filterParams:ez,onUpdateFilters:ts,onAccessArchives:tn,upcoming:_,trackingData:Y})})]}),eW&&d!==en.VERTICAL&&(0,i.jsx)(S.A,{onClose:ti,styles:{modalContainer:ei().filterModal,drawerPaper:ei().filterDrawerPaper,content:ei().filterDrawerContent},header:(0,i.jsx)(ec,{mainPath:t,upcoming:_,hasFiltersApplied:e6,onResetFilters:te,onClose:ti,trackingData:Y}),isOpen:!0,allowMobileDrawer:!0,children:(0,i.jsx)(eR,{stats:e9,appliedFilters:ez,expandedFilter:eW,onAccessArchives:tn,onUpdateFilters:ts,onExpandFilter:tl,upcoming:_,disable:ef,disabledTypes:a,trackingData:Y,onClose:V,hasFiltersApplied:e6})})]})}function eS(e){return(0,i.jsx)(eu,{...e,openInQuickView:!1,layout:en.QUICK_VIEW,trackingData:er})}function eI(e){let{onClick:t,appliedFiltersCount:l=0,isInline:n=!0,shortLabel:o=!1,disabled:a=!1,styles:E={}}=e,{t:T}=(0,$.useTranslation)("NS_APP_GLOBALS"),{isLoggedIn:_}=(0,U.A)(),{setIsLoginDialog:d,setIsAdvancedSearchAccessModalOpen:c}=(0,j.b9)(),{permissions:R}=(0,W.A)(),{advancedFiltersPermissions:u,isAdmin:S}=R,I=(0,L.A)(),P=!_||S||u?.hasAccess,N=(0,r.useCallback)(()=>
1{if(!P){I.click({section:A.bP.FILTER_ACCESS_BLOCKED,component:A.$j.FILTER_CTA,meta:{blocked:!0,reason:_?"NO_PERMISSION":"NOT_LOGGED_IN",filterType:"ALL_FILTERS"}}),_?c(!0):d({isOpen:!0});return}t?.()},[P,_,t,c,d,I]);return(0,i.jsxs)("div",{className:(0,s.default)(ei().header,{[ei().inlineHeader]:n,[ei().headerFilterApplied]:l>0,[E.allFilters]:!!E.allFilters}),onClick:N,children:[(0,i.jsx)("div",{className:(0,s.default)(ei().header__icon,{[E.icon]:!!E.icon}),children:(0,i.jsx)(O.Ay,{icon:"filter_list",size:9})}),(0,i.jsx)("div",{className:ei().header__label,children:(0,i.jsx)(p.Ay,{variant:"h2",weight:n?"regular":"medium",size:n?12:14,className:(0,s.default)(ei().header__label_text,{[ei().header__label_textApplied]:l>0,[E.label]:!!E.label}),children:o?T(`${b.TP}.FILTERS`):`${T(`${b.TP}.m_ALL`)} ${T(`${b.TP}.FILTERS`)}`})}),l>0&&(0,i.jsx)(p.Ay,{size:12,className:ei().chip__applied,color:"white",children:l})]})}let eO=eu},11129:(e,t,l)=>{"use strict";l.d(t,{A:()=>c,O:()=>d});var i=l(95155),r=l(12115),s=l(86194),n=l(54672),o=l(93146),a=l.n(o);let E={scrollLeft:0,scrollLength:0,hasOverflowContent:!1,hasStartOverflow:!1,hasEndOverflow:!1},T=(0,r.createContext)({state:E,scrollLeftHandler:()=>null,scrollRightHandler:()=>null,resetScrollPosition:()=>null}),_=e=>{let{hasEndOverflow:t,hasOverflowContent:l,hasStartOverflow:r,outset:n,styles:o,children:E,disabled:T}=e;return T?E:(0,i.jsx)("div",{className:(0,s.default)(a().root,{[a().scrollable]:l,[a().outset]:n,[o?.root]:!!o?.root,[o?.scrollable]:l&&!!o?.scrollable,[o?.scrollableStart]:r&&!!o?.scrollableStart,[o?.scrollableEnd]:t&&!!o?.scrollableEnd}),children:E})},d=()=>(0,r.useContext)(T),c=e=>{let{styles:t={},children:l,scrollStep:s=200,outset:o=!1,disabled:a=!1}=e,[d,c]=(0,r.useState)(E),{hasEndOverflow:R,hasOverflowContent:u,hasStartOverflow:S}=d,I=(0,r.useCallback)(e=>{let t=e.state(),l=t.hasOverflow.x||!1,i=t.overflowAmount.x||0,r=e.elements().viewport?.scrollLeft||0,s=Math.abs(r);c({hasOverflowContent:l,hasStartOverflow:l&&s>1,hasEndOverflow:l&&s<i-1,scrollLength:i,scrollLeft:r})},[]),O=(0,r.useCallback)(e=>{c(t=>{let l=e.elements().viewport?.scrollLeft||0,i=Math.abs(l);return{...t,hasStartOverflow:t.hasOverflowContent&&i>1,hasEndOverflow:t.hasOverflowContent&&i<t.scrollLength-1,scrollLeft:l}})},[]),{ref:p,getScrollbarInstance:P}=(0,n.A)({options:{overflow:{y:"hidden"},scrollbars:{visibility:"hidden"},disabled:a,initOn:"intersection"},events:{initialized:I,updated:I,scroll:O}}),L=(0,r.useCallback)(e=>{let t=P();if(t){let{viewport:l}=t.elements();l&&l.scrollBy({left:e,behavior:"smooth"})}},[P]),A=(0,r.useCallback)(()=>L(-s),[L,s]),N=(0,r.useCallback)(()=>L(s),[L,s]),f=(0,r.useMemo)(()=>({state:d,scrollLeftHandler:A,scrollRightHandler:N,resetScrollPosition:()=>L(-d.scrollLeft)}),[d,A,N,L]);return(0,r.useEffect)(()=>{let e=P();e&&a&&e.destroy()},[a,P]),(0,i.jsx)(_,{hasEndOverflow:R,hasOverflowContent:u,hasStartOverflow:S,outset:o,styles:t,disabled:a,children:(0,i.jsx)(T.Provider,{value:f,children:(0,i.jsx)("div",{ref:p,children:l})})})}},12433:(e,t,l)=>{"use strict";l.d(t,{A:()=>p,a:()=>I});var i=l(95155),r=l(12115),s=l(86194),n=l(67909),o=l(10043),a=l(83786),E=l(5765),T=l(6097),_=l(22377),d=l(78258),c=l.n(d);let R=(0,n.default)(()=>Promise.all([l.e(4121),l.e(4223),l.e(8332),l.e(9674),l.e(3233),l.e(7077),l.e(5663),l.e(2668),l.e(5052),l.e(3355)]).then(l.bind(l,17074)),{loadableGenerated:{webpack:()=>[17074]}}),u=(0,n.default)(()=>Promise.all([l.e(6593),l.e(3974),l.e(4121),l.e(4177),l.e(4223),l.e(9674),l.e(3233),l.e(3845),l.e(7077),l.e(7252),l.e(5663),l.e(4123),l.e(515),l.e(3556),l.e(3977),l.e(4867),l.e(4889),l.e(5318)]).then(l.bind(l,88472)),{loadableGenerated:{webpack:()=>[88472]}}),S=(0,n.default)(()=>l.e(8058).then(l.bind(l,58058)),{loadableGenerated:{webpack:()=>[58058]}}),I={PRODUCTION:"PRODUCTION",FILTERS:"FILTERS",ENTITY:"ENTITY",ROLEOVERLAP:"ROLEOVERLAP"},O={[I.PRODUCTION]:R,[I.FILTERS]:E.HF,[I.ENTITY]:u,[I.ROLEOVERLAP]:S},p=e=>{let{hideQuickView:t,quickViewProps:l}=e,{t:n}=(0,_.useTranslation)(["NS_APP_GLOBALS"]),E=(0,o.A)("(max-width: 768px)",{noSsr:!0}),d=(0,o.A)("(max-width: 1000px)",{noSsr:!0}),R=l?.type,u=(0,r.useMemo)(()=>R?E||R===I.ENTITY?"bottom":R===I.FILTERS?d?"bottom":"left":"right":null,[E,R,d]),S=(0,r.useMemo)(()=>E&&R!==I.ENTITY?c().mobileViewContainer:R===I.FILTERS?(0,s.default)(c().desktopViewContainer,c().desktopViewContainer__width_460px):R===I.ENTITY?c().entityViewContainer:(0,s.default)(c().desktopViewContainer,c().desktopViewContainer__width_375px),[E,R]
1),p=(0,r.useMemo)(()=>R===I.ENTITY?{headerText:c().entityViewContainer__headerText,headerCloseIcon:c().entityViewContainer__headerCloseIcon,content:c().entityViewContainer__drawerContent,drawerRoot:c().entityViewContainer__drawerRoot}:R===I.FILTERS?{content:c().desktopViewContent}:R===I.PRODUCTION?{drawerRoot:c().productionViewDrawerRoot,content:c().desktopViewContent}:{},[R]),P=(0,r.useMemo)(()=>R===I.ENTITY?`${T.TP}.PROFILE_MANAGE_PREVIEW`:null,[R]);if(!R)return null;let L=O[R];return L?(0,i.jsx)(a.A,{isOpen:!0,title:n(P),onClose:t,placement:u,className:S,styles:p,disableEnforceFocus:!0,children:L&&(0,i.jsx)(L,{onCloseQuickView:t,...l?.data})}):null}},13669:e=>{e.exports={filterContainer:"ob_q8LBFv",filterContainer__box:"ob_rrcC3q",count:"ob_FZTmGr",filterContainer__box_icon:"ob_czlXco",truncateTwoLines:"ob_w8k16I",truncateOneLine:"ob_P3I9hF",categoryName:"ob_evnDxy",filterContainerDetailed:"ob_821R3Q",disableBtn:"ob_yxum0d"}},15397:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i=l(11129).A},19997:e=>{e.exports={filterOptions:"ob_bkWOQg",filterOptions__checkbox:"ob_BAtEJC",filterOptions__checkbox_hasSubtext:"ob_FVVhxQ",filterOptions__radioItem:"ob_NXdUi2",rolesOptions__item_label:"ob_wdHqrG",rolesOptions__item_count:"ob_5rIsyy",filterOptions__radioItem_count:"ob_OqfPwi",filterOptions__radioInput:"ob_JUpfjQ",filterOptions__radioWrapper:"ob_0tGFUi",organizationLabel:"ob_A38cum",workLabel:"ob_goG0nr",filterOptions__nestedFilters:"ob_S9VgD1",filterOptions__nestedFilters_checkbox:"ob_kbLNvY",filterOptions__nestedFilters_label:"ob_nTQ6mF",filterOptions__nestedFilters_subHeading:"ob_VdLQrA",filterOptions__checkboxSelected:"ob_cnHyQM",filterOptions__info:"ob_afb7a7",filterOptions__info_total:"ob_gGKCA2",filterOptions__info_name:"ob_sEOaTg",filterOptions__info_nameSpacing:"ob_JLQovZ",filterOptions__info_uppercase:"ob_xWjT5M",clearSearch:"ob_NGfjfM",clearSearch__disabled:"ob_iUYmvH",selectedOption:"ob_uGNEuQ",filterDropdown:"ob_AQmGOr",filterDropdown__wrapper:"ob_gPTR3B",filterDropdown__content:"ob_EqLyVc",blur:"ob_yeXOfX",filterDropdown__title:"ob_rneShh",filterDropdown__header:"ob_oPh8fK",filterDropdown__header_popover:"ob_f4nHah",filterDropdown__header_input:"ob_gEDNo8",filterDropdown__options:"ob_oG6EBO",filterDropdown__options_maxCountOptions_separator:"ob_OllTvC",filterDropdown__options_maxCountOptions:"ob_fDZKBp",topResultText:"ob_oSDTZg",sortButton:"ob_qDa9Hr",filterDropdown__isSearchHidden:"ob_1SKzFS",filterDropdown__disablePadding:"ob_eC2hdb",allResultsText:"ob_RLxqzo",filterDropdown__footer:"ob_3hsffQ",filterDropdown__footer_text:"ob_ny5AJC",filterDropdown__footer_wrapper:"ob_DmtZOl",icon:"ob_5TBNtR",iconActive:"ob_rg1gTR",submitSearch:"ob_rXkl0P",submitSearch__disabled:"ob_0bf4kd",filterDropdownInline:"ob_Qklnk5",filterDropdownAccordion:"ob_htA8ae",lockedFiltersModal:"ob_e30N6m",lockedFiltersModal__content:"ob_1JAnWb",lockedFiltersModal__content_icon:"ob_0XK3Li",lockedFiltersModal__cta_primary:"ob_6IY0pv",roleProfessionOption__primaryLabel:"ob_UIUd3O",scrollLeftIndicator:"ob_eAA7pa",scrollRightIndicator:"ob_qeuID9",orgTypesSelectAll:"ob_XaxPsI",orgTypes:"ob_qqNS2k",orgTypeOption:"ob_EWp8iR",orgTypeOption__checked:"ob_kZ2Rha",orgTypeOption__checkbox:"ob_T8bwPU",clearAll:"ob_PzlBrK",clearAll__endOfList:"ob_o8zz7O"}},22701:e=>{e.exports={root:"ob_bAeqAh",composer:"ob_vClFG1",workRole__single_spacing30:"ob_VQjUIj",workRole__multiple:"ob_vvDutk",roles__operator:"ob_dIml0b"}},24626:e=>{e.exports={root:"ob_Gx4oOe",link:"ob_BZHohq",radioLabel:"ob_KsVncz",radioLabel__isSelected:"ob_XyCOxI",toggleBtn:"ob_u0NUow",selectedLabel:"ob_H3i374",radioButton:"ob_sXcwOz",selectedOption:"ob_QfbN8E",selectedOption__dropdown:"ob_Q7n3Ju",selectedOption__withoutLabel:"ob_2cb3ji",selectedOption__isActive:"ob_S1jizO",darkTheme:"ob_TDt7MY",toggleBtn__isSelected:"ob_WC13Xd",drawer:"ob_y4cIMW",drawer__header:"ob_5vkVB0",drawer__header_darkTheme:"ob_xZPBat",drawer__title:"ob_HyvVym",header_closeIcon:"ob_KfRZGD",optionsList:"ob_jhwjvo",isDropdown:"ob_MyDO7I",isOpen:"ob_HKrzGl"}},24940:(e,t,l)=>{"use strict";l.d(t,{Ay:()=>a,UQ:()=>n,az:()=>o});var i=l(12115),r=l(6097),s=l(59090);let n=()=>{let e=(0,s.nD)(s.GS.PAGE_ACCESS_SWITCHER);return(0,i.useCallback)(t=>e.show(t),[e])},o=()=>{let e=n();return(0,i.useCallback)(function(t){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.PAGE_ACCESS_SWITCHER_SOURCES.CASTING_TOOL_HEADER;return e({forCastingTool:!0,select:t,source:l})},[e])},a=s.Ay},26797:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var i=l(95155);l(12115);var r=l(96286),s=l(86194),n=l(73037),o=l.n(n);let a=e=>{let{title:t,subtitle:l,sizes:n={},className:a}=e,{title:E=16,subtitle:T=14}=n;return(0,i.jsxs)("div",{className:(0,s.default)(o().parent,a),children:[(0,i.jsx)(r.Ay,{weight:"bold",size:E,children:t}),l&&(0,i.jsx)(r.Ay,{size:T,color:"secondary",children:l})]})}},30848:e=>
1{e.exports={arrowAnchor:"ob_Rpbhmd",scrollContainer:"ob_sbgUSm",scrollIndicator:"ob_RRAQlC",scrollIndicatorLeft:"ob_BFDKTK",scrollIndicatorRight:"ob_Ew1tmC",indicatorVisible:"ob_Rklaoa"}},33352:(e,t,l)=>{"use strict";l.d(t,{A:()=>P});var i=l(95155),r=l(12115),s=l(86194),n=l(83786),o=l(68883),a=l(96286),E=l(48158),T=l(28554),_=l(55719),d=l(22377),c=l(11348),R=l(17413),u=l(92905),S=l(24626),I=l.n(S);let O=e=>{let{option:t,alwaysDropdown:l,isSelected:r,isEmbedded:n,onChange:E,enabledDarkMode:T=!1,styles:_,trackingData:c}=e,{t:u}=(0,d.useTranslation)("NS_APP_GLOBALS");return t?.label?t.radio?(0,i.jsx)(R.s,{checked:!!r,onChange:()=>E(t),label:t?.label,size:"small",styles:{radio:(0,s.default)(I().toggleBtn,I().radioButton,{[I().darkTheme]:!!T,[_?.radioBtn]:!!_?.radioBtn}),radioInput:(0,s.default)({[I().toggleBtn__isSelected]:!!r}),radioLabel:(0,s.default)(I().radioLabel,{[I().radioLabel__isSelected]:!!r})}}):t?.asLink?(0,i.jsx)(o.A,{...t.linkProps,external:n,disableUnderline:!0,trackingData:c?{...c,meta:{type:t?.type}}:void 0,children:(0,i.jsxs)("button",{className:(0,s.default)(I().toggleBtn,I().linkBtn,{[I().darkTheme]:!!T}),children:[t?.icon,(0,i.jsx)(a.Ay,{size:"12",color:"inherit",children:u(t?.label)})]},t?.value)},t?.value):(0,i.jsxs)("button",{className:(0,s.default)(I().toggleBtn,{[I().toggleBtn__isSelected]:r,[I().isDropdown]:l,[I().darkTheme]:!!T,[_?.toggleBtn]:!!_?.toggleBtn}),onClick:()=>E(t),children:[t?.icon,(0,i.jsx)(a.Ay,{size:"12",color:"inherit",children:u(t?.label)})]},t?.value):null},p=e=>{let{title:t,options:l,value:r,onChange:o,onCloseDrawer:E,isMobile:T,isOpen:_,alwaysDropdown:d,icon:R,isEmbedded:S,enableDarkMode:p,styles:P,trackingData:L}=e,A=(0,i.jsx)("div",{className:(0,s.default)(I().optionsList,{[I().isOpen]:_,[I().isDropdown]:d,[I().darkTheme]:p,[P?.optionsList]:!!P?.optionsList}),children:l?.map(e=>{let t=r===e?.value;return(0,i.jsx)(O,{option:e,onChange:o,isSelected:t,isEmbedded:S,alwaysDropdown:d,enabledDarkMode:p,styles:P,trackingData:L},e?.value)})});return T?(0,i.jsxs)(n.A,{isOpen:_,onClose:E,className:I().drawer,children:[(0,i.jsxs)("div",{className:(0,s.default)(I().drawer__header,{[I().drawer__header_darkTheme]:!!p}),children:[R,(0,i.jsx)(a.Ay,{size:"16",className:I().drawer__title,weight:"bold",children:t}),(0,i.jsx)(c.Ay,{variant:"text",styles:{icon:I().header_closeIcon},leftIcon:(0,i.jsx)(u.Ay,{icon:"close",size:14}),onClick:E})]}),A]}):A},P=e=>{let{title:t,options:l,value:n,onChange:o,label:c,leftIcon:R,rightIcon:u,alwaysDropdown:S,isEmbedded:O,enableDarkMode:P=!1,hideLeftIcon:L=!1,onOpen:A,styles:N,trackingData:f}=e,{isMobile:C}=(0,T.Ay)(),{t:h}=(0,d.useTranslation)("NS_APP_GLOBALS"),F=(0,r.useRef)(),b=(0,E.A)(),[g,y]=(0,r.useState)(!1),Y=l?.find(e=>e?.value===n),m={label:c||!Y?.icon&&h(Y?.label)||"",leftIcon:R||Y?.icon||null,rightIcon:u||null};(0,r.useEffect)(()=>{A&&A(g)},[A,g]);let x=(0,r.useCallback)(()=>{!C&&g&&y(!1)},[C,g]),D=(0,r.useCallback)(()=>{y(!1)},[]),G=(0,r.useCallback)(e=>{o(e),y(!1)},[o]);return(0,_.A)(F,x),(0,i.jsxs)("div",{ref:F,className:I().root,children:[(m?.icon||m?.label)&&(0,i.jsxs)("button",{className:(0,s.default)(I().toggleBtn,I().selectedOption,{[I().selectedOption__dropdown]:S,[I().selectedOption__isActive]:g,[I().selectedOption__withoutLabel]:!m?.label,[I().darkTheme]:P,[N?.selectedOption]:!!N?.selectedOption}),onClick:()=>{!g&&f&&b.click(f),y(!g)},children:[!L&&m?.leftIcon,m?.label&&(0,i.jsx)(a.Ay,{size:"12",color:"inherit",className:I().selectedLabel,children:m?.label}),m?.rightIcon]}),(0,i.jsx)(p,{title:t,icon:m?.leftIcon,options:l,value:n,onChange:G,isOpen:g,alwaysDropdown:S,isEmbedded:O,isMobile:C,onCloseDrawer:D,enableDarkMode:P,styles:N,trackingData:f})]})}},37348:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i=l(37648).A},37648:(e,t,l)=>{"use strict";l.d(t,{A:()=>er,u:()=>q});var i=l(95155),r=l(12115),s=l(86194),n=l(78411),o=l.n(n),a=l(63270),E=l.n(a),T=l(8342),_=l(86630),d=l(98581),c=l(2789),R=l(11348),u=l(40391),S=l(17413),I=l(92905),O=l(96286),p=l(48158),P=l(74906),L=l(8324),A=l(11273),N=l(26797),f=l(19420),C=l(57778),h=l(6097),F=l(61634),b=l(37222),g=l(88754),y=l(27199),Y=l(92202),m=l(42225),x=l(35145),D=l(46870),G=l(54589),U=l(27282),v=l(46800),k=l(62451),j=l(22377),w=l(42732),B=l(19997),M=l.n(B);let W=e=>{let{filters:t={},aggregationType:l,limit:i=300,includeAggTypeInFilter:r=!1,queryConfig:s={}}=e,n=o()(t,r?[]:[l]);return(0,g.productionAggregationsList)({aggregation_type:l,sort:"name",...n,...l===w.AGGREGATION_TYPES.CONTRIBUTOR_ID&&{only_approved_contributors:!0},limit:i},s)},$=function(){let{filters:e={},queryConfig:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,b.coverAndDebutOptionsList)({filters:e},t)},K={ALL:{id:"all",name:"All",total:0}},V=[{value:1,label:`${h.TP}.FN_BY_MOST_NUMBER`,radio:!0},{value:2,label:`${h.TP}.FN_SORT_BY_ALPHABETICAL`,radio:!0}],H=e=>{let{list:t,targetId:l,isOptionExcluded:i=!1}=e;return t.reduce((e,t)=>
1{let{id:r,isExcluded:s=!1}=t||{};return r===l&&i===s?e.isOptionExist=!0:(e.filteredList.push(t),s&&(e.isOptionNegated=r===l,e.isAnyOptionNegated=!0),r!==l||s||(e.isExactOptionExist=!0)),e},{filteredList:[],isOptionExist:!1,isAnyOptionNegated:!1,isOptionNegated:!1,isExactOptionExist:!1})},z=e=>e?.toString()?.trim()?.toLowerCase()?.replace(/\s*\([^)]*\)\s*$/,"")?.replace(/[^a-z0-9]+/g,"-")?.replace(/^-+|-+$/g,""),Q=e=>{let{option:t,subFilterType:l}=e;if(![w.FILTER_TYPES.CAST,w.FILTER_TYPES.CREW].includes(l?.slug)||l?.type!==w.FILTER_TYPES.ROLE)return l;let i=t?.profession||t?.professions?.[0]?.profession||t?.professions?.[0],r=l?.data||l?.parent?.data||[],s=z(t?.headline),n=r.find(e=>z(e?.name)===s||z(e?.slug)===s)||null,o=s?{id:s,name:t?.headline,slug:s}:null,a=i||n||o;return a?.slug?{...l,id:a?.id||a?.slug,name:a?.name||l?.name,slug:a?.slug}:l},X=e=>{let{query:t,className:l,onClickHandler:r}=e,{t:n}=(0,j.useTranslation)("NS_APP_GLOBALS");return(0,i.jsx)(R.Ay,{variant:"text",onClick:()=>r({selectedOptions:{},isClearAll:!0}),styles:{root:(0,s.default)(M().clearAll,l)},preventDefault:!0,stopPropagation:!0,disableUnderline:!0,disableHover:!0,children:(0,i.jsx)(O.Ay,{size:12,color:"secondary",children:n(t?.length?`${h.TP}.CLEAR_ALL_FILTERS_TO_VIEW_COMPLETE_LIST_OF_SEARCH_RESULTS`:`${h.TP}.FN_CLEAR_ALL_FILTER_TEXT`)})})},Z=e=>{let{t,isOptionsExist:l,trackingData:r,onClickHandler:n}=e;return(0,i.jsx)(R.Ay,{rightIcon:(0,i.jsx)(I.Ay,{icon:"replay-bold"}),variant:"text",size:"medium",shape:"rectangle",onClick:n,disabled:!l,styles:{root:(0,s.default)(M().clearSearch,{[M().clearSearch__disabled]:!l}),icon:(0,s.default)(M().icon,{[M().iconActive]:l})},disableUnderline:!0,trackingData:{...r,subComponent:r?.subComponent?`${r.subComponent} / ${P.kU.CLEAR_CTA}`:P.kU.CLEAR_CTA},preventDefault:!0,stopPropagation:!0,children:t(`${h.TP}.AS_FILTERS_CLEAR_ALL_BTN`)})},q=e=>{let{onResetFilters:t,selectedOptions:l,onUpdateFilters:r,hasFilterChanged:n,trackingData:o,styles:a={},enableClearAll:E=!1}=e,{t:T}=(0,j.useTranslation)("NS_APP_GLOBALS");return(0,i.jsx)("div",{className:(0,s.default)(M().filterDropdown__footer,{[a.filterDropdown]:!!a.filterDropdown}),children:(0,i.jsxs)("div",{className:M().filterDropdown__footer_wrapper,children:[(0,i.jsx)(Z,{t:T,isOptionsExist:E,trackingData:o,onClickHandler:t}),(0,i.jsx)(R.Ay,{styles:{root:(0,s.default)(M().submitSearch,{[M().submitSearch__disabled]:!n,[a.submitSearch]:!!a.submitSearch})},variant:"orange",shape:"rectangle",onClick:()=>r({selectedOptions:l}),disabled:!n,skipTracking:!0,children:T(`${h.TP}.m_APPLY`)})]})})},J=e=>{let{fetchGroupFn:t,activeGroup:l,setSelectedGroups:n,withSelectAll:o=!0,onSelectAllSelected:a,selectedOptions:E,onUpdateFilterOptionGroup:T,selectedFilterType:c,subFilterType:R}=e,{t:S}=(0,j.useTranslation)("NS_APP_GLOBALS"),{data:I,isFetching:p}=(0,F.IT)(t),P=(0,r.useMemo)(()=>{if(!Array.isArray(I))return I;let e=(()=>{let e=R?.parent?.data;return Array.isArray(e)?e.map(e=>({...e,slug:e?.slug||e?.id})).sort((e,t)=>(t?.contribCount||0)-(e?.contribCount||0)).reduce((e,t,l)=>(t?.slug!=null&&(e[t.slug]=l),e),{}):null})();return[...I].sort((t,l)=>{if(t?.id===K.ALL.id)return -1;if(l?.id===K.ALL.id)return 1;let i=e?.[t?.slug||t?.id],r=e?.[l?.slug||l?.id];return null!=i&&null!=r?i-r:(l?.contribCount||0)-(t?.contribCount||0)})},[I,R?.parent?.data]),[L,A]=(0,r.useState)(!1),{isSelectAllChecked:N,isDefaultTabSelected:f,showSelectAll:C,selectedTabTotal:b}=(0,r.useMemo)(()=>{let e=I?.find(e=>e?.id===l?.id)?.total,t=l?.id,i=`${c}${R?.slug?`_${R.slug}~${R.type}`:""}_${t}`;return{isSelectAllChecked:!l?.isExcludedByUser&&E[i]?.[0]?.id===l?.id&&(E[i]?.length===1||E[i]?.length!==void 0&&l?.total!==void 0&&E[i].length-1===l.total),isDefaultTabSelected:l?.id===K.ALL.id,showSelectAll:l?.id&&l?.id!==K.ALL.id&&o,selectedTabTotal:e}},[l,I,o,E,c,R]);if((0,r.useEffect)(()=>{let e=l?.id,t=`${c}${R?.slug?`_${R.slug}~${R.type}`:""}_${e}`,i=`-${t}`;(L||E[i])&&A(!!E[i]||!N&&L&&!l?.total)},[l?.id,l?.total,L,N,E,c,R]),p)return(0,i.jsx)(u.A,{small:!0});let g=(e,t)=>{e.preventDefault(),e.stopPropagation(),A(!1),T({...t,slug:t?.slug||t?.id}),n(e=>({...e,[t.id]:{...t,total:e[t.id]?.total||0}}))};return(0,i.jsxs)("div",{children:[(0,i.jsx)(_.A,{className:M().orgTypes,styles:{leftIndicator:M().scrollLeftIndicator,rightIndicator:M().scrollRightIndicator},triggerSize:0,isArrowsEnabled:!0,children:P?.map(e=>
1{let t=e?.id===l?.id;return(0,i.jsxs)("div",{role:"button",tabIndex:"0",className:(0,s.default)(M().orgTypeOption,{[M().orgTypeOption__checked]:t}),onClick:t=>g(t,e),onKeyDown:t=>g(t,e),children:[t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.A,{className:M().orgTypeOption__checkbox,checked:!0,label:"",size:"small",onChange:t=>g(t,e)}),!f&&l?.total>0&&(0,i.jsx)(O.Ay,{size:"12",weight:t?"bold":"regular",children:l?.total})]}),(0,i.jsx)(O.Ay,{size:"12",weight:t?"bold":"regular",children:e?.name})]},e?.id)})}),C&&(0,i.jsxs)("div",{className:M().orgTypesSelectAll,children:[(0,i.jsx)(d.A,{checked:L,onChange:(e,t)=>{n(e=>({...e,[l?.id]:{...l,total:0}})),A(t),a({isGroup:!0,option:l,isChecked:t,isAllExcluded:!0,groupKey:l?.id})},label:(0,i.jsx)(O.Ay,{size:12,children:S(`${h.TP}.FN_EXCLUDE_ALL`)}),size:"small"}),!l.isExcludedByUser&&(0,i.jsx)(d.A,{checked:!L&&N,onChange:(e,t)=>{n(e=>({...e,[l?.id]:{...l,total:t?b:0}})),a({isGroup:!0,option:l,isChecked:t,groupKey:l?.id})},label:(0,i.jsx)(O.Ay,{size:12,children:S(`${h.TP}.FN_SELECT_ALL`)}),size:"small"})]})]})},ee=e=>{let{parent:t,selectedOptions:l,options:n,trackingClasses:o,onChange:a,fetchNestedOptionsFn:E,groupKey:T,selectedSortOption:_,compositeKey:c}=e,{t:R}=(0,j.useTranslation)("NS_APP_GLOBALS"),S=!!E,{data:I,isFetching:p}=(0,F.IT)(S&&E({parentId:t?.id})),P=(0,r.useMemo)(()=>_===V?.[1]?.value?I?.sort((e,t)=>{let l=e.name||e.label||"",i=t.name||t.label||"";return l.localeCompare(i)}):I,[I,_]),L=(0,r.useCallback)((e,l,i)=>{e.stopPropagation();let r=l?.isAllOption;a({groupKey:T,option:r?t:l,isChecked:i,isGroup:r})},[T,a,t]),A=(0,r.useCallback)(e=>e?.isAllOption?e.isChecked:l[c]?.some(t=>{let{id:l}=t;return l===e?.id}),[c,l]);if(S&&p)return(0,i.jsx)("div",{className:M().filterOptions__nestedFilters,children:(0,i.jsx)(u.A,{small:!0})});let N=S?[{name:R(`${h.TP}.m_ALL`),label:R(`${h.TP}.m_ALL`),id:t?.id,key:t?.id,total:t?.total,isChecked:l?.[c]?.length===1&&l?.[c]?.[0]?.id===t?.id,isAllOption:!0},...P||[]]:n;return(0,i.jsx)("div",{className:M().filterOptions__nestedFilters,children:N?.map(e=>{let l=`${t?.id}-${e?.id}`,r=A(e);return(0,i.jsx)(d.A,{onChange:(t,l)=>L(t,e,l),className:(0,s.default)(M().filterOptions__nestedFilters_checkbox,{[M().filterOptions__checkboxSelected]:r,[o]:!!o}),label:(0,i.jsxs)("div",{className:M().filterOptions__nestedFilters_label,children:[(0,i.jsxs)(O.Ay,{size:12,weight:"medium",children:[e?.name||e?.label,e?.country&&(0,i.jsx)(O.Ay,{size:12,color:"secondary",className:M().filterOptions__nestedFilters_subHeading,children:e?.country?.name})]}),(0,i.jsx)(O.Ay,{size:12,color:"secondary",className:M().filterOptions__label_total,children:e?.total})]}),checked:r,size:"small"},l)})})},et=e=>{let{selectedFilterType:t,selectedGroup:l,aggregationType:n,options:o,selectedOptions:a={},onChange:E,trackingData:T,fetchNestedOptionsFn:_,isNested:c,groupBy:R,selectedSortOption:u,subFilterType:I}=e,{t:p}=(0,j.useTranslation)("NS_APP_GLOBALS"),P=(0,f.j3)(T,!1),L=t===w.FILTER_TYPES.SINCE_YEAR,C=(e=>{let{options:t,selectedOptions:l,selectedGroup:i,isNested:s,selectedFilterType:n,selectedSortOption:o}=e,a=(0,r.useMemo)(()=>{if(Object.keys(l)?.length===0)return[];let e=i?.id||null;return e&&e in l?l[e]?.map(e=>e?.id?.toString()):s?Object.keys(l):Object.values(l)?.flat()?.map(e=>e?.id?.toString())},[s,i,o]);return(0,r.useMemo)(()=>!a?.length||[w.FILTER_TYPES.SINCE_YEAR,w.FILTER_TYPES.TICKETS_WATCH_ONLINE].includes(n)?t:t?.sort((e,t)=>{let l=a?.includes(e?.id?.toString()),i=a?.includes(t?.id?.toString());return l&&i?0:l?-1:i?1:2===o?e?.name?.localeCompare(t?.name):0}),[t,n,o])})({options:o,selectedOptions:a,selectedGroup:l,isNested:c,selectedFilterType:t,selectedSortOption:u}),F=(e=>{let{selectedOptions:t,selectedGroup:l,isNested:i,groupBy:s,selectedFilterType:n,subFilterType:o}=e;return(0,r.useCallback)(e=>{let r=e?.id?.toString(),a=Q({option:e,subFilterType:o});if(i){let l=(0,m.Em)({option:e,path:s})||a?.id||n,i=`${n}${a?.slug?`_${a.slug}~${a.type}`:""}_${l}`;return!!t?.[i]?.some(e=>e?.id?.toString()===r)}if(l?.id){let i=l?.id;if(i?.toString().startsWith(w.OPERATORS.FILTER_TYPE_NEGATED))return!1;let o=(0,m.Em)({option:e,path:s}),E=[w.FILTER_TYPES.ROLE,w.FILTER_TYPES.ENSEMBLE,w.FILTER_TYPES.VENUE].includes(a?.type)?a?.slug||o||a?.id||n:o||a?.id||n,T=`${n}${a?.slug?`_${a.slug}~${a.type}`:""}_${E}`,_=t[T];if(_&&_?.[0]?.id===i&&_?.length===1)return!0;
1if(_&&_.length>0){let{isOptionExist:e,isOptionNegated:t,isAnyOptionNegated:l,isExactOptionExist:i}=H({list:_,targetId:r,isOptionExcluded:!0});return!e&&!t&&(!!l||i)}return!!(t?.[o]||t?.[T])}if(n===w.FILTER_TYPES.TICKETS_WATCH_ONLINE)return t?.[n]?.some(e=>e?.id?.toString()===r);let E=(0,m.Em)({option:e,path:s});[w.FILTER_TYPES.ROLE,w.FILTER_TYPES.ENSEMBLE,w.FILTER_TYPES.VENUE].includes(a?.type)&&(E=a.slug);let T=`${n}${a?.slug?`_${a.slug}${a?.type?`~${a.type}`:""}`:""}${E?`_${E}`:""}`;return t[T]?.some(t=>{let l=t?.id===e?.id||t?.id?.toString()===e?.id;if(l)return!0;if(n===w.FILTER_TYPES.PERFORMANCE_HIGHLIGHT)return!1;if(!l){let l=t?.id?.toString()?.replace(/[a-zA-Z]/g,""),i=e?.id?.toString()?.replace(/[a-zA-Z]/g,"");return(""!==l||""!==i)&&l===i}return!1})},[i,l?.id,t,s,n,o])})({selectedOptions:a,selectedGroup:l,isNested:c,groupBy:R,selectedFilterType:t,subFilterType:I});if(C?.length>0){let e=L?S.s:d.A;return(0,i.jsx)("div",{className:M().filterOptions,children:C?.map(l=>{let r=F(l),o=l?.cityCountry?`${l?.label} (${l?.cityCountry})`:l?.label;return(0,i.jsxs)("div",{children:[(0,i.jsx)(e,{onChange:(e,t)=>
1{e.stopPropagation(),E({groupKey:R?(0,m.Em)({option:l,path:R}):null,option:l,isChecked:t||L,isGroup:c})},size:"small",...L?{styles:{radio:M().filterOptions__radioItem,radioInput:M().filterOptions__radioInput,radioWrapper:M().filterOptions__radioWrapper},value:l?.id}:{className:(0,s.default)(M().filterOptions__checkbox,{[M().filterOptions__checkboxSelected]:r,[M().filterOptions__checkbox_hasSubtext]:!!l?.headline,[P]:!!P})},label:(0,i.jsxs)("div",{className:M().filterOptions__info,children:[(0,i.jsxs)("div",{className:(0,s.default)(M().filterOptions__info_name,{[M().filterOptions__info_nameSpacing]:t===w.FILTER_TYPES.ROLE_PROFESSION,[M().filterOptions__info_uppercase]:t===w.FILTER_TYPES.WORK_TYPE}),children:[(e=>{let{type:t,label:l,option:r,aggregationType:s,trackingData:n,t:o,subFilterType:a}=e;if(r?.organizationType||a?.slug===w.FILTER_TYPES.VENUE){let e=r?.original_name||r?.name||"";return(0,i.jsxs)("div",{className:M().organizationLabel,children:[e&&(0,i.jsx)(O.Ay,{weight:"medium",size:12,children:(0,i.jsx)(A.A,{name:e,entity:{id:r?.id,name:e},entityType:w.ENTITY_TYPES.ORGANIZATION,isRaw:!0,trackingData:n})}),e&&r?.name&&r?.name!==e&&(0,i.jsxs)(O.Ay,{size:12,children:["(",r?.name,")"]}),(0,i.jsx)(O.Ay,{size:11,color:"secondary",children:(0,Y.ud)(r)}),(0,i.jsx)(O.Ay,{size:11,weight:"medium",children:r?.organizationType?.name})]})}switch(t){case w.FILTER_TYPES.COVER_DEBUT:return(0,i.jsx)(O.Ay,{weight:"bold",size:12,color:"secondary",children:o(l)});case w.FILTER_TYPES.ROLE_PROFESSION:case w.FILTER_TYPES.ROLE_PROFESSION_REPERTOIRE:return(0,i.jsxs)(O.Ay,{className:M().roleProfessionOption,children:[(0,i.jsxs)(O.Ay,{className:M().roleProfessionOption__primaryLabel,children:[(0,i.jsxs)(O.Ay,{size:12,weight:"medium",children:[l," "]}),r?.profession?.name&&r?.profession?.name!==l&&(0,i.jsxs)(O.Ay,{size:12,children:["(",r?.profession?.name,")"]})]}),r?.work?.original_name&&(0,i.jsxs)(O.Ay,{size:12,color:"secondary",children:[(0,i.jsx)(A.A,{entity:r.work,entityType:w.ENTITY_TYPES.WORK,isRaw:!0,trackingData:n,withTranslation:!1}),r?.composer&&(0,i.jsxs)(i.Fragment,{children:[","," ",(0,i.jsx)(A.A,{entity:r.composer,entityType:w.ENTITY_TYPES.PROFILE,isRaw:!0,trackingData:n})]})]})]});case w.FILTER_TYPES.WORK:{let e=(0,v.zh)(r,!0)?.[0]?.name,t=r?.workTypes?.[0]?.name;return(0,i.jsxs)("div",{className:M().workLabel,children:[(0,i.jsx)(A.A,{entity:r,entityType:w.ENTITY_TYPES.WORK,trackingData:n,isColumnView:!0,typographyProps:{work:{size:12},translation:{size:10,weight:"regular",color:"secondary"}},withComposers:!1}),(0,i.jsx)(O.Ay,{size:11,italic:!0,color:"secondary",children:e}),(0,i.jsx)(O.Ay,{size:11,weight:"medium",children:t})]})}default:return(0,i.jsx)(A.A,{name:l,entity:{id:r?.id,name:l},entityType:(0,Y.J2)(s,r?.id),isRaw:!0,trackingData:n})}})({type:t,label:o,option:l,aggregationType:n,trackingData:T,subFilterType:I,t:p}),l?.headline&&(0,i.jsx)(O.Ay,{variant:"p",size:11,color:"secondary",children:l.headline})]}),(0,i.jsx)(O.Ay,{size:12,color:"secondary",className:M().filterOptions__info_total,children:l?.total})]}),checked:r}),c&&r&&(0,i.jsx)(ee,{...(e=>{let{option:t,selectedOptions:l,groupBy:i,t:r,nestedFilterOptions:s,groupKey:n,selectedFilterType:o,subFilterType:a}=e,E=i&&!n?(0,m.Em)({option:t,path:i}):n,T=`${o}${a?.slug?`_${a.slug}~${a.type}`:""}_${E}`,_=l?.[T];return{groupKey:E,compositeKey:T,selectedOptions:l,parent:t,options:[{name:r(`${h.TP}.m_ALL`),label:r(`${h.TP}.m_ALL`),id:t?.id,key:t?.id,total:t?.total,isChecked:_?.length===1&&_[0]?.id===t?.id,isAllOption:!0},...s||[]]}})({option:l,selectedOptions:a,nestedFilterOptions:l?.nestedFilterOptions,groupBy:R,t:p,selectedFilterType:t,subFilterType:I}),selectedSortOption:u,fetchNestedOptionsFn:_,onChange:E})]},`${o}_${l?.id}`)})})}return(0,i.jsx)(N.A,{title:"No options",sizes:{icon:40,title:14}})},el=e=>{let{onAccessArchives:t,isLoggedIn:l,isRestricted:r,limitReached:s}=e,{t:n}=(0,j.useTranslation)("NS_APP_GLOBALS");return r?(0,i.jsx)("div",{className:M().lockedFiltersModal,children:(0,i.jsxs)("div",{className:M().lockedFiltersModal__content,children:[(0,i.jsx)("div",{className:M().lockedFiltersModal__content_icon,children:(0,i.jsx)(I.Ay,{icon:"tune"})}),l?(0,i.jsx)(O.Ay,{size:16,weight:"medium",variant:"p",align:"center",children:(0,i.jsx)(L.A,{ns:"NS_APP_GLOBALS",i18nKey:s?`${h.TP}.FN_FILTER_LIMIT_UPGRADE_MSG`:`${h.TP}.FN_FILTER_ARCHIVED_UPGRADE_MSG`})}):(0,i.jsx)(O.Ay,{size:16,weight:"medium",variant:"p",align:"center",children:n(`${h.TP}.FN_FILTERS_LOGIN_REQUIRED`)}),(0,i.jsx)(R.jn,{styles:{root:M().lockedFiltersModal__cta_primary},shape:"rectangle",onClick:t,stretch:!0,children:n(l?`${h.TP}.AS_SUBSCRIPTIONS_UPGRADE`:`${h.TP}.m_LOGIN`)}),l&&(0,i.jsx)(R.JD,{shape:"rectangle",rightIcon:(0,i.jsx)(I.Ay,{icon:"chevron_right"}),stretch:!0,children:n(`${h.TP}.FN_BOOK_SALES_MEETING`)}),!l&&(0,i.jsx)(O.Ay,{variant:"p",align:"center",size:11,color:"secondary",children:n(`${h.TP}.FN_FILTERS_LOCKED_FOOTNOTE`)})]})}):null},ei={},er=e=>{let{selectedFilterType:t,subFilterType:l,total:n=0,filterParams:a,onUpdateFilters:_,onAccessArchives:d,inline:R=!1,upcoming:S=!1,trackingData:I={},asPopover:L=!1,onUpdateFilterOptionGroup:A,filterOptionGroup:f,stats:b,selectedOptions:g,onChangeSelected:Y,hideFooter:v=!1,hideTitle:B=!1,hideSearch:z=!1,noOptionsContent:Z}=e,ee=(0,p.A)(),{t:er}=(0,j.useTranslation)("NS_APP_GLOBALS"),[es,en]=(0,r.useState)(""),eo="function"==typeof Y,[ea,eE]=(0,r.useState)({}),eT=eo?g||ei:ea,e_=(0,r.useCallback)(e=>{if(eo)return void Y(t=>"function"==typeof e?e(t||ei):e);eE(e)},[eo,Y]),[ed,ec]=(0,r.useState)({}),[eR,eu]=(0,r.useState)(null),{obRouteContext:eS}=(0,x.A)(),{linkProps:eI}=eS,{filters:eO={}}=eI||{},{getFilterUsageState:ep}=(0,G.A)(),{excludeFilterTypes:eP,staticFilterTypes:eL}=(0,D.A)(),eA=o()(eO,eP),eN=Object.keys(eA)?.length>0,[ef,eC]=(0,r.useState)(V[0]?.value),eh=(0,r.useMemo)(()=>ep({type:t,upcoming:S}),[ep,t,S]),eF=![w.FILTER_TYPES.PERFORMANCE_HIGHLIGHT,w.FILTER_TYPES.COVER_DEBUT,w.FILTER_TYPES.TICKETS_WATCH_ONLINE].includes(t),eb=eF&&!z,eg=(0,r.useMemo)(()=>(0,m.TV)({filters:eA,staticFilterTypes:eL}),[eO]),{showGroupHeaders:ey,fetchOptionsFn:eY,fetchGroupFn:em,fetchNestedOptionsFn:ex,isMultiSelect:eD,aggregationType:eG,defaultOptions:eU,...ev}=(e=>{let{selectedFilterType:t,subFilterType:l,filterParams:i,isQueryEnabled:s,stats:n,onSuccess:a,userOrgId:E}=e,{entityId:T}=(0,G.A)(),{obRouteContext:_}=(0,x.A)(),{linkProps:d,page:c}=_,{entityType:R}=c||{},u=d?.pro&&!R,{t:S}=(0,j.useTranslation)("NS_APP_GLOBALS"),{fetchOptionsCall:I={},fetchGroupCall:O={}}=(e=>{let{selectedFilterType:t,subFilterType:l,filterParams:i,userOrgId:r}=e,s={};if([w.FILTER_TYPES.TICKETS_WATCH_ONLINE].includes(t))return s;let n={[w.FILTER_TYPES.PRODUCER]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_CONTRIBUTION_TYPE],[w.FILTER_TYPES.CO_PRODUCER]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_CONTRIBUTION_TYPE],[w.FILTER_TYPES.CONDUCTOR]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],[w.FILTER_TYPES.DIRECTOR]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],[w.FILTER_TYPES.COMPOSER]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],[w.FILTER_TYPES.CHOREOGRAPHER]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],[w.FILTER_TYPES.ROLE]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],[w.FILTER_TYPES.ENSEMBLE]:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_ENSEMBLE_TYPE_ID]},a={...i,...n[l?.type]&&{[n[l?.type]]:l?.id},sort:h.SORT_OPTION_VALUES.PROD_COUNT_DESC};r&&(a.user_org_id=r,a.sort=h.SORT_OPTION_VALUES.CLOSENESS_DESC);let E=w.AGGREGATION_TYPES[t]||l?.aggregationType||C.ni[t],T=(0,y.Jh)(a?.expression),_=(0,m.tN)(T),d=_?.map(e=>{let{workId:t}=e;return t}),c=o()(a,[C.ni[t]]);switch(t){case w.FILTER_TYPES.ROLE_PROFESSION:case w.FILTER_TYPES.ROLE_PROFESSION_REPERTOIRE:s.fetchOptionsCall={aggregationType:E,filters:{...c,[w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_CONTRIBUTION_TYPE]]:`${h.CONTRIBUTORS.CAST}, ${h.CONTRIBUTORS.CREW}`}};break;case w.FILTER_TYPES.COUNTRY:s.fetchOptionsCall={aggregationType:E,filters:c,limit:20};break;case w.FILTER_TYPES.WORK_TYPE:s.fetchOptionsCall={aggregationType:E,filters:{...c,is_work_type_standard:!0,...d?.length>0&&{[h.URL_SLUG_TYPES.WORK]:d.join(",")}},limit:20};break;case w.FILTER_TYPES.CONTRIBUTION_EXPRESSION:s={fetchOptionsCall:{aggregationType:E,filters:c}},l?.type===C.EG.PRODUCER&&(s={fetchOptionsCall:{aggregationType:w.AGGREGATION_TYPES[w.FILTER_TYPES.PRODUCER],filters:c},fetchGroupCall:{filters:c,include_contrib_count:!0,aggregationType:w.AGGREGATION_TYPES[w.FILTER_TYPES.PRODUCER_TYPE],limit:100}}),l?.parent?.slug===w.FILTER_TYPES.CAST&&(s.fetchOptionsCall={aggregationType:w.AGGREGATION_TYPES.CONTRIBUTOR_ID,filters:{...c,work_role_type_id:h.WORK_ROLE_TYPE_IDS.CHARACTER,[w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_CONTRIBUTION_TYPE]]:h.CONTRIBUTORS.CAST}},s.fetchGroupCall={filters:{...c,work_role_type_id:h.WORK_ROLE_TYPE_IDS.CHARACTER,only_approved_contributors:!0,include_contrib_count:!0},aggregationType:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],limit:100}),l?.parent?.slug===w.FILTER_TYPES.CREW&&(s.fetchOptionsCall={aggregationType:w.AGGREGATION_TYPES.CONTRIBUTOR_ID,filters:{...c,[w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_CONTRIBUTION_TYPE]]:h.CONTRIBUTORS.CREW}},s.fetchGroupCall={filters:{...c,[w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_CONTRIBUTION_TYPE]]:h.CONTRIBUTORS.CREW,availability:h.PROFESSIONS_AVAILABILITY.CASTING_TOOL,only_approved_contributors:!0,include_contrib_count:!0},aggregationType:w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID],limit:100});break;case w.FILTER_TYPES.COMPOSER:s.fetchOptionsCall={aggregationType:E,filters:{...o()(c,["search"])}};break;default:s.fetchOptionsCall={aggregationType:E,filters:c}}return s})({selectedFilterType:t,subFilterType:l,filterParams:i,entityType:R,entityId:T,userOrgId:E}),{filters:p,aggregationType:P,limit:L,includeAggTypeInFilter:A=!1}=I,{filters:N,aggregationType:f,limit:F}=O,b=(e,i)=>(0,k.T5)({selectedFilterType:t,subFilterType:l,aggregationType:i,response:e,isCastingTool:u,t:S}),g=function(){let{keepPreviousData:e=!0,enabled:t=!!P&&s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l=>{let{customFilters:i={},customAggType:r,customLimit:s,isEnabled:n=t}=l,o=r||P,E=s||L;return W({filters:{...p,...i},aggregationType:o,limit:E,includeAggTypeInFilter:A,queryConfig:{keepPreviousData:e,enabled:n,onSuccess:()=>a(o),select:e=>b(e,o)}})}},Y={showGroupHeaders:!1,isNested:!1,isMultiSelect:!0,aggregationType:P},D=(0,r.useMemo)(()=>[...n?.[w.FILTER_TYPES.TICKET]>0?[{label:`${h.TP}.FN_TICKETS`,id:w.FILTER_TYPES.TICKET,slug:w.FILTER_TYPES.TICKET,total:n?.[w.FILTER_TYPES.TICKET]}]:[],...n?.[w.FILTER_TYPES.WATCH_ONLINE]>0?[{label:`${h.TP}.FN_WATCH_OPTIONS`,id:w.FILTER_TYPES.WATCH_ONLINE,slug:w.FILTER_TYPES.WATCH_ONLINE,total:n?.[w.FILTER_TYPES.WATCH_ONLINE]}]:[]],[n]);switch(t){case w.FILTER_TYPES.COVER_DEBUT:Y={...Y,fetchOptionsFn:e=>{let{customFilters:t={}}=e;return $({filters:{...p,...t},queryConfig:{keepPreviousData:!1,enabled:s,onSuccess:()=>a(P),select:e=>b(e,P)}})}};break;case w.FILTER_TYPES.TICKETS_WATCH_ONLINE:Y={defaultOptions:D,fetchOptionsFn:()=>({queryKey:[w.FILTER_TYPES.TICKETS_WATCH_ONLINE],queryFn:()=>({}),enabled:!1})};break;case w.FILTER_TYPES.CONTRIBUTION_EXPRESSION:Y={...Y,groupBy:"organizationType.slug",fetchOptionsFn:g()},l?.type===C.EG.PRODUCER&&(Y={...Y,showGroupHeaders:!0,fetchGroupFn:W({filters:N,aggregationType:f,limit:F,queryConfig:{select:e=>{let t=e?.data||[];return[{...K.ALL,name:S(`${h.TP}.m_ALL`)},...t].map(e=>{let t=e?.id;return{...e,id:t?t.toLowerCase():t}})}}})}),[w.FILTER_TYPES.CAST,w.FILTER_TYPES.CREW].includes(l?.parent?.slug)&&(Y={...Y,showGroupHeaders:!0,fetchGroupFn:W({filters:N,aggregationType:f,limit:F,queryConfig:{select:e=>{let t=e?.data||[];return[{...K.ALL,name:S(`${h.TP}.m_ALL`)},...t]}}})});break;case w.FILTER_TYPES.COUNTRY:Y={...Y,groupBy:"id",isNested:!0,fetchOptionsFn:g({keepPreviousData:!1,limit:L}),fetchNestedOptionsFn:e=>{let{parentId:t}=e;return g({keepPreviousData:!1,limit:L})({customFilters:{[w.AGGREGATION_TYPES[w.FILTER_TYPES.COUNTRY]]:t},customAggType:w.AGGREGATION_TYPES[w.FILTER_TYPES.CITY],customLimit:300}
1)}};break;case w.FILTER_TYPES.WORK_TYPE:Y={...Y,groupBy:"id",isNested:!0,fetchOptionsFn:g({keepPreviousData:!1,limit:L})};break;default:Y={...Y,fetchOptionsFn:g()}}return Y})({selectedFilterType:t,subFilterType:l,isQueryEnabled:!eh?.isRestricted||[w.FILTER_TYPES.TICKETS_WATCH_ONLINE].includes(t),filterParams:a,stats:b,userOrgId:null,onSuccess:e=>{es?.length>0&&ee.click((0,U.Ar)(e,es),P.h0)}});(0,r.useEffect)(()=>{eo||e_(e=>Object.keys(eg)?.length>0?{...e,...eg}:e)},[eg]),(0,r.useEffect)(()=>{eC(V[0]?.value)},[l,t,f]),(0,r.useEffect)(()=>{ey&&ec(e=>({...e,[f?.id]:{...f,total:e[f?.id]?.total||0}}))},[f,ey]);let{customFilters:ek,activeGroup:ej}=(0,r.useMemo)(()=>{let e=f?ed[f?.id]:K.ALL;return eg?.[`-${e?.id}`]&&(e.isExcludedByUser=!0),{activeGroup:ey?e:null,customFilters:(e=>{let{subFilterType:t,activeGroup:l}=e;return l?.id===K.ALL.id?{}:t?.type===C.EG.PRODUCER?{[w.AGGREGATION_TYPES[w.FILTER_TYPES.PRODUCER_TYPE]]:l?.id}:[w.FILTER_TYPES.CAST,w.FILTER_TYPES.CREW].includes(t?.parent?.slug)?{[w.AGGREGATION_TYPES[w.FILTER_TYPES.AGG_PROFESSION_ID]]:l?.id}:{}})({selectedFilterType:t,subFilterType:l,activeGroup:e})}},[t,l,ed,ey,eg,f]),{data:ew,isFetching:eB}=(0,F.IT)(eY({customFilters:{...ek,aggregation_query:es},isEnabled:!ej?.isExcludedByUser})),{entityList:eM,showEntityList:eW,showNoOptionsFound:e$}=(0,r.useMemo)(()=>{if(ej?.isExcludedByUser)return{entityList:[],showEntityList:!1};let e=ew?.length>0?ew:eU?.map(e=>({...e,label:er(e?.label)})),i=ew?.length>0;return{entityList:e,showEntityList:(i||es&&i||[C.EG.PRODUCER].includes(l?.type)&&i||[w.FILTER_TYPES.COVER_DEBUT,w.FILTER_TYPES.COUNTRY,w.FILTER_TYPES.WORK_TYPE,w.FILTER_TYPES.TICKETS_WATCH_ONLINE].includes(t))&&!eB&&!ej?.isExcludedByUser,showNoOptionsFound:!ej?.isExcludedByUser&&!e?.length&&!eB}},[ej?.isExcludedByUser,ew,eU,es,l?.type,t,eB,er]);(0,r.useEffect)(()=>{eM?.length>0&&eu(eM)},[eM]);let eK=e=>{ee.click((0,U.O9)(eG,e?.label||e?.name,e?.slug),P.h0),ee.click({subComponent:P.kU.FILTER_OPTION,...I,meta:{id:e?.id,clickText:e?.slug,filterTab:t}})},eV=e=>{let{option:t,isChecked:l,isAllExcluded:i,key:r}=e;if(l){eK(t);let e={...eT};if(i){delete e[r],e_({...e,[`-${r}`]:[]});return}delete e[`-${r}`],e_({...e,[r]:[t]})}else{let e={...eT};if(i){delete e[`-${r}`],e_(e);return}delete e[r],e_(e)}},eH=e=>{let{groupKey:i,option:r,isChecked:s,isGroup:n,isAllExcluded:o}=e,a=Q({option:r,subFilterType:l}),T=[w.FILTER_TYPES.ROLE,w.FILTER_TYPES.ENSEMBLE,w.FILTER_TYPES.VENUE].includes(a?.type)?a?.slug||i||a?.id||t:i||a?.id||t,_=T===t?T:`${t}${a?.slug?`_${a.slug}${a?.type?`~${a.type}`:""}`:""}${T?`_${T}`:""}`;n?eV({option:r,isChecked:s,isAllExcluded:o,key:_}):ey?(e=>{let{option:t,isChecked:l,key:i}=e,r=eT[i]||[],s=ed[i],{isOptionExist:n,filteredList:o}=H({list:r,targetId:t?.id,isOptionExcluded:l});l?(eK(t),eT[`-${i}`]&&eV({option:{id:i},isChecked:!l,isAllExcluded:!0,key:i}),ec({...ed,[i]:{...s,total:s?.total?s.total+1:1}}),e_(e=>({...e,[i]:n?o:E()([t,...r],"id")}))):(ec({...ed,[i]:{...s,total:s?.total?s.total-1:0}}),e_(e=>{let l={...e};return n&&0===o.length?delete l[i]:l[i]=n?o:[...o,{...t,isExcluded:!0}],l}))})({option:r,isChecked:s,key:_}):s?(e=>{let{option:t,key:l}=e;if(eK(t),!eD)return e_({[l]:[t]});e_(e=>({...e,[l]:E()([t,...e?.[l]||[]],"id")}))})({option:r,key:_}):(e=>{let{option:i,key:r}=e,s=eT[r]?.filter(e=>{if(t===w.FILTER_TYPES.PERFORMANCE_HIGHLIGHT)return e?.id?.toString()!==i?.id?.toString();let l=i?.id?.toString()?.replace(/[a-zA-Z]/g,""),r=e?.id?.toString()?.replace(/[a-zA-Z]/g,"");return""===r&&""===l?e?.id!==i?.id:!r.startsWith(l)});if(!s?.length&&l?.type!==C.EG.PRODUCER){delete eT[r],e_({...eT});return}e_(e=>({...e,[r]:s}))})({option:r,key:_})},ez=(0,r.useCallback)(e=>e.stopPropagation(),[]),eQ=(0,r.useMemo)(()=>{let e=e=>JSON.stringify(Object.keys(e).sort().reduce((t,l)=>{let i={...t};return i[l]=Array.isArray(e[l])?e[l]?.map(e=>e?.id).sort():e[l],i},{}));return e({...eT})!==e({...eg})},[eg,eT]),eX=(0,r.useCallback)(()=>{e_&&e_({}),_?.({selectedOptions:{},isClearAll:!0})},[e_,_]),eZ=eN&&!v,eq=!es&&!eB&&(eF||!B);return(0,i.jsxs)("div",{className:(0,s.default)(M().filterDropdown,{[M().filterDropdownInline]:!!R,[M().filterDropdownAccordion]:B}),role:"button",tabIndex:"0",onClick:ez,onKeyDown:ez,children:[(0,i.jsx)("div",{className:M().filterDropdown__wrapper,children:(0,i.jsxs)("div",{className:(0,s.default)(M().filterDropdown__content,{[M().blur]:eh?.isRestricted}),children:[!B&&(0,i.jsxs)(O.Ay,{className:M().filterDropdown__title,weight:"medium",children:[er(`${h.TP}.FN_SELECT`)," ",[w.FILTER_TYPES.CAST,w.FILTER_TYPES.CREW].includes(l?.parent?.slug)?er(w.FILTER_LABELS[l.parent.slug]):l?.name||er(w.FILTER_LABELS[t])," ",n>0&&`(${n})`]}),eb&&(0,i.jsx)("div",{className:(0,s.default)(M().filterDropdown__header,{[M().filterDropdown__header_popover]:L}),children:(0,i.jsx)("div",{className:(0,s.default)(M().filterDropdown__header_input,{[M().filterDropdown__header_input_popover]:L}),children:(0,i.jsx)(T.A,{onChange:en,placeholder:er(`${h.TP}.SEARCH`)})})}),eZ&&(0,i.jsx)(X,{query:es,onClickHandler:eX}),ey&&(0,i.jsx)(J,{fetchGroupFn:em,activeGroup:ej,selectedOptions:eT,setSelectedGroups:ec,onSelectAllSelected:eH,subFilterType:l,contributionExpressionType:h.CONTRIBUTION_EXP_TYPES.PRODUCER,withSelectAll:!e$,onUpdateFilterOptionGroup:A,selectedFilterType:t}),(0,i.jsxs)("div",{className:(0,s.default)(M().filterDropdown__options,{[M().filterDropdown__isSearchHidden]:!eb,[M().filterDropdown__disablePadding]:B}),children:[eB&&(0,i.jsx)(u.A,{}),e$?Z||(0,i.jsx)(N.A,{title:er(`${h.TP}.AS_TABLE_NO_RESULTS`),sizes:{icon:40,title:14}}):(0,i.jsxs)(i.Fragment,{children:[eq&&(0,i.jsx)(c.A,{variant:"NEW",options:V,value:ef,onSelect:e=>(e=>{eC(e),eu(2===e?[...eM].sort((e,t)=>
1{let l=e.name||e.label||"",i=t.name||t.label||"";return l.localeCompare(i)}):eM)})(e),styles:{selectedOption:M().selectedOption}}),eW&&(0,i.jsx)("div",{children:(0,i.jsx)(et,{selectedFilterType:t,selectedGroup:ej,options:eR,aggregationType:eG,onChange:eH,selectedOptions:eT,fetchNestedOptionsFn:ex,selectedSortOption:ef,trackingData:{...I,category:es?P.R6.SEARCH:void 0,searchQuery:es},subFilterType:l,...ev})}),eZ&&(0,i.jsx)(X,{query:es,className:M().clearAll__endOfList,onClickHandler:eX})]})]})]})}),(0,i.jsx)(el,{...eh,onAccessArchives:d}),!v&&(0,i.jsx)(q,{selectedOptions:eT,onUpdateFilters:_,onResetFilters:eX,hasFilterChanged:eQ,trackingData:I,enableClearAll:eN})]})}},38002:e=>{e.exports={icon:"ob_4lNeMa",selectedOption:"ob_QUVhM5",selectedOption__new:"ob_4n7PIk",rightIcon:"ob_4CVjBa",collapsed:"ob_PEtx3K",radioBtn:"ob_M2ZA3c"}},43233:(e,t,l)=>{"use strict";l.d(t,{A:()=>P});var i=l(95155),r=l(12115),s=l(96286),n=l(11273),o=l(6097),a=l(61634),E=l(88754),T=l(992),_=l(27199),d=l(55667),c=l(35145),R=l(46800),u=l(22377),S=l(42732),I=l(22701),O=l.n(I);let p=e=>{let{workId:t,roleId:l,filters:o,multipleRoles:_=!1,trackingData:d={}}=e,{data:c}=(0,a.IT)((0,T.castCrewSegmentsList)({filters:{work_id:t,...o}},{enabled:!!t})),{data:u}=(0,a.IT)((0,E.productionAggregationItemDetail)({work_id:t,aggregation_type:S.AGGREGATION_TYPES[S.FILTER_TYPES.WORK]},{enabled:!!t})),{composers:I,roleName:p}=(0,r.useMemo)(()=>{let e=c?.reduce((e,t)=>e||t?.data?.find(e=>e?.id?.toString()===l?.toString()),null);return{composers:(0,R.zh)(u),roleName:e?.name}},[u,l,c]),P=I?.length>0&&(0,i.jsx)(s.Ay,{size:_?12:18,className:O().composer,color:"secondary",italic:!0,children:(0,i.jsx)(n.A,{name:I[0].name,entityType:I[0].entityType,entity:I[0],trackingData:d,isRaw:!0})});return _?(0,i.jsxs)("div",{className:O().workRole__multiple,children:[(0,i.jsx)(s.Ay,{variant:"p",size:12,weight:"bold",children:p}),(0,i.jsxs)(s.Ay,{className:O().workRole__single,size:12,weight:"medium",truncate:!0,children:[(0,i.jsx)(n.A,{entityType:S.ENTITY_TYPES.WORK,entity:u,trackingData:d,withTranslation:!1,isRaw:!0}),P]})]}):(0,i.jsxs)(s.Ay,{className:O().workRole__single,size:18,weight:"bold",truncate:!0,children:[(0,i.jsx)(n.A,{entityType:S.ENTITY_TYPES.WORK,entity:u,trackingData:d,isRaw:!0}),P]})},P=e=>{let{trackingData:t={}}=e,{t:l}=(0,u.useTranslation)("NS_CASTING_TOOL"),{obRouteContext:n}=(0,c.A)(),{linkProps:a,filterParams:E}=n,{filters:T}=a,{queryParts:R}=(0,r.useMemo)(()=>({queryParts:(0,_.Jh)(T.expression)}),[T.expression]);return(0,i.jsx)("div",{className:O().root,children:R?.map((e,r)=>{let{type:n,value:a}=e,T=`${n}-${r}`;if(n===o.BOOLEAN_SEARCH_PARTS.OPERATOR)return(0,i.jsx)(s.Ay,{size:12,color:"secondary",className:O().roles__operator,children:l(o.BOOLEAN_OPERATOR_LABELS[a])},T);let _=a?.[S.AGGREGATION_TYPES[S.FILTER_TYPES.WORK_ROLE]];return(0,i.jsx)(p,{workId:a?.[S.AGGREGATION_TYPES[S.FILTER_TYPES.WORK]],roleId:_?.id,roleType:_?.type,filters:{...E?.[S.FILTER_TYPES.SINCE_YEAR]&&{date_from:(0,d.JO)(`${E?.[S.FILTER_TYPES.SINCE_YEAR]}`).format(o.DATE_FORMATS.FULL_DATE)},[S.FILTER_TYPES.COUNTRY]:E?.[S.FILTER_TYPES.COUNTRY]},multipleRoles:R?.length>1,trackingData:t},T)})})}},46870:(e,t,l)=>{"use strict";l.d(t,{A:()=>n});var i=l(12115),r=l(42732),s=l(35145);let n=e=>{let{obRouteContext:t}=(0,s.A)(),{basePath:l,page:n}=t;return(0,i.useMemo)(()=>{let t=[r.FILTER_TYPES.WORK_TYPE,r.FILTER_TYPES.LANGUAGE,r.FILTER_TYPES.COUNTRY,r.FILTER_TYPES.PERFORMANCE_HIGHLIGHT,r.FILTER_TYPES.PROFESSION,r.FILTER_TYPES.WORK,r.FILTER_TYPES.TICKET,r.FILTER_TYPES.WATCH_ONLINE,r.FILTER_TYPES.SURTITLE,r.FILTER_TYPES.ROLE_PROFESSION,r.FILTER_TYPES.COVER_ROLE,r.FILTER_TYPES.ROLE_DEBUT,r.FILTER_TYPES.PRODUCER_DEBUT,r.FILTER_TYPES.COMPOSER],i=[r.FILTER_TYPES.WHO,r.FILTER_TYPES.WHERE,r.FILTER_TYPES.DATE,r.FILTER_TYPES.WHAT,r.FILTER_TYPES.GENRE,r.FILTER_TYPES.LETTER,r.FILTER_TYPES.SCORING_PARAMS,r.FILTER_TYPES.JUMP_IN_EXPRESSION,r.FILTER_TYPES.PRODUCTION_ID,r.FILTER_TYPES.SORT_CT,r.FILTER_TYPES.CTX_ENTITY,r.FILTER_TYPES.RENTALS,...e||[]];if(l===r.ROUTE_RESERVED_KEYWORDS.artists&&i.push(r.FILTER_TYPES.PROFESSION),l===r.ROUTE_RESERVED_KEYWORDS.organisations&&i.push(r.FILTER_TYPES.ORGANIZATION_TYPE),!n?.entity?.id&&[r.ROUTE_RESERVED_KEYWORDS.artists,r.ROUTE_RESERVED_KEYWORDS.organisations].includes(l))return{staticFilterTypes:t.filter(e=>e!==r.FILTER_TYPES.PROFESSION),excludeFilterTypes:i};if(l===r.ROUTE_RESERVED_KEYWORDS.casting){if(n?.entity?.id)return{staticFilterTypes:[...t.filter(e=>![r.FILTER_TYPES.PROFESSION,r.FILTER_TYPES.SURTITLE,r.FILTER_TYPES.TICKET,r.FILTER_TYPES.WATCH_ONLINE].includes(e)),r.FILTER_TYPES.COMPOSER],excludeFilterTypes:i};if(!n?.entity)return{staticFilterTypes:[r.FILTER_TYPES.WORK_TYPE,r.FILTER_TYPES.LANGUAGE,r.FILTER_TYPES.COUNTRY,r.FILTER_TYPES.PERFORMANCE_HIGHLIGHT],excludeFilterTypes:[...i,r.FILTER_TYPES.BOOLEAN_SEARCH,r.FILTER_TYPES.COMPOSER,r.FILTER_TYPES.S
1INCE_YEAR]}}return{staticFilterTypes:t,excludeFilterTypes:i}},[l,n?.entity,e])}},52811:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var i=l(12115),r=l(24940),s=l(35145),n=l(27822);let o=()=>{let{isLoggedIn:e}=(0,s.A)(),{setIsLoginDialog:t}=(0,n.b9)(),l=(0,r.az)();return(0,i.useCallback)(i=>{i&&(i.preventDefault?.(),i.stopPropagation?.()),e?l():t({isOpen:!0})},[e,l,t])}},59183:e=>{e.exports={root:"ob_hjqxqG",separator:"ob_OjxJbi",typeList:"ob_NegRmE",chip:"ob_krNjm1",inline:"ob_NnGxsi",loader:"ob_mqOgUO",header:"ob_8beKQ0",header__label:"ob_C6RXSm",header__label_text:"ob_KNq05r",header__icon:"ob_3v0J4e",renderFacets:"ob_ke0sii",renderFacets__inline:"ob_vkkpnu",active:"ob_3ZGFXA",chip__label:"ob_yPdXbU",chip__labelWrapper:"ob_yE5vXp",chip__applied:"ob_9ORFO1",chip__lock:"ob_ryiNbl",chip__icon:"ob_M1lhPm",inlineChip:"ob_WYi2L5",header__label_textApplied:"ob_p0Rt8s",header__active:"ob_Q1hbd4",headerFilterApplied:"ob_5Mxf8p",inlineHeader:"ob_pYvuDY",chip_icon:"ob_HsxtqL",overflowItemWrapper:"ob_2vElKt",filterPopover:"ob_wyaa0a",expandableListItem:"ob_TlGZa3",filterModal:"ob_p2lEDo",filterModal__header:"ob_HevGpx",filterModal__header_isSticky:"ob_HNq4l2",filterModal__header_filterText:"ob_U9EW2U",text:"ob_e3Qt4a",icon:"ob_CMXpsQ",filterModal__header_close:"ob_XLBhS9",closeButton:"ob_rgcDTF",cancelText:"ob_hUiIV1",filterModal__selectedInfo:"ob_sxWSSP",filterModal__selectedInfo_isSticky:"ob_AKEjhT",filterModal__selectedInfo_isSticky_hasMultiRole:"ob_w9g8Na",scrollLeftIndicator:"ob_clcMox",scrollRightIndicator:"ob_xOpCre",filterModal__content:"ob_qI7S2h",filterModal__content_fullHeight:"ob_7GWedx",filterModal__content_left:"ob_vfseYU",facets:"ob_SeazxN",title:"ob_oemB4t",workRoles:"ob_QLofrV",filterModal__content_right:"ob_Z0KVYo",filterDrawerPaper:"ob_OBs90j",filterDrawerContent:"ob_RBia1Y",filterBtn:"ob_aeLLfu",filterBtn__onlyIcon:"ob_3Ra30Q",filterBtn__count:"ob_2Vb0aq",filterBtn__compactIcon:"ob_BYHU8z",disabled:"ob_38brn9",filterDrawer:"ob_hejDJB",closeIcon:"ob_EOqvnE"}},60030:(e,t,l)=>{"use strict";l.d(t,{Bs:()=>d,Jh:()=>u,pK:()=>T,r1:()=>I,rl:()=>a,t0:()=>o,uU:()=>_,w7:()=>S});var i=l(78411),r=l.n(i),s=l(6097),n=l(42732);let o=16,a=5e3,E={[n.ROUTE_RESERVED_KEYWORDS.artists]:[n.FILTER_TYPES.PROFESSION,n.FILTER_TYPES.PAGE,n.FILTER_TYPES.QUERY,n.FILTER_TYPES.LETTER,n.FILTER_TYPES.SORT_CT],[n.ROUTE_RESERVED_KEYWORDS.organisations]:[n.FILTER_TYPES.ORGANIZATION_TYPE,n.FILTER_TYPES.COUNTRY,n.FILTER_TYPES.CITY,n.FILTER_TYPES.PAGE,n.FILTER_TYPES.QUERY,n.FILTER_TYPES.LETTER,n.FILTER_TYPES.SORT_CT]},T=e=>{let{page:t,limit:l,isAggregationBacked:i=!1}=e,r=Number(t||1),s=Number(l);return!!Number.isFinite(r)&&!(r<=0)&&!!Number.isFinite(s)&&!(s<=0)&&s*r>(i?a:1e4)},_=e=>{let{basePath:t,filters:l={}}=e;return(e=>{let{basePath:t,filters:l={}}=e;return Object.keys((e=>{let{basePath:t,filters:l={}}=e,i=E[t]||[];return i.length?r()(l,i):{}})({basePath:t,filters:l}))})({basePath:t,filters:l}).length>0},d=e=>{let{filters:t={}}=e;return!!(t?.[n.FILTER_TYPES.PAGE]||t?.[n.FILTER_TYPES.LETTER]||t?.[n.FILTER_TYPES.QUERY])||t?.[n.FILTER_TYPES.SORT_CT]===s.SORT_OPTION_VALUES.NAME_ASC},c=["filters","types"],R={[n.ROUTE_RESERVED_KEYWORDS.artists]:[n.FILTER_TYPES.PROFESSION,n.FILTER_TYPES.LETTER,n.FILTER_TYPES.QUERY,n.FILTER_TYPES.SORT_CT,n.AGGREGATION_TYPES[n.FILTER_TYPES.PROFESSION],n.AGGREGATION_TYPES[n.FILTER_TYPES.AGG_PROFESSION_ID]],[n.ROUTE_RESERVED_KEYWORDS.organisations]:[n.FILTER_TYPES.ORGANIZATION_TYPE,n.FILTER_TYPES.COUNTRY,n.FILTER_TYPES.CITY,n.FILTER_TYPES.LETTER,n.FILTER_TYPES.QUERY,n.FILTER_TYPES.SORT_CT,n.AGGREGATION_TYPES[n.FILTER_TYPES.ORGANIZATION_TYPE]]},u=e=>{let{basePath:t,filterParams:l={},commonFilterParams:i={}}=e,s=R[t]||[],o={...l,...i},a=o[n.AGGREGATION_TYPES[n.FILTER_TYPES.ORGANIZATION_TYPE]],E=t===n.ROUTE_RESERVED_KEYWORDS.organisations&&!!a;return{...r()(o,[n.FILTER_TYPES.PAGE,n.FILTER_TYPES.SINCE_YEAR,...c,...s]),...E&&{[n.AGGREGATION_TYPES.HAS_ORG_TYPE_ID]:a}}},S=e=>{let{basePath:t,paths:l}=e||{};return l?.map(e=>e?.path)?.filter((e,l)=>0!==l||e!==t)||[]},I=e=>{let{basePath:t,filterParams:l={}}=e;if(t===n.ROUTE_RESERVED_KEYWORDS.artists){let e=l?.[n.AGGREGATION_TYPES[n.FILTER_TYPES.PROFESSION]];return{...r()(l,[n.FILTER_TYPES.PAGE,n.FILTER_TYPES.SORT_CT,n.AGGREGATION_TYPES[n.FILTER_TYPES.PROFESSION]]),...e&&{[n.AGGREGATION_TYPES[n.FILTER_TYPES.AGG_PROFESSION_ID]]:e},contribution_entity_type:s.CONTRIBUTORS_ENTITY_TYPE.INDIVIDUAL,include_virtual_contributors:!0}}return t===n.ROUTE_RESERVED_KEYWORDS.organisations?{...r()(l,[n.FILTER_TYPES.PAGE,n.FILTER_TYPES.SORT_CT]),contribution_entity_type:s.CONTRIBUTORS_ENTITY_TYPE.ORGANIZATION,include_virtual_contributors:!0}:l}},62451:(e,t,l)=>{"use strict";l.d(t,{Kk:()=>a,T5:()=>o}),l(64311),l(47207);var i=l(6097),r=l(92202),s=l(46800),n=l(42732);function o(e){let{selectedFilterType:t,aggregationType:l,response:o}=e;if(!o?.data)return{data:[],top5:[]};if(t===n.FILTER_TYPES.COVER_DEBUT){var a=o.data;
1let e={[n.AGGREGATION_TYPES[n.FILTER_TYPES.COVER_ROLE]]:{name:n.FILTER_TYPES.COVER_ROLE,label:`${n.TP}.FN_COVER_ROLE`,id:n.FILTER_TYPES.COVER_ROLE},[n.AGGREGATION_TYPES[n.FILTER_TYPES.ROLE_DEBUT]]:{name:n.FILTER_TYPES.ROLE_DEBUT,label:`${n.TP}.FN_ROLE_DEBUT`,id:n.FILTER_TYPES.ROLE_DEBUT},[n.AGGREGATION_TYPES[n.FILTER_TYPES.PRODUCER_DEBUT]]:{name:n.FILTER_TYPES.PRODUCER_DEBUT,label:`${n.TP}.FN_COMPANY_PRODUCER_DEBUT`,id:n.FILTER_TYPES.PRODUCER_DEBUT}};return a?.map(t=>{let{label:l,id:i}=e[t?.type];return{label:l,id:i,value:i,total:t?.data?.data?.[0]?.total,...t}})}let E=[n.FILTER_TYPES.ROLE_PROFESSION,n.FILTER_TYPES.CREATOR,n.FILTER_TYPES.WORK,n.FILTER_TYPES.ROLE_PROFESSION_REPERTOIRE,n.FILTER_TYPES.CONTRIBUTION_EXPRESSION,n.FILTER_TYPES.COUNTRY].includes(t),T=t===n.FILTER_TYPES.WORK_TYPE,_=t===n.FILTER_TYPES.CONTRIBUTION_EXPRESSION;return o.data.map(e=>({...E&&{...e},..._&&{headline:e.headline},...T&&{nestedFilterOptions:e.stagingTypes},cityCountry:e.country?.name||e.city?.name?(0,r.ud)(e):void 0,id:t===n.FILTER_TYPES.ROLE_PROFESSION_REPERTOIRE?e.workRole?.id||e.profession?.id:e.id,slug:e.slug,value:e.id||e.slug,label:l===i.AGGREGATION_TYPES.WORK?(0,s.uC)(e,!0,!0):e.name,total:e.total}))}let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e?.[e.length-1]?.id;t<1996&&(t=1996);let l=e?.[0]?.id;return e.reduce((e,i)=>(i.id>=t&&i.id<=l&&e.push({...i,key:i?.id,label:i?.name}),e),[])}},73037:e=>{e.exports={parent:"ob_eX8s2r"}},78258:e=>{e.exports={desktopViewContainer:"ob_8LDV99",desktopViewContainer__width_375px:"ob_vWe5T0",desktopViewContainer__width_460px:"ob_fQjl8J",desktopViewContent:"ob_GxfeyD",mobileViewContainer:"ob_Fwys6n",drawerContent:"ob_UrFIXs",productionViewDrawerRoot:"ob_Md3E5F",entityViewContainer:"ob_PAOPPs",slideUp:"ob_BMRaV0",entityViewContainer__headerText:"ob_EBpxdT",entityViewContainer__headerCloseIcon:"ob_COl75E",entityViewContainer__drawerContent:"ob_w00HIb",entityViewContainer__drawerRoot:"ob_EFtaaF"}},81649:(e,t,l)=>{"use strict";l.d(t,{$s:()=>N,Eo:()=>P,pc:()=>u,vi:()=>S,wP:()=>L,wU:()=>O,xW:()=>f});var i=l(78411),r=l.n(i),s=l(64311),n=l.n(s),o=l(6097),a=l(88754),E=l(55667),T=l(42732),_=l(52692);let d=["search_exp","ctx_entity"],c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n()(e,d)},R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{todayDateFrom:t,queryConfig:l={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{tickets:(0,a.pageProductionStats)({...e,date_from:t||(0,E.JO)().format(T.ROUTE_DATE_FORMATS.STANDARD),facets:"has_tickets"},l),online:(0,a.pageProductionStats)({...e,include_virtual_contributors:!0,facets:"has_online"},l),rentals:(0,a.pageProductionStats)({...e,include_virtual_contributors:!0,aggregation_type:"has_active_rental"},l)}},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return R(c(e),{queryConfig:{staleTime:1/0,refetchOnMount:!1}})},S=(e,t)=>e?.meta?.[t],I=function(){let{count:e,isActive:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!!t||null==e||Number(e)>0},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{activeTabKey:t,ticketsCount:l,watchOnlineCount:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.filter(e=>e.key===o.ENTITY_MAIN_TABS.TICKETS?I({count:l,isActive:e.key===t}):e.key!==o.ENTITY_MAIN_TABS.WATCH_ONLINE||I({count:i,isActive:e.key===t}))},p=["page","sort_ct","car"],P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r()(e,p)},L=function(){let{basePath:e,page:t,linkProps:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!!t?.isListingProductions&&t?.category===T.PAGE_CATEGORIES.LISTING&&!!(e=>{let t=e?.filters?.[T.FILTER_TYPES.WHAT];return Array.isArray(t)&&1===t.length&&t[0]?.entityType===T.ENTITY_TYPES.WORK&&!!t[0]?.entity?.id})(l)&&!(e&&(!e||e===T.ROUTE_RESERVED_KEYWORDS.productions||T.ROUTE_RESERVED_KEYWORDS[e]||T.REGULAR_EXPRESSIONS.YEAR_MATCH.test(e)||(0,_.transformDatePath)(e)?.valid===!0))},A=[T.ROUTE_RESERVED_KEYWORDS.productions,T.ROUTE_RESERVED_KEYWORDS.tickets,T.ROUTE_RESERVED_KEYWORDS["watch-online"],T.ROUTE_RESERVED_KEYWORDS.rentals,T.ROUTE_RESERVED_KEYWORDS.archives],N=function(){let{basePath:e,linkProps:t,page:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!l?.entity?.id&&(L({basePath:e,page:l,linkProps:t})||A.includes(e)||T.REGULAR_EXPRESSIONS.YEAR_MATCH.test(e||"")||l?.isListingProductions===!0&&l?.entityType===T.ENTITY_TYPES.PRODUCTION)},f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{basePath:t,today:l,linkProps:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
1,r=i?.filters?.[T.FILTER_TYPES.DATE];if(t===T.ROUTE_RESERVED_KEYWORDS.archives||i?.basePath===T.ROUTE_RESERVED_KEYWORDS.archives||r?.path===T.ROUTE_RESERVED_KEYWORDS.archives)return!0;let s=e?.date_to??r?.date_to;if(!s)return!1;let n=(l?(0,E.JO)(l):(0,E.JO)()).startOf("day");return(0,E.JO)(s).startOf("day").isBefore(n,"day")}},86630:(e,t,l)=>{"use strict";l.d(t,{A:()=>_});var i=l(95155),r=l(12115),s=l(86194),n=l(22654),o=l.n(n),a=l(92905),E=l(30848),T=l.n(E);let _=e=>{let{children:t,triggerSize:l=40,isArrowsEnabled:n=!0,className:E,selectedChildElement:_,styles:d={leftIndicator:"",rightIndicator:""},padding:c=0,...R}=e,u=(0,r.useRef)(null),[S,I]=(0,r.useState)({left:!1,right:!1}),O=()=>{if(!u.current)return;let{clientWidth:e,scrollLeft:t,scrollWidth:i}=u.current,r=Math.abs(t),s=r>l,n=Math.ceil(r+e)<i-l,o="rtl"===window.getComputedStyle(u.current).direction;I({left:o?n:s,right:o?s:n})},p=(0,r.useMemo)(()=>o()(O,400),[]);(0,r.useEffect)(()=>{let e=u.current;return e.addEventListener("scroll",p),window.addEventListener("resize",p),()=>{e.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[p]);let P=(0,r.useCallback)(e=>()=>{u.current.scrollBy({left:("right"===e?1:-1)*u.current.clientWidth/2,behavior:"smooth"})},[]);return(0,r.useEffect)(()=>{if(_&&u.current){let e=u.current.getBoundingClientRect()?.left,t=e+(n?15+c:0);u.current.scrollLeft+e+c>_.offsetLeft&&u.current.scrollTo({left:_.offsetLeft-t,behavior:"smooth"}),u.current.scrollLeft+u.current.clientWidth-e<_.offsetLeft+_.clientWidth+c&&u.current.scrollTo({left:_.offsetLeft+_.clientWidth-u.current.clientWidth+t,behavior:"smooth"})}},[_,n]),(0,r.useEffect)(()=>(O(),()=>{p.cancel()}),[p]),(0,i.jsx)("div",{className:(0,s.default)(T().arrowAnchor,E),...R,children:(0,i.jsxs)("div",{ref:u,className:T().scrollContainer,children:[n&&(0,i.jsx)("button",{className:(0,s.default)(T().scrollIndicator,T().scrollIndicatorLeft,{[T().indicatorVisible]:S.left,[d?.leftIndicator]:!!d?.leftIndicator}),type:"button",onClick:P("left"),children:(0,i.jsx)(a.Ay,{icon:"arrow_back_ios",
1size:15})},`left_${S.right?"visible":"hidden"}`),t,n&&(0,i.jsx)("button",{className:(0,s.default)(T().scrollIndicator,T().scrollIndicatorRight,{[T().indicatorVisible]:S.right,[d?.rightIndicator]:!!d?.rightIndicator}),type:"button",onClick:P("right"),children:(0,i.jsx)(a.Ay,{icon:"arrow_forward_ios",size:15})},`right_${S.right?"visible":"hidden"}`)]})})}},88919:(e,t,l)=>{"use strict";l.d(t,{Ay:()=>s});var i=l(12115),r=l(96196);let s=()=>(0,i.useContext)(r.A)},93146:e=>{e.exports={root:"ob_bzDUkY",outset:"ob_znWwx1"}},96196:(e,t,l)=>{"use strict";l.d(t,{A:()=>T,E:()=>E});var i=l(95155),r=l(12115),s=l(11681),n=l(54589),o=l(12433);let a=(0,r.createContext)({}),E=e=>{let{children:t}=e,[l,E]=(0,r.useState)(null),T=!!l?.type,{pathname:_}=(0,n.A)(),d=(0,r.useCallback)(()=>{l?.onClose&&l.onClose(),E(null)},[l]),{blocksBodyScroll:c}=(0,s.A)();(0,r.useEffect)(()=>(c(T),()=>{c(!1)}),[c,T]),(0,r.useEffect)(()=>{T&&d()},[_]);let R=(0,r.useMemo)(()=>({quickViewType:l?.type,showQuickView:E,hideQuickView:d,quickViewProps:l}),[E,d,l]);return(0,i.jsx)(a.Provider,{value:R,children:(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsx)(o.A,{hideQuickView:d,quickViewProps:l})]})})},T=a}}]);

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.