@fluid-topics/ft-search-results-spellcheck 2.0.11 → 2.0.12
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.
|
@@ -139,7 +139,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:e.extend("--ftds-con
|
|
|
139
139
|
</${Be(this.element)}>
|
|
140
140
|
`:He`
|
|
141
141
|
<slot part="text" class="ftds-typography ftds-typography--${this.variant}"></slot>
|
|
142
|
-
`}};we.styles=[...Sn];Cn([(0,Ir.property)()],we.prototype,"element",void 0);Cn([(0,Ir.property)()],we.prototype,"variant",void 0);var Tr=E(L());(0,Tr.customElement)("ft-typography")(se);(0,Tr.customElement)("ftds-typography")(we);var eo=E(q());function Ui(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!kt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!kt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=c=>Object.keys(c).filter(d=>c[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let c=i[n];if(!kt(r[c],t[c]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function kt(r,t){try{return Ui(r,t)}catch{return!1}}function yt(r,t){return!kt(r,t)}function En(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function Nt(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var An=E(q(),1);var _r=r=>{let t=r??{};return(o,n)=>{var i;let s={hasChanged:yt,attribute:!1,...t};(0,An.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:d=>d[n],store:t.store})}};var Lt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Re=E(q(),1);var wn=E(q(),1);function Rn(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,wn.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:yt,...t??{}})}var Pt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Tn=E(ee(),1);var Ft=globalThis,Mi=Ft.ShadowRoot&&(Ft.ShadyCSS===void 0||Ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lp=Symbol();var In=(r,t)=>{if(Mi)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=Ft.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var Dt=class extends Tn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return In(n,t.elementStyles),n}};function _n(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Je=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(c=r[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Pn,kn=Symbol("constructorPrototype"),Nn=Symbol("constructorName"),Fn=Symbol("exportpartsDebouncer"),Ln=Symbol("dynamicDependenciesLoaded"),Xe=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Xe.eventName="exportparts-updated";var ne=class extends Dt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Pn]=new Pt(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Fn].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Nn]=this.constructor.name,this[kn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Nn]&&Object.setPrototypeOf(this,this[kn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Ln]||(o[Ln]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Xe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Xe.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Xe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=_n(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,c,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.exportparts=void 0;return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.exportparts=[...this.part,...y].join(", ")}};Pn=Fn;Je([(0,Re.property)()],ne.prototype,"exportpartsPrefix",void 0);Je([Rn([])],ne.prototype,"exportpartsPrefixes",void 0);Je([(0,Re.property)({reflect:!0})],ne.prototype,"exportparts",void 0);Je([(0,Re.property)()],ne.prototype,"customStylesheet",void 0);Je([(0,Re.property)()],ne.prototype,"elementToFocus",void 0);Je([(0,Re.state)()],ne.prototype,"useAdoptedStyleSheets",void 0);function Ut(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var gt=Symbol("internalReduxEventsUnsubscribers"),fe=Symbol("internalStoresUnsubscribers"),Ie=Symbol("internalStores"),Bi=Nt(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ie].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ie].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[Ie].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ie].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[Ie].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ie].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[fe].has(c.store):this[fe].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[fe].set(c,d.subscribe(()=>this.updateFromStores())),this[gt].set(c,[]),Ut(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=g=>this[h](g);d.addEventListener(p.eventName,y),this[gt].get(c).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[fe].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[fe].has(c)&&this[fe].get(c)(),this[fe].delete(c),(d=this[gt].get(c))===null||d===void 0||d.forEach(u=>u()),this[gt].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=fe,o=Ie,n=gt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Dn=class extends Bi(ne){};function Y(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function le(r){return!!r&&!!r[F]}function te(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Ki}(r)||Array.isArray(r)||!!r[Wn]||!!(!((t=r.constructor)===null||t===void 0)&&t[Wn])||Br(r)||Hr(r))}function Te(r,t,o){o===void 0&&(o=!1),rt(r)===0?(o?Object.keys:tt)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function rt(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:Br(r)?2:Hr(r)?3:0}function et(r,t){return rt(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Hi(r,t){return rt(r)===2?r.get(t):r[t]}function jn(r,t,o){var n=rt(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function $n(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function Br(r){return $i&&r instanceof Map}function Hr(r){return Vi&&r instanceof Set}function he(r){return r.o||r.t}function zr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=qn(r);delete t[F];for(var o=tt(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Gr(r,t){return t===void 0&&(t=!1),Wr(r)||le(r)||!te(r)||(rt(r)>1&&(r.set=r.add=r.clear=r.delete=zi),Object.freeze(r),t&&Te(r,function(o,n){return Gr(n,!0)},!0)),r}function zi(){Y(2)}function Wr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ae(r){var t=Mr[r];return t||Y(18,r),t}function Gi(r,t){Mr[r]||(Mr[r]=t)}function Fr(){return bt}function kr(r,t){t&&(ae("Patches"),r.u=[],r.s=[],r.v=t)}function Mt(r){Dr(r),r.p.forEach(Wi),r.p=null}function Dr(r){r===bt&&(bt=r.l)}function Un(r){return bt={p:[],l:bt,h:r,m:!0,_:0}}function Wi(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function Nr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ae("ES5").S(t,r,n),n?(o[F].P&&(Mt(t),Y(4)),te(r)&&(r=Bt(t,r),t.l||Ht(t,r)),t.u&&ae("Patches").M(o[F].t,r,t.u,t.s)):r=Bt(t,o,[]),Mt(t),t.u&&t.v(t.u,t.s),r!==Kn?r:void 0}function Bt(r,t,o){if(Wr(t))return t;var n=t[F];if(!n)return Te(t,function(d,u){return Mn(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Ht(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=zr(n.k):n.o,s=i,c=!1;n.i===3&&(s=new Set(i),i.clear(),c=!0),Te(s,function(d,u){return Mn(r,n,i,d,u,o,c)}),Ht(r,i,!1),o&&r.u&&ae("Patches").N(n,o,r.u,r.s)}return n.o}function Mn(r,t,o,n,i,s,c){if(le(i)){var d=Bt(r,i,s&&t&&t.i!==3&&!et(t.R,n)?s.concat(n):void 0);if(jn(o,n,d),!le(d))return;r.m=!1}else c&&o.add(i);if(te(i)&&!Wr(i)){if(!r.h.D&&r._<1)return;Bt(r,i),t&&t.A.l||Ht(r,i)}}function Ht(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Gr(t,o)}function Lr(r,t){var o=r[F];return(o?he(o):r)[t]}function Bn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ye(r){r.P||(r.P=!0,r.l&&ye(r.l))}function Pr(r){r.o||(r.o=zr(r.t))}function Ur(r,t,o){var n=Br(t)?ae("MapSet").F(t,o):Hr(t)?ae("MapSet").T(t,o):r.O?function(i,s){var c=Array.isArray(i),d={i:c?1:0,A:s?s.A:Fr(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=d,p=xt;c&&(u=[d],p=mt);var h=Proxy.revocable(u,p),y=h.revoke,g=h.proxy;return d.k=g,d.j=y,g}(t,o):ae("ES5").J(t,o);return(o?o.A:Fr()).p.push(n),n}function ji(r){return le(r)||Y(22,r),function t(o){if(!te(o))return o;var n,i=o[F],s=rt(o);if(i){if(!i.P&&(i.i<4||!ae("ES5").K(i)))return i.t;i.I=!0,n=Hn(o,s),i.I=!1}else n=Hn(o,s);return Te(n,function(c,d){i&&Hi(i.t,c)===d||jn(n,c,t(d))}),s===3?new Set(n):n}(r)}function Hn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return zr(r)}function Vn(){function r(c,d){var u=s[c];return u?u.enumerable=d:s[c]=u={configurable:!0,enumerable:d,get:function(){var p=this[F];return xt.get(p,c)},set:function(p){var h=this[F];xt.set(h,c,p)}},u}function t(c){for(var d=c.length-1;d>=0;d--){var u=c[d][F];if(!u.P)switch(u.i){case 5:n(u)&&ye(u);break;case 4:o(u)&&ye(u)}}}function o(c){for(var d=c.t,u=c.k,p=tt(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==F){var g=d[y];if(g===void 0&&!et(d,y))return!0;var v=u[y],b=v&&v[F];if(b?b.t!==g:!$n(v,g))return!0}}var S=!!d[F];return p.length!==tt(d).length+(S?0:1)}function n(c){var d=c.k;if(d.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(c){c.g&&Y(3,JSON.stringify(he(c)))}var s={};Gi("ES5",{J:function(c,d){var u=Array.isArray(c),p=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=qn(g);delete S[F];for(var w=tt(S),R=0;R<w.length;R++){var I=w[R];S[I]=r(I,y||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(u,c),h={i:u?5:4,A:d?d.A:Fr(),P:!1,I:!1,R:{},l:d,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,F,{value:h,writable:!0}),p},S:function(c,d,u){u?le(d)&&d[F].A===c&&t(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[F];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Te(v,function(_){_!==F&&(g[_]!==void 0||et(g,_)?b[_]||p(v[_]):(b[_]=!0,ye(y)))}),Te(g,function(_){v[_]!==void 0||et(v,_)||(b[_]=!1,ye(y))});else if(S===5){if(n(y)&&(ye(y),b.length=!0),v.length<g.length)for(var w=v.length;w<g.length;w++)b[w]=!1;else for(var R=g.length;R<v.length;R++)b[R]=!0;for(var I=Math.min(v.length,g.length),N=0;N<I;N++)v.hasOwnProperty(N)||(b[N]=!0),b[N]===void 0&&p(v[N])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var zn,bt,jr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$i=typeof Map<"u",Vi=typeof Set<"u",Gn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Kn=jr?Symbol.for("immer-nothing"):((zn={})["immer-nothing"]=!0,zn),Wn=jr?Symbol.for("immer-draftable"):"__$immer_draftable",F=jr?Symbol.for("immer-state"):"__$immer_state";var Ki=""+Object.prototype.constructor,tt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,qn=Object.getOwnPropertyDescriptors||function(r){var t={};return tt(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Mr={},xt={get:function(r,t){if(t===F)return r;var o=he(r);if(!et(o,t))return function(i,s,c){var d,u=Bn(s,c);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!te(n)?n:n===Lr(r.t,t)?(Pr(r),r.o[t]=Ur(r.A.h,n,r)):n},has:function(r,t){return t in he(r)},ownKeys:function(r){return Reflect.ownKeys(he(r))},set:function(r,t,o){var n=Bn(he(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Lr(he(r),t),s=i?.[F];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if($n(o,i)&&(o!==void 0||et(r.t,t)))return!0;Pr(r),ye(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Lr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Pr(r),ye(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=he(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Y(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Y(12)}},mt={};Te(xt,function(r,t){mt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),mt.deleteProperty=function(r,t){return mt.set.call(this,r,t,void 0)},mt.set=function(r,t,o){return xt.set.call(this,r[0],t,o,r[0])};var qi=function(){function r(o){var n=this;this.O=Gn,this.D=!0,this.produce=function(i,s,c){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var R=arguments.length,I=Array(R>1?R-1:0),N=1;N<R;N++)I[N-1]=arguments[N];return u.produce(S,function(_){var H;return(H=s).call.apply(H,[w,_].concat(I))})}}var p;if(typeof s!="function"&&Y(6),c!==void 0&&typeof c!="function"&&Y(7),te(i)){var h=Un(n),y=Ur(n,i,void 0),g=!0;try{p=s(y),g=!1}finally{g?Mt(h):Dr(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return kr(h,c),Nr(S,h)},function(S){throw Mt(h),S}):(kr(h,c),Nr(p,h))}if(!i||typeof i!="object"){if((p=s(i))===void 0&&(p=i),p===Kn&&(p=void 0),n.D&&Gr(p,!0),c){var v=[],b=[];ae("Patches").M(i,p,v,b),c(v,b)}return p}Y(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return i.apply(void 0,[v].concat(y))})};var c,d,u=n.produce(i,s,function(p,h){c=p,d=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,c,d]}):[u,c,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){te(o)||Y(8),le(o)&&(o=ji(o));var n=Un(this),i=Ur(this,o,void 0);return i[F].C=!0,Dr(n),i},t.finishDraft=function(o,n){var i=o&&o[F],s=i.A;return kr(s,n),Nr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Gn&&Y(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var c=ae("Patches").$;return le(o)?c(o,n):this.produce(o,function(d){return c(d,n)})},r}(),V=new qi,Zi=V.produce,qp=V.produceWithPatches.bind(V),Zp=V.setAutoFreeze.bind(V),Yp=V.setUseProxies.bind(V),Qp=V.applyPatches.bind(V),Xp=V.createDraft.bind(V),Jp=V.finishDraft.bind(V),zt=Zi;function _e(r){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(r)}function Zn(r,t){if(_e(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(_e(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Yn(r){var t=Zn(r,"string");return _e(t)=="symbol"?t:t+""}function Qn(r,t,o){return(t=Yn(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Xn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function $r(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Xn(Object(o),!0).forEach(function(n){Qn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Xn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Jn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Vr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Gt={INIT:"@@redux/INIT"+Vr(),REPLACE:"@@redux/REPLACE"+Vr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Vr()}};function Yi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Kr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(Kr)(r,t)}if(typeof r!="function")throw new Error(W(2));var i=r,s=t,c=[],d=c,u=!1;function p(){d===c&&(d=c.slice())}function h(){if(u)throw new Error(W(3));return s}function y(S){if(typeof S!="function")throw new Error(W(4));if(u)throw new Error(W(5));var w=!0;return p(),d.push(S),function(){if(w){if(u)throw new Error(W(6));w=!1,p();var I=d.indexOf(S);d.splice(I,1),c=null}}}function g(S){if(!Yi(S))throw new Error(W(7));if(typeof S.type>"u")throw new Error(W(8));if(u)throw new Error(W(9));try{u=!0,s=i(s,S)}finally{u=!1}for(var w=c=d,R=0;R<w.length;R++){var I=w[R];I()}return S}function v(S){if(typeof S!="function")throw new Error(W(10));i=S,g({type:Gt.REPLACE})}function b(){var S,w=y;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(W(11));function N(){I.next&&I.next(h())}N();var _=w(N);return{unsubscribe:_}}},S[Jn]=function(){return this},S}return g({type:Gt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[Jn]=b,n}function Qi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Gt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:Gt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function ea(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),c,d;try{Qi(o)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var g=!1,v={},b=0;b<s.length;b++){var S=s[b],w=o[S],R=p[S],I=w(R,h);if(typeof I>"u"){var N=h&&h.type;throw new Error(W(14))}v[S]=I,g=g||I!==R}return g=g||s.length!==Object.keys(p).length,g?v:p}}function ot(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ta(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(W(15))},c={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(u){return u(c)});return s=ot.apply(void 0,d)(i.dispatch),$r($r({},i),{},{dispatch:s})}}}function ra(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(c){return function(d){return typeof d=="function"?d(i,s,r):c(d)}}};return t}var oa=ra();oa.withExtraArgument=ra;var qr=oa;var ca=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Xi=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=p[0]&2?i.return:p[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,p[1])).done)return s;switch(i=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){o.label=p[1];break}if(p[0]===6&&o.label<s[1]){o.label=s[1],s=p;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(p);break}s[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],i=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},nt=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Ji=Object.defineProperty,es=Object.defineProperties,ts=Object.getOwnPropertyDescriptors,na=Object.getOwnPropertySymbols,rs=Object.prototype.hasOwnProperty,os=Object.prototype.propertyIsEnumerable,aa=function(r,t,o){return t in r?Ji(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ge=function(r,t){for(var o in t||(t={}))rs.call(t,o)&&aa(r,o,t[o]);if(na)for(var n=0,i=na(t);n<i.length;n++){var o=i[n];os.call(t,o)&&aa(r,o,t[o])}return r},Zr=function(r,t){return es(r,ts(t))},ns=function(r,t,o){return new Promise(function(n,i){var s=function(u){try{d(o.next(u))}catch(p){i(p)}},c=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,c)};d((o=o.apply(r,t)).next())})};var as=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ot:ot.apply(null,arguments)},bf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function is(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var ss=function(r){ca(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,nt([void 0],o[0].concat(this)))):new(t.bind.apply(t,nt([void 0],o.concat(this))))},t}(Array),cs=function(r){ca(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,nt([void 0],o[0].concat(this)))):new(t.bind.apply(t,nt([void 0],o.concat(this))))},t}(Array);function Xr(r){return te(r)?zt(r,function(){}):r}function ls(r){return typeof r=="boolean"}function ds(){return function(t){return us(t)}}function us(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,c=s===void 0?!0:s,d=new ss;if(o&&(ls(o)?d.push(qr):d.push(qr.withExtraArgument(o.extraArgument))),0){if(i)var u;if(c)var p}return d}var Yr=!0;function la(r){var t=ds(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,c=s===void 0?t():s,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(is(i))v=ea(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=c;if(typeof b=="function"&&(b=b(t),!Yr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yr&&b.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=ta.apply(void 0,b),w=ot;u&&(w=as(ge({trace:!Yr},typeof u=="object"&&u)));var R=new cs(S),I=R;Array.isArray(g)?I=nt([S],g):typeof g=="function"&&(I=g(R));var N=w.apply(void 0,I);return Kr(v,h,N)}function me(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ge(ge({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function da(r){var t={},o=[],n,i={addCase:function(s,c){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=c,i},addMatcher:function(s,c){return o.push({matcher:s,reducer:c}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function ps(r){return typeof r=="function"}function fs(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?da(t):[t,o,n],s=i[0],c=i[1],d=i[2],u;if(ps(r))u=function(){return Xr(r())};else{var p=Xr(r);u=function(){return p}}function h(y,g){y===void 0&&(y=u());var v=nt([s[g.type]],c.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(le(b)){var w=b,R=S(w,g);return R===void 0?b:R}else{if(te(b))return zt(b,function(I){return S(I,g)});var R=S(b,g);if(R===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return b},y)}return h.getInitialState=u,h}function hs(r,t){return r+"/"+t}function ua(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Xr(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},c={},d={};i.forEach(function(h){var y=n[h],g=hs(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,c[g]=v,d[h]=b?me(g,b):me(g)});function u(){var h=typeof r.extraReducers=="function"?da(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,R=ge(ge({},g),c);return fs(o,function(I){for(var N in R)I.addCase(N,R[N]);for(var _=0,H=b;_<H.length;_++){var J=H[_];I.addMatcher(J.matcher,J.reducer)}w&&I.addDefaultCase(w)})}var p;return{name:t,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var ys="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gs=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=ys[Math.random()*64|0];return t},ms=["name","message","stack","code"],Qr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ia=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),bs=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=ms;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Cf=function(){function r(t,o,n){var i=me(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Zr(ge({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),s=me(t+"/pending",function(h,y,g){return{payload:void 0,meta:Zr(ge({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=me(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||bs)(h||"Rejected"),meta:Zr(ge({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):gs(),S=new u,w,R=!1;function I(_){w=_,S.abort()}var N=function(){return ns(this,null,function(){var _,H,J,ve,j,Se,Fe;return Xi(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),ve=(_=n?.condition)==null?void 0:_.call(n,h,{getState:g,extra:v}),vs(ve)?[4,ve]:[3,2];case 1:ve=f.sent(),f.label=2;case 2:if(ve===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,j=new Promise(function(m,A){return S.signal.addEventListener("abort",function(){return A({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,(H=n?.getPendingMeta)==null?void 0:H.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([j,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(m,A){return new Qr(m,A)},fulfillWithValue:function(m,A){return new ia(m,A)}})).then(function(m){if(m instanceof Qr)throw m;return m instanceof ia?i(m.payload,b,h,m.meta):i(m,b,h)})])];case 3:return J=f.sent(),[3,5];case 4:return Se=f.sent(),J=Se instanceof Qr?c(null,b,h,Se.payload,Se.meta):c(Se,b,h),[3,5];case 5:return Fe=n&&!n.dispatchConditionRejection&&c.match(J)&&J.meta.condition,Fe||y(J),[2,J]}})})}();return Object.assign(N,{abort:I,requestId:b,arg:h,unwrap:function(){return N.then(xs)}})}}return Object.assign(p,{pending:s,rejected:c,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function xs(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function vs(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var pa="listener",fa="completed",ha="cancelled",Of="task-"+ha,Ef="task-"+fa,Af=pa+"-"+ha,wf=pa+"-"+fa;var Jr="listenerMiddleware";var Rf=me(Jr+"/add"),If=me(Jr+"/removeAll"),Tf=me(Jr+"/remove");var sa,_f=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(sa||(sa=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Ss=function(r){return function(t){setTimeout(t,r)}},kf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ss(10);Vn();var Cs=Nt(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Wt=class extends Cs(Object){};window.ftReduxStores||(window.ftReduxStores={});var ya=class r extends Wt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Ut(s))return s;if(i==null)return;let c=ua({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=la({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=En(c.getInitialState());for(let y of p.keeping)h[y]=(u??h)[y];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[i.name]=new r(c,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Lt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...h)=>{let y=p(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var jt=class{static format(t,o,n,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(t,o,n,i)}static getMomentDateFormat(t,o){return t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i){let s=typeof t=="string"?new Date(t):t,c=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s);if(!i)return c;let d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return`${c} ${d}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var $t=E(L()),Os="ft-app-info",ke=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};ke.eventName="authentication-change";var Es={session:(r,t)=>{(0,$t.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>C.dispatchEvent(new ke(t.payload)),0))}},C=$t.FtReduxStore.get({name:Os,reducers:Es,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],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,authenticationRequired:!1}});var ga=E(L()),Vt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(c=r[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ah=(0,ga.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(C)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>jt.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Vt([(0,eo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Vt([(0,eo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Vt([_r({store:C.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Vt([_r({store:C.name})],t.prototype,"uiLocale",void 0),t});var ws=E(ba(),1);var xa;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(xa||(xa={}));var va;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(va||(va={}));var Sa;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Sa||(Sa={}));var Ca;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var Oa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Oa||(Oa={}));var Ea;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Ea||(Ea={}));var Aa;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(Aa||(Aa={}));var wa;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(wa||(wa={}));var Ra;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(Ra||(Ra={}));var Ia;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Ia||(Ia={}));var Ta;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ta||(Ta={}));var _a;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_a||(_a={}));var ka;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(ka||(ka={}));var Na;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Na||(Na={}));var to;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(to||(to={}));var La;(function(r){r.ASC="ASC",r.DESC="DESC"})(La||(La={}));var Pa;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Pa||(Pa={}));var ro;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(ro||(ro={}));var Fa;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Fa||(Fa={}));var Da;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Da||(Da={}));var Ua;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ua||(Ua={}));var Ma;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Ma||(Ma={}));var Ba;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ba||(Ba={}));var oo;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(oo||(oo={}));var Ha;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ha||(Ha={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var Q;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(Q||(Q={}));var za;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(za||(za={}));var Ga;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Ga||(Ga={}));var Wa;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(Wa||(Wa={}));var ja;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(ja||(ja={}));var $a;(function(r){r.JSON="JSON",r.TEXT="TEXT"})($a||($a={}));var Va;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Va||(Va={}));var Ka;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Ka||(Ka={}));var qa;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(qa||(qa={}));var Za;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Za||(Za={}));var As={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN,U.BEHAVIOR_DATA_USER],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Ya(r,t){return r===t||(As[r]??[]).some(o=>Ya(o,t))}function Qa(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Ya(n,t))}var er=E(L());var no=E(L());var Ne=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=C.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=C.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var Zt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ne.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ne.await()}};var $=class extends Zt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new no.CacheRegistry,this.cache=t?i.commonCache:new no.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Yt=class extends ${async listMySearches(){let{session:t}=C.getState();return Qa(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Qt=class extends ${async listMyBookmarks(){let t=C.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Xt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var Jt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var Rs="ft-user-assets",Is={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(Q).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;io(r,o,[...ao(r,o),i]),Xa(r,o,1,n),Ja(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;io(r,o,ao(r,o).map(i=>i.id===n.id?n:i)),Ja(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;io(r,o,ao(r,o).filter(s=>s.id!==i)),Xa(r,o,-1,n)}},ei={[Q.SEARCHES]:"savedSearches",[Q.BOOKMARKS]:"bookmarks",[Q.BOOKS]:void 0,[Q.COLLECTIONS]:void 0},ao=(r,t)=>{var o;let n=ei[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},io=(r,t,o)=>{let n=ei[t];n&&(r[n]=o)},Xa=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===Q.BOOKMARKS&&n)){let s=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},Ja=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},K=er.FtReduxStore.get({name:Rs,reducers:Is,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Q).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),so=class{constructor(t=new Xt,o=new Jt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Qt,this.savedSearchesService=new Yt,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=C.getState();(0,er.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),K.actions.clearAssetCount(),K.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),K.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),K.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();K.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();K.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&K.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&K.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(K.getState().assetCounts.bookmarkByMap).length!==0;t===Q.BOOKMARKS&&o&&K.actions.clearBookmarkCountByMap(),K.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(o)}}},Ts=new so;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ts);var co=class{addCommand(t,o=!1){C.commands.add(t,o)}consumeCommand(t){return C.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new co;var X=E(L());var ti,it=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},_s=Symbol("clearAfterUnitTest"),tr=class extends(0,X.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ti]=()=>{this.defaultMessages={},this.cache=new X.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=C.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,X.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),c=this.resolveContext(s);return new X.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof X.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new it({loadedContexts:t})),this.dispatchEvent(new it({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new it({loadedContexts:[t]})),this.dispatchEvent(new it({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,X.delay)(0).then(()=>n()).catch(()=>null)))}};ti=_s;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var st=window.FluidTopicsI18nService,rr=window.FluidTopicsCustomI18nService;var ri=E(L()),lo=class{highlightHtml(t,o,n){(0,ri.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new lo;var oi=E(L());var uo=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=C.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s;if(t==null)return"";try{return oi.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:C.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(t)} is not valid`,c),c}}};window.FluidTopicsDateService=new uo;var ni=E(L());var Le=class{static get(t,o){var n,i;let s=C.getState(),{lang:c,region:d}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ni.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,o??`${c}-${d}`)}};var po=class{urlToSearchRequest(t){return Le.get().parse(t)}searchRequestToUrl(t){return Le.get().serialize(t)}};window.FluidTopicsUrlService=new po;var xe=E(L());var Pe=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Pe.eventName="change";var fo=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},ai=new fo;var or=class r extends xe.WithEventBus{static build(){return new r(window.history,ai,()=>window.location,!1)}constructor(t,o,n,i){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,xe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Pe(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,c,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,c,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Pe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Pe.eventName,t)}currentItem(){return(0,xe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,xe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,xe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=or.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var ii=E(ee());var si=ii.css`
|
|
142
|
+
`}};we.styles=[...Sn];Cn([(0,Ir.property)()],we.prototype,"element",void 0);Cn([(0,Ir.property)()],we.prototype,"variant",void 0);var Tr=E(L());(0,Tr.customElement)("ft-typography")(se);(0,Tr.customElement)("ftds-typography")(we);var eo=E(q());function Ui(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;let o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!kt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!kt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let s=c=>Object.keys(c).filter(d=>c[d]!=null);if(i=s(r),o=i.length,o!==s(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let c=i[n];if(!kt(r[c],t[c]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function kt(r,t){try{return Ui(r,t)}catch{return!1}}function yt(r,t){return!kt(r,t)}function En(r){return typeof window.structuredClone=="function"?structuredClone(r):r!=null?JSON.parse(JSON.stringify(r)):r}function Nt(r,t){let o=n=>n[r]===!0;return n=>{if(o(n))return n;let i=t(n);return i[r]=!0,i}}var An=E(q(),1);var _r=r=>{let t=r??{};return(o,n)=>{var i;let s={hasChanged:yt,attribute:!1,...t};(0,An.property)(s)(o,n);let c=o.constructor;c.reduxProperties=new Map(c.reduxProperties),c.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:d=>d[n],store:t.store})}};var Lt=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Re=E(q(),1);var wn=E(q(),1);function Rn(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,wn.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:yt,...t??{}})}var Pt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,s=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let c of n)try{await c()}catch(d){i(d);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Tn=E(ee(),1);var Ft=globalThis,Mi=Ft.ShadowRoot&&(Ft.ShadyCSS===void 0||Ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lp=Symbol();var In=(r,t)=>{if(Mi)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=Ft.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var Dt=class extends Tn.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,s])=>t.registry.define(i,s)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return In(n,t.elementStyles),n}};function _n(r,t,...o){var n;let i=r.querySelector(t);for(let s of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var Je=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(c=r[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Pn,kn=Symbol("constructorPrototype"),Nn=Symbol("constructorName"),Fn=Symbol("exportpartsDebouncer"),Ln=Symbol("dynamicDependenciesLoaded"),Xe=class r extends CustomEvent{constructor(){super(r.eventName,{bubbles:!0})}};Xe.eventName="exportparts-updated";var ne=class extends Dt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Pn]=new Pt(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Fn].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Nn]=this.constructor.name,this[kn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Nn]&&Object.setPrototypeOf(this,this[kn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[Ln]||(o[Ln]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Xe.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Xe.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Xe)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];o=_n(this.shadowRoot,...s)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var o,n,i,s,c,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.exportparts=void 0;return}let h=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],b=(d=(c=g.getAttribute("exportparts"))===null||c===void 0?void 0:c.split(",").map(w=>w.split(":")[1]))!==null&&d!==void 0?d:[],S=[...v,...b].filter(u).map(w=>w.trim());for(let w of S)h.add(w)}if(h.size===0){this.exportparts=void 0;return}let y=[...h.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.exportparts=[...this.part,...y].join(", ")}};Pn=Fn;Je([(0,Re.property)()],ne.prototype,"exportpartsPrefix",void 0);Je([Rn([])],ne.prototype,"exportpartsPrefixes",void 0);Je([(0,Re.property)({reflect:!0})],ne.prototype,"exportparts",void 0);Je([(0,Re.property)()],ne.prototype,"customStylesheet",void 0);Je([(0,Re.property)()],ne.prototype,"elementToFocus",void 0);Je([(0,Re.state)()],ne.prototype,"useAdoptedStyleSheets",void 0);function Ut(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var gt=Symbol("internalReduxEventsUnsubscribers"),fe=Symbol("internalStoresUnsubscribers"),Ie=Symbol("internalStores"),Bi=Nt(Symbol("withRedux"),function(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(c){super.willUpdate(c),[...this.reduxConstructor.reduxReactiveProperties].some(d=>c.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ie].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ie].values()][0]}getStore(c){return c==null?this.getUnnamedStore():this[Ie].get(c)}addStore(c,d){var u;d=(u=d??c.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ie].set(d,c),this.subscribeToStore(d,c),this.updateFromStores()}removeStore(c){let d=typeof c=="string"?c:c.name;this.unsubscribeFromStore(d),this[Ie].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ie].forEach((c,d)=>this.subscribeToStore(d,c)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((c,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(c.store);p&&(c.store?this[fe].has(c.store):this[fe].size>0)&&(this[d]=c.selector(p.getState(),this))}})}subscribeToStore(c,d){var u;this[fe].set(c,d.subscribe(()=>this.updateFromStores())),this[gt].set(c,[]),Ut(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||d.name===p.store)){let y=g=>this[h](g);d.addEventListener(p.eventName,y),this[gt].get(c).push(()=>d.removeEventListener(p.eventName,y))}})),this.onStoreAvailable(c)}unsubscribeFromStores(){this[fe].forEach((c,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(c){var d;this[fe].has(c)&&this[fe].get(c)(),this[fe].delete(c),(d=this[gt].get(c))===null||d===void 0||d.forEach(u=>u()),this[gt].delete(c)}onStoreAvailable(c){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=fe,o=Ie,n=gt,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Dn=class extends Bi(ne){};function Y(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function le(r){return!!r&&!!r[F]}function te(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Ki}(r)||Array.isArray(r)||!!r[Wn]||!!(!((t=r.constructor)===null||t===void 0)&&t[Wn])||Br(r)||Hr(r))}function Te(r,t,o){o===void 0&&(o=!1),rt(r)===0?(o?Object.keys:tt)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function rt(r){var t=r[F];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:Br(r)?2:Hr(r)?3:0}function et(r,t){return rt(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Hi(r,t){return rt(r)===2?r.get(t):r[t]}function jn(r,t,o){var n=rt(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function $n(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function Br(r){return $i&&r instanceof Map}function Hr(r){return Vi&&r instanceof Set}function he(r){return r.o||r.t}function zr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=qn(r);delete t[F];for(var o=tt(t),n=0;n<o.length;n++){var i=o[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function Gr(r,t){return t===void 0&&(t=!1),Wr(r)||le(r)||!te(r)||(rt(r)>1&&(r.set=r.add=r.clear=r.delete=zi),Object.freeze(r),t&&Te(r,function(o,n){return Gr(n,!0)},!0)),r}function zi(){Y(2)}function Wr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function ae(r){var t=Mr[r];return t||Y(18,r),t}function Gi(r,t){Mr[r]||(Mr[r]=t)}function Fr(){return bt}function kr(r,t){t&&(ae("Patches"),r.u=[],r.s=[],r.v=t)}function Mt(r){Dr(r),r.p.forEach(Wi),r.p=null}function Dr(r){r===bt&&(bt=r.l)}function Un(r){return bt={p:[],l:bt,h:r,m:!0,_:0}}function Wi(r){var t=r[F];t.i===0||t.i===1?t.j():t.g=!0}function Nr(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||ae("ES5").S(t,r,n),n?(o[F].P&&(Mt(t),Y(4)),te(r)&&(r=Bt(t,r),t.l||Ht(t,r)),t.u&&ae("Patches").M(o[F].t,r,t.u,t.s)):r=Bt(t,o,[]),Mt(t),t.u&&t.v(t.u,t.s),r!==Kn?r:void 0}function Bt(r,t,o){if(Wr(t))return t;var n=t[F];if(!n)return Te(t,function(d,u){return Mn(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Ht(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=zr(n.k):n.o,s=i,c=!1;n.i===3&&(s=new Set(i),i.clear(),c=!0),Te(s,function(d,u){return Mn(r,n,i,d,u,o,c)}),Ht(r,i,!1),o&&r.u&&ae("Patches").N(n,o,r.u,r.s)}return n.o}function Mn(r,t,o,n,i,s,c){if(le(i)){var d=Bt(r,i,s&&t&&t.i!==3&&!et(t.R,n)?s.concat(n):void 0);if(jn(o,n,d),!le(d))return;r.m=!1}else c&&o.add(i);if(te(i)&&!Wr(i)){if(!r.h.D&&r._<1)return;Bt(r,i),t&&t.A.l||Ht(r,i)}}function Ht(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&Gr(t,o)}function Lr(r,t){var o=r[F];return(o?he(o):r)[t]}function Bn(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ye(r){r.P||(r.P=!0,r.l&&ye(r.l))}function Pr(r){r.o||(r.o=zr(r.t))}function Ur(r,t,o){var n=Br(t)?ae("MapSet").F(t,o):Hr(t)?ae("MapSet").T(t,o):r.O?function(i,s){var c=Array.isArray(i),d={i:c?1:0,A:s?s.A:Fr(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},u=d,p=xt;c&&(u=[d],p=mt);var h=Proxy.revocable(u,p),y=h.revoke,g=h.proxy;return d.k=g,d.j=y,g}(t,o):ae("ES5").J(t,o);return(o?o.A:Fr()).p.push(n),n}function ji(r){return le(r)||Y(22,r),function t(o){if(!te(o))return o;var n,i=o[F],s=rt(o);if(i){if(!i.P&&(i.i<4||!ae("ES5").K(i)))return i.t;i.I=!0,n=Hn(o,s),i.I=!1}else n=Hn(o,s);return Te(n,function(c,d){i&&Hi(i.t,c)===d||jn(n,c,t(d))}),s===3?new Set(n):n}(r)}function Hn(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return zr(r)}function Vn(){function r(c,d){var u=s[c];return u?u.enumerable=d:s[c]=u={configurable:!0,enumerable:d,get:function(){var p=this[F];return xt.get(p,c)},set:function(p){var h=this[F];xt.set(h,c,p)}},u}function t(c){for(var d=c.length-1;d>=0;d--){var u=c[d][F];if(!u.P)switch(u.i){case 5:n(u)&&ye(u);break;case 4:o(u)&&ye(u)}}}function o(c){for(var d=c.t,u=c.k,p=tt(u),h=p.length-1;h>=0;h--){var y=p[h];if(y!==F){var g=d[y];if(g===void 0&&!et(d,y))return!0;var v=u[y],b=v&&v[F];if(b?b.t!==g:!$n(v,g))return!0}}var S=!!d[F];return p.length!==tt(d).length+(S?0:1)}function n(c){var d=c.k;if(d.length!==c.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(c){c.g&&Y(3,JSON.stringify(he(c)))}var s={};Gi("ES5",{J:function(c,d){var u=Array.isArray(c),p=function(y,g){if(y){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=qn(g);delete S[F];for(var w=tt(S),R=0;R<w.length;R++){var I=w[R];S[I]=r(I,y||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(u,c),h={i:u?5:4,A:d?d.A:Fr(),P:!1,I:!1,R:{},l:d,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,F,{value:h,writable:!0}),p},S:function(c,d,u){u?le(d)&&d[F].A===c&&t(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[F];if(y){var g=y.t,v=y.k,b=y.R,S=y.i;if(S===4)Te(v,function(_){_!==F&&(g[_]!==void 0||et(g,_)?b[_]||p(v[_]):(b[_]=!0,ye(y)))}),Te(g,function(_){v[_]!==void 0||et(v,_)||(b[_]=!1,ye(y))});else if(S===5){if(n(y)&&(ye(y),b.length=!0),v.length<g.length)for(var w=v.length;w<g.length;w++)b[w]=!1;else for(var R=g.length;R<v.length;R++)b[R]=!0;for(var I=Math.min(v.length,g.length),N=0;N<I;N++)v.hasOwnProperty(N)||(b[N]=!0),b[N]===void 0&&p(v[N])}}}}(c.p[0]),t(c.p))},K:function(c){return c.i===4?o(c):n(c)}})}var zn,bt,jr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$i=typeof Map<"u",Vi=typeof Set<"u",Gn=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Kn=jr?Symbol.for("immer-nothing"):((zn={})["immer-nothing"]=!0,zn),Wn=jr?Symbol.for("immer-draftable"):"__$immer_draftable",F=jr?Symbol.for("immer-state"):"__$immer_state";var Ki=""+Object.prototype.constructor,tt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,qn=Object.getOwnPropertyDescriptors||function(r){var t={};return tt(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Mr={},xt={get:function(r,t){if(t===F)return r;var o=he(r);if(!et(o,t))return function(i,s,c){var d,u=Bn(s,c);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!te(n)?n:n===Lr(r.t,t)?(Pr(r),r.o[t]=Ur(r.A.h,n,r)):n},has:function(r,t){return t in he(r)},ownKeys:function(r){return Reflect.ownKeys(he(r))},set:function(r,t,o){var n=Bn(he(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Lr(he(r),t),s=i?.[F];if(s&&s.t===o)return r.o[t]=o,r.R[t]=!1,!0;if($n(o,i)&&(o!==void 0||et(r.t,t)))return!0;Pr(r),ye(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Lr(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,Pr(r),ye(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=he(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Y(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){Y(12)}},mt={};Te(xt,function(r,t){mt[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),mt.deleteProperty=function(r,t){return mt.set.call(this,r,t,void 0)},mt.set=function(r,t,o){return xt.set.call(this,r[0],t,o,r[0])};var qi=function(){function r(o){var n=this;this.O=Gn,this.D=!0,this.produce=function(i,s,c){if(typeof i=="function"&&typeof s!="function"){var d=s;s=i;var u=n;return function(S){var w=this;S===void 0&&(S=d);for(var R=arguments.length,I=Array(R>1?R-1:0),N=1;N<R;N++)I[N-1]=arguments[N];return u.produce(S,function(_){var H;return(H=s).call.apply(H,[w,_].concat(I))})}}var p;if(typeof s!="function"&&Y(6),c!==void 0&&typeof c!="function"&&Y(7),te(i)){var h=Un(n),y=Ur(n,i,void 0),g=!0;try{p=s(y),g=!1}finally{g?Mt(h):Dr(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return kr(h,c),Nr(S,h)},function(S){throw Mt(h),S}):(kr(h,c),Nr(p,h))}if(!i||typeof i!="object"){if((p=s(i))===void 0&&(p=i),p===Kn&&(p=void 0),n.D&&Gr(p,!0),c){var v=[],b=[];ae("Patches").M(i,p,v,b),c(v,b)}return p}Y(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return i.apply(void 0,[v].concat(y))})};var c,d,u=n.produce(i,s,function(p,h){c=p,d=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,c,d]}):[u,c,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){te(o)||Y(8),le(o)&&(o=ji(o));var n=Un(this),i=Ur(this,o,void 0);return i[F].C=!0,Dr(n),i},t.finishDraft=function(o,n){var i=o&&o[F],s=i.A;return kr(s,n),Nr(void 0,s)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Gn&&Y(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){o=s.value;break}}i>-1&&(n=n.slice(i+1));var c=ae("Patches").$;return le(o)?c(o,n):this.produce(o,function(d){return c(d,n)})},r}(),V=new qi,Zi=V.produce,qp=V.produceWithPatches.bind(V),Zp=V.setAutoFreeze.bind(V),Yp=V.setUseProxies.bind(V),Qp=V.applyPatches.bind(V),Xp=V.createDraft.bind(V),Jp=V.finishDraft.bind(V),zt=Zi;function _e(r){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(r)}function Zn(r,t){if(_e(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(_e(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Yn(r){var t=Zn(r,"string");return _e(t)=="symbol"?t:t+""}function Qn(r,t,o){return(t=Yn(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function Xn(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function $r(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Xn(Object(o),!0).forEach(function(n){Qn(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Xn(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function W(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Jn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Vr=function(){return Math.random().toString(36).substring(7).split("").join(".")},Gt={INIT:"@@redux/INIT"+Vr(),REPLACE:"@@redux/REPLACE"+Vr(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Vr()}};function Yi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Kr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(W(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(W(1));return o(Kr)(r,t)}if(typeof r!="function")throw new Error(W(2));var i=r,s=t,c=[],d=c,u=!1;function p(){d===c&&(d=c.slice())}function h(){if(u)throw new Error(W(3));return s}function y(S){if(typeof S!="function")throw new Error(W(4));if(u)throw new Error(W(5));var w=!0;return p(),d.push(S),function(){if(w){if(u)throw new Error(W(6));w=!1,p();var I=d.indexOf(S);d.splice(I,1),c=null}}}function g(S){if(!Yi(S))throw new Error(W(7));if(typeof S.type>"u")throw new Error(W(8));if(u)throw new Error(W(9));try{u=!0,s=i(s,S)}finally{u=!1}for(var w=c=d,R=0;R<w.length;R++){var I=w[R];I()}return S}function v(S){if(typeof S!="function")throw new Error(W(10));i=S,g({type:Gt.REPLACE})}function b(){var S,w=y;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(W(11));function N(){I.next&&I.next(h())}N();var _=w(N);return{unsubscribe:_}}},S[Jn]=function(){return this},S}return g({type:Gt.INIT}),n={dispatch:g,subscribe:y,getState:h,replaceReducer:v},n[Jn]=b,n}function Qi(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Gt.INIT});if(typeof n>"u")throw new Error(W(12));if(typeof o(void 0,{type:Gt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(W(13))})}function ea(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var s=Object.keys(o),c,d;try{Qi(o)}catch(u){d=u}return function(p,h){if(p===void 0&&(p={}),d)throw d;if(0)var y;for(var g=!1,v={},b=0;b<s.length;b++){var S=s[b],w=o[S],R=p[S],I=w(R,h);if(typeof I>"u"){var N=h&&h.type;throw new Error(W(14))}v[S]=I,g=g||I!==R}return g=g||s.length!==Object.keys(p).length,g?v:p}}function ot(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function ta(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(W(15))},c={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},d=t.map(function(u){return u(c)});return s=ot.apply(void 0,d)(i.dispatch),$r($r({},i),{},{dispatch:s})}}}function ra(r){var t=function(n){var i=n.dispatch,s=n.getState;return function(c){return function(d){return typeof d=="function"?d(i,s,r):c(d)}}};return t}var oa=ra();oa.withExtraArgument=ra;var qr=oa;var ca=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Xi=function(r,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(h){return u([p,h])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(s=p[0]&2?i.return:p[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,p[1])).done)return s;switch(i=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){o.label=p[1];break}if(p[0]===6&&o.label<s[1]){o.label=s[1],s=p;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(p);break}s[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(h){p=[6,h],i=0}finally{n=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},nt=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Ji=Object.defineProperty,es=Object.defineProperties,ts=Object.getOwnPropertyDescriptors,na=Object.getOwnPropertySymbols,rs=Object.prototype.hasOwnProperty,os=Object.prototype.propertyIsEnumerable,aa=function(r,t,o){return t in r?Ji(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},ge=function(r,t){for(var o in t||(t={}))rs.call(t,o)&&aa(r,o,t[o]);if(na)for(var n=0,i=na(t);n<i.length;n++){var o=i[n];os.call(t,o)&&aa(r,o,t[o])}return r},Zr=function(r,t){return es(r,ts(t))},ns=function(r,t,o){return new Promise(function(n,i){var s=function(u){try{d(o.next(u))}catch(p){i(p)}},c=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(s,c)};d((o=o.apply(r,t)).next())})};var as=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ot:ot.apply(null,arguments)},bf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function is(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var ss=function(r){ca(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,nt([void 0],o[0].concat(this)))):new(t.bind.apply(t,nt([void 0],o.concat(this))))},t}(Array),cs=function(r){ca(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,nt([void 0],o[0].concat(this)))):new(t.bind.apply(t,nt([void 0],o.concat(this))))},t}(Array);function Xr(r){return te(r)?zt(r,function(){}):r}function ls(r){return typeof r=="boolean"}function ds(){return function(t){return us(t)}}function us(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,s=r.serializableCheck,c=s===void 0?!0:s,d=new ss;if(o&&(ls(o)?d.push(qr):d.push(qr.withExtraArgument(o.extraArgument))),0){if(i)var u;if(c)var p}return d}var Yr=!0;function la(r){var t=ds(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,s=o.middleware,c=s===void 0?t():s,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,h=p===void 0?void 0:p,y=o.enhancers,g=y===void 0?void 0:y,v;if(typeof i=="function")v=i;else if(is(i))v=ea(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=c;if(typeof b=="function"&&(b=b(t),!Yr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yr&&b.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=ta.apply(void 0,b),w=ot;u&&(w=as(ge({trace:!Yr},typeof u=="object"&&u)));var R=new cs(S),I=R;Array.isArray(g)?I=nt([S],g):typeof g=="function"&&(I=g(R));var N=w.apply(void 0,I);return Kr(v,h,N)}function me(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return ge(ge({type:r,payload:s.payload},"meta"in s&&{meta:s.meta}),"error"in s&&{error:s.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function da(r){var t={},o=[],n,i={addCase:function(s,c){var d=typeof s=="string"?s:s.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=c,i},addMatcher:function(s,c){return o.push({matcher:s,reducer:c}),i},addDefaultCase:function(s){return n=s,i}};return r(i),[t,o,n]}function ps(r){return typeof r=="function"}function fs(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?da(t):[t,o,n],s=i[0],c=i[1],d=i[2],u;if(ps(r))u=function(){return Xr(r())};else{var p=Xr(r);u=function(){return p}}function h(y,g){y===void 0&&(y=u());var v=nt([s[g.type]],c.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(le(b)){var w=b,R=S(w,g);return R===void 0?b:R}else{if(te(b))return zt(b,function(I){return S(I,g)});var R=S(b,g);if(R===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return b},y)}return h.getInitialState=u,h}function hs(r,t){return r+"/"+t}function ua(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:Xr(r.initialState),n=r.reducers||{},i=Object.keys(n),s={},c={},d={};i.forEach(function(h){var y=n[h],g=hs(t,h),v,b;"reducer"in y?(v=y.reducer,b=y.prepare):v=y,s[h]=v,c[g]=v,d[h]=b?me(g,b):me(g)});function u(){var h=typeof r.extraReducers=="function"?da(r.extraReducers):[r.extraReducers],y=h[0],g=y===void 0?{}:y,v=h[1],b=v===void 0?[]:v,S=h[2],w=S===void 0?void 0:S,R=ge(ge({},g),c);return fs(o,function(I){for(var N in R)I.addCase(N,R[N]);for(var _=0,H=b;_<H.length;_++){var J=H[_];I.addMatcher(J.matcher,J.reducer)}w&&I.addDefaultCase(w)})}var p;return{name:t,reducer:function(h,y){return p||(p=u()),p(h,y)},actions:d,caseReducers:s,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var ys="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gs=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=ys[Math.random()*64|0];return t},ms=["name","message","stack","code"],Qr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ia=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),bs=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=ms;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},Cf=function(){function r(t,o,n){var i=me(t+"/fulfilled",function(h,y,g,v){return{payload:h,meta:Zr(ge({},v||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),s=me(t+"/pending",function(h,y,g){return{payload:void 0,meta:Zr(ge({},g||{}),{arg:y,requestId:h,requestStatus:"pending"})}}),c=me(t+"/rejected",function(h,y,g,v,b){return{payload:v,error:(n&&n.serializeError||bs)(h||"Rejected"),meta:Zr(ge({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(y,g,v){var b=n?.idGenerator?n.idGenerator(h):gs(),S=new u,w,R=!1;function I(_){w=_,S.abort()}var N=function(){return ns(this,null,function(){var _,H,J,ve,j,Se,Fe;return Xi(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),ve=(_=n?.condition)==null?void 0:_.call(n,h,{getState:g,extra:v}),vs(ve)?[4,ve]:[3,2];case 1:ve=f.sent(),f.label=2;case 2:if(ve===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,j=new Promise(function(m,A){return S.signal.addEventListener("abort",function(){return A({name:"AbortError",message:w||"Aborted"})})}),y(s(b,h,(H=n?.getPendingMeta)==null?void 0:H.call(n,{requestId:b,arg:h},{getState:g,extra:v}))),[4,Promise.race([j,Promise.resolve(o(h,{dispatch:y,getState:g,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(m,A){return new Qr(m,A)},fulfillWithValue:function(m,A){return new ia(m,A)}})).then(function(m){if(m instanceof Qr)throw m;return m instanceof ia?i(m.payload,b,h,m.meta):i(m,b,h)})])];case 3:return J=f.sent(),[3,5];case 4:return Se=f.sent(),J=Se instanceof Qr?c(null,b,h,Se.payload,Se.meta):c(Se,b,h),[3,5];case 5:return Fe=n&&!n.dispatchConditionRejection&&c.match(J)&&J.meta.condition,Fe||y(J),[2,J]}})})}();return Object.assign(N,{abort:I,requestId:b,arg:h,unwrap:function(){return N.then(xs)}})}}return Object.assign(p,{pending:s,rejected:c,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function xs(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function vs(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var pa="listener",fa="completed",ha="cancelled",Of="task-"+ha,Ef="task-"+fa,Af=pa+"-"+ha,wf=pa+"-"+fa;var Jr="listenerMiddleware";var Rf=me(Jr+"/add"),If=me(Jr+"/removeAll"),Tf=me(Jr+"/remove");var sa,_f=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(sa||(sa=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},Ss=function(r){return function(t){setTimeout(t,r)}},kf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ss(10);Vn();var Cs=Nt(Symbol("withEventBus"),function(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Wt=class extends Cs(Object){};window.ftReduxStores||(window.ftReduxStores={});var ya=class r extends Wt{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(Ut(s))return s;if(i==null)return;let c=ua({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=la({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=En(c.getInitialState());for(let y of p.keeping)h[y]=(u??h)[y];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return c.reducer(u,p)}});return window.ftReduxStores[i.name]=new r(c,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Lt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,c,d)=>{let u=c,p=s[u];return p?(...h)=>{let y=p(...h.map(i));return this.reduxStore.dispatch(y),y}:h=>{this.setState({[u]:i(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var jt=class{static format(t,o,n,i,s){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,o,n,i,!!s)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,i,s){let c=typeof t=="string"?new Date(t):t,d=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(c),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(c);return s?u:i?`${d} ${u}`:d}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var $t=E(L()),Os="ft-app-info",ke=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};ke.eventName="authentication-change";var Es={session:(r,t)=>{(0,$t.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>C.dispatchEvent(new ke(t.payload)),0))}},C=$t.FtReduxStore.get({name:Os,reducers:Es,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],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,authenticationRequired:!1}});var ga=E(L()),Vt=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(c=r[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ah=(0,ga.applyMixinOnce)(Symbol("withDateFormat"),function(r){class t extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(C)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(d=>d.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?d=>jt.format(d,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Vt([(0,eo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Vt([(0,eo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Vt([_r({store:C.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Vt([_r({store:C.name})],t.prototype,"uiLocale",void 0),t});var ws=E(ba(),1);var xa;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(xa||(xa={}));var va;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(va||(va={}));var Sa;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Sa||(Sa={}));var Ca;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(Ca||(Ca={}));var Oa;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Oa||(Oa={}));var Ea;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(Ea||(Ea={}));var Aa;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(Aa||(Aa={}));var wa;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(wa||(wa={}));var Ra;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW",r.UD_VIEWER="UD_VIEWER",r.ASSET_VIEWER="ASSET_VIEWER"})(Ra||(Ra={}));var Ia;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Ia||(Ia={}));var Ta;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Ta||(Ta={}));var _a;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_a||(_a={}));var ka;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(ka||(ka={}));var Na;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Na||(Na={}));var to;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(to||(to={}));var La;(function(r){r.ASC="ASC",r.DESC="DESC"})(La||(La={}));var Pa;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Pa||(Pa={}));var ro;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(ro||(ro={}));var Fa;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Fa||(Fa={}));var Da;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Da||(Da={}));var Ua;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Ua||(Ua={}));var Ma;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Ma||(Ma={}));var Ba;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ba||(Ba={}));var oo;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(oo||(oo={}));var Ha;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ha||(Ha={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var Q;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(Q||(Q={}));var za;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(za||(za={}));var Ga;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Ga||(Ga={}));var Wa;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SUMMARY="SUMMARY",r.SEMANTIC_SEARCH="SEMANTIC_SEARCH",r.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",r.OTHER="OTHER"})(Wa||(Wa={}));var ja;(function(r){r.INACCURATE="INACCURATE",r.INCOMPLETE="INCOMPLETE",r.OFF_TOPIC="OFF_TOPIC",r.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",r.SLOW="SLOW",r.OTHER="OTHER"})(ja||(ja={}));var $a;(function(r){r.JSON="JSON",r.TEXT="TEXT"})($a||($a={}));var Va;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Va||(Va={}));var Ka;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Ka||(Ka={}));var qa;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(qa||(qa={}));var Za;(function(r){r.MAP="MAP",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Za||(Za={}));var As={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN,U.BEHAVIOR_DATA_USER],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Ya(r,t){return r===t||(As[r]??[]).some(o=>Ya(o,t))}function Qa(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Ya(n,t))}var er=E(L());var no=E(L());var Ne=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=C.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=C.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var Zt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ne.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ne.await()}};var $=class extends Zt{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(s,c)=>typeof c!="object"||c==null||Array.isArray(c)?c:Object.fromEntries(Object.entries(c).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new no.CacheRegistry,this.cache=t?i.commonCache:new no.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Yt=class extends ${async listMySearches(){let{session:t}=C.getState();return Qa(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Qt=class extends ${async listMyBookmarks(){let t=C.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Xt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var Jt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=C.getState().session;return!!t?.sessionAuthenticated}};var Rs="ft-user-assets",Is={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(Q).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,t)=>{let{assetType:o,mapId:n,asset:i}=t.payload;io(r,o,[...ao(r,o),i]),Xa(r,o,1,n),Ja(r,i)},editAsset:(r,t)=>{let{assetType:o,asset:n}=t.payload;io(r,o,ao(r,o).map(i=>i.id===n.id?n:i)),Ja(r,n)},removeAsset:(r,t)=>{let{assetType:o,mapId:n,assetId:i}=t.payload;io(r,o,ao(r,o).filter(s=>s.id!==i)),Xa(r,o,-1,n)}},ei={[Q.SEARCHES]:"savedSearches",[Q.BOOKMARKS]:"bookmarks",[Q.BOOKS]:void 0,[Q.COLLECTIONS]:void 0},ao=(r,t)=>{var o;let n=ei[t];return n?(o=r[n])!==null&&o!==void 0?o:[]:[]},io=(r,t,o)=>{let n=ei[t];n&&(r[n]=o)},Xa=(r,t,o,n)=>{let i=r.assetCounts.allAsset[t];if(i!==void 0&&(r.assetCounts.allAsset[t]=Math.max(0,i+o),t===Q.BOOKMARKS&&n)){let s=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,s+o)}},Ja=(r,t)=>{let o=r.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));r.assetLabels.push(...n)},K=er.FtReduxStore.get({name:Rs,reducers:Is,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Q).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),so=class{constructor(t=new Xt,o=new Jt){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=C.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Qt,this.savedSearchesService=new Yt,C.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=C.getState();(0,er.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),K.actions.clearAssetCount(),K.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),K.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),K.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();K.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();K.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&K.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&K.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(K.getState().assetCounts.bookmarkByMap).length!==0;t===Q.BOOKMARKS&&o&&K.actions.clearBookmarkCountByMap(),K.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(o)}}},Ts=new so;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ts);var co=class{addCommand(t,o=!1){C.commands.add(t,o)}consumeCommand(t){return C.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new co;var X=E(L());var ti,it=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},_s=Symbol("clearAfterUnitTest"),tr=class extends(0,X.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ti]=()=>{this.defaultMessages={},this.cache=new X.CacheRegistry,this.listeners={}},this.currentUiLocale=C.getState().uiLocale,C.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=C.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,X.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let s=t.toLowerCase(),c=this.resolveContext(s);return new X.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},c).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof X.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new it({loadedContexts:t})),this.dispatchEvent(new it({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new it({loadedContexts:[t]})),this.dispatchEvent(new it({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,X.delay)(0).then(()=>n()).catch(()=>null)))}};ti=_s;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends tr{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var st=window.FluidTopicsI18nService,rr=window.FluidTopicsCustomI18nService;var ri=E(L()),lo=class{highlightHtml(t,o,n){(0,ri.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new lo;var oi=E(L());var uo=class{isDate(t){var o,n,i,s;return(s=(i=((n=(o=C.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,o){var n,i,s,c;if(t==null)return"";try{return oi.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:C.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(s=o?.withTime)!==null&&s!==void 0?s:!1,(c=o?.onlyTime)!==null&&c!==void 0?c:!1)}catch(d){throw console.error(`Date ${JSON.stringify(t)} is not valid`,d),d}}};window.FluidTopicsDateService=new uo;var ni=E(L());var Le=class{static get(t,o){var n,i;let s=C.getState(),{lang:c,region:d}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ni.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,o??`${c}-${d}`)}};var po=class{urlToSearchRequest(t){return Le.get().parse(t)}searchRequestToUrl(t){return Le.get().serialize(t)}};window.FluidTopicsUrlService=new po;var xe=E(L());var Pe=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Pe.eventName="change";var fo=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},ai=new fo;var or=class r extends xe.WithEventBus{static build(){return new r(window.history,ai,()=>window.location,!1)}constructor(t,o,n,i){var s,c;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(c=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&c!==void 0?c:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,xe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Pe(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[s,c,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...s,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,c,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Pe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Pe.eventName,t)}currentItem(){return(0,xe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,xe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,xe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=or.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var ii=E(ee());var si=ii.css`
|
|
143
143
|
`;var li=E(ee()),G=E(q()),re=E(L());function ci(r,t){let{authenticationRequired:o,session:n}=C.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):r()}var M=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(c=r[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},P=class extends re.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",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=()=>Ne.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new re.CacheRegistry,this.cleanSessionDebouncer=new re.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return li.html`
|
|
144
144
|
<slot></slot>
|
|
145
145
|
`}connectedCallback(){super.connectedCallback(),C.addEventListener(ke.eventName,this.reloadConfiguration)}disconnectedCallback(){C.addEventListener(ke.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var o,n,i,s,c,d,u;super.update(t),t.has("baseUrl")&&(C.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&C.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&C.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&C.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&C.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&C.actions.noCustom(this.noCustom),t.has("editorMode")&&C.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&C.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&C.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>st.addContext(p)),t.has("openExternalDocumentInNewTab")&&C.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&C.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&C.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(C.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),C.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),C.actions.searchInAllLanguagesAllowed((c=(s=this.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed)!==null&&c!==void 0?c:!1)),t.has("authenticationRequired")&&C.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&C.actions.availableContentLocales((u=(d=this.availableContentLocales)===null||d===void 0?void 0:d.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>ci(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};P.elementDefinitions={};P.styles=si;M([(0,G.property)()],P.prototype,"baseUrl",void 0);M([(0,G.property)()],P.prototype,"apiIntegrationIdentifier",void 0);M([(0,G.property)()],P.prototype,"apiIntegrationAppVersion",void 0);M([(0,G.property)()],P.prototype,"uiLocale",void 0);M([(0,re.jsonProperty)(null)],P.prototype,"availableUiLocales",void 0);M([(0,re.jsonProperty)(null)],P.prototype,"metadataConfiguration",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"editorMode",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"noCustom",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"openExternalDocumentInNewTab",void 0);M([(0,G.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],P.prototype,"noCustomComponent",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"withManualResources",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"navigatorOnline",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"forcedOffline",void 0);M([(0,G.property)({type:Object})],P.prototype,"apiProvider",void 0);M([(0,G.property)({type:Boolean})],P.prototype,"authenticationRequired",void 0);M([(0,re.jsonProperty)([])],P.prototype,"messageContexts",void 0);M([(0,re.jsonProperty)(void 0)],P.prototype,"session",void 0);M([(0,G.state)()],P.prototype,"localesConfiguration",void 0);M([(0,G.state)()],P.prototype,"availableContentLocales",void 0);var di=E(L());(0,di.customElement)("ft-app-context")(P);var nr=class r{static build(t){return new r(t)}static buildCustom(t){return new r(t,!0)}static fromGwt(t){return new r(t)}get service(){return this.custom?rr:st}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return c=>({context:this.name,key:s,custom:this.custom,args:typeof c=="function"?void 0:c,argsProvider:typeof c=="function"?c:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var ct=E(L());var fi=E(q());var ho=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ui=new ho;var ks=function(r,t,o,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(c=r[d])&&(s=(i<3?c(s):i>3?c(t,o,s):c(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ns=Symbol("i18nAttributes"),Ls=Symbol("i18nListAttributes"),hi=Symbol("i18nProperties"),ar=Symbol("i18nContexts"),vt=Symbol("i18nUnsubs"),sr=(0,ct.applyMixinOnce)(Symbol("withI18n"),function(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?rr:st}i18n(s){let{context:c,key:d,message:u}=s,{custom:p,args:h,argsProvider:y}=s;if(c&&d){this.hasI18nContext(c)||this.addI18nContext(c,void 0,p);let g=h??(y?y(this):[]);return this.getI18nService(p).resolveMessage(c,d,...g)}return u}async awaitI18n(s){let{context:c,custom:d}=s;return c&&await this.getI18nService(d).prepareContext(c),this.i18n(s)}customI18n(s,c){if(ui.isI18nKey(s)){let[d,u]=s.split(".");return this.i18n({custom:!0,context:d,key:u,...c})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((c,d,u)=>s.has(d)||typeof c.argsProvider=="function"),this.updateI18nProperties(c=>typeof c.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((c,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===s}),this.updateI18nProperties(c=>c.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var c,d;let u=this,p=(h,y,g)=>g?.context&&g.key&&s(h,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(c=this[Ns])===null||c===void 0||c.forEach((h,y)=>u[y]=p(h,y,u[y])),(d=this[Ls])===null||d===void 0||d.forEach((h,y)=>{var g;return u[y]=(g=u[y])===null||g===void 0?void 0:g.map(v=>p(h,y,v))})}updateI18nProperties(s){var c;(c=this[hi])===null||c===void 0||c.forEach((d,u)=>{s(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(s,c,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,c,d)}addI18nContext(s,c,d){let u=(typeof s=="string"?s:s.name).toLowerCase();d=typeof s=="string"?d:s.custom,this[ar].set(u,{isCustomContext:d}),this[vt].has(u)||this[vt].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,c)}hasI18nContext(s){return this[ar].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ar].forEach((s,c)=>this.addI18nContext(c,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[vt].forEach(s=>s()),this[vt].clear()}}return t=ar,o=vt,ks([(0,fi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),pi=class extends sr(ct.FtLitElement){},ir=class extends sr(ct.FtLitElementRedux){};var yi=E(ee());var gi=yi.css`
|
|
@@ -45,7 +45,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
45
45
|
input::-webkit-search-results-decoration {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
`;var ws={};var ca={};M(ca,{ParametrizedLabelResolver:()=>Cr});var Cr=class t{constructor(e,o){this.defaultLabels=e,this.labels=o}resolve(e,...o){var n,a;e=this.resolvePluralKey(e,o);let i=(a=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...o)}static replaceParameters(e,...o){return o.forEach((n,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,o){for(let n of o)if(typeof n=="number"){let a=`${String(e)}[\\=${n}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,o){return e instanceof Date?t.formatDate(e,o):e??""}static formatDate(e,o){let n=a=>o?.includes("date")?e.toLocaleDateString(a):o?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return n(document.documentElement.lang)}catch{return n()}}};var La={};M(La,{FtCommandQueue:()=>wr,FtLitElementRedux:()=>ft,FtReduxStore:()=>qe,FtStateManager:()=>uo,ReduxWatcher:()=>lo,clearAllStores:()=>bf,isFtReduxStore:()=>Dt,redux:()=>Pe,reduxEventListener:()=>Nu,reduxReactive:()=>ku,watch:()=>ac,withRedux:()=>As});var ku=()=>(t,e)=>{var o;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(o=n.reduxReactiveProperties)===null||o===void 0||o.add(e)},Pe=t=>{let e=t??{};return(o,n)=>{var a;let i={hasChanged:Ie,attribute:!1,...e};T(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[n],store:e.store})}},Nu=t=>(e,o)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(o,t)};var wr=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))}};function Dt(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ar=Symbol("internalReduxEventsUnsubscribers"),We=Symbol("internalStoresUnsubscribers"),ut=Symbol("internalStores"),As=K(Symbol("withRedux"),function(t){var e,o,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[ut].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ut].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ut].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[ut].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[ut].delete(l)}setupStores(){this.unsubscribeFromStores(),this[ut].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let f=this.getStore(s.store);f&&(s.store?this[We].has(s.store):this[We].size>0)&&(this[l]=s.selector(f.getState(),this))}})}subscribeToStore(s,l){var d;this[We].set(s,l.subscribe(()=>this.updateFromStores())),this[Ar].set(s,[]),Dt(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||l.name===f.store)){let p=m=>this[h](m);l.addEventListener(f.eventName,p),this[Ar].get(s).push(()=>l.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[We].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[We].has(s)&&this[We].get(s)(),this[We].delete(s),(l=this[Ar].get(s))===null||l===void 0||l.forEach(d=>d()),this[Ar].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=We,o=ut,n=Ar,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ft=class extends As(G){};function de(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(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Le(t){return!!t&&!!t[j]}function me(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)===zu}(t)||Array.isArray(t)||!!t[ks]||!!(!((e=t.constructor)===null||e===void 0)&&e[ks])||ga(t)||ba(t))}function pt(t,e,o){o===void 0&&(o=!1),Bt(t)===0?(o?Object.keys:Ut)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Bt(t){var e=t[j];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ga(t)?2:ba(t)?3:0}function Mt(t,e){return Bt(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Fu(t,e){return Bt(t)===2?t.get(e):t[e]}function Ns(t,e,o){var n=Bt(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Fs(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ga(t){return $u&&t instanceof Map}function ba(t){return Hu&&t instanceof Set}function je(t){return t.o||t.t}function xa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Us(t);delete e[j];for(var o=Ut(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 va(t,e){return e===void 0&&(e=!1),Sa(t)||Le(t)||!me(t)||(Bt(t)>1&&(t.set=t.add=t.clear=t.delete=Du),Object.freeze(t),e&&pt(t,function(o,n){return va(n,!0)},!0)),t}function Du(){de(2)}function Sa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function we(t){var e=ya[t];return e||de(18,t),e}function Mu(t,e){ya[t]||(ya[t]=e)}function pa(){return Ir}function la(t,e){e&&(we("Patches"),t.u=[],t.s=[],t.v=e)}function no(t){ha(t),t.p.forEach(Uu),t.p=null}function ha(t){t===Ir&&(Ir=t.l)}function Rs(t){return Ir={p:[],l:Ir,h:t,m:!0,_:0}}function Uu(t){var e=t[j];e.i===0||e.i===1?e.j():e.g=!0}function da(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||we("ES5").S(e,t,n),n?(o[j].P&&(no(e),de(4)),me(t)&&(t=ao(e,t),e.l||io(e,t)),e.u&&we("Patches").M(o[j].t,t,e.u,e.s)):t=ao(e,o,[]),no(e),e.u&&e.v(e.u,e.s),t!==Ms?t:void 0}function ao(t,e,o){if(Sa(e))return e;var n=e[j];if(!n)return pt(e,function(l,d){return Is(t,n,e,l,d,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=xa(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),pt(i,function(l,d){return Is(t,n,a,l,d,o,s)}),io(t,a,!1),o&&t.u&&we("Patches").N(n,o,t.u,t.s)}return n.o}function Is(t,e,o,n,a,i,s){if(Le(a)){var l=ao(t,a,i&&e&&e.i!==3&&!Mt(e.R,n)?i.concat(n):void 0);if(Ns(o,n,l),!Le(l))return;t.m=!1}else s&&o.add(a);if(me(a)&&!Sa(a)){if(!t.h.D&&t._<1)return;ao(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&&va(e,o)}function ua(t,e){var o=t[j];return(o?je(o):t)[e]}function Ts(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 Ge(t){t.P||(t.P=!0,t.l&&Ge(t.l))}function fa(t){t.o||(t.o=xa(t.t))}function ma(t,e,o){var n=ga(e)?we("MapSet").F(e,o):ba(e)?we("MapSet").T(e,o):t.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:pa(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=l,f=Tr;s&&(d=[l],f=Rr);var h=Proxy.revocable(d,f),p=h.revoke,m=h.proxy;return l.k=m,l.j=p,m}(e,o):we("ES5").J(e,o);return(o?o.A:pa()).p.push(n),n}function Bu(t){return Le(t)||de(22,t),function e(o){if(!me(o))return o;var n,a=o[j],i=Bt(o);if(a){if(!a.P&&(a.i<4||!we("ES5").K(a)))return a.t;a.I=!0,n=_s(o,i),a.I=!1}else n=_s(o,i);return pt(n,function(s,l){a&&Fu(a.t,s)===l||Ns(n,s,e(l))}),i===3?new Set(n):n}(t)}function _s(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return xa(t)}function Ds(){function t(s,l){var d=i[s];return d?d.enumerable=l:i[s]=d={configurable:!0,enumerable:l,get:function(){var f=this[j];return Tr.get(f,s)},set:function(f){var h=this[j];Tr.set(h,s,f)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][j];if(!d.P)switch(d.i){case 5:n(d)&&Ge(d);break;case 4:o(d)&&Ge(d)}}}function o(s){for(var l=s.t,d=s.k,f=Ut(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==j){var m=l[p];if(m===void 0&&!Mt(l,p))return!0;var b=d[p],g=b&&b[j];if(g?g.t!==m:!Fs(b,m))return!0}}var O=!!l[j];return f.length!==Ut(l).length+(O?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var f=0;f<l.length;f++)if(!l.hasOwnProperty(f))return!0;return!1}function a(s){s.g&&de(3,JSON.stringify(je(s)))}var i={};Mu("ES5",{J:function(s,l){var d=Array.isArray(s),f=function(p,m){if(p){for(var b=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(b,""+g,t(g,!0));return b}var O=Us(m);delete O[j];for(var C=Ut(O),w=0;w<C.length;w++){var A=C[w];O[A]=t(A,p||!!O[A].enumerable)}return Object.create(Object.getPrototypeOf(m),O)}(d,s),h={i:d?5:4,A:l?l.A:pa(),P:!1,I:!1,R:{},l,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,j,{value:h,writable:!0}),f},S:function(s,l,d){d?Le(l)&&l[j].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[j];if(p){var m=p.t,b=p.k,g=p.R,O=p.i;if(O===4)pt(b,function(x){x!==j&&(m[x]!==void 0||Mt(m,x)?g[x]||f(b[x]):(g[x]=!0,Ge(p)))}),pt(m,function(x){b[x]!==void 0||Mt(b,x)||(g[x]=!1,Ge(p))});else if(O===5){if(n(p)&&(Ge(p),g.length=!0),b.length<m.length)for(var C=b.length;C<m.length;C++)g[C]=!1;else for(var w=m.length;w<b.length;w++)g[w]=!0;for(var A=Math.min(b.length,m.length),S=0;S<A;S++)b.hasOwnProperty(S)||(g[S]=!0),g[S]===void 0&&f(b[S])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Ps,Ir,Oa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$u=typeof Map<"u",Hu=typeof Set<"u",Ls=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ms=Oa?Symbol.for("immer-nothing"):((Ps={})["immer-nothing"]=!0,Ps),ks=Oa?Symbol.for("immer-draftable"):"__$immer_draftable",j=Oa?Symbol.for("immer-state"):"__$immer_state";var zu=""+Object.prototype.constructor,Ut=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Us=Object.getOwnPropertyDescriptors||function(t){var e={};return Ut(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ya={},Tr={get:function(t,e){if(e===j)return t;var o=je(t);if(!Mt(o,e))return function(a,i,s){var l,d=Ts(i,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!me(n)?n:n===ua(t.t,e)?(fa(t),t.o[e]=ma(t.A.h,n,t)):n},has:function(t,e){return e in je(t)},ownKeys:function(t){return Reflect.ownKeys(je(t))},set:function(t,e,o){var n=Ts(je(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=ua(je(t),e),i=a?.[j];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Fs(o,a)&&(o!==void 0||Mt(t.t,e)))return!0;fa(t),Ge(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 ua(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,fa(t),Ge(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=je(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){de(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){de(12)}},Rr={};pt(Tr,function(t,e){Rr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Rr.deleteProperty=function(t,e){return Rr.set.call(this,t,e,void 0)},Rr.set=function(t,e,o){return Tr.set.call(this,t[0],e,o,t[0])};var Wu=function(){function t(o){var n=this;this.O=Ls,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var d=n;return function(O){var C=this;O===void 0&&(O=l);for(var w=arguments.length,A=Array(w>1?w-1:0),S=1;S<w;S++)A[S-1]=arguments[S];return d.produce(O,function(x){var E;return(E=i).call.apply(E,[C,x].concat(A))})}}var f;if(typeof i!="function"&&de(6),s!==void 0&&typeof s!="function"&&de(7),me(a)){var h=Rs(n),p=ma(n,a,void 0),m=!0;try{f=i(p),m=!1}finally{m?no(h):ha(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(O){return la(h,s),da(O,h)},function(O){throw no(h),O}):(la(h,s),da(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Ms&&(f=void 0),n.D&&va(f,!0),s){var b=[],g=[];we("Patches").M(a,f,b,g),s(b,g)}return f}de(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),m=1;m<h;m++)p[m-1]=arguments[m];return n.produceWithPatches(f,function(b){return a.apply(void 0,[b].concat(p))})};var s,l,d=n.produce(a,i,function(f,h){s=f,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,l]}):[d,s,l]},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){me(o)||de(8),Le(o)&&(o=Bu(o));var n=Rs(this),a=ma(this,o,void 0);return a[j].C=!0,ha(n),a},e.finishDraft=function(o,n){var a=o&&o[j],i=a.A;return la(i,n),da(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ls&&de(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 s=we("Patches").$;return Le(o)?s(o,n):this.produce(o,function(l){return s(l,n)})},t}(),ae=new Wu,ju=ae.produce,Ib=ae.produceWithPatches.bind(ae),Tb=ae.setAutoFreeze.bind(ae),_b=ae.setUseProxies.bind(ae),Pb=ae.applyPatches.bind(ae),Lb=ae.createDraft.bind(ae),kb=ae.finishDraft.bind(ae),so=ju;function ht(t){"@babel/helpers - typeof";return ht=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},ht(t)}function Bs(t,e){if(ht(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(ht(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $s(t){var e=Bs(t,"string");return ht(e)=="symbol"?e:e+""}function Hs(t,e,o){return(e=$s(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function zs(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 Ea(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?zs(Object(o),!0).forEach(function(n){Hs(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):zs(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function X(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 Ws=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ca=function(){return Math.random().toString(36).substring(7).split("").join(".")},co={INIT:"@@redux/INIT"+Ca(),REPLACE:"@@redux/REPLACE"+Ca(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ca()}};function Gu(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 wa(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(X(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(X(1));return o(wa)(t,e)}if(typeof t!="function")throw new Error(X(2));var a=t,i=e,s=[],l=s,d=!1;function f(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(X(3));return i}function p(O){if(typeof O!="function")throw new Error(X(4));if(d)throw new Error(X(5));var C=!0;return f(),l.push(O),function(){if(C){if(d)throw new Error(X(6));C=!1,f();var A=l.indexOf(O);l.splice(A,1),s=null}}}function m(O){if(!Gu(O))throw new Error(X(7));if(typeof O.type>"u")throw new Error(X(8));if(d)throw new Error(X(9));try{d=!0,i=a(i,O)}finally{d=!1}for(var C=s=l,w=0;w<C.length;w++){var A=C[w];A()}return O}function b(O){if(typeof O!="function")throw new Error(X(10));a=O,m({type:co.REPLACE})}function g(){var O,C=p;return O={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(X(11));function S(){A.next&&A.next(h())}S();var x=C(S);return{unsubscribe:x}}},O[Ws]=function(){return this},O}return m({type:co.INIT}),n={dispatch:m,subscribe:p,getState:h,replaceReducer:b},n[Ws]=g,n}function Vu(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:co.INIT});if(typeof n>"u")throw new Error(X(12));if(typeof o(void 0,{type:co.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(X(13))})}function js(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),s,l;try{Vu(o)}catch(d){l=d}return function(f,h){if(f===void 0&&(f={}),l)throw l;if(0)var p;for(var m=!1,b={},g=0;g<i.length;g++){var O=i[g],C=o[O],w=f[O],A=C(w,h);if(typeof A>"u"){var S=h&&h.type;throw new Error(X(14))}b[O]=A,m=m||A!==w}return m=m||i.length!==Object.keys(f).length,m?b:f}}function $t(){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 Gs(){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(X(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return i=$t.apply(void 0,l)(a.dispatch),Ea(Ea({},a),{},{dispatch:i})}}}function Vs(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var Ks=Vs();Ks.withExtraArgument=Vs;var Aa=Ks;var Js=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)}}(),Ku=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(h){return d([f,h])}}function d(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,a=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){o.label=f[1];break}if(f[0]===6&&o.label<i[1]){o.label=i[1],i=f;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(f);break}i[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(h){f=[6,h],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Ht=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},qu=Object.defineProperty,Zu=Object.defineProperties,Yu=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,Qu=Object.prototype.hasOwnProperty,Ju=Object.prototype.propertyIsEnumerable,Zs=function(t,e,o){return e in t?qu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ve=function(t,e){for(var o in e||(e={}))Qu.call(e,o)&&Zs(t,o,e[o]);if(qs)for(var n=0,a=qs(e);n<a.length;n++){var o=a[n];Ju.call(e,o)&&Zs(t,o,e[o])}return t},Ra=function(t,e){return Zu(t,Yu(e))},Xu=function(t,e,o){return new Promise(function(n,a){var i=function(d){try{l(o.next(d))}catch(f){a(f)}},s=function(d){try{l(o.throw(d))}catch(f){a(f)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,s)};l((o=o.apply(t,e)).next())})};var ef=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$t:$t.apply(null,arguments)},Qb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function tf(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 rf=function(t){Js(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,Ht([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ht([void 0],o.concat(this))))},e}(Array),of=function(t){Js(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,Ht([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ht([void 0],o.concat(this))))},e}(Array);function _a(t){return me(t)?so(t,function(){}):t}function nf(t){return typeof t=="boolean"}function af(){return function(e){return sf(e)}}function sf(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,s=i===void 0?!0:i,l=new rf;if(o&&(nf(o)?l.push(Aa):l.push(Aa.withExtraArgument(o.extraArgument))),0){if(a)var d;if(s)var f}return l}var Ia=!0;function Xs(t){var e=af(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?e():i,l=o.devTools,d=l===void 0?!0:l,f=o.preloadedState,h=f===void 0?void 0:f,p=o.enhancers,m=p===void 0?void 0:p,b;if(typeof a=="function")b=a;else if(tf(a))b=js(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=s;if(typeof g=="function"&&(g=g(e),!Ia&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ia&&g.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Gs.apply(void 0,g),C=$t;d&&(C=ef(Ve({trace:!Ia},typeof d=="object"&&d)));var w=new of(O),A=w;Array.isArray(m)?A=Ht([O],m):typeof m=="function"&&(A=m(w));var S=C.apply(void 0,A);return wa(b,h,S)}function Ke(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 Ve(Ve({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 ec(t){var e={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function cf(t){return typeof t=="function"}function lf(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?ec(e):[e,o,n],i=a[0],s=a[1],l=a[2],d;if(cf(t))d=function(){return _a(t())};else{var f=_a(t);d=function(){return f}}function h(p,m){p===void 0&&(p=d());var b=Ht([i[m.type]],s.filter(function(g){var O=g.matcher;return O(m)}).map(function(g){var O=g.reducer;return O}));return b.filter(function(g){return!!g}).length===0&&(b=[l]),b.reduce(function(g,O){if(O)if(Le(g)){var C=g,w=O(C,m);return w===void 0?g:w}else{if(me(g))return so(g,function(A){return O(A,m)});var w=O(g,m);if(w===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return g},p)}return h.getInitialState=d,h}function df(t,e){return t+"/"+e}function tc(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:_a(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var p=n[h],m=df(e,h),b,g;"reducer"in p?(b=p.reducer,g=p.prepare):b=p,i[h]=b,s[m]=b,l[h]=g?Ke(m,g):Ke(m)});function d(){var h=typeof t.extraReducers=="function"?ec(t.extraReducers):[t.extraReducers],p=h[0],m=p===void 0?{}:p,b=h[1],g=b===void 0?[]:b,O=h[2],C=O===void 0?void 0:O,w=Ve(Ve({},m),s);return lf(o,function(A){for(var S in w)A.addCase(S,w[S]);for(var x=0,E=g;x<E.length;x++){var R=E[x];A.addMatcher(R.matcher,R.reducer)}C&&A.addDefaultCase(C)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:l,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var uf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ff=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=uf[Math.random()*64|0];return e},pf=["name","message","stack","code"],Ta=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ys=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),hf=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=pf;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},tx=function(){function t(e,o,n){var a=Ke(e+"/fulfilled",function(h,p,m,b){return{payload:h,meta:Ra(Ve({},b||{}),{arg:m,requestId:p,requestStatus:"fulfilled"})}}),i=Ke(e+"/pending",function(h,p,m){return{payload:void 0,meta:Ra(Ve({},m||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=Ke(e+"/rejected",function(h,p,m,b,g){return{payload:b,error:(n&&n.serializeError||hf)(h||"Rejected"),meta:Ra(Ve({},g||{}),{arg:m,requestId:p,rejectedWithValue:!!b,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(p,m,b){var g=n?.idGenerator?n.idGenerator(h):ff(),O=new d,C,w=!1;function A(x){C=x,O.abort()}var S=function(){return Xu(this,null,function(){var x,E,R,k,U,F,P;return Ku(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),k=(x=n?.condition)==null?void 0:x.call(n,h,{getState:m,extra:b}),yf(k)?[4,k]:[3,2];case 1:k=y.sent(),y.label=2;case 2:if(k===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,U=new Promise(function(v,I){return O.signal.addEventListener("abort",function(){return I({name:"AbortError",message:C||"Aborted"})})}),p(i(g,h,(E=n?.getPendingMeta)==null?void 0:E.call(n,{requestId:g,arg:h},{getState:m,extra:b}))),[4,Promise.race([U,Promise.resolve(o(h,{dispatch:p,getState:m,extra:b,requestId:g,signal:O.signal,abort:A,rejectWithValue:function(v,I){return new Ta(v,I)},fulfillWithValue:function(v,I){return new Ys(v,I)}})).then(function(v){if(v instanceof Ta)throw v;return v instanceof Ys?a(v.payload,g,h,v.meta):a(v,g,h)})])];case 3:return R=y.sent(),[3,5];case 4:return F=y.sent(),R=F instanceof Ta?s(null,g,h,F.payload,F.meta):s(F,g,h),[3,5];case 5:return P=n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition,P||p(R),[2,R]}})})}();return Object.assign(S,{abort:A,requestId:g,arg:h,unwrap:function(){return S.then(mf)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function mf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function yf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var rc="listener",oc="completed",nc="cancelled",rx="task-"+nc,ox="task-"+oc,nx=rc+"-"+nc,ax=rc+"-"+oc;var Pa="listenerMiddleware";var ix=Ke(Pa+"/add"),sx=Ke(Pa+"/removeAll"),cx=Ke(Pa+"/remove");var Qs,lx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Qs||(Qs=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},gf=function(t){return function(e){setTimeout(e,t)}},dx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gf(10);Ds();window.ftReduxStores||(window.ftReduxStores={});var qe=class t extends Te{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(Dt(i))return i;if(a==null)return;let s=tc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Xs({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=rt(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new wr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}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()}};function bf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Dt(e)&&e.clear()}var lo=class{constructor(e,o,n){this.store=e,this.valueSelector=o,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),o=this.valueSelector(e);Ie(this.lastValue,o)&&(this.callback(o,e),this.lastValue=o)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function ac(t,e,o){return new lo(t,e,o).watch()}var uo=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var o;return(o=this.requestConsumers.get(e))!==null&&o!==void 0?o:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Fa={};M(Fa,{scrollHelper:()=>xf});var ka,fo=new Map,Na=class{lock(e,o){if(o){let n=fo.get(o);if(n==null||n===e)return fo.set(o,e),o}}release(e,o){o&&fo.get(o)===e&&fo.delete(o)}findFirstScrollableParent(e){var o;let n,a;for(let i of nn(e)){let s=i,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&a==null&&(a=s)}return(o=n??a)!==null&&o!==void 0?o:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,o){var n,a;let i=0;for(;o&&o.offsetParent!==e.offsetParent;)i+=(n=o.offsetTop)!==null&&n!==void 0?n:0,o=o.offsetParent;return i+((a=o?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,o){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return o;default:return 0}}scrollIntoViewIfPossible(e,o){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let a=this.getAbsoluteScrollOffset(n,e),i=a-n.clientHeight+e.clientHeight,s=a,l=Be(0,(s-n.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(o?.position,l)*(i-s)+s;n.scrollTo({behavior:o?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(ka=window.FluidTopicsScrollHelper)!==null&&ka!==void 0?ka:new Na;var xf=window.FluidTopicsScrollHelper;var Ma={};M(Ma,{SearchPlaceConverter:()=>jt,SearchPlaceQueryParams:()=>$,isSearchPlaceQueryParams:()=>Wc,serializeRequest:()=>Ef});var Sf=Nl(sc(),1);var cc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(cc||(cc={}));var lc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(lc||(lc={}));var dc;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(dc||(dc={}));var uc;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(uc||(uc={}));var fc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(fc||(fc={}));var pc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(pc||(pc={}));var hc;(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.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",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.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",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"})(hc||(hc={}));var mc;(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"})(mc||(mc={}));var yc;(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",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(yc||(yc={}));var gc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(gc||(gc={}));var bc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(bc||(bc={}));var xc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(xc||(xc={}));var vc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(vc||(vc={}));var Sc;(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"})(Sc||(Sc={}));var mt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(mt||(mt={}));var Oc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Oc||(Oc={}));var Ec;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ec||(Ec={}));var mo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(mo||(mo={}));var _c=t=>Object.keys(mo).includes(t);var Cc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Cc||(Cc={}));var wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(wc||(wc={}));var Ac;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ac||(Ac={}));var Wt;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Wt||(Wt={}));var Pc=t=>Object.keys(Wt).includes(t);var Rc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Rc||(Rc={}));var Da;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Da||(Da={}));var Ic;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ic||(Ic={}));var V;(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.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.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(V||(V={}));var ue;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ue||(ue={}));var Tc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Tc||(Tc={}));var Lc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Lc||(Lc={}));var kc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(kc||(kc={}));var Nc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Nc||(Nc={}));var Fc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Fc||(Fc={}));var Dc;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(Dc||(Dc={}));var Mc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Mc||(Mc={}));var Uc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Uc||(Uc={}));var Bc;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Bc||(Bc={}));var vf={[V.PERSONAL_BOOK_SHARE_USER]:[V.PERSONAL_BOOK_USER],[V.HTML_EXPORT_USER]:[V.PERSONAL_BOOK_USER],[V.PDF_EXPORT_USER]:[V.PERSONAL_BOOK_USER],[V.KHUB_ADMIN]:[V.CONTENT_PUBLISHER],[V.ADMIN]:[V.KHUB_ADMIN,V.USERS_ADMIN,V.PORTAL_ADMIN,V.BEHAVIOR_DATA_USER],[V.GENERATIVE_AI_EXPORT_USER]:[V.GENERATIVE_AI_USER]};function $c(t,e){return t===e||(vf[t]??[]).some(o=>$c(o,e))}function Hc(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=>$c(n,e))}function Of(t){return`"${t}"`}function zc(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Ef(t,e){return new jt(t).serialize(e)}var $;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})($||($={}));var Cf=new Set(Object.values($));function Wc(t){return Cf.has(t)}var jt=class{constructor(e,o=20,n=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=o,this.allLanguagesAllowed=n,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,o){return this.serializeToCurrentPageIfPossible(e,o??"/search")}serializeToCurrentPageIfPossible(e,o){let n=o==null||o.trim().length===0,a=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${o}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,o=!1){var n,a,i,s,l,d,f,h,p,m,b;let g=new URLSearchParams;e.contentLocale?(!o||e.contentLocale!==this.defaultContentLocale)&&g.append($.LOCALE,e.contentLocale):g.append($.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&g.append($.QUERY,e.query);let O=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(x=>x.valueFilter&&!x.valueFilter.negative))!==null&&i!==void 0?i:[];if(O.length>0){let x=O.map(E=>{var R,k;let U=((k=(R=E.valueFilter)===null||R===void 0?void 0:R.values)!==null&&k!==void 0?k:[]).map(F=>this.escapeFilters(F)).map(F=>Of(zc(F))).join("_");return`${E.key}~${U}`}).join("*");g.append($.VALUE_FILTERS,x)}let C=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(x=>x.dateFilter))!==null&&l!==void 0?l:[];if(C.length>0){let x=C.map(E=>{var R;return`${E.key}~${(R=E.dateFilter)===null||R===void 0?void 0:R.type.toLowerCase()}`}).join("*");g.append($.DATE_FILTERS,x)}let w=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(x=>x.rangeFilter))!==null&&f!==void 0?f:[];if(w.length>0){let x=w.map(E=>{var R,k;return`${E.key}~${(R=E.rangeFilter)===null||R===void 0?void 0:R.from}_${(k=E.rangeFilter)===null||k===void 0?void 0:k.to}`}).join("*");g.append($.RANGE_FILTERS,x)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&g.append($.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&g.append($.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&g.append($.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((m=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&g.append($.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&g.append($.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let A=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let x in A)g.append(x,A[x]);let S=new Array;return g.forEach((x,E)=>{S.push(this.encodeQueryString(E)+"="+this.encodeQueryString(x))}),encodeURI(S.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var o;let n=e.split("?"),a=this.fromURLSearchParams(n.slice(1).join("?")),i=n[0].split("/search/")[1];return i==null?a:{...a,scope:(o=this.scopeMapping[i])!==null&&o!==void 0?o:a.scope}}fromURLSearchParams(e){var o,n,a,i,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),f=d.get($.LOCALE)==="all"?void 0:d.get($.LOCALE),h=((o=d.get($.VIRTUAL_FIELD))!==null&&o!==void 0?o:"EVERYWHERE").toUpperCase(),p=(n=d.get($.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(a=d.get($.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get($.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),g=d.get($.KEYWORD_MATCH),O=g?g.toUpperCase()===mt.MANDATORY?mt.MANDATORY:mt.OPTIONAL:void 0,C={};for(let w of d.keys())Wc(w)||(C[w]=d.get(w));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get($.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:_c(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Be(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:O,otherQueryParams:C}}parseCompatFilters(e){var o,n,a,i,s,l;let d=[];return e.has($.FILTERS)&&(d=this.parseValueFilters((o=e.get($.FILTERS))!==null&&o!==void 0?o:"")),(n=e.has($.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get($.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get($.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get($.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get($.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(o=>o.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],valueFilter:{values:o[1].split("_").map(zc).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],dateFilter:{type:Wt[o[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],rangeFilter:{from:o[1].split("_")[0],to:o[1].split("_")[1]}}))}escapeFilters(e){for(let[o,n,a]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}superEscapeFilters(e){for(let[o,n,a]of this.filtersEscapeMapping)e=e.replaceAll(n,a);return e}unescapeFilterValue(e){for(let[o,n,a]of this.filtersEscapeMapping)e=e.replace(a,o);return e}parseLegacyPeriodFilter(e){if(Pc(e))return[{key:"ft:lastEdition",dateFilter:{type:Wt[e]}}];if(e.startsWith("CUSTOM_")){let[o,n,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:a}}]}return[]}};var Ba={};M(Ba,{toFtFormComponent:()=>wf});var Ua=Symbol("elementInternals"),wf=K(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ua].form}constructor(...n){super(n),this[Ua]=this.attachInternals()}setFormValue(n){this[Ua].setFormValue(n)}}return e});var $a={};M($a,{DateFormatter:()=>yt});var yt=class{static format(e,o,n,a){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(e,o,n,a)}static getMomentDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var za={};M(za,{ALL_KEYS_VALUE:()=>Ha,SameWindowStorageEvent:()=>Gt});var Ha="__all__",Gt=class extends CustomEvent{constructor(e,o,n){super("same-window-storage",{detail:{key:e,oldValue:o,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ha}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new Gt(o[0],n,o[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new Gt(o[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,o){Reflect.apply(t,e,o),window.dispatchEvent(new Gt(Ha))}});var ja={};M(ja,{FocusMainContentEvent:()=>Wa});var Wa=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var jc={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Af(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function Rf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Af);document.addEventListener("click",Rf);var Gc=N`
|
|
48
|
+
`;var ws={};var ca={};M(ca,{ParametrizedLabelResolver:()=>Cr});var Cr=class t{constructor(e,o){this.defaultLabels=e,this.labels=o}resolve(e,...o){var n,a;e=this.resolvePluralKey(e,o);let i=(a=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...o)}static replaceParameters(e,...o){return o.forEach((n,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,o){for(let n of o)if(typeof n=="number"){let a=`${String(e)}[\\=${n}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,o){return e instanceof Date?t.formatDate(e,o):e??""}static formatDate(e,o){let n=a=>o?.includes("date")?e.toLocaleDateString(a):o?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return n(document.documentElement.lang)}catch{return n()}}};var La={};M(La,{FtCommandQueue:()=>wr,FtLitElementRedux:()=>ft,FtReduxStore:()=>qe,FtStateManager:()=>uo,ReduxWatcher:()=>lo,clearAllStores:()=>bf,isFtReduxStore:()=>Dt,redux:()=>Pe,reduxEventListener:()=>Nu,reduxReactive:()=>ku,watch:()=>ac,withRedux:()=>As});var ku=()=>(t,e)=>{var o;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(o=n.reduxReactiveProperties)===null||o===void 0||o.add(e)},Pe=t=>{let e=t??{};return(o,n)=>{var a;let i={hasChanged:Ie,attribute:!1,...e};T(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[n],store:e.store})}},Nu=t=>(e,o)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(o,t)};var wr=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))}};function Dt(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ar=Symbol("internalReduxEventsUnsubscribers"),We=Symbol("internalStoresUnsubscribers"),ut=Symbol("internalStores"),As=K(Symbol("withRedux"),function(t){var e,o,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[ut].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ut].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ut].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[ut].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[ut].delete(l)}setupStores(){this.unsubscribeFromStores(),this[ut].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let f=this.getStore(s.store);f&&(s.store?this[We].has(s.store):this[We].size>0)&&(this[l]=s.selector(f.getState(),this))}})}subscribeToStore(s,l){var d;this[We].set(s,l.subscribe(()=>this.updateFromStores())),this[Ar].set(s,[]),Dt(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||l.name===f.store)){let p=m=>this[h](m);l.addEventListener(f.eventName,p),this[Ar].get(s).push(()=>l.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[We].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[We].has(s)&&this[We].get(s)(),this[We].delete(s),(l=this[Ar].get(s))===null||l===void 0||l.forEach(d=>d()),this[Ar].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=We,o=ut,n=Ar,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ft=class extends As(G){};function de(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(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Le(t){return!!t&&!!t[j]}function me(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)===zu}(t)||Array.isArray(t)||!!t[ks]||!!(!((e=t.constructor)===null||e===void 0)&&e[ks])||ga(t)||ba(t))}function pt(t,e,o){o===void 0&&(o=!1),Bt(t)===0?(o?Object.keys:Ut)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Bt(t){var e=t[j];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ga(t)?2:ba(t)?3:0}function Mt(t,e){return Bt(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Fu(t,e){return Bt(t)===2?t.get(e):t[e]}function Ns(t,e,o){var n=Bt(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function Fs(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ga(t){return $u&&t instanceof Map}function ba(t){return Hu&&t instanceof Set}function je(t){return t.o||t.t}function xa(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Us(t);delete e[j];for(var o=Ut(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 va(t,e){return e===void 0&&(e=!1),Sa(t)||Le(t)||!me(t)||(Bt(t)>1&&(t.set=t.add=t.clear=t.delete=Du),Object.freeze(t),e&&pt(t,function(o,n){return va(n,!0)},!0)),t}function Du(){de(2)}function Sa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function we(t){var e=ya[t];return e||de(18,t),e}function Mu(t,e){ya[t]||(ya[t]=e)}function pa(){return Ir}function la(t,e){e&&(we("Patches"),t.u=[],t.s=[],t.v=e)}function no(t){ha(t),t.p.forEach(Uu),t.p=null}function ha(t){t===Ir&&(Ir=t.l)}function Rs(t){return Ir={p:[],l:Ir,h:t,m:!0,_:0}}function Uu(t){var e=t[j];e.i===0||e.i===1?e.j():e.g=!0}function da(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||we("ES5").S(e,t,n),n?(o[j].P&&(no(e),de(4)),me(t)&&(t=ao(e,t),e.l||io(e,t)),e.u&&we("Patches").M(o[j].t,t,e.u,e.s)):t=ao(e,o,[]),no(e),e.u&&e.v(e.u,e.s),t!==Ms?t:void 0}function ao(t,e,o){if(Sa(e))return e;var n=e[j];if(!n)return pt(e,function(l,d){return Is(t,n,e,l,d,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=xa(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),pt(i,function(l,d){return Is(t,n,a,l,d,o,s)}),io(t,a,!1),o&&t.u&&we("Patches").N(n,o,t.u,t.s)}return n.o}function Is(t,e,o,n,a,i,s){if(Le(a)){var l=ao(t,a,i&&e&&e.i!==3&&!Mt(e.R,n)?i.concat(n):void 0);if(Ns(o,n,l),!Le(l))return;t.m=!1}else s&&o.add(a);if(me(a)&&!Sa(a)){if(!t.h.D&&t._<1)return;ao(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&&va(e,o)}function ua(t,e){var o=t[j];return(o?je(o):t)[e]}function Ts(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 Ge(t){t.P||(t.P=!0,t.l&&Ge(t.l))}function fa(t){t.o||(t.o=xa(t.t))}function ma(t,e,o){var n=ga(e)?we("MapSet").F(e,o):ba(e)?we("MapSet").T(e,o):t.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:pa(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=l,f=Tr;s&&(d=[l],f=Rr);var h=Proxy.revocable(d,f),p=h.revoke,m=h.proxy;return l.k=m,l.j=p,m}(e,o):we("ES5").J(e,o);return(o?o.A:pa()).p.push(n),n}function Bu(t){return Le(t)||de(22,t),function e(o){if(!me(o))return o;var n,a=o[j],i=Bt(o);if(a){if(!a.P&&(a.i<4||!we("ES5").K(a)))return a.t;a.I=!0,n=_s(o,i),a.I=!1}else n=_s(o,i);return pt(n,function(s,l){a&&Fu(a.t,s)===l||Ns(n,s,e(l))}),i===3?new Set(n):n}(t)}function _s(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return xa(t)}function Ds(){function t(s,l){var d=i[s];return d?d.enumerable=l:i[s]=d={configurable:!0,enumerable:l,get:function(){var f=this[j];return Tr.get(f,s)},set:function(f){var h=this[j];Tr.set(h,s,f)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][j];if(!d.P)switch(d.i){case 5:n(d)&&Ge(d);break;case 4:o(d)&&Ge(d)}}}function o(s){for(var l=s.t,d=s.k,f=Ut(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==j){var m=l[p];if(m===void 0&&!Mt(l,p))return!0;var b=d[p],g=b&&b[j];if(g?g.t!==m:!Fs(b,m))return!0}}var O=!!l[j];return f.length!==Ut(l).length+(O?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var f=0;f<l.length;f++)if(!l.hasOwnProperty(f))return!0;return!1}function a(s){s.g&&de(3,JSON.stringify(je(s)))}var i={};Mu("ES5",{J:function(s,l){var d=Array.isArray(s),f=function(p,m){if(p){for(var b=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(b,""+g,t(g,!0));return b}var O=Us(m);delete O[j];for(var C=Ut(O),w=0;w<C.length;w++){var A=C[w];O[A]=t(A,p||!!O[A].enumerable)}return Object.create(Object.getPrototypeOf(m),O)}(d,s),h={i:d?5:4,A:l?l.A:pa(),P:!1,I:!1,R:{},l,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,j,{value:h,writable:!0}),f},S:function(s,l,d){d?Le(l)&&l[j].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[j];if(p){var m=p.t,b=p.k,g=p.R,O=p.i;if(O===4)pt(b,function(x){x!==j&&(m[x]!==void 0||Mt(m,x)?g[x]||f(b[x]):(g[x]=!0,Ge(p)))}),pt(m,function(x){b[x]!==void 0||Mt(b,x)||(g[x]=!1,Ge(p))});else if(O===5){if(n(p)&&(Ge(p),g.length=!0),b.length<m.length)for(var C=b.length;C<m.length;C++)g[C]=!1;else for(var w=m.length;w<b.length;w++)g[w]=!0;for(var A=Math.min(b.length,m.length),S=0;S<A;S++)b.hasOwnProperty(S)||(g[S]=!0),g[S]===void 0&&f(b[S])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Ps,Ir,Oa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$u=typeof Map<"u",Hu=typeof Set<"u",Ls=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ms=Oa?Symbol.for("immer-nothing"):((Ps={})["immer-nothing"]=!0,Ps),ks=Oa?Symbol.for("immer-draftable"):"__$immer_draftable",j=Oa?Symbol.for("immer-state"):"__$immer_state";var zu=""+Object.prototype.constructor,Ut=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Us=Object.getOwnPropertyDescriptors||function(t){var e={};return Ut(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ya={},Tr={get:function(t,e){if(e===j)return t;var o=je(t);if(!Mt(o,e))return function(a,i,s){var l,d=Ts(i,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!me(n)?n:n===ua(t.t,e)?(fa(t),t.o[e]=ma(t.A.h,n,t)):n},has:function(t,e){return e in je(t)},ownKeys:function(t){return Reflect.ownKeys(je(t))},set:function(t,e,o){var n=Ts(je(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=ua(je(t),e),i=a?.[j];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(Fs(o,a)&&(o!==void 0||Mt(t.t,e)))return!0;fa(t),Ge(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 ua(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,fa(t),Ge(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=je(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){de(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){de(12)}},Rr={};pt(Tr,function(t,e){Rr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Rr.deleteProperty=function(t,e){return Rr.set.call(this,t,e,void 0)},Rr.set=function(t,e,o){return Tr.set.call(this,t[0],e,o,t[0])};var Wu=function(){function t(o){var n=this;this.O=Ls,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var d=n;return function(O){var C=this;O===void 0&&(O=l);for(var w=arguments.length,A=Array(w>1?w-1:0),S=1;S<w;S++)A[S-1]=arguments[S];return d.produce(O,function(x){var E;return(E=i).call.apply(E,[C,x].concat(A))})}}var f;if(typeof i!="function"&&de(6),s!==void 0&&typeof s!="function"&&de(7),me(a)){var h=Rs(n),p=ma(n,a,void 0),m=!0;try{f=i(p),m=!1}finally{m?no(h):ha(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(O){return la(h,s),da(O,h)},function(O){throw no(h),O}):(la(h,s),da(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Ms&&(f=void 0),n.D&&va(f,!0),s){var b=[],g=[];we("Patches").M(a,f,b,g),s(b,g)}return f}de(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),m=1;m<h;m++)p[m-1]=arguments[m];return n.produceWithPatches(f,function(b){return a.apply(void 0,[b].concat(p))})};var s,l,d=n.produce(a,i,function(f,h){s=f,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,l]}):[d,s,l]},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){me(o)||de(8),Le(o)&&(o=Bu(o));var n=Rs(this),a=ma(this,o,void 0);return a[j].C=!0,ha(n),a},e.finishDraft=function(o,n){var a=o&&o[j],i=a.A;return la(i,n),da(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ls&&de(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 s=we("Patches").$;return Le(o)?s(o,n):this.produce(o,function(l){return s(l,n)})},t}(),ae=new Wu,ju=ae.produce,Ib=ae.produceWithPatches.bind(ae),Tb=ae.setAutoFreeze.bind(ae),_b=ae.setUseProxies.bind(ae),Pb=ae.applyPatches.bind(ae),Lb=ae.createDraft.bind(ae),kb=ae.finishDraft.bind(ae),so=ju;function ht(t){"@babel/helpers - typeof";return ht=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},ht(t)}function Bs(t,e){if(ht(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(ht(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $s(t){var e=Bs(t,"string");return ht(e)=="symbol"?e:e+""}function Hs(t,e,o){return(e=$s(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function zs(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 Ea(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?zs(Object(o),!0).forEach(function(n){Hs(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):zs(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function X(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 Ws=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ca=function(){return Math.random().toString(36).substring(7).split("").join(".")},co={INIT:"@@redux/INIT"+Ca(),REPLACE:"@@redux/REPLACE"+Ca(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ca()}};function Gu(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 wa(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(X(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(X(1));return o(wa)(t,e)}if(typeof t!="function")throw new Error(X(2));var a=t,i=e,s=[],l=s,d=!1;function f(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(X(3));return i}function p(O){if(typeof O!="function")throw new Error(X(4));if(d)throw new Error(X(5));var C=!0;return f(),l.push(O),function(){if(C){if(d)throw new Error(X(6));C=!1,f();var A=l.indexOf(O);l.splice(A,1),s=null}}}function m(O){if(!Gu(O))throw new Error(X(7));if(typeof O.type>"u")throw new Error(X(8));if(d)throw new Error(X(9));try{d=!0,i=a(i,O)}finally{d=!1}for(var C=s=l,w=0;w<C.length;w++){var A=C[w];A()}return O}function b(O){if(typeof O!="function")throw new Error(X(10));a=O,m({type:co.REPLACE})}function g(){var O,C=p;return O={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(X(11));function S(){A.next&&A.next(h())}S();var x=C(S);return{unsubscribe:x}}},O[Ws]=function(){return this},O}return m({type:co.INIT}),n={dispatch:m,subscribe:p,getState:h,replaceReducer:b},n[Ws]=g,n}function Vu(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:co.INIT});if(typeof n>"u")throw new Error(X(12));if(typeof o(void 0,{type:co.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(X(13))})}function js(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),s,l;try{Vu(o)}catch(d){l=d}return function(f,h){if(f===void 0&&(f={}),l)throw l;if(0)var p;for(var m=!1,b={},g=0;g<i.length;g++){var O=i[g],C=o[O],w=f[O],A=C(w,h);if(typeof A>"u"){var S=h&&h.type;throw new Error(X(14))}b[O]=A,m=m||A!==w}return m=m||i.length!==Object.keys(f).length,m?b:f}}function $t(){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 Gs(){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(X(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return i=$t.apply(void 0,l)(a.dispatch),Ea(Ea({},a),{},{dispatch:i})}}}function Vs(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var Ks=Vs();Ks.withExtraArgument=Vs;var Aa=Ks;var Js=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)}}(),Ku=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(h){return d([f,h])}}function d(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,a=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){o.label=f[1];break}if(f[0]===6&&o.label<i[1]){o.label=i[1],i=f;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(f);break}i[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(h){f=[6,h],a=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Ht=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},qu=Object.defineProperty,Zu=Object.defineProperties,Yu=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,Qu=Object.prototype.hasOwnProperty,Ju=Object.prototype.propertyIsEnumerable,Zs=function(t,e,o){return e in t?qu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ve=function(t,e){for(var o in e||(e={}))Qu.call(e,o)&&Zs(t,o,e[o]);if(qs)for(var n=0,a=qs(e);n<a.length;n++){var o=a[n];Ju.call(e,o)&&Zs(t,o,e[o])}return t},Ra=function(t,e){return Zu(t,Yu(e))},Xu=function(t,e,o){return new Promise(function(n,a){var i=function(d){try{l(o.next(d))}catch(f){a(f)}},s=function(d){try{l(o.throw(d))}catch(f){a(f)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,s)};l((o=o.apply(t,e)).next())})};var ef=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$t:$t.apply(null,arguments)},Qb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function tf(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 rf=function(t){Js(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,Ht([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ht([void 0],o.concat(this))))},e}(Array),of=function(t){Js(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,Ht([void 0],o[0].concat(this)))):new(e.bind.apply(e,Ht([void 0],o.concat(this))))},e}(Array);function _a(t){return me(t)?so(t,function(){}):t}function nf(t){return typeof t=="boolean"}function af(){return function(e){return sf(e)}}function sf(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,s=i===void 0?!0:i,l=new rf;if(o&&(nf(o)?l.push(Aa):l.push(Aa.withExtraArgument(o.extraArgument))),0){if(a)var d;if(s)var f}return l}var Ia=!0;function Xs(t){var e=af(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?e():i,l=o.devTools,d=l===void 0?!0:l,f=o.preloadedState,h=f===void 0?void 0:f,p=o.enhancers,m=p===void 0?void 0:p,b;if(typeof a=="function")b=a;else if(tf(a))b=js(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=s;if(typeof g=="function"&&(g=g(e),!Ia&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ia&&g.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var O=Gs.apply(void 0,g),C=$t;d&&(C=ef(Ve({trace:!Ia},typeof d=="object"&&d)));var w=new of(O),A=w;Array.isArray(m)?A=Ht([O],m):typeof m=="function"&&(A=m(w));var S=C.apply(void 0,A);return wa(b,h,S)}function Ke(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 Ve(Ve({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 ec(t){var e={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function cf(t){return typeof t=="function"}function lf(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?ec(e):[e,o,n],i=a[0],s=a[1],l=a[2],d;if(cf(t))d=function(){return _a(t())};else{var f=_a(t);d=function(){return f}}function h(p,m){p===void 0&&(p=d());var b=Ht([i[m.type]],s.filter(function(g){var O=g.matcher;return O(m)}).map(function(g){var O=g.reducer;return O}));return b.filter(function(g){return!!g}).length===0&&(b=[l]),b.reduce(function(g,O){if(O)if(Le(g)){var C=g,w=O(C,m);return w===void 0?g:w}else{if(me(g))return so(g,function(A){return O(A,m)});var w=O(g,m);if(w===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return g},p)}return h.getInitialState=d,h}function df(t,e){return t+"/"+e}function tc(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:_a(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var p=n[h],m=df(e,h),b,g;"reducer"in p?(b=p.reducer,g=p.prepare):b=p,i[h]=b,s[m]=b,l[h]=g?Ke(m,g):Ke(m)});function d(){var h=typeof t.extraReducers=="function"?ec(t.extraReducers):[t.extraReducers],p=h[0],m=p===void 0?{}:p,b=h[1],g=b===void 0?[]:b,O=h[2],C=O===void 0?void 0:O,w=Ve(Ve({},m),s);return lf(o,function(A){for(var S in w)A.addCase(S,w[S]);for(var x=0,E=g;x<E.length;x++){var R=E[x];A.addMatcher(R.matcher,R.reducer)}C&&A.addDefaultCase(C)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:l,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var uf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ff=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=uf[Math.random()*64|0];return e},pf=["name","message","stack","code"],Ta=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ys=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),hf=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=pf;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},tx=function(){function t(e,o,n){var a=Ke(e+"/fulfilled",function(h,p,m,b){return{payload:h,meta:Ra(Ve({},b||{}),{arg:m,requestId:p,requestStatus:"fulfilled"})}}),i=Ke(e+"/pending",function(h,p,m){return{payload:void 0,meta:Ra(Ve({},m||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=Ke(e+"/rejected",function(h,p,m,b,g){return{payload:b,error:(n&&n.serializeError||hf)(h||"Rejected"),meta:Ra(Ve({},g||{}),{arg:m,requestId:p,rejectedWithValue:!!b,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(p,m,b){var g=n?.idGenerator?n.idGenerator(h):ff(),O=new d,C,w=!1;function A(x){C=x,O.abort()}var S=function(){return Xu(this,null,function(){var x,E,R,k,U,F,P;return Ku(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),k=(x=n?.condition)==null?void 0:x.call(n,h,{getState:m,extra:b}),yf(k)?[4,k]:[3,2];case 1:k=y.sent(),y.label=2;case 2:if(k===!1||O.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,U=new Promise(function(v,I){return O.signal.addEventListener("abort",function(){return I({name:"AbortError",message:C||"Aborted"})})}),p(i(g,h,(E=n?.getPendingMeta)==null?void 0:E.call(n,{requestId:g,arg:h},{getState:m,extra:b}))),[4,Promise.race([U,Promise.resolve(o(h,{dispatch:p,getState:m,extra:b,requestId:g,signal:O.signal,abort:A,rejectWithValue:function(v,I){return new Ta(v,I)},fulfillWithValue:function(v,I){return new Ys(v,I)}})).then(function(v){if(v instanceof Ta)throw v;return v instanceof Ys?a(v.payload,g,h,v.meta):a(v,g,h)})])];case 3:return R=y.sent(),[3,5];case 4:return F=y.sent(),R=F instanceof Ta?s(null,g,h,F.payload,F.meta):s(F,g,h),[3,5];case 5:return P=n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition,P||p(R),[2,R]}})})}();return Object.assign(S,{abort:A,requestId:g,arg:h,unwrap:function(){return S.then(mf)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function mf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function yf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var rc="listener",oc="completed",nc="cancelled",rx="task-"+nc,ox="task-"+oc,nx=rc+"-"+nc,ax=rc+"-"+oc;var Pa="listenerMiddleware";var ix=Ke(Pa+"/add"),sx=Ke(Pa+"/removeAll"),cx=Ke(Pa+"/remove");var Qs,lx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Qs||(Qs=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},gf=function(t){return function(e){setTimeout(e,t)}},dx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gf(10);Ds();window.ftReduxStores||(window.ftReduxStores={});var qe=class t extends Te{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(Dt(i))return i;if(a==null)return;let s=tc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Xs({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=rt(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new wr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}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()}};function bf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Dt(e)&&e.clear()}var lo=class{constructor(e,o,n){this.store=e,this.valueSelector=o,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),o=this.valueSelector(e);Ie(this.lastValue,o)&&(this.callback(o,e),this.lastValue=o)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function ac(t,e,o){return new lo(t,e,o).watch()}var uo=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var o;return(o=this.requestConsumers.get(e))!==null&&o!==void 0?o:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,o){for(let n of o)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Fa={};M(Fa,{scrollHelper:()=>xf});var ka,fo=new Map,Na=class{lock(e,o){if(o){let n=fo.get(o);if(n==null||n===e)return fo.set(o,e),o}}release(e,o){o&&fo.get(o)===e&&fo.delete(o)}findFirstScrollableParent(e){var o;let n,a;for(let i of nn(e)){let s=i,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&a==null&&(a=s)}return(o=n??a)!==null&&o!==void 0?o:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,o){var n,a;let i=0;for(;o&&o.offsetParent!==e.offsetParent;)i+=(n=o.offsetTop)!==null&&n!==void 0?n:0,o=o.offsetParent;return i+((a=o?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,o){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return o;default:return 0}}scrollIntoViewIfPossible(e,o){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let a=this.getAbsoluteScrollOffset(n,e),i=a-n.clientHeight+e.clientHeight,s=a,l=Be(0,(s-n.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(o?.position,l)*(i-s)+s;n.scrollTo({behavior:o?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(ka=window.FluidTopicsScrollHelper)!==null&&ka!==void 0?ka:new Na;var xf=window.FluidTopicsScrollHelper;var Ma={};M(Ma,{SearchPlaceConverter:()=>jt,SearchPlaceQueryParams:()=>$,isSearchPlaceQueryParams:()=>Wc,serializeRequest:()=>Ef});var Sf=Nl(sc(),1);var cc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(cc||(cc={}));var lc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(lc||(lc={}));var dc;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(dc||(dc={}));var uc;(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.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(uc||(uc={}));var fc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(fc||(fc={}));var pc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(pc||(pc={}));var hc;(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.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",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.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",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"})(hc||(hc={}));var mc;(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"})(mc||(mc={}));var yc;(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",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(yc||(yc={}));var gc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(gc||(gc={}));var bc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(bc||(bc={}));var xc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(xc||(xc={}));var vc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(vc||(vc={}));var Sc;(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"})(Sc||(Sc={}));var mt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(mt||(mt={}));var Oc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Oc||(Oc={}));var Ec;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ec||(Ec={}));var mo;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(mo||(mo={}));var _c=t=>Object.keys(mo).includes(t);var Cc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Cc||(Cc={}));var wc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(wc||(wc={}));var Ac;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ac||(Ac={}));var Wt;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Wt||(Wt={}));var Pc=t=>Object.keys(Wt).includes(t);var Rc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Rc||(Rc={}));var Da;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Da||(Da={}));var Ic;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ic||(Ic={}));var V;(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.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.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(V||(V={}));var ue;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ue||(ue={}));var Tc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Tc||(Tc={}));var Lc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Lc||(Lc={}));var kc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(kc||(kc={}));var Nc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Nc||(Nc={}));var Fc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Fc||(Fc={}));var Dc;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(Dc||(Dc={}));var Mc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Mc||(Mc={}));var Uc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Uc||(Uc={}));var Bc;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Bc||(Bc={}));var vf={[V.PERSONAL_BOOK_SHARE_USER]:[V.PERSONAL_BOOK_USER],[V.HTML_EXPORT_USER]:[V.PERSONAL_BOOK_USER],[V.PDF_EXPORT_USER]:[V.PERSONAL_BOOK_USER],[V.KHUB_ADMIN]:[V.CONTENT_PUBLISHER],[V.ADMIN]:[V.KHUB_ADMIN,V.USERS_ADMIN,V.PORTAL_ADMIN,V.BEHAVIOR_DATA_USER],[V.GENERATIVE_AI_EXPORT_USER]:[V.GENERATIVE_AI_USER]};function $c(t,e){return t===e||(vf[t]??[]).some(o=>$c(o,e))}function Hc(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=>$c(n,e))}function Of(t){return`"${t}"`}function zc(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Ef(t,e){return new jt(t).serialize(e)}var $;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})($||($={}));var Cf=new Set(Object.values($));function Wc(t){return Cf.has(t)}var jt=class{constructor(e,o=20,n=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=o,this.allLanguagesAllowed=n,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,o){return this.serializeToCurrentPageIfPossible(e,o??"/search")}serializeToCurrentPageIfPossible(e,o){let n=o==null||o.trim().length===0,a=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${o}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,o=!1){var n,a,i,s,l,d,f,h,p,m,b;let g=new URLSearchParams;e.contentLocale?(!o||e.contentLocale!==this.defaultContentLocale)&&g.append($.LOCALE,e.contentLocale):g.append($.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&g.append($.QUERY,e.query);let O=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(x=>x.valueFilter&&!x.valueFilter.negative))!==null&&i!==void 0?i:[];if(O.length>0){let x=O.map(E=>{var R,k;let U=((k=(R=E.valueFilter)===null||R===void 0?void 0:R.values)!==null&&k!==void 0?k:[]).map(F=>this.escapeFilters(F)).map(F=>Of(zc(F))).join("_");return`${E.key}~${U}`}).join("*");g.append($.VALUE_FILTERS,x)}let C=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(x=>x.dateFilter))!==null&&l!==void 0?l:[];if(C.length>0){let x=C.map(E=>{var R;return`${E.key}~${(R=E.dateFilter)===null||R===void 0?void 0:R.type.toLowerCase()}`}).join("*");g.append($.DATE_FILTERS,x)}let w=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(x=>x.rangeFilter))!==null&&f!==void 0?f:[];if(w.length>0){let x=w.map(E=>{var R,k;return`${E.key}~${(R=E.rangeFilter)===null||R===void 0?void 0:R.from}_${(k=E.rangeFilter)===null||k===void 0?void 0:k.to}`}).join("*");g.append($.RANGE_FILTERS,x)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&g.append($.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&g.append($.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&g.append($.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((m=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&g.append($.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&g.append($.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let A=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let x in A)g.append(x,A[x]);let S=new Array;return g.forEach((x,E)=>{S.push(this.encodeQueryString(E)+"="+this.encodeQueryString(x))}),encodeURI(S.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var o;let n=e.split("?"),a=this.fromURLSearchParams(n.slice(1).join("?")),i=n[0].split("/search/")[1];return i==null?a:{...a,scope:(o=this.scopeMapping[i])!==null&&o!==void 0?o:a.scope}}fromURLSearchParams(e){var o,n,a,i,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),f=d.get($.LOCALE)==="all"?void 0:d.get($.LOCALE),h=((o=d.get($.VIRTUAL_FIELD))!==null&&o!==void 0?o:"EVERYWHERE").toUpperCase(),p=(n=d.get($.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(a=d.get($.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get($.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),g=d.get($.KEYWORD_MATCH),O=g?g.toUpperCase()===mt.MANDATORY?mt.MANDATORY:mt.OPTIONAL:void 0,C={};for(let w of d.keys())Wc(w)||(C[w]=d.get(w));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get($.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:_c(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Be(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:O,otherQueryParams:C}}parseCompatFilters(e){var o,n,a,i,s,l;let d=[];return e.has($.FILTERS)&&(d=this.parseValueFilters((o=e.get($.FILTERS))!==null&&o!==void 0?o:"")),(n=e.has($.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get($.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get($.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get($.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get($.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(o=>o.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],valueFilter:{values:o[1].split("_").map(zc).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],dateFilter:{type:Wt[o[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(o=>({key:o[0],rangeFilter:{from:o[1].split("_")[0],to:o[1].split("_")[1]}}))}escapeFilters(e){for(let[o,n,a]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}superEscapeFilters(e){for(let[o,n,a]of this.filtersEscapeMapping)e=e.replaceAll(n,a);return e}unescapeFilterValue(e){for(let[o,n,a]of this.filtersEscapeMapping)e=e.replace(a,o);return e}parseLegacyPeriodFilter(e){if(Pc(e))return[{key:"ft:lastEdition",dateFilter:{type:Wt[e]}}];if(e.startsWith("CUSTOM_")){let[o,n,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:a}}]}return[]}};var Ba={};M(Ba,{toFtFormComponent:()=>wf});var Ua=Symbol("elementInternals"),wf=K(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ua].form}constructor(...n){super(n),this[Ua]=this.attachInternals()}setFormValue(n){this[Ua].setFormValue(n)}}return e});var $a={};M($a,{DateFormatter:()=>yt});var yt=class{static format(e,o,n,a,i){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,o,n,a,!!i)}static getMomentDateFormat(e,o,n){return n?"LT":e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?d:a?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var za={};M(za,{ALL_KEYS_VALUE:()=>Ha,SameWindowStorageEvent:()=>Gt});var Ha="__all__",Gt=class extends CustomEvent{constructor(e,o,n){super("same-window-storage",{detail:{key:e,oldValue:o,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ha}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new Gt(o[0],n,o[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,o){let n=e.getItem(o[0]);Reflect.apply(t,e,o),window.dispatchEvent(new Gt(o[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,o){Reflect.apply(t,e,o),window.dispatchEvent(new Gt(Ha))}});var ja={};M(ja,{FocusMainContentEvent:()=>Wa});var Wa=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var jc={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Af(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function Rf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Af);document.addEventListener("click",Rf);var Gc=N`
|
|
49
49
|
.sr-only {
|
|
50
50
|
position:absolute;
|
|
51
51
|
left:-10000px;
|
|
@@ -219,7 +219,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
219
219
|
</${Vt(this.element)}>
|
|
220
220
|
`:Kt`
|
|
221
221
|
<slot part="text" class="ftds-typography ftds-typography--${this.variant}"></slot>
|
|
222
|
-
`}};xt.styles=[...ul];fl([T()],xt.prototype,"element",void 0);fl([T()],xt.prototype,"variant",void 0);ve("ft-typography")(Ne);ve("ftds-typography")(xt);var Uf="ft-app-info",vt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};vt.eventName="authentication-change";var Bf={session:(t,e)=>{ne(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>_.dispatchEvent(new vt(e.payload)),0))}},_=qe.get({name:Uf,reducers:Bf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],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,authenticationRequired:!1}});var So=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},xS=K(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>yt.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return So([T({type:Boolean})],e.prototype,"useLongDateFormat",void 0),So([T({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),So([Pe({store:_.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),So([Pe({store:_.name})],e.prototype,"uiLocale",void 0),e});var St=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=_.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=_.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var Oo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var oe=class extends Oo{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new xe,this.cache=e?a.commonCache:new xe}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Eo=class extends oe{async listMySearches(){let{session:e}=_.getState();return Hc(e,V.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Co=class extends oe{async listMyBookmarks(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var wo=class extends oe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=_.getState().session;return!!e?.sessionAuthenticated}};var Ao=class extends oe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=_.getState().session;return!!e?.sessionAuthenticated}};var $f="ft-user-assets",Hf={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(ue).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:o,mapId:n,asset:a}=e.payload;ei(t,o,[...Xa(t,o),a]),pl(t,o,1,n),hl(t,a)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;ei(t,o,Xa(t,o).map(a=>a.id===n.id?n:a)),hl(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:a}=e.payload;ei(t,o,Xa(t,o).filter(i=>i.id!==a)),pl(t,o,-1,n)}},ml={[ue.SEARCHES]:"savedSearches",[ue.BOOKMARKS]:"bookmarks",[ue.BOOKS]:void 0,[ue.COLLECTIONS]:void 0},Xa=(t,e)=>{var o;let n=ml[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},ei=(t,e,o)=>{let n=ml[e];n&&(t[n]=o)},pl=(t,e,o,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+o),e===ue.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},hl=(t,e)=>{let o=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},ie=qe.get({name:$f,reducers:Hf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ue).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ti=class{constructor(e=new wo,o=new Ao){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Co,this.savedSearchesService=new Eo,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=_.getState();ne((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ie.actions.clearAssetCount(),ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ie.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ie.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&ie.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&ie.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(ie.getState().assetCounts.bookmarkByMap).length!==0;e===ue.BOOKMARKS&&o&&ie.actions.clearBookmarkCountByMap(),ie.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}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;ie.actions.bookmarks(o)}}},zf=new ti;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=zf);var ri=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ri;var yl,nr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Wf=Symbol("clearAfterUnitTest"),Ro=class extends Zr(oe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[yl]=()=>{this.defaultMessages={},this.cache=new xe,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=_.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};ne(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(),s=this.resolveContext(i);return new Cr((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).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)),o&&await this.notify(e)}catch(a){!(a instanceof Ue)&&o&&console.error(a)}return 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(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new nr({loadedContexts:e})),this.dispatchEvent(new nr({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new nr({loadedContexts:[e]})),this.dispatchEvent(new nr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>qr(0).then(()=>n()).catch(()=>null)))}};yl=Wf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ro{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ro{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ar=window.FluidTopicsI18nService,Io=window.FluidTopicsCustomI18nService;var oi=class{highlightHtml(e,o,n){aa(e,o,n)}};window.FluidTopicsHighlightHtmlService=new oi;var ni=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;if(e==null)return"";try{return yt.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new ni;var Ot=class{static get(e,o){var n,a;let i=_.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new jt(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ai=class{urlToSearchRequest(e){return Ot.get().parse(e)}searchRequestToUrl(e){return Ot.get().serialize(e)}};window.FluidTopicsUrlService=new ai;var Et=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Et.eventName="change";var ii=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},gl=new ii;var To=class t extends Te{static build(){return new t(window.history,gl,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),ne(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Et(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[f,s,l]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Et.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Et.eventName,e)}currentItem(){return rt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return rt(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return rt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=To.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var bl=N`
|
|
222
|
+
`}};xt.styles=[...ul];fl([T()],xt.prototype,"element",void 0);fl([T()],xt.prototype,"variant",void 0);ve("ft-typography")(Ne);ve("ftds-typography")(xt);var Uf="ft-app-info",vt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};vt.eventName="authentication-change";var Bf={session:(t,e)=>{ne(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>_.dispatchEvent(new vt(e.payload)),0))}},_=qe.get({name:Uf,reducers:Bf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],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,authenticationRequired:!1}});var So=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},xS=K(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>yt.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return So([T({type:Boolean})],e.prototype,"useLongDateFormat",void 0),So([T({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),So([Pe({store:_.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),So([Pe({store:_.name})],e.prototype,"uiLocale",void 0),e});var St=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=_.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=_.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var Oo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var oe=class extends Oo{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new xe,this.cache=e?a.commonCache:new xe}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Eo=class extends oe{async listMySearches(){let{session:e}=_.getState();return Hc(e,V.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Co=class extends oe{async listMyBookmarks(){let e=_.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var wo=class extends oe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=_.getState().session;return!!e?.sessionAuthenticated}};var Ao=class extends oe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=_.getState().session;return!!e?.sessionAuthenticated}};var $f="ft-user-assets",Hf={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(ue).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:o,mapId:n,asset:a}=e.payload;ei(t,o,[...Xa(t,o),a]),pl(t,o,1,n),hl(t,a)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;ei(t,o,Xa(t,o).map(a=>a.id===n.id?n:a)),hl(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:a}=e.payload;ei(t,o,Xa(t,o).filter(i=>i.id!==a)),pl(t,o,-1,n)}},ml={[ue.SEARCHES]:"savedSearches",[ue.BOOKMARKS]:"bookmarks",[ue.BOOKS]:void 0,[ue.COLLECTIONS]:void 0},Xa=(t,e)=>{var o;let n=ml[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},ei=(t,e,o)=>{let n=ml[e];n&&(t[n]=o)},pl=(t,e,o,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+o),e===ue.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},hl=(t,e)=>{let o=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},ie=qe.get({name:$f,reducers:Hf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ue).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ti=class{constructor(e=new wo,o=new Ao){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Co,this.savedSearchesService=new Eo,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=_.getState();ne((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ie.actions.clearAssetCount(),ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ie.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ie.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&ie.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&ie.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(ie.getState().assetCounts.bookmarkByMap).length!==0;e===ue.BOOKMARKS&&o&&ie.actions.clearBookmarkCountByMap(),ie.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}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;ie.actions.bookmarks(o)}}},zf=new ti;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=zf);var ri=class{addCommand(e,o=!1){_.commands.add(e,o)}consumeCommand(e){return _.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ri;var yl,nr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Wf=Symbol("clearAfterUnitTest"),Ro=class extends Zr(oe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[yl]=()=>{this.defaultMessages={},this.cache=new xe,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=_.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};ne(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(),s=this.resolveContext(i);return new Cr((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).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)),o&&await this.notify(e)}catch(a){!(a instanceof Ue)&&o&&console.error(a)}return 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(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new nr({loadedContexts:e})),this.dispatchEvent(new nr({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new nr({loadedContexts:[e]})),this.dispatchEvent(new nr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>qr(0).then(()=>n()).catch(()=>null)))}};yl=Wf;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ro{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ro{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ar=window.FluidTopicsI18nService,Io=window.FluidTopicsCustomI18nService;var oi=class{highlightHtml(e,o,n){aa(e,o,n)}};window.FluidTopicsHighlightHtmlService=new oi;var ni=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=_.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i,s;if(e==null)return"";try{return yt.format(e,(n=o?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new ni;var Ot=class{static get(e,o){var n,a;let i=_.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new jt(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ai=class{urlToSearchRequest(e){return Ot.get().parse(e)}searchRequestToUrl(e){return Ot.get().serialize(e)}};window.FluidTopicsUrlService=new ai;var Et=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Et.eventName="change";var ii=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},gl=new ii;var To=class t extends Te{static build(){return new t(window.history,gl,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),ne(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Et(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,l])=>{let d=o(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[f,s,l]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Et.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Et.eventName,e)}currentItem(){return rt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return rt(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return rt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=To.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var bl=N`
|
|
223
223
|
`;function xl(t,e){let{authenticationRequired:o,session:n}=_.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var q=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},W=class extends G{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",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=()=>St.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new xe,this.cleanSessionDebouncer=new $e,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return ee`
|
|
224
224
|
<slot></slot>
|
|
225
225
|
`}connectedCallback(){super.connectedCallback(),_.addEventListener(vt.eventName,this.reloadConfiguration)}disconnectedCallback(){_.addEventListener(vt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,a,i,s,l,d;super.update(e),e.has("baseUrl")&&(_.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&_.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&_.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&_.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&_.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&_.actions.noCustom(this.noCustom),e.has("editorMode")&&_.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&_.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&_.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>ar.addContext(f)),e.has("openExternalDocumentInNewTab")&&_.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&_.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&_.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(_.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),_.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),_.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&_.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&_.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}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())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>xl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};W.elementDefinitions={};W.styles=bl;q([T()],W.prototype,"baseUrl",void 0);q([T()],W.prototype,"apiIntegrationIdentifier",void 0);q([T()],W.prototype,"apiIntegrationAppVersion",void 0);q([T()],W.prototype,"uiLocale",void 0);q([Se(null)],W.prototype,"availableUiLocales",void 0);q([Se(null)],W.prototype,"metadataConfiguration",void 0);q([T({type:Boolean})],W.prototype,"editorMode",void 0);q([T({type:Boolean})],W.prototype,"noCustom",void 0);q([T({type:Boolean})],W.prototype,"openExternalDocumentInNewTab",void 0);q([T({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],W.prototype,"noCustomComponent",void 0);q([T({type:Boolean})],W.prototype,"withManualResources",void 0);q([T({type:Boolean})],W.prototype,"navigatorOnline",void 0);q([T({type:Boolean})],W.prototype,"forcedOffline",void 0);q([T({type:Object})],W.prototype,"apiProvider",void 0);q([T({type:Boolean})],W.prototype,"authenticationRequired",void 0);q([Se([])],W.prototype,"messageContexts",void 0);q([Se(void 0)],W.prototype,"session",void 0);q([Z()],W.prototype,"localesConfiguration",void 0);q([Z()],W.prototype,"availableContentLocales",void 0);ve("ft-app-context")(W);var _o=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Io:ar}constructor(e,o=!1){this.name=e,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var si=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[o,n]=e.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},vl=new si;var jf=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},Gf=Symbol("i18nAttributes"),Vf=Symbol("i18nListAttributes"),Ol=Symbol("i18nProperties"),Po=Symbol("i18nContexts"),Lr=Symbol("i18nUnsubs"),ko=K(Symbol("withI18n"),function(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?Io:ar}i18n(i){let{context:s,key:l,message:d}=i,{custom:f,args:h,argsProvider:p}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let m=h??(p?p(this):[]);return this.getI18nService(f).resolveMessage(s,l,...m)}return d}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(vl.isI18nKey(i)){let[l,d]=i.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,d)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let d=this,f=(h,p,m)=>m?.context&&m.key&&i(h,p,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(s=this[Gf])===null||s===void 0||s.forEach((h,p)=>d[p]=f(h,p,d[p])),(l=this[Vf])===null||l===void 0||l.forEach((h,p)=>{var m;return d[p]=(m=d[p])===null||m===void 0?void 0:m.map(b=>f(h,p,b))})}updateI18nProperties(i){var s;(s=this[Ol])===null||s===void 0||s.forEach((l,d)=>{i(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let d=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Po].set(d,{isCustomContext:l}),this[Lr].has(d)||this[Lr].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(i){return this[Po].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Po].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Lr].forEach(i=>i()),this[Lr].clear()}}return e=Po,o=Lr,jf([T({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Sl=class extends ko(G){},Lo=class extends ko(ft){};var El=N`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-results-spellcheck",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "Spellcheck component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.0.12",
|
|
23
23
|
"@fluid-topics/public-api": "1.0.117",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
|
|
27
27
|
}
|