@fluid-topics/ft-search-input 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.
package/build/ft-search-input.js
CHANGED
|
@@ -102,7 +102,7 @@ class FtSearchInput extends withI18n(FtSearchComponent) {
|
|
|
102
102
|
var _a;
|
|
103
103
|
(_a = this.stateManager) === null || _a === void 0 ? void 0 : _a.setQuery(query);
|
|
104
104
|
this.forceCloseSuggestion = true;
|
|
105
|
-
this.dispatchEvent(new CustomEvent("change"));
|
|
105
|
+
this.dispatchEvent(new CustomEvent("change", { detail: query }));
|
|
106
106
|
}
|
|
107
107
|
onSuggestionSelected(e) {
|
|
108
108
|
this.launchSearch(e.detail);
|
|
@@ -905,7 +905,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
905
905
|
`;var Ys=S(L()),Xs=S(Q());var mn=S(L());var Hc=S(L());var Wm=S(Ba(),1);var Ma;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ma||(Ma={}));var $a;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})($a||($a={}));var Wa;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Wa||(Wa={}));var za;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT"})(za||(za={}));var Fa;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Fa||(Fa={}));var Ha;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ha||(Ha={}));var Ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ga||(Ga={}));var ja;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ja||(ja={}));var Ka;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Ka||(Ka={}));var Va;(function(e){e.ASC="ASC",e.DESC="DESC"})(Va||(Va={}));var Za;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Za||(Za={}));var _o;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(_o||(_o={}));var qa;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK"})(qa||(qa={}));var Ya;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Ya||(Ya={}));var Xa;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK"})(Xa||(Xa={}));var Qa;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC"})(Qa||(Qa={}));var ko;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS"})(ko||(ko={}));var ee;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN",e.DEVELOPER="DEVELOPER"})(ee||(ee={}));var Ja;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ja||(Ja={}));var Um={[ee.PERSONAL_BOOK_SHARE_USER]:[ee.PERSONAL_BOOK_USER],[ee.HTML_EXPORT_USER]:[ee.PERSONAL_BOOK_USER],[ee.PDF_EXPORT_USER]:[ee.PERSONAL_BOOK_USER],[ee.KHUB_ADMIN]:[ee.CONTENT_PUBLISHER],[ee.ADMIN]:[ee.KHUB_ADMIN,ee.USERS_ADMIN,ee.PORTAL_ADMIN],[ee.DEVELOPER]:[ee.BETA_USER,ee.DEBUG_USER]};var qs=S(L());var ns=S(z()),ve=S(Q()),we=S(L());var es=S(z());var ts=es.css`
|
|
906
906
|
`;var _r=S(L()),Gc="ft-app-info",Do=class extends CustomEvent{constructor(t){super("authentication-change",{detail:t})}},jc={session:(e,t)=>{(0,_r.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>k.eventBus.dispatchEvent(new Do(t.payload)),0))}},k=_r.FtReduxStore.get({name:Gc,reducers:jc,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 qe=S(L());var Uo=S(L());var dt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=k.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let i=k.subscribe(()=>{n=e.get(t),n&&(i(),o(n))})}})}};var We=class{constructor(t=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Uo.CacheRegistry,this.cache=t?i.commonCache:new Uo.CacheRegistry}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:dt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):dt.await()}clearCache(){this.cache.clearAll()}};var rs,Kc=Symbol("clearAfterUnitTest"),kr=class extends We{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[rs]=()=>{this.defaultMessages={},this.cache=new qe.CacheRegistry,this.listeners={}},this.currentUiLocale=k.getState().uiLocale,k.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=k.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,qe.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,o,...n){var i,a,s;t=t.toLowerCase(),this.fetchContext(t);let l=(a=(i=this.cache.getNow(t))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new qe.ParametrizedLabelResolver((s=this.defaultMessages[t])!==null&&s!==void 0?s:{},l).resolve(o,...n)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),await this.notify(t)}catch(o){console.error(o)}}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,qe.delay)(0).then(()=>o()).catch(()=>null)))}};rs=Kc;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends kr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends kr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Lt=window.FluidTopicsI18nService,os=window.FluidTopicsCustomI18nService;var se=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},K=class extends we.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=()=>dt.get(),this.messageContexts=[],this.cache=new we.CacheRegistry,this.cleanSessionDebouncer=new we.Debouncer}render(){return ns.html`
|
|
907
907
|
<slot></slot>
|
|
908
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&k.actions.noCustom(this.noCustom),t.has("editorMode")&&k.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&k.actions.session(this.session),t.has("availableUiLocales")&&k.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Lt.addContext(o)),t.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&k.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())}};K.elementDefinitions={};K.styles=ts;se([(0,ve.property)()],K.prototype,"baseUrl",void 0);se([(0,ve.property)()],K.prototype,"apiIntegrationIdentifier",void 0);se([(0,ve.property)()],K.prototype,"uiLocale",void 0);se([(0,we.jsonProperty)(null)],K.prototype,"availableUiLocales",void 0);se([(0,we.jsonProperty)(null)],K.prototype,"metadataConfiguration",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"editorMode",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"noCustom",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"openExternalDocumentInNewTab",void 0);se([(0,ve.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],K.prototype,"noCustomComponent",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"withManualResources",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"navigatorOnline",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"forcedOffline",void 0);se([(0,ve.property)({type:Object})],K.prototype,"apiProvider",void 0);se([(0,we.jsonProperty)([])],K.prototype,"messageContexts",void 0);se([(0,we.jsonProperty)(void 0)],K.prototype,"session",void 0);var Ll=S(Q());function Vc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Dr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Dr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Dr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Dr(e,t){try{return Vc(e,t)}catch{return!1}}function Bo(e,t){return!Dr(e,t)}var Zc=S(Q(),1);var Ur=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 nr=S(Q(),1);var is=S(Q(),1);function as(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,is.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:Bo,...t??{}})}var Br=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){i(l);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var cs=S(z(),1);var Mr=window,qc=Mr.ShadowRoot&&(Mr.ShadyCSS===void 0||Mr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yy=Symbol();var ss=(e,t)=>{qc?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=Mr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)})};var $r=class extends cs.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ss(n,t.elementStyles),n}};var Wr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},ps,ls=Symbol("constructorPrototype"),us=Symbol("constructorName"),fs=Symbol("exportpartsDebouncer"),ds=Symbol("dynamicDependenciesLoaded"),Ye=class extends $r{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ps]=new Br(5),this[us]=this.constructor.name,this[ls]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[us]&&Object.setPrototypeOf(this,this[ls])}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[ds]||(t[ds]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[fs].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,a,s,l;let d=y=>y!=null&&y.trim().length>0,p=t.filter(d).map(y=>y.trim());if(p.length===0){this.removeAttribute("exportparts");return}let f=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(a=(i=y.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],g=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(v=>v.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...b,...g).filter(d).map(v=>v.trim()).forEach(v=>f.add(v))}if(f.size===0){this.removeAttribute("exportparts");return}let m=[...f.values()].flatMap(y=>p.map(b=>`${y}:${b}--${y}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};ps=fs;Wr([(0,nr.property)()],Ye.prototype,"exportpartsPrefix",void 0);Wr([as([])],Ye.prototype,"exportpartsPrefixes",void 0);Wr([(0,nr.property)()],Ye.prototype,"customStylesheet",void 0);Wr([(0,nr.state)()],Ye.prototype,"useAdoptedStyleSheets",void 0);function ir(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var hs,ms,ys,zr=Symbol("internalReduxEventsUnsubscribers"),Xe=Symbol("internalStoresUnsubscribers"),pt=Symbol("internalStores"),ar=class extends Ye{constructor(){super(...arguments),this[hs]=new Map,this[ms]=new Map,this[ys]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[pt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[pt].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[pt].get(t)}addStore(t,o){var n;o=(n=o??(ir(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[pt].delete(o)}setupStore(t,o){this[pt].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[pt].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[Xe].has(t.store):this[Xe].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[Xe].set(t,o.subscribe(()=>this.updateFromStores())),ir(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=l=>this[a](l);o.eventBus.addEventListener(i.eventName,s),this[zr].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Xe].forEach((t,o)=>this.unsubscribeFromStore(o)),this[zr].forEach(t=>t()),this[zr]=[]}unsubscribeFromStore(t){this[Xe].has(t)&&this[Xe].get(t)(),this[Xe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};hs=Xe,ms=pt,ys=zr;ar.reduxProperties=new Map;ar.reduxReactiveProperties=new Set;ar.reduxEventListeners=new Map;function Se(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ze(e){return!!e&&!!e[H]}function Ae(e){var t;return!!e&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ol}(e)||Array.isArray(e)||!!e[Cs]||!!(!((t=e.constructor)===null||t===void 0)&&t[Cs])||Ko(e)||Vo(e))}function ft(e,t,o){o===void 0&&(o=!1),Dt(e)===0?(o?Object.keys:kt)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Dt(e){var t=e[H];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ko(e)?2:Vo(e)?3:0}function _t(e,t){return Dt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Yc(e,t){return Dt(e)===2?e.get(t):e[t]}function Es(e,t,o){var n=Dt(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function ws(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ko(e){return tl&&e instanceof Map}function Vo(e){return rl&&e instanceof Set}function Qe(e){return e.o||e.t}function Zo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ns(e);delete t[H];for(var o=kt(t),n=0;n<o.length;n++){var i=o[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function qo(e,t){return t===void 0&&(t=!1),Yo(e)||ze(e)||!Ae(e)||(Dt(e)>1&&(e.set=e.add=e.clear=e.delete=Xc),Object.freeze(e),t&&ft(e,function(o,n){return qo(n,!0)},!0)),e}function Xc(){Se(2)}function Yo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Te(e){var t=jo[e];return t||Se(18,e),t}function Qc(e,t){jo[e]||(jo[e]=t)}function Fo(){return cr}function Mo(e,t){t&&(Te("Patches"),e.u=[],e.s=[],e.v=t)}function Fr(e){Ho(e),e.p.forEach(Jc),e.p=null}function Ho(e){e===cr&&(cr=e.l)}function gs(e){return cr={p:[],l:cr,h:e,m:!0,_:0}}function Jc(e){var t=e[H];t.i===0||t.i===1?t.j():t.g=!0}function $o(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Te("ES5").S(t,e,n),n?(o[H].P&&(Fr(t),Se(4)),Ae(e)&&(e=Hr(t,e),t.l||Gr(t,e)),t.u&&Te("Patches").M(o[H].t,e,t.u,t.s)):e=Hr(t,o,[]),Fr(t),t.u&&t.v(t.u,t.s),e!==Rs?e:void 0}function Hr(e,t,o){if(Yo(t))return t;var n=t[H];if(!n)return ft(t,function(l,d){return bs(e,n,t,l,d,o)},!0),t;if(n.A!==e)return t;if(!n.P)return Gr(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Zo(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),ft(a,function(l,d){return bs(e,n,i,l,d,o,s)}),Gr(e,i,!1),o&&e.u&&Te("Patches").N(n,o,e.u,e.s)}return n.o}function bs(e,t,o,n,i,a,s){if(ze(i)){var l=Hr(e,i,a&&t&&t.i!==3&&!_t(t.R,n)?a.concat(n):void 0);if(Es(o,n,l),!ze(l))return;e.m=!1}else s&&o.add(i);if(Ae(i)&&!Yo(i)){if(!e.h.D&&e._<1)return;Hr(e,i),t&&t.A.l||Gr(e,i)}}function Gr(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&qo(t,o)}function Wo(e,t){var o=e[H];return(o?Qe(o):e)[t]}function xs(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function Je(e){e.P||(e.P=!0,e.l&&Je(e.l))}function zo(e){e.o||(e.o=Zo(e.t))}function Go(e,t,o){var n=Ko(t)?Te("MapSet").F(t,o):Vo(t)?Te("MapSet").T(t,o):e.O?function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:Fo(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=l,p=lr;s&&(d=[l],p=sr);var f=Proxy.revocable(d,p),m=f.revoke,y=f.proxy;return l.k=y,l.j=m,y}(t,o):Te("ES5").J(t,o);return(o?o.A:Fo()).p.push(n),n}function el(e){return ze(e)||Se(22,e),function t(o){if(!Ae(o))return o;var n,i=o[H],a=Dt(o);if(i){if(!i.P&&(i.i<4||!Te("ES5").K(i)))return i.t;i.I=!0,n=vs(o,a),i.I=!1}else n=vs(o,a);return ft(n,function(s,l){i&&Yc(i.t,s)===l||Es(n,s,t(l))}),a===3?new Set(n):n}(e)}function vs(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Zo(e)}function As(){function e(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[H];return lr.get(p,s)},set:function(p){var f=this[H];lr.set(f,s,p)}},d}function t(s){for(var l=s.length-1;l>=0;l--){var d=s[l][H];if(!d.P)switch(d.i){case 5:n(d)&&Je(d);break;case 4:o(d)&&Je(d)}}}function o(s){for(var l=s.t,d=s.k,p=kt(d),f=p.length-1;f>=0;f--){var m=p[f];if(m!==H){var y=l[m];if(y===void 0&&!_t(l,m))return!0;var b=d[m],g=b&&b[H];if(g?g.t!==y:!ws(b,y))return!0}}var v=!!l[H];return p.length!==kt(l).length+(v?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&Se(3,JSON.stringify(Qe(s)))}var a={};Qc("ES5",{J:function(s,l){var d=Array.isArray(s),p=function(m,y){if(m){for(var b=Array(y.length),g=0;g<y.length;g++)Object.defineProperty(b,""+g,e(g,!0));return b}var v=Ns(y);delete v[H];for(var R=kt(v),w=0;w<R.length;w++){var A=R[w];v[A]=e(A,m||!!v[A].enumerable)}return Object.create(Object.getPrototypeOf(y),v)}(d,s),f={i:d?5:4,A:l?l.A:Fo(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,H,{value:f,writable:!0}),p},S:function(s,l,d){d?ze(l)&&l[H].A===s&&t(s.p):(s.u&&function p(f){if(f&&typeof f=="object"){var m=f[H];if(m){var y=m.t,b=m.k,g=m.R,v=m.i;if(v===4)ft(b,function(I){I!==H&&(y[I]!==void 0||_t(y,I)?g[I]||p(b[I]):(g[I]=!0,Je(m)))}),ft(y,function(I){b[I]!==void 0||_t(b,I)||(g[I]=!1,Je(m))});else if(v===5){if(n(m)&&(Je(m),g.length=!0),b.length<y.length)for(var R=b.length;R<y.length;R++)g[R]=!1;else for(var w=y.length;w<b.length;w++)g[w]=!0;for(var A=Math.min(b.length,y.length),T=0;T<A;T++)b.hasOwnProperty(T)||(g[T]=!0),g[T]===void 0&&p(b[T])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Ss,cr,Xo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",tl=typeof Map<"u",rl=typeof Set<"u",Os=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Rs=Xo?Symbol.for("immer-nothing"):((Ss={})["immer-nothing"]=!0,Ss),Cs=Xo?Symbol.for("immer-draftable"):"__$immer_draftable",H=Xo?Symbol.for("immer-state"):"__$immer_state";var ol=""+Object.prototype.constructor,kt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ns=Object.getOwnPropertyDescriptors||function(e){var t={};return kt(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},jo={},lr={get:function(e,t){if(t===H)return e;var o=Qe(e);if(!_t(o,t))return function(i,a,s){var l,d=xs(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(i.k):void 0}(e,o,t);var n=o[t];return e.I||!Ae(n)?n:n===Wo(e.t,t)?(zo(e),e.o[t]=Go(e.A.h,n,e)):n},has:function(e,t){return t in Qe(e)},ownKeys:function(e){return Reflect.ownKeys(Qe(e))},set:function(e,t,o){var n=xs(Qe(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var i=Wo(Qe(e),t),a=i?.[H];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(ws(o,i)&&(o!==void 0||_t(e.t,t)))return!0;zo(e),Je(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Wo(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,zo(e),Je(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=Qe(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Se(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Se(12)}},sr={};ft(lr,function(e,t){sr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),sr.deleteProperty=function(e,t){return sr.set.call(this,e,t,void 0)},sr.set=function(e,t,o){return lr.set.call(this,e[0],t,o,e[0])};var nl=function(){function e(o){var n=this;this.O=Os,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var d=n;return function(v){var R=this;v===void 0&&(v=l);for(var w=arguments.length,A=Array(w>1?w-1:0),T=1;T<w;T++)A[T-1]=arguments[T];return d.produce(v,function(I){var M;return(M=a).call.apply(M,[R,I].concat(A))})}}var p;if(typeof a!="function"&&Se(6),s!==void 0&&typeof s!="function"&&Se(7),Ae(i)){var f=gs(n),m=Go(n,i,void 0),y=!0;try{p=a(m),y=!1}finally{y?Fr(f):Ho(f)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(v){return Mo(f,s),$o(v,f)},function(v){throw Fr(f),v}):(Mo(f,s),$o(p,f))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Rs&&(p=void 0),n.D&&qo(p,!0),s){var b=[],g=[];Te("Patches").M(i,p,b,g),s(b,g)}return p}Se(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var f=arguments.length,m=Array(f>1?f-1:0),y=1;y<f;y++)m[y-1]=arguments[y];return n.produceWithPatches(p,function(b){return i.apply(void 0,[b].concat(m))})};var s,l,d=n.produce(i,a,function(p,f){s=p,l=f});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,s,l]}):[d,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Ae(o)||Se(8),ze(o)&&(o=el(o));var n=gs(this),i=Go(this,o,void 0);return i[H].C=!0,Ho(n),i},t.finishDraft=function(o,n){var i=o&&o[H],a=i.A;return Mo(a,n),$o(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Os&&Se(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Te("Patches").$;return ze(o)?s(o,n):this.produce(o,function(l){return s(l,n)})},e}(),ge=new nl,il=ge.produce,Ny=ge.produceWithPatches.bind(ge),Py=ge.setAutoFreeze.bind(ge),Iy=ge.setUseProxies.bind(ge),Ty=ge.applyPatches.bind(ge),Ly=ge.createDraft.bind(ge),_y=ge.finishDraft.bind(ge),jr=il;function et(e){"@babel/helpers - typeof";return et=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},et(e)}function Qo(e,t){if(et(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(et(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jo(e){var t=Qo(e,"string");return et(t)==="symbol"?t:String(t)}function en(e,t,o){return t=Jo(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Ps(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,n)}return o}function Kr(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ps(Object(o),!0).forEach(function(n){en(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ps(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function oe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Is=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),tn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vr={INIT:"@@redux/INIT"+tn(),REPLACE:"@@redux/REPLACE"+tn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+tn()}};function al(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function rn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(oe(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(oe(1));return o(rn)(e,t)}if(typeof e!="function")throw new Error(oe(2));var i=e,a=t,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function f(){if(d)throw new Error(oe(3));return a}function m(v){if(typeof v!="function")throw new Error(oe(4));if(d)throw new Error(oe(5));var R=!0;return p(),l.push(v),function(){if(R){if(d)throw new Error(oe(6));R=!1,p();var A=l.indexOf(v);l.splice(A,1),s=null}}}function y(v){if(!al(v))throw new Error(oe(7));if(typeof v.type>"u")throw new Error(oe(8));if(d)throw new Error(oe(9));try{d=!0,a=i(a,v)}finally{d=!1}for(var R=s=l,w=0;w<R.length;w++){var A=R[w];A()}return v}function b(v){if(typeof v!="function")throw new Error(oe(10));i=v,y({type:Vr.REPLACE})}function g(){var v,R=m;return v={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(oe(11));function T(){A.next&&A.next(f())}T();var I=R(T);return{unsubscribe:I}}},v[Is]=function(){return this},v}return y({type:Vr.INIT}),n={dispatch:y,subscribe:m,getState:f,replaceReducer:b},n[Is]=g,n}function sl(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:Vr.INIT});if(typeof n>"u")throw new Error(oe(12));if(typeof o(void 0,{type:Vr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(oe(13))})}function Ts(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(o[i]=e[i])}var a=Object.keys(o),s,l;try{sl(o)}catch(d){l=d}return function(p,f){if(p===void 0&&(p={}),l)throw l;if(0)var m;for(var y=!1,b={},g=0;g<a.length;g++){var v=a[g],R=o[v],w=p[v],A=R(w,f);if(typeof A>"u"){var T=f&&f.type;throw new Error(oe(14))}b[v]=A,y=y||A!==w}return y=y||a.length!==Object.keys(p).length,y?b:p}}function Ut(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ls(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(oe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=t.map(function(d){return d(s)});return a=Ut.apply(void 0,l)(i.dispatch),Kr(Kr({},i),{},{dispatch:a})}}}function _s(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,e):s(l)}}};return t}var ks=_s();ks.withExtraArgument=_s;var on=ks;var $s=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),cl=function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(f){return d([p,f])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(f){p=[6,f],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Bt=function(e,t){for(var o=0,n=t.length,i=e.length;o<n;o++,i++)e[i]=t[o];return e},ll=Object.defineProperty,ul=Object.defineProperties,dl=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,pl=Object.prototype.hasOwnProperty,fl=Object.prototype.propertyIsEnumerable,Us=function(e,t,o){return t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},tt=function(e,t){for(var o in t||(t={}))pl.call(t,o)&&Us(e,o,t[o]);if(Ds)for(var n=0,i=Ds(t);n<i.length;n++){var o=i[n];fl.call(t,o)&&Us(e,o,t[o])}return e},nn=function(e,t){return ul(e,dl(t))},hl=function(e,t,o){return new Promise(function(n,i){var a=function(d){try{l(o.next(d))}catch(p){i(p)}},s=function(d){try{l(o.throw(d))}catch(p){i(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,s)};l((o=o.apply(e,t)).next())})};var ml=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ut:Ut.apply(null,arguments)},Xy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function yl(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var gl=function(e){$s(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array),bl=function(e){$s(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array);function cn(e){return Ae(e)?jr(e,function(){}):e}function xl(e){return typeof e=="boolean"}function vl(){return function(t){return Sl(t)}}function Sl(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,l=new gl;if(o&&(xl(o)?l.push(on):l.push(on.withExtraArgument(o.extraArgument))),0){if(i)var d;if(s)var p}return l}var an=!0;function Ws(e){var t=vl(),o=e||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?t():a,l=o.devTools,d=l===void 0?!0:l,p=o.preloadedState,f=p===void 0?void 0:p,m=o.enhancers,y=m===void 0?void 0:m,b;if(typeof i=="function")b=i;else if(yl(i))b=Ts(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=s;if(typeof g=="function"&&(g=g(t),!an&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!an&&g.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ls.apply(void 0,g),R=Ut;d&&(R=ml(tt({trace:!an},typeof d=="object"&&d)));var w=new bl(v),A=w;Array.isArray(y)?A=Bt([v],y):typeof y=="function"&&(A=y(w));var T=R.apply(void 0,A);return rn(b,f,T)}function rt(e,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return tt(tt({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function zs(e){var t={},o=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,o,n]}function Ol(e){return typeof e=="function"}function Cl(e,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?zs(t):[t,o,n],a=i[0],s=i[1],l=i[2],d;if(Ol(e))d=function(){return cn(e())};else{var p=cn(e);d=function(){return p}}function f(m,y){m===void 0&&(m=d());var b=Bt([a[y.type]],s.filter(function(g){var v=g.matcher;return v(y)}).map(function(g){var v=g.reducer;return v}));return b.filter(function(g){return!!g}).length===0&&(b=[l]),b.reduce(function(g,v){if(v)if(ze(g)){var R=g,w=v(R,y);return w===void 0?g:w}else{if(Ae(g))return jr(g,function(A){return v(A,y)});var w=v(g,y);if(w===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return g},m)}return f.getInitialState=d,f}function El(e,t){return e+"/"+t}function Fs(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:cn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(f){var m=n[f],y=El(t,f),b,g;"reducer"in m?(b=m.reducer,g=m.prepare):b=m,a[f]=b,s[y]=b,l[f]=g?rt(y,g):rt(y)});function d(){var f=typeof e.extraReducers=="function"?zs(e.extraReducers):[e.extraReducers],m=f[0],y=m===void 0?{}:m,b=f[1],g=b===void 0?[]:b,v=f[2],R=v===void 0?void 0:v,w=tt(tt({},y),s);return Cl(o,function(A){for(var T in w)A.addCase(T,w[T]);for(var I=0,M=g;I<M.length;I++){var ce=M[I];A.addMatcher(ce.matcher,ce.reducer)}R&&A.addDefaultCase(R)})}var p;return{name:t,reducer:function(f,m){return p||(p=d()),p(f,m)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var wl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Al=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=wl[Math.random()*64|0];return t},Rl=["name","message","stack","code"],sn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Bs=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Nl=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Rl;o<n.length;o++){var i=n[o];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},tg=function(){function e(t,o,n){var i=rt(t+"/fulfilled",function(f,m,y,b){return{payload:f,meta:nn(tt({},b||{}),{arg:y,requestId:m,requestStatus:"fulfilled"})}}),a=rt(t+"/pending",function(f,m,y){return{payload:void 0,meta:nn(tt({},y||{}),{arg:m,requestId:f,requestStatus:"pending"})}}),s=rt(t+"/rejected",function(f,m,y,b,g){return{payload:b,error:(n&&n.serializeError||Nl)(f||"Rejected"),meta:nn(tt({},g||{}),{arg:y,requestId:m,rejectedWithValue:!!b,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function f(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return f.prototype.abort=function(){},f}();function p(f){return function(m,y,b){var g=n?.idGenerator?n.idGenerator(f):Al(),v=new d,R,w=!1;function A(I){R=I,v.abort()}var T=function(){return hl(this,null,function(){var I,M,ce,Y,zt,be,h;return cl(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Y=(I=n?.condition)==null?void 0:I.call(n,f,{getState:y,extra:b}),Il(Y)?[4,Y]:[3,2];case 1:Y=x.sent(),x.label=2;case 2:if(Y===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,zt=new Promise(function(N,W){return v.signal.addEventListener("abort",function(){return W({name:"AbortError",message:R||"Aborted"})})}),m(a(g,f,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:g,arg:f},{getState:y,extra:b}))),[4,Promise.race([zt,Promise.resolve(o(f,{dispatch:m,getState:y,extra:b,requestId:g,signal:v.signal,abort:A,rejectWithValue:function(N,W){return new sn(N,W)},fulfillWithValue:function(N,W){return new Bs(N,W)}})).then(function(N){if(N instanceof sn)throw N;return N instanceof Bs?i(N.payload,g,f,N.meta):i(N,g,f)})])];case 3:return ce=x.sent(),[3,5];case 4:return be=x.sent(),ce=be instanceof sn?s(null,g,f,be.payload,be.meta):s(be,g,f),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(ce)&&ce.meta.condition,h||m(ce),[2,ce]}})})}();return Object.assign(T,{abort:A,requestId:g,arg:f,unwrap:function(){return T.then(Pl)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Pl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Il(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hs="listener",Gs="completed",js="cancelled",rg="task-"+js,og="task-"+Gs,ng=Hs+"-"+js,ig=Hs+"-"+Gs;var ln="listenerMiddleware";var ag=rt(ln+"/add"),sg=rt(ln+"/removeAll"),cg=rt(ln+"/remove");var Ms,lg=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ms||(Ms=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Tl=function(e){return function(t){setTimeout(t,e)}},ug=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Tl(10);As();window.ftReduxStores||(window.ftReduxStores={});var Ks=class e{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(ir(a))return a;if(i==null)return;let s=Fs({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),l=Ws({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:s.reducer(d,p)});return window.ftReduxStores[i.name]=new e(s,l)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Ur,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,l=n[s];return l?(...d)=>{let p=l(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[s]: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 Xr=S(L());var Zr=class extends We{async listMySearches(){let t=k.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var qr=class extends We{async listMyBookmarks(){let t=k.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var _l="ft-user-assets",Yr=Xr.FtReduxStore.get({name:_l,initialState:{savedSearches:void 0,bookmarks:void 0}}),un=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new qr,this.savedSearchesService=new Zr,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=k.getState();(0,Xr.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(),Yr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Yr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Yr.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;Yr.actions.bookmarks(o)}}},$g=new un;var dn=class{addCommand(t,o=!1){k.commands.add(t,o)}consumeCommand(t){return k.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new dn;var Vs=S(L()),pn=class{highlightHtml(t,o){(0,Vs.highlightHtml)(t,o)}};window.FluidTopicsHighlightHtmlService=new pn;var Zs=S(L());var fn=class{isDate(t){var o,n,i,a;return(a=(i=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,o){var n,i,a;return Zs.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new fn;(0,qs.customElement)("ft-app-context")(K);var hn=class e extends Event{constructor(){super(e.eventName)}};hn.eventName="search-context-clear-all-filters";var kl=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},gn=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},yn=Symbol("registerInterval");function Dl(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[yn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[yn]):this.dispatchEvent(new gn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=yn,kl([(0,Xs.state)()],o.prototype,"stateManager",void 0),o}var Mt=class extends Dl(Ys.FtLitElementRedux){};var rc=S(L());var ro=S(z()),oo=S(Q()),no=S(L());var Qs=S(z());var Js=Qs.css`
|
|
908
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(k.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&k.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&k.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&k.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&k.actions.noCustom(this.noCustom),t.has("editorMode")&&k.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&k.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&k.actions.session(this.session),t.has("availableUiLocales")&&k.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Lt.addContext(o)),t.has("openExternalDocumentInNewTab")&&k.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&k.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&k.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())}};K.elementDefinitions={};K.styles=ts;se([(0,ve.property)()],K.prototype,"baseUrl",void 0);se([(0,ve.property)()],K.prototype,"apiIntegrationIdentifier",void 0);se([(0,ve.property)()],K.prototype,"uiLocale",void 0);se([(0,we.jsonProperty)(null)],K.prototype,"availableUiLocales",void 0);se([(0,we.jsonProperty)(null)],K.prototype,"metadataConfiguration",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"editorMode",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"noCustom",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"openExternalDocumentInNewTab",void 0);se([(0,ve.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],K.prototype,"noCustomComponent",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"withManualResources",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"navigatorOnline",void 0);se([(0,ve.property)({type:Boolean})],K.prototype,"forcedOffline",void 0);se([(0,ve.property)({type:Object})],K.prototype,"apiProvider",void 0);se([(0,we.jsonProperty)([])],K.prototype,"messageContexts",void 0);se([(0,we.jsonProperty)(void 0)],K.prototype,"session",void 0);var Ll=S(Q());function Vc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Dr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Dr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(i=Object.keys(e),o=i.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Dr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Dr(e,t){try{return Vc(e,t)}catch{return!1}}function Bo(e,t){return!Dr(e,t)}var Zc=S(Q(),1);var Ur=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 nr=S(Q(),1);var is=S(Q(),1);function as(e,t){let o=()=>JSON.parse(JSON.stringify(e));return(0,is.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:Bo,...t??{}})}var Br=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){i(l);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var cs=S(z(),1);var Mr=window,qc=Mr.ShadowRoot&&(Mr.ShadyCSS===void 0||Mr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yy=Symbol();var ss=(e,t)=>{qc?e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):t.forEach(o=>{let n=document.createElement("style"),i=Mr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,e.appendChild(n)})};var $r=class extends cs.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,a])=>t.registry.define(i,a)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ss(n,t.elementStyles),n}};var Wr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},ps,ls=Symbol("constructorPrototype"),us=Symbol("constructorName"),fs=Symbol("exportpartsDebouncer"),ds=Symbol("dynamicDependenciesLoaded"),Ye=class extends $r{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ps]=new Br(5),this[us]=this.constructor.name,this[ls]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[us]&&Object.setPrototypeOf(this,this[ls])}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[ds]||(t[ds]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[fs].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,a,s,l;let d=y=>y!=null&&y.trim().length>0,p=t.filter(d).map(y=>y.trim());if(p.length===0){this.removeAttribute("exportparts");return}let f=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(a=(i=y.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],g=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(v=>v.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...b,...g).filter(d).map(v=>v.trim()).forEach(v=>f.add(v))}if(f.size===0){this.removeAttribute("exportparts");return}let m=[...f.values()].flatMap(y=>p.map(b=>`${y}:${b}--${y}`));this.setAttribute("exportparts",[...this.part,...m].join(", "))}};ps=fs;Wr([(0,nr.property)()],Ye.prototype,"exportpartsPrefix",void 0);Wr([as([])],Ye.prototype,"exportpartsPrefixes",void 0);Wr([(0,nr.property)()],Ye.prototype,"customStylesheet",void 0);Wr([(0,nr.state)()],Ye.prototype,"useAdoptedStyleSheets",void 0);function ir(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var hs,ms,ys,zr=Symbol("internalReduxEventsUnsubscribers"),Xe=Symbol("internalStoresUnsubscribers"),pt=Symbol("internalStores"),ar=class extends Ye{constructor(){super(...arguments),this[hs]=new Map,this[ms]=new Map,this[ys]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some(o=>t.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[pt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[pt].values()][0]}getStore(t){return t==null?this.getUnnamedStore():this[pt].get(t)}addStore(t,o){var n;o=(n=o??(ir(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[pt].delete(o)}setupStore(t,o){this[pt].set(t,o),this.subscribeToStore(t,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[pt].forEach((t,o)=>this.subscribeToStore(o,t)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((t,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(t.store);i&&(t.store?this[Xe].has(t.store):this[Xe].size>0)&&(this[o]=t.selector(i.getState(),this))}})}subscribeToStore(t,o){var n;this[Xe].set(t,o.subscribe(()=>this.updateFromStores())),ir(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=l=>this[a](l);o.eventBus.addEventListener(i.eventName,s),this[zr].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Xe].forEach((t,o)=>this.unsubscribeFromStore(o)),this[zr].forEach(t=>t()),this[zr]=[]}unsubscribeFromStore(t){this[Xe].has(t)&&this[Xe].get(t)(),this[Xe].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};hs=Xe,ms=pt,ys=zr;ar.reduxProperties=new Map;ar.reduxReactiveProperties=new Set;ar.reduxEventListeners=new Map;function Se(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ze(e){return!!e&&!!e[H]}function Ae(e){var t;return!!e&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ol}(e)||Array.isArray(e)||!!e[Cs]||!!(!((t=e.constructor)===null||t===void 0)&&t[Cs])||Ko(e)||Vo(e))}function ft(e,t,o){o===void 0&&(o=!1),Dt(e)===0?(o?Object.keys:kt)(e).forEach(function(n){o&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Dt(e){var t=e[H];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ko(e)?2:Vo(e)?3:0}function _t(e,t){return Dt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Yc(e,t){return Dt(e)===2?e.get(t):e[t]}function Es(e,t,o){var n=Dt(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function ws(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ko(e){return tl&&e instanceof Map}function Vo(e){return rl&&e instanceof Set}function Qe(e){return e.o||e.t}function Zo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ns(e);delete t[H];for(var o=kt(t),n=0;n<o.length;n++){var i=o[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function qo(e,t){return t===void 0&&(t=!1),Yo(e)||ze(e)||!Ae(e)||(Dt(e)>1&&(e.set=e.add=e.clear=e.delete=Xc),Object.freeze(e),t&&ft(e,function(o,n){return qo(n,!0)},!0)),e}function Xc(){Se(2)}function Yo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Te(e){var t=jo[e];return t||Se(18,e),t}function Qc(e,t){jo[e]||(jo[e]=t)}function Fo(){return cr}function Mo(e,t){t&&(Te("Patches"),e.u=[],e.s=[],e.v=t)}function Fr(e){Ho(e),e.p.forEach(Jc),e.p=null}function Ho(e){e===cr&&(cr=e.l)}function gs(e){return cr={p:[],l:cr,h:e,m:!0,_:0}}function Jc(e){var t=e[H];t.i===0||t.i===1?t.j():t.g=!0}function $o(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Te("ES5").S(t,e,n),n?(o[H].P&&(Fr(t),Se(4)),Ae(e)&&(e=Hr(t,e),t.l||Gr(t,e)),t.u&&Te("Patches").M(o[H].t,e,t.u,t.s)):e=Hr(t,o,[]),Fr(t),t.u&&t.v(t.u,t.s),e!==Rs?e:void 0}function Hr(e,t,o){if(Yo(t))return t;var n=t[H];if(!n)return ft(t,function(l,d){return bs(e,n,t,l,d,o)},!0),t;if(n.A!==e)return t;if(!n.P)return Gr(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Zo(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),ft(a,function(l,d){return bs(e,n,i,l,d,o,s)}),Gr(e,i,!1),o&&e.u&&Te("Patches").N(n,o,e.u,e.s)}return n.o}function bs(e,t,o,n,i,a,s){if(ze(i)){var l=Hr(e,i,a&&t&&t.i!==3&&!_t(t.R,n)?a.concat(n):void 0);if(Es(o,n,l),!ze(l))return;e.m=!1}else s&&o.add(i);if(Ae(i)&&!Yo(i)){if(!e.h.D&&e._<1)return;Hr(e,i),t&&t.A.l||Gr(e,i)}}function Gr(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&qo(t,o)}function Wo(e,t){var o=e[H];return(o?Qe(o):e)[t]}function xs(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function Je(e){e.P||(e.P=!0,e.l&&Je(e.l))}function zo(e){e.o||(e.o=Zo(e.t))}function Go(e,t,o){var n=Ko(t)?Te("MapSet").F(t,o):Vo(t)?Te("MapSet").T(t,o):e.O?function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:Fo(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=l,p=lr;s&&(d=[l],p=sr);var f=Proxy.revocable(d,p),m=f.revoke,y=f.proxy;return l.k=y,l.j=m,y}(t,o):Te("ES5").J(t,o);return(o?o.A:Fo()).p.push(n),n}function el(e){return ze(e)||Se(22,e),function t(o){if(!Ae(o))return o;var n,i=o[H],a=Dt(o);if(i){if(!i.P&&(i.i<4||!Te("ES5").K(i)))return i.t;i.I=!0,n=vs(o,a),i.I=!1}else n=vs(o,a);return ft(n,function(s,l){i&&Yc(i.t,s)===l||Es(n,s,t(l))}),a===3?new Set(n):n}(e)}function vs(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Zo(e)}function As(){function e(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[H];return lr.get(p,s)},set:function(p){var f=this[H];lr.set(f,s,p)}},d}function t(s){for(var l=s.length-1;l>=0;l--){var d=s[l][H];if(!d.P)switch(d.i){case 5:n(d)&&Je(d);break;case 4:o(d)&&Je(d)}}}function o(s){for(var l=s.t,d=s.k,p=kt(d),f=p.length-1;f>=0;f--){var m=p[f];if(m!==H){var y=l[m];if(y===void 0&&!_t(l,m))return!0;var b=d[m],g=b&&b[H];if(g?g.t!==y:!ws(b,y))return!0}}var v=!!l[H];return p.length!==kt(l).length+(v?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function i(s){s.g&&Se(3,JSON.stringify(Qe(s)))}var a={};Qc("ES5",{J:function(s,l){var d=Array.isArray(s),p=function(m,y){if(m){for(var b=Array(y.length),g=0;g<y.length;g++)Object.defineProperty(b,""+g,e(g,!0));return b}var v=Ns(y);delete v[H];for(var R=kt(v),w=0;w<R.length;w++){var A=R[w];v[A]=e(A,m||!!v[A].enumerable)}return Object.create(Object.getPrototypeOf(y),v)}(d,s),f={i:d?5:4,A:l?l.A:Fo(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,H,{value:f,writable:!0}),p},S:function(s,l,d){d?ze(l)&&l[H].A===s&&t(s.p):(s.u&&function p(f){if(f&&typeof f=="object"){var m=f[H];if(m){var y=m.t,b=m.k,g=m.R,v=m.i;if(v===4)ft(b,function(I){I!==H&&(y[I]!==void 0||_t(y,I)?g[I]||p(b[I]):(g[I]=!0,Je(m)))}),ft(y,function(I){b[I]!==void 0||_t(b,I)||(g[I]=!1,Je(m))});else if(v===5){if(n(m)&&(Je(m),g.length=!0),b.length<y.length)for(var R=b.length;R<y.length;R++)g[R]=!1;else for(var w=y.length;w<b.length;w++)g[w]=!0;for(var A=Math.min(b.length,y.length),T=0;T<A;T++)b.hasOwnProperty(T)||(g[T]=!0),g[T]===void 0&&p(b[T])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Ss,cr,Xo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",tl=typeof Map<"u",rl=typeof Set<"u",Os=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Rs=Xo?Symbol.for("immer-nothing"):((Ss={})["immer-nothing"]=!0,Ss),Cs=Xo?Symbol.for("immer-draftable"):"__$immer_draftable",H=Xo?Symbol.for("immer-state"):"__$immer_state";var ol=""+Object.prototype.constructor,kt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ns=Object.getOwnPropertyDescriptors||function(e){var t={};return kt(e).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)}),t},jo={},lr={get:function(e,t){if(t===H)return e;var o=Qe(e);if(!_t(o,t))return function(i,a,s){var l,d=xs(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(i.k):void 0}(e,o,t);var n=o[t];return e.I||!Ae(n)?n:n===Wo(e.t,t)?(zo(e),e.o[t]=Go(e.A.h,n,e)):n},has:function(e,t){return t in Qe(e)},ownKeys:function(e){return Reflect.ownKeys(Qe(e))},set:function(e,t,o){var n=xs(Qe(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var i=Wo(Qe(e),t),a=i?.[H];if(a&&a.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(ws(o,i)&&(o!==void 0||_t(e.t,t)))return!0;zo(e),Je(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Wo(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,zo(e),Je(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=Qe(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Se(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Se(12)}},sr={};ft(lr,function(e,t){sr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),sr.deleteProperty=function(e,t){return sr.set.call(this,e,t,void 0)},sr.set=function(e,t,o){return lr.set.call(this,e[0],t,o,e[0])};var nl=function(){function e(o){var n=this;this.O=Os,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var d=n;return function(v){var R=this;v===void 0&&(v=l);for(var w=arguments.length,A=Array(w>1?w-1:0),T=1;T<w;T++)A[T-1]=arguments[T];return d.produce(v,function(I){var M;return(M=a).call.apply(M,[R,I].concat(A))})}}var p;if(typeof a!="function"&&Se(6),s!==void 0&&typeof s!="function"&&Se(7),Ae(i)){var f=gs(n),m=Go(n,i,void 0),y=!0;try{p=a(m),y=!1}finally{y?Fr(f):Ho(f)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(v){return Mo(f,s),$o(v,f)},function(v){throw Fr(f),v}):(Mo(f,s),$o(p,f))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===Rs&&(p=void 0),n.D&&qo(p,!0),s){var b=[],g=[];Te("Patches").M(i,p,b,g),s(b,g)}return p}Se(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var f=arguments.length,m=Array(f>1?f-1:0),y=1;y<f;y++)m[y-1]=arguments[y];return n.produceWithPatches(p,function(b){return i.apply(void 0,[b].concat(m))})};var s,l,d=n.produce(i,a,function(p,f){s=p,l=f});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,s,l]}):[d,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Ae(o)||Se(8),ze(o)&&(o=el(o));var n=gs(this),i=Go(this,o,void 0);return i[H].C=!0,Ho(n),i},t.finishDraft=function(o,n){var i=o&&o[H],a=i.A;return Mo(a,n),$o(void 0,a)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Os&&Se(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Te("Patches").$;return ze(o)?s(o,n):this.produce(o,function(l){return s(l,n)})},e}(),ge=new nl,il=ge.produce,Ny=ge.produceWithPatches.bind(ge),Py=ge.setAutoFreeze.bind(ge),Iy=ge.setUseProxies.bind(ge),Ty=ge.applyPatches.bind(ge),Ly=ge.createDraft.bind(ge),_y=ge.finishDraft.bind(ge),jr=il;function et(e){"@babel/helpers - typeof";return et=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},et(e)}function Qo(e,t){if(et(e)!=="object"||e===null)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(et(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jo(e){var t=Qo(e,"string");return et(t)==="symbol"?t:String(t)}function en(e,t,o){return t=Jo(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Ps(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,n)}return o}function Kr(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ps(Object(o),!0).forEach(function(n){en(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ps(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function oe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Is=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),tn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vr={INIT:"@@redux/INIT"+tn(),REPLACE:"@@redux/REPLACE"+tn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+tn()}};function al(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function rn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(oe(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(oe(1));return o(rn)(e,t)}if(typeof e!="function")throw new Error(oe(2));var i=e,a=t,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function f(){if(d)throw new Error(oe(3));return a}function m(v){if(typeof v!="function")throw new Error(oe(4));if(d)throw new Error(oe(5));var R=!0;return p(),l.push(v),function(){if(R){if(d)throw new Error(oe(6));R=!1,p();var A=l.indexOf(v);l.splice(A,1),s=null}}}function y(v){if(!al(v))throw new Error(oe(7));if(typeof v.type>"u")throw new Error(oe(8));if(d)throw new Error(oe(9));try{d=!0,a=i(a,v)}finally{d=!1}for(var R=s=l,w=0;w<R.length;w++){var A=R[w];A()}return v}function b(v){if(typeof v!="function")throw new Error(oe(10));i=v,y({type:Vr.REPLACE})}function g(){var v,R=m;return v={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(oe(11));function T(){A.next&&A.next(f())}T();var I=R(T);return{unsubscribe:I}}},v[Is]=function(){return this},v}return y({type:Vr.INIT}),n={dispatch:y,subscribe:m,getState:f,replaceReducer:b},n[Is]=g,n}function sl(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:Vr.INIT});if(typeof n>"u")throw new Error(oe(12));if(typeof o(void 0,{type:Vr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(oe(13))})}function Ts(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(o[i]=e[i])}var a=Object.keys(o),s,l;try{sl(o)}catch(d){l=d}return function(p,f){if(p===void 0&&(p={}),l)throw l;if(0)var m;for(var y=!1,b={},g=0;g<a.length;g++){var v=a[g],R=o[v],w=p[v],A=R(w,f);if(typeof A>"u"){var T=f&&f.type;throw new Error(oe(14))}b[v]=A,y=y||A!==w}return y=y||a.length!==Object.keys(p).length,y?b:p}}function Ut(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ls(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(oe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=t.map(function(d){return d(s)});return a=Ut.apply(void 0,l)(i.dispatch),Kr(Kr({},i),{},{dispatch:a})}}}function _s(e){var t=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,e):s(l)}}};return t}var ks=_s();ks.withExtraArgument=_s;var on=ks;var $s=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),cl=function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(f){return d([p,f])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=p[0]&2?i.return:p[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,p[1])).done)return a;switch(i=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(f){p=[6,f],i=0}finally{n=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Bt=function(e,t){for(var o=0,n=t.length,i=e.length;o<n;o++,i++)e[i]=t[o];return e},ll=Object.defineProperty,ul=Object.defineProperties,dl=Object.getOwnPropertyDescriptors,Ds=Object.getOwnPropertySymbols,pl=Object.prototype.hasOwnProperty,fl=Object.prototype.propertyIsEnumerable,Us=function(e,t,o){return t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},tt=function(e,t){for(var o in t||(t={}))pl.call(t,o)&&Us(e,o,t[o]);if(Ds)for(var n=0,i=Ds(t);n<i.length;n++){var o=i[n];fl.call(t,o)&&Us(e,o,t[o])}return e},nn=function(e,t){return ul(e,dl(t))},hl=function(e,t,o){return new Promise(function(n,i){var a=function(d){try{l(o.next(d))}catch(p){i(p)}},s=function(d){try{l(o.throw(d))}catch(p){i(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(a,s)};l((o=o.apply(e,t)).next())})};var ml=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ut:Ut.apply(null,arguments)},Xy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function yl(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var gl=function(e){$s(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array),bl=function(e){$s(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=e.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Bt([void 0],o[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],o.concat(this))))},t}(Array);function cn(e){return Ae(e)?jr(e,function(){}):e}function xl(e){return typeof e=="boolean"}function vl(){return function(t){return Sl(t)}}function Sl(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,a=e.serializableCheck,s=a===void 0?!0:a,l=new gl;if(o&&(xl(o)?l.push(on):l.push(on.withExtraArgument(o.extraArgument))),0){if(i)var d;if(s)var p}return l}var an=!0;function Ws(e){var t=vl(),o=e||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?t():a,l=o.devTools,d=l===void 0?!0:l,p=o.preloadedState,f=p===void 0?void 0:p,m=o.enhancers,y=m===void 0?void 0:m,b;if(typeof i=="function")b=i;else if(yl(i))b=Ts(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=s;if(typeof g=="function"&&(g=g(t),!an&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!an&&g.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ls.apply(void 0,g),R=Ut;d&&(R=ml(tt({trace:!an},typeof d=="object"&&d)));var w=new bl(v),A=w;Array.isArray(y)?A=Bt([v],y):typeof y=="function"&&(A=y(w));var T=R.apply(void 0,A);return rn(b,f,T)}function rt(e,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var a=t.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return tt(tt({type:e,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}function zs(e){var t={},o=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return e(i),[t,o,n]}function Ol(e){return typeof e=="function"}function Cl(e,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?zs(t):[t,o,n],a=i[0],s=i[1],l=i[2],d;if(Ol(e))d=function(){return cn(e())};else{var p=cn(e);d=function(){return p}}function f(m,y){m===void 0&&(m=d());var b=Bt([a[y.type]],s.filter(function(g){var v=g.matcher;return v(y)}).map(function(g){var v=g.reducer;return v}));return b.filter(function(g){return!!g}).length===0&&(b=[l]),b.reduce(function(g,v){if(v)if(ze(g)){var R=g,w=v(R,y);return w===void 0?g:w}else{if(Ae(g))return jr(g,function(A){return v(A,y)});var w=v(g,y);if(w===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return g},m)}return f.getInitialState=d,f}function El(e,t){return e+"/"+t}function Fs(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:cn(e.initialState),n=e.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(f){var m=n[f],y=El(t,f),b,g;"reducer"in m?(b=m.reducer,g=m.prepare):b=m,a[f]=b,s[y]=b,l[f]=g?rt(y,g):rt(y)});function d(){var f=typeof e.extraReducers=="function"?zs(e.extraReducers):[e.extraReducers],m=f[0],y=m===void 0?{}:m,b=f[1],g=b===void 0?[]:b,v=f[2],R=v===void 0?void 0:v,w=tt(tt({},y),s);return Cl(o,function(A){for(var T in w)A.addCase(T,w[T]);for(var I=0,M=g;I<M.length;I++){var ce=M[I];A.addMatcher(ce.matcher,ce.reducer)}R&&A.addDefaultCase(R)})}var p;return{name:t,reducer:function(f,m){return p||(p=d()),p(f,m)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var wl="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Al=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=wl[Math.random()*64|0];return t},Rl=["name","message","stack","code"],sn=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Bs=function(){function e(t,o){this.payload=t,this.meta=o}return e}(),Nl=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=Rl;o<n.length;o++){var i=n[o];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},tg=function(){function e(t,o,n){var i=rt(t+"/fulfilled",function(f,m,y,b){return{payload:f,meta:nn(tt({},b||{}),{arg:y,requestId:m,requestStatus:"fulfilled"})}}),a=rt(t+"/pending",function(f,m,y){return{payload:void 0,meta:nn(tt({},y||{}),{arg:m,requestId:f,requestStatus:"pending"})}}),s=rt(t+"/rejected",function(f,m,y,b,g){return{payload:b,error:(n&&n.serializeError||Nl)(f||"Rejected"),meta:nn(tt({},g||{}),{arg:y,requestId:m,rejectedWithValue:!!b,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function f(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return f.prototype.abort=function(){},f}();function p(f){return function(m,y,b){var g=n?.idGenerator?n.idGenerator(f):Al(),v=new d,R,w=!1;function A(I){R=I,v.abort()}var T=function(){return hl(this,null,function(){var I,M,ce,Y,zt,be,h;return cl(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Y=(I=n?.condition)==null?void 0:I.call(n,f,{getState:y,extra:b}),Il(Y)?[4,Y]:[3,2];case 1:Y=x.sent(),x.label=2;case 2:if(Y===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,zt=new Promise(function(N,W){return v.signal.addEventListener("abort",function(){return W({name:"AbortError",message:R||"Aborted"})})}),m(a(g,f,(M=n?.getPendingMeta)==null?void 0:M.call(n,{requestId:g,arg:f},{getState:y,extra:b}))),[4,Promise.race([zt,Promise.resolve(o(f,{dispatch:m,getState:y,extra:b,requestId:g,signal:v.signal,abort:A,rejectWithValue:function(N,W){return new sn(N,W)},fulfillWithValue:function(N,W){return new Bs(N,W)}})).then(function(N){if(N instanceof sn)throw N;return N instanceof Bs?i(N.payload,g,f,N.meta):i(N,g,f)})])];case 3:return ce=x.sent(),[3,5];case 4:return be=x.sent(),ce=be instanceof sn?s(null,g,f,be.payload,be.meta):s(be,g,f),[3,5];case 5:return h=n&&!n.dispatchConditionRejection&&s.match(ce)&&ce.meta.condition,h||m(ce),[2,ce]}})})}();return Object.assign(T,{abort:A,requestId:g,arg:f,unwrap:function(){return T.then(Pl)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function Pl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Il(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hs="listener",Gs="completed",js="cancelled",rg="task-"+js,og="task-"+Gs,ng=Hs+"-"+js,ig=Hs+"-"+Gs;var ln="listenerMiddleware";var ag=rt(ln+"/add"),sg=rt(ln+"/removeAll"),cg=rt(ln+"/remove");var Ms,lg=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Ms||(Ms=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Tl=function(e){return function(t){setTimeout(t,e)}},ug=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Tl(10);As();window.ftReduxStores||(window.ftReduxStores={});var Ks=class e{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,a=window.ftReduxStores[n];if(ir(a))return a;if(i==null)return;let s=Fs({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),l=Ws({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:s.reducer(d,p)});return window.ftReduxStores[i.name]=new e(s,l)}constructor(t,o){this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new Ur,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,l=n[s];return l?(...d)=>{let p=l(...d);return this.reduxStore.dispatch(p),p}:d=>{this.setState({[s]: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 Xr=S(L());var Zr=class extends We{async listMySearches(){let t=k.getState().session;return t?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var qr=class extends We{async listMyBookmarks(){let t=k.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var _l="ft-user-assets",Yr=Xr.FtReduxStore.get({name:_l,initialState:{savedSearches:void 0,bookmarks:void 0}}),un=class{constructor(){this.currentSession=k.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new qr,this.savedSearchesService=new Zr,k.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=k.getState();(0,Xr.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(),Yr.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Yr.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Yr.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;Yr.actions.bookmarks(o)}}},$g=new un;var dn=class{addCommand(t,o=!1){k.commands.add(t,o)}consumeCommand(t){return k.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new dn;var Vs=S(L()),pn=class{highlightHtml(t,o,n){(0,Vs.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new pn;var Zs=S(L());var fn=class{isDate(t){var o,n,i,a;return(a=(i=((n=(o=k.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(t,o){var n,i,a;return Zs.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:k.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new fn;(0,qs.customElement)("ft-app-context")(K);var hn=class e extends Event{constructor(){super(e.eventName)}};hn.eventName="search-context-clear-all-filters";var kl=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},gn=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},yn=Symbol("registerInterval");function Dl(e){var t;class o extends e{constructor(){super(...arguments),this[t]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[yn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[yn]):this.dispatchEvent(new gn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=yn,kl([(0,Xs.state)()],o.prototype,"stateManager",void 0),o}var Mt=class extends Dl(Ys.FtLitElementRedux){};var rc=S(L());var ro=S(z()),oo=S(Q()),no=S(L());var Qs=S(z());var Js=Qs.css`
|
|
909
909
|
`;var eo=S(L());var tc=S(Q()),Ul=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},bn=Symbol("i18nAttributes"),Qr=Symbol("i18nProperties"),ur=Symbol("i18nUnsubs");function to(e){var t;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?os:Lt}i18n(i,a,...s){var l;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let d=(l=i.args)!==null&&l!==void 0?l:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...d)}onI18nUpdate(i){var a,s;(a=this[bn])===null||a===void 0||a.forEach((l,d)=>{var p;let f=this.getI18nAttributeValue(d);((p=f?.context)===null||p===void 0?void 0:p.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(d,f,l)}),(s=this[Qr])===null||s===void 0||s.forEach((l,d)=>{l.context.toLowerCase()===i.toLowerCase()&&(this[d]=this.i18n(l))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[bn])===null||a===void 0||a.forEach((l,d)=>{let p=this.getI18nAttributeValue(d);p?.context&&p.key&&(i.has(d)||l.argsProvider!=null)&&(i.has(d)&&this.addI18nContext(p.context),this.updateI18nAttributeMessage(d,p,l))}),(s=this[Qr])===null||s===void 0||s.forEach((l,d)=>{l.argsProvider!=null&&(this[d]=this.i18n(l))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,l;super.connectedCallback(),new Set([...(a=(i=this[Qr])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(l=(s=this[bn])===null||s===void 0?void 0:s.keys())!==null&&l!==void 0?l:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(i,a){i=i.toLowerCase(),this[ur].has(i)||this[ur].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[ur].forEach(i=>i()),this[ur].clear()}}return t=ur,Ul([(0,tc.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var ec=class extends to(eo.FtLitElement){},Jr=class extends to(eo.FtLitElementRedux){};var dr=function(e,t,o,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,o,a):s(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},Re=class extends Jr{constructor(){super(),this.editorMode=!1,this.addStore(k)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":ro.nothing:ro.html`
|
|
910
910
|
<span class="ft-i18n">
|
|
911
911
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
@@ -1008,7 +1008,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1008
1008
|
></ft-button>
|
|
1009
1009
|
</div>
|
|
1010
1010
|
</div>
|
|
1011
|
-
`}onSearchBarKeyDown(t){switch(t.key){case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion();break;case"Backspace":t.stopPropagation();break}}onSearchBarKeyUp(t){switch(t.key){case"Backspace":t.stopPropagation();break;case"Enter":this.launchSearch(this.input.value);break;default:break}}onInput(t){var o;(o=this.stateManager)===null||o===void 0||o.setLiveQuery(this.input.value),this.forceCloseSuggestion=!1}launchSearch(t){var o;(o=this.stateManager)===null||o===void 0||o.setQuery(t),this.forceCloseSuggestion=!0,this.dispatchEvent(new CustomEvent("change"))}onSuggestionSelected(t){this.launchSearch(t.detail)}};Oe.elementDefinitions={"ft-search-input-suggestion":ht,"ft-button":Ee};Oe.styles=[br,Wt.noTextInputDefaultClearButton,Da];$t([(0,Wt.redux)()],Oe.prototype,"request",void 0);$t([(0,Wt.redux)()],Oe.prototype,"liveQuery",void 0);$t([(0,Wt.redux)()],Oe.prototype,"suggestResults",void 0);$t([(0,fr.state)()],Oe.prototype,"forceCloseSuggestion",void 0);$t([(0,fr.query)(".ft-search-input--input")],Oe.prototype,"input",void 0);$t([(0,fr.query)("ft-search-input-suggestion")],Oe.prototype,"suggestion",void 0);(0,dc.customElement)("ft-search-input")(Oe);})();
|
|
1011
|
+
`}onSearchBarKeyDown(t){switch(t.key){case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion();break;case"Backspace":t.stopPropagation();break}}onSearchBarKeyUp(t){switch(t.key){case"Backspace":t.stopPropagation();break;case"Enter":this.launchSearch(this.input.value);break;default:break}}onInput(t){var o;(o=this.stateManager)===null||o===void 0||o.setLiveQuery(this.input.value),this.forceCloseSuggestion=!1}launchSearch(t){var o;(o=this.stateManager)===null||o===void 0||o.setQuery(t),this.forceCloseSuggestion=!0,this.dispatchEvent(new CustomEvent("change",{detail:t}))}onSuggestionSelected(t){this.launchSearch(t.detail)}};Oe.elementDefinitions={"ft-search-input-suggestion":ht,"ft-button":Ee};Oe.styles=[br,Wt.noTextInputDefaultClearButton,Da];$t([(0,Wt.redux)()],Oe.prototype,"request",void 0);$t([(0,Wt.redux)()],Oe.prototype,"liveQuery",void 0);$t([(0,Wt.redux)()],Oe.prototype,"suggestResults",void 0);$t([(0,fr.state)()],Oe.prototype,"forceCloseSuggestion",void 0);$t([(0,fr.query)(".ft-search-input--input")],Oe.prototype,"input",void 0);$t([(0,fr.query)("ft-search-input-suggestion")],Oe.prototype,"suggestion",void 0);(0,dc.customElement)("ft-search-input")(Oe);})();
|
|
1012
1012
|
/*! Bundled license information:
|
|
1013
1013
|
|
|
1014
1014
|
lit-html/lit-html.js:
|