@fluid-topics/ft-search-result-metadata 1.1.99 → 1.1.101

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.
@@ -13,7 +13,7 @@
13
13
  `;var Pa=g(I()),La=g(Z());var Ln=g(I());var Oc=g(I());var np=g(gi(),1);var bi;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(bi||(bi={}));var xi;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(xi||(xi={}));var vi;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(vi||(vi={}));var Si;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT"})(Si||(Si={}));var Oi;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Oi||(Oi={}));var Ci;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ci||(Ci={}));var Ei;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ei||(Ei={}));var wi;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(wi||(wi={}));var Ai;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Ai||(Ai={}));var Ri;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ri||(Ri={}));var Ni;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ni||(Ni={}));var Zo;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Zo||(Zo={}));var Ii;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(Ii||(Ii={}));var Ur;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Ur||(Ur={}));var Pi;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(Pi||(Pi={}));var _t;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(_t||(_t={}));var qo;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS"})(qo||(qo={}));var se;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN",e.DEVELOPER="DEVELOPER"})(se||(se={}));var Li;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Li||(Li={}));var ep={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.DEVELOPER]:[se.BETA_USER,se.DEBUG_USER]};var Ia=g(I());var Mi=g(B()),ke=g(Z()),Be=g(I());var Ti=g(B());var _i=Ti.css`
14
14
  `;var Br=g(I()),Cc="ft-app-info",Yo=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Ec={session:(e,t)=>{(0,Br.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>L.eventBus.dispatchEvent(new Yo(t.payload)),0))}},L=Br.FtReduxStore.get({name:Cc,reducers:Ec,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var nt=g(I());var Xo=g(I());var St=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=L.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=L.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var qe=class{constructor(t=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Xo.CacheRegistry,this.cache=t?i.commonCache:new Xo.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}clearCache(){this.cache.clearAll()}};var ki,wc=Symbol("clearAfterUnitTest"),Wr=class extends qe{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ki]=()=>{this.defaultMessages={},this.cache=new nt.CacheRegistry,this.listeners={}},this.currentUiLocale=L.getState().uiLocale,L.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=L.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,nt.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...n){var i,a,s;t=t.toLowerCase(),this.fetchContext(t);let c=(a=(i=this.cache.getNow(t))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new nt.ParametrizedLabelResolver((s=this.defaultMessages[t])!==null&&s!==void 0?s:{},c).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,nt.delay)(0).then(()=>o()).catch(()=>null)))}};ki=wc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var kt=window.FluidTopicsI18nService,Di=window.FluidTopicsCustomI18nService;var fe=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Y=class extends Be.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=()=>St.get(),this.messageContexts=[],this.cache=new Be.CacheRegistry,this.cleanSessionDebouncer=new Be.Debouncer}render(){return Mi.html`
15
15
  <slot></slot>
16
- `}update(t){super.update(t),t.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&L.actions.noCustom(this.noCustom),t.has("editorMode")&&L.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&L.actions.session(this.session),t.has("availableUiLocales")&&L.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>kt.addContext(o)),t.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};Y.elementDefinitions={};Y.styles=_i;fe([(0,ke.property)()],Y.prototype,"baseUrl",void 0);fe([(0,ke.property)()],Y.prototype,"apiIntegrationIdentifier",void 0);fe([(0,ke.property)()],Y.prototype,"uiLocale",void 0);fe([(0,Be.jsonProperty)(null)],Y.prototype,"availableUiLocales",void 0);fe([(0,Be.jsonProperty)(null)],Y.prototype,"metadataConfiguration",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"editorMode",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"noCustom",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"openExternalDocumentInNewTab",void 0);fe([(0,ke.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Y.prototype,"noCustomComponent",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"withManualResources",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"navigatorOnline",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"forcedOffline",void 0);fe([(0,ke.property)({type:Object})],Y.prototype,"apiProvider",void 0);fe([(0,Be.jsonProperty)([])],Y.prototype,"messageContexts",void 0);fe([(0,Be.jsonProperty)(void 0)],Y.prototype,"session",void 0);var wn=g(Z());function Ac(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!zr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!zr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!zr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function zr(e,t){try{return Ac(e,t)}catch{return!1}}function Fr(e,t){return!zr(e,t)}var $i=g(Z(),1);var Jo=e=>{let t=e??{};return(o,n)=>{var i;let a={hasChanged:Fr,attribute:!1,...t};(0,$i.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:c=>c[n],store:t.store})}};var Hr=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var cr=g(Z(),1);var Ui=g(Z(),1);function Bi(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,Ui.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:Fr,...t??{}})}var Vr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>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 zi=g(B(),1);var jr=window,Rc=jr.ShadowRoot&&(jr.ShadyCSS===void 0||jr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,kp=Symbol();var Wi=(e,t)=>{Rc?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=jr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)})};var Gr=class extends zi.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Wi(n,t.elementStyles),n}};var Kr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},ji,Fi=Symbol("constructorPrototype"),Hi=Symbol("constructorName"),Gi=Symbol("exportpartsDebouncer"),Vi=Symbol("dynamicDependenciesLoaded"),it=class extends Gr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ji]=new Vr(5),this[Hi]=this.constructor.name,this[Fi]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Hi]&&Object.setPrototypeOf(this,this[Fi])}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 t=this.constructor;t[Vi]||(t[Vi]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){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(t.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 t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Gi].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(t){var o,n,i,a,s,c;let p=y=>y!=null&&y.trim().length>0,u=t.filter(p).map(y=>y.trim());if(u.length===0){this.removeAttribute("exportparts");return}let f=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=y.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(c=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>f.add(S))}if(f.size===0){this.removeAttribute("exportparts");return}let m=[...f.values()].flatMap(y=>u.map(x=>`${y}:${x}--${y}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};ji=Gi;Kr([(0,cr.property)()],it.prototype,"exportpartsPrefix",void 0);Kr([Bi([])],it.prototype,"exportpartsPrefixes",void 0);Kr([(0,cr.property)()],it.prototype,"customStylesheet",void 0);Kr([(0,cr.state)()],it.prototype,"useAdoptedStyleSheets",void 0);function dr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ki,Zi,qi,Zr=Symbol("internalReduxEventsUnsubscribers"),at=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),pr=class extends it{constructor(){super(...arguments),this[Ki]=new Map,this[Zi]=new Map,this[qi]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Ot].get(t)}addStore(t,o){var n;o=(n=o??(dr(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Ot].delete(o)}setupStore(t,o){this[Ot].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Ot].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[at].has(t.store):this[at].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[at].set(t,o.subscribe(()=>this.updateFromStores())),dr(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.eventBus.addEventListener(i.eventName,s),this[Zr].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[at].forEach((t,o)=>this.unsubscribeFromStore(o)),this[Zr].forEach(t=>t()),this[Zr]=[]}unsubscribeFromStore(t){this[at].has(t)&&this[at].get(t)(),this[at].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Ki=at,Zi=Ot,qi=Zr;pr.reduxProperties=new Map;pr.reduxReactiveProperties=new Set;pr.reduxEventListeners=new Map;function De(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ye(e){return!!e&&!!e[j]}function We(e){var t;return!!e&&(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)===Dc}(e)||Array.isArray(e)||!!e[ra]||!!(!((t=e.constructor)===null||t===void 0)&&t[ra])||ln(e)||cn(e))}function Ct(e,t,o){o===void 0&&(o=!1),$t(e)===0?(o?Object.keys:Mt)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function $t(e){var t=e[j];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ln(e)?2:cn(e)?3:0}function Dt(e,t){return $t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Nc(e,t){return $t(e)===2?e.get(t):e[t]}function oa(e,t,o){var n=$t(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function na(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ln(e){return _c&&e instanceof Map}function cn(e){return kc&&e instanceof Set}function st(e){return e.o||e.t}function dn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=sa(e);delete t[j];for(var o=Mt(t),n=0;n<o.length;n++){var i=o[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function pn(e,t){return t===void 0&&(t=!1),un(e)||Ye(e)||!We(e)||($t(e)>1&&(e.set=e.add=e.clear=e.delete=Ic),Object.freeze(e),t&&Ct(e,function(o,n){return pn(n,!0)},!0)),e}function Ic(){De(2)}function un(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ve(e){var t=sn[e];return t||De(18,e),t}function Pc(e,t){sn[e]||(sn[e]=t)}function on(){return fr}function Qo(e,t){t&&(Ve("Patches"),e.u=[],e.s=[],e.v=t)}function qr(e){nn(e),e.p.forEach(Lc),e.p=null}function nn(e){e===fr&&(fr=e.l)}function Yi(e){return fr={p:[],l:fr,h:e,m:!0,_:0}}function Lc(e){var t=e[j];t.i===0||t.i===1?t.j():t.g=!0}function en(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ve("ES5").S(t,e,n),n?(o[j].P&&(qr(t),De(4)),We(e)&&(e=Yr(t,e),t.l||Xr(t,e)),t.u&&Ve("Patches").M(o[j].t,e,t.u,t.s)):e=Yr(t,o,[]),qr(t),t.u&&t.v(t.u,t.s),e!==aa?e:void 0}function Yr(e,t,o){if(un(t))return t;var n=t[j];if(!n)return Ct(t,function(c,p){return Xi(e,n,t,c,p,o)},!0),t;if(n.A!==e)return t;if(!n.P)return Xr(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=dn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Ct(a,function(c,p){return Xi(e,n,i,c,p,o,s)}),Xr(e,i,!1),o&&e.u&&Ve("Patches").N(n,o,e.u,e.s)}return n.o}function Xi(e,t,o,n,i,a,s){if(Ye(i)){var c=Yr(e,i,a&&t&&t.i!==3&&!Dt(t.R,n)?a.concat(n):void 0);if(oa(o,n,c),!Ye(c))return;e.m=!1}else s&&o.add(i);if(We(i)&&!un(i)){if(!e.h.D&&e._<1)return;Yr(e,i),t&&t.A.l||Xr(e,i)}}function Xr(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&pn(t,o)}function tn(e,t){var o=e[j];return(o?st(o):e)[t]}function Ji(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function lt(e){e.P||(e.P=!0,e.l&&lt(e.l))}function rn(e){e.o||(e.o=dn(e.t))}function an(e,t,o){var n=ln(t)?Ve("MapSet").F(t,o):cn(t)?Ve("MapSet").T(t,o):e.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:on(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=hr;s&&(p=[c],u=ur);var f=Proxy.revocable(p,u),m=f.revoke,y=f.proxy;return c.k=y,c.j=m,y}(t,o):Ve("ES5").J(t,o);return(o?o.A:on()).p.push(n),n}function Tc(e){return Ye(e)||De(22,e),function t(o){if(!We(o))return o;var n,i=o[j],a=$t(o);if(i){if(!i.P&&(i.i<4||!Ve("ES5").K(i)))return i.t;i.I=!0,n=Qi(o,a),i.I=!1}else n=Qi(o,a);return Ct(n,function(s,c){i&&Nc(i.t,s)===c||oa(n,s,t(c))}),a===3?new Set(n):n}(e)}function Qi(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dn(e)}function ia(){function e(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[j];return hr.get(u,s)},set:function(u){var f=this[j];hr.set(f,s,u)}},p}function t(s){for(var c=s.length-1;c>=0;c--){var p=s[c][j];if(!p.P)switch(p.i){case 5:n(p)&&lt(p);break;case 4:o(p)&&lt(p)}}}function o(s){for(var c=s.t,p=s.k,u=Mt(p),f=u.length-1;f>=0;f--){var m=u[f];if(m!==j){var y=c[m];if(y===void 0&&!Dt(c,m))return!0;var x=p[m],b=x&&x[j];if(b?b.t!==y:!na(x,y))return!0}}var S=!!c[j];return u.length!==Mt(c).length+(S?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 u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&De(3,JSON.stringify(st(s)))}var a={};Pc("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(m,y){if(m){for(var x=Array(y.length),b=0;b<y.length;b++)Object.defineProperty(x,""+b,e(b,!0));return x}var S=sa(y);delete S[j];for(var R=Mt(S),w=0;w<R.length;w++){var A=R[w];S[A]=e(A,m||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(y),S)}(p,s),f={i:p?5:4,A:c?c.A:on(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,j,{value:f,writable:!0}),u},S:function(s,c,p){p?Ye(c)&&c[j].A===s&&t(s.p):(s.u&&function u(f){if(f&&typeof f=="object"){var m=f[j];if(m){var y=m.t,x=m.k,b=m.R,S=m.i;if(S===4)Ct(x,function(T){T!==j&&(y[T]!==void 0||Dt(y,T)?b[T]||u(x[T]):(b[T]=!0,lt(m)))}),Ct(y,function(T){x[T]!==void 0||Dt(x,T)||(b[T]=!1,lt(m))});else if(S===5){if(n(m)&&(lt(m),b.length=!0),x.length<y.length)for(var R=x.length;R<y.length;R++)b[R]=!1;else for(var w=y.length;w<x.length;w++)b[w]=!0;for(var A=Math.min(x.length,y.length),_=0;_<A;_++)x.hasOwnProperty(_)||(b[_]=!0),b[_]===void 0&&u(x[_])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ea,fr,fn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",_c=typeof Map<"u",kc=typeof Set<"u",ta=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",aa=fn?Symbol.for("immer-nothing"):((ea={})["immer-nothing"]=!0,ea),ra=fn?Symbol.for("immer-draftable"):"__$immer_draftable",j=fn?Symbol.for("immer-state"):"__$immer_state";var Dc=""+Object.prototype.constructor,Mt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,sa=Object.getOwnPropertyDescriptors||function(e){var t={};return Mt(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},sn={},hr={get:function(e,t){if(t===j)return e;var o=st(e);if(!Dt(o,t))return function(i,a,s){var c,p=Ji(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(e,o,t);var n=o[t];return e.I||!We(n)?n:n===tn(e.t,t)?(rn(e),e.o[t]=an(e.A.h,n,e)):n},has:function(e,t){return t in st(e)},ownKeys:function(e){return Reflect.ownKeys(st(e))},set:function(e,t,o){var n=Ji(st(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var i=tn(st(e),t),a=i?.[j];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(na(o,i)&&(o!==void 0||Dt(e.t,t)))return!0;rn(e),lt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return tn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,rn(e),lt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=st(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){De(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){De(12)}},ur={};Ct(hr,function(e,t){ur[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ur.deleteProperty=function(e,t){return ur.set.call(this,e,t,void 0)},ur.set=function(e,t,o){return hr.set.call(this,e[0],t,o,e[0])};var Mc=function(){function e(o){var n=this;this.O=ta,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(S){var R=this;S===void 0&&(S=c);for(var w=arguments.length,A=Array(w>1?w-1:0),_=1;_<w;_++)A[_-1]=arguments[_];return p.produce(S,function(T){var W;return(W=a).call.apply(W,[R,T].concat(A))})}}var u;if(typeof a!="function"&&De(6),s!==void 0&&typeof s!="function"&&De(7),We(i)){var f=Yi(n),m=an(n,i,void 0),y=!0;try{u=a(m),y=!1}finally{y?qr(f):nn(f)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Qo(f,s),en(S,f)},function(S){throw qr(f),S}):(Qo(f,s),en(u,f))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===aa&&(u=void 0),n.D&&pn(u,!0),s){var x=[],b=[];Ve("Patches").M(i,u,x,b),s(x,b)}return u}De(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var f=arguments.length,m=Array(f>1?f-1:0),y=1;y<f;y++)m[y-1]=arguments[y];return n.produceWithPatches(u,function(x){return i.apply(void 0,[x].concat(m))})};var s,c,p=n.produce(i,a,function(u,f){s=u,c=f});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){We(o)||De(8),Ye(o)&&(o=Tc(o));var n=Yi(this),i=an(this,o,void 0);return i[j].C=!0,nn(n),i},t.finishDraft=function(o,n){var i=o&&o[j],a=i.A;return Qo(a,n),en(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ta&&De(20),this.O=o},t.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=Ve("Patches").$;return Ye(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},e}(),Ae=new Mc,$c=Ae.produce,Gp=Ae.produceWithPatches.bind(Ae),Kp=Ae.setAutoFreeze.bind(Ae),Zp=Ae.setUseProxies.bind(Ae),qp=Ae.applyPatches.bind(Ae),Yp=Ae.createDraft.bind(Ae),Xp=Ae.finishDraft.bind(Ae),Jr=$c;function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(e)}function hn(e,t){if(ct(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(ct(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mn(e){var t=hn(e,"string");return ct(t)==="symbol"?t:String(t)}function yn(e,t,o){return t=mn(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function la(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,n)}return o}function Qr(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?la(Object(o),!0).forEach(function(n){yn(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):la(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function ue(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ca=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},eo={INIT:"@@redux/INIT"+gn(),REPLACE:"@@redux/REPLACE"+gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gn()}};function Uc(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function bn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ue(1));return o(bn)(e,t)}if(typeof e!="function")throw new Error(ue(2));var i=e,a=t,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function f(){if(p)throw new Error(ue(3));return a}function m(S){if(typeof S!="function")throw new Error(ue(4));if(p)throw new Error(ue(5));var R=!0;return u(),c.push(S),function(){if(R){if(p)throw new Error(ue(6));R=!1,u();var A=c.indexOf(S);c.splice(A,1),s=null}}}function y(S){if(!Uc(S))throw new Error(ue(7));if(typeof S.type>"u")throw new Error(ue(8));if(p)throw new Error(ue(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var R=s=c,w=0;w<R.length;w++){var A=R[w];A()}return S}function x(S){if(typeof S!="function")throw new Error(ue(10));i=S,y({type:eo.REPLACE})}function b(){var S,R=m;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(ue(11));function _(){A.next&&A.next(f())}_();var T=R(_);return{unsubscribe:T}}},S[ca]=function(){return this},S}return y({type:eo.INIT}),n={dispatch:y,subscribe:m,getState:f,replaceReducer:x},n[ca]=b,n}function Bc(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:eo.INIT});if(typeof n>"u")throw new Error(ue(12));if(typeof o(void 0,{type:eo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function da(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(o[i]=e[i])}var a=Object.keys(o),s,c;try{Bc(o)}catch(p){c=p}return function(u,f){if(u===void 0&&(u={}),c)throw c;if(0)var m;for(var y=!1,x={},b=0;b<a.length;b++){var S=a[b],R=o[S],w=u[S],A=R(w,f);if(typeof A>"u"){var _=f&&f.type;throw new Error(ue(14))}x[S]=A,y=y||A!==w}return y=y||a.length!==Object.keys(u).length,y?x:u}}function Ut(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function pa(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(ue(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(p){return p(s)});return a=Ut.apply(void 0,c)(i.dispatch),Qr(Qr({},i),{},{dispatch:a})}}}function ua(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,e):s(c)}}};return t}var fa=ua();fa.withExtraArgument=ua;var xn=fa;var ba=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Wc=function(e,t){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(u){return function(f){return p([u,f])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(f){u=[6,f],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Bt=function(e,t){for(var o=0,n=t.length,i=e.length;o<n;o++,i++)e[i]=t[o];return e},zc=Object.defineProperty,Fc=Object.defineProperties,Hc=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,jc=Object.prototype.propertyIsEnumerable,ma=function(e,t,o){return t in e?zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},dt=function(e,t){for(var o in t||(t={}))Vc.call(t,o)&&ma(e,o,t[o]);if(ha)for(var n=0,i=ha(t);n<i.length;n++){var o=i[n];jc.call(t,o)&&ma(e,o,t[o])}return e},vn=function(e,t){return Fc(e,Hc(t))},Gc=function(e,t,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(e,t)).next())})};var Kc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ut:Ut.apply(null,arguments)},mu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Zc(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var qc=function(e){ba(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array),Yc=function(e){ba(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array);function Cn(e){return We(e)?Jr(e,function(){}):e}function Xc(e){return typeof e=="boolean"}function Jc(){return function(t){return Qc(t)}}function Qc(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,c=new qc;if(o&&(Xc(o)?c.push(xn):c.push(xn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var Sn=!0;function xa(e){var t=Jc(),o=e||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?t():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,f=u===void 0?void 0:u,m=o.enhancers,y=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(Zc(i))x=da(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 b=s;if(typeof b=="function"&&(b=b(t),!Sn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sn&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=pa.apply(void 0,b),R=Ut;p&&(R=Kc(dt({trace:!Sn},typeof p=="object"&&p)));var w=new Yc(S),A=w;Array.isArray(y)?A=Bt([S],y):typeof y=="function"&&(A=y(w));var _=R.apply(void 0,A);return bn(x,f,_)}function pt(e,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return dt(dt({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function va(e){var t={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,o,n]}function ed(e){return typeof e=="function"}function td(e,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?va(t):[t,o,n],a=i[0],s=i[1],c=i[2],p;if(ed(e))p=function(){return Cn(e())};else{var u=Cn(e);p=function(){return u}}function f(m,y){m===void 0&&(m=p());var x=Bt([a[y.type]],s.filter(function(b){var S=b.matcher;return S(y)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[c]),x.reduce(function(b,S){if(S)if(Ye(b)){var R=b,w=S(R,y);return w===void 0?b:w}else{if(We(b))return Jr(b,function(A){return S(A,y)});var w=S(b,y);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},m)}return f.getInitialState=p,f}function rd(e,t){return e+"/"+t}function Sa(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Cn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(f){var m=n[f],y=rd(t,f),x,b;"reducer"in m?(x=m.reducer,b=m.prepare):x=m,a[f]=x,s[y]=x,c[f]=b?pt(y,b):pt(y)});function p(){var f=typeof e.extraReducers=="function"?va(e.extraReducers):[e.extraReducers],m=f[0],y=m===void 0?{}:m,x=f[1],b=x===void 0?[]:x,S=f[2],R=S===void 0?void 0:S,w=dt(dt({},y),s);return td(o,function(A){for(var _ in w)A.addCase(_,w[_]);for(var T=0,W=b;T<W.length;T++){var xe=W[T];A.addMatcher(xe.matcher,xe.reducer)}R&&A.addDefaultCase(R)})}var u;return{name:t,reducer:function(f,m){return u||(u=p()),u(f,m)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var od="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",nd=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=od[Math.random()*64|0];return t},id=["name","message","stack","code"],On=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),ya=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),ad=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=id;o<n.length;o++){var i=n[o];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},xu=function(){function e(t,o,n){var i=pt(t+"/fulfilled",function(f,m,y,x){return{payload:f,meta:vn(dt({},x||{}),{arg:y,requestId:m,requestStatus:"fulfilled"})}}),a=pt(t+"/pending",function(f,m,y){return{payload:void 0,meta:vn(dt({},y||{}),{arg:m,requestId:f,requestStatus:"pending"})}}),s=pt(t+"/rejected",function(f,m,y,x,b){return{payload:x,error:(n&&n.serializeError||ad)(f||"Rejected"),meta:vn(dt({},b||{}),{arg:y,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function f(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return f.prototype.abort=function(){},f}();function u(f){return function(m,y,x){var b=n?.idGenerator?n.idGenerator(f):nd(),S=new p,R,w=!1;function A(T){R=T,S.abort()}var _=function(){return Gc(this,null,function(){var T,W,xe,oe,sr,_e,h;return Wc(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),oe=(T=n?.condition)==null?void 0:T.call(n,f,{getState:y,extra:x}),ld(oe)?[4,oe]:[3,2];case 1:oe=v.sent(),v.label=2;case 2:if(oe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,sr=new Promise(function(N,V){return S.signal.addEventListener("abort",function(){return V({name:"AbortError",message:R||"Aborted"})})}),m(a(b,f,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:b,arg:f},{getState:y,extra:x}))),[4,Promise.race([sr,Promise.resolve(o(f,{dispatch:m,getState:y,extra:x,requestId:b,signal:S.signal,abort:A,rejectWithValue:function(N,V){return new On(N,V)},fulfillWithValue:function(N,V){return new ya(N,V)}})).then(function(N){if(N instanceof On)throw N;return N instanceof ya?i(N.payload,b,f,N.meta):i(N,b,f)})])];case 3:return xe=v.sent(),[3,5];case 4:return _e=v.sent(),xe=_e instanceof On?s(null,b,f,_e.payload,_e.meta):s(_e,b,f),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(xe)&&xe.meta.condition,h||m(xe),[2,xe]}})})}();return Object.assign(_,{abort:A,requestId:b,arg:f,unwrap:function(){return _.then(sd)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function sd(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ld(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oa="listener",Ca="completed",Ea="cancelled",vu="task-"+Ea,Su="task-"+Ca,Ou=Oa+"-"+Ea,Cu=Oa+"-"+Ca;var En="listenerMiddleware";var Eu=pt(En+"/add"),wu=pt(En+"/removeAll"),Au=pt(En+"/remove");var ga,Ru=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ga||(ga=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},cd=function(e){return function(t){setTimeout(t,e)}},Nu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cd(10);ia();window.ftReduxStores||(window.ftReduxStores={});var wa=class e{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(dr(a))return a;if(i==null)return;let s=Sa({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=xa({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new e(s,c)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Hr,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let u=c(...p);return this.reduxStore.dispatch(u),u}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var to=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getDateFormat(n,i)):t}static getDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}};var ro=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};function Aa(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(L)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}formatDateValues(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n?.key))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?this.formatMetadataDates(n):n}formatMetadataDates(n){return{key:n.key,label:n.label,values:n.values.map(i=>to.format(i,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat)),hierarchicalValues:n.hierarchicalValues}}}return ro([(0,wn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ro([(0,wn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ro([Jo({store:L.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),ro([Jo({store:L.name})],t.prototype,"uiLocale",void 0),t}var ao=g(I());var oo=class extends qe{async listMySearches(){let t=L.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var no=class extends qe{async listMyBookmarks(){let t=L.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var dd="ft-user-assets",io=ao.FtReduxStore.get({name:dd,initialState:{savedSearches:void 0,bookmarks:void 0}}),An=class{constructor(){this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new no,this.savedSearchesService=new oo,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=L.getState();(0,ao.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),io.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),io.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();io.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;io.actions.bookmarks(o)}}},tf=new An;var Rn=class{addCommand(t,o=!1){L.commands.add(t,o)}consumeCommand(t){return L.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Rn;var Ra=g(I()),Nn=class{highlightHtml(t,o){(0,Ra.highlightHtml)(t,o)}};window.FluidTopicsHighlightHtmlService=new Nn;var Na=g(I());var In=class{isDate(t){var o,n,i,a;return(a=(i=((n=(o=L.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,o){var n,i,a;return Na.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:L.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new In;(0,Ia.customElement)("ft-app-context")(Y);var Pn=class e extends Event{constructor(){super(e.eventName)}};Pn.eventName="search-context-clear-all-filters";var pd=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},_n=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Tn=Symbol("registerInterval");function ud(e){var t;class o extends e{constructor(){super(...arguments),this[t]=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[Tn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Tn]):this.dispatchEvent(new _n)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Tn,pd([(0,La.state)()],o.prototype,"stateManager",void 0),o}var so=class extends ud(Pa.FtLitElementRedux){};var lo=g(Z()),kn=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Mn=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Dn=Symbol("registerInterval");function fd(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Dn]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Dn]):this.dispatchEvent(new Mn)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Dn,kn([(0,lo.property)({attribute:!1})],o.prototype,"cluster",void 0),kn([(0,lo.property)({attribute:!1})],o.prototype,"result",void 0),kn([(0,lo.property)({attribute:!1,type:Number})],o.prototype,"rank",void 0),o}var co=class extends fd(so){};var Ma=g(I());var mo=g(B()),yo=g(Z()),go=g(I());var Ta=g(B());var _a=Ta.css`
16
+ `}update(t){super.update(t),t.has("baseUrl")&&(L.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&L.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&L.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&L.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&L.actions.noCustom(this.noCustom),t.has("editorMode")&&L.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&L.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&L.actions.session(this.session),t.has("availableUiLocales")&&L.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>kt.addContext(o)),t.has("openExternalDocumentInNewTab")&&L.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&L.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&L.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};Y.elementDefinitions={};Y.styles=_i;fe([(0,ke.property)()],Y.prototype,"baseUrl",void 0);fe([(0,ke.property)()],Y.prototype,"apiIntegrationIdentifier",void 0);fe([(0,ke.property)()],Y.prototype,"uiLocale",void 0);fe([(0,Be.jsonProperty)(null)],Y.prototype,"availableUiLocales",void 0);fe([(0,Be.jsonProperty)(null)],Y.prototype,"metadataConfiguration",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"editorMode",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"noCustom",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"openExternalDocumentInNewTab",void 0);fe([(0,ke.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Y.prototype,"noCustomComponent",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"withManualResources",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"navigatorOnline",void 0);fe([(0,ke.property)({type:Boolean})],Y.prototype,"forcedOffline",void 0);fe([(0,ke.property)({type:Object})],Y.prototype,"apiProvider",void 0);fe([(0,Be.jsonProperty)([])],Y.prototype,"messageContexts",void 0);fe([(0,Be.jsonProperty)(void 0)],Y.prototype,"session",void 0);var wn=g(Z());function Ac(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!zr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!zr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!zr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function zr(e,t){try{return Ac(e,t)}catch{return!1}}function Fr(e,t){return!zr(e,t)}var $i=g(Z(),1);var Jo=e=>{let t=e??{};return(o,n)=>{var i;let a={hasChanged:Fr,attribute:!1,...t};(0,$i.property)(a)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:c=>c[n],store:t.store})}};var Hr=class{constructor(){this.queue=[]}add(t,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var cr=g(Z(),1);var Ui=g(Z(),1);function Bi(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,Ui.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:Fr,...t??{}})}var Vr=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>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 zi=g(B(),1);var jr=window,Rc=jr.ShadowRoot&&(jr.ShadyCSS===void 0||jr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,kp=Symbol();var Wi=(e,t)=>{Rc?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=jr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)})};var Gr=class extends zi.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Wi(n,t.elementStyles),n}};var Kr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},ji,Fi=Symbol("constructorPrototype"),Hi=Symbol("constructorName"),Gi=Symbol("exportpartsDebouncer"),Vi=Symbol("dynamicDependenciesLoaded"),it=class extends Gr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ji]=new Vr(5),this[Hi]=this.constructor.name,this[Fi]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Hi]&&Object.setPrototypeOf(this,this[Fi])}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 t=this.constructor;t[Vi]||(t[Vi]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){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(t.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 t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Gi].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(t){var o,n,i,a,s,c;let p=y=>y!=null&&y.trim().length>0,u=t.filter(p).map(y=>y.trim());if(u.length===0){this.removeAttribute("exportparts");return}let f=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=y.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(c=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>f.add(S))}if(f.size===0){this.removeAttribute("exportparts");return}let m=[...f.values()].flatMap(y=>u.map(x=>`${y}:${x}--${y}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};ji=Gi;Kr([(0,cr.property)()],it.prototype,"exportpartsPrefix",void 0);Kr([Bi([])],it.prototype,"exportpartsPrefixes",void 0);Kr([(0,cr.property)()],it.prototype,"customStylesheet",void 0);Kr([(0,cr.state)()],it.prototype,"useAdoptedStyleSheets",void 0);function dr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ki,Zi,qi,Zr=Symbol("internalReduxEventsUnsubscribers"),at=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),pr=class extends it{constructor(){super(...arguments),this[Ki]=new Map,this[Zi]=new Map,this[qi]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[Ot].get(t)}addStore(t,o){var n;o=(n=o??(dr(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,t)}removeStore(t){let o=typeof t=="string"?t:t.name;this.unsubscribeFromStore(o),this[Ot].delete(o)}setupStore(t,o){this[Ot].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Ot].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[at].has(t.store):this[at].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[at].set(t,o.subscribe(()=>this.updateFromStores())),dr(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.eventBus.addEventListener(i.eventName,s),this[Zr].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[at].forEach((t,o)=>this.unsubscribeFromStore(o)),this[Zr].forEach(t=>t()),this[Zr]=[]}unsubscribeFromStore(t){this[at].has(t)&&this[at].get(t)(),this[at].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Ki=at,Zi=Ot,qi=Zr;pr.reduxProperties=new Map;pr.reduxReactiveProperties=new Set;pr.reduxEventListeners=new Map;function De(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ye(e){return!!e&&!!e[j]}function We(e){var t;return!!e&&(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)===Dc}(e)||Array.isArray(e)||!!e[ra]||!!(!((t=e.constructor)===null||t===void 0)&&t[ra])||ln(e)||cn(e))}function Ct(e,t,o){o===void 0&&(o=!1),$t(e)===0?(o?Object.keys:Mt)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function $t(e){var t=e[j];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ln(e)?2:cn(e)?3:0}function Dt(e,t){return $t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Nc(e,t){return $t(e)===2?e.get(t):e[t]}function oa(e,t,o){var n=$t(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function na(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ln(e){return _c&&e instanceof Map}function cn(e){return kc&&e instanceof Set}function st(e){return e.o||e.t}function dn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=sa(e);delete t[j];for(var o=Mt(t),n=0;n<o.length;n++){var i=o[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function pn(e,t){return t===void 0&&(t=!1),un(e)||Ye(e)||!We(e)||($t(e)>1&&(e.set=e.add=e.clear=e.delete=Ic),Object.freeze(e),t&&Ct(e,function(o,n){return pn(n,!0)},!0)),e}function Ic(){De(2)}function un(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ve(e){var t=sn[e];return t||De(18,e),t}function Pc(e,t){sn[e]||(sn[e]=t)}function on(){return fr}function Qo(e,t){t&&(Ve("Patches"),e.u=[],e.s=[],e.v=t)}function qr(e){nn(e),e.p.forEach(Lc),e.p=null}function nn(e){e===fr&&(fr=e.l)}function Yi(e){return fr={p:[],l:fr,h:e,m:!0,_:0}}function Lc(e){var t=e[j];t.i===0||t.i===1?t.j():t.g=!0}function en(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ve("ES5").S(t,e,n),n?(o[j].P&&(qr(t),De(4)),We(e)&&(e=Yr(t,e),t.l||Xr(t,e)),t.u&&Ve("Patches").M(o[j].t,e,t.u,t.s)):e=Yr(t,o,[]),qr(t),t.u&&t.v(t.u,t.s),e!==aa?e:void 0}function Yr(e,t,o){if(un(t))return t;var n=t[j];if(!n)return Ct(t,function(c,p){return Xi(e,n,t,c,p,o)},!0),t;if(n.A!==e)return t;if(!n.P)return Xr(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=dn(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Ct(a,function(c,p){return Xi(e,n,i,c,p,o,s)}),Xr(e,i,!1),o&&e.u&&Ve("Patches").N(n,o,e.u,e.s)}return n.o}function Xi(e,t,o,n,i,a,s){if(Ye(i)){var c=Yr(e,i,a&&t&&t.i!==3&&!Dt(t.R,n)?a.concat(n):void 0);if(oa(o,n,c),!Ye(c))return;e.m=!1}else s&&o.add(i);if(We(i)&&!un(i)){if(!e.h.D&&e._<1)return;Yr(e,i),t&&t.A.l||Xr(e,i)}}function Xr(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&pn(t,o)}function tn(e,t){var o=e[j];return(o?st(o):e)[t]}function Ji(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function lt(e){e.P||(e.P=!0,e.l&&lt(e.l))}function rn(e){e.o||(e.o=dn(e.t))}function an(e,t,o){var n=ln(t)?Ve("MapSet").F(t,o):cn(t)?Ve("MapSet").T(t,o):e.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:on(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=hr;s&&(p=[c],u=ur);var f=Proxy.revocable(p,u),m=f.revoke,y=f.proxy;return c.k=y,c.j=m,y}(t,o):Ve("ES5").J(t,o);return(o?o.A:on()).p.push(n),n}function Tc(e){return Ye(e)||De(22,e),function t(o){if(!We(o))return o;var n,i=o[j],a=$t(o);if(i){if(!i.P&&(i.i<4||!Ve("ES5").K(i)))return i.t;i.I=!0,n=Qi(o,a),i.I=!1}else n=Qi(o,a);return Ct(n,function(s,c){i&&Nc(i.t,s)===c||oa(n,s,t(c))}),a===3?new Set(n):n}(e)}function Qi(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dn(e)}function ia(){function e(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[j];return hr.get(u,s)},set:function(u){var f=this[j];hr.set(f,s,u)}},p}function t(s){for(var c=s.length-1;c>=0;c--){var p=s[c][j];if(!p.P)switch(p.i){case 5:n(p)&&lt(p);break;case 4:o(p)&&lt(p)}}}function o(s){for(var c=s.t,p=s.k,u=Mt(p),f=u.length-1;f>=0;f--){var m=u[f];if(m!==j){var y=c[m];if(y===void 0&&!Dt(c,m))return!0;var x=p[m],b=x&&x[j];if(b?b.t!==y:!na(x,y))return!0}}var S=!!c[j];return u.length!==Mt(c).length+(S?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 u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&De(3,JSON.stringify(st(s)))}var a={};Pc("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(m,y){if(m){for(var x=Array(y.length),b=0;b<y.length;b++)Object.defineProperty(x,""+b,e(b,!0));return x}var S=sa(y);delete S[j];for(var R=Mt(S),w=0;w<R.length;w++){var A=R[w];S[A]=e(A,m||!!S[A].enumerable)}return Object.create(Object.getPrototypeOf(y),S)}(p,s),f={i:p?5:4,A:c?c.A:on(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,j,{value:f,writable:!0}),u},S:function(s,c,p){p?Ye(c)&&c[j].A===s&&t(s.p):(s.u&&function u(f){if(f&&typeof f=="object"){var m=f[j];if(m){var y=m.t,x=m.k,b=m.R,S=m.i;if(S===4)Ct(x,function(T){T!==j&&(y[T]!==void 0||Dt(y,T)?b[T]||u(x[T]):(b[T]=!0,lt(m)))}),Ct(y,function(T){x[T]!==void 0||Dt(x,T)||(b[T]=!1,lt(m))});else if(S===5){if(n(m)&&(lt(m),b.length=!0),x.length<y.length)for(var R=x.length;R<y.length;R++)b[R]=!1;else for(var w=y.length;w<x.length;w++)b[w]=!0;for(var A=Math.min(x.length,y.length),_=0;_<A;_++)x.hasOwnProperty(_)||(b[_]=!0),b[_]===void 0&&u(x[_])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ea,fr,fn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",_c=typeof Map<"u",kc=typeof Set<"u",ta=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",aa=fn?Symbol.for("immer-nothing"):((ea={})["immer-nothing"]=!0,ea),ra=fn?Symbol.for("immer-draftable"):"__$immer_draftable",j=fn?Symbol.for("immer-state"):"__$immer_state";var Dc=""+Object.prototype.constructor,Mt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,sa=Object.getOwnPropertyDescriptors||function(e){var t={};return Mt(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},sn={},hr={get:function(e,t){if(t===j)return e;var o=st(e);if(!Dt(o,t))return function(i,a,s){var c,p=Ji(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(e,o,t);var n=o[t];return e.I||!We(n)?n:n===tn(e.t,t)?(rn(e),e.o[t]=an(e.A.h,n,e)):n},has:function(e,t){return t in st(e)},ownKeys:function(e){return Reflect.ownKeys(st(e))},set:function(e,t,o){var n=Ji(st(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var i=tn(st(e),t),a=i?.[j];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(na(o,i)&&(o!==void 0||Dt(e.t,t)))return!0;rn(e),lt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return tn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,rn(e),lt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=st(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){De(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){De(12)}},ur={};Ct(hr,function(e,t){ur[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ur.deleteProperty=function(e,t){return ur.set.call(this,e,t,void 0)},ur.set=function(e,t,o){return hr.set.call(this,e[0],t,o,e[0])};var Mc=function(){function e(o){var n=this;this.O=ta,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(S){var R=this;S===void 0&&(S=c);for(var w=arguments.length,A=Array(w>1?w-1:0),_=1;_<w;_++)A[_-1]=arguments[_];return p.produce(S,function(T){var W;return(W=a).call.apply(W,[R,T].concat(A))})}}var u;if(typeof a!="function"&&De(6),s!==void 0&&typeof s!="function"&&De(7),We(i)){var f=Yi(n),m=an(n,i,void 0),y=!0;try{u=a(m),y=!1}finally{y?qr(f):nn(f)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(S){return Qo(f,s),en(S,f)},function(S){throw qr(f),S}):(Qo(f,s),en(u,f))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===aa&&(u=void 0),n.D&&pn(u,!0),s){var x=[],b=[];Ve("Patches").M(i,u,x,b),s(x,b)}return u}De(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var f=arguments.length,m=Array(f>1?f-1:0),y=1;y<f;y++)m[y-1]=arguments[y];return n.produceWithPatches(u,function(x){return i.apply(void 0,[x].concat(m))})};var s,c,p=n.produce(i,a,function(u,f){s=u,c=f});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){We(o)||De(8),Ye(o)&&(o=Tc(o));var n=Yi(this),i=an(this,o,void 0);return i[j].C=!0,nn(n),i},t.finishDraft=function(o,n){var i=o&&o[j],a=i.A;return Qo(a,n),en(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ta&&De(20),this.O=o},t.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=Ve("Patches").$;return Ye(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},e}(),Ae=new Mc,$c=Ae.produce,Gp=Ae.produceWithPatches.bind(Ae),Kp=Ae.setAutoFreeze.bind(Ae),Zp=Ae.setUseProxies.bind(Ae),qp=Ae.applyPatches.bind(Ae),Yp=Ae.createDraft.bind(Ae),Xp=Ae.finishDraft.bind(Ae),Jr=$c;function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(e)}function hn(e,t){if(ct(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(ct(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mn(e){var t=hn(e,"string");return ct(t)==="symbol"?t:String(t)}function yn(e,t,o){return t=mn(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function la(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,n)}return o}function Qr(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?la(Object(o),!0).forEach(function(n){yn(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):la(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function ue(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var ca=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},eo={INIT:"@@redux/INIT"+gn(),REPLACE:"@@redux/REPLACE"+gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gn()}};function Uc(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function bn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ue(1));return o(bn)(e,t)}if(typeof e!="function")throw new Error(ue(2));var i=e,a=t,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function f(){if(p)throw new Error(ue(3));return a}function m(S){if(typeof S!="function")throw new Error(ue(4));if(p)throw new Error(ue(5));var R=!0;return u(),c.push(S),function(){if(R){if(p)throw new Error(ue(6));R=!1,u();var A=c.indexOf(S);c.splice(A,1),s=null}}}function y(S){if(!Uc(S))throw new Error(ue(7));if(typeof S.type>"u")throw new Error(ue(8));if(p)throw new Error(ue(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var R=s=c,w=0;w<R.length;w++){var A=R[w];A()}return S}function x(S){if(typeof S!="function")throw new Error(ue(10));i=S,y({type:eo.REPLACE})}function b(){var S,R=m;return S={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(ue(11));function _(){A.next&&A.next(f())}_();var T=R(_);return{unsubscribe:T}}},S[ca]=function(){return this},S}return y({type:eo.INIT}),n={dispatch:y,subscribe:m,getState:f,replaceReducer:x},n[ca]=b,n}function Bc(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:eo.INIT});if(typeof n>"u")throw new Error(ue(12));if(typeof o(void 0,{type:eo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function da(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(o[i]=e[i])}var a=Object.keys(o),s,c;try{Bc(o)}catch(p){c=p}return function(u,f){if(u===void 0&&(u={}),c)throw c;if(0)var m;for(var y=!1,x={},b=0;b<a.length;b++){var S=a[b],R=o[S],w=u[S],A=R(w,f);if(typeof A>"u"){var _=f&&f.type;throw new Error(ue(14))}x[S]=A,y=y||A!==w}return y=y||a.length!==Object.keys(u).length,y?x:u}}function Ut(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function pa(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(ue(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(p){return p(s)});return a=Ut.apply(void 0,c)(i.dispatch),Qr(Qr({},i),{},{dispatch:a})}}}function ua(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,e):s(c)}}};return t}var fa=ua();fa.withExtraArgument=ua;var xn=fa;var ba=function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Wc=function(e,t){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(u){return function(f){return p([u,f])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(f){u=[6,f],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Bt=function(e,t){for(var o=0,n=t.length,i=e.length;o<n;o++,i++)e[i]=t[o];return e},zc=Object.defineProperty,Fc=Object.defineProperties,Hc=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,jc=Object.prototype.propertyIsEnumerable,ma=function(e,t,o){return t in e?zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},dt=function(e,t){for(var o in t||(t={}))Vc.call(t,o)&&ma(e,o,t[o]);if(ha)for(var n=0,i=ha(t);n<i.length;n++){var o=i[n];jc.call(t,o)&&ma(e,o,t[o])}return e},vn=function(e,t){return Fc(e,Hc(t))},Gc=function(e,t,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(e,t)).next())})};var Kc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ut:Ut.apply(null,arguments)},mu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Zc(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var qc=function(e){ba(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array),Yc=function(e){ba(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.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(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array);function Cn(e){return We(e)?Jr(e,function(){}):e}function Xc(e){return typeof e=="boolean"}function Jc(){return function(t){return Qc(t)}}function Qc(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,c=new qc;if(o&&(Xc(o)?c.push(xn):c.push(xn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var Sn=!0;function xa(e){var t=Jc(),o=e||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?t():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,f=u===void 0?void 0:u,m=o.enhancers,y=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(Zc(i))x=da(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 b=s;if(typeof b=="function"&&(b=b(t),!Sn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sn&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=pa.apply(void 0,b),R=Ut;p&&(R=Kc(dt({trace:!Sn},typeof p=="object"&&p)));var w=new Yc(S),A=w;Array.isArray(y)?A=Bt([S],y):typeof y=="function"&&(A=y(w));var _=R.apply(void 0,A);return bn(x,f,_)}function pt(e,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return dt(dt({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function va(e){var t={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,o,n]}function ed(e){return typeof e=="function"}function td(e,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?va(t):[t,o,n],a=i[0],s=i[1],c=i[2],p;if(ed(e))p=function(){return Cn(e())};else{var u=Cn(e);p=function(){return u}}function f(m,y){m===void 0&&(m=p());var x=Bt([a[y.type]],s.filter(function(b){var S=b.matcher;return S(y)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[c]),x.reduce(function(b,S){if(S)if(Ye(b)){var R=b,w=S(R,y);return w===void 0?b:w}else{if(We(b))return Jr(b,function(A){return S(A,y)});var w=S(b,y);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},m)}return f.getInitialState=p,f}function rd(e,t){return e+"/"+t}function Sa(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Cn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(f){var m=n[f],y=rd(t,f),x,b;"reducer"in m?(x=m.reducer,b=m.prepare):x=m,a[f]=x,s[y]=x,c[f]=b?pt(y,b):pt(y)});function p(){var f=typeof e.extraReducers=="function"?va(e.extraReducers):[e.extraReducers],m=f[0],y=m===void 0?{}:m,x=f[1],b=x===void 0?[]:x,S=f[2],R=S===void 0?void 0:S,w=dt(dt({},y),s);return td(o,function(A){for(var _ in w)A.addCase(_,w[_]);for(var T=0,W=b;T<W.length;T++){var xe=W[T];A.addMatcher(xe.matcher,xe.reducer)}R&&A.addDefaultCase(R)})}var u;return{name:t,reducer:function(f,m){return u||(u=p()),u(f,m)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var od="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",nd=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=od[Math.random()*64|0];return t},id=["name","message","stack","code"],On=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),ya=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),ad=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=id;o<n.length;o++){var i=n[o];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},xu=function(){function e(t,o,n){var i=pt(t+"/fulfilled",function(f,m,y,x){return{payload:f,meta:vn(dt({},x||{}),{arg:y,requestId:m,requestStatus:"fulfilled"})}}),a=pt(t+"/pending",function(f,m,y){return{payload:void 0,meta:vn(dt({},y||{}),{arg:m,requestId:f,requestStatus:"pending"})}}),s=pt(t+"/rejected",function(f,m,y,x,b){return{payload:x,error:(n&&n.serializeError||ad)(f||"Rejected"),meta:vn(dt({},b||{}),{arg:y,requestId:m,rejectedWithValue:!!x,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function f(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return f.prototype.abort=function(){},f}();function u(f){return function(m,y,x){var b=n?.idGenerator?n.idGenerator(f):nd(),S=new p,R,w=!1;function A(T){R=T,S.abort()}var _=function(){return Gc(this,null,function(){var T,W,xe,oe,sr,_e,h;return Wc(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),oe=(T=n?.condition)==null?void 0:T.call(n,f,{getState:y,extra:x}),ld(oe)?[4,oe]:[3,2];case 1:oe=v.sent(),v.label=2;case 2:if(oe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,sr=new Promise(function(N,V){return S.signal.addEventListener("abort",function(){return V({name:"AbortError",message:R||"Aborted"})})}),m(a(b,f,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:b,arg:f},{getState:y,extra:x}))),[4,Promise.race([sr,Promise.resolve(o(f,{dispatch:m,getState:y,extra:x,requestId:b,signal:S.signal,abort:A,rejectWithValue:function(N,V){return new On(N,V)},fulfillWithValue:function(N,V){return new ya(N,V)}})).then(function(N){if(N instanceof On)throw N;return N instanceof ya?i(N.payload,b,f,N.meta):i(N,b,f)})])];case 3:return xe=v.sent(),[3,5];case 4:return _e=v.sent(),xe=_e instanceof On?s(null,b,f,_e.payload,_e.meta):s(_e,b,f),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(xe)&&xe.meta.condition,h||m(xe),[2,xe]}})})}();return Object.assign(_,{abort:A,requestId:b,arg:f,unwrap:function(){return _.then(sd)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function sd(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ld(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Oa="listener",Ca="completed",Ea="cancelled",vu="task-"+Ea,Su="task-"+Ca,Ou=Oa+"-"+Ea,Cu=Oa+"-"+Ca;var En="listenerMiddleware";var Eu=pt(En+"/add"),wu=pt(En+"/removeAll"),Au=pt(En+"/remove");var ga,Ru=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ga||(ga=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},cd=function(e){return function(t){setTimeout(t,e)}},Nu=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cd(10);ia();window.ftReduxStores||(window.ftReduxStores={});var wa=class e{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(dr(a))return a;if(i==null)return;let s=Sa({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=xa({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new e(s,c)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Hr,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,c=n[s];return c?(...p)=>{let u=c(...p);return this.reduxStore.dispatch(u),u}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var to=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getDateFormat(n,i)):t}static getDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}};var ro=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a};function Aa(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(L)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}formatDateValues(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n?.key))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?this.formatMetadataDates(n):n}formatMetadataDates(n){return{key:n.key,label:n.label,values:n.values.map(i=>to.format(i,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat)),hierarchicalValues:n.hierarchicalValues}}}return ro([(0,wn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ro([(0,wn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ro([Jo({store:L.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),ro([Jo({store:L.name})],t.prototype,"uiLocale",void 0),t}var ao=g(I());var oo=class extends qe{async listMySearches(){let t=L.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var no=class extends qe{async listMyBookmarks(){let t=L.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var dd="ft-user-assets",io=ao.FtReduxStore.get({name:dd,initialState:{savedSearches:void 0,bookmarks:void 0}}),An=class{constructor(){this.currentSession=L.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new no,this.savedSearchesService=new oo,L.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=L.getState();(0,ao.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),io.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),io.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();io.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;io.actions.bookmarks(o)}}},tf=new An;var Rn=class{addCommand(t,o=!1){L.commands.add(t,o)}consumeCommand(t){return L.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Rn;var Ra=g(I()),Nn=class{highlightHtml(t,o,n){(0,Ra.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Nn;var Na=g(I());var In=class{isDate(t){var o,n,i,a;return(a=(i=((n=(o=L.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,o){var n,i,a;return Na.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:L.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new In;(0,Ia.customElement)("ft-app-context")(Y);var Pn=class e extends Event{constructor(){super(e.eventName)}};Pn.eventName="search-context-clear-all-filters";var pd=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},_n=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Tn=Symbol("registerInterval");function ud(e){var t;class o extends e{constructor(){super(...arguments),this[t]=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[Tn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Tn]):this.dispatchEvent(new _n)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=Tn,pd([(0,La.state)()],o.prototype,"stateManager",void 0),o}var so=class extends ud(Pa.FtLitElementRedux){};var lo=g(Z()),kn=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Mn=class extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}},Dn=Symbol("registerInterval");function fd(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setResultStateManager(i){this.resultStateManager=i}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Dn]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Dn]):this.dispatchEvent(new Mn)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Dn,kn([(0,lo.property)({attribute:!1})],o.prototype,"cluster",void 0),kn([(0,lo.property)({attribute:!1})],o.prototype,"result",void 0),kn([(0,lo.property)({attribute:!1,type:Number})],o.prototype,"rank",void 0),o}var co=class extends fd(so){};var Ma=g(I());var mo=g(B()),yo=g(Z()),go=g(I());var Ta=g(B());var _a=Ta.css`
17
17
  `;var fo=g(I());var Da=g(Z()),hd=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},$n=Symbol("i18nAttributes"),po=Symbol("i18nProperties"),mr=Symbol("i18nUnsubs");function ho(e){var t;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Di:kt}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let p=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...p)}onI18nUpdate(i){var a,s;(a=this[$n])===null||a===void 0||a.forEach((c,p)=>{var u;let f=this.getI18nAttributeValue(p);((u=f?.context)===null||u===void 0?void 0:u.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(p,f,c)}),(s=this[po])===null||s===void 0||s.forEach((c,p)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[p]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[$n])===null||a===void 0||a.forEach((c,p)=>{let u=this.getI18nAttributeValue(p);u?.context&&u.key&&(i.has(p)||c.argsProvider!=null)&&(i.has(p)&&this.addI18nContext(u.context),this.updateI18nAttributeMessage(p,u,c))}),(s=this[po])===null||s===void 0||s.forEach((c,p)=>{c.argsProvider!=null&&(this[p]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[po])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[$n])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(p=>this.getI18nAttributeValue(p))].map(p=>p?.context)).forEach(p=>p&&this.addI18nMessages(p))}addI18nMessages(i,a){i=i.toLowerCase(),this[mr].has(i)||this[mr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[mr].forEach(i=>i()),this[mr].clear()}}return t=mr,hd([(0,Da.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var ka=class extends ho(fo.FtLitElement){},uo=class extends ho(fo.FtLitElementRedux){};var yr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},ze=class extends uo{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":mo.nothing:mo.html`
18
18
  <span class="ft-i18n">
19
19
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}