@fluid-topics/ft-search-bar 1.2.73 → 1.3.0
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-bar.light.js +1 -1
- package/build/ft-search-bar.min.js +16 -16
- package/package.json +15 -15
|
@@ -3361,7 +3361,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
3361
3361
|
`;var Np=u(E());var ad=u($()),lt=u(te()),$t=u(E());var rd=u($());var od=rd.css`
|
|
3362
3362
|
`;var $n=u(E()),mf="ft-app-info",Zi=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},gf={session:(t,e)=>{(0,$n.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>D.dispatchEvent(new Zi(e.payload)),0))}},D=$n.FtReduxStore.get({name:mf,reducers:gf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Kt=u(E());var qi=u(E());var Gr=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=D.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=D.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var Go=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Gr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Gr.await()}};var xr=class extends Go{constructor(e=!0,o){var n;super(o);let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new qi.CacheRegistry,this.cache=e?i.commonCache:new qi.CacheRegistry}clearCache(){this.cache.clearAll()}};var nd,bf=Symbol("clearAfterUnitTest"),Tn=class extends xr{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[nd]=()=>{this.defaultMessages={},this.cache=new Kt.CacheRegistry,this.listeners={}},this.currentUiLocale=D.getState().uiLocale,D.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=D.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Kt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),l=this.resolveContext(a);return new Kt.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(i){!(i instanceof Kt.CanceledPromiseError)&&o&&console.error(i)}return o&&await this.notify(e),n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,Kt.delay)(0).then(()=>o()).catch(()=>null)))}};nd=bf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Tn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Tn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var id=window.FluidTopicsI18nService,BO=window.FluidTopicsCustomI18nService;var Ge=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ve=class extends $t.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=()=>Gr.get(),this.messageContexts=[],this.cache=new $t.CacheRegistry,this.cleanSessionDebouncer=new $t.Debouncer}render(){return ad.html`
|
|
3363
3363
|
<slot></slot>
|
|
3364
|
-
`}update(e){var o,n,i,a,l;super.update(e),e.has("baseUrl")&&(D.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&D.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&D.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&D.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&D.actions.noCustom(this.noCustom),e.has("editorMode")&&D.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&D.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&D.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>id.addContext(c)),e.has("openExternalDocumentInNewTab")&&D.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&D.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&D.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(D.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),D.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),D.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ve.elementDefinitions={};ve.styles=od;Ge([(0,lt.property)()],ve.prototype,"baseUrl",void 0);Ge([(0,lt.property)()],ve.prototype,"apiIntegrationIdentifier",void 0);Ge([(0,lt.property)()],ve.prototype,"uiLocale",void 0);Ge([(0,$t.jsonProperty)(null)],ve.prototype,"availableUiLocales",void 0);Ge([(0,$t.jsonProperty)(null)],ve.prototype,"metadataConfiguration",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"editorMode",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"noCustom",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"openExternalDocumentInNewTab",void 0);Ge([(0,lt.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ve.prototype,"noCustomComponent",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"withManualResources",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"navigatorOnline",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"forcedOffline",void 0);Ge([(0,lt.property)({type:Object})],ve.prototype,"apiProvider",void 0);Ge([(0,$t.jsonProperty)([])],ve.prototype,"messageContexts",void 0);Ge([(0,$t.jsonProperty)(void 0)],ve.prototype,"session",void 0);Ge([(0,lt.state)()],ve.prototype,"localesConfiguration",void 0);var iu=u(te());function xf(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Nn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Nn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=l=>Object.keys(l).filter(c=>l[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Nn(t[l],e[l]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Nn(t,e){try{return xf(t,e)}catch{return!1}}function Pn(t,e){return!Nn(t,e)}var vf=u(te(),1);var _n=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var mo=u(te(),1);var sd=u(te(),1);function ld(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,sd.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:Pn,...e??{}})}var Bn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var dd=u($(),1);var Dn=globalThis,Sf=Dn.ShadowRoot&&(Dn.ShadyCSS===void 0||Dn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,QO=Symbol();var cd=(t,e)=>{if(Sf)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Dn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Fn=class extends dd.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return cd(n,e.elementStyles),n}};function pd(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var jo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},yd,fd=Symbol("constructorPrototype"),ud=Symbol("constructorName"),md=Symbol("exportpartsDebouncer"),hd=Symbol("dynamicDependenciesLoaded"),ir=class extends Fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[yd]=new Bn(5),this[ud]=this.constructor.name,this[fd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ud]&&Object.setPrototypeOf(this,this[fd])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[hd]||(e[hd]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=pd(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[md].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,l,c;let p=b=>b!=null&&b.trim().length>0,f=e.filter(p).map(b=>b.trim());if(f.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(l=b.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(C=>C.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(C=>C.trim()).forEach(C=>m.add(C))}if(m.size===0){this.removeAttribute("exportparts");return}let g=[...m.values()].flatMap(b=>f.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};yd=md;jo([(0,mo.property)()],ir.prototype,"exportpartsPrefix",void 0);jo([ld([])],ir.prototype,"exportpartsPrefixes",void 0);jo([(0,mo.property)()],ir.prototype,"customStylesheet",void 0);jo([(0,mo.property)()],ir.prototype,"elementToFocus",void 0);jo([(0,mo.state)()],ir.prototype,"useAdoptedStyleSheets",void 0);function Ko(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var gd,bd,xd,Zo=Symbol("internalReduxEventsUnsubscribers"),vr=Symbol("internalStoresUnsubscribers"),jr=Symbol("internalStores"),qo=class extends ir{constructor(){super(...arguments),this[gd]=new Map,this[bd]=new Map,this[xd]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[jr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[jr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[jr].get(e)}addStore(e,o){var n;o=(n=o??(Ko(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[jr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[jr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[jr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[vr].has(e.store):this[vr].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[vr].set(e,o.subscribe(()=>this.updateFromStores())),this[Zo].set(e,[]),Ko(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 l=c=>this[a](c);o.addEventListener(i.eventName,l),this[Zo].get(e).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[vr].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[vr].has(e)&&this[vr].get(e)(),this[vr].delete(e),(o=this[Zo].get(e))===null||o===void 0||o.forEach(n=>n()),this[Zo].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};gd=vr,bd=jr,xd=Zo;qo.reduxProperties=new Map;qo.reduxReactiveProperties=new Set;qo.reduxEventListeners=new Map;function Ot(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ar(t){return!!t&&!!t[me]}function Tt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===kf}(t)||Array.isArray(t)||!!t[Ad]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ad])||na(t)||ia(t))}function Kr(t,e,o){o===void 0&&(o=!1),xo(t)===0?(o?Object.keys:bo)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function xo(t){var e=t[me];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:na(t)?2:ia(t)?3:0}function go(t,e){return xo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Of(t,e){return xo(t)===2?t.get(e):t[e]}function Rd(t,e,o){var n=xo(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ld(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function na(t){return Rf&&t instanceof Map}function ia(t){return Lf&&t instanceof Set}function Sr(t){return t.o||t.t}function aa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=$d(t);delete e[me];for(var o=bo(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function sa(t,e){return e===void 0&&(e=!1),la(t)||ar(t)||!Tt(t)||(xo(t)>1&&(t.set=t.add=t.clear=t.delete=Cf),Object.freeze(t),e&&Kr(t,function(o,n){return sa(n,!0)},!0)),t}function Cf(){Ot(2)}function la(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Zt(t){var e=oa[t];return e||Ot(18,t),e}function wf(t,e){oa[t]||(oa[t]=e)}function ea(){return Xo}function Yi(t,e){e&&(Zt("Patches"),t.u=[],t.s=[],t.v=e)}function Mn(t){ta(t),t.p.forEach(Ef),t.p=null}function ta(t){t===Xo&&(Xo=t.l)}function vd(t){return Xo={p:[],l:Xo,h:t,m:!0,_:0}}function Ef(t){var e=t[me];e.i===0||e.i===1?e.j():e.g=!0}function Xi(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Zt("ES5").S(e,t,n),n?(o[me].P&&(Mn(e),Ot(4)),Tt(t)&&(t=zn(e,t),e.l||Un(e,t)),e.u&&Zt("Patches").M(o[me].t,t,e.u,e.s)):t=zn(e,o,[]),Mn(e),e.u&&e.v(e.u,e.s),t!==Id?t:void 0}function zn(t,e,o){if(la(e))return e;var n=e[me];if(!n)return Kr(e,function(c,p){return Sd(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Un(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=aa(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),Kr(a,function(c,p){return Sd(t,n,i,c,p,o,l)}),Un(t,i,!1),o&&t.u&&Zt("Patches").N(n,o,t.u,t.s)}return n.o}function Sd(t,e,o,n,i,a,l){if(ar(i)){var c=zn(t,i,a&&e&&e.i!==3&&!go(e.R,n)?a.concat(n):void 0);if(Rd(o,n,c),!ar(c))return;t.m=!1}else l&&o.add(i);if(Tt(i)&&!la(i)){if(!t.h.D&&t._<1)return;zn(t,i),e&&e.A.l||Un(t,i)}}function Un(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&sa(e,o)}function Qi(t,e){var o=t[me];return(o?Sr(o):t)[e]}function Od(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Or(t){t.P||(t.P=!0,t.l&&Or(t.l))}function Ji(t){t.o||(t.o=aa(t.t))}function ra(t,e,o){var n=na(e)?Zt("MapSet").F(e,o):ia(e)?Zt("MapSet").T(e,o):t.O?function(i,a){var l=Array.isArray(i),c={i:l?1:0,A:a?a.A:ea(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=Qo;l&&(p=[c],f=Yo);var m=Proxy.revocable(p,f),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(e,o):Zt("ES5").J(e,o);return(o?o.A:ea()).p.push(n),n}function Af(t){return ar(t)||Ot(22,t),function e(o){if(!Tt(o))return o;var n,i=o[me],a=xo(o);if(i){if(!i.P&&(i.i<4||!Zt("ES5").K(i)))return i.t;i.I=!0,n=Cd(o,a),i.I=!1}else n=Cd(o,a);return Kr(n,function(l,c){i&&Of(i.t,l)===c||Rd(n,l,e(c))}),a===3?new Set(n):n}(t)}function Cd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return aa(t)}function kd(){function t(l,c){var p=a[l];return p?p.enumerable=c:a[l]=p={configurable:!0,enumerable:c,get:function(){var f=this[me];return Qo.get(f,l)},set:function(f){var m=this[me];Qo.set(m,l,f)}},p}function e(l){for(var c=l.length-1;c>=0;c--){var p=l[c][me];if(!p.P)switch(p.i){case 5:n(p)&&Or(p);break;case 4:o(p)&&Or(p)}}}function o(l){for(var c=l.t,p=l.k,f=bo(p),m=f.length-1;m>=0;m--){var g=f[m];if(g!==me){var b=c[g];if(b===void 0&&!go(c,g))return!0;var S=p[g],v=S&&S[me];if(v?v.t!==b:!Ld(S,b))return!0}}var C=!!c[me];return f.length!==bo(c).length+(C?0:1)}function n(l){var c=l.k;if(c.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&Ot(3,JSON.stringify(Sr(l)))}var a={};wf("ES5",{J:function(l,c){var p=Array.isArray(l),f=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var C=$d(b);delete C[me];for(var T=bo(C),k=0;k<T.length;k++){var I=T[k];C[I]=t(I,g||!!C[I].enumerable)}return Object.create(Object.getPrototypeOf(b),C)}(p,l),m={i:p?5:4,A:c?c.A:ea(),P:!1,I:!1,R:{},l:c,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,me,{value:m,writable:!0}),f},S:function(l,c,p){p?ar(c)&&c[me].A===l&&e(l.p):(l.u&&function f(m){if(m&&typeof m=="object"){var g=m[me];if(g){var b=g.t,S=g.k,v=g.R,C=g.i;if(C===4)Kr(S,function(j){j!==me&&(b[j]!==void 0||go(b,j)?v[j]||f(S[j]):(v[j]=!0,Or(g)))}),Kr(b,function(j){S[j]!==void 0||go(S,j)||(v[j]=!1,Or(g))});else if(C===5){if(n(g)&&(Or(g),v.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)v[T]=!1;else for(var k=b.length;k<S.length;k++)v[k]=!0;for(var I=Math.min(S.length,b.length),M=0;M<I;M++)S.hasOwnProperty(M)||(v[M]=!0),v[M]===void 0&&f(S[M])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var wd,Xo,ca=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Rf=typeof Map<"u",Lf=typeof Set<"u",Ed=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Id=ca?Symbol.for("immer-nothing"):((wd={})["immer-nothing"]=!0,wd),Ad=ca?Symbol.for("immer-draftable"):"__$immer_draftable",me=ca?Symbol.for("immer-state"):"__$immer_state";var kf=""+Object.prototype.constructor,bo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$d=Object.getOwnPropertyDescriptors||function(t){var e={};return bo(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},oa={},Qo={get:function(t,e){if(e===me)return t;var o=Sr(t);if(!go(o,e))return function(i,a,l){var c,p=Od(a,l);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Tt(n)?n:n===Qi(t.t,e)?(Ji(t),t.o[e]=ra(t.A.h,n,t)):n},has:function(t,e){return e in Sr(t)},ownKeys:function(t){return Reflect.ownKeys(Sr(t))},set:function(t,e,o){var n=Od(Sr(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Qi(Sr(t),e),a=i?.[me];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ld(o,i)&&(o!==void 0||go(t.t,e)))return!0;Ji(t),Or(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Qi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ji(t),Or(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Sr(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ot(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ot(12)}},Yo={};Kr(Qo,function(t,e){Yo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yo.deleteProperty=function(t,e){return Yo.set.call(this,t,e,void 0)},Yo.set=function(t,e,o){return Qo.set.call(this,t[0],e,o,t[0])};var If=function(){function t(o){var n=this;this.O=Ed,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(C){var T=this;C===void 0&&(C=c);for(var k=arguments.length,I=Array(k>1?k-1:0),M=1;M<k;M++)I[M-1]=arguments[M];return p.produce(C,function(j){var Y;return(Y=a).call.apply(Y,[T,j].concat(I))})}}var f;if(typeof a!="function"&&Ot(6),l!==void 0&&typeof l!="function"&&Ot(7),Tt(i)){var m=vd(n),g=ra(n,i,void 0),b=!0;try{f=a(g),b=!1}finally{b?Mn(m):ta(m)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(C){return Yi(m,l),Xi(C,m)},function(C){throw Mn(m),C}):(Yi(m,l),Xi(f,m))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Id&&(f=void 0),n.D&&sa(f,!0),l){var S=[],v=[];Zt("Patches").M(i,f,S,v),l(S,v)}return f}Ot(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(f,function(S){return i.apply(void 0,[S].concat(g))})};var l,c,p=n.produce(i,a,function(f,m){l=f,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,c]}):[p,l,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Tt(o)||Ot(8),ar(o)&&(o=Af(o));var n=vd(this),i=ra(this,o,void 0);return i[me].C=!0,ta(n),i},e.finishDraft=function(o,n){var i=o&&o[me],a=i.A;return Yi(a,n),Xi(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ed&&Ot(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var l=Zt("Patches").$;return ar(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),yt=new If,$f=yt.produce,fC=yt.produceWithPatches.bind(yt),uC=yt.setAutoFreeze.bind(yt),hC=yt.setUseProxies.bind(yt),yC=yt.applyPatches.bind(yt),mC=yt.createDraft.bind(yt),gC=yt.finishDraft.bind(yt),Hn=$f;function Zr(t){"@babel/helpers - typeof";return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(t)}function Td(t,e){if(Zr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nd(t){var e=Td(t,"string");return Zr(e)=="symbol"?e:e+""}function Pd(t,e,o){return(e=Nd(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function da(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?_d(Object(o),!0).forEach(function(n){Pd(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):_d(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function je(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Bd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),pa=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wn={INIT:"@@redux/INIT"+pa(),REPLACE:"@@redux/REPLACE"+pa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+pa()}};function Tf(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function fa(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(je(1));return o(fa)(t,e)}if(typeof t!="function")throw new Error(je(2));var i=t,a=e,l=[],c=l,p=!1;function f(){c===l&&(c=l.slice())}function m(){if(p)throw new Error(je(3));return a}function g(C){if(typeof C!="function")throw new Error(je(4));if(p)throw new Error(je(5));var T=!0;return f(),c.push(C),function(){if(T){if(p)throw new Error(je(6));T=!1,f();var I=c.indexOf(C);c.splice(I,1),l=null}}}function b(C){if(!Tf(C))throw new Error(je(7));if(typeof C.type>"u")throw new Error(je(8));if(p)throw new Error(je(9));try{p=!0,a=i(a,C)}finally{p=!1}for(var T=l=c,k=0;k<T.length;k++){var I=T[k];I()}return C}function S(C){if(typeof C!="function")throw new Error(je(10));i=C,b({type:Wn.REPLACE})}function v(){var C,T=g;return C={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(je(11));function M(){I.next&&I.next(m())}M();var j=T(M);return{unsubscribe:j}}},C[Bd]=function(){return this},C}return b({type:Wn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[Bd]=v,n}function Nf(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Wn.INIT});if(typeof n>"u")throw new Error(je(12));if(typeof o(void 0,{type:Wn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function Dd(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),l,c;try{Nf(o)}catch(p){c=p}return function(f,m){if(f===void 0&&(f={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var C=a[v],T=o[C],k=f[C],I=T(k,m);if(typeof I>"u"){var M=m&&m.type;throw new Error(je(14))}S[C]=I,b=b||I!==k}return b=b||a.length!==Object.keys(f).length,b?S:f}}function vo(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Fd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(je(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(l)});return a=vo.apply(void 0,c)(i.dispatch),da(da({},i),{},{dispatch:a})}}}function Md(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(c){return typeof c=="function"?c(i,a,t):l(c)}}};return e}var zd=Md();zd.withExtraArgument=Md;var ua=zd;var Gd=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Pf=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(m){return p([f,m])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(m){f=[6,m],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},So=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},_f=Object.defineProperty,Bf=Object.defineProperties,Df=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,Ff=Object.prototype.hasOwnProperty,Mf=Object.prototype.propertyIsEnumerable,Hd=function(t,e,o){return e in t?_f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Cr=function(t,e){for(var o in e||(e={}))Ff.call(e,o)&&Hd(t,o,e[o]);if(Ud)for(var n=0,i=Ud(e);n<i.length;n++){var o=i[n];Mf.call(e,o)&&Hd(t,o,e[o])}return t},ha=function(t,e){return Bf(t,Df(e))},zf=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},l=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,l)};c((o=o.apply(t,e)).next())})};var Uf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vo:vo.apply(null,arguments)},_C=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Hf(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Wf=function(t){Gd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,So([void 0],o[0].concat(this)))):new(e.bind.apply(e,So([void 0],o.concat(this))))},e}(Array),Vf=function(t){Gd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,So([void 0],o[0].concat(this)))):new(e.bind.apply(e,So([void 0],o.concat(this))))},e}(Array);function ga(t){return Tt(t)?Hn(t,function(){}):t}function Gf(t){return typeof t=="boolean"}function jf(){return function(e){return Kf(e)}}function Kf(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,l=a===void 0?!0:a,c=new Wf;if(o&&(Gf(o)?c.push(ua):c.push(ua.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var f}return c}var ya=!0;function jd(t){var e=jf(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,l=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,m=f===void 0?void 0:f,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof i=="function")S=i;else if(Hf(i))S=Dd(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=l;if(typeof v=="function"&&(v=v(e),!ya&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ya&&v.some(function(j){return typeof j!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Fd.apply(void 0,v),T=vo;p&&(T=Uf(Cr({trace:!ya},typeof p=="object"&&p)));var k=new Vf(C),I=k;Array.isArray(b)?I=So([C],b):typeof b=="function"&&(I=b(k));var M=T.apply(void 0,I);return fa(S,m,M)}function wr(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Cr(Cr({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Kd(t){var e={},o=[],n,i={addCase:function(a,l){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,i},addMatcher:function(a,l){return o.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Zf(t){return typeof t=="function"}function qf(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Kd(e):[e,o,n],a=i[0],l=i[1],c=i[2],p;if(Zf(t))p=function(){return ga(t())};else{var f=ga(t);p=function(){return f}}function m(g,b){g===void 0&&(g=p());var S=So([a[b.type]],l.filter(function(v){var C=v.matcher;return C(b)}).map(function(v){var C=v.reducer;return C}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,C){if(C)if(ar(v)){var T=v,k=C(T,b);return k===void 0?v:k}else{if(Tt(v))return Hn(v,function(I){return C(I,b)});var k=C(v,b);if(k===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return v},g)}return m.getInitialState=p,m}function Yf(t,e){return t+"/"+e}function Zd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:ga(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},l={},c={};i.forEach(function(m){var g=n[m],b=Yf(e,m),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[m]=S,l[b]=S,c[m]=v?wr(b,v):wr(b)});function p(){var m=typeof t.extraReducers=="function"?Kd(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],v=S===void 0?[]:S,C=m[2],T=C===void 0?void 0:C,k=Cr(Cr({},b),l);return qf(o,function(I){for(var M in k)I.addCase(M,k[M]);for(var j=0,Y=v;j<Y.length;j++){var et=Y[j];I.addMatcher(et.matcher,et.reducer)}T&&I.addDefaultCase(T)})}var f;return{name:e,reducer:function(m,g){return f||(f=p()),f(m,g)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Xf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qf=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Xf[Math.random()*64|0];return e},Jf=["name","message","stack","code"],ma=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Wd=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),eu=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Jf;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},MC=function(){function t(e,o,n){var i=wr(e+"/fulfilled",function(m,g,b,S){return{payload:m,meta:ha(Cr({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=wr(e+"/pending",function(m,g,b){return{payload:void 0,meta:ha(Cr({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),l=wr(e+"/rejected",function(m,g,b,S,v){return{payload:S,error:(n&&n.serializeError||eu)(m||"Rejected"),meta:ha(Cr({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function f(m){return function(g,b,S){var v=n?.idGenerator?n.idGenerator(m):Qf(),C=new p,T,k=!1;function I(j){T=j,C.abort()}var M=function(){return zf(this,null,function(){var j,Y,et,Nt,Ke,Pt,Ne;return Pf(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Nt=(j=n?.condition)==null?void 0:j.call(n,m,{getState:b,extra:S}),ru(Nt)?[4,Nt]:[3,2];case 1:Nt=y.sent(),y.label=2;case 2:if(Nt===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,Ke=new Promise(function(x,N){return C.signal.addEventListener("abort",function(){return N({name:"AbortError",message:T||"Aborted"})})}),g(a(v,m,(Y=n?.getPendingMeta)==null?void 0:Y.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([Ke,Promise.resolve(o(m,{dispatch:g,getState:b,extra:S,requestId:v,signal:C.signal,abort:I,rejectWithValue:function(x,N){return new ma(x,N)},fulfillWithValue:function(x,N){return new Wd(x,N)}})).then(function(x){if(x instanceof ma)throw x;return x instanceof Wd?i(x.payload,v,m,x.meta):i(x,v,m)})])];case 3:return et=y.sent(),[3,5];case 4:return Pt=y.sent(),et=Pt instanceof ma?l(null,v,m,Pt.payload,Pt.meta):l(Pt,v,m),[3,5];case 5:return Ne=n&&!n.dispatchConditionRejection&&l.match(et)&&et.meta.condition,Ne||g(et),[2,et]}})})}();return Object.assign(M,{abort:I,requestId:v,arg:m,unwrap:function(){return M.then(tu)}})}}return Object.assign(f,{pending:a,rejected:l,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function tu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ru(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var qd="listener",Yd="completed",Xd="cancelled",zC="task-"+Xd,UC="task-"+Yd,HC=qd+"-"+Xd,WC=qd+"-"+Yd;var ba="listenerMiddleware";var VC=wr(ba+"/add"),GC=wr(ba+"/removeAll"),jC=wr(ba+"/remove");var Vd,KC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Vd||(Vd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ou=function(t){return function(e){setTimeout(e,t)}},ZC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ou(10);kd();function nu(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Vn=class extends nu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Qd=class t extends Vn{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ko(a))return a;if(i==null)return;let l=Zd({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=jd({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[i.name]=new t(l,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new _n;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,l,c)=>{let p=l,f=a[p];return f?(...m)=>{let g=f(...m.map(i));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[p]:i(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Yn=u(E());var su=u(ep(),1);var tp;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(tp||(tp={}));var rp;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(rp||(rp={}));var op;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(op||(op={}));var np;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(np||(np={}));var ip;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ip||(ip={}));var ap;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(ap||(ap={}));var sp;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(sp||(sp={}));var lp;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(lp||(lp={}));var cp;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(cp||(cp={}));var dp;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(dp||(dp={}));var pp;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(pp||(pp={}));var fp;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(fp||(fp={}));var up;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(up||(up={}));var hp;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(hp||(hp={}));var yp;(function(t){t.ASC="ASC",t.DESC="DESC"})(yp||(yp={}));var mp;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(mp||(mp={}));var gp;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(gp||(gp={}));var bp;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(bp||(bp={}));var xp;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(xp||(xp={}));var vp;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(vp||(vp={}));var Sp;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Sp||(Sp={}));var Op;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Op||(Op={}));var Cp;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Cp||(Cp={}));var Ie;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Ie||(Ie={}));var wp;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(wp||(wp={}));var Ep;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ep||(Ep={}));var Ap;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ap||(Ap={}));var au={[Ie.PERSONAL_BOOK_SHARE_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.HTML_EXPORT_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.PDF_EXPORT_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.KHUB_ADMIN]:[Ie.CONTENT_PUBLISHER],[Ie.ADMIN]:[Ie.KHUB_ADMIN,Ie.USERS_ADMIN,Ie.PORTAL_ADMIN],[Ie.GENERATIVE_AI_EXPORT_USER]:[Ie.GENERATIVE_AI_USER]};function Rp(t,e){return t===e||(au[t]??[]).some(o=>Rp(o,e))}function Lp(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Rp(n,e))}var Kn=class extends xr{async listMySearches(){let{session:e}=D.getState();return Lp(e,Ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Zn=class extends xr{async listMyBookmarks(){let e=D.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var lu="ft-user-assets",qn=Yn.FtReduxStore.get({name:lu,initialState:{savedSearches:void 0,bookmarks:void 0}}),xa=class{constructor(){this.currentSession=D.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zn,this.savedSearchesService=new Kn,D.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=D.getState();(0,Yn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),qn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),qn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();qn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;qn.actions.bookmarks(o)}}},Vw=new xa;var va=class{addCommand(e,o=!1){D.commands.add(e,o)}consumeCommand(e){return D.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new va;var kp=u(E()),Sa=class{highlightHtml(e,o,n){(0,kp.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Sa;var Ip=u(E());var Oa=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=D.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Ip.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:D.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Oa;var $p=u(E());var Jo=class{static get(e,o){var n,i,a,l;let c=D.getState(),{lang:p,region:f}=(i=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new $p.SearchPlaceConverter(c.baseUrl,(l=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&l!==void 0?l:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${f}`)}};var Ca=class{urlToSearchRequest(e){return Jo.get().parse(e)}searchRequestToUrl(e){return Jo.get().serialize(e)}};window.FluidTopicsUrlService=new Ca;var Ar=u(E());var qr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};qr.eventName="change";var wa=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Tp=new wa;var Xn=class t extends Ar.WithEventBus{static build(){return new t(window.history,Tp,()=>window.location,!1)}constructor(e,o,n,i){var a,l;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(l=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&l!==void 0?l:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ar.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new qr(this.currentItem())),0)}installProxies(){let e=o=>(n,i,[a,l,c])=>{let p=o(),f={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(i,[f,l,c]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e,o=!1){var n,i,a;let l={...this.buildCurrentState(),...e,index:this.currentIndex,title:(n=e?.title)!==null&&n!==void 0?n:this.currentState.title},c=o?(i=e?.majorState)!==null&&i!==void 0?i:this.currentState.majorState:(a=this.currentState.majorState)!==null&&a!==void 0?a:e?.majorState;c!=null&&(l.majorState=c),this.setCurrentState(l)}addHistoryChangeListener(e){this.addEventListener(qr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(qr.eventName,e)}currentItem(){return(0,Ar.deepCopy)(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ar.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return(0,Ar.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let o=e;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var o,n;return this.hasState(e)&&((n=(o=this.states[e])===null||o===void 0?void 0:o.majorState)!==null&&n!==void 0?n:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Xn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,Np.customElement)("ft-app-context")(ve);var V=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var Pp={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Ea=class extends CustomEvent{constructor(e){super("change",{detail:e})}},cu=()=>{},_=class extends se.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new se.ParametrizedLabelResolver(Pp,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new se.SearchPlaceConverter(this.baseUrl,{}).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=mt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new Gt(this),this.selectedFacetsManager=new jt(this),this.desktopSearchBarManager=new Vo(this),this.mobileSearchBarManager=new Wo(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new se.Debouncer(10),this.updateLocalesDebouncer=new se.Debouncer(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(o=>o.contentLocales).catch(()=>[]).then(o=>{this.availableContentLocales=o,this.availableContentLocalesInitialized=!0})}),this.updateFacetsDebouncer.run(()=>{this.retrieveFacetsFromSearch().then(()=>{this.facetsLoaded=!0,this.facetsInitialized=!0})},this.facetsInitialized?500:10)},this.facetsLoaded=!1,this.updateFacetsDebouncer=new se.Debouncer(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(o=>o===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(i=>i===this||i===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,o)=>e.valueFilter&&o.valueFilter?this.compareValueFilters(e.valueFilter,o.valueFilter):e.dateFilter&&o.dateFilter?this.compareDateFilters(e.dateFilter,o.dateFilter):e.rangeFilter&&o.rangeFilter?this.compareRangeFilters(e.rangeFilter,o.rangeFilter):!1,this.compareValueFilters=(e,o)=>e.negative==o.negative&&e.values.length===o.values.length&&e.values.every(n=>o.values.includes(n)),this.compareDateFilters=(e,o)=>e.type===o.type,this.compareRangeFilters=(e,o)=>e.from===o.from&&e.to===o.to,this.compareFilters=(e,o)=>e.key===o.key&&this.compareUnknownFilters(e,o),this.compareRequests=(e,o)=>(e.contentLocale==null||o.contentLocale==null||e.contentLocale===o.contentLocale)&&e.metadataFilters.length===o.metadataFilters.length&&e.metadataFilters.every(n=>o.metadataFilters.some(i=>this.compareFilters(n,i)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(o=>{var n,i;return((i=(n=o.valueFilter)===null||n===void 0?void 0:n.values.length)!==null&&i!==void 0?i:0)>0&&!this.displayedFilters.includes(o.key)}).map(o=>({id:o.key}));return[...this.displayedFilters.map(o=>({id:o})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===mt.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await(0,se.waitFor)(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return J.html`
|
|
3364
|
+
`}update(e){var o,n,i,a,l;super.update(e),e.has("baseUrl")&&(D.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&D.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&D.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&D.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&D.actions.noCustom(this.noCustom),e.has("editorMode")&&D.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&D.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&D.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>id.addContext(c)),e.has("openExternalDocumentInNewTab")&&D.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&D.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&D.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(D.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),D.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),D.actions.searchInAllLanguagesAllowed((l=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ve.elementDefinitions={};ve.styles=od;Ge([(0,lt.property)()],ve.prototype,"baseUrl",void 0);Ge([(0,lt.property)()],ve.prototype,"apiIntegrationIdentifier",void 0);Ge([(0,lt.property)()],ve.prototype,"uiLocale",void 0);Ge([(0,$t.jsonProperty)(null)],ve.prototype,"availableUiLocales",void 0);Ge([(0,$t.jsonProperty)(null)],ve.prototype,"metadataConfiguration",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"editorMode",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"noCustom",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"openExternalDocumentInNewTab",void 0);Ge([(0,lt.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ve.prototype,"noCustomComponent",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"withManualResources",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"navigatorOnline",void 0);Ge([(0,lt.property)({type:Boolean})],ve.prototype,"forcedOffline",void 0);Ge([(0,lt.property)({type:Object})],ve.prototype,"apiProvider",void 0);Ge([(0,$t.jsonProperty)([])],ve.prototype,"messageContexts",void 0);Ge([(0,$t.jsonProperty)(void 0)],ve.prototype,"session",void 0);Ge([(0,lt.state)()],ve.prototype,"localesConfiguration",void 0);var iu=u(te());function xf(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Nn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Nn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=l=>Object.keys(l).filter(c=>l[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Nn(t[l],e[l]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Nn(t,e){try{return xf(t,e)}catch{return!1}}function Pn(t,e){return!Nn(t,e)}var vf=u(te(),1);var _n=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var mo=u(te(),1);var sd=u(te(),1);function ld(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,sd.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:Pn,...e??{}})}var Bn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var dd=u($(),1);var Dn=globalThis,Sf=Dn.ShadowRoot&&(Dn.ShadyCSS===void 0||Dn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,QO=Symbol();var cd=(t,e)=>{if(Sf)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Dn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Fn=class extends dd.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return cd(n,e.elementStyles),n}};function pd(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var jo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},yd,fd=Symbol("constructorPrototype"),ud=Symbol("constructorName"),md=Symbol("exportpartsDebouncer"),hd=Symbol("dynamicDependenciesLoaded"),ir=class extends Fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[yd]=new Bn(5),this[ud]=this.constructor.name,this[fd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ud]&&Object.setPrototypeOf(this,this[fd])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[hd]||(e[hd]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=pd(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[md].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,l,c;let p=b=>b!=null&&b.trim().length>0,f=e.filter(p).map(b=>b.trim());if(f.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(l=b.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(C=>C.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(C=>C.trim()).forEach(C=>m.add(C))}if(m.size===0){this.removeAttribute("exportparts");return}let g=[...m.values()].flatMap(b=>f.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};yd=md;jo([(0,mo.property)()],ir.prototype,"exportpartsPrefix",void 0);jo([ld([])],ir.prototype,"exportpartsPrefixes",void 0);jo([(0,mo.property)()],ir.prototype,"customStylesheet",void 0);jo([(0,mo.property)()],ir.prototype,"elementToFocus",void 0);jo([(0,mo.state)()],ir.prototype,"useAdoptedStyleSheets",void 0);function Ko(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var gd,bd,xd,Zo=Symbol("internalReduxEventsUnsubscribers"),vr=Symbol("internalStoresUnsubscribers"),jr=Symbol("internalStores"),qo=class extends ir{constructor(){super(...arguments),this[gd]=new Map,this[bd]=new Map,this[xd]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[jr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[jr].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[jr].get(e)}addStore(e,o){var n;o=(n=o??(Ko(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[jr].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[jr].delete(o)}setupStores(){this.unsubscribeFromStores(),this[jr].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[vr].has(e.store):this[vr].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[vr].set(e,o.subscribe(()=>this.updateFromStores())),this[Zo].set(e,[]),Ko(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 l=c=>this[a](c);o.addEventListener(i.eventName,l),this[Zo].get(e).push(()=>o.removeEventListener(i.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[vr].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[vr].has(e)&&this[vr].get(e)(),this[vr].delete(e),(o=this[Zo].get(e))===null||o===void 0||o.forEach(n=>n()),this[Zo].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};gd=vr,bd=jr,xd=Zo;qo.reduxProperties=new Map;qo.reduxReactiveProperties=new Set;qo.reduxEventListeners=new Map;function Ot(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ar(t){return!!t&&!!t[me]}function Tt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===kf}(t)||Array.isArray(t)||!!t[Ad]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ad])||na(t)||ia(t))}function Kr(t,e,o){o===void 0&&(o=!1),xo(t)===0?(o?Object.keys:bo)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function xo(t){var e=t[me];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:na(t)?2:ia(t)?3:0}function go(t,e){return xo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Of(t,e){return xo(t)===2?t.get(e):t[e]}function Rd(t,e,o){var n=xo(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ld(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function na(t){return Rf&&t instanceof Map}function ia(t){return Lf&&t instanceof Set}function Sr(t){return t.o||t.t}function aa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=$d(t);delete e[me];for(var o=bo(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function sa(t,e){return e===void 0&&(e=!1),la(t)||ar(t)||!Tt(t)||(xo(t)>1&&(t.set=t.add=t.clear=t.delete=Cf),Object.freeze(t),e&&Kr(t,function(o,n){return sa(n,!0)},!0)),t}function Cf(){Ot(2)}function la(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Zt(t){var e=oa[t];return e||Ot(18,t),e}function wf(t,e){oa[t]||(oa[t]=e)}function ea(){return Xo}function Yi(t,e){e&&(Zt("Patches"),t.u=[],t.s=[],t.v=e)}function Mn(t){ta(t),t.p.forEach(Ef),t.p=null}function ta(t){t===Xo&&(Xo=t.l)}function vd(t){return Xo={p:[],l:Xo,h:t,m:!0,_:0}}function Ef(t){var e=t[me];e.i===0||e.i===1?e.j():e.g=!0}function Xi(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Zt("ES5").S(e,t,n),n?(o[me].P&&(Mn(e),Ot(4)),Tt(t)&&(t=zn(e,t),e.l||Un(e,t)),e.u&&Zt("Patches").M(o[me].t,t,e.u,e.s)):t=zn(e,o,[]),Mn(e),e.u&&e.v(e.u,e.s),t!==Id?t:void 0}function zn(t,e,o){if(la(e))return e;var n=e[me];if(!n)return Kr(e,function(c,p){return Sd(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Un(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=aa(n.k):n.o,a=i,l=!1;n.i===3&&(a=new Set(i),i.clear(),l=!0),Kr(a,function(c,p){return Sd(t,n,i,c,p,o,l)}),Un(t,i,!1),o&&t.u&&Zt("Patches").N(n,o,t.u,t.s)}return n.o}function Sd(t,e,o,n,i,a,l){if(ar(i)){var c=zn(t,i,a&&e&&e.i!==3&&!go(e.R,n)?a.concat(n):void 0);if(Rd(o,n,c),!ar(c))return;t.m=!1}else l&&o.add(i);if(Tt(i)&&!la(i)){if(!t.h.D&&t._<1)return;zn(t,i),e&&e.A.l||Un(t,i)}}function Un(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&sa(e,o)}function Qi(t,e){var o=t[me];return(o?Sr(o):t)[e]}function Od(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Or(t){t.P||(t.P=!0,t.l&&Or(t.l))}function Ji(t){t.o||(t.o=aa(t.t))}function ra(t,e,o){var n=na(e)?Zt("MapSet").F(e,o):ia(e)?Zt("MapSet").T(e,o):t.O?function(i,a){var l=Array.isArray(i),c={i:l?1:0,A:a?a.A:ea(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,f=Qo;l&&(p=[c],f=Yo);var m=Proxy.revocable(p,f),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(e,o):Zt("ES5").J(e,o);return(o?o.A:ea()).p.push(n),n}function Af(t){return ar(t)||Ot(22,t),function e(o){if(!Tt(o))return o;var n,i=o[me],a=xo(o);if(i){if(!i.P&&(i.i<4||!Zt("ES5").K(i)))return i.t;i.I=!0,n=Cd(o,a),i.I=!1}else n=Cd(o,a);return Kr(n,function(l,c){i&&Of(i.t,l)===c||Rd(n,l,e(c))}),a===3?new Set(n):n}(t)}function Cd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return aa(t)}function kd(){function t(l,c){var p=a[l];return p?p.enumerable=c:a[l]=p={configurable:!0,enumerable:c,get:function(){var f=this[me];return Qo.get(f,l)},set:function(f){var m=this[me];Qo.set(m,l,f)}},p}function e(l){for(var c=l.length-1;c>=0;c--){var p=l[c][me];if(!p.P)switch(p.i){case 5:n(p)&&Or(p);break;case 4:o(p)&&Or(p)}}}function o(l){for(var c=l.t,p=l.k,f=bo(p),m=f.length-1;m>=0;m--){var g=f[m];if(g!==me){var b=c[g];if(b===void 0&&!go(c,g))return!0;var S=p[g],v=S&&S[me];if(v?v.t!==b:!Ld(S,b))return!0}}var C=!!c[me];return f.length!==bo(c).length+(C?0:1)}function n(l){var c=l.k;if(c.length!==l.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function i(l){l.g&&Ot(3,JSON.stringify(Sr(l)))}var a={};wf("ES5",{J:function(l,c){var p=Array.isArray(l),f=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var C=$d(b);delete C[me];for(var T=bo(C),k=0;k<T.length;k++){var I=T[k];C[I]=t(I,g||!!C[I].enumerable)}return Object.create(Object.getPrototypeOf(b),C)}(p,l),m={i:p?5:4,A:c?c.A:ea(),P:!1,I:!1,R:{},l:c,t:l,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,me,{value:m,writable:!0}),f},S:function(l,c,p){p?ar(c)&&c[me].A===l&&e(l.p):(l.u&&function f(m){if(m&&typeof m=="object"){var g=m[me];if(g){var b=g.t,S=g.k,v=g.R,C=g.i;if(C===4)Kr(S,function(j){j!==me&&(b[j]!==void 0||go(b,j)?v[j]||f(S[j]):(v[j]=!0,Or(g)))}),Kr(b,function(j){S[j]!==void 0||go(S,j)||(v[j]=!1,Or(g))});else if(C===5){if(n(g)&&(Or(g),v.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)v[T]=!1;else for(var k=b.length;k<S.length;k++)v[k]=!0;for(var I=Math.min(S.length,b.length),M=0;M<I;M++)S.hasOwnProperty(M)||(v[M]=!0),v[M]===void 0&&f(S[M])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var wd,Xo,ca=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Rf=typeof Map<"u",Lf=typeof Set<"u",Ed=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Id=ca?Symbol.for("immer-nothing"):((wd={})["immer-nothing"]=!0,wd),Ad=ca?Symbol.for("immer-draftable"):"__$immer_draftable",me=ca?Symbol.for("immer-state"):"__$immer_state";var kf=""+Object.prototype.constructor,bo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$d=Object.getOwnPropertyDescriptors||function(t){var e={};return bo(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},oa={},Qo={get:function(t,e){if(e===me)return t;var o=Sr(t);if(!go(o,e))return function(i,a,l){var c,p=Od(a,l);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Tt(n)?n:n===Qi(t.t,e)?(Ji(t),t.o[e]=ra(t.A.h,n,t)):n},has:function(t,e){return e in Sr(t)},ownKeys:function(t){return Reflect.ownKeys(Sr(t))},set:function(t,e,o){var n=Od(Sr(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Qi(Sr(t),e),a=i?.[me];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ld(o,i)&&(o!==void 0||go(t.t,e)))return!0;Ji(t),Or(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Qi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ji(t),Or(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Sr(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ot(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ot(12)}},Yo={};Kr(Qo,function(t,e){Yo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yo.deleteProperty=function(t,e){return Yo.set.call(this,t,e,void 0)},Yo.set=function(t,e,o){return Qo.set.call(this,t[0],e,o,t[0])};var If=function(){function t(o){var n=this;this.O=Ed,this.D=!0,this.produce=function(i,a,l){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(C){var T=this;C===void 0&&(C=c);for(var k=arguments.length,I=Array(k>1?k-1:0),M=1;M<k;M++)I[M-1]=arguments[M];return p.produce(C,function(j){var Y;return(Y=a).call.apply(Y,[T,j].concat(I))})}}var f;if(typeof a!="function"&&Ot(6),l!==void 0&&typeof l!="function"&&Ot(7),Tt(i)){var m=vd(n),g=ra(n,i,void 0),b=!0;try{f=a(g),b=!1}finally{b?Mn(m):ta(m)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(C){return Yi(m,l),Xi(C,m)},function(C){throw Mn(m),C}):(Yi(m,l),Xi(f,m))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Id&&(f=void 0),n.D&&sa(f,!0),l){var S=[],v=[];Zt("Patches").M(i,f,S,v),l(S,v)}return f}Ot(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(f,function(S){return i.apply(void 0,[S].concat(g))})};var l,c,p=n.produce(i,a,function(f,m){l=f,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,l,c]}):[p,l,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Tt(o)||Ot(8),ar(o)&&(o=Af(o));var n=vd(this),i=ra(this,o,void 0);return i[me].C=!0,ta(n),i},e.finishDraft=function(o,n){var i=o&&o[me],a=i.A;return Yi(a,n),Xi(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ed&&Ot(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var l=Zt("Patches").$;return ar(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),yt=new If,$f=yt.produce,fC=yt.produceWithPatches.bind(yt),uC=yt.setAutoFreeze.bind(yt),hC=yt.setUseProxies.bind(yt),yC=yt.applyPatches.bind(yt),mC=yt.createDraft.bind(yt),gC=yt.finishDraft.bind(yt),Hn=$f;function Zr(t){"@babel/helpers - typeof";return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(t)}function Td(t,e){if(Zr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nd(t){var e=Td(t,"string");return Zr(e)=="symbol"?e:e+""}function Pd(t,e,o){return(e=Nd(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function da(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?_d(Object(o),!0).forEach(function(n){Pd(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):_d(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function je(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Bd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),pa=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wn={INIT:"@@redux/INIT"+pa(),REPLACE:"@@redux/REPLACE"+pa(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+pa()}};function Tf(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function fa(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(je(1));return o(fa)(t,e)}if(typeof t!="function")throw new Error(je(2));var i=t,a=e,l=[],c=l,p=!1;function f(){c===l&&(c=l.slice())}function m(){if(p)throw new Error(je(3));return a}function g(C){if(typeof C!="function")throw new Error(je(4));if(p)throw new Error(je(5));var T=!0;return f(),c.push(C),function(){if(T){if(p)throw new Error(je(6));T=!1,f();var I=c.indexOf(C);c.splice(I,1),l=null}}}function b(C){if(!Tf(C))throw new Error(je(7));if(typeof C.type>"u")throw new Error(je(8));if(p)throw new Error(je(9));try{p=!0,a=i(a,C)}finally{p=!1}for(var T=l=c,k=0;k<T.length;k++){var I=T[k];I()}return C}function S(C){if(typeof C!="function")throw new Error(je(10));i=C,b({type:Wn.REPLACE})}function v(){var C,T=g;return C={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(je(11));function M(){I.next&&I.next(m())}M();var j=T(M);return{unsubscribe:j}}},C[Bd]=function(){return this},C}return b({type:Wn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[Bd]=v,n}function Nf(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Wn.INIT});if(typeof n>"u")throw new Error(je(12));if(typeof o(void 0,{type:Wn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function Dd(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),l,c;try{Nf(o)}catch(p){c=p}return function(f,m){if(f===void 0&&(f={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var C=a[v],T=o[C],k=f[C],I=T(k,m);if(typeof I>"u"){var M=m&&m.type;throw new Error(je(14))}S[C]=I,b=b||I!==k}return b=b||a.length!==Object.keys(f).length,b?S:f}}function vo(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Fd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(je(15))},l={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(l)});return a=vo.apply(void 0,c)(i.dispatch),da(da({},i),{},{dispatch:a})}}}function Md(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(l){return function(c){return typeof c=="function"?c(i,a,t):l(c)}}};return e}var zd=Md();zd.withExtraArgument=Md;var ua=zd;var Gd=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Pf=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(m){return p([f,m])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(m){f=[6,m],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},So=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},_f=Object.defineProperty,Bf=Object.defineProperties,Df=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,Ff=Object.prototype.hasOwnProperty,Mf=Object.prototype.propertyIsEnumerable,Hd=function(t,e,o){return e in t?_f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Cr=function(t,e){for(var o in e||(e={}))Ff.call(e,o)&&Hd(t,o,e[o]);if(Ud)for(var n=0,i=Ud(e);n<i.length;n++){var o=i[n];Mf.call(e,o)&&Hd(t,o,e[o])}return t},ha=function(t,e){return Bf(t,Df(e))},zf=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(f){i(f)}},l=function(p){try{c(o.throw(p))}catch(f){i(f)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,l)};c((o=o.apply(t,e)).next())})};var Uf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vo:vo.apply(null,arguments)},_C=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Hf(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Wf=function(t){Gd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,So([void 0],o[0].concat(this)))):new(e.bind.apply(e,So([void 0],o.concat(this))))},e}(Array),Vf=function(t){Gd(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,So([void 0],o[0].concat(this)))):new(e.bind.apply(e,So([void 0],o.concat(this))))},e}(Array);function ga(t){return Tt(t)?Hn(t,function(){}):t}function Gf(t){return typeof t=="boolean"}function jf(){return function(e){return Kf(e)}}function Kf(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,l=a===void 0?!0:a,c=new Wf;if(o&&(Gf(o)?c.push(ua):c.push(ua.withExtraArgument(o.extraArgument))),0){if(i)var p;if(l)var f}return c}var ya=!0;function jd(t){var e=jf(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,l=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,f=o.preloadedState,m=f===void 0?void 0:f,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof i=="function")S=i;else if(Hf(i))S=Dd(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=l;if(typeof v=="function"&&(v=v(e),!ya&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ya&&v.some(function(j){return typeof j!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Fd.apply(void 0,v),T=vo;p&&(T=Uf(Cr({trace:!ya},typeof p=="object"&&p)));var k=new Vf(C),I=k;Array.isArray(b)?I=So([C],b):typeof b=="function"&&(I=b(k));var M=T.apply(void 0,I);return fa(S,m,M)}function wr(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Cr(Cr({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Kd(t){var e={},o=[],n,i={addCase:function(a,l){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,i},addMatcher:function(a,l){return o.push({matcher:a,reducer:l}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Zf(t){return typeof t=="function"}function qf(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Kd(e):[e,o,n],a=i[0],l=i[1],c=i[2],p;if(Zf(t))p=function(){return ga(t())};else{var f=ga(t);p=function(){return f}}function m(g,b){g===void 0&&(g=p());var S=So([a[b.type]],l.filter(function(v){var C=v.matcher;return C(b)}).map(function(v){var C=v.reducer;return C}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,C){if(C)if(ar(v)){var T=v,k=C(T,b);return k===void 0?v:k}else{if(Tt(v))return Hn(v,function(I){return C(I,b)});var k=C(v,b);if(k===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return v},g)}return m.getInitialState=p,m}function Yf(t,e){return t+"/"+e}function Zd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:ga(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},l={},c={};i.forEach(function(m){var g=n[m],b=Yf(e,m),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[m]=S,l[b]=S,c[m]=v?wr(b,v):wr(b)});function p(){var m=typeof t.extraReducers=="function"?Kd(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],v=S===void 0?[]:S,C=m[2],T=C===void 0?void 0:C,k=Cr(Cr({},b),l);return qf(o,function(I){for(var M in k)I.addCase(M,k[M]);for(var j=0,Y=v;j<Y.length;j++){var et=Y[j];I.addMatcher(et.matcher,et.reducer)}T&&I.addDefaultCase(T)})}var f;return{name:e,reducer:function(m,g){return f||(f=p()),f(m,g)},actions:c,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var Xf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qf=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Xf[Math.random()*64|0];return e},Jf=["name","message","stack","code"],ma=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Wd=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),eu=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Jf;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},MC=function(){function t(e,o,n){var i=wr(e+"/fulfilled",function(m,g,b,S){return{payload:m,meta:ha(Cr({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=wr(e+"/pending",function(m,g,b){return{payload:void 0,meta:ha(Cr({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),l=wr(e+"/rejected",function(m,g,b,S,v){return{payload:S,error:(n&&n.serializeError||eu)(m||"Rejected"),meta:ha(Cr({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function f(m){return function(g,b,S){var v=n?.idGenerator?n.idGenerator(m):Qf(),C=new p,T,k=!1;function I(j){T=j,C.abort()}var M=function(){return zf(this,null,function(){var j,Y,et,Nt,Ke,Pt,Ne;return Pf(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Nt=(j=n?.condition)==null?void 0:j.call(n,m,{getState:b,extra:S}),ru(Nt)?[4,Nt]:[3,2];case 1:Nt=y.sent(),y.label=2;case 2:if(Nt===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,Ke=new Promise(function(x,N){return C.signal.addEventListener("abort",function(){return N({name:"AbortError",message:T||"Aborted"})})}),g(a(v,m,(Y=n?.getPendingMeta)==null?void 0:Y.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([Ke,Promise.resolve(o(m,{dispatch:g,getState:b,extra:S,requestId:v,signal:C.signal,abort:I,rejectWithValue:function(x,N){return new ma(x,N)},fulfillWithValue:function(x,N){return new Wd(x,N)}})).then(function(x){if(x instanceof ma)throw x;return x instanceof Wd?i(x.payload,v,m,x.meta):i(x,v,m)})])];case 3:return et=y.sent(),[3,5];case 4:return Pt=y.sent(),et=Pt instanceof ma?l(null,v,m,Pt.payload,Pt.meta):l(Pt,v,m),[3,5];case 5:return Ne=n&&!n.dispatchConditionRejection&&l.match(et)&&et.meta.condition,Ne||g(et),[2,et]}})})}();return Object.assign(M,{abort:I,requestId:v,arg:m,unwrap:function(){return M.then(tu)}})}}return Object.assign(f,{pending:a,rejected:l,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function tu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ru(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var qd="listener",Yd="completed",Xd="cancelled",zC="task-"+Xd,UC="task-"+Yd,HC=qd+"-"+Xd,WC=qd+"-"+Yd;var ba="listenerMiddleware";var VC=wr(ba+"/add"),GC=wr(ba+"/removeAll"),jC=wr(ba+"/remove");var Vd,KC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Vd||(Vd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},ou=function(t){return function(e){setTimeout(e,t)}},ZC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ou(10);kd();function nu(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Vn=class extends nu(Object){};window.ftReduxStores||(window.ftReduxStores={});var Qd=class t extends Vn{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Ko(a))return a;if(i==null)return;let l=Zd({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=jd({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:l.reducer(p,f)});return window.ftReduxStores[i.name]=new t(l,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new _n;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,l,c)=>{let p=l,f=a[p];return f?(...m)=>{let g=f(...m.map(i));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[p]:i(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Yn=u(E());var su=u(ep(),1);var tp;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(tp||(tp={}));var rp;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(rp||(rp={}));var op;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(op||(op={}));var np;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.RESOURCE="RESOURCE"})(np||(np={}));var ip;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ip||(ip={}));var ap;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(ap||(ap={}));var sp;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.GEN_AI__COMPLETED_QUERY="GEN_AI__COMPLETED_QUERY",t.GEN_AI__RATE="GEN_AI__RATE",t.GENAI_CASE_DEFLECTION__START="GENAI_CASE_DEFLECTION__START",t.GENAI_CASE_DEFLECTION__OPEN_TICKET="GENAI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(sp||(sp={}));var lp;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(lp||(lp={}));var cp;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(cp||(cp={}));var dp;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(dp||(dp={}));var pp;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(pp||(pp={}));var fp;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(fp||(fp={}));var up;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(up||(up={}));var hp;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(hp||(hp={}));var yp;(function(t){t.ASC="ASC",t.DESC="DESC"})(yp||(yp={}));var mp;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(mp||(mp={}));var gp;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(gp||(gp={}));var bp;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(bp||(bp={}));var xp;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(xp||(xp={}));var vp;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(vp||(vp={}));var Sp;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Sp||(Sp={}));var Op;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Op||(Op={}));var Cp;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Cp||(Cp={}));var Ie;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Ie||(Ie={}));var wp;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(wp||(wp={}));var Ep;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ep||(Ep={}));var Ap;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ap||(Ap={}));var au={[Ie.PERSONAL_BOOK_SHARE_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.HTML_EXPORT_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.PDF_EXPORT_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.KHUB_ADMIN]:[Ie.CONTENT_PUBLISHER],[Ie.ADMIN]:[Ie.KHUB_ADMIN,Ie.USERS_ADMIN,Ie.PORTAL_ADMIN],[Ie.GENERATIVE_AI_EXPORT_USER]:[Ie.GENERATIVE_AI_USER]};function Rp(t,e){return t===e||(au[t]??[]).some(o=>Rp(o,e))}function Lp(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Rp(n,e))}var Kn=class extends xr{async listMySearches(){let{session:e}=D.getState();return Lp(e,Ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Zn=class extends xr{async listMyBookmarks(){let e=D.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var lu="ft-user-assets",qn=Yn.FtReduxStore.get({name:lu,initialState:{savedSearches:void 0,bookmarks:void 0}}),xa=class{constructor(){this.currentSession=D.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Zn,this.savedSearchesService=new Kn,D.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=D.getState();(0,Yn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),qn.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),qn.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();qn.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;qn.actions.bookmarks(o)}}},Vw=new xa;var va=class{addCommand(e,o=!1){D.commands.add(e,o)}consumeCommand(e){return D.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new va;var kp=u(E()),Sa=class{highlightHtml(e,o,n){(0,kp.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Sa;var Ip=u(E());var Oa=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=D.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Ip.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:D.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Oa;var $p=u(E());var Jo=class{static get(e,o){var n,i,a,l;let c=D.getState(),{lang:p,region:f}=(i=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new $p.SearchPlaceConverter(c.baseUrl,(l=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&l!==void 0?l:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${f}`)}};var Ca=class{urlToSearchRequest(e){return Jo.get().parse(e)}searchRequestToUrl(e){return Jo.get().serialize(e)}};window.FluidTopicsUrlService=new Ca;var Ar=u(E());var qr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};qr.eventName="change";var wa=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Tp=new wa;var Xn=class t extends Ar.WithEventBus{static build(){return new t(window.history,Tp,()=>window.location,!1)}constructor(e,o,n,i){var a,l;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(l=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&l!==void 0?l:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ar.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new qr(this.currentItem())),0)}installProxies(){let e=o=>(n,i,[a,l,c])=>{let p=o(),f={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(i,[f,l,c]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(qr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(qr.eventName,e)}currentItem(){return(0,Ar.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ar.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Ar.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let i=o??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Xn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,Np.customElement)("ft-app-context")(ve);var V=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(a=(i<3?l(a):i>3?l(e,o,a):l(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var Pp={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Ea=class extends CustomEvent{constructor(e){super("change",{detail:e})}},cu=()=>{},_=class extends se.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new se.ParametrizedLabelResolver(Pp,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new se.SearchPlaceConverter(this.baseUrl,{}).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=mt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new Gt(this),this.selectedFacetsManager=new jt(this),this.desktopSearchBarManager=new Vo(this),this.mobileSearchBarManager=new Wo(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new se.Debouncer(10),this.updateLocalesDebouncer=new se.Debouncer(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(o=>o.contentLocales).catch(()=>[]).then(o=>{this.availableContentLocales=o,this.availableContentLocalesInitialized=!0})}),this.updateFacetsDebouncer.run(()=>{this.retrieveFacetsFromSearch().then(()=>{this.facetsLoaded=!0,this.facetsInitialized=!0})},this.facetsInitialized?500:10)},this.facetsLoaded=!1,this.updateFacetsDebouncer=new se.Debouncer(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(o=>o===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(i=>i===this||i===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,o)=>e.valueFilter&&o.valueFilter?this.compareValueFilters(e.valueFilter,o.valueFilter):e.dateFilter&&o.dateFilter?this.compareDateFilters(e.dateFilter,o.dateFilter):e.rangeFilter&&o.rangeFilter?this.compareRangeFilters(e.rangeFilter,o.rangeFilter):!1,this.compareValueFilters=(e,o)=>e.negative==o.negative&&e.values.length===o.values.length&&e.values.every(n=>o.values.includes(n)),this.compareDateFilters=(e,o)=>e.type===o.type,this.compareRangeFilters=(e,o)=>e.from===o.from&&e.to===o.to,this.compareFilters=(e,o)=>e.key===o.key&&this.compareUnknownFilters(e,o),this.compareRequests=(e,o)=>(e.contentLocale==null||o.contentLocale==null||e.contentLocale===o.contentLocale)&&e.metadataFilters.length===o.metadataFilters.length&&e.metadataFilters.every(n=>o.metadataFilters.some(i=>this.compareFilters(n,i)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(o=>{var n,i;return((i=(n=o.valueFilter)===null||n===void 0?void 0:n.values.length)!==null&&i!==void 0?i:0)>0&&!this.displayedFilters.includes(o.key)}).map(o=>({id:o.key}));return[...this.displayedFilters.map(o=>({id:o})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===mt.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await(0,se.waitFor)(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return J.html`
|
|
3365
3365
|
<ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
|
|
3366
3366
|
<div class="sr-only" aria-live="polite" aria-atomic="true">
|
|
3367
3367
|
${this.renderLiveText()}
|