@fluid-topics/ft-search-selected-facets 1.2.19 → 1.2.20
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.
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
`;var ws=m(R()),As=m(G());var yt=m(R());var No=m(R()),zd={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,No.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:[]}},la=t=>No.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:zd});var Wd=m(da(),1);var pa;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(pa||(pa={}));var fa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(fa||(fa={}));var ua;(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"})(ua||(ua={}));var ha;(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"})(ha||(ha={}));var ya;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ya||(ya={}));var ma;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(ma||(ma={}));var ga;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(ga||(ga={}));var ba;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ba||(ba={}));var xa;(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"})(xa||(xa={}));var va;(function(t){t.ASC="ASC",t.DESC="DESC"})(va||(va={}));var Sa;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Sa||(Sa={}));var Ar;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ar||(Ar={}));var Oa;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Oa||(Oa={}));var Ca;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ca||(Ca={}));var Ea;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ea||(Ea={}));var To;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(To||(To={}));var wa;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(wa||(wa={}));var Rr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Rr||(Rr={}));var ue;(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.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"})(ue||(ue={}));var Aa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Aa||(Aa={}));var Ra;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ra||(Ra={}));var Cf={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN],[ue.DEVELOPER]:[ue.BETA_USER,ue.DEBUG_USER]};var Es=m(R());var Pa=m(_()),ke=m(G()),et=m(R());var Na=m(_());var La=Na.css`
|
|
13
13
|
`;var Po=m(R()),Hd="ft-app-info",Dn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Vd={session:(t,e)=>{(0,Po.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new Dn(e.payload)),0))}},P=Po.FtReduxStore.get({name:Hd,reducers:Vd,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 $t=m(R());var Bn=m(R());var ir=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.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=P.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var ut=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 Bn.CacheRegistry,this.cache=e?i.commonCache:new Bn.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ir.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ir.await()}clearCache(){this.cache.clearAll()}};var Ia,Gd=Symbol("clearAfterUnitTest"),ko=class extends ut{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ia]=()=>{this.defaultMessages={},this.cache=new $t.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.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,$t.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 $t.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,$t.delay)(0).then(()=>o()).catch(()=>null)))}};Ia=Gd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ko{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ko{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ar=window.FluidTopicsI18nService,Ta=window.FluidTopicsCustomI18nService;var Ce=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 et.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=()=>ir.get(),this.messageContexts=[],this.cache=new et.CacheRegistry,this.cleanSessionDebouncer=new et.Debouncer}render(){return Pa.html`
|
|
14
14
|
<slot></slot>
|
|
15
|
-
`}update(e){var o,n,i,a,s;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>ar.addContext(c)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.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=La;Ce([(0,ke.property)()],oe.prototype,"baseUrl",void 0);Ce([(0,ke.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ce([(0,ke.property)()],oe.prototype,"uiLocale",void 0);Ce([(0,et.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ce([(0,et.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ce([(0,ke.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ce([(0,ke.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ce([(0,et.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ce([(0,et.jsonProperty)(void 0)],oe.prototype,"session",void 0);Ce([(0,ke.state)()],oe.prototype,"localesConfiguration",void 0);var Pp=m(G());function jd(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(!_o(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(!_o(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(!_o(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function _o(t,e){try{return jd(t,e)}catch{return!1}}function Fn(t,e){return!_o(t,e)}var Kd=m(G(),1);var $o=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 Qr=m(G(),1);var ka=m(G(),1);function _a(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,ka.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:Fn,...e??{}})}var Do=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 Da=m(_(),1);var Bo=window,Zd=Bo.ShadowRoot&&(Bo.ShadyCSS===void 0||Bo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ru=Symbol();var $a=(t,e)=>{Zd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Bo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var Fo=class extends Da.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 $a(n,e.elementStyles),n}};var Mo=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},Ua,Ba=Symbol("constructorPrototype"),Fa=Symbol("constructorName"),za=Symbol("exportpartsDebouncer"),Ma=Symbol("dynamicDependenciesLoaded"),Dt=class extends Fo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ua]=new Do(5),this[Fa]=this.constructor.name,this[Ba]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Fa]&&Object.setPrototypeOf(this,this[Ba])}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[Ma]||(e[Ma]=!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[za].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 p=b=>b!=null&&b.trim().length>0,f=e.filter(p).map(b=>b.trim());if(f.length===0){this.removeAttribute("exportparts");return}let h=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(p).map(O=>O.trim()).forEach(O=>h.add(O))}if(h.size===0){this.removeAttribute("exportparts");return}let g=[...h.values()].flatMap(b=>f.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};Ua=za;Mo([(0,Qr.property)()],Dt.prototype,"exportpartsPrefix",void 0);Mo([_a([])],Dt.prototype,"exportpartsPrefixes",void 0);Mo([(0,Qr.property)()],Dt.prototype,"customStylesheet",void 0);Mo([(0,Qr.state)()],Dt.prototype,"useAdoptedStyleSheets",void 0);function Jr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Wa,Ha,Va,eo=Symbol("internalReduxEventsUnsubscribers"),Bt=Symbol("internalStoresUnsubscribers"),sr=Symbol("internalStores"),to=class extends Dt{constructor(){super(...arguments),this[Wa]=new Map,this[Ha]=new Map,this[Va]=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[sr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[sr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[sr].get(e)}addStore(e,o){var n;o=(n=o??(Jr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[sr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[sr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[sr].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[Bt].has(e.store):this[Bt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Bt].set(e,o.subscribe(()=>this.updateFromStores())),this[eo].set(e,[]),Jr(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[eo].get(e).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Bt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Bt].has(e)&&this[Bt].get(e)(),this[Bt].delete(e),(o=this[eo].get(e))===null||o===void 0||o.forEach(n=>n()),this[eo].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Wa=Bt,Ha=sr,Va=eo;to.reduxProperties=new Map;to.reduxReactiveProperties=new Set;to.reduxEventListeners=new Map;function Ze(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 St(t){return!!t&&!!t[X]}function tt(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)===rp}(t)||Array.isArray(t)||!!t[Xa]||!!(!((e=t.constructor)===null||e===void 0)&&e[Xa])||Kn(t)||Zn(t))}function lr(t,e,o){o===void 0&&(o=!1),Ir(t)===0?(o?Object.keys:Lr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ir(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Kn(t)?2:Zn(t)?3:0}function Nr(t,e){return Ir(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function qd(t,e){return Ir(t)===2?t.get(e):t[e]}function Qa(t,e,o){var n=Ir(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ja(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Kn(t){return ep&&t instanceof Map}function Zn(t){return tp&&t instanceof Set}function Ft(t){return t.o||t.t}function qn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=rs(t);delete e[X];for(var o=Lr(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 Yn(t,e){return e===void 0&&(e=!1),Xn(t)||St(t)||!tt(t)||(Ir(t)>1&&(t.set=t.add=t.clear=t.delete=Yd),Object.freeze(t),e&&lr(t,function(o,n){return Yn(n,!0)},!0)),t}function Yd(){Ze(2)}function Xn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ht(t){var e=jn[t];return e||Ze(18,t),e}function Xd(t,e){jn[t]||(jn[t]=e)}function Hn(){return oo}function Mn(t,e){e&&(ht("Patches"),t.u=[],t.s=[],t.v=e)}function Uo(t){Vn(t),t.p.forEach(Qd),t.p=null}function Vn(t){t===oo&&(oo=t.l)}function Ga(t){return oo={p:[],l:oo,h:t,m:!0,_:0}}function Qd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Un(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||ht("ES5").S(e,t,n),n?(o[X].P&&(Uo(e),Ze(4)),tt(t)&&(t=zo(e,t),e.l||Wo(e,t)),e.u&&ht("Patches").M(o[X].t,t,e.u,e.s)):t=zo(e,o,[]),Uo(e),e.u&&e.v(e.u,e.s),t!==ts?t:void 0}function zo(t,e,o){if(Xn(e))return e;var n=e[X];if(!n)return lr(e,function(c,p){return ja(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Wo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=qn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),lr(a,function(c,p){return ja(t,n,i,c,p,o,s)}),Wo(t,i,!1),o&&t.u&&ht("Patches").N(n,o,t.u,t.s)}return n.o}function ja(t,e,o,n,i,a,s){if(St(i)){var c=zo(t,i,a&&e&&e.i!==3&&!Nr(e.R,n)?a.concat(n):void 0);if(Qa(o,n,c),!St(c))return;t.m=!1}else s&&o.add(i);if(tt(i)&&!Xn(i)){if(!t.h.D&&t._<1)return;zo(t,i),e&&e.A.l||Wo(t,i)}}function Wo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Yn(e,o)}function zn(t,e){var o=t[X];return(o?Ft(o):t)[e]}function Ka(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 Mt(t){t.P||(t.P=!0,t.l&&Mt(t.l))}function Wn(t){t.o||(t.o=qn(t.t))}function Gn(t,e,o){var n=Kn(e)?ht("MapSet").F(e,o):Zn(e)?ht("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:Hn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=no;s&&(p=[c],f=ro);var h=Proxy.revocable(p,f),g=h.revoke,b=h.proxy;return c.k=b,c.j=g,b}(e,o):ht("ES5").J(e,o);return(o?o.A:Hn()).p.push(n),n}function Jd(t){return St(t)||Ze(22,t),function e(o){if(!tt(o))return o;var n,i=o[X],a=Ir(o);if(i){if(!i.P&&(i.i<4||!ht("ES5").K(i)))return i.t;i.I=!0,n=Za(o,a),i.I=!1}else n=Za(o,a);return lr(n,function(s,c){i&&qd(i.t,s)===c||Qa(n,s,e(c))}),a===3?new Set(n):n}(t)}function Za(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return qn(t)}function es(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var f=this[X];return no.get(f,s)},set:function(f){var h=this[X];no.set(h,s,f)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][X];if(!p.P)switch(p.i){case 5:n(p)&&Mt(p);break;case 4:o(p)&&Mt(p)}}}function o(s){for(var c=s.t,p=s.k,f=Lr(p),h=f.length-1;h>=0;h--){var g=f[h];if(g!==X){var b=c[g];if(b===void 0&&!Nr(c,g))return!0;var S=p[g],v=S&&S[X];if(v?v.t!==b:!Ja(S,b))return!0}}var O=!!c[X];return f.length!==Lr(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Ze(3,JSON.stringify(Ft(s)))}var a={};Xd("ES5",{J:function(s,c){var p=Array.isArray(s),f=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=rs(b);delete O[X];for(var T=Lr(O),L=0;L<T.length;L++){var I=T[L];O[I]=t(I,g||!!O[I].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(p,s),h={i:p?5:4,A:c?c.A:Hn(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,X,{value:h,writable:!0}),f},S:function(s,c,p){p?St(c)&&c[X].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var g=h[X];if(g){var b=g.t,S=g.k,v=g.R,O=g.i;if(O===4)lr(S,function(F){F!==X&&(b[F]!==void 0||Nr(b,F)?v[F]||f(S[F]):(v[F]=!0,Mt(g)))}),lr(b,function(F){S[F]!==void 0||Nr(S,F)||(v[F]=!1,Mt(g))});else if(O===5){if(n(g)&&(Mt(g),v.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)v[T]=!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&&f(S[$])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var qa,oo,Qn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ep=typeof Map<"u",tp=typeof Set<"u",Ya=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ts=Qn?Symbol.for("immer-nothing"):((qa={})["immer-nothing"]=!0,qa),Xa=Qn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Qn?Symbol.for("immer-state"):"__$immer_state";var rp=""+Object.prototype.constructor,Lr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,rs=Object.getOwnPropertyDescriptors||function(t){var e={};return Lr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},jn={},no={get:function(t,e){if(e===X)return t;var o=Ft(t);if(!Nr(o,e))return function(i,a,s){var c,p=Ka(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!tt(n)?n:n===zn(t.t,e)?(Wn(t),t.o[e]=Gn(t.A.h,n,t)):n},has:function(t,e){return e in Ft(t)},ownKeys:function(t){return Reflect.ownKeys(Ft(t))},set:function(t,e,o){var n=Ka(Ft(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=zn(Ft(t),e),a=i?.[X];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ja(o,i)&&(o!==void 0||Nr(t.t,e)))return!0;Wn(t),Mt(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 zn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Wn(t),Mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Ft(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ze(12)}},ro={};lr(no,function(t,e){ro[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ro.deleteProperty=function(t,e){return ro.set.call(this,t,e,void 0)},ro.set=function(t,e,o){return no.set.call(this,t[0],e,o,t[0])};var op=function(){function t(o){var n=this;this.O=Ya,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(O){var T=this;O===void 0&&(O=c);for(var L=arguments.length,I=Array(L>1?L-1:0),$=1;$<L;$++)I[$-1]=arguments[$];return p.produce(O,function(F){var U;return(U=a).call.apply(U,[T,F].concat(I))})}}var f;if(typeof a!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),tt(i)){var h=Ga(n),g=Gn(n,i,void 0),b=!0;try{f=a(g),b=!1}finally{b?Uo(h):Vn(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(O){return Mn(h,s),Un(O,h)},function(O){throw Uo(h),O}):(Mn(h,s),Un(f,h))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===ts&&(f=void 0),n.D&&Yn(f,!0),s){var S=[],v=[];ht("Patches").M(i,f,S,v),s(S,v)}return f}Ze(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var h=arguments.length,g=Array(h>1?h-1:0),b=1;b<h;b++)g[b-1]=arguments[b];return n.produceWithPatches(f,function(S){return i.apply(void 0,[S].concat(g))})};var s,c,p=n.produce(i,a,function(f,h){s=f,c=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,c]}):[p,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){tt(o)||Ze(8),St(o)&&(o=Jd(o));var n=Ga(this),i=Gn(this,o,void 0);return i[X].C=!0,Vn(n),i},e.finishDraft=function(o,n){var i=o&&o[X],a=i.A;return Mn(a,n),Un(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ya&&Ze(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=ht("Patches").$;return St(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),ze=new op,np=ze.produce,hu=ze.produceWithPatches.bind(ze),yu=ze.setAutoFreeze.bind(ze),mu=ze.setUseProxies.bind(ze),gu=ze.applyPatches.bind(ze),bu=ze.createDraft.bind(ze),xu=ze.finishDraft.bind(ze),Ho=np;function Ut(t){"@babel/helpers - typeof";return Ut=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},Ut(t)}function Jn(t,e){if(Ut(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Ut(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ei(t){var e=Jn(t,"string");return Ut(e)==="symbol"?e:String(e)}function ti(t,e,o){return e=ei(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function os(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 Vo(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?os(Object(o),!0).forEach(function(n){ti(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):os(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ee(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 ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ri=function(){return Math.random().toString(36).substring(7).split("").join(".")},Go={INIT:"@@redux/INIT"+ri(),REPLACE:"@@redux/REPLACE"+ri(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ri()}};function ip(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 oi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ee(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ee(1));return o(oi)(t,e)}if(typeof t!="function")throw new Error(Ee(2));var i=t,a=e,s=[],c=s,p=!1;function f(){c===s&&(c=s.slice())}function h(){if(p)throw new Error(Ee(3));return a}function g(O){if(typeof O!="function")throw new Error(Ee(4));if(p)throw new Error(Ee(5));var T=!0;return f(),c.push(O),function(){if(T){if(p)throw new Error(Ee(6));T=!1,f();var I=c.indexOf(O);c.splice(I,1),s=null}}}function b(O){if(!ip(O))throw new Error(Ee(7));if(typeof O.type>"u")throw new Error(Ee(8));if(p)throw new Error(Ee(9));try{p=!0,a=i(a,O)}finally{p=!1}for(var T=s=c,L=0;L<T.length;L++){var I=T[L];I()}return O}function S(O){if(typeof O!="function")throw new Error(Ee(10));i=O,b({type:Go.REPLACE})}function v(){var O,T=g;return O={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ee(11));function $(){I.next&&I.next(h())}$();var F=T($);return{unsubscribe:F}}},O[ns]=function(){return this},O}return b({type:Go.INIT}),n={dispatch:b,subscribe:g,getState:h,replaceReducer:S},n[ns]=v,n}function ap(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Go.INIT});if(typeof n>"u")throw new Error(Ee(12));if(typeof o(void 0,{type:Go.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ee(13))})}function is(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{ap(o)}catch(p){c=p}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var O=a[v],T=o[O],L=f[O],I=T(L,h);if(typeof I>"u"){var $=h&&h.type;throw new Error(Ee(14))}S[O]=I,b=b||I!==L}return b=b||a.length!==Object.keys(f).length,b?S:f}}function Tr(){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 as(){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(Ee(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=Tr.apply(void 0,c)(i.dispatch),Vo(Vo({},i),{},{dispatch:a})}}}function ss(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 ls=ss();ls.withExtraArgument=ss;var ni=ls;var us=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)}}(),sp=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(f){return function(h){return p([f,h])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(h){f=[6,h],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Pr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},lp=Object.defineProperty,cp=Object.defineProperties,dp=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,pp=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,ds=function(t,e,o){return e in t?lp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},zt=function(t,e){for(var o in e||(e={}))pp.call(e,o)&&ds(t,o,e[o]);if(cs)for(var n=0,i=cs(e);n<i.length;n++){var o=i[n];fp.call(e,o)&&ds(t,o,e[o])}return t},ii=function(t,e){return cp(t,dp(e))},up=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},s=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var hp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Bu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function yp(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 mp=function(t){us(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,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array),gp=function(t){us(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,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array);function li(t){return tt(t)?Ho(t,function(){}):t}function bp(t){return typeof t=="boolean"}function xp(){return function(e){return vp(e)}}function vp(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 mp;if(o&&(bp(o)?c.push(ni):c.push(ni.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return c}var ai=!0;function hs(t){var e=xp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,h=f===void 0?void 0:f,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof i=="function")S=i;else if(yp(i))S=is(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),!ai&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ai&&v.some(function(F){return typeof F!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=as.apply(void 0,v),T=Tr;p&&(T=hp(zt({trace:!ai},typeof p=="object"&&p)));var L=new gp(O),I=L;Array.isArray(b)?I=Pr([O],b):typeof b=="function"&&(I=b(L));var $=T.apply(void 0,I);return oi(S,h,$)}function Wt(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 ys(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 Sp(t){return typeof t=="function"}function Op(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?ys(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Sp(t))p=function(){return li(t())};else{var f=li(t);p=function(){return f}}function h(g,b){g===void 0&&(g=p());var S=Pr([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(St(v)){var T=v,L=O(T,b);return L===void 0?v:L}else{if(tt(v))return Ho(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},g)}return h.getInitialState=p,h}function Cp(t,e){return t+"/"+e}function ms(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:li(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(h){var g=n[h],b=Cp(e,h),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[h]=S,s[b]=S,c[h]=v?Wt(b,v):Wt(b)});function p(){var h=typeof t.extraReducers=="function"?ys(t.extraReducers):[t.extraReducers],g=h[0],b=g===void 0?{}:g,S=h[1],v=S===void 0?[]:S,O=h[2],T=O===void 0?void 0:O,L=zt(zt({},b),s);return Op(o,function(I){for(var $ in L)I.addCase($,L[$]);for(var F=0,U=v;F<U.length;F++){var Pe=U[F];I.addMatcher(Pe.matcher,Pe.reducer)}T&&I.addDefaultCase(T)})}var f;return{name:e,reducer:function(h,g){return f||(f=p()),f(h,g)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ep="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Ep[Math.random()*64|0];return e},Ap=["name","message","stack","code"],si=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),ps=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Rp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Ap;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},zu=function(){function t(e,o,n){var i=Wt(e+"/fulfilled",function(h,g,b,S){return{payload:h,meta:ii(zt({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=Wt(e+"/pending",function(h,g,b){return{payload:void 0,meta:ii(zt({},b||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Wt(e+"/rejected",function(h,g,b,S,v){return{payload:S,error:(n&&n.serializeError||Rp)(h||"Rejected"),meta:ii(zt({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(g,b,S){var v=n?.idGenerator?n.idGenerator(h):wp(),O=new p,T,L=!1;function I(F){T=F,O.abort()}var $=function(){return up(this,null,function(){var F,U,Pe,pt,Re,ft,be;return sp(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),pt=(F=n?.condition)==null?void 0:F.call(n,h,{getState:b,extra:S}),Lp(pt)?[4,pt]:[3,2];case 1:pt=y.sent(),y.label=2;case 2:if(pt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,Re=new Promise(function(x,k){return O.signal.addEventListener("abort",function(){return k({name:"AbortError",message:T||"Aborted"})})}),g(a(v,h,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:v,arg:h},{getState:b,extra:S}))),[4,Promise.race([Re,Promise.resolve(o(h,{dispatch:g,getState:b,extra:S,requestId:v,signal:O.signal,abort:I,rejectWithValue:function(x,k){return new si(x,k)},fulfillWithValue:function(x,k){return new ps(x,k)}})).then(function(x){if(x instanceof si)throw x;return x instanceof ps?i(x.payload,v,h,x.meta):i(x,v,h)})])];case 3:return Pe=y.sent(),[3,5];case 4:return ft=y.sent(),Pe=ft instanceof si?s(null,v,h,ft.payload,ft.meta):s(ft,v,h),[3,5];case 5:return be=n&&!n.dispatchConditionRejection&&s.match(Pe)&&Pe.meta.condition,be||g(Pe),[2,Pe]}})})}();return Object.assign($,{abort:I,requestId:v,arg:h,unwrap:function(){return $.then(Np)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Np(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Lp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var gs="listener",bs="completed",xs="cancelled",Wu="task-"+xs,Hu="task-"+bs,Vu=gs+"-"+xs,Gu=gs+"-"+bs;var ci="listenerMiddleware";var ju=Wt(ci+"/add"),Ku=Wt(ci+"/removeAll"),Zu=Wt(ci+"/remove");var fs,qu=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(fs||(fs=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Ip=function(t){return function(e){setTimeout(e,t)}},Yu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ip(10);es();function Tp(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 jo=class extends Tp(Object){};window.ftReduxStores||(window.ftReduxStores={});var vs=class t extends jo{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(Jr(a))return a;if(i==null)return;let s=ms({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=hs({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});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 $o,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let f=c(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]: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 Yo=m(R());var Ko=class extends ut{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Zo=class extends ut{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var kp="ft-user-assets",qo=Yo.FtReduxStore.get({name:kp,initialState:{savedSearches:void 0,bookmarks:void 0}}),di=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zo,this.savedSearchesService=new Ko,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,Yo.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(),qo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),qo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();qo.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;qo.actions.bookmarks(o)}}},Ss=new di;var pi=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new pi;var Os=m(R()),fi=class{highlightHtml(e,o,n){(0,Os.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new fi;var Cs=m(R());var ui=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=P.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 Cs.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new ui;var _p=m(R());(0,Es.customElement)("ft-app-context")(oe);var Xo=class extends ut{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}};var ao=t=>t.request.virtualField===Ar.TITLE_ONLY&&t.request.scope===Rr.DOCUMENTS,Qo=class t extends Event{constructor(){super(t.eventName)}};Qo.eventName="search-context-clear-all-filters";var io=class t{static build(e,o){return new t(la(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new yt.Debouncer(10),this.searchDebouncer=new yt.Debouncer(100),this.suggestDebouncer=new yt.Debouncer(300),this.service=o??new Xo,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()})}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}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([]),this.launchSearch()}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e),this.launchSearch()}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Ar.TITLE_ONLY),this.store.actions.setRequestScope(Rr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Ar.EVERYWHERE),this.store.actions.setRequestScope(Rr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return ao(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Qo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}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),this.launchSuggest()}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n={...this.store.getState().request,facets:this.facetIds.map(i=>({id:i}))};if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&n.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,yt.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.results(i.results),this.store.actions.facets(i.facets),this.store.actions.spellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.results(a)}this.store.actions.paging(i.paging)}}catch(n){!(n instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,yt.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.suggestResults(a.suggestions)}catch(o){!(o instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}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 $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},yi=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},hi=Symbol("registerInterval");function Dp(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[hi]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[hi]):this.dispatchEvent(new yi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=hi,$p([(0,As.state)()],o.prototype,"stateManager",void 0),o}var Ht=class extends Dp(ws.FtLitElementRedux){};var Wi=m(R());var bn=m(_()),Le=m(G()),Fc=m(Vt()),Zr=m(R());var Bs=m(R());var $s=m(_()),ve=m(G()),Ds=m(Vt()),so=m(R());var ks=m(_()),se=m(R()),Ns=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorContent),E={color:Ns,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ns),opacityContentOnSurfacePressed:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:se.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ls=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorPrimary),Is={color:Ls,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ls)},Ts=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorSecondary),Ps={color:Ts,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ts)},_s=ks.css`
|
|
15
|
+
`}update(e){var o,n,i,a,s;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>ar.addContext(c)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),P.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),P.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=La;Ce([(0,ke.property)()],oe.prototype,"baseUrl",void 0);Ce([(0,ke.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Ce([(0,ke.property)()],oe.prototype,"uiLocale",void 0);Ce([(0,et.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Ce([(0,et.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Ce([(0,ke.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Ce([(0,ke.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Ce([(0,ke.property)({type:Object})],oe.prototype,"apiProvider",void 0);Ce([(0,et.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Ce([(0,et.jsonProperty)(void 0)],oe.prototype,"session",void 0);Ce([(0,ke.state)()],oe.prototype,"localesConfiguration",void 0);var Pp=m(G());function jd(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(!_o(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(!_o(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(!_o(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function _o(t,e){try{return jd(t,e)}catch{return!1}}function Fn(t,e){return!_o(t,e)}var Kd=m(G(),1);var $o=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 Qr=m(G(),1);var ka=m(G(),1);function _a(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,ka.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:Fn,...e??{}})}var Do=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 Da=m(_(),1);var Bo=window,Zd=Bo.ShadowRoot&&(Bo.ShadyCSS===void 0||Bo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ru=Symbol();var $a=(t,e)=>{Zd?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Bo.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var Fo=class extends Da.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 $a(n,e.elementStyles),n}};var Mo=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},Ua,Ba=Symbol("constructorPrototype"),Fa=Symbol("constructorName"),za=Symbol("exportpartsDebouncer"),Ma=Symbol("dynamicDependenciesLoaded"),Dt=class extends Fo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ua]=new Do(5),this[Fa]=this.constructor.name,this[Ba]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Fa]&&Object.setPrototypeOf(this,this[Ba])}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[Ma]||(e[Ma]=!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[za].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 p=b=>b!=null&&b.trim().length>0,f=e.filter(p).map(b=>b.trim());if(f.length===0){this.removeAttribute("exportparts");return}let h=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(p).map(O=>O.trim()).forEach(O=>h.add(O))}if(h.size===0){this.removeAttribute("exportparts");return}let g=[...h.values()].flatMap(b=>f.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};Ua=za;Mo([(0,Qr.property)()],Dt.prototype,"exportpartsPrefix",void 0);Mo([_a([])],Dt.prototype,"exportpartsPrefixes",void 0);Mo([(0,Qr.property)()],Dt.prototype,"customStylesheet",void 0);Mo([(0,Qr.state)()],Dt.prototype,"useAdoptedStyleSheets",void 0);function Jr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Wa,Ha,Va,eo=Symbol("internalReduxEventsUnsubscribers"),Bt=Symbol("internalStoresUnsubscribers"),sr=Symbol("internalStores"),to=class extends Dt{constructor(){super(...arguments),this[Wa]=new Map,this[Ha]=new Map,this[Va]=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[sr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[sr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[sr].get(e)}addStore(e,o){var n;o=(n=o??(Jr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[sr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[sr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[sr].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[Bt].has(e.store):this[Bt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Bt].set(e,o.subscribe(()=>this.updateFromStores())),this[eo].set(e,[]),Jr(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[eo].get(e).push(()=>o.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Bt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Bt].has(e)&&this[Bt].get(e)(),this[Bt].delete(e),(o=this[eo].get(e))===null||o===void 0||o.forEach(n=>n()),this[eo].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Wa=Bt,Ha=sr,Va=eo;to.reduxProperties=new Map;to.reduxReactiveProperties=new Set;to.reduxEventListeners=new Map;function Ze(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 St(t){return!!t&&!!t[X]}function tt(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)===rp}(t)||Array.isArray(t)||!!t[Xa]||!!(!((e=t.constructor)===null||e===void 0)&&e[Xa])||Kn(t)||Zn(t))}function lr(t,e,o){o===void 0&&(o=!1),Ir(t)===0?(o?Object.keys:Lr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ir(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Kn(t)?2:Zn(t)?3:0}function Nr(t,e){return Ir(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function qd(t,e){return Ir(t)===2?t.get(e):t[e]}function Qa(t,e,o){var n=Ir(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ja(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Kn(t){return ep&&t instanceof Map}function Zn(t){return tp&&t instanceof Set}function Ft(t){return t.o||t.t}function qn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=rs(t);delete e[X];for(var o=Lr(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 Yn(t,e){return e===void 0&&(e=!1),Xn(t)||St(t)||!tt(t)||(Ir(t)>1&&(t.set=t.add=t.clear=t.delete=Yd),Object.freeze(t),e&&lr(t,function(o,n){return Yn(n,!0)},!0)),t}function Yd(){Ze(2)}function Xn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ht(t){var e=jn[t];return e||Ze(18,t),e}function Xd(t,e){jn[t]||(jn[t]=e)}function Hn(){return oo}function Mn(t,e){e&&(ht("Patches"),t.u=[],t.s=[],t.v=e)}function Uo(t){Vn(t),t.p.forEach(Qd),t.p=null}function Vn(t){t===oo&&(oo=t.l)}function Ga(t){return oo={p:[],l:oo,h:t,m:!0,_:0}}function Qd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Un(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||ht("ES5").S(e,t,n),n?(o[X].P&&(Uo(e),Ze(4)),tt(t)&&(t=zo(e,t),e.l||Wo(e,t)),e.u&&ht("Patches").M(o[X].t,t,e.u,e.s)):t=zo(e,o,[]),Uo(e),e.u&&e.v(e.u,e.s),t!==ts?t:void 0}function zo(t,e,o){if(Xn(e))return e;var n=e[X];if(!n)return lr(e,function(c,p){return ja(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Wo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=qn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),lr(a,function(c,p){return ja(t,n,i,c,p,o,s)}),Wo(t,i,!1),o&&t.u&&ht("Patches").N(n,o,t.u,t.s)}return n.o}function ja(t,e,o,n,i,a,s){if(St(i)){var c=zo(t,i,a&&e&&e.i!==3&&!Nr(e.R,n)?a.concat(n):void 0);if(Qa(o,n,c),!St(c))return;t.m=!1}else s&&o.add(i);if(tt(i)&&!Xn(i)){if(!t.h.D&&t._<1)return;zo(t,i),e&&e.A.l||Wo(t,i)}}function Wo(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Yn(e,o)}function zn(t,e){var o=t[X];return(o?Ft(o):t)[e]}function Ka(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 Mt(t){t.P||(t.P=!0,t.l&&Mt(t.l))}function Wn(t){t.o||(t.o=qn(t.t))}function Gn(t,e,o){var n=Kn(e)?ht("MapSet").F(e,o):Zn(e)?ht("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:Hn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=no;s&&(p=[c],f=ro);var h=Proxy.revocable(p,f),g=h.revoke,b=h.proxy;return c.k=b,c.j=g,b}(e,o):ht("ES5").J(e,o);return(o?o.A:Hn()).p.push(n),n}function Jd(t){return St(t)||Ze(22,t),function e(o){if(!tt(o))return o;var n,i=o[X],a=Ir(o);if(i){if(!i.P&&(i.i<4||!ht("ES5").K(i)))return i.t;i.I=!0,n=Za(o,a),i.I=!1}else n=Za(o,a);return lr(n,function(s,c){i&&qd(i.t,s)===c||Qa(n,s,e(c))}),a===3?new Set(n):n}(t)}function Za(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return qn(t)}function es(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var f=this[X];return no.get(f,s)},set:function(f){var h=this[X];no.set(h,s,f)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][X];if(!p.P)switch(p.i){case 5:n(p)&&Mt(p);break;case 4:o(p)&&Mt(p)}}}function o(s){for(var c=s.t,p=s.k,f=Lr(p),h=f.length-1;h>=0;h--){var g=f[h];if(g!==X){var b=c[g];if(b===void 0&&!Nr(c,g))return!0;var S=p[g],v=S&&S[X];if(v?v.t!==b:!Ja(S,b))return!0}}var O=!!c[X];return f.length!==Lr(c).length+(O?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Ze(3,JSON.stringify(Ft(s)))}var a={};Xd("ES5",{J:function(s,c){var p=Array.isArray(s),f=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=rs(b);delete O[X];for(var T=Lr(O),L=0;L<T.length;L++){var I=T[L];O[I]=t(I,g||!!O[I].enumerable)}return Object.create(Object.getPrototypeOf(b),O)}(p,s),h={i:p?5:4,A:c?c.A:Hn(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,X,{value:h,writable:!0}),f},S:function(s,c,p){p?St(c)&&c[X].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var g=h[X];if(g){var b=g.t,S=g.k,v=g.R,O=g.i;if(O===4)lr(S,function(F){F!==X&&(b[F]!==void 0||Nr(b,F)?v[F]||f(S[F]):(v[F]=!0,Mt(g)))}),lr(b,function(F){S[F]!==void 0||Nr(S,F)||(v[F]=!1,Mt(g))});else if(O===5){if(n(g)&&(Mt(g),v.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)v[T]=!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&&f(S[$])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var qa,oo,Qn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ep=typeof Map<"u",tp=typeof Set<"u",Ya=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ts=Qn?Symbol.for("immer-nothing"):((qa={})["immer-nothing"]=!0,qa),Xa=Qn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Qn?Symbol.for("immer-state"):"__$immer_state";var rp=""+Object.prototype.constructor,Lr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,rs=Object.getOwnPropertyDescriptors||function(t){var e={};return Lr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},jn={},no={get:function(t,e){if(e===X)return t;var o=Ft(t);if(!Nr(o,e))return function(i,a,s){var c,p=Ka(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!tt(n)?n:n===zn(t.t,e)?(Wn(t),t.o[e]=Gn(t.A.h,n,t)):n},has:function(t,e){return e in Ft(t)},ownKeys:function(t){return Reflect.ownKeys(Ft(t))},set:function(t,e,o){var n=Ka(Ft(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=zn(Ft(t),e),a=i?.[X];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ja(o,i)&&(o!==void 0||Nr(t.t,e)))return!0;Wn(t),Mt(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 zn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Wn(t),Mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Ft(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ze(12)}},ro={};lr(no,function(t,e){ro[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ro.deleteProperty=function(t,e){return ro.set.call(this,t,e,void 0)},ro.set=function(t,e,o){return no.set.call(this,t[0],e,o,t[0])};var op=function(){function t(o){var n=this;this.O=Ya,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(O){var T=this;O===void 0&&(O=c);for(var L=arguments.length,I=Array(L>1?L-1:0),$=1;$<L;$++)I[$-1]=arguments[$];return p.produce(O,function(F){var U;return(U=a).call.apply(U,[T,F].concat(I))})}}var f;if(typeof a!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),tt(i)){var h=Ga(n),g=Gn(n,i,void 0),b=!0;try{f=a(g),b=!1}finally{b?Uo(h):Vn(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(O){return Mn(h,s),Un(O,h)},function(O){throw Uo(h),O}):(Mn(h,s),Un(f,h))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===ts&&(f=void 0),n.D&&Yn(f,!0),s){var S=[],v=[];ht("Patches").M(i,f,S,v),s(S,v)}return f}Ze(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var h=arguments.length,g=Array(h>1?h-1:0),b=1;b<h;b++)g[b-1]=arguments[b];return n.produceWithPatches(f,function(S){return i.apply(void 0,[S].concat(g))})};var s,c,p=n.produce(i,a,function(f,h){s=f,c=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,c]}):[p,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){tt(o)||Ze(8),St(o)&&(o=Jd(o));var n=Ga(this),i=Gn(this,o,void 0);return i[X].C=!0,Vn(n),i},e.finishDraft=function(o,n){var i=o&&o[X],a=i.A;return Mn(a,n),Un(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ya&&Ze(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=ht("Patches").$;return St(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),ze=new op,np=ze.produce,hu=ze.produceWithPatches.bind(ze),yu=ze.setAutoFreeze.bind(ze),mu=ze.setUseProxies.bind(ze),gu=ze.applyPatches.bind(ze),bu=ze.createDraft.bind(ze),xu=ze.finishDraft.bind(ze),Ho=np;function Ut(t){"@babel/helpers - typeof";return Ut=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},Ut(t)}function Jn(t,e){if(Ut(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Ut(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ei(t){var e=Jn(t,"string");return Ut(e)==="symbol"?e:String(e)}function ti(t,e,o){return e=ei(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function os(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 Vo(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?os(Object(o),!0).forEach(function(n){ti(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):os(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ee(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 ns=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ri=function(){return Math.random().toString(36).substring(7).split("").join(".")},Go={INIT:"@@redux/INIT"+ri(),REPLACE:"@@redux/REPLACE"+ri(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ri()}};function ip(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 oi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ee(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ee(1));return o(oi)(t,e)}if(typeof t!="function")throw new Error(Ee(2));var i=t,a=e,s=[],c=s,p=!1;function f(){c===s&&(c=s.slice())}function h(){if(p)throw new Error(Ee(3));return a}function g(O){if(typeof O!="function")throw new Error(Ee(4));if(p)throw new Error(Ee(5));var T=!0;return f(),c.push(O),function(){if(T){if(p)throw new Error(Ee(6));T=!1,f();var I=c.indexOf(O);c.splice(I,1),s=null}}}function b(O){if(!ip(O))throw new Error(Ee(7));if(typeof O.type>"u")throw new Error(Ee(8));if(p)throw new Error(Ee(9));try{p=!0,a=i(a,O)}finally{p=!1}for(var T=s=c,L=0;L<T.length;L++){var I=T[L];I()}return O}function S(O){if(typeof O!="function")throw new Error(Ee(10));i=O,b({type:Go.REPLACE})}function v(){var O,T=g;return O={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ee(11));function $(){I.next&&I.next(h())}$();var F=T($);return{unsubscribe:F}}},O[ns]=function(){return this},O}return b({type:Go.INIT}),n={dispatch:b,subscribe:g,getState:h,replaceReducer:S},n[ns]=v,n}function ap(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Go.INIT});if(typeof n>"u")throw new Error(Ee(12));if(typeof o(void 0,{type:Go.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ee(13))})}function is(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{ap(o)}catch(p){c=p}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var O=a[v],T=o[O],L=f[O],I=T(L,h);if(typeof I>"u"){var $=h&&h.type;throw new Error(Ee(14))}S[O]=I,b=b||I!==L}return b=b||a.length!==Object.keys(f).length,b?S:f}}function Tr(){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 as(){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(Ee(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=Tr.apply(void 0,c)(i.dispatch),Vo(Vo({},i),{},{dispatch:a})}}}function ss(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 ls=ss();ls.withExtraArgument=ss;var ni=ls;var us=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)}}(),sp=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(f){return function(h){return p([f,h])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(h){f=[6,h],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Pr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},lp=Object.defineProperty,cp=Object.defineProperties,dp=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,pp=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,ds=function(t,e,o){return e in t?lp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},zt=function(t,e){for(var o in e||(e={}))pp.call(e,o)&&ds(t,o,e[o]);if(cs)for(var n=0,i=cs(e);n<i.length;n++){var o=i[n];fp.call(e,o)&&ds(t,o,e[o])}return t},ii=function(t,e){return cp(t,dp(e))},up=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},s=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var hp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Bu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function yp(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 mp=function(t){us(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,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array),gp=function(t){us(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,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array);function li(t){return tt(t)?Ho(t,function(){}):t}function bp(t){return typeof t=="boolean"}function xp(){return function(e){return vp(e)}}function vp(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 mp;if(o&&(bp(o)?c.push(ni):c.push(ni.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return c}var ai=!0;function hs(t){var e=xp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,h=f===void 0?void 0:f,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof i=="function")S=i;else if(yp(i))S=is(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),!ai&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ai&&v.some(function(F){return typeof F!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=as.apply(void 0,v),T=Tr;p&&(T=hp(zt({trace:!ai},typeof p=="object"&&p)));var L=new gp(O),I=L;Array.isArray(b)?I=Pr([O],b):typeof b=="function"&&(I=b(L));var $=T.apply(void 0,I);return oi(S,h,$)}function Wt(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 ys(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 Sp(t){return typeof t=="function"}function Op(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?ys(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Sp(t))p=function(){return li(t())};else{var f=li(t);p=function(){return f}}function h(g,b){g===void 0&&(g=p());var S=Pr([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(St(v)){var T=v,L=O(T,b);return L===void 0?v:L}else{if(tt(v))return Ho(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},g)}return h.getInitialState=p,h}function Cp(t,e){return t+"/"+e}function ms(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:li(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(h){var g=n[h],b=Cp(e,h),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[h]=S,s[b]=S,c[h]=v?Wt(b,v):Wt(b)});function p(){var h=typeof t.extraReducers=="function"?ys(t.extraReducers):[t.extraReducers],g=h[0],b=g===void 0?{}:g,S=h[1],v=S===void 0?[]:S,O=h[2],T=O===void 0?void 0:O,L=zt(zt({},b),s);return Op(o,function(I){for(var $ in L)I.addCase($,L[$]);for(var F=0,U=v;F<U.length;F++){var Pe=U[F];I.addMatcher(Pe.matcher,Pe.reducer)}T&&I.addDefaultCase(T)})}var f;return{name:e,reducer:function(h,g){return f||(f=p()),f(h,g)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ep="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Ep[Math.random()*64|0];return e},Ap=["name","message","stack","code"],si=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),ps=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Rp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Ap;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},zu=function(){function t(e,o,n){var i=Wt(e+"/fulfilled",function(h,g,b,S){return{payload:h,meta:ii(zt({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=Wt(e+"/pending",function(h,g,b){return{payload:void 0,meta:ii(zt({},b||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Wt(e+"/rejected",function(h,g,b,S,v){return{payload:S,error:(n&&n.serializeError||Rp)(h||"Rejected"),meta:ii(zt({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(g,b,S){var v=n?.idGenerator?n.idGenerator(h):wp(),O=new p,T,L=!1;function I(F){T=F,O.abort()}var $=function(){return up(this,null,function(){var F,U,Pe,pt,Re,ft,be;return sp(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),pt=(F=n?.condition)==null?void 0:F.call(n,h,{getState:b,extra:S}),Lp(pt)?[4,pt]:[3,2];case 1:pt=y.sent(),y.label=2;case 2:if(pt===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,Re=new Promise(function(x,k){return O.signal.addEventListener("abort",function(){return k({name:"AbortError",message:T||"Aborted"})})}),g(a(v,h,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:v,arg:h},{getState:b,extra:S}))),[4,Promise.race([Re,Promise.resolve(o(h,{dispatch:g,getState:b,extra:S,requestId:v,signal:O.signal,abort:I,rejectWithValue:function(x,k){return new si(x,k)},fulfillWithValue:function(x,k){return new ps(x,k)}})).then(function(x){if(x instanceof si)throw x;return x instanceof ps?i(x.payload,v,h,x.meta):i(x,v,h)})])];case 3:return Pe=y.sent(),[3,5];case 4:return ft=y.sent(),Pe=ft instanceof si?s(null,v,h,ft.payload,ft.meta):s(ft,v,h),[3,5];case 5:return be=n&&!n.dispatchConditionRejection&&s.match(Pe)&&Pe.meta.condition,be||g(Pe),[2,Pe]}})})}();return Object.assign($,{abort:I,requestId:v,arg:h,unwrap:function(){return $.then(Np)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function Np(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Lp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var gs="listener",bs="completed",xs="cancelled",Wu="task-"+xs,Hu="task-"+bs,Vu=gs+"-"+xs,Gu=gs+"-"+bs;var ci="listenerMiddleware";var ju=Wt(ci+"/add"),Ku=Wt(ci+"/removeAll"),Zu=Wt(ci+"/remove");var fs,qu=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(fs||(fs=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Ip=function(t){return function(e){setTimeout(e,t)}},Yu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ip(10);es();function Tp(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 jo=class extends Tp(Object){};window.ftReduxStores||(window.ftReduxStores={});var vs=class t extends jo{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(Jr(a))return a;if(i==null)return;let s=ms({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=hs({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});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 $o,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let f=c(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]: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 Yo=m(R());var Ko=class extends ut{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Zo=class extends ut{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var kp="ft-user-assets",qo=Yo.FtReduxStore.get({name:kp,initialState:{savedSearches:void 0,bookmarks:void 0}}),di=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zo,this.savedSearchesService=new Ko,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,Yo.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(),qo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),qo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();qo.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;qo.actions.bookmarks(o)}}},Ss=new di;var pi=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new pi;var Os=m(R()),fi=class{highlightHtml(e,o,n){(0,Os.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new fi;var Cs=m(R());var ui=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=P.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 Cs.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new ui;var _p=m(R());(0,Es.customElement)("ft-app-context")(oe);var Xo=class extends ut{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}};var ao=t=>t.request.virtualField===Ar.TITLE_ONLY&&t.request.scope===Rr.DOCUMENTS,Qo=class t extends Event{constructor(){super(t.eventName)}};Qo.eventName="search-context-clear-all-filters";var io=class t{static build(e,o){return new t(la(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new yt.Debouncer(10),this.searchDebouncer=new yt.Debouncer(100),this.suggestDebouncer=new yt.Debouncer(300),this.service=o??new Xo,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()})}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}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([]),this.launchSearch()}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e),this.launchSearch()}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Ar.TITLE_ONLY),this.store.actions.setRequestScope(Rr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Ar.EVERYWHERE),this.store.actions.setRequestScope(Rr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return ao(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Qo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}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),this.launchSuggest()}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.launchSuggest(),this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n={...this.store.getState().request,facets:this.facetIds.map(i=>({id:i}))};if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&n.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,yt.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.results(i.results),this.store.actions.facets(i.facets),this.store.actions.spellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.results(a)}this.store.actions.paging(i.paging)}}catch(n){!(n instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,yt.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.suggestResults(a.suggestions)}catch(o){!(o instanceof yt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}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 $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},yi=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},hi=Symbol("registerInterval");function Dp(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[hi]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[hi]):this.dispatchEvent(new yi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=hi,$p([(0,As.state)()],o.prototype,"stateManager",void 0),o}var Ht=class extends Dp(ws.FtLitElementRedux){};var Wi=m(R());var bn=m(_()),Le=m(G()),Fc=m(Vt()),Zr=m(R());var Bs=m(R());var $s=m(_()),ve=m(G()),Ds=m(Vt()),so=m(R());var ks=m(_()),se=m(R()),Ns=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorContent),E={color:Ns,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ns),opacityContentOnSurfacePressed:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:se.FtCssVariableFactory.external(se.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:se.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ls=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorPrimary),Is={color:Ls,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ls)},Ts=se.FtCssVariableFactory.extend("--ft-ripple-color","",se.designSystemVariables.colorSecondary),Ps={color:Ts,backgroundColor:se.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ts)},_s=ks.css`
|
|
16
16
|
:host {
|
|
17
17
|
display: contents;
|
|
18
18
|
}
|
|
@@ -60,7 +60,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
|
|
|
60
60
|
`;var Kf={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 r;let n=+((r=e.payload)!==null&&r!==void 0?r:20);t.request.paging.perPage=isNaN(n)?20:pr(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 r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]}},ld=t=>Rt.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:Kf});var cd=P`
|
|
61
61
|
`;var Zf="ft-app-info",bs=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},qf={session:(t,e)=>{ze(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>B.dispatchEvent(new bs(e.payload)),0))}},B=Rt.get({name:Zf,reducers:qf,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 Sr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=B.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=B.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var pt=class{constructor(e=!0,r){var n;this.overrideApi=r;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new at,this.cache=e?i.commonCache:new at}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Sr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Sr.await()}clearCache(){this.cache.clearAll()}};var dd,Yf=Symbol("clearAfterUnitTest"),Fn=class extends pt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[dd]=()=>{this.defaultMessages={},this.cache=new at,this.listeners={}},this.currentUiLocale=B.getState().uiLocale,B.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=B.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),Object.keys(r).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};ze(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new ko((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(r,...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(r){console.error(r)}}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}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(r=>xn(0).then(()=>r()).catch(()=>null)))}};dd=Yf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Or=window.FluidTopicsI18nService,pd=window.FluidTopicsCustomI18nService;var _e=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},de=class extends U{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=()=>Sr.get(),this.messageContexts=[],this.cache=new at,this.cleanSessionDebouncer=new ce}render(){return L`
|
|
62
62
|
<slot></slot>
|
|
63
|
-
`}update(e){var r,n,i,a,s;super.update(e),e.has("baseUrl")&&(B.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&B.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&B.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&B.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&B.actions.noCustom(this.noCustom),e.has("editorMode")&&B.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&B.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&B.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Or.addContext(l)),e.has("openExternalDocumentInNewTab")&&B.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&B.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&B.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(B.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),B.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),B.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())}};de.elementDefinitions={};de.styles=cd;_e([b()],de.prototype,"baseUrl",void 0);_e([b()],de.prototype,"apiIntegrationIdentifier",void 0);_e([b()],de.prototype,"uiLocale",void 0);_e([xe(null)],de.prototype,"availableUiLocales",void 0);_e([xe(null)],de.prototype,"metadataConfiguration",void 0);_e([b({type:Boolean})],de.prototype,"editorMode",void 0);_e([b({type:Boolean})],de.prototype,"noCustom",void 0);_e([b({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);_e([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);_e([b({type:Boolean})],de.prototype,"withManualResources",void 0);_e([b({type:Boolean})],de.prototype,"navigatorOnline",void 0);_e([b({type:Boolean})],de.prototype,"forcedOffline",void 0);_e([b({type:Object})],de.prototype,"apiProvider",void 0);_e([xe([])],de.prototype,"messageContexts",void 0);_e([xe(void 0)],de.prototype,"session",void 0);_e([q()],de.prototype,"localesConfiguration",void 0);var Mn=class extends pt{async listMySearches(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Bn=class extends pt{async listMyBookmarks(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Xf="ft-user-assets",Un=Rt.get({name:Xf,initialState:{savedSearches:void 0,bookmarks:void 0}}),xs=class{constructor(){this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bn,this.savedSearchesService=new Mn,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=B.getState();ze((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Un.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Un.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Un.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 r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Un.actions.bookmarks(r)}}},ud=new xs;var vs=class{addCommand(e,r=!1){B.commands.add(e,r)}consumeCommand(e){return B.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new vs;var Ss=class{highlightHtml(e,r,n){_a(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Ss;var Os=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=B.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return jr.format(e,(n=r?.locale)!==null&&n!==void 0?n:B.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Os;j("ft-app-context")(de);var zn=class extends pt{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0)}};var Ho=t=>t.request.virtualField===Hr.TITLE_ONLY&&t.request.scope===Vr.DOCUMENTS,Wn=class t extends Event{constructor(){super(t.eventName)}};Wn.eventName="search-context-clear-all-filters";var Wo=class t{static build(e,r){return new t(ld(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ce(10),this.searchDebouncer=new ce(100),this.suggestDebouncer=new ce(300),this.service=r??new zn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()})}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){var r;let n=(r=this.store.getState().locales)!==null&&r!==void 0?r:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(l=>l.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([]),this.launchSearch()}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e),this.launchSearch()}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let r=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Hr.TITLE_ONLY),this.store.actions.setRequestScope(Vr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Hr.EVERYWHERE),this.store.actions.setRequestScope(Vr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ho(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Wn)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n,this.launchSearch()}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(n=>n.id),...((e=r.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,r){this.setValueFilter(e,r)}setValueFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:r,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:r}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.dateFilter),...r.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,r,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:r,to:n}},s=[...i.filter(l=>!l.rangeFilter),...i.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.rangeFilter),...r.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,r;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n={...this.store.getState().request,facets:this.facetIds.map(i=>({id:i}))};if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=Tr(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.results(i.results),this.store.actions.facets(i.facets),this.store.actions.spellcheck(i.spellcheck);else{let a=((r=this.store.getState().results)!==null&&r!==void 0?r:[]).concat(i.results);this.store.actions.results(a)}this.store.actions.paging(i.paging)}}catch(n){!(n instanceof kt)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let r=this.store.getState(),n=r.request,i={input:r.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=Tr(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.suggestResults(a.suggestions)}catch(r){!(r instanceof kt)&&this.errorHandler&&this.errorHandler(r)}}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 Qf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Es=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Cs=Symbol("registerInterval");function Jf(t){var e;class r 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[Cs]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Cs]):this.dispatchEvent(new Es)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Cs,Qf([q()],r.prototype,"stateManager",void 0),r}var Vt=class extends Jf(Ge){};var fd=o.extend("--ft-ripple-color","",I.colorContent),R={color:fd,backgroundColor:o.extend("--ft-ripple-background-color","",fd),opacityContentOnSurfacePressed:o.external(I.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.external(I.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.external(I.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.external(I.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.create("--ft-ripple-border-radius","","SIZE","0px")},hd=o.extend("--ft-ripple-color","",I.colorPrimary),yd={color:hd,backgroundColor:o.extend("--ft-ripple-background-color","",hd)},md=o.extend("--ft-ripple-color","",I.colorSecondary),gd={color:md,backgroundColor:o.extend("--ft-ripple-background-color","",md)},bd=P`
|
|
63
|
+
`}update(e){var r,n,i,a,s;super.update(e),e.has("baseUrl")&&(B.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&B.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&B.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&B.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&B.actions.noCustom(this.noCustom),e.has("editorMode")&&B.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&B.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&B.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>Or.addContext(l)),e.has("openExternalDocumentInNewTab")&&B.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&B.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&B.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(B.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),B.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),B.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())}};de.elementDefinitions={};de.styles=cd;_e([b()],de.prototype,"baseUrl",void 0);_e([b()],de.prototype,"apiIntegrationIdentifier",void 0);_e([b()],de.prototype,"uiLocale",void 0);_e([xe(null)],de.prototype,"availableUiLocales",void 0);_e([xe(null)],de.prototype,"metadataConfiguration",void 0);_e([b({type:Boolean})],de.prototype,"editorMode",void 0);_e([b({type:Boolean})],de.prototype,"noCustom",void 0);_e([b({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);_e([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);_e([b({type:Boolean})],de.prototype,"withManualResources",void 0);_e([b({type:Boolean})],de.prototype,"navigatorOnline",void 0);_e([b({type:Boolean})],de.prototype,"forcedOffline",void 0);_e([b({type:Object})],de.prototype,"apiProvider",void 0);_e([xe([])],de.prototype,"messageContexts",void 0);_e([xe(void 0)],de.prototype,"session",void 0);_e([q()],de.prototype,"localesConfiguration",void 0);var Mn=class extends pt{async listMySearches(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Bn=class extends pt{async listMyBookmarks(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Xf="ft-user-assets",Un=Rt.get({name:Xf,initialState:{savedSearches:void 0,bookmarks:void 0}}),xs=class{constructor(){this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bn,this.savedSearchesService=new Mn,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=B.getState();ze((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Un.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Un.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Un.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 r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Un.actions.bookmarks(r)}}},ud=new xs;var vs=class{addCommand(e,r=!1){B.commands.add(e,r)}consumeCommand(e){return B.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new vs;var Ss=class{highlightHtml(e,r,n){_a(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Ss;var Os=class{isDate(e){var r,n,i,a;return(a=(i=((n=(r=B.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var n,i,a;return jr.format(e,(n=r?.locale)!==null&&n!==void 0?n:B.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Os;j("ft-app-context")(de);var zn=class extends pt{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0)}};var Ho=t=>t.request.virtualField===Hr.TITLE_ONLY&&t.request.scope===Vr.DOCUMENTS,Wn=class t extends Event{constructor(){super(t.eventName)}};Wn.eventName="search-context-clear-all-filters";var Wo=class t{static build(e,r){return new t(ld(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ce(10),this.searchDebouncer=new ce(100),this.suggestDebouncer=new ce(300),this.service=r??new zn,this.service.cache.addEventListener("clear-cache",n=>{n.detail.clearedKeys.includes("available-locales")&&this.updateLocales()})}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){var r;let n=(r=this.store.getState().locales)!==null&&r!==void 0?r:[],i=this.store.getState().request.contentLocale;if(e!=i){if(n.length>0){let a=s=>n.some(l=>l.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([]),this.launchSearch()}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e),this.launchSearch()}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let r=e.filter(n=>!n.valueFilter||n.valueFilter.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Hr.TITLE_ONLY),this.store.actions.setRequestScope(Vr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Hr.EVERYWHERE),this.store.actions.setRequestScope(Vr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Ho(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Wn)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n,this.launchSearch()}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(n=>n.id),...((e=r.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,r){this.setValueFilter(e,r)}setValueFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,valueFilter:{values:r,negative:!1}},a=[...n.filter(s=>!s.valueFilter),...n.filter(s=>s.valueFilter&&s.key!==i.key),i];this.setFilters(a)}setDateFilter(e,r){let n=this.store.getState().request.metadataFilters,i={key:e,dateFilter:{type:r}},a=[...n.filter(s=>!s.dateFilter),...n.filter(s=>s.dateFilter&&s.key!==i.key),i];this.setFilters(a)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.dateFilter),...r.filter(i=>i.dateFilter&&i.key!==e)];this.setFilters(n)}setRangeFilter(e,r,n){let i=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:r,to:n}},s=[...i.filter(l=>!l.rangeFilter),...i.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,n=[...r.filter(i=>!i.rangeFilter),...r.filter(i=>i.rangeFilter&&i.key!==e)];this.setFilters(n)}setLiveQuery(e){this.store.actions.liveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.launchSuggest(),this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,r;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n={...this.store.getState().request,facets:this.facetIds.map(i=>({id:i}))};if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.results(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{this.cancelableSearch=Tr(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.results(i.results),this.store.actions.facets(i.facets),this.store.actions.spellcheck(i.spellcheck);else{let a=((r=this.store.getState().results)!==null&&r!==void 0?r:[]).concat(i.results);this.store.actions.results(a)}this.store.actions.paging(i.paging)}}catch(n){!(n instanceof kt)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let r=this.store.getState(),n=r.request,i={input:r.liveQuery,metadataFilters:n.metadataFilters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=Tr(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.suggestResults(a.suggestions)}catch(r){!(r instanceof kt)&&this.errorHandler&&this.errorHandler(r)}}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 Qf=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Es=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Cs=Symbol("registerInterval");function Jf(t){var e;class r 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[Cs]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Cs]):this.dispatchEvent(new Es)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Cs,Qf([q()],r.prototype,"stateManager",void 0),r}var Vt=class extends Jf(Ge){};var fd=o.extend("--ft-ripple-color","",I.colorContent),R={color:fd,backgroundColor:o.extend("--ft-ripple-background-color","",fd),opacityContentOnSurfacePressed:o.external(I.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:o.external(I.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:o.external(I.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:o.external(I.opacityContentOnSurfaceSelected,"Design system"),borderRadius:o.create("--ft-ripple-border-radius","","SIZE","0px")},hd=o.extend("--ft-ripple-color","",I.colorPrimary),yd={color:hd,backgroundColor:o.extend("--ft-ripple-background-color","",hd)},md=o.extend("--ft-ripple-color","",I.colorSecondary),gd={color:md,backgroundColor:o.extend("--ft-ripple-background-color","",md)},bd=P`
|
|
64
64
|
:host {
|
|
65
65
|
display: contents;
|
|
66
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-selected-facets",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
4
4
|
"description": "List of selected facets in a designed search page context",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "1.2.
|
|
23
|
-
"@fluid-topics/ft-search-context": "1.2.
|
|
24
|
-
"@fluid-topics/ft-search-period-filter": "1.2.
|
|
25
|
-
"@fluid-topics/ft-search-type": "1.2.
|
|
26
|
-
"@fluid-topics/ft-tooltip": "1.2.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.2.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.2.20",
|
|
23
|
+
"@fluid-topics/ft-search-context": "1.2.20",
|
|
24
|
+
"@fluid-topics/ft-search-period-filter": "1.2.20",
|
|
25
|
+
"@fluid-topics/ft-search-type": "1.2.20",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "1.2.20",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.2.20",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "4bd72b4e7b35120c6afe320c6be252f7e7641982"
|
|
31
31
|
}
|