@fluid-topics/ft-reader-toc 1.2.46 → 1.2.48

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.
@@ -1208,7 +1208,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
1208
1208
  `;var et=class extends nc.FtLitElement{render(){return rc.html`
1209
1209
  `}};et.elementDefinitions={};et.styles=oc;(0,ac.customElement)("ft-skeleton")(et);var ll=b(L());var dr=b($()),fr=b(Z()),pr=b(L());var ic=b($());var cc=ic.css`
1210
1210
  `;var lr=b(L());var al=b(L());var fc=b($()),de=b(Z()),Re=b(L());var lc=b($());var sc=lc.css`
1211
- `;var Mo=b(L()),Zl="ft-app-info",jr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Yl={session:(o,t)=>{(0,Mo.deepEqual)(o.session,t.payload)||(o.session=t.payload,setTimeout(()=>I.dispatchEvent(new jr(t.payload)),0))}},I=Mo.FtReduxStore.get({name:Zl,reducers:Yl,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Be=b(L());var Vr=b(L());var bt=class o{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=o.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=o.get(t),n&&(a(),r(n))})}})}};var fo=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:bt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):bt.await()}};var tt=class extends fo{constructor(t=!0,r){var n;super(r);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Vr.CacheRegistry,this.cache=t?a.commonCache:new Vr.CacheRegistry}clearCache(){this.cache.clearAll()}};var dc,ql=Symbol("clearAfterUnitTest"),Uo=class extends tt{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[dc]=()=>{this.defaultMessages={},this.cache=new Be.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Be.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}await this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),l=this.resolveContext(i);return new Be.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},l).resolve(r,...n)}async fetchContext(t){var r,n,a;if(!this.cache.has(t))if(((n=(r=window.process)===null||r===void 0?void 0:r.env)===null||n===void 0?void 0:n.NODE_ENV)==="test")this.cache.set(t,(a=this.defaultMessages[t])!==null&&a!==void 0?a:{});else try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(i){i instanceof Be.CanceledPromiseError||console.error(i)}}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}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(r=>(0,Be.delay)(0).then(()=>r()).catch(()=>null)))}};dc=ql;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Uo{constructor(){super(async(o,t)=>(await this.awaitApi).getFluidTopicsMessageContext(o,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Uo{constructor(){super(async(o,t)=>(await this.awaitApi).getCustomMessageContext(o,t))}});var Mt=window.FluidTopicsI18nService,Ho=window.FluidTopicsCustomI18nService;var te=function(o,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,t,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(i=(a<3?l(i):a>3?l(t,r,i):l(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},V=class extends Re.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=()=>bt.get(),this.messageContexts=[],this.cache=new Re.CacheRegistry,this.cleanSessionDebouncer=new Re.Debouncer}render(){return fc.html`
1211
+ `;var Mo=b(L()),Zl="ft-app-info",jr=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},Yl={session:(o,t)=>{(0,Mo.deepEqual)(o.session,t.payload)||(o.session=t.payload,setTimeout(()=>I.dispatchEvent(new jr(t.payload)),0))}},I=Mo.FtReduxStore.get({name:Zl,reducers:Yl,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Be=b(L());var Vr=b(L());var bt=class o{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=o.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=o.get(t),n&&(a(),r(n))})}})}};var fo=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:bt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):bt.await()}};var tt=class extends fo{constructor(t=!0,r){var n;super(r);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Vr.CacheRegistry,this.cache=t?a.commonCache:new Vr.CacheRegistry}clearCache(){this.cache.clearAll()}};var dc,ql=Symbol("clearAfterUnitTest"),Uo=class extends tt{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[dc]=()=>{this.defaultMessages={},this.cache=new Be.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Be.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),l=this.resolveContext(i);return new Be.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},l).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t))}catch(a){a instanceof Be.CanceledPromiseError||console.error(a)}return r&&await this.notify(t),n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}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(r=>(0,Be.delay)(0).then(()=>r()).catch(()=>null)))}};dc=ql;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Uo{constructor(){super(async(o,t)=>(await this.awaitApi).getFluidTopicsMessageContext(o,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Uo{constructor(){super(async(o,t)=>(await this.awaitApi).getCustomMessageContext(o,t))}});var Mt=window.FluidTopicsI18nService,Ho=window.FluidTopicsCustomI18nService;var te=function(o,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,t,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(i=(a<3?l(i):a>3?l(t,r,i):l(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},V=class extends Re.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=()=>bt.get(),this.messageContexts=[],this.cache=new Re.CacheRegistry,this.cleanSessionDebouncer=new Re.Debouncer}render(){return fc.html`
1212
1212
  <slot></slot>
1213
1213
  `}update(t){var r,n,a,i,l;super.update(t),t.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&I.actions.noCustom(this.noCustom),t.has("editorMode")&&I.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(s=>Mt.addContext(s)),t.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(I.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),I.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((l=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};V.elementDefinitions={};V.styles=sc;te([(0,de.property)()],V.prototype,"baseUrl",void 0);te([(0,de.property)()],V.prototype,"apiIntegrationIdentifier",void 0);te([(0,de.property)()],V.prototype,"uiLocale",void 0);te([(0,Re.jsonProperty)(null)],V.prototype,"availableUiLocales",void 0);te([(0,Re.jsonProperty)(null)],V.prototype,"metadataConfiguration",void 0);te([(0,de.property)({type:Boolean})],V.prototype,"editorMode",void 0);te([(0,de.property)({type:Boolean})],V.prototype,"noCustom",void 0);te([(0,de.property)({type:Boolean})],V.prototype,"openExternalDocumentInNewTab",void 0);te([(0,de.property)({converter:{fromAttribute(o){return o==="false"?!1:o==="true"||(o??!1)}}})],V.prototype,"noCustomComponent",void 0);te([(0,de.property)({type:Boolean})],V.prototype,"withManualResources",void 0);te([(0,de.property)({type:Boolean})],V.prototype,"navigatorOnline",void 0);te([(0,de.property)({type:Boolean})],V.prototype,"forcedOffline",void 0);te([(0,de.property)({type:Object})],V.prototype,"apiProvider",void 0);te([(0,Re.jsonProperty)([])],V.prototype,"messageContexts",void 0);te([(0,Re.jsonProperty)(void 0)],V.prototype,"session",void 0);te([(0,de.state)()],V.prototype,"localesConfiguration",void 0);var Ws=b(Z());function Xl(o,t){if(o===t)return!0;if(o&&t&&typeof o=="object"&&typeof t=="object"){if(o.constructor!==t.constructor)return!1;var r,n,a;if(Array.isArray(o)){if(r=o.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Go(o[n],t[n]))return!1;return!0}if(o instanceof Map&&t instanceof Map){if(o.size!==t.size)return!1;for(n of o.entries())if(!t.has(n[0]))return!1;for(n of o.entries())if(!Go(n[1],t.get(n[0])))return!1;return!0}if(o instanceof Set&&t instanceof Set){if(o.size!==t.size)return!1;for(n of o.entries())if(!t.has(n[0]))return!1;return!0}if(o.constructor===RegExp)return o.source===t.source&&o.flags===t.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===t.valueOf();let i=l=>Object.keys(l).filter(s=>l[s]!=null);if(a=i(o),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let l=a[n];if(!Go(o[l],t[l]))return!1}return!0}return o!==o&&t!==t||o==null&&t==null}function Go(o,t){try{return Xl(o,t)}catch{return!1}}function Fo(o,t){return!Go(o,t)}var Jl=b(Z(),1);var jo=class{constructor(){this.queue=[]}add(t,r=!1){r&&(this.queue=this.queue.filter(n=>n.type!==t.type)),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}};var po=b(Z(),1);var pc=b(Z(),1);function uc(o,t){let r=()=>JSON.parse(JSON.stringify(o));return(0,pc.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Fo,...t??{}})}var Vo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(s){a(s);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 yc=b($(),1);var Ko=globalThis,Ql=Ko.ShadowRoot&&(Ko.ShadyCSS===void 0||Ko.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xg=Symbol();var hc=(o,t)=>{if(Ql)o.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Ko.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,o.appendChild(n)}};var Zo=class extends yc.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 r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return hc(n,t.elementStyles),n}};var Yo=function(o,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,t,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(i=(a<3?l(i):a>3?l(t,r,i):l(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},xc,mc=Symbol("constructorPrototype"),gc=Symbol("constructorName"),vc=Symbol("exportpartsDebouncer"),bc=Symbol("dynamicDependenciesLoaded"),ot=class extends Zo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[xc]=new Vo(5),this[gc]=this.constructor.name,this[mc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[gc]&&Object.setPrototypeOf(this,this[mc])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let t=this.constructor;t[bc]||(t[bc]=!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 r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.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,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[vc].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 r,n,a,i,l,s;let p=m=>m!=null&&m.trim().length>0,f=t.filter(p).map(m=>m.trim());if(f.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=m.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],g=(s=(l=m.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&s!==void 0?s:[];new Array(...x,...g).filter(p).map(S=>S.trim()).forEach(S=>h.add(S))}if(h.size===0){this.removeAttribute("exportparts");return}let y=[...h.values()].flatMap(m=>f.map(x=>`${m}:${x}--${m}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};xc=vc;Yo([(0,po.property)()],ot.prototype,"exportpartsPrefix",void 0);Yo([uc([])],ot.prototype,"exportpartsPrefixes",void 0);Yo([(0,po.property)()],ot.prototype,"customStylesheet",void 0);Yo([(0,po.state)()],ot.prototype,"useAdoptedStyleSheets",void 0);function uo(o){var t;return(t=o?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Sc,Cc,Oc,ho=Symbol("internalReduxEventsUnsubscribers"),rt=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),yo=class extends ot{constructor(){super(...arguments),this[Sc]=new Map,this[Cc]=new Map,this[Oc]=new Map}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(r=>t.has(r))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[xt].get(t)}addStore(t,r){var n;r=(n=r??(uo(t)?t.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(r),this[xt].set(r,t),this.subscribeToStore(r,t),this.updateFromStores()}removeStore(t){let r=typeof t=="string"?t:t.name;this.unsubscribeFromStore(r),this[xt].delete(r)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((t,r)=>this.subscribeToStore(r,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,r)=>{let n=this.constructor.getPropertyOptions(r);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:r)){let a=this.getStore(t.store);a&&(t.store?this[rt].has(t.store):this[rt].size>0)&&(this[r]=t.selector(a.getState(),this))}})}subscribeToStore(t,r){var n;this[rt].set(t,r.subscribe(()=>this.updateFromStores())),this[ho].set(t,[]),uo(r)&&r.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||r.name===a.store)){let l=s=>this[i](s);r.addEventListener(a.eventName,l),this[ho].get(t).push(()=>r.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[rt].forEach((t,r)=>this.unsubscribeFromStore(r))}unsubscribeFromStore(t){var r;this[rt].has(t)&&this[rt].get(t)(),this[rt].delete(t),(r=this[ho].get(t))===null||r===void 0||r.forEach(n=>n()),this[ho].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};Sc=rt,Cc=xt,Oc=ho;yo.reduxProperties=new Map;yo.reduxReactiveProperties=new Set;yo.reduxEventListeners=new Map;function Ce(o){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+o+(r.length?" "+r.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Fe(o){return!!o&&!!o[G]}function Le(o){var t;return!!o&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===cs}(o)||Array.isArray(o)||!!o[Ic]||!!(!((t=o.constructor)===null||t===void 0)&&t[Ic])||tn(o)||on(o))}function vt(o,t,r){r===void 0&&(r=!1),Gt(o)===0?(r?Object.keys:Ht)(o).forEach(function(n){r&&typeof n=="symbol"||t(n,o[n],o)}):o.forEach(function(n,a){return t(a,n,o)})}function Gt(o){var t=o[G];return t?t.i>3?t.i-4:t.i:Array.isArray(o)?1:tn(o)?2:on(o)?3:0}function Ut(o,t){return Gt(o)===2?o.has(t):Object.prototype.hasOwnProperty.call(o,t)}function es(o,t){return Gt(o)===2?o.get(t):o[t]}function Pc(o,t,r){var n=Gt(o);n===2?o.set(t,r):n===3?o.add(r):o[t]=r}function kc(o,t){return o===t?o!==0||1/o==1/t:o!=o&&t!=t}function tn(o){return as&&o instanceof Map}function on(o){return is&&o instanceof Set}function nt(o){return o.o||o.t}function rn(o){if(Array.isArray(o))return Array.prototype.slice.call(o);var t=Bc(o);delete t[G];for(var r=Ht(t),n=0;n<r.length;n++){var a=r[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:o[a]})}return Object.create(Object.getPrototypeOf(o),t)}function nn(o,t){return t===void 0&&(t=!1),an(o)||Fe(o)||!Le(o)||(Gt(o)>1&&(o.set=o.add=o.clear=o.delete=ts),Object.freeze(o),t&&vt(o,function(r,n){return nn(n,!0)},!0)),o}function ts(){Ce(2)}function an(o){return o==null||typeof o!="object"||Object.isFrozen(o)}function $e(o){var t=en[o];return t||Ce(18,o),t}function os(o,t){en[o]||(en[o]=t)}function Xr(){return go}function Kr(o,t){t&&($e("Patches"),o.u=[],o.s=[],o.v=t)}function qo(o){Jr(o),o.p.forEach(rs),o.p=null}function Jr(o){o===go&&(go=o.l)}function wc(o){return go={p:[],l:go,h:o,m:!0,_:0}}function rs(o){var t=o[G];t.i===0||t.i===1?t.j():t.g=!0}function Zr(o,t){t._=t.p.length;var r=t.p[0],n=o!==void 0&&o!==r;return t.h.O||$e("ES5").S(t,o,n),n?(r[G].P&&(qo(t),Ce(4)),Le(o)&&(o=Xo(t,o),t.l||Jo(t,o)),t.u&&$e("Patches").M(r[G].t,o,t.u,t.s)):o=Xo(t,r,[]),qo(t),t.u&&t.v(t.u,t.s),o!==_c?o:void 0}function Xo(o,t,r){if(an(t))return t;var n=t[G];if(!n)return vt(t,function(s,p){return Ec(o,n,t,s,p,r)},!0),t;if(n.A!==o)return t;if(!n.P)return Jo(o,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=rn(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),vt(i,function(s,p){return Ec(o,n,a,s,p,r,l)}),Jo(o,a,!1),r&&o.u&&$e("Patches").N(n,r,o.u,o.s)}return n.o}function Ec(o,t,r,n,a,i,l){if(Fe(a)){var s=Xo(o,a,i&&t&&t.i!==3&&!Ut(t.R,n)?i.concat(n):void 0);if(Pc(r,n,s),!Fe(s))return;o.m=!1}else l&&r.add(a);if(Le(a)&&!an(a)){if(!o.h.D&&o._<1)return;Xo(o,a),t&&t.A.l||Jo(o,a)}}function Jo(o,t,r){r===void 0&&(r=!1),!o.l&&o.h.D&&o.m&&nn(t,r)}function Yr(o,t){var r=o[G];return(r?nt(r):o)[t]}function Nc(o,t){if(t in o)for(var r=Object.getPrototypeOf(o);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function at(o){o.P||(o.P=!0,o.l&&at(o.l))}function qr(o){o.o||(o.o=rn(o.t))}function Qr(o,t,r){var n=tn(t)?$e("MapSet").F(t,r):on(t)?$e("MapSet").T(t,r):o.O?function(a,i){var l=Array.isArray(a),s={i:l?1:0,A:i?i.A:Xr(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=s,f=bo;l&&(p=[s],f=mo);var h=Proxy.revocable(p,f),y=h.revoke,m=h.proxy;return s.k=m,s.j=y,m}(t,r):$e("ES5").J(t,r);return(r?r.A:Xr()).p.push(n),n}function ns(o){return Fe(o)||Ce(22,o),function t(r){if(!Le(r))return r;var n,a=r[G],i=Gt(r);if(a){if(!a.P&&(a.i<4||!$e("ES5").K(a)))return a.t;a.I=!0,n=Ac(r,i),a.I=!1}else n=Ac(r,i);return vt(n,function(l,s){a&&es(a.t,l)===s||Pc(n,l,t(s))}),i===3?new Set(n):n}(o)}function Ac(o,t){switch(t){case 2:return new Map(o);case 3:return Array.from(o)}return rn(o)}function Tc(){function o(l,s){var p=i[l];return p?p.enumerable=s:i[l]=p={configurable:!0,enumerable:s,get:function(){var f=this[G];return bo.get(f,l)},set:function(f){var h=this[G];bo.set(h,l,f)}},p}function t(l){for(var s=l.length-1;s>=0;s--){var p=l[s][G];if(!p.P)switch(p.i){case 5:n(p)&&at(p);break;case 4:r(p)&&at(p)}}}function r(l){for(var s=l.t,p=l.k,f=Ht(p),h=f.length-1;h>=0;h--){var y=f[h];if(y!==G){var m=s[y];if(m===void 0&&!Ut(s,y))return!0;var x=p[y],g=x&&x[G];if(g?g.t!==m:!kc(x,m))return!0}}var S=!!s[G];return f.length!==Ht(s).length+(S?0:1)}function n(l){var s=l.k;if(s.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(s,s.length-1);if(p&&!p.get)return!0;for(var f=0;f<s.length;f++)if(!s.hasOwnProperty(f))return!0;return!1}function a(l){l.g&&Ce(3,JSON.stringify(nt(l)))}var i={};os("ES5",{J:function(l,s){var p=Array.isArray(l),f=function(y,m){if(y){for(var x=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(x,""+g,o(g,!0));return x}var S=Bc(m);delete S[G];for(var R=Ht(S),E=0;E<R.length;E++){var N=R[E];S[N]=o(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(m),S)}(p,l),h={i:p?5:4,A:s?s.A:Xr(),P:!1,I:!1,R:{},l:s,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,G,{value:h,writable:!0}),f},S:function(l,s,p){p?Fe(s)&&s[G].A===l&&t(l.p):(l.u&&function f(h){if(h&&typeof h=="object"){var y=h[G];if(y){var m=y.t,x=y.k,g=y.R,S=y.i;if(S===4)vt(x,function(T){T!==G&&(m[T]!==void 0||Ut(m,T)?g[T]||f(x[T]):(g[T]=!0,at(y)))}),vt(m,function(T){x[T]!==void 0||Ut(x,T)||(g[T]=!1,at(y))});else if(S===5){if(n(y)&&(at(y),g.length=!0),x.length<m.length)for(var R=x.length;R<m.length;R++)g[R]=!1;else for(var E=m.length;E<x.length;E++)g[E]=!0;for(var N=Math.min(x.length,m.length),P=0;P<N;P++)x.hasOwnProperty(P)||(g[P]=!0),g[P]===void 0&&f(x[P])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?r(l):n(l)}})}var Rc,go,cn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",as=typeof Map<"u",is=typeof Set<"u",Lc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",_c=cn?Symbol.for("immer-nothing"):((Rc={})["immer-nothing"]=!0,Rc),Ic=cn?Symbol.for("immer-draftable"):"__$immer_draftable",G=cn?Symbol.for("immer-state"):"__$immer_state";var cs=""+Object.prototype.constructor,Ht=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(o){return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o))}:Object.getOwnPropertyNames,Bc=Object.getOwnPropertyDescriptors||function(o){var t={};return Ht(o).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(o,r)}),t},en={},bo={get:function(o,t){if(t===G)return o;var r=nt(o);if(!Ut(r,t))return function(a,i,l){var s,p=Nc(i,l);return p?"value"in p?p.value:(s=p.get)===null||s===void 0?void 0:s.call(a.k):void 0}(o,r,t);var n=r[t];return o.I||!Le(n)?n:n===Yr(o.t,t)?(qr(o),o.o[t]=Qr(o.A.h,n,o)):n},has:function(o,t){return t in nt(o)},ownKeys:function(o){return Reflect.ownKeys(nt(o))},set:function(o,t,r){var n=Nc(nt(o),t);if(n?.set)return n.set.call(o.k,r),!0;if(!o.P){var a=Yr(nt(o),t),i=a?.[G];if(i&&i.t===r)return o.o[t]=r,o.R[t]=!1,!0;if(kc(r,a)&&(r!==void 0||Ut(o.t,t)))return!0;qr(o),at(o)}return o.o[t]===r&&(r!==void 0||t in o.o)||Number.isNaN(r)&&Number.isNaN(o.o[t])||(o.o[t]=r,o.R[t]=!0),!0},deleteProperty:function(o,t){return Yr(o.t,t)!==void 0||t in o.t?(o.R[t]=!1,qr(o),at(o)):delete o.R[t],o.o&&delete o.o[t],!0},getOwnPropertyDescriptor:function(o,t){var r=nt(o),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:o.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Ce(11)},getPrototypeOf:function(o){return Object.getPrototypeOf(o.t)},setPrototypeOf:function(){Ce(12)}},mo={};vt(bo,function(o,t){mo[o]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),mo.deleteProperty=function(o,t){return mo.set.call(this,o,t,void 0)},mo.set=function(o,t,r){return bo.set.call(this,o[0],t,r,o[0])};var ls=function(){function o(r){var n=this;this.O=Lc,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var s=i;i=a;var p=n;return function(S){var R=this;S===void 0&&(S=s);for(var E=arguments.length,N=Array(E>1?E-1:0),P=1;P<E;P++)N[P-1]=arguments[P];return p.produce(S,function(T){var D;return(D=i).call.apply(D,[R,T].concat(N))})}}var f;if(typeof i!="function"&&Ce(6),l!==void 0&&typeof l!="function"&&Ce(7),Le(a)){var h=wc(n),y=Qr(n,a,void 0),m=!0;try{f=i(y),m=!1}finally{m?qo(h):Jr(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return Kr(h,l),Zr(S,h)},function(S){throw qo(h),S}):(Kr(h,l),Zr(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===_c&&(f=void 0),n.D&&nn(f,!0),l){var x=[],g=[];$e("Patches").M(a,f,x,g),l(x,g)}return f}Ce(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,y=Array(h>1?h-1:0),m=1;m<h;m++)y[m-1]=arguments[m];return n.produceWithPatches(f,function(x){return a.apply(void 0,[x].concat(y))})};var l,s,p=n.produce(a,i,function(f,h){l=f,s=h});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,s]}):[p,l,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=o.prototype;return t.createDraft=function(r){Le(r)||Ce(8),Fe(r)&&(r=ns(r));var n=wc(this),a=Qr(this,r,void 0);return a[G].C=!0,Jr(n),a},t.finishDraft=function(r,n){var a=r&&r[G],i=a.A;return Kr(i,n),Zr(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Lc&&Ce(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var l=$e("Patches").$;return Fe(r)?l(r,n):this.produce(r,function(s){return l(s,n)})},o}(),be=new ls,ss=be.produce,Pg=be.produceWithPatches.bind(be),kg=be.setAutoFreeze.bind(be),Tg=be.setUseProxies.bind(be),_g=be.applyPatches.bind(be),Bg=be.createDraft.bind(be),$g=be.finishDraft.bind(be),Qo=ss;function St(o){"@babel/helpers - typeof";return St=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},St(o)}function $c(o,t){if(St(o)!="object"||!o)return o;var r=o[Symbol.toPrimitive];if(r!==void 0){var n=r.call(o,t||"default");if(St(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(o)}function Wc(o){var t=$c(o,"string");return St(t)=="symbol"?t:t+""}function Dc(o,t,r){return(t=Wc(t))in o?Object.defineProperty(o,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[t]=r,o}function zc(o,t){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(o,a).enumerable})),r.push.apply(r,n)}return r}function ln(o){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zc(Object(r),!0).forEach(function(n){Dc(o,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):zc(Object(r)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(r,n))})}return o}function oe(o){return"Minified Redux error #"+o+"; visit https://redux.js.org/Errors?code="+o+" for the full message or use the non-minified dev environment for full errors. "}var Mc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),sn=function(){return Math.random().toString(36).substring(7).split("").join(".")},er={INIT:"@@redux/INIT"+sn(),REPLACE:"@@redux/REPLACE"+sn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+sn()}};function ds(o){if(typeof o!="object"||o===null)return!1;for(var t=o;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(o)===t}function dn(o,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(oe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(oe(1));return r(dn)(o,t)}if(typeof o!="function")throw new Error(oe(2));var a=o,i=t,l=[],s=l,p=!1;function f(){s===l&&(s=l.slice())}function h(){if(p)throw new Error(oe(3));return i}function y(S){if(typeof S!="function")throw new Error(oe(4));if(p)throw new Error(oe(5));var R=!0;return f(),s.push(S),function(){if(R){if(p)throw new Error(oe(6));R=!1,f();var N=s.indexOf(S);s.splice(N,1),l=null}}}function m(S){if(!ds(S))throw new Error(oe(7));if(typeof S.type>"u")throw new Error(oe(8));if(p)throw new Error(oe(9));try{p=!0,i=a(i,S)}finally{p=!1}for(var R=l=s,E=0;E<R.length;E++){var N=R[E];N()}return S}function x(S){if(typeof S!="function")throw new Error(oe(10));a=S,m({type:er.REPLACE})}function g(){var S,R=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(oe(11));function P(){N.next&&N.next(h())}P();var T=R(P);return{unsubscribe:T}}},S[Mc]=function(){return this},S}return m({type:er.INIT}),n={dispatch:m,subscribe:y,getState:h,replaceReducer:x},n[Mc]=g,n}function fs(o){Object.keys(o).forEach(function(t){var r=o[t],n=r(void 0,{type:er.INIT});if(typeof n>"u")throw new Error(oe(12));if(typeof r(void 0,{type:er.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(oe(13))})}function Uc(o){for(var t=Object.keys(o),r={},n=0;n<t.length;n++){var a=t[n];typeof o[a]=="function"&&(r[a]=o[a])}var i=Object.keys(r),l,s;try{fs(r)}catch(p){s=p}return function(f,h){if(f===void 0&&(f={}),s)throw s;if(0)var y;for(var m=!1,x={},g=0;g<i.length;g++){var S=i[g],R=r[S],E=f[S],N=R(E,h);if(typeof N>"u"){var P=h&&h.type;throw new Error(oe(14))}x[S]=N,m=m||N!==E}return m=m||i.length!==Object.keys(f).length,m?x:f}}function Ft(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];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 Hc(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(oe(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},s=t.map(function(p){return p(l)});return i=Ft.apply(void 0,s)(a.dispatch),ln(ln({},a),{},{dispatch:i})}}}function Gc(o){var t=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(s){return typeof s=="function"?s(a,i,o):l(s)}}};return t}var Fc=Gc();Fc.withExtraArgument=Gc;var fn=Fc;var Yc=function(){var o=function(t,r){return o=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])},o(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");o(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ps=function(o,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(f){return function(h){return p([f,h])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=t.call(o,r)}catch(h){f=[6,h],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},jt=function(o,t){for(var r=0,n=t.length,a=o.length;r<n;r++,a++)o[a]=t[r];return o},us=Object.defineProperty,hs=Object.defineProperties,ys=Object.getOwnPropertyDescriptors,jc=Object.getOwnPropertySymbols,ms=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,Vc=function(o,t,r){return t in o?us(o,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[t]=r},it=function(o,t){for(var r in t||(t={}))ms.call(t,r)&&Vc(o,r,t[r]);if(jc)for(var n=0,a=jc(t);n<a.length;n++){var r=a[n];gs.call(t,r)&&Vc(o,r,t[r])}return o},pn=function(o,t){return hs(o,ys(t))},bs=function(o,t,r){return new Promise(function(n,a){var i=function(p){try{s(r.next(p))}catch(f){a(f)}},l=function(p){try{s(r.throw(p))}catch(f){a(f)}},s=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};s((r=r.apply(o,t)).next())})};var xs=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ft:Ft.apply(null,arguments)},eb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(o){return o}};function vs(o){if(typeof o!="object"||o===null)return!1;var t=Object.getPrototypeOf(o);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Ss=function(o){Yc(t,o);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,jt([void 0],r[0].concat(this)))):new(t.bind.apply(t,jt([void 0],r.concat(this))))},t}(Array),Cs=function(o){Yc(t,o);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=o.apply(this,r)||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 r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return o.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,jt([void 0],r[0].concat(this)))):new(t.bind.apply(t,jt([void 0],r.concat(this))))},t}(Array);function yn(o){return Le(o)?Qo(o,function(){}):o}function Os(o){return typeof o=="boolean"}function ws(){return function(t){return Es(t)}}function Es(o){o===void 0&&(o={});var t=o.thunk,r=t===void 0?!0:t,n=o.immutableCheck,a=n===void 0?!0:n,i=o.serializableCheck,l=i===void 0?!0:i,s=new Ss;if(r&&(Os(r)?s.push(fn):s.push(fn.withExtraArgument(r.extraArgument))),0){if(a)var p;if(l)var f}return s}var un=!0;function qc(o){var t=ws(),r=o||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,l=i===void 0?t():i,s=r.devTools,p=s===void 0?!0:s,f=r.preloadedState,h=f===void 0?void 0:f,y=r.enhancers,m=y===void 0?void 0:y,x;if(typeof a=="function")x=a;else if(vs(a))x=Uc(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 g=l;if(typeof g=="function"&&(g=g(t),!un&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!un&&g.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Hc.apply(void 0,g),R=Ft;p&&(R=xs(it({trace:!un},typeof p=="object"&&p)));var E=new Cs(S),N=E;Array.isArray(m)?N=jt([S],m):typeof m=="function"&&(N=m(E));var P=R.apply(void 0,N);return dn(x,h,P)}function ct(o,t){function r(){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 it(it({type:o,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:o,payload:n[0]}}return r.toString=function(){return""+o},r.type=o,r.match=function(n){return n.type===o},r}function Xc(o){var t={},r=[],n,a={addCase:function(i,l){var s=typeof i=="string"?i:i.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=l,a},addMatcher:function(i,l){return r.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return o(a),[t,r,n]}function Ns(o){return typeof o=="function"}function As(o,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?Xc(t):[t,r,n],i=a[0],l=a[1],s=a[2],p;if(Ns(o))p=function(){return yn(o())};else{var f=yn(o);p=function(){return f}}function h(y,m){y===void 0&&(y=p());var x=jt([i[m.type]],l.filter(function(g){var S=g.matcher;return S(m)}).map(function(g){var S=g.reducer;return S}));return x.filter(function(g){return!!g}).length===0&&(x=[s]),x.reduce(function(g,S){if(S)if(Fe(g)){var R=g,E=S(R,m);return E===void 0?g:E}else{if(Le(g))return Qo(g,function(N){return S(N,m)});var E=S(g,m);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return g},y)}return h.getInitialState=p,h}function Rs(o,t){return o+"/"+t}function Jc(o){var t=o.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof o.initialState=="function"?o.initialState:yn(o.initialState),n=o.reducers||{},a=Object.keys(n),i={},l={},s={};a.forEach(function(h){var y=n[h],m=Rs(t,h),x,g;"reducer"in y?(x=y.reducer,g=y.prepare):x=y,i[h]=x,l[m]=x,s[h]=g?ct(m,g):ct(m)});function p(){var h=typeof o.extraReducers=="function"?Xc(o.extraReducers):[o.extraReducers],y=h[0],m=y===void 0?{}:y,x=h[1],g=x===void 0?[]:x,S=h[2],R=S===void 0?void 0:S,E=it(it({},m),l);return As(r,function(N){for(var P in E)N.addCase(P,E[P]);for(var T=0,D=g;T<D.length;T++){var xe=D[T];N.addMatcher(xe.matcher,xe.reducer)}R&&N.addDefaultCase(R)})}var f;return{name:t,reducer:function(h,y){return f||(f=p()),f(h,y)},actions:s,caseReducers:i,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Ls="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Is=function(o){o===void 0&&(o=21);for(var t="",r=o;r--;)t+=Ls[Math.random()*64|0];return t},Ps=["name","message","stack","code"],hn=function(){function o(t,r){this.payload=t,this.meta=r}return o}(),Kc=function(){function o(t,r){this.payload=t,this.meta=r}return o}(),ks=function(o){if(typeof o=="object"&&o!==null){for(var t={},r=0,n=Ps;r<n.length;r++){var a=n[r];typeof o[a]=="string"&&(t[a]=o[a])}return t}return{message:String(o)}},nb=function(){function o(t,r,n){var a=ct(t+"/fulfilled",function(h,y,m,x){return{payload:h,meta:pn(it({},x||{}),{arg:m,requestId:y,requestStatus:"fulfilled"})}}),i=ct(t+"/pending",function(h,y,m){return{payload:void 0,meta:pn(it({},m||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),l=ct(t+"/rejected",function(h,y,m,x,g){return{payload:x,error:(n&&n.serializeError||ks)(h||"Rejected"),meta:pn(it({},g||{}),{arg:m,requestId:y,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),s=!1,p=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(y,m,x){var g=n?.idGenerator?n.idGenerator(h):Is(),S=new p,R,E=!1;function N(T){R=T,S.abort()}var P=function(){return bs(this,null,function(){var T,D,xe,je,hr,Ve,pe;return ps(this,function(ve){switch(ve.label){case 0:return ve.trys.push([0,4,,5]),je=(T=n?.condition)==null?void 0:T.call(n,h,{getState:m,extra:x}),_s(je)?[4,je]:[3,2];case 1:je=ve.sent(),ve.label=2;case 2:if(je===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,hr=new Promise(function(ue,st){return S.signal.addEventListener("abort",function(){return st({name:"AbortError",message:R||"Aborted"})})}),y(i(g,h,(D=n?.getPendingMeta)==null?void 0:D.call(n,{requestId:g,arg:h},{getState:m,extra:x}))),[4,Promise.race([hr,Promise.resolve(r(h,{dispatch:y,getState:m,extra:x,requestId:g,signal:S.signal,abort:N,rejectWithValue:function(ue,st){return new hn(ue,st)},fulfillWithValue:function(ue,st){return new Kc(ue,st)}})).then(function(ue){if(ue instanceof hn)throw ue;return ue instanceof Kc?a(ue.payload,g,h,ue.meta):a(ue,g,h)})])];case 3:return xe=ve.sent(),[3,5];case 4:return Ve=ve.sent(),xe=Ve instanceof hn?l(null,g,h,Ve.payload,Ve.meta):l(Ve,g,h),[3,5];case 5:return pe=n&&!n.dispatchConditionRejection&&l.match(xe)&&xe.meta.condition,pe||y(xe),[2,xe]}})})}();return Object.assign(P,{abort:N,requestId:g,arg:h,unwrap:function(){return P.then(Ts)}})}}return Object.assign(f,{pending:i,rejected:l,fulfilled:a,typePrefix:t})}return o.withTypes=function(){return o},o}();function Ts(o){if(o.meta&&o.meta.rejectedWithValue)throw o.payload;if(o.error)throw o.error;return o.payload}function _s(o){return o!==null&&typeof o=="object"&&typeof o.then=="function"}var Qc="listener",el="completed",tl="cancelled",ab="task-"+tl,ib="task-"+el,cb=Qc+"-"+tl,lb=Qc+"-"+el;var mn="listenerMiddleware";var sb=ct(mn+"/add"),db=ct(mn+"/removeAll"),fb=ct(mn+"/remove");var Zc,pb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(o){return(Zc||(Zc=Promise.resolve())).then(o).catch(function(t){return setTimeout(function(){throw t},0)})},Bs=function(o){return function(t){setTimeout(t,o)}},ub=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Bs(10);Tc();function $s(o,t){return class extends o{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}var tr=class extends $s(Object){};window.ftReduxStores||(window.ftReduxStores={});var ol=class o extends tr{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(uo(i))return i;if(a==null)return;let l=Jc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),s=qc({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[a.name]=new o(l,s,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new jo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,l,s)=>{let p=l,f=i[p];return f?(...h)=>{let y=f(...h.map(a));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[p]:a(h)})}}}),this.eventBus=n??this.eventBus}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 ar=b(L());var or=class extends tt{async listMySearches(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var rr=class extends tt{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Ds="ft-user-assets",nr=ar.FtReduxStore.get({name:Ds,initialState:{savedSearches:void 0,bookmarks:void 0}}),gn=class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new rr,this.savedSearchesService=new or,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,ar.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),nr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),nr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();nr.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 r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;nr.actions.bookmarks(r)}}},Zb=new gn;var bn=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new bn;var rl=b(L()),xn=class{highlightHtml(t,r,n){(0,rl.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new xn;var nl=b(L());var vn=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(s=>s.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;return nl.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new vn;var zs=b(L());(0,al.customElement)("ft-app-context")(V);var cl=b(Z()),Ms=function(o,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,t,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(i=(a<3?l(i):a>3?l(t,r,i):l(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Sn=Symbol("i18nAttributes"),Cn=Symbol("i18nListAttributes"),ir=Symbol("i18nProperties"),On=Symbol("i18nManualContexts"),xo=Symbol("i18nUnsubs");function sr(o){var t,r;class n extends o{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Ho:Mt}i18n(i,l,...s){var p;if(typeof i=="string")return this.getI18nService().resolveMessage(i,l,...s);let f=(p=i.args)!==null&&p!==void 0?p:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...f)}onI18nUpdate(i){var l,s,p;(l=this[Sn])===null||l===void 0||l.forEach((f,h)=>{let y=this.getI18nAttributeValue(h);y&&(this[h]=this.getI18nAttributeMessage(y,f,i))}),(s=this[Cn])===null||s===void 0||s.forEach((f,h)=>{let y=this.getI18nListAttributeValues(h);this[h]=y?.map(m=>this.getI18nAttributeMessage(m,f,i))}),(p=this[ir])===null||p===void 0||p.forEach((f,h)=>{f.context.toLowerCase()===i.toLowerCase()&&(this[h]=this.i18n(f))}),setTimeout(()=>this.requestUpdate(),0)}getI18nAttributeMessage(i,l,s){var p;let f=!s||((p=i.context)===null||p===void 0?void 0:p.toLowerCase())===s.toLowerCase(),h=i.context&&i.key&&f?this.i18n({context:i.context,key:i.key,...l}):i.message;return{...i,message:h}}update(i){var l,s,p;super.update(i),(l=this[Sn])===null||l===void 0||l.forEach((f,h)=>{let y=this.getI18nAttributeValue(h);y?.context&&y.key&&(i.has(h)||f.argsProvider!=null)&&(this.addI18nContextIfNeeded(y,i,h),this[h]=this.getI18nAttributeMessage(y,f))}),(s=this[Cn])===null||s===void 0||s.forEach((f,h)=>{let y=this.getI18nListAttributeValues(h);(i.has(h)||f.argsProvider!=null)&&(this[h]=y?.map(m=>(this.addI18nContextIfNeeded(m,i,h),this.getI18nAttributeMessage(m,f))))}),(p=this[ir])===null||p===void 0||p.forEach((f,h)=>{f.argsProvider!=null&&(this[h]=this.i18n(f))})}getI18nAttributeValue(i){return this[i]}getI18nListAttributeValues(i){return this[i]}addI18nContextIfNeeded(i,l,s){i.context&&i.key&&l.has(s)&&this.addI18nContext(i.context)}addI18nMessagesAndSubscribe(i,l,s){i=i.toLowerCase(),this[xo].has(i)||this[xo].set(i,this.getI18nService(s).subscribe(i,()=>this.onI18nUpdate(i))),this.getI18nService(s).prepareContext(i,l??{}),this.onI18nUpdate(i)}connectedCallback(){var i,l,s,p,f,h;super.connectedCallback(),new Set([...(l=(i=this[ir])===null||i===void 0?void 0:i.values())!==null&&l!==void 0?l:[],...[...(p=(s=this[Sn])===null||s===void 0?void 0:s.keys())!==null&&p!==void 0?p:[]].map(y=>this.getI18nAttributeValue(y)),...[...(h=(f=this[Cn])===null||f===void 0?void 0:f.keys())!==null&&h!==void 0?h:[]].flatMap(y=>this.getI18nListAttributeValues(y))].map(y=>y?.context)).forEach(y=>y&&this.addI18nMessages(y)),this[On].forEach((y,m)=>{this.addI18nMessagesAndSubscribe(m,y.defaultMessages,y.isCustomContext)})}addI18nMessages(i,l,s){this[On].set(i,{defaultMessages:l,isCustomContext:s}),this.addI18nMessagesAndSubscribe(i,l,s)}addI18nContext(i,l,s){typeof i=="string"?this.addI18nMessages(i,l,s):this.addI18nMessages(i.name,l,i.custom)}disconnectedCallback(){super.disconnectedCallback(),this[xo].forEach(i=>i()),this[xo].clear()}}return t=On,r=xo,Ms([(0,cl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var il=class extends sr(lr.FtLitElement){},cr=class extends sr(lr.FtLitElementRedux){};var vo=function(o,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(o,t,r,n);else for(var s=o.length-1;s>=0;s--)(l=o[s])&&(i=(a<3?l(i):a>3?l(t,r,i):l(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Ie=class extends cr{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":dr.nothing:dr.html`
1214
1214
  <span class="ft-i18n">