@fluid-topics/ft-search-facet 1.2.24 → 1.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1960,7 +1960,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1960
1960
  `;var jc=g(R()),Kc=g(j());var Ke=g(R());var Mo=g(R()),Fd={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var o;let n=+((o=e.payload)!==null&&o!==void 0?o:20);t.request.paging.perPage=isNaN(n)?20:(0,Mo.minmax)(1,n,40)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]}},Rl=t=>Mo.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,suggestResults:void 0},reducers:Fd});var Md=g(Il(),1);var Pl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Pl||(Pl={}));var Tl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Tl||(Tl={}));var kl;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(kl||(kl={}));var _l;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(_l||(_l={}));var $l;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($l||($l={}));var Dl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Dl||(Dl={}));var Bl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Bl||(Bl={}));var Fl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Fl||(Fl={}));var Ml;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Ml||(Ml={}));var Ul;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ul||(Ul={}));var zl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zl||(zl={}));var _r;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(_r||(_r={}));var Wl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Wl||(Wl={}));var Hl;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Hl||(Hl={}));var Vl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Vl||(Vl={}));var Gl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Gl||(Gl={}));var jl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(jl||(jl={}));var $r;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($r||($r={}));var se;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(se||(se={}));var Kl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Kl||(Kl={}));var Zl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Zl||(Zl={}));var Fx={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.DEVELOPER]:[se.BETA_USER,se.DEBUG_USER],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};var Gc=g(R());var Jl=g($()),Me=g(j()),nt=g(R());var ql=g($());var Yl=ql.css`
1961
1961
  `;var Wo=g(R()),Ud="ft-app-info",Jn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},zd={session:(t,e)=>{(0,Wo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new Jn(e.payload)),0))}},T=Wo.FtReduxStore.get({name:Ud,reducers:zd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Wt=g(R());var ea=g(R());var dr=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=T.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=T.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var yt=class{constructor(e=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new ea.CacheRegistry,this.cache=e?i.commonCache:new ea.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:dr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):dr.await()}clearCache(){this.cache.clearAll()}};var Xl,Wd=Symbol("clearAfterUnitTest"),Ho=class extends yt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Xl]=()=>{this.defaultMessages={},this.cache=new Wt.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Wt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new Wt.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(o){console.error(o)}}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,Wt.delay)(0).then(()=>o()).catch(()=>null)))}};Xl=Wd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ho{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ho{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var pr=window.FluidTopicsI18nService,Ql=window.FluidTopicsCustomI18nService;var Oe=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},oe=class extends nt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>dr.get(),this.messageContexts=[],this.cache=new nt.CacheRegistry,this.cleanSessionDebouncer=new nt.Debouncer}render(){return Jl.html`
1962
1962
  <slot></slot>
1963
- `}update(e){var o,n,i,a,s;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>pr.addContext(c)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};oe.elementDefinitions={};oe.styles=Yl;Oe([(0,Me.property)()],oe.prototype,"baseUrl",void 0);Oe([(0,Me.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Oe([(0,Me.property)()],oe.prototype,"uiLocale",void 0);Oe([(0,nt.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Oe([(0,nt.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Oe([(0,Me.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Oe([(0,Me.property)({type:Object})],oe.prototype,"apiProvider",void 0);Oe([(0,nt.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Oe([(0,nt.jsonProperty)(void 0)],oe.prototype,"session",void 0);Oe([(0,Me.state)()],oe.prototype,"localesConfiguration",void 0);var Lp=g(j());function Hd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Vo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Vo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Vo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Vo(t,e){try{return Hd(t,e)}catch{return!1}}function Go(t,e){return!Vo(t,e)}var Vd=g(j(),1);var jo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var no=g(j(),1);var ec=g(j(),1);function tc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,ec.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Go,...e??{}})}var Ko=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var oc=g($(),1);var Zo=window,Gd=Zo.ShadowRoot&&(Zo.ShadyCSS===void 0||Zo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gv=Symbol();var rc=(t,e)=>{Gd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Zo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var qo=class extends oc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return rc(n,e.elementStyles),n}};var Yo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},sc,nc=Symbol("constructorPrototype"),ac=Symbol("constructorName"),lc=Symbol("exportpartsDebouncer"),ic=Symbol("dynamicDependenciesLoaded"),Ht=class extends qo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[sc]=new Ko(5),this[ac]=this.constructor.name,this[nc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ac]&&Object.setPrototypeOf(this,this[nc])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[ic]||(e[ic]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[lc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(u).map(O=>O.trim()).forEach(O=>y.add(O))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};sc=lc;Yo([(0,no.property)()],Ht.prototype,"exportpartsPrefix",void 0);Yo([tc([])],Ht.prototype,"exportpartsPrefixes",void 0);Yo([(0,no.property)()],Ht.prototype,"customStylesheet",void 0);Yo([(0,no.state)()],Ht.prototype,"useAdoptedStyleSheets",void 0);function ao(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var cc,dc,pc,io=Symbol("internalReduxEventsUnsubscribers"),Vt=Symbol("internalStoresUnsubscribers"),ur=Symbol("internalStores"),so=class extends Ht{constructor(){super(...arguments),this[cc]=new Map,this[dc]=new Map,this[pc]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ur].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ur].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[ur].get(e)}addStore(e,o){var n;o=(n=o??(ao(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[ur].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[ur].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ur].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Vt].has(e.store):this[Vt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Vt].set(e,o.subscribe(()=>this.updateFromStores())),this[io].set(e,[]),ao(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.addEventListener(i.eventName,s),this[io].get(e).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Vt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Vt].has(e)&&this[Vt].get(e)(),this[Vt].delete(e),(o=this[io].get(e))===null||o===void 0||o.forEach(n=>n()),this[io].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};cc=Vt,dc=ur,pc=io;so.reduxProperties=new Map;so.reduxReactiveProperties=new Set;so.reduxEventListeners=new Map;function Qe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function It(t){return!!t&&!!t[X]}function at(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Jd}(t)||Array.isArray(t)||!!t[bc]||!!(!((e=t.constructor)===null||e===void 0)&&e[bc])||ca(t)||da(t))}function fr(t,e,o){o===void 0&&(o=!1),Fr(t)===0?(o?Object.keys:Br)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Fr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ca(t)?2:da(t)?3:0}function Dr(t,e){return Fr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function jd(t,e){return Fr(t)===2?t.get(e):t[e]}function xc(t,e,o){var n=Fr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function vc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ca(t){return Xd&&t instanceof Map}function da(t){return Qd&&t instanceof Set}function Gt(t){return t.o||t.t}function pa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Cc(t);delete e[X];for(var o=Br(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ua(t,e){return e===void 0&&(e=!1),fa(t)||It(t)||!at(t)||(Fr(t)>1&&(t.set=t.add=t.clear=t.delete=Kd),Object.freeze(t),e&&fr(t,function(o,n){return ua(n,!0)},!0)),t}function Kd(){Qe(2)}function fa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function mt(t){var e=la[t];return e||Qe(18,t),e}function Zd(t,e){la[t]||(la[t]=e)}function aa(){return co}function ta(t,e){e&&(mt("Patches"),t.u=[],t.s=[],t.v=e)}function Xo(t){ia(t),t.p.forEach(qd),t.p=null}function ia(t){t===co&&(co=t.l)}function uc(t){return co={p:[],l:co,h:t,m:!0,_:0}}function qd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function ra(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||mt("ES5").S(e,t,n),n?(o[X].P&&(Xo(e),Qe(4)),at(t)&&(t=Qo(e,t),e.l||Jo(e,t)),e.u&&mt("Patches").M(o[X].t,t,e.u,e.s)):t=Qo(e,o,[]),Xo(e),e.u&&e.v(e.u,e.s),t!==Oc?t:void 0}function Qo(t,e,o){if(fa(e))return e;var n=e[X];if(!n)return fr(e,function(c,u){return fc(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Jo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=pa(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),fr(a,function(c,u){return fc(t,n,i,c,u,o,s)}),Jo(t,i,!1),o&&t.u&&mt("Patches").N(n,o,t.u,t.s)}return n.o}function fc(t,e,o,n,i,a,s){if(It(i)){var c=Qo(t,i,a&&e&&e.i!==3&&!Dr(e.R,n)?a.concat(n):void 0);if(xc(o,n,c),!It(c))return;t.m=!1}else s&&o.add(i);if(at(i)&&!fa(i)){if(!t.h.D&&t._<1)return;Qo(t,i),e&&e.A.l||Jo(t,i)}}function Jo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ua(e,o)}function oa(t,e){var o=t[X];return(o?Gt(o):t)[e]}function hc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function jt(t){t.P||(t.P=!0,t.l&&jt(t.l))}function na(t){t.o||(t.o=pa(t.t))}function sa(t,e,o){var n=ca(e)?mt("MapSet").F(e,o):da(e)?mt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:aa(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,p=po;s&&(u=[c],p=lo);var y=Proxy.revocable(u,p),h=y.revoke,b=y.proxy;return c.k=b,c.j=h,b}(e,o):mt("ES5").J(e,o);return(o?o.A:aa()).p.push(n),n}function Yd(t){return It(t)||Qe(22,t),function e(o){if(!at(o))return o;var n,i=o[X],a=Fr(o);if(i){if(!i.P&&(i.i<4||!mt("ES5").K(i)))return i.t;i.I=!0,n=yc(o,a),i.I=!1}else n=yc(o,a);return fr(n,function(s,c){i&&jd(i.t,s)===c||xc(n,s,e(c))}),a===3?new Set(n):n}(t)}function yc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return pa(t)}function Sc(){function t(s,c){var u=a[s];return u?u.enumerable=c:a[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[X];return po.get(p,s)},set:function(p){var y=this[X];po.set(y,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][X];if(!u.P)switch(u.i){case 5:n(u)&&jt(u);break;case 4:o(u)&&jt(u)}}}function o(s){for(var c=s.t,u=s.k,p=Br(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==X){var b=c[h];if(b===void 0&&!Dr(c,h))return!0;var S=u[h],v=S&&S[X];if(v?v.t!==b:!vc(S,b))return!0}}var O=!!c[X];return p.length!==Br(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&Qe(3,JSON.stringify(Gt(s)))}var a={};Zd("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Cc(b);delete O[X];for(var P=Br(O),L=0;L<P.length;L++){var I=P[L];O[I]=t(I,h||!!O[I].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(u,s),y={i:u?5:4,A:c?c.A:aa(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:y,writable:!0}),p},S:function(s,c,u){u?It(c)&&c[X].A===s&&e(s.p):(s.u&&function p(y){if(y&&typeof y=="object"){var h=y[X];if(h){var b=h.t,S=h.k,v=h.R,O=h.i;if(O===4)fr(S,function(B){B!==X&&(b[B]!==void 0||Dr(b,B)?v[B]||p(S[B]):(v[B]=!0,jt(h)))}),fr(b,function(B){S[B]!==void 0||Dr(S,B)||(v[B]=!1,jt(h))});else if(O===5){if(n(h)&&(jt(h),v.length=!0),S.length<b.length)for(var P=S.length;P<b.length;P++)v[P]=!1;else for(var L=b.length;L<S.length;L++)v[L]=!0;for(var I=Math.min(S.length,b.length),_=0;_<I;_++)S.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&p(S[_])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var mc,co,ha=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xd=typeof Map<"u",Qd=typeof Set<"u",gc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Oc=ha?Symbol.for("immer-nothing"):((mc={})["immer-nothing"]=!0,mc),bc=ha?Symbol.for("immer-draftable"):"__$immer_draftable",X=ha?Symbol.for("immer-state"):"__$immer_state";var Jd=""+Object.prototype.constructor,Br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Cc=Object.getOwnPropertyDescriptors||function(t){var e={};return Br(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},la={},po={get:function(t,e){if(e===X)return t;var o=Gt(t);if(!Dr(o,e))return function(i,a,s){var c,u=hc(a,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!at(n)?n:n===oa(t.t,e)?(na(t),t.o[e]=sa(t.A.h,n,t)):n},has:function(t,e){return e in Gt(t)},ownKeys:function(t){return Reflect.ownKeys(Gt(t))},set:function(t,e,o){var n=hc(Gt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=oa(Gt(t),e),a=i?.[X];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(vc(o,i)&&(o!==void 0||Dr(t.t,e)))return!0;na(t),jt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return oa(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,na(t),jt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Gt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Qe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Qe(12)}},lo={};fr(po,function(t,e){lo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),lo.deleteProperty=function(t,e){return lo.set.call(this,t,e,void 0)},lo.set=function(t,e,o){return po.set.call(this,t[0],e,o,t[0])};var ep=function(){function t(o){var n=this;this.O=gc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=n;return function(O){var P=this;O===void 0&&(O=c);for(var L=arguments.length,I=Array(L>1?L-1:0),_=1;_<L;_++)I[_-1]=arguments[_];return u.produce(O,function(B){var F;return(F=a).call.apply(F,[P,B].concat(I))})}}var p;if(typeof a!="function"&&Qe(6),s!==void 0&&typeof s!="function"&&Qe(7),at(i)){var y=uc(n),h=sa(n,i,void 0),b=!0;try{p=a(h),b=!1}finally{b?Xo(y):ia(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return ta(y,s),ra(O,y)},function(O){throw Xo(y),O}):(ta(y,s),ra(p,y))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Oc&&(p=void 0),n.D&&ua(p,!0),s){var S=[],v=[];mt("Patches").M(i,p,S,v),s(S,v)}return p}Qe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),b=1;b<y;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return i.apply(void 0,[S].concat(h))})};var s,c,u=n.produce(i,a,function(p,y){s=p,c=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){at(o)||Qe(8),It(o)&&(o=Yd(o));var n=uc(this),i=sa(this,o,void 0);return i[X].C=!0,ia(n),i},e.finishDraft=function(o,n){var i=o&&o[X],a=i.A;return ta(a,n),ra(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!gc&&Qe(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=mt("Patches").$;return It(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),je=new ep,tp=je.produce,Lv=je.produceWithPatches.bind(je),Iv=je.setAutoFreeze.bind(je),Pv=je.setUseProxies.bind(je),Tv=je.applyPatches.bind(je),kv=je.createDraft.bind(je),_v=je.finishDraft.bind(je),en=tp;function Kt(t){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(t)}function ya(t,e){if(Kt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Kt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ma(t){var e=ya(t,"string");return Kt(e)==="symbol"?e:String(e)}function ga(t,e,o){return e=ma(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Ec(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function tn(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Ec(Object(o),!0).forEach(function(n){ga(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ec(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ce(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var wc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ba=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+ba(),REPLACE:"@@redux/REPLACE"+ba(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ba()}};function rp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xa(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ce(1));return o(xa)(t,e)}if(typeof t!="function")throw new Error(Ce(2));var i=t,a=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function y(){if(u)throw new Error(Ce(3));return a}function h(O){if(typeof O!="function")throw new Error(Ce(4));if(u)throw new Error(Ce(5));var P=!0;return p(),c.push(O),function(){if(P){if(u)throw new Error(Ce(6));P=!1,p();var I=c.indexOf(O);c.splice(I,1),s=null}}}function b(O){if(!rp(O))throw new Error(Ce(7));if(typeof O.type>"u")throw new Error(Ce(8));if(u)throw new Error(Ce(9));try{u=!0,a=i(a,O)}finally{u=!1}for(var P=s=c,L=0;L<P.length;L++){var I=P[L];I()}return O}function S(O){if(typeof O!="function")throw new Error(Ce(10));i=O,b({type:rn.REPLACE})}function v(){var O,P=h;return O={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ce(11));function _(){I.next&&I.next(y())}_();var B=P(_);return{unsubscribe:B}}},O[wc]=function(){return this},O}return b({type:rn.INIT}),n={dispatch:b,subscribe:h,getState:y,replaceReducer:S},n[wc]=v,n}function op(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:rn.INIT});if(typeof n>"u")throw new Error(Ce(12));if(typeof o(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function Ac(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{op(o)}catch(u){c=u}return function(p,y){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<a.length;v++){var O=a[v],P=o[O],L=p[O],I=P(L,y);if(typeof I>"u"){var _=y&&y.type;throw new Error(Ce(14))}S[O]=I,b=b||I!==L}return b=b||a.length!==Object.keys(p).length,b?S:p}}function Mr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Nc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ce(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return a=Mr.apply(void 0,c)(i.dispatch),tn(tn({},i),{},{dispatch:a})}}}function Rc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Lc=Rc();Lc.withExtraArgument=Rc;var va=Lc;var _c=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),np=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(y){p=[6,y],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ur=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},ap=Object.defineProperty,ip=Object.defineProperties,sp=Object.getOwnPropertyDescriptors,Ic=Object.getOwnPropertySymbols,lp=Object.prototype.hasOwnProperty,cp=Object.prototype.propertyIsEnumerable,Pc=function(t,e,o){return e in t?ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Zt=function(t,e){for(var o in e||(e={}))lp.call(e,o)&&Pc(t,o,e[o]);if(Ic)for(var n=0,i=Ic(e);n<i.length;n++){var o=i[n];cp.call(e,o)&&Pc(t,o,e[o])}return t},Sa=function(t,e){return ip(t,sp(e))},dp=function(t,e,o){return new Promise(function(n,i){var a=function(u){try{c(o.next(u))}catch(p){i(p)}},s=function(u){try{c(o.throw(u))}catch(p){i(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};c((o=o.apply(t,e)).next())})};var pp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mr:Mr.apply(null,arguments)},Qv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function up(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var fp=function(t){_c(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array),hp=function(t){_c(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array);function Ea(t){return at(t)?en(t,function(){}):t}function yp(t){return typeof t=="boolean"}function mp(){return function(e){return gp(e)}}function gp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new fp;if(o&&(yp(o)?c.push(va):c.push(va.withExtraArgument(o.extraArgument))),0){if(i)var u;if(s)var p}return c}var Oa=!0;function $c(t){var e=mp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(up(i))S=Ac(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!Oa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Oa&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Nc.apply(void 0,v),P=Mr;u&&(P=pp(Zt({trace:!Oa},typeof u=="object"&&u)));var L=new hp(O),I=L;Array.isArray(b)?I=Ur([O],b):typeof b=="function"&&(I=b(L));var _=P.apply(void 0,I);return xa(S,y,_)}function qt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Zt(Zt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Dc(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function bp(t){return typeof t=="function"}function xp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Dc(e):[e,o,n],a=i[0],s=i[1],c=i[2],u;if(bp(t))u=function(){return Ea(t())};else{var p=Ea(t);u=function(){return p}}function y(h,b){h===void 0&&(h=u());var S=Ur([a[b.type]],s.filter(function(v){var O=v.matcher;return O(b)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(It(v)){var P=v,L=O(P,b);return L===void 0?v:L}else{if(at(v))return en(v,function(I){return O(I,b)});var L=O(v,b);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return y.getInitialState=u,y}function vp(t,e){return t+"/"+e}function Bc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Ea(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(y){var h=n[y],b=vp(e,y),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,a[y]=S,s[b]=S,c[y]=v?qt(b,v):qt(b)});function u(){var y=typeof t.extraReducers=="function"?Dc(t.extraReducers):[t.extraReducers],h=y[0],b=h===void 0?{}:h,S=y[1],v=S===void 0?[]:S,O=y[2],P=O===void 0?void 0:O,L=Zt(Zt({},b),s);return xp(o,function(I){for(var _ in L)I.addCase(_,L[_]);for(var B=0,F=v;B<F.length;B++){var Pe=F[B];I.addMatcher(Pe.matcher,Pe.reducer)}P&&I.addDefaultCase(P)})}var p;return{name:e,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Sp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Op=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Sp[Math.random()*64|0];return e},Cp=["name","message","stack","code"],Ca=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Tc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ep=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Cp;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},r0=function(){function t(e,o,n){var i=qt(e+"/fulfilled",function(y,h,b,S){return{payload:y,meta:Sa(Zt({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),a=qt(e+"/pending",function(y,h,b){return{payload:void 0,meta:Sa(Zt({},b||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),s=qt(e+"/rejected",function(y,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Ep)(y||"Rejected"),meta:Sa(Zt({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,u=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(y):Op(),O=new u,P,L=!1;function I(B){P=B,O.abort()}var _=function(){return dp(this,null,function(){var B,F,Pe,st,Ae,lt,he;return np(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),st=(B=n?.condition)==null?void 0:B.call(n,y,{getState:b,extra:S}),Ap(st)?[4,st]:[3,2];case 1:st=m.sent(),m.label=2;case 2:if(st===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,Ae=new Promise(function(x,k){return O.signal.addEventListener("abort",function(){return k({name:"AbortError",message:P||"Aborted"})})}),h(a(v,y,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:y},{getState:b,extra:S}))),[4,Promise.race([Ae,Promise.resolve(o(y,{dispatch:h,getState:b,extra:S,requestId:v,signal:O.signal,abort:I,rejectWithValue:function(x,k){return new Ca(x,k)},fulfillWithValue:function(x,k){return new Tc(x,k)}})).then(function(x){if(x instanceof Ca)throw x;return x instanceof Tc?i(x.payload,v,y,x.meta):i(x,v,y)})])];case 3:return Pe=m.sent(),[3,5];case 4:return lt=m.sent(),Pe=lt instanceof Ca?s(null,v,y,lt.payload,lt.meta):s(lt,v,y),[3,5];case 5:return he=n&&!n.dispatchConditionRejection&&s.match(Pe)&&Pe.meta.condition,he||h(Pe),[2,Pe]}})})}();return Object.assign(_,{abort:I,requestId:v,arg:y,unwrap:function(){return _.then(wp)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function wp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ap(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Fc="listener",Mc="completed",Uc="cancelled",o0="task-"+Uc,n0="task-"+Mc,a0=Fc+"-"+Uc,i0=Fc+"-"+Mc;var wa="listenerMiddleware";var s0=qt(wa+"/add"),l0=qt(wa+"/removeAll"),c0=qt(wa+"/remove");var kc,d0=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(kc||(kc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Np=function(t){return function(e){setTimeout(e,t)}},p0=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Np(10);Sc();function Rp(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var on=class extends Rp(Object){};window.ftReduxStores||(window.ftReduxStores={});var zc=class t extends on{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(ao(a))return a;if(i==null)return;let s=Bc({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=$c({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,o){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new jo;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,s)=>{let c=a,u=i[c];return u?(...p)=>{let y=u(...p.map(n));return this.reduxStore.dispatch(y),y}:p=>{this.setState({[c]:n(p)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ln=g(R());var nn=class extends yt{async listMySearches(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var an=class extends yt{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ip="ft-user-assets",sn=ln.FtReduxStore.get({name:Ip,initialState:{savedSearches:void 0,bookmarks:void 0}}),Aa=class{constructor(){this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new an,this.savedSearchesService=new nn,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,ln.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),sn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),sn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();sn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;sn.actions.bookmarks(o)}}},Wc=new Aa;var Na=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Na;var Hc=g(R()),Ra=class{highlightHtml(e,o,n){(0,Hc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ra;var Vc=g(R());var La=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Vc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new La;var Pp=g(R());(0,Gc.customElement)("ft-app-context")(oe);var cn=class extends yt{constructor(e){super(!0,e),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([i],[a])=>i.localeCompare(a)))}async launchSearch(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,i)=>n.id.localeCompare(i.id))};return this.cache.get("search-"+this.hash(o),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(o),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(o=>o.valueFilter==null?o:{...o,valueFilter:{...o.valueFilter,values:[...o.valueFilter.values].sort((n,i)=>n.localeCompare(i))}}).sort((o,n)=>o.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Tp=t=>t.request.virtualField===_r.TITLE_ONLY&&t.request.scope===$r.DOCUMENTS,zr=class t extends Event{constructor(){super(t.eventName)}};zr.eventName="search-context-clear-all-filters";var uo=class t{static build(e,o){return new t(Rl(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new Ke.Debouncer(10),this.searchDebouncer=new Ke.Debouncer(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(i=>({id:i}))}),this.suggestDebouncer=new Ke.Debouncer(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=o??new cn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=(0,Ke.watch)(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=(0,Ke.watch)(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var o;let n=(o=this.store.getState().locales)!==null&&o!==void 0?o:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(c=>c.lang==s);a(e)||(e=a(i)?i:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(_r.TITLE_ONLY),this.store.actions.setRequestScope($r.DOCUMENTS)):(this.store.actions.setRequestVirtualField(_r.EVERYWHERE),this.store.actions.setRequestScope($r.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return Tp(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new zr)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n}get facetIds(){var e;let o=this.store.getState().request;return[...new Set([...o.facets.map(n=>n.id),...((e=o.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var o,n,i;try{if((o=this.cancelableSearch)===null||o===void 0||o.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=(0,Ke.cancelable)(this.service.launchSearch(e));let a=await this.cancelableSearch;if(a.paging.currentPage<=1)this.store.actions.results(a.results),this.store.actions.facets(a.facets),this.store.actions.spellcheck(a.spellcheck);else{let s=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(a.results);this.store.actions.results(s)}this.store.actions.paging(a.paging)}}catch(a){a instanceof Ke.CanceledPromiseError||(console.error(a),(i=this.errorHandler)===null||i===void 0||i.call(this,a))}}async fetchSuggestData(e){var o;try{(o=this.cancelableSuggest)===null||o===void 0||o.cancel(),this.cancelableSuggest=(0,Ke.cancelable)(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof Ke.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var kp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Pa=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ia=Symbol("registerInterval");function _p(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ia]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ia]):this.dispatchEvent(new Pa)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ia,kp([(0,Kc.state)()],o.prototype,"stateManager",void 0),o}var dn=class extends _p(jc.FtLitElementRedux){};function Zc(t){return t.rootNodes.map(e=>qc(e))}function qc(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(o=>qc(o,t.selected)),count:t.totalResultsCount}}var ed=g(R());var yn=g($()),mn=g(j()),gn=g(R());var Yc=g($());var Xc=Yc.css`
1963
+ `}update(e){var o,n,i,a,s;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>pr.addContext(c)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};oe.elementDefinitions={};oe.styles=Yl;Oe([(0,Me.property)()],oe.prototype,"baseUrl",void 0);Oe([(0,Me.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Oe([(0,Me.property)()],oe.prototype,"uiLocale",void 0);Oe([(0,nt.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Oe([(0,nt.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Oe([(0,Me.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Oe([(0,Me.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Oe([(0,Me.property)({type:Object})],oe.prototype,"apiProvider",void 0);Oe([(0,nt.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Oe([(0,nt.jsonProperty)(void 0)],oe.prototype,"session",void 0);Oe([(0,Me.state)()],oe.prototype,"localesConfiguration",void 0);var Lp=g(j());function Hd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Vo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Vo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Vo(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Vo(t,e){try{return Hd(t,e)}catch{return!1}}function Go(t,e){return!Vo(t,e)}var Vd=g(j(),1);var jo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var no=g(j(),1);var ec=g(j(),1);function tc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,ec.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Go,...e??{}})}var Ko=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var oc=g($(),1);var Zo=window,Gd=Zo.ShadowRoot&&(Zo.ShadyCSS===void 0||Zo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gv=Symbol();var rc=(t,e)=>{Gd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Zo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var qo=class extends oc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return rc(n,e.elementStyles),n}};var Yo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},sc,nc=Symbol("constructorPrototype"),ac=Symbol("constructorName"),lc=Symbol("exportpartsDebouncer"),ic=Symbol("dynamicDependenciesLoaded"),Ht=class extends qo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[sc]=new Ko(5),this[ac]=this.constructor.name,this[nc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ac]&&Object.setPrototypeOf(this,this[nc])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[ic]||(e[ic]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[lc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(u).map(O=>O.trim()).forEach(O=>y.add(O))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};sc=lc;Yo([(0,no.property)()],Ht.prototype,"exportpartsPrefix",void 0);Yo([tc([])],Ht.prototype,"exportpartsPrefixes",void 0);Yo([(0,no.property)()],Ht.prototype,"customStylesheet",void 0);Yo([(0,no.state)()],Ht.prototype,"useAdoptedStyleSheets",void 0);function ao(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var cc,dc,pc,io=Symbol("internalReduxEventsUnsubscribers"),Vt=Symbol("internalStoresUnsubscribers"),ur=Symbol("internalStores"),so=class extends Ht{constructor(){super(...arguments),this[cc]=new Map,this[dc]=new Map,this[pc]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ur].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ur].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[ur].get(e)}addStore(e,o){var n;o=(n=o??(ao(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[ur].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[ur].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ur].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Vt].has(e.store):this[Vt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Vt].set(e,o.subscribe(()=>this.updateFromStores())),this[io].set(e,[]),ao(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=c=>this[a](c);o.addEventListener(i.eventName,s),this[io].get(e).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Vt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Vt].has(e)&&this[Vt].get(e)(),this[Vt].delete(e),(o=this[io].get(e))===null||o===void 0||o.forEach(n=>n()),this[io].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};cc=Vt,dc=ur,pc=io;so.reduxProperties=new Map;so.reduxReactiveProperties=new Set;so.reduxEventListeners=new Map;function Qe(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function It(t){return!!t&&!!t[X]}function at(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Jd}(t)||Array.isArray(t)||!!t[bc]||!!(!((e=t.constructor)===null||e===void 0)&&e[bc])||ca(t)||da(t))}function fr(t,e,o){o===void 0&&(o=!1),Fr(t)===0?(o?Object.keys:Br)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Fr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ca(t)?2:da(t)?3:0}function Dr(t,e){return Fr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function jd(t,e){return Fr(t)===2?t.get(e):t[e]}function xc(t,e,o){var n=Fr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function vc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ca(t){return Xd&&t instanceof Map}function da(t){return Qd&&t instanceof Set}function Gt(t){return t.o||t.t}function pa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Cc(t);delete e[X];for(var o=Br(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ua(t,e){return e===void 0&&(e=!1),fa(t)||It(t)||!at(t)||(Fr(t)>1&&(t.set=t.add=t.clear=t.delete=Kd),Object.freeze(t),e&&fr(t,function(o,n){return ua(n,!0)},!0)),t}function Kd(){Qe(2)}function fa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function mt(t){var e=la[t];return e||Qe(18,t),e}function Zd(t,e){la[t]||(la[t]=e)}function aa(){return co}function ta(t,e){e&&(mt("Patches"),t.u=[],t.s=[],t.v=e)}function Xo(t){ia(t),t.p.forEach(qd),t.p=null}function ia(t){t===co&&(co=t.l)}function uc(t){return co={p:[],l:co,h:t,m:!0,_:0}}function qd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function ra(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||mt("ES5").S(e,t,n),n?(o[X].P&&(Xo(e),Qe(4)),at(t)&&(t=Qo(e,t),e.l||Jo(e,t)),e.u&&mt("Patches").M(o[X].t,t,e.u,e.s)):t=Qo(e,o,[]),Xo(e),e.u&&e.v(e.u,e.s),t!==Oc?t:void 0}function Qo(t,e,o){if(fa(e))return e;var n=e[X];if(!n)return fr(e,function(c,u){return fc(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Jo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=pa(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),fr(a,function(c,u){return fc(t,n,i,c,u,o,s)}),Jo(t,i,!1),o&&t.u&&mt("Patches").N(n,o,t.u,t.s)}return n.o}function fc(t,e,o,n,i,a,s){if(It(i)){var c=Qo(t,i,a&&e&&e.i!==3&&!Dr(e.R,n)?a.concat(n):void 0);if(xc(o,n,c),!It(c))return;t.m=!1}else s&&o.add(i);if(at(i)&&!fa(i)){if(!t.h.D&&t._<1)return;Qo(t,i),e&&e.A.l||Jo(t,i)}}function Jo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&ua(e,o)}function oa(t,e){var o=t[X];return(o?Gt(o):t)[e]}function hc(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function jt(t){t.P||(t.P=!0,t.l&&jt(t.l))}function na(t){t.o||(t.o=pa(t.t))}function sa(t,e,o){var n=ca(e)?mt("MapSet").F(e,o):da(e)?mt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:aa(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},u=c,p=po;s&&(u=[c],p=lo);var y=Proxy.revocable(u,p),h=y.revoke,b=y.proxy;return c.k=b,c.j=h,b}(e,o):mt("ES5").J(e,o);return(o?o.A:aa()).p.push(n),n}function Yd(t){return It(t)||Qe(22,t),function e(o){if(!at(o))return o;var n,i=o[X],a=Fr(o);if(i){if(!i.P&&(i.i<4||!mt("ES5").K(i)))return i.t;i.I=!0,n=yc(o,a),i.I=!1}else n=yc(o,a);return fr(n,function(s,c){i&&jd(i.t,s)===c||xc(n,s,e(c))}),a===3?new Set(n):n}(t)}function yc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return pa(t)}function Sc(){function t(s,c){var u=a[s];return u?u.enumerable=c:a[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[X];return po.get(p,s)},set:function(p){var y=this[X];po.set(y,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][X];if(!u.P)switch(u.i){case 5:n(u)&&jt(u);break;case 4:o(u)&&jt(u)}}}function o(s){for(var c=s.t,u=s.k,p=Br(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==X){var b=c[h];if(b===void 0&&!Dr(c,h))return!0;var S=u[h],v=S&&S[X];if(v?v.t!==b:!vc(S,b))return!0}}var O=!!c[X];return p.length!==Br(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&Qe(3,JSON.stringify(Gt(s)))}var a={};Zd("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Cc(b);delete O[X];for(var P=Br(O),L=0;L<P.length;L++){var I=P[L];O[I]=t(I,h||!!O[I].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(u,s),y={i:u?5:4,A:c?c.A:aa(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,X,{value:y,writable:!0}),p},S:function(s,c,u){u?It(c)&&c[X].A===s&&e(s.p):(s.u&&function p(y){if(y&&typeof y=="object"){var h=y[X];if(h){var b=h.t,S=h.k,v=h.R,O=h.i;if(O===4)fr(S,function(B){B!==X&&(b[B]!==void 0||Dr(b,B)?v[B]||p(S[B]):(v[B]=!0,jt(h)))}),fr(b,function(B){S[B]!==void 0||Dr(S,B)||(v[B]=!1,jt(h))});else if(O===5){if(n(h)&&(jt(h),v.length=!0),S.length<b.length)for(var P=S.length;P<b.length;P++)v[P]=!1;else for(var L=b.length;L<S.length;L++)v[L]=!0;for(var I=Math.min(S.length,b.length),_=0;_<I;_++)S.hasOwnProperty(_)||(v[_]=!0),v[_]===void 0&&p(S[_])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var mc,co,ha=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xd=typeof Map<"u",Qd=typeof Set<"u",gc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Oc=ha?Symbol.for("immer-nothing"):((mc={})["immer-nothing"]=!0,mc),bc=ha?Symbol.for("immer-draftable"):"__$immer_draftable",X=ha?Symbol.for("immer-state"):"__$immer_state";var Jd=""+Object.prototype.constructor,Br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Cc=Object.getOwnPropertyDescriptors||function(t){var e={};return Br(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},la={},po={get:function(t,e){if(e===X)return t;var o=Gt(t);if(!Dr(o,e))return function(i,a,s){var c,u=hc(a,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!at(n)?n:n===oa(t.t,e)?(na(t),t.o[e]=sa(t.A.h,n,t)):n},has:function(t,e){return e in Gt(t)},ownKeys:function(t){return Reflect.ownKeys(Gt(t))},set:function(t,e,o){var n=hc(Gt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=oa(Gt(t),e),a=i?.[X];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(vc(o,i)&&(o!==void 0||Dr(t.t,e)))return!0;na(t),jt(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return oa(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,na(t),jt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Gt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Qe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Qe(12)}},lo={};fr(po,function(t,e){lo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),lo.deleteProperty=function(t,e){return lo.set.call(this,t,e,void 0)},lo.set=function(t,e,o){return po.set.call(this,t[0],e,o,t[0])};var ep=function(){function t(o){var n=this;this.O=gc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var u=n;return function(O){var P=this;O===void 0&&(O=c);for(var L=arguments.length,I=Array(L>1?L-1:0),_=1;_<L;_++)I[_-1]=arguments[_];return u.produce(O,function(B){var F;return(F=a).call.apply(F,[P,B].concat(I))})}}var p;if(typeof a!="function"&&Qe(6),s!==void 0&&typeof s!="function"&&Qe(7),at(i)){var y=uc(n),h=sa(n,i,void 0),b=!0;try{p=a(h),b=!1}finally{b?Xo(y):ia(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(O){return ta(y,s),ra(O,y)},function(O){throw Xo(y),O}):(ta(y,s),ra(p,y))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Oc&&(p=void 0),n.D&&ua(p,!0),s){var S=[],v=[];mt("Patches").M(i,p,S,v),s(S,v)}return p}Qe(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),b=1;b<y;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return i.apply(void 0,[S].concat(h))})};var s,c,u=n.produce(i,a,function(p,y){s=p,c=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){at(o)||Qe(8),It(o)&&(o=Yd(o));var n=uc(this),i=sa(this,o,void 0);return i[X].C=!0,ia(n),i},e.finishDraft=function(o,n){var i=o&&o[X],a=i.A;return ta(a,n),ra(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!gc&&Qe(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=mt("Patches").$;return It(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),je=new ep,tp=je.produce,Lv=je.produceWithPatches.bind(je),Iv=je.setAutoFreeze.bind(je),Pv=je.setUseProxies.bind(je),Tv=je.applyPatches.bind(je),kv=je.createDraft.bind(je),_v=je.finishDraft.bind(je),en=tp;function Kt(t){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(t)}function ya(t,e){if(Kt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Kt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ma(t){var e=ya(t,"string");return Kt(e)==="symbol"?e:String(e)}function ga(t,e,o){return e=ma(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Ec(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function tn(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Ec(Object(o),!0).forEach(function(n){ga(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ec(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ce(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var wc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ba=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+ba(),REPLACE:"@@redux/REPLACE"+ba(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ba()}};function rp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xa(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ce(1));return o(xa)(t,e)}if(typeof t!="function")throw new Error(Ce(2));var i=t,a=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function y(){if(u)throw new Error(Ce(3));return a}function h(O){if(typeof O!="function")throw new Error(Ce(4));if(u)throw new Error(Ce(5));var P=!0;return p(),c.push(O),function(){if(P){if(u)throw new Error(Ce(6));P=!1,p();var I=c.indexOf(O);c.splice(I,1),s=null}}}function b(O){if(!rp(O))throw new Error(Ce(7));if(typeof O.type>"u")throw new Error(Ce(8));if(u)throw new Error(Ce(9));try{u=!0,a=i(a,O)}finally{u=!1}for(var P=s=c,L=0;L<P.length;L++){var I=P[L];I()}return O}function S(O){if(typeof O!="function")throw new Error(Ce(10));i=O,b({type:rn.REPLACE})}function v(){var O,P=h;return O={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ce(11));function _(){I.next&&I.next(y())}_();var B=P(_);return{unsubscribe:B}}},O[wc]=function(){return this},O}return b({type:rn.INIT}),n={dispatch:b,subscribe:h,getState:y,replaceReducer:S},n[wc]=v,n}function op(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:rn.INIT});if(typeof n>"u")throw new Error(Ce(12));if(typeof o(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function Ac(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{op(o)}catch(u){c=u}return function(p,y){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<a.length;v++){var O=a[v],P=o[O],L=p[O],I=P(L,y);if(typeof I>"u"){var _=y&&y.type;throw new Error(Ce(14))}S[O]=I,b=b||I!==L}return b=b||a.length!==Object.keys(p).length,b?S:p}}function Mr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Nc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ce(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return a=Mr.apply(void 0,c)(i.dispatch),tn(tn({},i),{},{dispatch:a})}}}function Rc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Lc=Rc();Lc.withExtraArgument=Rc;var va=Lc;var _c=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),np=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(y){p=[6,y],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ur=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},ap=Object.defineProperty,ip=Object.defineProperties,sp=Object.getOwnPropertyDescriptors,Ic=Object.getOwnPropertySymbols,lp=Object.prototype.hasOwnProperty,cp=Object.prototype.propertyIsEnumerable,Pc=function(t,e,o){return e in t?ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Zt=function(t,e){for(var o in e||(e={}))lp.call(e,o)&&Pc(t,o,e[o]);if(Ic)for(var n=0,i=Ic(e);n<i.length;n++){var o=i[n];cp.call(e,o)&&Pc(t,o,e[o])}return t},Sa=function(t,e){return ip(t,sp(e))},dp=function(t,e,o){return new Promise(function(n,i){var a=function(u){try{c(o.next(u))}catch(p){i(p)}},s=function(u){try{c(o.throw(u))}catch(p){i(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(a,s)};c((o=o.apply(t,e)).next())})};var pp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mr:Mr.apply(null,arguments)},Qv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function up(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var fp=function(t){_c(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array),hp=function(t){_c(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Ur([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],o.concat(this))))},e}(Array);function Ea(t){return at(t)?en(t,function(){}):t}function yp(t){return typeof t=="boolean"}function mp(){return function(e){return gp(e)}}function gp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new fp;if(o&&(yp(o)?c.push(va):c.push(va.withExtraArgument(o.extraArgument))),0){if(i)var u;if(s)var p}return c}var Oa=!0;function $c(t){var e=mp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(up(i))S=Ac(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!Oa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Oa&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Nc.apply(void 0,v),P=Mr;u&&(P=pp(Zt({trace:!Oa},typeof u=="object"&&u)));var L=new hp(O),I=L;Array.isArray(b)?I=Ur([O],b):typeof b=="function"&&(I=b(L));var _=P.apply(void 0,I);return xa(S,y,_)}function qt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Zt(Zt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Dc(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function bp(t){return typeof t=="function"}function xp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Dc(e):[e,o,n],a=i[0],s=i[1],c=i[2],u;if(bp(t))u=function(){return Ea(t())};else{var p=Ea(t);u=function(){return p}}function y(h,b){h===void 0&&(h=u());var S=Ur([a[b.type]],s.filter(function(v){var O=v.matcher;return O(b)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(It(v)){var P=v,L=O(P,b);return L===void 0?v:L}else{if(at(v))return en(v,function(I){return O(I,b)});var L=O(v,b);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return y.getInitialState=u,y}function vp(t,e){return t+"/"+e}function Bc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Ea(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(y){var h=n[y],b=vp(e,y),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,a[y]=S,s[b]=S,c[y]=v?qt(b,v):qt(b)});function u(){var y=typeof t.extraReducers=="function"?Dc(t.extraReducers):[t.extraReducers],h=y[0],b=h===void 0?{}:h,S=y[1],v=S===void 0?[]:S,O=y[2],P=O===void 0?void 0:O,L=Zt(Zt({},b),s);return xp(o,function(I){for(var _ in L)I.addCase(_,L[_]);for(var B=0,F=v;B<F.length;B++){var Pe=F[B];I.addMatcher(Pe.matcher,Pe.reducer)}P&&I.addDefaultCase(P)})}var p;return{name:e,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Sp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Op=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Sp[Math.random()*64|0];return e},Cp=["name","message","stack","code"],Ca=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Tc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ep=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Cp;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},r0=function(){function t(e,o,n){var i=qt(e+"/fulfilled",function(y,h,b,S){return{payload:y,meta:Sa(Zt({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),a=qt(e+"/pending",function(y,h,b){return{payload:void 0,meta:Sa(Zt({},b||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),s=qt(e+"/rejected",function(y,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Ep)(y||"Rejected"),meta:Sa(Zt({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,u=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(y):Op(),O=new u,P,L=!1;function I(B){P=B,O.abort()}var _=function(){return dp(this,null,function(){var B,F,Pe,st,Ae,lt,he;return np(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),st=(B=n?.condition)==null?void 0:B.call(n,y,{getState:b,extra:S}),Ap(st)?[4,st]:[3,2];case 1:st=m.sent(),m.label=2;case 2:if(st===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,Ae=new Promise(function(x,k){return O.signal.addEventListener("abort",function(){return k({name:"AbortError",message:P||"Aborted"})})}),h(a(v,y,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:y},{getState:b,extra:S}))),[4,Promise.race([Ae,Promise.resolve(o(y,{dispatch:h,getState:b,extra:S,requestId:v,signal:O.signal,abort:I,rejectWithValue:function(x,k){return new Ca(x,k)},fulfillWithValue:function(x,k){return new Tc(x,k)}})).then(function(x){if(x instanceof Ca)throw x;return x instanceof Tc?i(x.payload,v,y,x.meta):i(x,v,y)})])];case 3:return Pe=m.sent(),[3,5];case 4:return lt=m.sent(),Pe=lt instanceof Ca?s(null,v,y,lt.payload,lt.meta):s(lt,v,y),[3,5];case 5:return he=n&&!n.dispatchConditionRejection&&s.match(Pe)&&Pe.meta.condition,he||h(Pe),[2,Pe]}})})}();return Object.assign(_,{abort:I,requestId:v,arg:y,unwrap:function(){return _.then(wp)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function wp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ap(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Fc="listener",Mc="completed",Uc="cancelled",o0="task-"+Uc,n0="task-"+Mc,a0=Fc+"-"+Uc,i0=Fc+"-"+Mc;var wa="listenerMiddleware";var s0=qt(wa+"/add"),l0=qt(wa+"/removeAll"),c0=qt(wa+"/remove");var kc,d0=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(kc||(kc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Np=function(t){return function(e){setTimeout(e,t)}},p0=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Np(10);Sc();function Rp(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var on=class extends Rp(Object){};window.ftReduxStores||(window.ftReduxStores={});var zc=class t extends on{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(ao(a))return a;if(i==null)return;let s=Bc({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=$c({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[i.name]=new t(s,c)}constructor(e,o){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new jo;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,s)=>{let c=a,u=i[c];return u?(...p)=>{let y=u(...p.map(n));return this.reduxStore.dispatch(y),y}:p=>{this.setState({[c]:n(p)})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ln=g(R());var nn=class extends yt{async listMySearches(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var an=class extends yt{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ip="ft-user-assets",sn=ln.FtReduxStore.get({name:Ip,initialState:{savedSearches:void 0,bookmarks:void 0}}),Aa=class{constructor(){this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new an,this.savedSearchesService=new nn,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,ln.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),sn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),sn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();sn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;sn.actions.bookmarks(o)}}},Wc=new Aa;var Na=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Na;var Hc=g(R()),Ra=class{highlightHtml(e,o,n){(0,Hc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Ra;var Vc=g(R());var La=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Vc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new La;var Pp=g(R());(0,Gc.customElement)("ft-app-context")(oe);var cn=class extends yt{constructor(e){super(!0,e),this.sortObjectFields=(o,n)=>typeof n!="object"||n==null||Array.isArray(n)?n:Object.fromEntries(Object.entries(n).sort(([i],[a])=>i.localeCompare(a)))}async launchSearch(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((n,i)=>n.id.localeCompare(i.id))};return this.cache.get("search-"+this.hash(o),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let o={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(o),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}sortFilters(e){return e.map(o=>o.valueFilter==null?o:{...o,valueFilter:{...o.valueFilter,values:[...o.valueFilter.values].sort((n,i)=>n.localeCompare(i))}}).sort((o,n)=>o.key.localeCompare(n.key))}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Tp=t=>t.request.virtualField===_r.TITLE_ONLY&&t.request.scope===$r.DOCUMENTS,zr=class t extends Event{constructor(){super(t.eventName)}};zr.eventName="search-context-clear-all-filters";var uo=class t{static build(e,o){return new t(Rl(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new Ke.Debouncer(10),this.searchDebouncer=new Ke.Debouncer(100),this.launchSearch=n=>this.searchDebouncer.run(()=>this.fetchSearchData(n??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=n=>({...n.request,facets:this.facetIds.map(i=>({id:i}))}),this.suggestDebouncer=new Ke.Debouncer(300),this.launchSuggest=n=>this.suggestDebouncer.run(()=>this.fetchSuggestData(n??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=n=>({input:n.liveQuery,metadataFilters:n.request.metadataFilters,sort:n.request.sort,contentLocale:n.request.contentLocale,scope:n.request.scope}),this.service=o??new cn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=(0,Ke.watch)(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=(0,Ke.watch)(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var o;let n=(o=this.store.getState().locales)!==null&&o!==void 0?o:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(c=>c.lang==s);a(e)||(e=a(i)?i:n[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(_r.TITLE_ONLY),this.store.actions.setRequestScope($r.DOCUMENTS)):(this.store.actions.setRequestVirtualField(_r.EVERYWHERE),this.store.actions.setRequestScope($r.DEFAULT))}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return Tp(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new zr)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n}get facetIds(){var e;let o=this.store.getState().request;return[...new Set([...o.facets.map(n=>n.id),...((e=o.metadataFilters)!==null&&e!==void 0?e:[]).map(n=>n.key)])]}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){this.setValueFilter(e,o)}setValueFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:o,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,o){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:o}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.dateFilter),...o.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,o,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:o,to:n}},s=[...i.filter(c=>!c.rangeFilter),...i.filter(c=>c.rangeFilter&&c.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let o=this.store.getState().request.metadataFilters,n=[...o.filter(i=>!i.rangeFilter),...o.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var o,n,i;try{if((o=this.cancelableSearch)===null||o===void 0||o.cancel(),this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=(0,Ke.cancelable)(this.service.launchSearch(e));let a=await this.cancelableSearch;if(a.paging.currentPage<=1)this.store.actions.results(a.results),this.store.actions.facets(a.facets),this.store.actions.spellcheck(a.spellcheck);else{let s=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(a.results);this.store.actions.results(s)}this.store.actions.paging(a.paging)}}catch(a){a instanceof Ke.CanceledPromiseError||(console.error(a),(i=this.errorHandler)===null||i===void 0||i.call(this,a))}}async fetchSuggestData(e){var o;try{(o=this.cancelableSuggest)===null||o===void 0||o.cancel(),this.cancelableSuggest=(0,Ke.cancelable)(this.service.launchSuggest(e));let n=await this.cancelableSuggest;this.store.actions.suggestResults(n.suggestions)}catch(n){!(n instanceof Ke.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}};var kp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Pa=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ia=Symbol("registerInterval");function _p(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ia]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ia]):this.dispatchEvent(new Pa)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ia,kp([(0,Kc.state)()],o.prototype,"stateManager",void 0),o}var dn=class extends _p(jc.FtLitElementRedux){};function Zc(t){return t.rootNodes.map(e=>qc(e))}function qc(t,e=!1){return{label:t.label,value:t.value,selected:t.selected&&!e,subOptions:t.childNodes.map(o=>qc(o,t.selected)),count:t.totalResultsCount}}var ed=g(R());var yn=g($()),mn=g(j()),gn=g(R());var Yc=g($());var Xc=Yc.css`
1964
1964
  `;var fn=g(R());var Jc=g(j()),$p=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Ta=Symbol("i18nAttributes"),ka=Symbol("i18nListAttributes"),pn=Symbol("i18nProperties"),_a=Symbol("i18nManualContexts"),fo=Symbol("i18nUnsubs");function hn(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}get i18nService(){return this.useCustomMessageContexts?Ql:pr}i18n(a,s,...c){var u;if(typeof a=="string")return this.i18nService.resolveMessage(a,s,...c);let p=(u=a.args)!==null&&u!==void 0?u:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...p)}onI18nUpdate(a){var s,c,u;(s=this[Ta])===null||s===void 0||s.forEach((p,y)=>{let h=this.getI18nAttributeValue(y);h&&(this[y]=this.getI18nAttributeMessage(h,p,a))}),(c=this[ka])===null||c===void 0||c.forEach((p,y)=>{let h=this.getI18nListAttributeValues(y);this[y]=h?.map(b=>this.getI18nAttributeMessage(b,p,a))}),(u=this[pn])===null||u===void 0||u.forEach((p,y)=>{p.context.toLowerCase()===a.toLowerCase()&&(this[y]=this.i18n(p))}),setTimeout(()=>this.requestUpdate(),0)}buildI18nAttributeMessage(a,s){return{...a,message:this.i18n({context:a.context,key:a.key,...s})}}getI18nAttributeMessage(a,s,c){var u;let p=!c||((u=a.context)===null||u===void 0?void 0:u.toLowerCase())===c.toLowerCase();return a.context&&a.key&&p?this.buildI18nAttributeMessage(a,s):a}update(a){var s,c,u;super.update(a),(s=this[Ta])===null||s===void 0||s.forEach((p,y)=>{let h=this.getI18nAttributeValue(y);h?.context&&h.key&&(a.has(y)||p.argsProvider!=null)&&(this.addI18nContextIfNeeded(h,a,y),this[y]=this.getI18nAttributeMessage(h,p))}),(c=this[ka])===null||c===void 0||c.forEach((p,y)=>{let h=this.getI18nListAttributeValues(y);(a.has(y)||p.argsProvider!=null)&&(this[y]=h?.map(b=>(this.addI18nContextIfNeeded(b,a,y),this.getI18nAttributeMessage(b,p))))}),(u=this[pn])===null||u===void 0||u.forEach((p,y)=>{p.argsProvider!=null&&(this[y]=this.i18n(p))})}getI18nAttributeValue(a){return this[a]}getI18nListAttributeValues(a){return this[a]}addI18nContextIfNeeded(a,s,c){a.context&&a.key&&s.has(c)&&this.addI18nContext(a.context)}addI18nMessagesAndSubscribe(a,s){a=a.toLowerCase(),this[fo].has(a)||this[fo].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,s??{}),this.onI18nUpdate(a)}connectedCallback(){var a,s,c,u,p,y;super.connectedCallback(),new Set([...(s=(a=this[pn])===null||a===void 0?void 0:a.values())!==null&&s!==void 0?s:[],...[...(u=(c=this[Ta])===null||c===void 0?void 0:c.keys())!==null&&u!==void 0?u:[]].map(h=>this.getI18nAttributeValue(h)),...[...(y=(p=this[ka])===null||p===void 0?void 0:p.keys())!==null&&y!==void 0?y:[]].flatMap(h=>this.getI18nListAttributeValues(h))].map(h=>h?.context)).forEach(h=>h&&this.addI18nMessages(h)),this[_a].forEach((h,b)=>{this.addI18nMessages(b,h)})}addI18nMessages(a,s){this[_a].set(a,s??{}),this.addI18nMessagesAndSubscribe(a,s)}addI18nContext(a,s){this.addI18nMessages(typeof a=="string"?a:a.name,s)}disconnectedCallback(){super.disconnectedCallback(),this[fo].forEach(a=>a()),this[fo].clear()}}return e=_a,o=fo,$p([(0,Jc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Qc=class extends hn(fn.FtLitElement){},un=class extends hn(fn.FtLitElementRedux){};var ho=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},it=class extends un{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":yn.nothing:yn.html`
1965
1965
  <span class="ft-i18n">
1966
1966
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}