@fluid-topics/ft-search-period-filter 1.2.56 → 1.2.58
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.
|
@@ -1823,7 +1823,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1823
1823
|
`;var jo=b(L());var Lc=b(L());var ll=b($()),Pe=b(K()),Ke=b(L());var al=b($());var il=al.css`
|
|
1824
1824
|
`;var Oo=b(L()),Cd="ft-app-info",In=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Ed={session:(t,e)=>{(0,Oo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>I.dispatchEvent(new In(e.payload)),0))}},I=Oo.FtReduxStore.get({name:Cd,reducers:Ed,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 at=b(L());var kn=b(L());var qt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=I.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let a=I.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var Hr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:qt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):qt.await()}};var mt=class extends Hr{constructor(e=!0,o){var n;super(o);let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new kn.CacheRegistry,this.cache=e?a.commonCache:new kn.CacheRegistry}clearCache(){this.cache.clearAll()}};var sl,wd=Symbol("clearAfterUnitTest"),Co=class extends mt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[sl]=()=>{this.defaultMessages={},this.cache=new at.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=I.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 a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,at.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,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 a;let i=e.toLowerCase(),l=this.resolveContext(i);return new at.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},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(a){!(a instanceof at.CanceledPromiseError)&&o&&console.error(a)}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 a;return(a=this.listeners[e])===null||a===void 0?void 0:a.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,at.delay)(0).then(()=>o()).catch(()=>null)))}};sl=wd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Co{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Co{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var xr=window.FluidTopicsI18nService,Eo=window.FluidTopicsCustomI18nService;var be=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},ee=class extends Ke.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=()=>qt.get(),this.messageContexts=[],this.cache=new Ke.CacheRegistry,this.cleanSessionDebouncer=new Ke.Debouncer}render(){return ll.html`
|
|
1825
1825
|
<slot></slot>
|
|
1826
|
-
`}update(e){var o,n,a,i,l;super.update(e),e.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&I.actions.noCustom(this.noCustom),e.has("editorMode")&&I.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&I.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>xr.addContext(c)),e.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(I.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),I.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((l=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let 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())}};ee.elementDefinitions={};ee.styles=il;be([(0,Pe.property)()],ee.prototype,"baseUrl",void 0);be([(0,Pe.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);be([(0,Pe.property)()],ee.prototype,"uiLocale",void 0);be([(0,Ke.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);be([(0,Ke.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"editorMode",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"noCustom",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);be([(0,Pe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);be([(0,Pe.property)({type:Object})],ee.prototype,"apiProvider",void 0);be([(0,Ke.jsonProperty)([])],ee.prototype,"messageContexts",void 0);be([(0,Ke.jsonProperty)(void 0)],ee.prototype,"session",void 0);be([(0,Pe.state)()],ee.prototype,"localesConfiguration",void 0);var up=b(K());function Ad(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,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!wo(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(!wo(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 i=l=>Object.keys(l).filter(c=>l[c]!=null);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let l=a[n];if(!wo(t[l],e[l]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function wo(t,e){try{return Ad(t,e)}catch{return!1}}function Ao(t,e){return!wo(t,e)}var Rd=b(K(),1);var Ro=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 vr=b(K(),1);var cl=b(K(),1);function dl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,cl.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:Ao,...e??{}})}var No=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 a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ul=b($(),1);var To=globalThis,Nd=To.ShadowRoot&&(To.ShadyCSS===void 0||To.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fx=Symbol();var pl=(t,e)=>{if(Nd)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=To.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var Lo=class extends ul.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return pl(n,e.elementStyles),n}};function fl(t,e,...o){var n;let a=t.querySelector(e);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Gr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},gl,hl=Symbol("constructorPrototype"),yl=Symbol("constructorName"),bl=Symbol("exportpartsDebouncer"),ml=Symbol("dynamicDependenciesLoaded"),gt=class extends Lo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[gl]=new No(5),this[yl]=this.constructor.name,this[hl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yl]&&Object.setPrototypeOf(this,this[hl])}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[ml]||(e[ml]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=fl(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var 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[bl].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,a,i,l,c;let p=g=>g!=null&&g.trim().length>0,u=e.filter(p).map(g=>g.trim());if(u.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(O=>O.trim()).forEach(O=>m.add(O))}if(m.size===0){this.removeAttribute("exportparts");return}let y=[...m.values()].flatMap(g=>u.map(S=>`${g}:${S}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};gl=bl;Gr([(0,vr.property)()],gt.prototype,"exportpartsPrefix",void 0);Gr([dl([])],gt.prototype,"exportpartsPrefixes",void 0);Gr([(0,vr.property)()],gt.prototype,"customStylesheet",void 0);Gr([(0,vr.property)()],gt.prototype,"elementToFocus",void 0);Gr([(0,vr.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function Vr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var xl,vl,Sl,jr=Symbol("internalReduxEventsUnsubscribers"),Tt=Symbol("internalStoresUnsubscribers"),Yt=Symbol("internalStores"),Kr=class extends gt{constructor(){super(...arguments),this[xl]=new Map,this[vl]=new Map,this[Sl]=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[Yt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Yt].get(e)}addStore(e,o){var n;o=(n=o??(Vr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Yt].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Yt].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Yt].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 a=this.getStore(e.store);a&&(e.store?this[Tt].has(e.store):this[Tt].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[Tt].set(e,o.subscribe(()=>this.updateFromStores())),this[jr].set(e,[]),Vr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let l=c=>this[i](c);o.addEventListener(a.eventName,l),this[jr].get(e).push(()=>o.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Tt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Tt].has(e)&&this[Tt].get(e)(),this[Tt].delete(e),(o=this[jr].get(e))===null||o===void 0||o.forEach(n=>n()),this[jr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};xl=Tt,vl=Yt,Sl=jr;Kr.reduxProperties=new Map;Kr.reduxReactiveProperties=new Set;Kr.reduxEventListeners=new Map;function We(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 a,i;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 bt(t){return!!t&&!!t[X]}function Ze(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 a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Bd}(t)||Array.isArray(t)||!!t[Nl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Nl])||Hn(t)||Gn(t))}function Xt(t,e,o){o===void 0&&(o=!1),Cr(t)===0?(o?Object.keys:Or)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Cr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Hn(t)?2:Gn(t)?3:0}function Sr(t,e){return Cr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Td(t,e){return Cr(t)===2?t.get(e):t[e]}function Tl(t,e,o){var n=Cr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ll(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Hn(t){return kd&&t instanceof Map}function Gn(t){return Dd&&t instanceof Set}function Lt(t){return t.o||t.t}function Vn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Il(t);delete e[X];for(var o=Or(e),n=0;n<o.length;n++){var a=o[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function jn(t,e){return e===void 0&&(e=!1),Kn(t)||bt(t)||!Ze(t)||(Cr(t)>1&&(t.set=t.add=t.clear=t.delete=Ld),Object.freeze(t),e&&Xt(t,function(o,n){return jn(n,!0)},!0)),t}function Ld(){We(2)}function Kn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function it(t){var e=zn[t];return e||We(18,t),e}function _d(t,e){zn[t]||(zn[t]=e)}function Un(){return qr}function Dn(t,e){e&&(it("Patches"),t.u=[],t.s=[],t.v=e)}function _o(t){Mn(t),t.p.forEach(Pd),t.p=null}function Mn(t){t===qr&&(qr=t.l)}function Ol(t){return qr={p:[],l:qr,h:t,m:!0,_:0}}function Pd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Bn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||it("ES5").S(e,t,n),n?(o[X].P&&(_o(e),We(4)),Ze(t)&&(t=Po(e,t),e.l||Io(e,t)),e.u&&it("Patches").M(o[X].t,t,e.u,e.s)):t=Po(e,o,[]),_o(e),e.u&&e.v(e.u,e.s),t!==Pl?t:void 0}function Po(t,e,o){if(Kn(e))return e;var n=e[X];if(!n)return Xt(e,function(c,p){return Cl(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Io(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vn(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),Xt(i,function(c,p){return Cl(t,n,a,c,p,o,l)}),Io(t,a,!1),o&&t.u&&it("Patches").N(n,o,t.u,t.s)}return n.o}function Cl(t,e,o,n,a,i,l){if(bt(a)){var c=Po(t,a,i&&e&&e.i!==3&&!Sr(e.R,n)?i.concat(n):void 0);if(Tl(o,n,c),!bt(c))return;t.m=!1}else l&&o.add(a);if(Ze(a)&&!Kn(a)){if(!t.h.D&&t._<1)return;Po(t,a),e&&e.A.l||Io(t,a)}}function Io(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&jn(e,o)}function $n(t,e){var o=t[X];return(o?Lt(o):t)[e]}function El(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 _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function Fn(t){t.o||(t.o=Vn(t.t))}function Wn(t,e,o){var n=Hn(e)?it("MapSet").F(e,o):Gn(e)?it("MapSet").T(e,o):t.O?function(a,i){var l=Array.isArray(a),c={i:l?1:0,A:i?i.A:Un(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=c,u=Yr;l&&(p=[c],u=Zr);var m=Proxy.revocable(p,u),y=m.revoke,g=m.proxy;return c.k=g,c.j=y,g}(e,o):it("ES5").J(e,o);return(o?o.A:Un()).p.push(n),n}function Id(t){return bt(t)||We(22,t),function e(o){if(!Ze(o))return o;var n,a=o[X],i=Cr(o);if(a){if(!a.P&&(a.i<4||!it("ES5").K(a)))return a.t;a.I=!0,n=wl(o,i),a.I=!1}else n=wl(o,i);return Xt(n,function(l,c){a&&Td(a.t,l)===c||Tl(n,l,e(c))}),i===3?new Set(n):n}(t)}function wl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Vn(t)}function _l(){function t(l,c){var p=i[l];return p?p.enumerable=c:i[l]=p={configurable:!0,enumerable:c,get:function(){var u=this[X];return Yr.get(u,l)},set:function(u){var m=this[X];Yr.set(m,l,u)}},p}function e(l){for(var c=l.length-1;c>=0;c--){var p=l[c][X];if(!p.P)switch(p.i){case 5:n(p)&&_t(p);break;case 4:o(p)&&_t(p)}}}function o(l){for(var c=l.t,p=l.k,u=Or(p),m=u.length-1;m>=0;m--){var y=u[m];if(y!==X){var g=c[y];if(g===void 0&&!Sr(c,y))return!0;var S=p[y],v=S&&S[X];if(v?v.t!==g:!Ll(S,g))return!0}}var O=!!c[X];return u.length!==Or(c).length+(O?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 u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(l){l.g&&We(3,JSON.stringify(Lt(l)))}var i={};_d("ES5",{J:function(l,c){var p=Array.isArray(l),u=function(y,g){if(y){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Il(g);delete O[X];for(var _=Or(O),N=0;N<_.length;N++){var T=_[N];O[T]=t(T,y||!!O[T].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(p,l),m={i:p?5:4,A:c?c.A:Un(),P:!1,I:!1,R:{},l:c,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:m,writable:!0}),u},S:function(l,c,p){p?bt(c)&&c[X].A===l&&e(l.p):(l.u&&function u(m){if(m&&typeof m=="object"){var y=m[X];if(y){var g=y.t,S=y.k,v=y.R,O=y.i;if(O===4)Xt(S,function(B){B!==X&&(g[B]!==void 0||Sr(g,B)?v[B]||u(S[B]):(v[B]=!0,_t(y)))}),Xt(g,function(B){S[B]!==void 0||Sr(S,B)||(v[B]=!1,_t(y))});else if(O===5){if(n(y)&&(_t(y),v.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)v[_]=!1;else for(var N=g.length;N<S.length;N++)v[N]=!0;for(var T=Math.min(S.length,g.length),k=0;k<T;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&u(S[k])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Al,qr,Zn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",kd=typeof Map<"u",Dd=typeof Set<"u",Rl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Pl=Zn?Symbol.for("immer-nothing"):((Al={})["immer-nothing"]=!0,Al),Nl=Zn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Zn?Symbol.for("immer-state"):"__$immer_state";var Bd=""+Object.prototype.constructor,Or=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Il=Object.getOwnPropertyDescriptors||function(t){var e={};return Or(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},zn={},Yr={get:function(t,e){if(e===X)return t;var o=Lt(t);if(!Sr(o,e))return function(a,i,l){var c,p=El(i,l);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!Ze(n)?n:n===$n(t.t,e)?(Fn(t),t.o[e]=Wn(t.A.h,n,t)):n},has:function(t,e){return e in Lt(t)},ownKeys:function(t){return Reflect.ownKeys(Lt(t))},set:function(t,e,o){var n=El(Lt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=$n(Lt(t),e),i=a?.[X];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ll(o,a)&&(o!==void 0||Sr(t.t,e)))return!0;Fn(t),_t(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 $n(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Fn(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Lt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){We(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){We(12)}},Zr={};Xt(Yr,function(t,e){Zr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Zr.deleteProperty=function(t,e){return Zr.set.call(this,t,e,void 0)},Zr.set=function(t,e,o){return Yr.set.call(this,t[0],e,o,t[0])};var $d=function(){function t(o){var n=this;this.O=Rl,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var p=n;return function(O){var _=this;O===void 0&&(O=c);for(var N=arguments.length,T=Array(N>1?N-1:0),k=1;k<N;k++)T[k-1]=arguments[k];return p.produce(O,function(B){var F;return(F=i).call.apply(F,[_,B].concat(T))})}}var u;if(typeof i!="function"&&We(6),l!==void 0&&typeof l!="function"&&We(7),Ze(a)){var m=Ol(n),y=Wn(n,a,void 0),g=!0;try{u=i(y),g=!1}finally{g?_o(m):Mn(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return Dn(m,l),Bn(O,m)},function(O){throw _o(m),O}):(Dn(m,l),Bn(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Pl&&(u=void 0),n.D&&jn(u,!0),l){var S=[],v=[];it("Patches").M(a,u,S,v),l(S,v)}return u}We(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,y=Array(m>1?m-1:0),g=1;g<m;g++)y[g-1]=arguments[g];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};var l,c,p=n.produce(a,i,function(u,m){l=u,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,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){Ze(o)||We(8),bt(o)&&(o=Id(o));var n=Ol(this),a=Wn(this,o,void 0);return a[X].C=!0,Mn(n),a},e.finishDraft=function(o,n){var a=o&&o[X],i=a.A;return Dn(i,n),Bn(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Rl&&We(20),this.O=o},e.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var l=it("Patches").$;return bt(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),Ue=new $d,Fd=Ue.produce,Qx=Ue.produceWithPatches.bind(Ue),Jx=Ue.setAutoFreeze.bind(Ue),ev=Ue.setUseProxies.bind(Ue),tv=Ue.applyPatches.bind(Ue),rv=Ue.createDraft.bind(Ue),ov=Ue.finishDraft.bind(Ue),ko=Fd;function Qt(t){"@babel/helpers - typeof";return Qt=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},Qt(t)}function kl(t,e){if(Qt(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dl(t){var e=kl(t,"string");return Qt(e)=="symbol"?e:e+""}function Bl(t,e,o){return(e=Dl(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function $l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function qn(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?$l(Object(o),!0).forEach(function(n){Bl(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):$l(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function xe(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 Fl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Do={INIT:"@@redux/INIT"+Yn(),REPLACE:"@@redux/REPLACE"+Yn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yn()}};function Ud(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 Xn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(xe(1));return o(Xn)(t,e)}if(typeof t!="function")throw new Error(xe(2));var a=t,i=e,l=[],c=l,p=!1;function u(){c===l&&(c=l.slice())}function m(){if(p)throw new Error(xe(3));return i}function y(O){if(typeof O!="function")throw new Error(xe(4));if(p)throw new Error(xe(5));var _=!0;return u(),c.push(O),function(){if(_){if(p)throw new Error(xe(6));_=!1,u();var T=c.indexOf(O);c.splice(T,1),l=null}}}function g(O){if(!Ud(O))throw new Error(xe(7));if(typeof O.type>"u")throw new Error(xe(8));if(p)throw new Error(xe(9));try{p=!0,i=a(i,O)}finally{p=!1}for(var _=l=c,N=0;N<_.length;N++){var T=_[N];T()}return O}function S(O){if(typeof O!="function")throw new Error(xe(10));a=O,g({type:Do.REPLACE})}function v(){var O,_=y;return O={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(xe(11));function k(){T.next&&T.next(m())}k();var B=_(k);return{unsubscribe:B}}},O[Fl]=function(){return this},O}return g({type:Do.INIT}),n={dispatch:g,subscribe:y,getState:m,replaceReducer:S},n[Fl]=v,n}function Md(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Do.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof o(void 0,{type:Do.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Ul(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),l,c;try{Md(o)}catch(p){c=p}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var y;for(var g=!1,S={},v=0;v<i.length;v++){var O=i[v],_=o[O],N=u[O],T=_(N,m);if(typeof T>"u"){var k=m&&m.type;throw new Error(xe(14))}S[O]=T,g=g||T!==N}return g=g||i.length!==Object.keys(u).length,g?S:u}}function Er(){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,a){return function(){return n(a.apply(void 0,arguments))}})}function Ml(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(xe(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(p){return p(l)});return i=Er.apply(void 0,c)(a.dispatch),qn(qn({},a),{},{dispatch:i})}}}function Wl(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(c){return typeof c=="function"?c(a,i,t):l(c)}}};return e}var zl=Wl();zl.withExtraArgument=Wl;var Qn=zl;var Kl=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},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)}}(),Wd=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(u){return function(m){return p([u,m])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},wr=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},zd=Object.defineProperty,Hd=Object.defineProperties,Gd=Object.getOwnPropertyDescriptors,Hl=Object.getOwnPropertySymbols,Vd=Object.prototype.hasOwnProperty,jd=Object.prototype.propertyIsEnumerable,Gl=function(t,e,o){return e in t?zd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Pt=function(t,e){for(var o in e||(e={}))Vd.call(e,o)&&Gl(t,o,e[o]);if(Hl)for(var n=0,a=Hl(e);n<a.length;n++){var o=a[n];jd.call(e,o)&&Gl(t,o,e[o])}return t},Jn=function(t,e){return Hd(t,Gd(e))},Kd=function(t,e,o){return new Promise(function(n,a){var i=function(p){try{c(o.next(p))}catch(u){a(u)}},l=function(p){try{c(o.throw(p))}catch(u){a(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};c((o=o.apply(t,e)).next())})};var Zd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Er:Er.apply(null,arguments)},Sv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function qd(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 Yd=function(t){Kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}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,wr([void 0],o[0].concat(this)))):new(e.bind.apply(e,wr([void 0],o.concat(this))))},e}(Array),Xd=function(t){Kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}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,wr([void 0],o[0].concat(this)))):new(e.bind.apply(e,wr([void 0],o.concat(this))))},e}(Array);function ra(t){return Ze(t)?ko(t,function(){}):t}function Qd(t){return typeof t=="boolean"}function Jd(){return function(e){return ep(e)}}function ep(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,l=i===void 0?!0:i,c=new Yd;if(o&&(Qd(o)?c.push(Qn):c.push(Qn.withExtraArgument(o.extraArgument))),0){if(a)var p;if(l)var u}return c}var ea=!0;function Zl(t){var e=Jd(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?e():i,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,m=u===void 0?void 0:u,y=o.enhancers,g=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(qd(a))S=Ul(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=l;if(typeof v=="function"&&(v=v(e),!ea&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ea&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Ml.apply(void 0,v),_=Er;p&&(_=Zd(Pt({trace:!ea},typeof p=="object"&&p)));var N=new Xd(O),T=N;Array.isArray(g)?T=wr([O],g):typeof g=="function"&&(T=g(N));var k=_.apply(void 0,T);return Xn(S,m,k)}function It(t,e){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Pt(Pt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.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 ql(t){var e={},o=[],n,a={addCase:function(i,l){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function tp(t){return typeof t=="function"}function rp(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?ql(e):[e,o,n],i=a[0],l=a[1],c=a[2],p;if(tp(t))p=function(){return ra(t())};else{var u=ra(t);p=function(){return u}}function m(y,g){y===void 0&&(y=p());var S=wr([i[g.type]],l.filter(function(v){var O=v.matcher;return O(g)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(bt(v)){var _=v,N=O(_,g);return N===void 0?v:N}else{if(Ze(v))return ko(v,function(T){return O(T,g)});var N=O(v,g);if(N===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return v},y)}return m.getInitialState=p,m}function op(t,e){return t+"/"+e}function Yl(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:ra(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},l={},c={};a.forEach(function(m){var y=n[m],g=op(e,m),S,v;"reducer"in y?(S=y.reducer,v=y.prepare):S=y,i[m]=S,l[g]=S,c[m]=v?It(g,v):It(g)});function p(){var m=typeof t.extraReducers=="function"?ql(t.extraReducers):[t.extraReducers],y=m[0],g=y===void 0?{}:y,S=m[1],v=S===void 0?[]:S,O=m[2],_=O===void 0?void 0:O,N=Pt(Pt({},g),l);return rp(o,function(T){for(var k in N)T.addCase(k,N[k]);for(var B=0,F=v;B<F.length;B++){var we=F[B];T.addMatcher(we.matcher,we.reducer)}_&&T.addDefaultCase(_)})}var u;return{name:e,reducer:function(m,y){return u||(u=p()),u(m,y)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var np="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ap=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=np[Math.random()*64|0];return e},ip=["name","message","stack","code"],ta=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Vl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),sp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=ip;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},wv=function(){function t(e,o,n){var a=It(e+"/fulfilled",function(m,y,g,S){return{payload:m,meta:Jn(Pt({},S||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=It(e+"/pending",function(m,y,g){return{payload:void 0,meta:Jn(Pt({},g||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),l=It(e+"/rejected",function(m,y,g,S,v){return{payload:S,error:(n&&n.serializeError||sp)(m||"Rejected"),meta:Jn(Pt({},v||{}),{arg:g,requestId:y,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 u(m){return function(y,g,S){var v=n?.idGenerator?n.idGenerator(m):ap(),O=new p,_,N=!1;function T(B){_=B,O.abort()}var k=function(){return Kd(this,null,function(){var B,F,we,Xe,ve,Qe,pe;return Wd(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),Xe=(B=n?.condition)==null?void 0:B.call(n,m,{getState:g,extra:S}),cp(Xe)?[4,Xe]:[3,2];case 1:Xe=h.sent(),h.label=2;case 2:if(Xe===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ve=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:_||"Aborted"})})}),y(i(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:g,extra:S}))),[4,Promise.race([ve,Promise.resolve(o(m,{dispatch:y,getState:g,extra:S,requestId:v,signal:O.signal,abort:T,rejectWithValue:function(x,P){return new ta(x,P)},fulfillWithValue:function(x,P){return new Vl(x,P)}})).then(function(x){if(x instanceof ta)throw x;return x instanceof Vl?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return we=h.sent(),[3,5];case 4:return Qe=h.sent(),we=Qe instanceof ta?l(null,v,m,Qe.payload,Qe.meta):l(Qe,v,m),[3,5];case 5:return pe=n&&!n.dispatchConditionRejection&&l.match(we)&&we.meta.condition,pe||y(we),[2,we]}})})}();return Object.assign(k,{abort:T,requestId:v,arg:m,unwrap:function(){return k.then(lp)}})}}return Object.assign(u,{pending:i,rejected:l,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function lp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function cp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Xl="listener",Ql="completed",Jl="cancelled",Av="task-"+Jl,Rv="task-"+Ql,Nv=Xl+"-"+Jl,Tv=Xl+"-"+Ql;var oa="listenerMiddleware";var Lv=It(oa+"/add"),_v=It(oa+"/removeAll"),Pv=It(oa+"/remove");var jl,Iv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(jl||(jl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},dp=function(t){return function(e){setTimeout(e,t)}},kv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:dp(10);_l();function pp(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var Bo=class extends pp(Object){};window.ftReduxStores||(window.ftReduxStores={});var ec=class t extends Bo{static get(e){var o;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Vr(i))return i;if(a==null)return;let l=Yl({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=Zl({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[a.name]=new t(l,c,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ro;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,l,c)=>{let p=l,u=i[p];return u?(...m)=>{let y=u(...m.map(a));return this.reduxStore.dispatch(y),y}:m=>{this.setState({[p]:a(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 Ho=b(L());var hp=b(rc(),1);var oc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(oc||(oc={}));var nc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(nc||(nc={}));var ac;(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"})(ac||(ac={}));var ic;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ic||(ic={}));var sc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(sc||(sc={}));var lc;(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.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"})(lc||(lc={}));var cc;(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"})(cc||(cc={}));var dc;(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"})(dc||(dc={}));var pc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(pc||(pc={}));var uc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(uc||(uc={}));var fc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(fc||(fc={}));var hc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(hc||(hc={}));var yc;(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"})(yc||(yc={}));var mc;(function(t){t.ASC="ASC",t.DESC="DESC"})(mc||(mc={}));var gc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(gc||(gc={}));var na;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(na||(na={}));var bc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(bc||(bc={}));var xc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(xc||(xc={}));var vc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(vc||(vc={}));var Uo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Uo||(Uo={}));var Sc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Sc||(Sc={}));var aa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(aa||(aa={}));var se;(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"})(se||(se={}));var Oc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Oc||(Oc={}));var Cc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Cc||(Cc={}));var Ec;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ec||(Ec={}));var fp={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function wc(t,e){return t===e||(fp[t]??[]).some(o=>wc(o,e))}function Ac(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=>wc(n,e))}var Mo=class extends mt{async listMySearches(){let{session:e}=I.getState();return Ac(e,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Wo=class extends mt{async listMyBookmarks(){let e=I.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var yp="ft-user-assets",zo=Ho.FtReduxStore.get({name:yp,initialState:{savedSearches:void 0,bookmarks:void 0}}),ia=class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Wo,this.savedSearchesService=new Mo,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=I.getState();(0,Ho.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(),zo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),zo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();zo.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;zo.actions.bookmarks(o)}}},L0=new ia;var sa=class{addCommand(e,o=!1){I.commands.add(e,o)}consumeCommand(e){return I.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new sa;var Rc=b(L()),la=class{highlightHtml(e,o,n){(0,Rc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new la;var Nc=b(L());var ca=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=I.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return Nc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new ca;var Tc=b(L());var Xr=class{static get(e,o){var n,a,i,l;let c=I.getState(),{lang:p,region:u}=(a=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Tc.SearchPlaceConverter(c.baseUrl,(l=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&l!==void 0?l:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var da=class{urlToSearchRequest(e){return Xr.get().parse(e)}searchRequestToUrl(e){return Xr.get().serialize(e)}};window.FluidTopicsUrlService=new da;(0,Lc.customElement)("ft-app-context")(ee);var Dc=b(K());var mp=b(L());function _c(t){return t.match(/^[\w-]+\.[\w-]+$/)}var gp=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Pc=Symbol("i18nAttributes"),Ic=Symbol("i18nListAttributes"),Bc=Symbol("i18nProperties"),Go=Symbol("i18nContexts"),Qr=Symbol("i18nUnsubs");function Ko(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Eo:xr}i18n(i){var l;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let c=(l=i.args)!==null&&l!==void 0?l:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...c)}customI18n(i,l){if(_c(i)){let[c,p]=i.split(".");return this.i18n({custom:!0,context:c,key:p,...l})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((l,c,p)=>i.has(c)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((l,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(l=>l.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var l,c;let p=this,u=(m,y,g)=>g?.context&&g.key&&i(m,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,...m})}:g;(l=this[Pc])===null||l===void 0||l.forEach((m,y)=>p[y]=u(m,y,p[y])),(c=this[Ic])===null||c===void 0||c.forEach((m,y)=>{var g;return p[y]=(g=p[y])===null||g===void 0?void 0:g.map(S=>u(m,y,S))})}updateI18nProperties(i){var l;(l=this[Bc])===null||l===void 0||l.forEach((c,p)=>{i(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(i,l,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,l,c)}addI18nContext(i,l,c){let p=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Go].set(p,{isCustomContext:c}),this[Qr].has(p)||this[Qr].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,l)}hasI18nContext(i){return this[Go].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Go].forEach((i,l)=>this.addI18nContext(l,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Qr].forEach(i=>i()),this[Qr].clear()}}return e=Go,o=Qr,gp([(0,Dc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var kc=class extends Ko(jo.FtLitElement){},Vo=class extends Ko(jo.FtLitElementRedux){};var Jr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},qe=class extends Vo{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Zo.nothing:Zo.html`
|
|
1826
|
+
`}update(e){var o,n,a,i,l;super.update(e),e.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&I.actions.noCustom(this.noCustom),e.has("editorMode")&&I.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&I.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>xr.addContext(c)),e.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(I.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),I.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((l=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let 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())}};ee.elementDefinitions={};ee.styles=il;be([(0,Pe.property)()],ee.prototype,"baseUrl",void 0);be([(0,Pe.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);be([(0,Pe.property)()],ee.prototype,"uiLocale",void 0);be([(0,Ke.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);be([(0,Ke.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"editorMode",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"noCustom",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);be([(0,Pe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);be([(0,Pe.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);be([(0,Pe.property)({type:Object})],ee.prototype,"apiProvider",void 0);be([(0,Ke.jsonProperty)([])],ee.prototype,"messageContexts",void 0);be([(0,Ke.jsonProperty)(void 0)],ee.prototype,"session",void 0);be([(0,Pe.state)()],ee.prototype,"localesConfiguration",void 0);var up=b(K());function Ad(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,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!wo(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(!wo(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 i=l=>Object.keys(l).filter(c=>l[c]!=null);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let l=a[n];if(!wo(t[l],e[l]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function wo(t,e){try{return Ad(t,e)}catch{return!1}}function Ao(t,e){return!wo(t,e)}var Rd=b(K(),1);var Ro=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 vr=b(K(),1);var cl=b(K(),1);function dl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,cl.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:Ao,...e??{}})}var No=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 a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ul=b($(),1);var To=globalThis,Nd=To.ShadowRoot&&(To.ShadyCSS===void 0||To.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Fx=Symbol();var pl=(t,e)=>{if(Nd)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=To.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var Lo=class extends ul.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return pl(n,e.elementStyles),n}};function fl(t,e,...o){var n;let a=t.querySelector(e);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Gr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},gl,hl=Symbol("constructorPrototype"),yl=Symbol("constructorName"),bl=Symbol("exportpartsDebouncer"),ml=Symbol("dynamicDependenciesLoaded"),gt=class extends Lo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[gl]=new No(5),this[yl]=this.constructor.name,this[hl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[yl]&&Object.setPrototypeOf(this,this[hl])}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[ml]||(e[ml]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=fl(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}scheduleExportpartsUpdate(){var 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[bl].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,a,i,l,c;let p=g=>g!=null&&g.trim().length>0,u=e.filter(p).map(g=>g.trim());if(u.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(O=>O.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(O=>O.trim()).forEach(O=>m.add(O))}if(m.size===0){this.removeAttribute("exportparts");return}let y=[...m.values()].flatMap(g=>u.map(S=>`${g}:${S}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};gl=bl;Gr([(0,vr.property)()],gt.prototype,"exportpartsPrefix",void 0);Gr([dl([])],gt.prototype,"exportpartsPrefixes",void 0);Gr([(0,vr.property)()],gt.prototype,"customStylesheet",void 0);Gr([(0,vr.property)()],gt.prototype,"elementToFocus",void 0);Gr([(0,vr.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function Vr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var xl,vl,Sl,jr=Symbol("internalReduxEventsUnsubscribers"),Tt=Symbol("internalStoresUnsubscribers"),Yt=Symbol("internalStores"),Kr=class extends gt{constructor(){super(...arguments),this[xl]=new Map,this[vl]=new Map,this[Sl]=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[Yt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Yt].get(e)}addStore(e,o){var n;o=(n=o??(Vr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this[Yt].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Yt].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Yt].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 a=this.getStore(e.store);a&&(e.store?this[Tt].has(e.store):this[Tt].size>0)&&(this[o]=e.selector(a.getState(),this))}})}subscribeToStore(e,o){var n;this[Tt].set(e,o.subscribe(()=>this.updateFromStores())),this[jr].set(e,[]),Vr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((a,i)=>{if(typeof this[i]=="function"&&(!a.store||o.name===a.store)){let l=c=>this[i](c);o.addEventListener(a.eventName,l),this[jr].get(e).push(()=>o.removeEventListener(a.eventName,l))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Tt].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[Tt].has(e)&&this[Tt].get(e)(),this[Tt].delete(e),(o=this[jr].get(e))===null||o===void 0||o.forEach(n=>n()),this[jr].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};xl=Tt,vl=Yt,Sl=jr;Kr.reduxProperties=new Map;Kr.reduxReactiveProperties=new Set;Kr.reduxEventListeners=new Map;function We(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 a,i;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 bt(t){return!!t&&!!t[X]}function Ze(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 a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Bd}(t)||Array.isArray(t)||!!t[Nl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Nl])||Hn(t)||Gn(t))}function Xt(t,e,o){o===void 0&&(o=!1),Cr(t)===0?(o?Object.keys:Or)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Cr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Hn(t)?2:Gn(t)?3:0}function Sr(t,e){return Cr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Td(t,e){return Cr(t)===2?t.get(e):t[e]}function Tl(t,e,o){var n=Cr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Ll(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Hn(t){return kd&&t instanceof Map}function Gn(t){return Dd&&t instanceof Set}function Lt(t){return t.o||t.t}function Vn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Il(t);delete e[X];for(var o=Or(e),n=0;n<o.length;n++){var a=o[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function jn(t,e){return e===void 0&&(e=!1),Kn(t)||bt(t)||!Ze(t)||(Cr(t)>1&&(t.set=t.add=t.clear=t.delete=Ld),Object.freeze(t),e&&Xt(t,function(o,n){return jn(n,!0)},!0)),t}function Ld(){We(2)}function Kn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function it(t){var e=zn[t];return e||We(18,t),e}function _d(t,e){zn[t]||(zn[t]=e)}function Un(){return qr}function Dn(t,e){e&&(it("Patches"),t.u=[],t.s=[],t.v=e)}function _o(t){Mn(t),t.p.forEach(Pd),t.p=null}function Mn(t){t===qr&&(qr=t.l)}function Ol(t){return qr={p:[],l:qr,h:t,m:!0,_:0}}function Pd(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function Bn(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||it("ES5").S(e,t,n),n?(o[X].P&&(_o(e),We(4)),Ze(t)&&(t=Po(e,t),e.l||Io(e,t)),e.u&&it("Patches").M(o[X].t,t,e.u,e.s)):t=Po(e,o,[]),_o(e),e.u&&e.v(e.u,e.s),t!==Pl?t:void 0}function Po(t,e,o){if(Kn(e))return e;var n=e[X];if(!n)return Xt(e,function(c,p){return Cl(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Io(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vn(n.k):n.o,i=a,l=!1;n.i===3&&(i=new Set(a),a.clear(),l=!0),Xt(i,function(c,p){return Cl(t,n,a,c,p,o,l)}),Io(t,a,!1),o&&t.u&&it("Patches").N(n,o,t.u,t.s)}return n.o}function Cl(t,e,o,n,a,i,l){if(bt(a)){var c=Po(t,a,i&&e&&e.i!==3&&!Sr(e.R,n)?i.concat(n):void 0);if(Tl(o,n,c),!bt(c))return;t.m=!1}else l&&o.add(a);if(Ze(a)&&!Kn(a)){if(!t.h.D&&t._<1)return;Po(t,a),e&&e.A.l||Io(t,a)}}function Io(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&jn(e,o)}function $n(t,e){var o=t[X];return(o?Lt(o):t)[e]}function El(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 _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function Fn(t){t.o||(t.o=Vn(t.t))}function Wn(t,e,o){var n=Hn(e)?it("MapSet").F(e,o):Gn(e)?it("MapSet").T(e,o):t.O?function(a,i){var l=Array.isArray(a),c={i:l?1:0,A:i?i.A:Un(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=c,u=Yr;l&&(p=[c],u=Zr);var m=Proxy.revocable(p,u),y=m.revoke,g=m.proxy;return c.k=g,c.j=y,g}(e,o):it("ES5").J(e,o);return(o?o.A:Un()).p.push(n),n}function Id(t){return bt(t)||We(22,t),function e(o){if(!Ze(o))return o;var n,a=o[X],i=Cr(o);if(a){if(!a.P&&(a.i<4||!it("ES5").K(a)))return a.t;a.I=!0,n=wl(o,i),a.I=!1}else n=wl(o,i);return Xt(n,function(l,c){a&&Td(a.t,l)===c||Tl(n,l,e(c))}),i===3?new Set(n):n}(t)}function wl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Vn(t)}function _l(){function t(l,c){var p=i[l];return p?p.enumerable=c:i[l]=p={configurable:!0,enumerable:c,get:function(){var u=this[X];return Yr.get(u,l)},set:function(u){var m=this[X];Yr.set(m,l,u)}},p}function e(l){for(var c=l.length-1;c>=0;c--){var p=l[c][X];if(!p.P)switch(p.i){case 5:n(p)&&_t(p);break;case 4:o(p)&&_t(p)}}}function o(l){for(var c=l.t,p=l.k,u=Or(p),m=u.length-1;m>=0;m--){var y=u[m];if(y!==X){var g=c[y];if(g===void 0&&!Sr(c,y))return!0;var S=p[y],v=S&&S[X];if(v?v.t!==g:!Ll(S,g))return!0}}var O=!!c[X];return u.length!==Or(c).length+(O?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 u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(l){l.g&&We(3,JSON.stringify(Lt(l)))}var i={};_d("ES5",{J:function(l,c){var p=Array.isArray(l),u=function(y,g){if(y){for(var S=Array(g.length),v=0;v<g.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var O=Il(g);delete O[X];for(var _=Or(O),N=0;N<_.length;N++){var T=_[N];O[T]=t(T,y||!!O[T].enumerable)}return Object.create(Object.getPrototypeOf(g),O)}(p,l),m={i:p?5:4,A:c?c.A:Un(),P:!1,I:!1,R:{},l:c,t:l,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:m,writable:!0}),u},S:function(l,c,p){p?bt(c)&&c[X].A===l&&e(l.p):(l.u&&function u(m){if(m&&typeof m=="object"){var y=m[X];if(y){var g=y.t,S=y.k,v=y.R,O=y.i;if(O===4)Xt(S,function(B){B!==X&&(g[B]!==void 0||Sr(g,B)?v[B]||u(S[B]):(v[B]=!0,_t(y)))}),Xt(g,function(B){S[B]!==void 0||Sr(S,B)||(v[B]=!1,_t(y))});else if(O===5){if(n(y)&&(_t(y),v.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)v[_]=!1;else for(var N=g.length;N<S.length;N++)v[N]=!0;for(var T=Math.min(S.length,g.length),k=0;k<T;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&u(S[k])}}}}(l.p[0]),e(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var Al,qr,Zn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",kd=typeof Map<"u",Dd=typeof Set<"u",Rl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Pl=Zn?Symbol.for("immer-nothing"):((Al={})["immer-nothing"]=!0,Al),Nl=Zn?Symbol.for("immer-draftable"):"__$immer_draftable",X=Zn?Symbol.for("immer-state"):"__$immer_state";var Bd=""+Object.prototype.constructor,Or=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Il=Object.getOwnPropertyDescriptors||function(t){var e={};return Or(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},zn={},Yr={get:function(t,e){if(e===X)return t;var o=Lt(t);if(!Sr(o,e))return function(a,i,l){var c,p=El(i,l);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!Ze(n)?n:n===$n(t.t,e)?(Fn(t),t.o[e]=Wn(t.A.h,n,t)):n},has:function(t,e){return e in Lt(t)},ownKeys:function(t){return Reflect.ownKeys(Lt(t))},set:function(t,e,o){var n=El(Lt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=$n(Lt(t),e),i=a?.[X];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Ll(o,a)&&(o!==void 0||Sr(t.t,e)))return!0;Fn(t),_t(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 $n(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Fn(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Lt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){We(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){We(12)}},Zr={};Xt(Yr,function(t,e){Zr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Zr.deleteProperty=function(t,e){return Zr.set.call(this,t,e,void 0)},Zr.set=function(t,e,o){return Yr.set.call(this,t[0],e,o,t[0])};var $d=function(){function t(o){var n=this;this.O=Rl,this.D=!0,this.produce=function(a,i,l){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var p=n;return function(O){var _=this;O===void 0&&(O=c);for(var N=arguments.length,T=Array(N>1?N-1:0),k=1;k<N;k++)T[k-1]=arguments[k];return p.produce(O,function(B){var F;return(F=i).call.apply(F,[_,B].concat(T))})}}var u;if(typeof i!="function"&&We(6),l!==void 0&&typeof l!="function"&&We(7),Ze(a)){var m=Ol(n),y=Wn(n,a,void 0),g=!0;try{u=i(y),g=!1}finally{g?_o(m):Mn(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(O){return Dn(m,l),Bn(O,m)},function(O){throw _o(m),O}):(Dn(m,l),Bn(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Pl&&(u=void 0),n.D&&jn(u,!0),l){var S=[],v=[];it("Patches").M(a,u,S,v),l(S,v)}return u}We(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,y=Array(m>1?m-1:0),g=1;g<m;g++)y[g-1]=arguments[g];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};var l,c,p=n.produce(a,i,function(u,m){l=u,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,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){Ze(o)||We(8),bt(o)&&(o=Id(o));var n=Ol(this),a=Wn(this,o,void 0);return a[X].C=!0,Mn(n),a},e.finishDraft=function(o,n){var a=o&&o[X],i=a.A;return Dn(i,n),Bn(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Rl&&We(20),this.O=o},e.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var l=it("Patches").$;return bt(o)?l(o,n):this.produce(o,function(c){return l(c,n)})},t}(),Ue=new $d,Fd=Ue.produce,Qx=Ue.produceWithPatches.bind(Ue),Jx=Ue.setAutoFreeze.bind(Ue),ev=Ue.setUseProxies.bind(Ue),tv=Ue.applyPatches.bind(Ue),rv=Ue.createDraft.bind(Ue),ov=Ue.finishDraft.bind(Ue),ko=Fd;function Qt(t){"@babel/helpers - typeof";return Qt=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},Qt(t)}function kl(t,e){if(Qt(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dl(t){var e=kl(t,"string");return Qt(e)=="symbol"?e:e+""}function Bl(t,e,o){return(e=Dl(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function $l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function qn(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?$l(Object(o),!0).forEach(function(n){Bl(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):$l(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function xe(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 Fl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Do={INIT:"@@redux/INIT"+Yn(),REPLACE:"@@redux/REPLACE"+Yn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yn()}};function Ud(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 Xn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(xe(1));return o(Xn)(t,e)}if(typeof t!="function")throw new Error(xe(2));var a=t,i=e,l=[],c=l,p=!1;function u(){c===l&&(c=l.slice())}function m(){if(p)throw new Error(xe(3));return i}function y(O){if(typeof O!="function")throw new Error(xe(4));if(p)throw new Error(xe(5));var _=!0;return u(),c.push(O),function(){if(_){if(p)throw new Error(xe(6));_=!1,u();var T=c.indexOf(O);c.splice(T,1),l=null}}}function g(O){if(!Ud(O))throw new Error(xe(7));if(typeof O.type>"u")throw new Error(xe(8));if(p)throw new Error(xe(9));try{p=!0,i=a(i,O)}finally{p=!1}for(var _=l=c,N=0;N<_.length;N++){var T=_[N];T()}return O}function S(O){if(typeof O!="function")throw new Error(xe(10));a=O,g({type:Do.REPLACE})}function v(){var O,_=y;return O={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(xe(11));function k(){T.next&&T.next(m())}k();var B=_(k);return{unsubscribe:B}}},O[Fl]=function(){return this},O}return g({type:Do.INIT}),n={dispatch:g,subscribe:y,getState:m,replaceReducer:S},n[Fl]=v,n}function Md(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Do.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof o(void 0,{type:Do.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Ul(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),l,c;try{Md(o)}catch(p){c=p}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var y;for(var g=!1,S={},v=0;v<i.length;v++){var O=i[v],_=o[O],N=u[O],T=_(N,m);if(typeof T>"u"){var k=m&&m.type;throw new Error(xe(14))}S[O]=T,g=g||T!==N}return g=g||i.length!==Object.keys(u).length,g?S:u}}function Er(){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,a){return function(){return n(a.apply(void 0,arguments))}})}function Ml(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(xe(15))},l={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(p){return p(l)});return i=Er.apply(void 0,c)(a.dispatch),qn(qn({},a),{},{dispatch:i})}}}function Wl(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(l){return function(c){return typeof c=="function"?c(a,i,t):l(c)}}};return e}var zl=Wl();zl.withExtraArgument=Wl;var Qn=zl;var Kl=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},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)}}(),Wd=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,l;return l={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(u){return function(m){return p([u,m])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(u[0]===6&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},wr=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},zd=Object.defineProperty,Hd=Object.defineProperties,Gd=Object.getOwnPropertyDescriptors,Hl=Object.getOwnPropertySymbols,Vd=Object.prototype.hasOwnProperty,jd=Object.prototype.propertyIsEnumerable,Gl=function(t,e,o){return e in t?zd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Pt=function(t,e){for(var o in e||(e={}))Vd.call(e,o)&&Gl(t,o,e[o]);if(Hl)for(var n=0,a=Hl(e);n<a.length;n++){var o=a[n];jd.call(e,o)&&Gl(t,o,e[o])}return t},Jn=function(t,e){return Hd(t,Gd(e))},Kd=function(t,e,o){return new Promise(function(n,a){var i=function(p){try{c(o.next(p))}catch(u){a(u)}},l=function(p){try{c(o.throw(p))}catch(u){a(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(i,l)};c((o=o.apply(t,e)).next())})};var Zd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Er:Er.apply(null,arguments)},Sv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function qd(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 Yd=function(t){Kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}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,wr([void 0],o[0].concat(this)))):new(e.bind.apply(e,wr([void 0],o.concat(this))))},e}(Array),Xd=function(t){Kl(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}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,wr([void 0],o[0].concat(this)))):new(e.bind.apply(e,wr([void 0],o.concat(this))))},e}(Array);function ra(t){return Ze(t)?ko(t,function(){}):t}function Qd(t){return typeof t=="boolean"}function Jd(){return function(e){return ep(e)}}function ep(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,l=i===void 0?!0:i,c=new Yd;if(o&&(Qd(o)?c.push(Qn):c.push(Qn.withExtraArgument(o.extraArgument))),0){if(a)var p;if(l)var u}return c}var ea=!0;function Zl(t){var e=Jd(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,l=i===void 0?e():i,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,m=u===void 0?void 0:u,y=o.enhancers,g=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(qd(a))S=Ul(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=l;if(typeof v=="function"&&(v=v(e),!ea&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ea&&v.some(function(B){return typeof B!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Ml.apply(void 0,v),_=Er;p&&(_=Zd(Pt({trace:!ea},typeof p=="object"&&p)));var N=new Xd(O),T=N;Array.isArray(g)?T=wr([O],g):typeof g=="function"&&(T=g(N));var k=_.apply(void 0,T);return Xn(S,m,k)}function It(t,e){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Pt(Pt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.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 ql(t){var e={},o=[],n,a={addCase:function(i,l){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=l,a},addMatcher:function(i,l){return o.push({matcher:i,reducer:l}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function tp(t){return typeof t=="function"}function rp(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?ql(e):[e,o,n],i=a[0],l=a[1],c=a[2],p;if(tp(t))p=function(){return ra(t())};else{var u=ra(t);p=function(){return u}}function m(y,g){y===void 0&&(y=p());var S=wr([i[g.type]],l.filter(function(v){var O=v.matcher;return O(g)}).map(function(v){var O=v.reducer;return O}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,O){if(O)if(bt(v)){var _=v,N=O(_,g);return N===void 0?v:N}else{if(Ze(v))return ko(v,function(T){return O(T,g)});var N=O(v,g);if(N===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return v},y)}return m.getInitialState=p,m}function op(t,e){return t+"/"+e}function Yl(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:ra(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},l={},c={};a.forEach(function(m){var y=n[m],g=op(e,m),S,v;"reducer"in y?(S=y.reducer,v=y.prepare):S=y,i[m]=S,l[g]=S,c[m]=v?It(g,v):It(g)});function p(){var m=typeof t.extraReducers=="function"?ql(t.extraReducers):[t.extraReducers],y=m[0],g=y===void 0?{}:y,S=m[1],v=S===void 0?[]:S,O=m[2],_=O===void 0?void 0:O,N=Pt(Pt({},g),l);return rp(o,function(T){for(var k in N)T.addCase(k,N[k]);for(var B=0,F=v;B<F.length;B++){var we=F[B];T.addMatcher(we.matcher,we.reducer)}_&&T.addDefaultCase(_)})}var u;return{name:e,reducer:function(m,y){return u||(u=p()),u(m,y)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var np="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ap=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=np[Math.random()*64|0];return e},ip=["name","message","stack","code"],ta=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Vl=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),sp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=ip;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},wv=function(){function t(e,o,n){var a=It(e+"/fulfilled",function(m,y,g,S){return{payload:m,meta:Jn(Pt({},S||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=It(e+"/pending",function(m,y,g){return{payload:void 0,meta:Jn(Pt({},g||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),l=It(e+"/rejected",function(m,y,g,S,v){return{payload:S,error:(n&&n.serializeError||sp)(m||"Rejected"),meta:Jn(Pt({},v||{}),{arg:g,requestId:y,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 u(m){return function(y,g,S){var v=n?.idGenerator?n.idGenerator(m):ap(),O=new p,_,N=!1;function T(B){_=B,O.abort()}var k=function(){return Kd(this,null,function(){var B,F,we,Xe,ve,Qe,pe;return Wd(this,function(h){switch(h.label){case 0:return h.trys.push([0,4,,5]),Xe=(B=n?.condition)==null?void 0:B.call(n,m,{getState:g,extra:S}),cp(Xe)?[4,Xe]:[3,2];case 1:Xe=h.sent(),h.label=2;case 2:if(Xe===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ve=new Promise(function(x,P){return O.signal.addEventListener("abort",function(){return P({name:"AbortError",message:_||"Aborted"})})}),y(i(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:g,extra:S}))),[4,Promise.race([ve,Promise.resolve(o(m,{dispatch:y,getState:g,extra:S,requestId:v,signal:O.signal,abort:T,rejectWithValue:function(x,P){return new ta(x,P)},fulfillWithValue:function(x,P){return new Vl(x,P)}})).then(function(x){if(x instanceof ta)throw x;return x instanceof Vl?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return we=h.sent(),[3,5];case 4:return Qe=h.sent(),we=Qe instanceof ta?l(null,v,m,Qe.payload,Qe.meta):l(Qe,v,m),[3,5];case 5:return pe=n&&!n.dispatchConditionRejection&&l.match(we)&&we.meta.condition,pe||y(we),[2,we]}})})}();return Object.assign(k,{abort:T,requestId:v,arg:m,unwrap:function(){return k.then(lp)}})}}return Object.assign(u,{pending:i,rejected:l,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function lp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function cp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Xl="listener",Ql="completed",Jl="cancelled",Av="task-"+Jl,Rv="task-"+Ql,Nv=Xl+"-"+Jl,Tv=Xl+"-"+Ql;var oa="listenerMiddleware";var Lv=It(oa+"/add"),_v=It(oa+"/removeAll"),Pv=It(oa+"/remove");var jl,Iv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(jl||(jl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},dp=function(t){return function(e){setTimeout(e,t)}},kv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:dp(10);_l();function pp(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}var Bo=class extends pp(Object){};window.ftReduxStores||(window.ftReduxStores={});var ec=class t extends Bo{static get(e){var o;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Vr(i))return i;if(a==null)return;let l=Yl({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=Zl({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:l.reducer(p,u)});return window.ftReduxStores[a.name]=new t(l,c,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ro;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,l,c)=>{let p=l,u=i[p];return u?(...m)=>{let y=u(...m.map(a));return this.reduxStore.dispatch(y),y}:m=>{this.setState({[p]:a(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 Ho=b(L());var hp=b(rc(),1);var oc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(oc||(oc={}));var nc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(nc||(nc={}));var ac;(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"})(ac||(ac={}));var ic;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ic||(ic={}));var sc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(sc||(sc={}));var lc;(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_CONTEXT_MENU="SEARCH_RESULT__OPEN_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"})(lc||(lc={}));var cc;(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"})(cc||(cc={}));var dc;(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"})(dc||(dc={}));var pc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(pc||(pc={}));var uc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(uc||(uc={}));var fc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(fc||(fc={}));var hc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(hc||(hc={}));var yc;(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"})(yc||(yc={}));var mc;(function(t){t.ASC="ASC",t.DESC="DESC"})(mc||(mc={}));var gc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(gc||(gc={}));var na;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(na||(na={}));var bc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(bc||(bc={}));var xc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(xc||(xc={}));var vc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(vc||(vc={}));var Uo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Uo||(Uo={}));var Sc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(Sc||(Sc={}));var aa;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(aa||(aa={}));var se;(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"})(se||(se={}));var Oc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Oc||(Oc={}));var Cc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Cc||(Cc={}));var Ec;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ec||(Ec={}));var fp={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function wc(t,e){return t===e||(fp[t]??[]).some(o=>wc(o,e))}function Ac(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=>wc(n,e))}var Mo=class extends mt{async listMySearches(){let{session:e}=I.getState();return Ac(e,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Wo=class extends mt{async listMyBookmarks(){let e=I.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var yp="ft-user-assets",zo=Ho.FtReduxStore.get({name:yp,initialState:{savedSearches:void 0,bookmarks:void 0}}),ia=class{constructor(){this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Wo,this.savedSearchesService=new Mo,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=I.getState();(0,Ho.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(),zo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),zo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();zo.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;zo.actions.bookmarks(o)}}},L0=new ia;var sa=class{addCommand(e,o=!1){I.commands.add(e,o)}consumeCommand(e){return I.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new sa;var Rc=b(L()),la=class{highlightHtml(e,o,n){(0,Rc.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new la;var Nc=b(L());var ca=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=I.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return Nc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new ca;var Tc=b(L());var Xr=class{static get(e,o){var n,a,i,l;let c=I.getState(),{lang:p,region:u}=(a=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Tc.SearchPlaceConverter(c.baseUrl,(l=(i=window.FluidTopicsClientConfiguration)===null||i===void 0?void 0:i.predefinedSorts)!==null&&l!==void 0?l:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var da=class{urlToSearchRequest(e){return Xr.get().parse(e)}searchRequestToUrl(e){return Xr.get().serialize(e)}};window.FluidTopicsUrlService=new da;(0,Lc.customElement)("ft-app-context")(ee);var Dc=b(K());var mp=b(L());function _c(t){return t.match(/^[\w-]+\.[\w-]+$/)}var gp=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Pc=Symbol("i18nAttributes"),Ic=Symbol("i18nListAttributes"),Bc=Symbol("i18nProperties"),Go=Symbol("i18nContexts"),Qr=Symbol("i18nUnsubs");function Ko(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Eo:xr}i18n(i){var l;this.hasI18nContext(i.context)||this.addI18nContext(i.context,void 0,i.custom);let c=(l=i.args)!==null&&l!==void 0?l:i.argsProvider?i.argsProvider(this):[];return this.getI18nService(i.custom).resolveMessage(i.context,i.key,...c)}customI18n(i,l){if(_c(i)){let[c,p]=i.split(".");return this.i18n({custom:!0,context:c,key:p,...l})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((l,c,p)=>i.has(c)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((l,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(l=>l.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var l,c;let p=this,u=(m,y,g)=>g?.context&&g.key&&i(m,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,...m})}:g;(l=this[Pc])===null||l===void 0||l.forEach((m,y)=>p[y]=u(m,y,p[y])),(c=this[Ic])===null||c===void 0||c.forEach((m,y)=>{var g;return p[y]=(g=p[y])===null||g===void 0?void 0:g.map(S=>u(m,y,S))})}updateI18nProperties(i){var l;(l=this[Bc])===null||l===void 0||l.forEach((c,p)=>{i(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(i,l,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,l,c)}addI18nContext(i,l,c){let p=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Go].set(p,{isCustomContext:c}),this[Qr].has(p)||this[Qr].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,l)}hasI18nContext(i){return this[Go].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Go].forEach((i,l)=>this.addI18nContext(l,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Qr].forEach(i=>i()),this[Qr].clear()}}return e=Go,o=Qr,gp([(0,Dc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var kc=class extends Ko(jo.FtLitElement){},Vo=class extends Ko(jo.FtLitElementRedux){};var Jr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(i=(a<3?l(i):a>3?l(e,o,i):l(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},qe=class extends Vo{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Zo.nothing:Zo.html`
|
|
1827
1827
|
<span class="ft-i18n">
|
|
1828
1828
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
1829
1829
|
</span>
|