@fluid-topics/ft-search-result-missing-terms 1.1.100 → 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.
@@ -6,7 +6,7 @@
6
6
  `;var wt=E(_());var Go=E(_());var eo=E(Z()),j=E($()),q=E(_());var Yr=E(Z());var Xr=Yr.css`
7
7
  `;var nt=E(_()),ka="ft-app-info",zt=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Fa={session:(r,t)=>{(0,nt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>w.eventBus.dispatchEvent(new zt(t.payload)),0))}},w=nt.FtReduxStore.get({name:ka,reducers:Fa,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 ie=E(_());var Ht=E(_());var ge=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=w.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let a=w.subscribe(()=>{n=r.get(t),n&&(a(),o(n))})}})}};var te=class{constructor(t=!0,o){var n;this.overrideApi=o;let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Ht.CacheRegistry,this.cache=t?a.commonCache:new Ht.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ge.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ge.await()}clearCache(){this.cache.clearAll()}};var Qr,_a=Symbol("clearAfterUnitTest"),at=class extends te{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Qr]=()=>{this.defaultMessages={},this.cache=new ie.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.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 a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,ie.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...n){var a,i,c;t=t.toLowerCase(),this.fetchContext(t);let u=(i=(a=this.cache.getNow(t))===null||a===void 0?void 0:a.messages)!==null&&i!==void 0?i:{};return new ie.ParametrizedLabelResolver((c=this.defaultMessages[t])!==null&&c!==void 0?c:{},u).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 a;return(a=this.listeners[t])===null||a===void 0?void 0:a.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,ie.delay)(0).then(()=>o()).catch(()=>null)))}};Qr=_a;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends at{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends at{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var Ce=window.FluidTopicsI18nService,Jr=window.FluidTopicsCustomI18nService;var z=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},F=class extends q.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=()=>ge.get(),this.messageContexts=[],this.cache=new q.CacheRegistry,this.cleanSessionDebouncer=new q.Debouncer}render(){return eo.html`
8
8
  <slot></slot>
9
- `}update(t){super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("availableUiLocales")&&w.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ce.addContext(o)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.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())}};F.elementDefinitions={};F.styles=Xr;z([(0,j.property)()],F.prototype,"baseUrl",void 0);z([(0,j.property)()],F.prototype,"apiIntegrationIdentifier",void 0);z([(0,j.property)()],F.prototype,"uiLocale",void 0);z([(0,q.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);z([(0,q.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"editorMode",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"noCustom",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);z([(0,j.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"withManualResources",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);z([(0,j.property)({type:Object})],F.prototype,"apiProvider",void 0);z([(0,q.jsonProperty)([])],F.prototype,"messageContexts",void 0);z([(0,q.jsonProperty)(void 0)],F.prototype,"session",void 0);var Si=E($());function Ua(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!it(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!it(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!it(r[i],t[i]))return!1}return!0}return r!==r&&t!==t}function it(r,t){try{return Ua(r,t)}catch{return!1}}function $t(r,t){return!it(r,t)}var Da=E($(),1);var st=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 $e=E($(),1);var to=E($(),1);function ro(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,to.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:$t,...t??{}})}var ct=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 a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(u){a(u);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var no=E(Z(),1);var lt=window,Ma=lt.ShadowRoot&&(lt.ShadyCSS===void 0||lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ms=Symbol();var oo=(r,t)=>{Ma?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=lt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var ut=class extends no.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return oo(n,t.elementStyles),n}};var dt=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},co,ao=Symbol("constructorPrototype"),io=Symbol("constructorName"),lo=Symbol("exportpartsDebouncer"),so=Symbol("dynamicDependenciesLoaded"),se=class extends ut{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[co]=new ct(5),this[io]=this.constructor.name,this[ao]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[io]&&Object.setPrototypeOf(this,this[ao])}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[so]||(t[so]=!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,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}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[lo].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,c,u;let d=g=>g!=null&&g.trim().length>0,p=t.filter(d).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],b=(u=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(S=>S.split(":")[1]))!==null&&u!==void 0?u:[];new Array(...v,...b).filter(d).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};co=lo;dt([(0,$e.property)()],se.prototype,"exportpartsPrefix",void 0);dt([ro([])],se.prototype,"exportpartsPrefixes",void 0);dt([(0,$e.property)()],se.prototype,"customStylesheet",void 0);dt([(0,$e.state)()],se.prototype,"useAdoptedStyleSheets",void 0);function je(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var uo,po,fo,pt=Symbol("internalReduxEventsUnsubscribers"),ce=Symbol("internalStoresUnsubscribers"),me=Symbol("internalStores"),Ke=class extends se{constructor(){super(...arguments),this[uo]=new Map,this[po]=new Map,this[fo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[me].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[me].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[me].get(t)}addStore(t,o){var n;o=(n=o??(je(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[me].delete(o)}setupStore(t,o){this[me].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[me].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 a=this.getStore(t.store);a&&(t.store?this[ce].has(t.store):this[ce].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[ce].set(t,o.subscribe(()=>this.updateFromStores())),je(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=u=>this[i](u);o.eventBus.addEventListener(a.eventName,c),this[pt].push(()=>o.eventBus.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ce].forEach((t,o)=>this.unsubscribeFromStore(o)),this[pt].forEach(t=>t()),this[pt]=[]}unsubscribeFromStore(t){this[ce].has(t)&&this[ce].get(t)(),this[ce].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};uo=ce,po=me,fo=pt;Ke.reduxProperties=new Map;Ke.reduxReactiveProperties=new Set;Ke.reduxEventListeners=new Map;function K(r){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 a,i;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function re(r){return!!r&&!!r[L]}function Y(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ga}(r)||Array.isArray(r)||!!r[vo]||!!(!((t=r.constructor)===null||t===void 0)&&t[vo])||Qt(r)||Jt(r))}function be(r,t,o){o===void 0&&(o=!1),Ae(r)===0?(o?Object.keys:we)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function Ae(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:Qt(r)?2:Jt(r)?3:0}function Ee(r,t){return Ae(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Ba(r,t){return Ae(r)===2?r.get(t):r[t]}function So(r,t,o){var n=Ae(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Oo(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function Qt(r){return ja&&r instanceof Map}function Jt(r){return Ka&&r instanceof Set}function le(r){return r.o||r.t}function er(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=wo(r);delete t[L];for(var o=we(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function tr(r,t){return t===void 0&&(t=!1),rr(r)||re(r)||!Y(r)||(Ae(r)>1&&(r.set=r.add=r.clear=r.delete=Wa),Object.freeze(r),t&&be(r,function(o,n){return tr(n,!0)},!0)),r}function Wa(){K(2)}function rr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function J(r){var t=Xt[r];return t||K(18,r),t}function za(r,t){Xt[r]||(Xt[r]=t)}function Zt(){return Ve}function jt(r,t){t&&(J("Patches"),r.u=[],r.s=[],r.v=t)}function ft(r){qt(r),r.p.forEach(Ha),r.p=null}function qt(r){r===Ve&&(Ve=r.l)}function ho(r){return Ve={p:[],l:Ve,h:r,m:!0,_:0}}function Ha(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function Kt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||J("ES5").S(t,r,n),n?(o[L].P&&(ft(t),K(4)),Y(r)&&(r=ht(t,r),t.l||yt(t,r)),t.u&&J("Patches").M(o[L].t,r,t.u,t.s)):r=ht(t,o,[]),ft(t),t.u&&t.v(t.u,t.s),r!==Eo?r:void 0}function ht(r,t,o){if(rr(t))return t;var n=t[L];if(!n)return be(t,function(u,d){return yo(r,n,t,u,d,o)},!0),t;if(n.A!==r)return t;if(!n.P)return yt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=er(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),be(i,function(u,d){return yo(r,n,a,u,d,o,c)}),yt(r,a,!1),o&&r.u&&J("Patches").N(n,o,r.u,r.s)}return n.o}function yo(r,t,o,n,a,i,c){if(re(a)){var u=ht(r,a,i&&t&&t.i!==3&&!Ee(t.R,n)?i.concat(n):void 0);if(So(o,n,u),!re(u))return;r.m=!1}else c&&o.add(a);if(Y(a)&&!rr(a)){if(!r.h.D&&r._<1)return;ht(r,a),t&&t.A.l||yt(r,a)}}function yt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&tr(t,o)}function Gt(r,t){var o=r[L];return(o?le(o):r)[t]}function go(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ue(r){r.P||(r.P=!0,r.l&&ue(r.l))}function Vt(r){r.o||(r.o=er(r.t))}function Yt(r,t,o){var n=Qt(t)?J("MapSet").F(t,o):Jt(t)?J("MapSet").T(t,o):r.O?function(a,i){var c=Array.isArray(a),u={i:c?1:0,A:i?i.A:Zt(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=u,p=Ze;c&&(d=[u],p=Ge);var h=Proxy.revocable(d,p),y=h.revoke,g=h.proxy;return u.k=g,u.j=y,g}(t,o):J("ES5").J(t,o);return(o?o.A:Zt()).p.push(n),n}function $a(r){return re(r)||K(22,r),function t(o){if(!Y(o))return o;var n,a=o[L],i=Ae(o);if(a){if(!a.P&&(a.i<4||!J("ES5").K(a)))return a.t;a.I=!0,n=mo(o,i),a.I=!1}else n=mo(o,i);return be(n,function(c,u){a&&Ba(a.t,c)===u||So(n,c,t(u))}),i===3?new Set(n):n}(r)}function mo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return er(r)}function Co(){function r(c,u){var d=i[c];return d?d.enumerable=u:i[c]=d={configurable:!0,enumerable:u,get:function(){var p=this[L];return Ze.get(p,c)},set:function(p){var h=this[L];Ze.set(h,c,p)}},d}function t(c){for(var u=c.length-1;u>=0;u--){var d=c[u][L];if(!d.P)switch(d.i){case 5:n(d)&&ue(d);break;case 4:o(d)&&ue(d)}}}function o(c){for(var u=c.t,d=c.k,p=we(d),h=p.length-1;h>=0;h--){var y=p[h];if(y!==L){var g=u[y];if(g===void 0&&!Ee(u,y))return!0;var v=d[y],b=v&&v[L];if(b?b.t!==g:!Oo(v,g))return!0}}var S=!!u[L];return p.length!==we(u).length+(S?0:1)}function n(c){var u=c.k;if(u.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(u,u.length-1);if(d&&!d.get)return!0;for(var p=0;p<u.length;p++)if(!u.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&K(3,JSON.stringify(le(c)))}var i={};za("ES5",{J:function(c,u){var d=Array.isArray(c),p=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=wo(g);delete S[L];for(var R=we(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(d,c),h={i:d?5:4,A:u?u.A:Zt(),P:!1,I:!1,R:{},l:u,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,L,{value:h,writable:!0}),p},S:function(c,u,d){d?re(u)&&u[L].A===c&&t(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[L];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)be(v,function(I){I!==L&&(g[I]!==void 0||Ee(g,I)?b[I]||p(v[I]):(b[I]=!0,ue(y)))}),be(g,function(I){v[I]!==void 0||Ee(v,I)||(b[I]=!1,ue(y))});else if(S===5){if(n(y)&&(ue(y),b.length=!0),v.length<g.length)for(var R=v.length;R<g.length;R++)b[R]=!1;else for(var A=g.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,g.length),T=0;T<N;T++)v.hasOwnProperty(T)||(b[T]=!0),b[T]===void 0&&p(v[T])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var bo,Ve,or=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ja=typeof Map<"u",Ka=typeof Set<"u",xo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Eo=or?Symbol.for("immer-nothing"):((bo={})["immer-nothing"]=!0,bo),vo=or?Symbol.for("immer-draftable"):"__$immer_draftable",L=or?Symbol.for("immer-state"):"__$immer_state";var Ga=""+Object.prototype.constructor,we=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,wo=Object.getOwnPropertyDescriptors||function(r){var t={};return we(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Xt={},Ze={get:function(r,t){if(t===L)return r;var o=le(r);if(!Ee(o,t))return function(a,i,c){var u,d=go(i,c);return d?"value"in d?d.value:(u=d.get)===null||u===void 0?void 0:u.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!Y(n)?n:n===Gt(r.t,t)?(Vt(r),r.o[t]=Yt(r.A.h,n,r)):n},has:function(r,t){return t in le(r)},ownKeys:function(r){return Reflect.ownKeys(le(r))},set:function(r,t,o){var n=go(le(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=Gt(le(r),t),i=a?.[L];if(i&&i.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Oo(o,a)&&(o!==void 0||Ee(r.t,t)))return!0;Vt(r),ue(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Gt(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Vt(r),ue(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=le(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){K(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){K(12)}},Ge={};be(Ze,function(r,t){Ge[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ge.deleteProperty=function(r,t){return Ge.set.call(this,r,t,void 0)},Ge.set=function(r,t,o){return Ze.set.call(this,r[0],t,o,r[0])};var Va=function(){function r(o){var n=this;this.O=xo,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var u=i;i=a;var d=n;return function(S){var R=this;S===void 0&&(S=u);for(var A=arguments.length,N=Array(A>1?A-1:0),T=1;T<A;T++)N[T-1]=arguments[T];return d.produce(S,function(I){var Q;return(Q=i).call.apply(Q,[R,I].concat(N))})}}var p;if(typeof i!="function"&&K(6),c!==void 0&&typeof c!="function"&&K(7),Y(a)){var h=ho(n),y=Yt(n,a,void 0),g=!0;try{p=i(y),g=!1}finally{g?ft(h):qt(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return jt(h,c),Kt(S,h)},function(S){throw ft(h),S}):(jt(h,c),Kt(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Eo&&(p=void 0),n.D&&tr(p,!0),c){var v=[],b=[];J("Patches").M(a,p,v,b),c(v,b)}return p}K(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return a.apply(void 0,[v].concat(y))})};var c,u,d=n.produce(a,i,function(p,h){c=p,u=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,u]}):[d,c,u]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Y(o)||K(8),re(o)&&(o=$a(o));var n=ho(this),a=Yt(this,o,void 0);return a[L].C=!0,qt(n),a},t.finishDraft=function(o,n){var a=o&&o[L],i=a.A;return jt(i,n),Kt(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!xo&&K(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var c=J("Patches").$;return re(o)?c(o,n):this.produce(o,function(u){return c(u,n)})},r}(),H=new Va,Za=H.produce,Rs=H.produceWithPatches.bind(H),Ps=H.setAutoFreeze.bind(H),Ts=H.setUseProxies.bind(H),Ls=H.applyPatches.bind(H),ks=H.createDraft.bind(H),Fs=H.finishDraft.bind(H),gt=Za;function de(r){"@babel/helpers - typeof";return de=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},de(r)}function nr(r,t){if(de(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(de(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function ar(r){var t=nr(r,"string");return de(t)==="symbol"?t:String(t)}function ir(r,t,o){return t=ar(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Ao(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function mt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ao(Object(o),!0).forEach(function(n){ir(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Ao(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var No=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sr=function(){return Math.random().toString(36).substring(7).split("").join(".")},bt={INIT:"@@redux/INIT"+sr(),REPLACE:"@@redux/REPLACE"+sr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sr()}};function qa(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function cr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(cr)(r,t)}if(typeof r!="function")throw new Error(W(2));var a=r,i=t,c=[],u=c,d=!1;function p(){u===c&&(u=c.slice())}function h(){if(d)throw new Error(W(3));return i}function y(S){if(typeof S!="function")throw new Error(W(4));if(d)throw new Error(W(5));var R=!0;return p(),u.push(S),function(){if(R){if(d)throw new Error(W(6));R=!1,p();var N=u.indexOf(S);u.splice(N,1),c=null}}}function g(S){if(!qa(S))throw new Error(W(7));if(typeof S.type>"u")throw new Error(W(8));if(d)throw new Error(W(9));try{d=!0,i=a(i,S)}finally{d=!1}for(var R=c=u,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(W(10));a=S,g({type:bt.REPLACE})}function b(){var S,R=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(W(11));function T(){N.next&&N.next(h())}T();var I=R(T);return{unsubscribe:I}}},S[No]=function(){return this},S}return g({type:bt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[No]=b,n}function Ya(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:bt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:bt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function Io(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var i=Object.keys(o),c,u;try{Ya(o)}catch(d){u=d}return function(p,h){if(p===void 0&&(p={}),u)throw u;if(0)var y;for(var g=!1,v={},b=0;b<i.length;b++){var S=i[b],R=o[S],A=p[S],N=R(A,h);if(typeof N>"u"){var T=h&&h.type;throw new Error(W(14))}v[S]=N,g=g||N!==A}return g=g||i.length!==Object.keys(p).length,g?v:p}}function Ne(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ro(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(W(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},u=t.map(function(d){return d(c)});return i=Ne.apply(void 0,u)(a.dispatch),mt(mt({},a),{},{dispatch:i})}}}function Po(r){var t=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(u){return typeof u=="function"?u(a,i,r):c(u)}}};return t}var To=Po();To.withExtraArgument=Po;var lr=To;var Uo=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},r(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");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Xa=function(r,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ie=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},Qa=Object.defineProperty,Ja=Object.defineProperties,ei=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,ko=function(r,t,o){return t in r?Qa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},pe=function(r,t){for(var o in t||(t={}))ti.call(t,o)&&ko(r,o,t[o]);if(Lo)for(var n=0,a=Lo(t);n<a.length;n++){var o=a[n];ri.call(t,o)&&ko(r,o,t[o])}return r},ur=function(r,t){return Ja(r,ei(t))},oi=function(r,t,o){return new Promise(function(n,a){var i=function(d){try{u(o.next(d))}catch(p){a(p)}},c=function(d){try{u(o.throw(d))}catch(p){a(p)}},u=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,c)};u((o=o.apply(r,t)).next())})};var ni=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ne:Ne.apply(null,arguments)},Qs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function ai(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var ii=function(r){Uo(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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 r.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,Ie([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ie([void 0],o.concat(this))))},t}(Array),si=function(r){Uo(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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 r.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,Ie([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ie([void 0],o.concat(this))))},t}(Array);function fr(r){return Y(r)?gt(r,function(){}):r}function ci(r){return typeof r=="boolean"}function li(){return function(t){return ui(t)}}function ui(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,c=i===void 0?!0:i,u=new ii;if(o&&(ci(o)?u.push(lr):u.push(lr.withExtraArgument(o.extraArgument))),0){if(a)var d;if(c)var p}return u}var dr=!0;function Do(r){var t=li(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?t():i,u=o.devTools,d=u===void 0?!0:u,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof a=="function")v=a;else if(ai(a))v=Io(a);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=c;if(typeof b=="function"&&(b=b(t),!dr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!dr&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Ro.apply(void 0,b),R=Ne;d&&(R=ni(pe({trace:!dr},typeof d=="object"&&d)));var A=new si(S),N=A;Array.isArray(g)?N=Ie([S],g):typeof g=="function"&&(N=g(A));var T=R.apply(void 0,N);return cr(v,h,T)}function fe(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return pe(pe({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Mo(r){var t={},o=[],n,a={addCase:function(i,c){var u=typeof i=="string"?i:i.type;if(u in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[u]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[t,o,n]}function di(r){return typeof r=="function"}function pi(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Mo(t):[t,o,n],i=a[0],c=a[1],u=a[2],d;if(di(r))d=function(){return fr(r())};else{var p=fr(r);d=function(){return p}}function h(y,g){y===void 0&&(y=d());var v=Ie([i[g.type]],c.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[u]),v.reduce(function(b,S){if(S)if(re(b)){var R=b,A=S(R,g);return A===void 0?b:A}else{if(Y(b))return gt(b,function(N){return S(N,g)});var A=S(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},y)}return h.getInitialState=d,h}function fi(r,t){return r+"/"+t}function Bo(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:fr(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},c={},u={};a.forEach(function(h){var y=n[h],g=fi(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,i[h]=v,c[g]=v,u[h]=b?fe(g,b):fe(g)});function d(){var h=typeof r.extraReducers=="function"?Mo(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],R=S===void 0?void 0:S,A=pe(pe({},g),c);return pi(o,function(N){for(var T in A)N.addCase(T,A[T]);for(var I=0,Q=b;I<Q.length;I++){var V=Q[I];N.addMatcher(V.matcher,V.reducer)}R&&N.addDefaultCase(R)})}var p;return{name:t,reducer:function(h,y){return p||(p=d()),p(h,y)},actions:u,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var hi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=hi[Math.random()*64|0];return t},gi=["name","message","stack","code"],pr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Fo=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),mi=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=gi;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},rc=function(){function r(t,o,n){var a=fe(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:ur(pe({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(h,y,g){return{payload:void 0,meta:ur(pe({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=fe(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||mi)(h||"Rejected"),meta:ur(pe({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),u=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):yi(),S=new d,R,A=!1;function N(I){R=I,S.abort()}var T=function(){return oi(this,null,function(){var I,Q,V,B,tt,ee,f;return Xa(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),B=(I=n?.condition)==null?void 0:I.call(n,h,{getState:g,extra:v}),xi(B)?[4,B]:[3,2];case 1:B=m.sent(),m.label=2;case 2:if(B===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,tt=new Promise(function(O,k){return S.signal.addEventListener("abort",function(){return k({name:"AbortError",message:R||"Aborted"})})}),y(i(b,h,(Q=n?.getPendingMeta)==null?void 0:Q.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([tt,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(O,k){return new pr(O,k)},fulfillWithValue:function(O,k){return new Fo(O,k)}})).then(function(O){if(O instanceof pr)throw O;return O instanceof Fo?a(O.payload,b,h,O.meta):a(O,b,h)})])];case 3:return V=m.sent(),[3,5];case 4:return ee=m.sent(),V=ee instanceof pr?c(null,b,h,ee.payload,ee.meta):c(ee,b,h),[3,5];case 5:return f=n&&!n.dispatchConditionRejection&&c.match(V)&&V.meta.condition,f||y(V),[2,V]}})})}();return Object.assign(T,{abort:N,requestId:b,arg:h,unwrap:function(){return T.then(bi)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function bi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function xi(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Wo="listener",zo="completed",Ho="cancelled",oc="task-"+Ho,nc="task-"+zo,ac=Wo+"-"+Ho,ic=Wo+"-"+zo;var hr="listenerMiddleware";var sc=fe(hr+"/add"),cc=fe(hr+"/removeAll"),lc=fe(hr+"/remove");var _o,uc=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(_o||(_o=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},vi=function(r){return function(t){setTimeout(t,r)}},dc=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vi(10);Co();window.ftReduxStores||(window.ftReduxStores={});var $o=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(je(i))return i;if(a==null)return;let c=Bo({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),u=Do({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:c.reducer(d,p)});return window.ftReduxStores[a.name]=new r(c,u)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new st,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let c=a,u=n[c];return u?(...d)=>{let p=u(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:d})}}})}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 Ot=E(_());var xt=class extends te{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var vt=class extends te{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Oi="ft-user-assets",St=Ot.FtReduxStore.get({name:Oi,initialState:{savedSearches:void 0,bookmarks:void 0}}),yr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new vt,this.savedSearchesService=new xt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Ot.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(),St.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),St.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();St.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;St.actions.bookmarks(o)}}},Wc=new yr;var gr=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new gr;var jo=E(_()),mr=class{highlightHtml(t,o){(0,jo.highlightHtml)(t,o)}};window.FluidTopicsHighlightHtmlService=new mr;var Ko=E(_());var br=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return Ko.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new br;(0,Go.customElement)("ft-app-context")(F);var Zo=E($()),Ci=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},xr=Symbol("i18nAttributes"),Ct=Symbol("i18nProperties"),qe=Symbol("i18nUnsubs");function At(r){var t;class o extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Jr:Ce}i18n(a,i,...c){var u;if(typeof a=="string")return this.i18nService.resolveMessage(a,i,...c);let d=(u=a.args)!==null&&u!==void 0?u:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...d)}onI18nUpdate(a){var i,c;(i=this[xr])===null||i===void 0||i.forEach((u,d)=>{var p;let h=this.getI18nAttributeValue(d);((p=h?.context)===null||p===void 0?void 0:p.toLowerCase())===a.toLowerCase()&&this.updateI18nAttributeMessage(d,h,u)}),(c=this[Ct])===null||c===void 0||c.forEach((u,d)=>{u.context.toLowerCase()===a.toLowerCase()&&(this[d]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(a,i,c){this[a]={...i,message:this.i18n({context:i.context,key:i.key,...c})}}update(a){var i,c;super.update(a),(i=this[xr])===null||i===void 0||i.forEach((u,d)=>{let p=this.getI18nAttributeValue(d);p?.context&&p.key&&(a.has(d)||u.argsProvider!=null)&&(a.has(d)&&this.addI18nContext(p.context),this.updateI18nAttributeMessage(d,p,u))}),(c=this[Ct])===null||c===void 0||c.forEach((u,d)=>{u.argsProvider!=null&&(this[d]=this.i18n(u))})}getI18nAttributeValue(a){return this[a]}connectedCallback(){var a,i,c,u;super.connectedCallback(),new Set([...(i=(a=this[Ct])===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],...[...(u=(c=this[xr])===null||c===void 0?void 0:c.keys())!==null&&u!==void 0?u:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(a,i){a=a.toLowerCase(),this[qe].has(a)||this[qe].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,i??{}),this.onI18nUpdate(a)}addI18nContext(a,i){this.addI18nMessages(typeof a=="string"?a:a.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[qe].forEach(a=>a()),this[qe].clear()}}return t=qe,Ci([(0,Zo.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Vo=class extends At(wt.FtLitElement){},Et=class extends At(wt.FtLitElementRedux){};var Ye=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},X=class extends Et{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Nt.nothing:Nt.html`
9
+ `}update(t){super.update(t),t.has("baseUrl")&&(w.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&w.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&w.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&w.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&w.actions.noCustom(this.noCustom),t.has("editorMode")&&w.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&w.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&w.actions.session(this.session),t.has("availableUiLocales")&&w.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ce.addContext(o)),t.has("openExternalDocumentInNewTab")&&w.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&w.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&w.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())}};F.elementDefinitions={};F.styles=Xr;z([(0,j.property)()],F.prototype,"baseUrl",void 0);z([(0,j.property)()],F.prototype,"apiIntegrationIdentifier",void 0);z([(0,j.property)()],F.prototype,"uiLocale",void 0);z([(0,q.jsonProperty)(null)],F.prototype,"availableUiLocales",void 0);z([(0,q.jsonProperty)(null)],F.prototype,"metadataConfiguration",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"editorMode",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"noCustom",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"openExternalDocumentInNewTab",void 0);z([(0,j.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],F.prototype,"noCustomComponent",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"withManualResources",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"navigatorOnline",void 0);z([(0,j.property)({type:Boolean})],F.prototype,"forcedOffline",void 0);z([(0,j.property)({type:Object})],F.prototype,"apiProvider",void 0);z([(0,q.jsonProperty)([])],F.prototype,"messageContexts",void 0);z([(0,q.jsonProperty)(void 0)],F.prototype,"session",void 0);var Si=E($());function Ua(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,a;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!it(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!it(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=o;n--!==0;){var i=a[n];if(!it(r[i],t[i]))return!1}return!0}return r!==r&&t!==t}function it(r,t){try{return Ua(r,t)}catch{return!1}}function $t(r,t){return!it(r,t)}var Da=E($(),1);var st=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 $e=E($(),1);var to=E($(),1);function ro(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,to.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:$t,...t??{}})}var ct=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 a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(u){a(u);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var no=E(Z(),1);var lt=window,Ma=lt.ShadowRoot&&(lt.ShadyCSS===void 0||lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ms=Symbol();var oo=(r,t)=>{Ma?r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),a=lt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,r.appendChild(n)})};var ut=class extends no.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return oo(n,t.elementStyles),n}};var dt=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},co,ao=Symbol("constructorPrototype"),io=Symbol("constructorName"),lo=Symbol("exportpartsDebouncer"),so=Symbol("dynamicDependenciesLoaded"),se=class extends ut{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[co]=new ct(5),this[io]=this.constructor.name,this[ao]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[io]&&Object.setPrototypeOf(this,this[ao])}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[so]||(t[so]=!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,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}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[lo].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,a,i,c,u;let d=g=>g!=null&&g.trim().length>0,p=t.filter(d).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],b=(u=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(S=>S.split(":")[1]))!==null&&u!==void 0?u:[];new Array(...v,...b).filter(d).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};co=lo;dt([(0,$e.property)()],se.prototype,"exportpartsPrefix",void 0);dt([ro([])],se.prototype,"exportpartsPrefixes",void 0);dt([(0,$e.property)()],se.prototype,"customStylesheet",void 0);dt([(0,$e.state)()],se.prototype,"useAdoptedStyleSheets",void 0);function je(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var uo,po,fo,pt=Symbol("internalReduxEventsUnsubscribers"),ce=Symbol("internalStoresUnsubscribers"),me=Symbol("internalStores"),Ke=class extends se{constructor(){super(...arguments),this[uo]=new Map,this[po]=new Map,this[fo]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[me].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[me].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[me].get(t)}addStore(t,o){var n;o=(n=o??(je(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[me].delete(o)}setupStore(t,o){this[me].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[me].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 a=this.getStore(t.store);a&&(t.store?this[ce].has(t.store):this[ce].size>0)&&(this[o]=t.selector(a.getState(),this))}})}subscribeToStore(t,o){var n;this[ce].set(t,o.subscribe(()=>this.updateFromStores())),je(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let c=u=>this[i](u);o.eventBus.addEventListener(a.eventName,c),this[pt].push(()=>o.eventBus.removeEventListener(a.eventName,c))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[ce].forEach((t,o)=>this.unsubscribeFromStore(o)),this[pt].forEach(t=>t()),this[pt]=[]}unsubscribeFromStore(t){this[ce].has(t)&&this[ce].get(t)(),this[ce].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};uo=ce,po=me,fo=pt;Ke.reduxProperties=new Map;Ke.reduxReactiveProperties=new Set;Ke.reduxEventListeners=new Map;function K(r){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 a,i;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function re(r){return!!r&&!!r[L]}function Y(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ga}(r)||Array.isArray(r)||!!r[vo]||!!(!((t=r.constructor)===null||t===void 0)&&t[vo])||Qt(r)||Jt(r))}function be(r,t,o){o===void 0&&(o=!1),Ae(r)===0?(o?Object.keys:we)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,a){return t(a,n,r)})}function Ae(r){var t=r[L];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:Qt(r)?2:Jt(r)?3:0}function Ee(r,t){return Ae(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Ba(r,t){return Ae(r)===2?r.get(t):r[t]}function So(r,t,o){var n=Ae(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function Oo(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function Qt(r){return ja&&r instanceof Map}function Jt(r){return Ka&&r instanceof Set}function le(r){return r.o||r.t}function er(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=wo(r);delete t[L];for(var o=we(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:r[a]})}return Object.create(Object.getPrototypeOf(r),t)}function tr(r,t){return t===void 0&&(t=!1),rr(r)||re(r)||!Y(r)||(Ae(r)>1&&(r.set=r.add=r.clear=r.delete=Wa),Object.freeze(r),t&&be(r,function(o,n){return tr(n,!0)},!0)),r}function Wa(){K(2)}function rr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function J(r){var t=Xt[r];return t||K(18,r),t}function za(r,t){Xt[r]||(Xt[r]=t)}function Zt(){return Ve}function jt(r,t){t&&(J("Patches"),r.u=[],r.s=[],r.v=t)}function ft(r){qt(r),r.p.forEach(Ha),r.p=null}function qt(r){r===Ve&&(Ve=r.l)}function ho(r){return Ve={p:[],l:Ve,h:r,m:!0,_:0}}function Ha(r){var t=r[L];t.i===0||t.i===1?t.j():t.g=!0}function Kt(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||J("ES5").S(t,r,n),n?(o[L].P&&(ft(t),K(4)),Y(r)&&(r=ht(t,r),t.l||yt(t,r)),t.u&&J("Patches").M(o[L].t,r,t.u,t.s)):r=ht(t,o,[]),ft(t),t.u&&t.v(t.u,t.s),r!==Eo?r:void 0}function ht(r,t,o){if(rr(t))return t;var n=t[L];if(!n)return be(t,function(u,d){return yo(r,n,t,u,d,o)},!0),t;if(n.A!==r)return t;if(!n.P)return yt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=er(n.k):n.o,i=a,c=!1;n.i===3&&(i=new Set(a),a.clear(),c=!0),be(i,function(u,d){return yo(r,n,a,u,d,o,c)}),yt(r,a,!1),o&&r.u&&J("Patches").N(n,o,r.u,r.s)}return n.o}function yo(r,t,o,n,a,i,c){if(re(a)){var u=ht(r,a,i&&t&&t.i!==3&&!Ee(t.R,n)?i.concat(n):void 0);if(So(o,n,u),!re(u))return;r.m=!1}else c&&o.add(a);if(Y(a)&&!rr(a)){if(!r.h.D&&r._<1)return;ht(r,a),t&&t.A.l||yt(r,a)}}function yt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&tr(t,o)}function Gt(r,t){var o=r[L];return(o?le(o):r)[t]}function go(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ue(r){r.P||(r.P=!0,r.l&&ue(r.l))}function Vt(r){r.o||(r.o=er(r.t))}function Yt(r,t,o){var n=Qt(t)?J("MapSet").F(t,o):Jt(t)?J("MapSet").T(t,o):r.O?function(a,i){var c=Array.isArray(a),u={i:c?1:0,A:i?i.A:Zt(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=u,p=Ze;c&&(d=[u],p=Ge);var h=Proxy.revocable(d,p),y=h.revoke,g=h.proxy;return u.k=g,u.j=y,g}(t,o):J("ES5").J(t,o);return(o?o.A:Zt()).p.push(n),n}function $a(r){return re(r)||K(22,r),function t(o){if(!Y(o))return o;var n,a=o[L],i=Ae(o);if(a){if(!a.P&&(a.i<4||!J("ES5").K(a)))return a.t;a.I=!0,n=mo(o,i),a.I=!1}else n=mo(o,i);return be(n,function(c,u){a&&Ba(a.t,c)===u||So(n,c,t(u))}),i===3?new Set(n):n}(r)}function mo(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return er(r)}function Co(){function r(c,u){var d=i[c];return d?d.enumerable=u:i[c]=d={configurable:!0,enumerable:u,get:function(){var p=this[L];return Ze.get(p,c)},set:function(p){var h=this[L];Ze.set(h,c,p)}},d}function t(c){for(var u=c.length-1;u>=0;u--){var d=c[u][L];if(!d.P)switch(d.i){case 5:n(d)&&ue(d);break;case 4:o(d)&&ue(d)}}}function o(c){for(var u=c.t,d=c.k,p=we(d),h=p.length-1;h>=0;h--){var y=p[h];if(y!==L){var g=u[y];if(g===void 0&&!Ee(u,y))return!0;var v=d[y],b=v&&v[L];if(b?b.t!==g:!Oo(v,g))return!0}}var S=!!u[L];return p.length!==we(u).length+(S?0:1)}function n(c){var u=c.k;if(u.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(u,u.length-1);if(d&&!d.get)return!0;for(var p=0;p<u.length;p++)if(!u.hasOwnProperty(p))return!0;return!1}function a(c){c.g&&K(3,JSON.stringify(le(c)))}var i={};za("ES5",{J:function(c,u){var d=Array.isArray(c),p=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=wo(g);delete S[L];for(var R=we(S),A=0;A<R.length;A++){var N=R[A];S[N]=r(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(d,c),h={i:d?5:4,A:u?u.A:Zt(),P:!1,I:!1,R:{},l:u,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,L,{value:h,writable:!0}),p},S:function(c,u,d){d?re(u)&&u[L].A===c&&t(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[L];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)be(v,function(I){I!==L&&(g[I]!==void 0||Ee(g,I)?b[I]||p(v[I]):(b[I]=!0,ue(y)))}),be(g,function(I){v[I]!==void 0||Ee(v,I)||(b[I]=!1,ue(y))});else if(S===5){if(n(y)&&(ue(y),b.length=!0),v.length<g.length)for(var R=v.length;R<g.length;R++)b[R]=!1;else for(var A=g.length;A<v.length;A++)b[A]=!0;for(var N=Math.min(v.length,g.length),T=0;T<N;T++)v.hasOwnProperty(T)||(b[T]=!0),b[T]===void 0&&p(v[T])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var bo,Ve,or=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ja=typeof Map<"u",Ka=typeof Set<"u",xo=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Eo=or?Symbol.for("immer-nothing"):((bo={})["immer-nothing"]=!0,bo),vo=or?Symbol.for("immer-draftable"):"__$immer_draftable",L=or?Symbol.for("immer-state"):"__$immer_state";var Ga=""+Object.prototype.constructor,we=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,wo=Object.getOwnPropertyDescriptors||function(r){var t={};return we(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Xt={},Ze={get:function(r,t){if(t===L)return r;var o=le(r);if(!Ee(o,t))return function(a,i,c){var u,d=go(i,c);return d?"value"in d?d.value:(u=d.get)===null||u===void 0?void 0:u.call(a.k):void 0}(r,o,t);var n=o[t];return r.I||!Y(n)?n:n===Gt(r.t,t)?(Vt(r),r.o[t]=Yt(r.A.h,n,r)):n},has:function(r,t){return t in le(r)},ownKeys:function(r){return Reflect.ownKeys(le(r))},set:function(r,t,o){var n=go(le(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var a=Gt(le(r),t),i=a?.[L];if(i&&i.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(Oo(o,a)&&(o!==void 0||Ee(r.t,t)))return!0;Vt(r),ue(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Gt(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Vt(r),ue(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=le(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){K(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){K(12)}},Ge={};be(Ze,function(r,t){Ge[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ge.deleteProperty=function(r,t){return Ge.set.call(this,r,t,void 0)},Ge.set=function(r,t,o){return Ze.set.call(this,r[0],t,o,r[0])};var Va=function(){function r(o){var n=this;this.O=xo,this.D=!0,this.produce=function(a,i,c){if(typeof a=="function"&&typeof i!="function"){var u=i;i=a;var d=n;return function(S){var R=this;S===void 0&&(S=u);for(var A=arguments.length,N=Array(A>1?A-1:0),T=1;T<A;T++)N[T-1]=arguments[T];return d.produce(S,function(I){var Q;return(Q=i).call.apply(Q,[R,I].concat(N))})}}var p;if(typeof i!="function"&&K(6),c!==void 0&&typeof c!="function"&&K(7),Y(a)){var h=ho(n),y=Yt(n,a,void 0),g=!0;try{p=i(y),g=!1}finally{g?ft(h):qt(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return jt(h,c),Kt(S,h)},function(S){throw ft(h),S}):(jt(h,c),Kt(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Eo&&(p=void 0),n.D&&tr(p,!0),c){var v=[],b=[];J("Patches").M(a,p,v,b),c(v,b)}return p}K(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return a.apply(void 0,[v].concat(y))})};var c,u,d=n.produce(a,i,function(p,h){c=p,u=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,u]}):[d,c,u]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){Y(o)||K(8),re(o)&&(o=$a(o));var n=ho(this),a=Yt(this,o,void 0);return a[L].C=!0,qt(n),a},t.finishDraft=function(o,n){var a=o&&o[L],i=a.A;return jt(i,n),Kt(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!xo&&K(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var c=J("Patches").$;return re(o)?c(o,n):this.produce(o,function(u){return c(u,n)})},r}(),H=new Va,Za=H.produce,Rs=H.produceWithPatches.bind(H),Ps=H.setAutoFreeze.bind(H),Ts=H.setUseProxies.bind(H),Ls=H.applyPatches.bind(H),ks=H.createDraft.bind(H),Fs=H.finishDraft.bind(H),gt=Za;function de(r){"@babel/helpers - typeof";return de=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},de(r)}function nr(r,t){if(de(r)!=="object"||r===null)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(de(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function ar(r){var t=nr(r,"string");return de(t)==="symbol"?t:String(t)}function ir(r,t,o){return t=ar(t),t in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Ao(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),o.push.apply(o,n)}return o}function mt(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ao(Object(o),!0).forEach(function(n){ir(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Ao(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var No=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sr=function(){return Math.random().toString(36).substring(7).split("").join(".")},bt={INIT:"@@redux/INIT"+sr(),REPLACE:"@@redux/REPLACE"+sr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sr()}};function qa(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function cr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(cr)(r,t)}if(typeof r!="function")throw new Error(W(2));var a=r,i=t,c=[],u=c,d=!1;function p(){u===c&&(u=c.slice())}function h(){if(d)throw new Error(W(3));return i}function y(S){if(typeof S!="function")throw new Error(W(4));if(d)throw new Error(W(5));var R=!0;return p(),u.push(S),function(){if(R){if(d)throw new Error(W(6));R=!1,p();var N=u.indexOf(S);u.splice(N,1),c=null}}}function g(S){if(!qa(S))throw new Error(W(7));if(typeof S.type>"u")throw new Error(W(8));if(d)throw new Error(W(9));try{d=!0,i=a(i,S)}finally{d=!1}for(var R=c=u,A=0;A<R.length;A++){var N=R[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(W(10));a=S,g({type:bt.REPLACE})}function b(){var S,R=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(W(11));function T(){N.next&&N.next(h())}T();var I=R(T);return{unsubscribe:I}}},S[No]=function(){return this},S}return g({type:bt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[No]=b,n}function Ya(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:bt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:bt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function Io(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var a=t[n];typeof r[a]=="function"&&(o[a]=r[a])}var i=Object.keys(o),c,u;try{Ya(o)}catch(d){u=d}return function(p,h){if(p===void 0&&(p={}),u)throw u;if(0)var y;for(var g=!1,v={},b=0;b<i.length;b++){var S=i[b],R=o[S],A=p[S],N=R(A,h);if(typeof N>"u"){var T=h&&h.type;throw new Error(W(14))}v[S]=N,g=g||N!==A}return g=g||i.length!==Object.keys(p).length,g?v:p}}function Ne(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Ro(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(W(15))},c={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},u=t.map(function(d){return d(c)});return i=Ne.apply(void 0,u)(a.dispatch),mt(mt({},a),{},{dispatch:i})}}}function Po(r){var t=function(n){var a=n.dispatch,i=n.getState;return function(c){return function(u){return typeof u=="function"?u(a,i,r):c(u)}}};return t}var To=Po();To.withExtraArgument=Po;var lr=To;var Uo=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},r(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");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Xa=function(r,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Ie=function(r,t){for(var o=0,n=t.length,a=r.length;o<n;o++,a++)r[a]=t[o];return r},Qa=Object.defineProperty,Ja=Object.defineProperties,ei=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,ko=function(r,t,o){return t in r?Qa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},pe=function(r,t){for(var o in t||(t={}))ti.call(t,o)&&ko(r,o,t[o]);if(Lo)for(var n=0,a=Lo(t);n<a.length;n++){var o=a[n];ri.call(t,o)&&ko(r,o,t[o])}return r},ur=function(r,t){return Ja(r,ei(t))},oi=function(r,t,o){return new Promise(function(n,a){var i=function(d){try{u(o.next(d))}catch(p){a(p)}},c=function(d){try{u(o.throw(d))}catch(p){a(p)}},u=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,c)};u((o=o.apply(r,t)).next())})};var ni=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ne:Ne.apply(null,arguments)},Qs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function ai(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var ii=function(r){Uo(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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 r.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,Ie([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ie([void 0],o.concat(this))))},t}(Array),si=function(r){Uo(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=r.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}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 r.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,Ie([void 0],o[0].concat(this)))):new(t.bind.apply(t,Ie([void 0],o.concat(this))))},t}(Array);function fr(r){return Y(r)?gt(r,function(){}):r}function ci(r){return typeof r=="boolean"}function li(){return function(t){return ui(t)}}function ui(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,c=i===void 0?!0:i,u=new ii;if(o&&(ci(o)?u.push(lr):u.push(lr.withExtraArgument(o.extraArgument))),0){if(a)var d;if(c)var p}return u}var dr=!0;function Do(r){var t=li(),o=r||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,c=i===void 0?t():i,u=o.devTools,d=u===void 0?!0:u,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof a=="function")v=a;else if(ai(a))v=Io(a);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=c;if(typeof b=="function"&&(b=b(t),!dr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!dr&&b.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Ro.apply(void 0,b),R=Ne;d&&(R=ni(pe({trace:!dr},typeof d=="object"&&d)));var A=new si(S),N=A;Array.isArray(g)?N=Ie([S],g):typeof g=="function"&&(N=g(A));var T=R.apply(void 0,N);return cr(v,h,T)}function fe(r,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return pe(pe({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Mo(r){var t={},o=[],n,a={addCase:function(i,c){var u=typeof i=="string"?i:i.type;if(u in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[u]=c,a},addMatcher:function(i,c){return o.push({matcher:i,reducer:c}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[t,o,n]}function di(r){return typeof r=="function"}function pi(r,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Mo(t):[t,o,n],i=a[0],c=a[1],u=a[2],d;if(di(r))d=function(){return fr(r())};else{var p=fr(r);d=function(){return p}}function h(y,g){y===void 0&&(y=d());var v=Ie([i[g.type]],c.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[u]),v.reduce(function(b,S){if(S)if(re(b)){var R=b,A=S(R,g);return A===void 0?b:A}else{if(Y(b))return gt(b,function(N){return S(N,g)});var A=S(b,g);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return b},y)}return h.getInitialState=d,h}function fi(r,t){return r+"/"+t}function Bo(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:fr(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},c={},u={};a.forEach(function(h){var y=n[h],g=fi(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,i[h]=v,c[g]=v,u[h]=b?fe(g,b):fe(g)});function d(){var h=typeof r.extraReducers=="function"?Mo(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],R=S===void 0?void 0:S,A=pe(pe({},g),c);return pi(o,function(N){for(var T in A)N.addCase(T,A[T]);for(var I=0,Q=b;I<Q.length;I++){var V=Q[I];N.addMatcher(V.matcher,V.reducer)}R&&N.addDefaultCase(R)})}var p;return{name:t,reducer:function(h,y){return p||(p=d()),p(h,y)},actions:u,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var hi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yi=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=hi[Math.random()*64|0];return t},gi=["name","message","stack","code"],pr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),Fo=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),mi=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=gi;o<n.length;o++){var a=n[o];typeof r[a]=="string"&&(t[a]=r[a])}return t}return{message:String(r)}},rc=function(){function r(t,o,n){var a=fe(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:ur(pe({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(h,y,g){return{payload:void 0,meta:ur(pe({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=fe(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||mi)(h||"Rejected"),meta:ur(pe({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),u=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):yi(),S=new d,R,A=!1;function N(I){R=I,S.abort()}var T=function(){return oi(this,null,function(){var I,Q,V,B,tt,ee,f;return Xa(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),B=(I=n?.condition)==null?void 0:I.call(n,h,{getState:g,extra:v}),xi(B)?[4,B]:[3,2];case 1:B=m.sent(),m.label=2;case 2:if(B===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,tt=new Promise(function(O,k){return S.signal.addEventListener("abort",function(){return k({name:"AbortError",message:R||"Aborted"})})}),y(i(b,h,(Q=n?.getPendingMeta)==null?void 0:Q.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([tt,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(O,k){return new pr(O,k)},fulfillWithValue:function(O,k){return new Fo(O,k)}})).then(function(O){if(O instanceof pr)throw O;return O instanceof Fo?a(O.payload,b,h,O.meta):a(O,b,h)})])];case 3:return V=m.sent(),[3,5];case 4:return ee=m.sent(),V=ee instanceof pr?c(null,b,h,ee.payload,ee.meta):c(ee,b,h),[3,5];case 5:return f=n&&!n.dispatchConditionRejection&&c.match(V)&&V.meta.condition,f||y(V),[2,V]}})})}();return Object.assign(T,{abort:N,requestId:b,arg:h,unwrap:function(){return T.then(bi)}})}}return Object.assign(p,{pending:i,rejected:c,fulfilled:a,typePrefix:t})}return r.withTypes=function(){return r},r}();function bi(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function xi(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Wo="listener",zo="completed",Ho="cancelled",oc="task-"+Ho,nc="task-"+zo,ac=Wo+"-"+Ho,ic=Wo+"-"+zo;var hr="listenerMiddleware";var sc=fe(hr+"/add"),cc=fe(hr+"/removeAll"),lc=fe(hr+"/remove");var _o,uc=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(_o||(_o=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},vi=function(r){return function(t){setTimeout(t,r)}},dc=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vi(10);Co();window.ftReduxStores||(window.ftReduxStores={});var $o=class r{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(je(i))return i;if(a==null)return;let c=Bo({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),u=Do({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?c.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:c.reducer(d,p)});return window.ftReduxStores[a.name]=new r(c,u)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new st,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,a,i)=>{let c=a,u=n[c];return u?(...d)=>{let p=u(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[c]:d})}}})}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 Ot=E(_());var xt=class extends te{async listMySearches(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var vt=class extends te{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Oi="ft-user-assets",St=Ot.FtReduxStore.get({name:Oi,initialState:{savedSearches:void 0,bookmarks:void 0}}),yr=class{constructor(){this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new vt,this.savedSearchesService=new xt,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=w.getState();(0,Ot.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(),St.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),St.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();St.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;St.actions.bookmarks(o)}}},Wc=new yr;var gr=class{addCommand(t,o=!1){w.commands.add(t,o)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new gr;var jo=E(_()),mr=class{highlightHtml(t,o,n){(0,jo.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new mr;var Ko=E(_());var br=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=w.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(u=>u.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i;return Ko.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new br;(0,Go.customElement)("ft-app-context")(F);var Zo=E($()),Ci=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},xr=Symbol("i18nAttributes"),Ct=Symbol("i18nProperties"),qe=Symbol("i18nUnsubs");function At(r){var t;class o extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Jr:Ce}i18n(a,i,...c){var u;if(typeof a=="string")return this.i18nService.resolveMessage(a,i,...c);let d=(u=a.args)!==null&&u!==void 0?u:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...d)}onI18nUpdate(a){var i,c;(i=this[xr])===null||i===void 0||i.forEach((u,d)=>{var p;let h=this.getI18nAttributeValue(d);((p=h?.context)===null||p===void 0?void 0:p.toLowerCase())===a.toLowerCase()&&this.updateI18nAttributeMessage(d,h,u)}),(c=this[Ct])===null||c===void 0||c.forEach((u,d)=>{u.context.toLowerCase()===a.toLowerCase()&&(this[d]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(a,i,c){this[a]={...i,message:this.i18n({context:i.context,key:i.key,...c})}}update(a){var i,c;super.update(a),(i=this[xr])===null||i===void 0||i.forEach((u,d)=>{let p=this.getI18nAttributeValue(d);p?.context&&p.key&&(a.has(d)||u.argsProvider!=null)&&(a.has(d)&&this.addI18nContext(p.context),this.updateI18nAttributeMessage(d,p,u))}),(c=this[Ct])===null||c===void 0||c.forEach((u,d)=>{u.argsProvider!=null&&(this[d]=this.i18n(u))})}getI18nAttributeValue(a){return this[a]}connectedCallback(){var a,i,c,u;super.connectedCallback(),new Set([...(i=(a=this[Ct])===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],...[...(u=(c=this[xr])===null||c===void 0?void 0:c.keys())!==null&&u!==void 0?u:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(a,i){a=a.toLowerCase(),this[qe].has(a)||this[qe].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,i??{}),this.onI18nUpdate(a)}addI18nContext(a,i){this.addI18nMessages(typeof a=="string"?a:a.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[qe].forEach(a=>a()),this[qe].clear()}}return t=qe,Ci([(0,Zo.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var Vo=class extends At(wt.FtLitElement){},Et=class extends At(wt.FtLitElementRedux){};var Ye=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},X=class extends Et{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Nt.nothing:Nt.html`
10
10
  <span class="ft-i18n">
11
11
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
12
12
  </span>