@fluid-topics/ft-reader-feedback 1.2.73 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1659,7 +1659,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
1659
1659
  `;var Ni=m(R());var Hd=m(R());var Vc=m(B()),Je=m(Z()),bt=m(R());var zc=m(B());var Hc=zc.css`
1660
1660
  `;var ci=m(R()),Zp="ft-app-info",jn=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},qp={session:(t,e)=>{(0,ci.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new jn(e.payload)),0))}},T=ci.FtReduxStore.get({name:Zp,reducers:qp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var It=m(R());var Kn=m(R());var Er=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:i}=T.getState(),n=e??i;if(o&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,n,!0)}static await(e){return new Promise(o=>{let i=t.get(e);if(i)o(i);else{let n=T.subscribe(()=>{i=t.get(e),i&&(n(),o(i))})}})}};var wo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Er.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Er.await()}};var Tt=class extends wo{constructor(e=!0,o){var i;super(o);let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new Kn.CacheRegistry,this.cache=e?n.commonCache:new Kn.CacheRegistry}clearCache(){this.cache.clearAll()}};var Wc,Yp=Symbol("clearAfterUnitTest"),di=class extends Tt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Wc]=()=>{this.defaultMessages={},this.cache=new It.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.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 i;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...o};(0,It.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,i;return this.fetchContext(e),(i=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,o){let i=e.toLowerCase();return this.resolveContext(i)[o]}resolveMessage(e,o,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new It.ParametrizedLabelResolver((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(o,...i)}async fetchContext(e){let o=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(n){!(n instanceof It.CanceledPromiseError)&&o&&console.error(n)}return o&&await this.notify(e),i}subscribe(e,o){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(o),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,It.delay)(0).then(()=>o()).catch(()=>null)))}};Wc=Yp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends di{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends di{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Xr=window.FluidTopicsI18nService,pi=window.FluidTopicsCustomI18nService;var Ue=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},de=class extends bt.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Er.get(),this.messageContexts=[],this.cache=new bt.CacheRegistry,this.cleanSessionDebouncer=new bt.Debouncer}render(){return Vc.html`
1661
1661
  <slot></slot>
1662
- `}update(e){var o,i,n,a,s;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Xr.addContext(c)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};de.elementDefinitions={};de.styles=Hc;Ue([(0,Je.property)()],de.prototype,"baseUrl",void 0);Ue([(0,Je.property)()],de.prototype,"apiIntegrationIdentifier",void 0);Ue([(0,Je.property)()],de.prototype,"uiLocale",void 0);Ue([(0,bt.jsonProperty)(null)],de.prototype,"availableUiLocales",void 0);Ue([(0,bt.jsonProperty)(null)],de.prototype,"metadataConfiguration",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"editorMode",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"noCustom",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);Ue([(0,Je.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"withManualResources",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"navigatorOnline",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"forcedOffline",void 0);Ue([(0,Je.property)({type:Object})],de.prototype,"apiProvider",void 0);Ue([(0,bt.jsonProperty)([])],de.prototype,"messageContexts",void 0);Ue([(0,bt.jsonProperty)(void 0)],de.prototype,"session",void 0);Ue([(0,Je.state)()],de.prototype,"localesConfiguration",void 0);var Bu=m(Z());function Xp(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(i=o;i--!==0;)if(!ui(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!ui(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(n=a(t),o=n.length,o!==a(e).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=o;i--!==0;){let s=n[i];if(!ui(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ui(t,e){try{return Xp(t,e)}catch{return!1}}function fi(t,e){return!ui(t,e)}var Qp=m(Z(),1);var hi=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(i=>i.type===e);return o&&(this.queue=this.queue.filter(i=>i!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Qr=m(Z(),1);var Gc=m(Z(),1);function jc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Gc.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return o();try{return JSON.parse(i)}catch{return o()}},toAttribute:i=>JSON.stringify(i)},hasChanged:fi,...e??{}})}var gi=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,i)=>{this.resolvePromise=o,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(c){n(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Zc=m(B(),1);var yi=globalThis,Jp=yi.ShadowRoot&&(yi.ShadyCSS===void 0||yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F0=Symbol();var Kc=(t,e)=>{if(Jp)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let i=document.createElement("style"),n=yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i)}};var mi=class extends Zc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([n,a])=>e.registry.define(n,a)));let o={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(o);return Kc(i,e.elementStyles),i}};function qc(t,e,...o){var i;let n=t.querySelector(e);for(let a of o)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(a);return n}var Eo=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Jc,Yc=Symbol("constructorPrototype"),Xc=Symbol("constructorName"),ed=Symbol("exportpartsDebouncer"),Qc=Symbol("dynamicDependenciesLoaded"),Vt=class extends mi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Jc]=new gi(5),this[Xc]=this.constructor.name,this[Yc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xc]&&Object.setPrototypeOf(this,this[Yc])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[Qc]||(e[Qc]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let a=[...n??[],i];o=qc(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,i,n;if(((i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&i!==void 0&&i)&&this[ed].run(()=>{var n,a;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,i,n,a,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let b of(i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let x=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],S=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(C=>C.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...S).filter(u).map(C=>C.trim()).forEach(C=>h.add(C))}if(h.size===0){this.removeAttribute("exportparts");return}let g=[...h.values()].flatMap(b=>p.map(x=>`${b}:${x}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};Jc=ed;Eo([(0,Qr.property)()],Vt.prototype,"exportpartsPrefix",void 0);Eo([jc([])],Vt.prototype,"exportpartsPrefixes",void 0);Eo([(0,Qr.property)()],Vt.prototype,"customStylesheet",void 0);Eo([(0,Qr.property)()],Vt.prototype,"elementToFocus",void 0);Eo([(0,Qr.state)()],Vt.prototype,"useAdoptedStyleSheets",void 0);function Ao(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var td,rd,od,Ro=Symbol("internalReduxEventsUnsubscribers"),or=Symbol("internalStoresUnsubscribers"),Ar=Symbol("internalStores"),To=class extends Vt{constructor(){super(...arguments),this[td]=new Map,this[rd]=new Map,this[od]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ar].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Ar].get(e)}addStore(e,o){var i;o=(i=o??(Ao(e)?e.name:void 0))!==null&&i!==void 0?i:"default-store",this.unsubscribeFromStore(o),this[Ar].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Ar].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ar].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let i=this.constructor.getPropertyOptions(o);if(!i?.attribute||!this.hasAttribute(typeof i?.attribute=="string"?i.attribute:o)){let n=this.getStore(e.store);n&&(e.store?this[or].has(e.store):this[or].size>0)&&(this[o]=e.selector(n.getState(),this))}})}subscribeToStore(e,o){var i;this[or].set(e,o.subscribe(()=>this.updateFromStores())),this[Ro].set(e,[]),Ao(o)&&o.eventBus&&((i=this.reduxConstructor.reduxEventListeners)===null||i===void 0||i.forEach((n,a)=>{if(typeof this[a]=="function"&&(!n.store||o.name===n.store)){let s=c=>this[a](c);o.addEventListener(n.eventName,s),this[Ro].get(e).push(()=>o.removeEventListener(n.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[or].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[or].has(e)&&this[or].get(e)(),this[or].delete(e),(o=this[Ro].get(e))===null||o===void 0||o.forEach(i=>i()),this[Ro].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};td=or,rd=Ar,od=Ro;To.reduxProperties=new Map;To.reduxReactiveProperties=new Set;To.reduxEventListeners=new Map;function dt(t){for(var e=arguments.length,o=Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];if(0)var n,a;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 Gt(t){return!!t&&!!t[ae]}function xt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var i=Object.getPrototypeOf(o);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===su}(t)||Array.isArray(t)||!!t[dd]||!!(!((e=t.constructor)===null||e===void 0)&&e[dd])||ra(t)||oa(t))}function Rr(t,e,o){o===void 0&&(o=!1),to(t)===0?(o?Object.keys:eo)(t).forEach(function(i){o&&typeof i=="symbol"||e(i,t[i],t)}):t.forEach(function(i,n){return e(n,i,t)})}function to(t){var e=t[ae];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ra(t)?2:oa(t)?3:0}function Jr(t,e){return to(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function eu(t,e){return to(t)===2?t.get(e):t[e]}function pd(t,e,o){var i=to(t);i===2?t.set(e,o):i===3?t.add(o):t[e]=o}function ud(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ra(t){return nu&&t instanceof Map}function oa(t){return au&&t instanceof Set}function ir(t){return t.o||t.t}function ia(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=gd(t);delete e[ae];for(var o=eo(e),i=0;i<o.length;i++){var n=o[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function na(t,e){return e===void 0&&(e=!1),aa(t)||Gt(t)||!xt(t)||(to(t)>1&&(t.set=t.add=t.clear=t.delete=tu),Object.freeze(t),e&&Rr(t,function(o,i){return na(i,!0)},!0)),t}function tu(){dt(2)}function aa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _t(t){var e=ta[t];return e||dt(18,t),e}function ru(t,e){ta[t]||(ta[t]=e)}function Qn(){return _o}function Zn(t,e){e&&(_t("Patches"),t.u=[],t.s=[],t.v=e)}function bi(t){Jn(t),t.p.forEach(ou),t.p=null}function Jn(t){t===_o&&(_o=t.l)}function id(t){return _o={p:[],l:_o,h:t,m:!0,_:0}}function ou(t){var e=t[ae];e.i===0||e.i===1?e.j():e.g=!0}function qn(t,e){e._=e.p.length;var o=e.p[0],i=t!==void 0&&t!==o;return e.h.O||_t("ES5").S(e,t,i),i?(o[ae].P&&(bi(e),dt(4)),xt(t)&&(t=xi(e,t),e.l||vi(e,t)),e.u&&_t("Patches").M(o[ae].t,t,e.u,e.s)):t=xi(e,o,[]),bi(e),e.u&&e.v(e.u,e.s),t!==hd?t:void 0}function xi(t,e,o){if(aa(e))return e;var i=e[ae];if(!i)return Rr(e,function(c,u){return nd(t,i,e,c,u,o)},!0),e;if(i.A!==t)return e;if(!i.P)return vi(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=ia(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),Rr(a,function(c,u){return nd(t,i,n,c,u,o,s)}),vi(t,n,!1),o&&t.u&&_t("Patches").N(i,o,t.u,t.s)}return i.o}function nd(t,e,o,i,n,a,s){if(Gt(n)){var c=xi(t,n,a&&e&&e.i!==3&&!Jr(e.R,i)?a.concat(i):void 0);if(pd(o,i,c),!Gt(c))return;t.m=!1}else s&&o.add(n);if(xt(n)&&!aa(n)){if(!t.h.D&&t._<1)return;xi(t,n),e&&e.A.l||vi(t,n)}}function vi(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&na(e,o)}function Yn(t,e){var o=t[ae];return(o?ir(o):t)[e]}function ad(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var i=Object.getOwnPropertyDescriptor(o,e);if(i)return i;o=Object.getPrototypeOf(o)}}function nr(t){t.P||(t.P=!0,t.l&&nr(t.l))}function Xn(t){t.o||(t.o=ia(t.t))}function ea(t,e,o){var i=ra(e)?_t("MapSet").F(e,o):oa(e)?_t("MapSet").T(e,o):t.O?function(n,a){var s=Array.isArray(n),c={i:s?1:0,A:a?a.A:Qn(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},u=c,p=No;s&&(u=[c],p=Io);var h=Proxy.revocable(u,p),g=h.revoke,b=h.proxy;return c.k=b,c.j=g,b}(e,o):_t("ES5").J(e,o);return(o?o.A:Qn()).p.push(i),i}function iu(t){return Gt(t)||dt(22,t),function e(o){if(!xt(o))return o;var i,n=o[ae],a=to(o);if(n){if(!n.P&&(n.i<4||!_t("ES5").K(n)))return n.t;n.I=!0,i=sd(o,a),n.I=!1}else i=sd(o,a);return Rr(i,function(s,c){n&&eu(n.t,s)===c||pd(i,s,e(c))}),a===3?new Set(i):i}(t)}function sd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ia(t)}function fd(){function t(s,c){var u=a[s];return u?u.enumerable=c:a[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[ae];return No.get(p,s)},set:function(p){var h=this[ae];No.set(h,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][ae];if(!u.P)switch(u.i){case 5:i(u)&&nr(u);break;case 4:o(u)&&nr(u)}}}function o(s){for(var c=s.t,u=s.k,p=eo(u),h=p.length-1;h>=0;h--){var g=p[h];if(g!==ae){var b=c[g];if(b===void 0&&!Jr(c,g))return!0;var x=u[g],S=x&&x[ae];if(S?S.t!==b:!ud(x,b))return!0}}var C=!!c[ae];return p.length!==eo(c).length+(C?0:1)}function i(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&dt(3,JSON.stringify(ir(s)))}var a={};ru("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(g,b){if(g){for(var x=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var C=gd(b);delete C[ae];for(var N=eo(C),I=0;I<N.length;I++){var _=N[I];C[_]=t(_,g||!!C[_].enumerable)}return Object.create(Object.getPrototypeOf(b),C)}(u,s),h={i:u?5:4,A:c?c.A:Qn(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,ae,{value:h,writable:!0}),p},S:function(s,c,u){u?Gt(c)&&c[ae].A===s&&e(s.p):(s.u&&function p(h){if(h&&typeof h=="object"){var g=h[ae];if(g){var b=g.t,x=g.k,S=g.R,C=g.i;if(C===4)Rr(x,function(H){H!==ae&&(b[H]!==void 0||Jr(b,H)?S[H]||p(x[H]):(S[H]=!0,nr(g)))}),Rr(b,function(H){x[H]!==void 0||Jr(x,H)||(S[H]=!1,nr(g))});else if(C===5){if(i(g)&&(nr(g),S.length=!0),x.length<b.length)for(var N=x.length;N<b.length;N++)S[N]=!1;else for(var I=b.length;I<x.length;I++)S[I]=!0;for(var _=Math.min(x.length,b.length),$=0;$<_;$++)x.hasOwnProperty($)||(S[$]=!0),S[$]===void 0&&p(x[$])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):i(s)}})}var ld,_o,sa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",nu=typeof Map<"u",au=typeof Set<"u",cd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hd=sa?Symbol.for("immer-nothing"):((ld={})["immer-nothing"]=!0,ld),dd=sa?Symbol.for("immer-draftable"):"__$immer_draftable",ae=sa?Symbol.for("immer-state"):"__$immer_state";var su=""+Object.prototype.constructor,eo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,gd=Object.getOwnPropertyDescriptors||function(t){var e={};return eo(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ta={},No={get:function(t,e){if(e===ae)return t;var o=ir(t);if(!Jr(o,e))return function(n,a,s){var c,u=ad(a,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(n.k):void 0}(t,o,e);var i=o[e];return t.I||!xt(i)?i:i===Yn(t.t,e)?(Xn(t),t.o[e]=ea(t.A.h,i,t)):i},has:function(t,e){return e in ir(t)},ownKeys:function(t){return Reflect.ownKeys(ir(t))},set:function(t,e,o){var i=ad(ir(t),e);if(i?.set)return i.set.call(t.k,o),!0;if(!t.P){var n=Yn(ir(t),e),a=n?.[ae];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(ud(o,n)&&(o!==void 0||Jr(t.t,e)))return!0;Xn(t),nr(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 Yn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Xn(t),nr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=ir(t),i=Reflect.getOwnPropertyDescriptor(o,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:o[e]}},defineProperty:function(){dt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){dt(12)}},Io={};Rr(No,function(t,e){Io[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Io.deleteProperty=function(t,e){return Io.set.call(this,t,e,void 0)},Io.set=function(t,e,o){return No.set.call(this,t[0],e,o,t[0])};var lu=function(){function t(o){var i=this;this.O=cd,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var c=a;a=n;var u=i;return function(C){var N=this;C===void 0&&(C=c);for(var I=arguments.length,_=Array(I>1?I-1:0),$=1;$<I;$++)_[$-1]=arguments[$];return u.produce(C,function(H){var W;return(W=a).call.apply(W,[N,H].concat(_))})}}var p;if(typeof a!="function"&&dt(6),s!==void 0&&typeof s!="function"&&dt(7),xt(n)){var h=id(i),g=ea(i,n,void 0),b=!0;try{p=a(g),b=!1}finally{b?bi(h):Jn(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return Zn(h,s),qn(C,h)},function(C){throw bi(h),C}):(Zn(h,s),qn(p,h))}if(!n||typeof n!="object"){if((p=a(n))===void 0&&(p=n),p===hd&&(p=void 0),i.D&&na(p,!0),s){var x=[],S=[];_t("Patches").M(n,p,x,S),s(x,S)}return p}dt(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(p){for(var h=arguments.length,g=Array(h>1?h-1:0),b=1;b<h;b++)g[b-1]=arguments[b];return i.produceWithPatches(p,function(x){return n.apply(void 0,[x].concat(g))})};var s,c,u=i.produce(n,a,function(p,h){s=p,c=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){xt(o)||dt(8),Gt(o)&&(o=iu(o));var i=id(this),n=ea(this,o,void 0);return n[ae].C=!0,Jn(i),n},e.finishDraft=function(o,i){var n=o&&o[ae],a=n.A;return Zn(a,i),qn(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!cd&&dt(20),this.O=o},e.applyPatches=function(o,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}n>-1&&(i=i.slice(n+1));var s=_t("Patches").$;return Gt(o)?s(o,i):this.produce(o,function(c){return s(c,i)})},t}(),it=new lu,cu=it.produce,J0=it.produceWithPatches.bind(it),eS=it.setAutoFreeze.bind(it),tS=it.setUseProxies.bind(it),rS=it.applyPatches.bind(it),oS=it.createDraft.bind(it),iS=it.finishDraft.bind(it),Si=cu;function Tr(t){"@babel/helpers - typeof";return Tr=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},Tr(t)}function yd(t,e){if(Tr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var i=o.call(t,e||"default");if(Tr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function md(t){var e=yd(t,"string");return Tr(e)=="symbol"?e:e+""}function bd(t,e,o){return(e=md(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function xd(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,i)}return o}function la(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?xd(Object(o),!0).forEach(function(i){bd(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xd(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function ze(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 vd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ca=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ci={INIT:"@@redux/INIT"+ca(),REPLACE:"@@redux/REPLACE"+ca(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ca()}};function du(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 da(t,e,o){var i;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ze(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ze(1));return o(da)(t,e)}if(typeof t!="function")throw new Error(ze(2));var n=t,a=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function h(){if(u)throw new Error(ze(3));return a}function g(C){if(typeof C!="function")throw new Error(ze(4));if(u)throw new Error(ze(5));var N=!0;return p(),c.push(C),function(){if(N){if(u)throw new Error(ze(6));N=!1,p();var _=c.indexOf(C);c.splice(_,1),s=null}}}function b(C){if(!du(C))throw new Error(ze(7));if(typeof C.type>"u")throw new Error(ze(8));if(u)throw new Error(ze(9));try{u=!0,a=n(a,C)}finally{u=!1}for(var N=s=c,I=0;I<N.length;I++){var _=N[I];_()}return C}function x(C){if(typeof C!="function")throw new Error(ze(10));n=C,b({type:Ci.REPLACE})}function S(){var C,N=g;return C={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(ze(11));function $(){_.next&&_.next(h())}$();var H=N($);return{unsubscribe:H}}},C[vd]=function(){return this},C}return b({type:Ci.INIT}),i={dispatch:b,subscribe:g,getState:h,replaceReducer:x},i[vd]=S,i}function pu(t){Object.keys(t).forEach(function(e){var o=t[e],i=o(void 0,{type:Ci.INIT});if(typeof i>"u")throw new Error(ze(12));if(typeof o(void 0,{type:Ci.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ze(13))})}function Sd(t){for(var e=Object.keys(t),o={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(o[n]=t[n])}var a=Object.keys(o),s,c;try{pu(o)}catch(u){c=u}return function(p,h){if(p===void 0&&(p={}),c)throw c;if(0)var g;for(var b=!1,x={},S=0;S<a.length;S++){var C=a[S],N=o[C],I=p[C],_=N(I,h);if(typeof _>"u"){var $=h&&h.type;throw new Error(ze(14))}x[C]=_,b=b||_!==I}return b=b||a.length!==Object.keys(p).length,b?x:p}}function ro(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Cd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(ze(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return a=ro.apply(void 0,c)(n.dispatch),la(la({},n),{},{dispatch:a})}}}function Od(t){var e=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(c){return typeof c=="function"?c(n,a,t):s(c)}}};return e}var wd=Od();wd.withExtraArgument=Od;var pa=wd;var Id=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function i(){this.constructor=e}e.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),uu=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(h){return u([p,h])}}function u(p){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=p[0]&2?n.return:p[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;switch(n=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,n=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(h){p=[6,h],n=0}finally{i=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},oo=function(t,e){for(var o=0,i=e.length,n=t.length;o<i;o++,n++)t[n]=e[o];return t},fu=Object.defineProperty,hu=Object.defineProperties,gu=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,mu=Object.prototype.propertyIsEnumerable,Ad=function(t,e,o){return e in t?fu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},ar=function(t,e){for(var o in e||(e={}))yu.call(e,o)&&Ad(t,o,e[o]);if(Ed)for(var i=0,n=Ed(e);i<n.length;i++){var o=n[i];mu.call(e,o)&&Ad(t,o,e[o])}return t},ua=function(t,e){return hu(t,gu(e))},bu=function(t,e,o){return new Promise(function(i,n){var a=function(u){try{c(o.next(u))}catch(p){n(p)}},s=function(u){try{c(o.throw(u))}catch(p){n(p)}},c=function(u){return u.done?i(u.value):Promise.resolve(u.value).then(a,s)};c((o=o.apply(t,e)).next())})};var xu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ro:ro.apply(null,arguments)},CS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function vu(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 Su=function(t){Id(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,oo([void 0],o[0].concat(this)))):new(e.bind.apply(e,oo([void 0],o.concat(this))))},e}(Array),Cu=function(t){Id(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,oo([void 0],o[0].concat(this)))):new(e.bind.apply(e,oo([void 0],o.concat(this))))},e}(Array);function ga(t){return xt(t)?Si(t,function(){}):t}function Ou(t){return typeof t=="boolean"}function wu(){return function(e){return Eu(e)}}function Eu(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,a=t.serializableCheck,s=a===void 0?!0:a,c=new Su;if(o&&(Ou(o)?c.push(pa):c.push(pa.withExtraArgument(o.extraArgument))),0){if(n)var u;if(s)var p}return c}var fa=!0;function _d(t){var e=wu(),o=t||{},i=o.reducer,n=i===void 0?void 0:i,a=o.middleware,s=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,h=p===void 0?void 0:p,g=o.enhancers,b=g===void 0?void 0:g,x;if(typeof n=="function")x=n;else if(vu(n))x=Sd(n);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 S=s;if(typeof S=="function"&&(S=S(e),!fa&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!fa&&S.some(function(H){return typeof H!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Cd.apply(void 0,S),N=ro;u&&(N=xu(ar({trace:!fa},typeof u=="object"&&u)));var I=new Cu(C),_=I;Array.isArray(b)?_=oo([C],b):typeof b=="function"&&(_=b(I));var $=N.apply(void 0,_);return da(x,h,$)}function sr(t,e){function o(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var a=e.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return ar(ar({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:i[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(i){return i.type===t},o}function Nd(t){var e={},o=[],i,n={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,n},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return t(n),[e,o,i]}function Au(t){return typeof t=="function"}function Ru(t,e,o,i){o===void 0&&(o=[]);var n=typeof e=="function"?Nd(e):[e,o,i],a=n[0],s=n[1],c=n[2],u;if(Au(t))u=function(){return ga(t())};else{var p=ga(t);u=function(){return p}}function h(g,b){g===void 0&&(g=u());var x=oo([a[b.type]],s.filter(function(S){var C=S.matcher;return C(b)}).map(function(S){var C=S.reducer;return C}));return x.filter(function(S){return!!S}).length===0&&(x=[c]),x.reduce(function(S,C){if(C)if(Gt(S)){var N=S,I=C(N,b);return I===void 0?S:I}else{if(xt(S))return Si(S,function(_){return C(_,b)});var I=C(S,b);if(I===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return S},g)}return h.getInitialState=u,h}function Tu(t,e){return t+"/"+e}function Ld(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:ga(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};n.forEach(function(h){var g=i[h],b=Tu(e,h),x,S;"reducer"in g?(x=g.reducer,S=g.prepare):x=g,a[h]=x,s[b]=x,c[h]=S?sr(b,S):sr(b)});function u(){var h=typeof t.extraReducers=="function"?Nd(t.extraReducers):[t.extraReducers],g=h[0],b=g===void 0?{}:g,x=h[1],S=x===void 0?[]:x,C=h[2],N=C===void 0?void 0:C,I=ar(ar({},b),s);return Ru(o,function(_){for(var $ in I)_.addCase($,I[$]);for(var H=0,W=S;H<W.length;H++){var Ze=W[H];_.addMatcher(Ze.matcher,Ze.reducer)}N&&_.addDefaultCase(N)})}var p;return{name:e,reducer:function(h,g){return p||(p=u()),p(h,g)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Iu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_u=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Iu[Math.random()*64|0];return e},Nu=["name","message","stack","code"],ha=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Rd=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Lu=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,i=Nu;o<i.length;o++){var n=i[o];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},AS=function(){function t(e,o,i){var n=sr(e+"/fulfilled",function(h,g,b,x){return{payload:h,meta:ua(ar({},x||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=sr(e+"/pending",function(h,g,b){return{payload:void 0,meta:ua(ar({},b||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=sr(e+"/rejected",function(h,g,b,x,S){return{payload:x,error:(i&&i.serializeError||Lu)(h||"Rejected"),meta:ua(ar({},S||{}),{arg:b,requestId:g,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!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(g,b,x){var S=i?.idGenerator?i.idGenerator(h):_u(),C=new u,N,I=!1;function _(H){N=H,C.abort()}var $=function(){return bu(this,null,function(){var H,W,Ze,Ct,Ve,Ot,Ie;return uu(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Ct=(H=i?.condition)==null?void 0:H.call(i,h,{getState:b,extra:x}),ku(Ct)?[4,Ct]:[3,2];case 1:Ct=y.sent(),y.label=2;case 2:if(Ct===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,Ve=new Promise(function(v,k){return C.signal.addEventListener("abort",function(){return k({name:"AbortError",message:N||"Aborted"})})}),g(a(S,h,(W=i?.getPendingMeta)==null?void 0:W.call(i,{requestId:S,arg:h},{getState:b,extra:x}))),[4,Promise.race([Ve,Promise.resolve(o(h,{dispatch:g,getState:b,extra:x,requestId:S,signal:C.signal,abort:_,rejectWithValue:function(v,k){return new ha(v,k)},fulfillWithValue:function(v,k){return new Rd(v,k)}})).then(function(v){if(v instanceof ha)throw v;return v instanceof Rd?n(v.payload,S,h,v.meta):n(v,S,h)})])];case 3:return Ze=y.sent(),[3,5];case 4:return Ot=y.sent(),Ze=Ot instanceof ha?s(null,S,h,Ot.payload,Ot.meta):s(Ot,S,h),[3,5];case 5:return Ie=i&&!i.dispatchConditionRejection&&s.match(Ze)&&Ze.meta.condition,Ie||g(Ze),[2,Ze]}})})}();return Object.assign($,{abort:_,requestId:S,arg:h,unwrap:function(){return $.then(Pu)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function Pu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ku(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Pd="listener",kd="completed",Dd="cancelled",RS="task-"+Dd,TS="task-"+kd,IS=Pd+"-"+Dd,_S=Pd+"-"+kd;var ya="listenerMiddleware";var NS=sr(ya+"/add"),LS=sr(ya+"/removeAll"),PS=sr(ya+"/remove");var Td,kS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Td||(Td=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Du=function(t){return function(e){setTimeout(e,t)}},DS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Du(10);fd();function $u(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,i,n){this.eventBus.addEventListener(o,i,n)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,i,n){this.eventBus.removeEventListener(o,i,n)}}}var Oi=class extends $u(Object){};window.ftReduxStores||(window.ftReduxStores={});var $d=class t extends Oi{static get(e){var o;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[i];if(Ao(a))return a;if(n==null)return;let s=Ld({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),c=_d({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[n.name]=new t(s,c,n.eventBus)}constructor(e,o,i){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new hi;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let u=s,p=a[u];return p?(...h)=>{let g=p(...h.map(n));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[u]:n(h)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Ri=m(R());var wi=class extends Tt{async listMySearches(){let{session:e}=T.getState();return Pt(e,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ei=class extends Tt{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Mu="ft-user-assets",Ai=Ri.FtReduxStore.get({name:Mu,initialState:{savedSearches:void 0,bookmarks:void 0}}),ma=class{constructor(){this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ei,this.savedSearchesService=new wi,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,Ri.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ai.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ai.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ai.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ai.actions.bookmarks(o)}}},Bd=new ma;var ba=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ba;var Md=m(R()),xa=class{highlightHtml(e,o,i){(0,Md.highlightHtml)(e,o,i)}};window.FluidTopicsHighlightHtmlService=new xa;var Fd=m(R());var va=class{isDate(e){var o,i,n,a;return(a=(n=((i=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(c=>c.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,o){var i,n,a;return Fd.DateFormatter.format(e,(i=o?.locale)!==null&&i!==void 0?i:T.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new va;var Ud=m(R());var Lo=class{static get(e,o){var i,n,a,s;let c=T.getState(),{lang:u,region:p}=(n=(i=c.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Ud.SearchPlaceConverter(c.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var Sa=class{urlToSearchRequest(e){return Lo.get().parse(e)}searchRequestToUrl(e){return Lo.get().serialize(e)}};window.FluidTopicsUrlService=new Sa;var lr=m(R());var Ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ir.eventName="change";var Ca=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))}},zd=new Ca;var Ti=class t extends lr.WithEventBus{static build(){return new t(window.history,zd,()=>window.location,!1)}constructor(e,o,i,n){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,o=!1){let i=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,lr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ir(this.currentItem())),0)}installProxies(){let e=o=>(i,n,[a,s,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};i.apply(n,[p,s,c]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e,o=!1){var i,n,a;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title},c=o?(n=e?.majorState)!==null&&n!==void 0?n:this.currentState.majorState:(a=this.currentState.majorState)!==null&&a!==void 0?a:e?.majorState;c!=null&&(s.majorState=c),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(Ir.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ir.eventName,e)}currentItem(){return(0,lr.deepCopy)(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,lr.deepCopy)(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return(0,lr.deepCopy)(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let o=e;do o--;while(o>0&&!this.hasState(o));return o}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var o,i;return this.hasState(e)&&((i=(o=this.states[e])===null||o===void 0?void 0:o.majorState)!==null&&i!==void 0?i:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ti.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,Hd.customElement)("ft-app-context")(de);var Kd=m(Z());var Fu=m(R());function Wd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var Uu=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Vd=Symbol("i18nAttributes"),Gd=Symbol("i18nListAttributes"),ko=Symbol("i18nProperties"),Ii=Symbol("i18nContexts"),Po=Symbol("i18nUnsubs");function cr(t){var e,o;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?pi:Xr}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let c=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...c)}customI18n(a,s){if(Wd(a)){let[c,u]=a.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,u)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let u=this,p=(h,g,b)=>b?.context&&b.key&&a(h,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,...h})}:b;(s=this[Vd])===null||s===void 0||s.forEach((h,g)=>u[g]=p(h,g,u[g])),(c=this[Gd])===null||c===void 0||c.forEach((h,g)=>{var b;return u[g]=(b=u[g])===null||b===void 0?void 0:b.map(x=>p(h,g,x))})}updateI18nProperties(a){var s;(s=this[ko])===null||s===void 0||s.forEach((c,u)=>{a(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let u=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[Ii].set(u,{isCustomContext:c}),this[Po].has(u)||this[Po].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(a){return this[Ii].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ii].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Po].forEach(a=>a()),this[Po].clear()}}return e=Ii,o=Po,Uu([(0,Kd.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}var jd=class extends cr(Ni.FtLitElement){},_i=class extends cr(Ni.FtLitElementRedux){};var Do=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},vt=class extends _i{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Li.nothing:Li.html`
1662
+ `}update(e){var o,i,n,a,s;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(c=>Xr.addContext(c)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),T.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};de.elementDefinitions={};de.styles=Hc;Ue([(0,Je.property)()],de.prototype,"baseUrl",void 0);Ue([(0,Je.property)()],de.prototype,"apiIntegrationIdentifier",void 0);Ue([(0,Je.property)()],de.prototype,"uiLocale",void 0);Ue([(0,bt.jsonProperty)(null)],de.prototype,"availableUiLocales",void 0);Ue([(0,bt.jsonProperty)(null)],de.prototype,"metadataConfiguration",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"editorMode",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"noCustom",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"openExternalDocumentInNewTab",void 0);Ue([(0,Je.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],de.prototype,"noCustomComponent",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"withManualResources",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"navigatorOnline",void 0);Ue([(0,Je.property)({type:Boolean})],de.prototype,"forcedOffline",void 0);Ue([(0,Je.property)({type:Object})],de.prototype,"apiProvider",void 0);Ue([(0,bt.jsonProperty)([])],de.prototype,"messageContexts",void 0);Ue([(0,bt.jsonProperty)(void 0)],de.prototype,"session",void 0);Ue([(0,Je.state)()],de.prototype,"localesConfiguration",void 0);var Bu=m(Z());function Xp(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(i=o;i--!==0;)if(!ui(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!ui(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(n=a(t),o=n.length,o!==a(e).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=o;i--!==0;){let s=n[i];if(!ui(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ui(t,e){try{return Xp(t,e)}catch{return!1}}function fi(t,e){return!ui(t,e)}var Qp=m(Z(),1);var hi=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(i=>i.type===e);return o&&(this.queue=this.queue.filter(i=>i!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var Qr=m(Z(),1);var Gc=m(Z(),1);function jc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Gc.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return o();try{return JSON.parse(i)}catch{return o()}},toAttribute:i=>JSON.stringify(i)},hasChanged:fi,...e??{}})}var gi=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,i)=>{this.resolvePromise=o,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of i)try{await s()}catch(c){n(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Zc=m(B(),1);var yi=globalThis,Jp=yi.ShadowRoot&&(yi.ShadyCSS===void 0||yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F0=Symbol();var Kc=(t,e)=>{if(Jp)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let i=document.createElement("style"),n=yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=o.cssText,t.appendChild(i)}};var mi=class extends Zc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([n,a])=>e.registry.define(n,a)));let o={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(o);return Kc(i,e.elementStyles),i}};function qc(t,e,...o){var i;let n=t.querySelector(e);for(let a of o)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(a);return n}var Eo=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Jc,Yc=Symbol("constructorPrototype"),Xc=Symbol("constructorName"),ed=Symbol("exportpartsDebouncer"),Qc=Symbol("dynamicDependenciesLoaded"),Vt=class extends mi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Jc]=new gi(5),this[Xc]=this.constructor.name,this[Yc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xc]&&Object.setPrototypeOf(this,this[Yc])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[Qc]||(e[Qc]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let a=[...n??[],i];o=qc(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,i,n;if(((i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&i!==void 0&&i)&&this[ed].run(()=>{var n,a;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,i,n,a,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.removeAttribute("exportparts");return}let h=new Set;for(let b of(i=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let x=(a=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&a!==void 0?a:[],S=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(C=>C.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...x,...S).filter(u).map(C=>C.trim()).forEach(C=>h.add(C))}if(h.size===0){this.removeAttribute("exportparts");return}let g=[...h.values()].flatMap(b=>p.map(x=>`${b}:${x}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};Jc=ed;Eo([(0,Qr.property)()],Vt.prototype,"exportpartsPrefix",void 0);Eo([jc([])],Vt.prototype,"exportpartsPrefixes",void 0);Eo([(0,Qr.property)()],Vt.prototype,"customStylesheet",void 0);Eo([(0,Qr.property)()],Vt.prototype,"elementToFocus",void 0);Eo([(0,Qr.state)()],Vt.prototype,"useAdoptedStyleSheets",void 0);function Ao(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var td,rd,od,Ro=Symbol("internalReduxEventsUnsubscribers"),or=Symbol("internalStoresUnsubscribers"),Ar=Symbol("internalStores"),To=class extends Vt{constructor(){super(...arguments),this[td]=new Map,this[rd]=new Map,this[od]=new Map}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ar].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Ar].get(e)}addStore(e,o){var i;o=(i=o??(Ao(e)?e.name:void 0))!==null&&i!==void 0?i:"default-store",this.unsubscribeFromStore(o),this[Ar].set(o,e),this.subscribeToStore(o,e),this.updateFromStores()}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Ar].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ar].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let i=this.constructor.getPropertyOptions(o);if(!i?.attribute||!this.hasAttribute(typeof i?.attribute=="string"?i.attribute:o)){let n=this.getStore(e.store);n&&(e.store?this[or].has(e.store):this[or].size>0)&&(this[o]=e.selector(n.getState(),this))}})}subscribeToStore(e,o){var i;this[or].set(e,o.subscribe(()=>this.updateFromStores())),this[Ro].set(e,[]),Ao(o)&&o.eventBus&&((i=this.reduxConstructor.reduxEventListeners)===null||i===void 0||i.forEach((n,a)=>{if(typeof this[a]=="function"&&(!n.store||o.name===n.store)){let s=c=>this[a](c);o.addEventListener(n.eventName,s),this[Ro].get(e).push(()=>o.removeEventListener(n.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[or].forEach((e,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(e){var o;this[or].has(e)&&this[or].get(e)(),this[or].delete(e),(o=this[Ro].get(e))===null||o===void 0||o.forEach(i=>i()),this[Ro].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};td=or,rd=Ar,od=Ro;To.reduxProperties=new Map;To.reduxReactiveProperties=new Set;To.reduxEventListeners=new Map;function dt(t){for(var e=arguments.length,o=Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];if(0)var n,a;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 Gt(t){return!!t&&!!t[ae]}function xt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var i=Object.getPrototypeOf(o);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===su}(t)||Array.isArray(t)||!!t[dd]||!!(!((e=t.constructor)===null||e===void 0)&&e[dd])||ra(t)||oa(t))}function Rr(t,e,o){o===void 0&&(o=!1),to(t)===0?(o?Object.keys:eo)(t).forEach(function(i){o&&typeof i=="symbol"||e(i,t[i],t)}):t.forEach(function(i,n){return e(n,i,t)})}function to(t){var e=t[ae];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ra(t)?2:oa(t)?3:0}function Jr(t,e){return to(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function eu(t,e){return to(t)===2?t.get(e):t[e]}function pd(t,e,o){var i=to(t);i===2?t.set(e,o):i===3?t.add(o):t[e]=o}function ud(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ra(t){return nu&&t instanceof Map}function oa(t){return au&&t instanceof Set}function ir(t){return t.o||t.t}function ia(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=gd(t);delete e[ae];for(var o=eo(e),i=0;i<o.length;i++){var n=o[i],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function na(t,e){return e===void 0&&(e=!1),aa(t)||Gt(t)||!xt(t)||(to(t)>1&&(t.set=t.add=t.clear=t.delete=tu),Object.freeze(t),e&&Rr(t,function(o,i){return na(i,!0)},!0)),t}function tu(){dt(2)}function aa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _t(t){var e=ta[t];return e||dt(18,t),e}function ru(t,e){ta[t]||(ta[t]=e)}function Qn(){return _o}function Zn(t,e){e&&(_t("Patches"),t.u=[],t.s=[],t.v=e)}function bi(t){Jn(t),t.p.forEach(ou),t.p=null}function Jn(t){t===_o&&(_o=t.l)}function id(t){return _o={p:[],l:_o,h:t,m:!0,_:0}}function ou(t){var e=t[ae];e.i===0||e.i===1?e.j():e.g=!0}function qn(t,e){e._=e.p.length;var o=e.p[0],i=t!==void 0&&t!==o;return e.h.O||_t("ES5").S(e,t,i),i?(o[ae].P&&(bi(e),dt(4)),xt(t)&&(t=xi(e,t),e.l||vi(e,t)),e.u&&_t("Patches").M(o[ae].t,t,e.u,e.s)):t=xi(e,o,[]),bi(e),e.u&&e.v(e.u,e.s),t!==hd?t:void 0}function xi(t,e,o){if(aa(e))return e;var i=e[ae];if(!i)return Rr(e,function(c,u){return nd(t,i,e,c,u,o)},!0),e;if(i.A!==t)return e;if(!i.P)return vi(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=ia(i.k):i.o,a=n,s=!1;i.i===3&&(a=new Set(n),n.clear(),s=!0),Rr(a,function(c,u){return nd(t,i,n,c,u,o,s)}),vi(t,n,!1),o&&t.u&&_t("Patches").N(i,o,t.u,t.s)}return i.o}function nd(t,e,o,i,n,a,s){if(Gt(n)){var c=xi(t,n,a&&e&&e.i!==3&&!Jr(e.R,i)?a.concat(i):void 0);if(pd(o,i,c),!Gt(c))return;t.m=!1}else s&&o.add(n);if(xt(n)&&!aa(n)){if(!t.h.D&&t._<1)return;xi(t,n),e&&e.A.l||vi(t,n)}}function vi(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&na(e,o)}function Yn(t,e){var o=t[ae];return(o?ir(o):t)[e]}function ad(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var i=Object.getOwnPropertyDescriptor(o,e);if(i)return i;o=Object.getPrototypeOf(o)}}function nr(t){t.P||(t.P=!0,t.l&&nr(t.l))}function Xn(t){t.o||(t.o=ia(t.t))}function ea(t,e,o){var i=ra(e)?_t("MapSet").F(e,o):oa(e)?_t("MapSet").T(e,o):t.O?function(n,a){var s=Array.isArray(n),c={i:s?1:0,A:a?a.A:Qn(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},u=c,p=No;s&&(u=[c],p=Io);var h=Proxy.revocable(u,p),g=h.revoke,b=h.proxy;return c.k=b,c.j=g,b}(e,o):_t("ES5").J(e,o);return(o?o.A:Qn()).p.push(i),i}function iu(t){return Gt(t)||dt(22,t),function e(o){if(!xt(o))return o;var i,n=o[ae],a=to(o);if(n){if(!n.P&&(n.i<4||!_t("ES5").K(n)))return n.t;n.I=!0,i=sd(o,a),n.I=!1}else i=sd(o,a);return Rr(i,function(s,c){n&&eu(n.t,s)===c||pd(i,s,e(c))}),a===3?new Set(i):i}(t)}function sd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ia(t)}function fd(){function t(s,c){var u=a[s];return u?u.enumerable=c:a[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[ae];return No.get(p,s)},set:function(p){var h=this[ae];No.set(h,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][ae];if(!u.P)switch(u.i){case 5:i(u)&&nr(u);break;case 4:o(u)&&nr(u)}}}function o(s){for(var c=s.t,u=s.k,p=eo(u),h=p.length-1;h>=0;h--){var g=p[h];if(g!==ae){var b=c[g];if(b===void 0&&!Jr(c,g))return!0;var x=u[g],S=x&&x[ae];if(S?S.t!==b:!ud(x,b))return!0}}var C=!!c[ae];return p.length!==eo(c).length+(C?0:1)}function i(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&dt(3,JSON.stringify(ir(s)))}var a={};ru("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(g,b){if(g){for(var x=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var C=gd(b);delete C[ae];for(var N=eo(C),I=0;I<N.length;I++){var _=N[I];C[_]=t(_,g||!!C[_].enumerable)}return Object.create(Object.getPrototypeOf(b),C)}(u,s),h={i:u?5:4,A:c?c.A:Qn(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,ae,{value:h,writable:!0}),p},S:function(s,c,u){u?Gt(c)&&c[ae].A===s&&e(s.p):(s.u&&function p(h){if(h&&typeof h=="object"){var g=h[ae];if(g){var b=g.t,x=g.k,S=g.R,C=g.i;if(C===4)Rr(x,function(H){H!==ae&&(b[H]!==void 0||Jr(b,H)?S[H]||p(x[H]):(S[H]=!0,nr(g)))}),Rr(b,function(H){x[H]!==void 0||Jr(x,H)||(S[H]=!1,nr(g))});else if(C===5){if(i(g)&&(nr(g),S.length=!0),x.length<b.length)for(var N=x.length;N<b.length;N++)S[N]=!1;else for(var I=b.length;I<x.length;I++)S[I]=!0;for(var _=Math.min(x.length,b.length),$=0;$<_;$++)x.hasOwnProperty($)||(S[$]=!0),S[$]===void 0&&p(x[$])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):i(s)}})}var ld,_o,sa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",nu=typeof Map<"u",au=typeof Set<"u",cd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hd=sa?Symbol.for("immer-nothing"):((ld={})["immer-nothing"]=!0,ld),dd=sa?Symbol.for("immer-draftable"):"__$immer_draftable",ae=sa?Symbol.for("immer-state"):"__$immer_state";var su=""+Object.prototype.constructor,eo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,gd=Object.getOwnPropertyDescriptors||function(t){var e={};return eo(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ta={},No={get:function(t,e){if(e===ae)return t;var o=ir(t);if(!Jr(o,e))return function(n,a,s){var c,u=ad(a,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(n.k):void 0}(t,o,e);var i=o[e];return t.I||!xt(i)?i:i===Yn(t.t,e)?(Xn(t),t.o[e]=ea(t.A.h,i,t)):i},has:function(t,e){return e in ir(t)},ownKeys:function(t){return Reflect.ownKeys(ir(t))},set:function(t,e,o){var i=ad(ir(t),e);if(i?.set)return i.set.call(t.k,o),!0;if(!t.P){var n=Yn(ir(t),e),a=n?.[ae];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(ud(o,n)&&(o!==void 0||Jr(t.t,e)))return!0;Xn(t),nr(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 Yn(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Xn(t),nr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=ir(t),i=Reflect.getOwnPropertyDescriptor(o,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:o[e]}},defineProperty:function(){dt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){dt(12)}},Io={};Rr(No,function(t,e){Io[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Io.deleteProperty=function(t,e){return Io.set.call(this,t,e,void 0)},Io.set=function(t,e,o){return No.set.call(this,t[0],e,o,t[0])};var lu=function(){function t(o){var i=this;this.O=cd,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var c=a;a=n;var u=i;return function(C){var N=this;C===void 0&&(C=c);for(var I=arguments.length,_=Array(I>1?I-1:0),$=1;$<I;$++)_[$-1]=arguments[$];return u.produce(C,function(H){var W;return(W=a).call.apply(W,[N,H].concat(_))})}}var p;if(typeof a!="function"&&dt(6),s!==void 0&&typeof s!="function"&&dt(7),xt(n)){var h=id(i),g=ea(i,n,void 0),b=!0;try{p=a(g),b=!1}finally{b?bi(h):Jn(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(C){return Zn(h,s),qn(C,h)},function(C){throw bi(h),C}):(Zn(h,s),qn(p,h))}if(!n||typeof n!="object"){if((p=a(n))===void 0&&(p=n),p===hd&&(p=void 0),i.D&&na(p,!0),s){var x=[],S=[];_t("Patches").M(n,p,x,S),s(x,S)}return p}dt(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(p){for(var h=arguments.length,g=Array(h>1?h-1:0),b=1;b<h;b++)g[b-1]=arguments[b];return i.produceWithPatches(p,function(x){return n.apply(void 0,[x].concat(g))})};var s,c,u=i.produce(n,a,function(p,h){s=p,c=h});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){xt(o)||dt(8),Gt(o)&&(o=iu(o));var i=id(this),n=ea(this,o,void 0);return n[ae].C=!0,Jn(i),n},e.finishDraft=function(o,i){var n=o&&o[ae],a=n.A;return Zn(a,i),qn(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!cd&&dt(20),this.O=o},e.applyPatches=function(o,i){var n;for(n=i.length-1;n>=0;n--){var a=i[n];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}n>-1&&(i=i.slice(n+1));var s=_t("Patches").$;return Gt(o)?s(o,i):this.produce(o,function(c){return s(c,i)})},t}(),it=new lu,cu=it.produce,J0=it.produceWithPatches.bind(it),eS=it.setAutoFreeze.bind(it),tS=it.setUseProxies.bind(it),rS=it.applyPatches.bind(it),oS=it.createDraft.bind(it),iS=it.finishDraft.bind(it),Si=cu;function Tr(t){"@babel/helpers - typeof";return Tr=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},Tr(t)}function yd(t,e){if(Tr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var i=o.call(t,e||"default");if(Tr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function md(t){var e=yd(t,"string");return Tr(e)=="symbol"?e:e+""}function bd(t,e,o){return(e=md(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function xd(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,i)}return o}function la(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?xd(Object(o),!0).forEach(function(i){bd(t,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xd(Object(o)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(o,i))})}return t}function ze(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 vd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ca=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ci={INIT:"@@redux/INIT"+ca(),REPLACE:"@@redux/REPLACE"+ca(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ca()}};function du(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 da(t,e,o){var i;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ze(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ze(1));return o(da)(t,e)}if(typeof t!="function")throw new Error(ze(2));var n=t,a=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function h(){if(u)throw new Error(ze(3));return a}function g(C){if(typeof C!="function")throw new Error(ze(4));if(u)throw new Error(ze(5));var N=!0;return p(),c.push(C),function(){if(N){if(u)throw new Error(ze(6));N=!1,p();var _=c.indexOf(C);c.splice(_,1),s=null}}}function b(C){if(!du(C))throw new Error(ze(7));if(typeof C.type>"u")throw new Error(ze(8));if(u)throw new Error(ze(9));try{u=!0,a=n(a,C)}finally{u=!1}for(var N=s=c,I=0;I<N.length;I++){var _=N[I];_()}return C}function x(C){if(typeof C!="function")throw new Error(ze(10));n=C,b({type:Ci.REPLACE})}function S(){var C,N=g;return C={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(ze(11));function $(){_.next&&_.next(h())}$();var H=N($);return{unsubscribe:H}}},C[vd]=function(){return this},C}return b({type:Ci.INIT}),i={dispatch:b,subscribe:g,getState:h,replaceReducer:x},i[vd]=S,i}function pu(t){Object.keys(t).forEach(function(e){var o=t[e],i=o(void 0,{type:Ci.INIT});if(typeof i>"u")throw new Error(ze(12));if(typeof o(void 0,{type:Ci.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ze(13))})}function Sd(t){for(var e=Object.keys(t),o={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(o[n]=t[n])}var a=Object.keys(o),s,c;try{pu(o)}catch(u){c=u}return function(p,h){if(p===void 0&&(p={}),c)throw c;if(0)var g;for(var b=!1,x={},S=0;S<a.length;S++){var C=a[S],N=o[C],I=p[C],_=N(I,h);if(typeof _>"u"){var $=h&&h.type;throw new Error(ze(14))}x[C]=_,b=b||_!==I}return b=b||a.length!==Object.keys(p).length,b?x:p}}function ro(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Cd(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(i){return function(){var n=i.apply(void 0,arguments),a=function(){throw new Error(ze(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return a=ro.apply(void 0,c)(n.dispatch),la(la({},n),{},{dispatch:a})}}}function Od(t){var e=function(i){var n=i.dispatch,a=i.getState;return function(s){return function(c){return typeof c=="function"?c(n,a,t):s(c)}}};return e}var wd=Od();wd.withExtraArgument=Od;var pa=wd;var Id=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function i(){this.constructor=e}e.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),uu=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(h){return u([p,h])}}function u(p){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=p[0]&2?n.return:p[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;switch(n=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,n=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){o.label=p[1];break}if(p[0]===6&&o.label<a[1]){o.label=a[1],a=p;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(p);break}a[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(h){p=[6,h],n=0}finally{i=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},oo=function(t,e){for(var o=0,i=e.length,n=t.length;o<i;o++,n++)t[n]=e[o];return t},fu=Object.defineProperty,hu=Object.defineProperties,gu=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,mu=Object.prototype.propertyIsEnumerable,Ad=function(t,e,o){return e in t?fu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},ar=function(t,e){for(var o in e||(e={}))yu.call(e,o)&&Ad(t,o,e[o]);if(Ed)for(var i=0,n=Ed(e);i<n.length;i++){var o=n[i];mu.call(e,o)&&Ad(t,o,e[o])}return t},ua=function(t,e){return hu(t,gu(e))},bu=function(t,e,o){return new Promise(function(i,n){var a=function(u){try{c(o.next(u))}catch(p){n(p)}},s=function(u){try{c(o.throw(u))}catch(p){n(p)}},c=function(u){return u.done?i(u.value):Promise.resolve(u.value).then(a,s)};c((o=o.apply(t,e)).next())})};var xu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ro:ro.apply(null,arguments)},CS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function vu(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 Su=function(t){Id(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,oo([void 0],o[0].concat(this)))):new(e.bind.apply(e,oo([void 0],o.concat(this))))},e}(Array),Cu=function(t){Id(e,t);function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var n=t.apply(this,o)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,oo([void 0],o[0].concat(this)))):new(e.bind.apply(e,oo([void 0],o.concat(this))))},e}(Array);function ga(t){return xt(t)?Si(t,function(){}):t}function Ou(t){return typeof t=="boolean"}function wu(){return function(e){return Eu(e)}}function Eu(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,a=t.serializableCheck,s=a===void 0?!0:a,c=new Su;if(o&&(Ou(o)?c.push(pa):c.push(pa.withExtraArgument(o.extraArgument))),0){if(n)var u;if(s)var p}return c}var fa=!0;function _d(t){var e=wu(),o=t||{},i=o.reducer,n=i===void 0?void 0:i,a=o.middleware,s=a===void 0?e():a,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,h=p===void 0?void 0:p,g=o.enhancers,b=g===void 0?void 0:g,x;if(typeof n=="function")x=n;else if(vu(n))x=Sd(n);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 S=s;if(typeof S=="function"&&(S=S(e),!fa&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!fa&&S.some(function(H){return typeof H!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Cd.apply(void 0,S),N=ro;u&&(N=xu(ar({trace:!fa},typeof u=="object"&&u)));var I=new Cu(C),_=I;Array.isArray(b)?_=oo([C],b):typeof b=="function"&&(_=b(I));var $=N.apply(void 0,_);return da(x,h,$)}function sr(t,e){function o(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var a=e.apply(void 0,i);if(!a)throw new Error("prepareAction did not return an object");return ar(ar({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:i[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(i){return i.type===t},o}function Nd(t){var e={},o=[],i,n={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,n},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return i=a,n}};return t(n),[e,o,i]}function Au(t){return typeof t=="function"}function Ru(t,e,o,i){o===void 0&&(o=[]);var n=typeof e=="function"?Nd(e):[e,o,i],a=n[0],s=n[1],c=n[2],u;if(Au(t))u=function(){return ga(t())};else{var p=ga(t);u=function(){return p}}function h(g,b){g===void 0&&(g=u());var x=oo([a[b.type]],s.filter(function(S){var C=S.matcher;return C(b)}).map(function(S){var C=S.reducer;return C}));return x.filter(function(S){return!!S}).length===0&&(x=[c]),x.reduce(function(S,C){if(C)if(Gt(S)){var N=S,I=C(N,b);return I===void 0?S:I}else{if(xt(S))return Si(S,function(_){return C(_,b)});var I=C(S,b);if(I===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return S},g)}return h.getInitialState=u,h}function Tu(t,e){return t+"/"+e}function Ld(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:ga(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};n.forEach(function(h){var g=i[h],b=Tu(e,h),x,S;"reducer"in g?(x=g.reducer,S=g.prepare):x=g,a[h]=x,s[b]=x,c[h]=S?sr(b,S):sr(b)});function u(){var h=typeof t.extraReducers=="function"?Nd(t.extraReducers):[t.extraReducers],g=h[0],b=g===void 0?{}:g,x=h[1],S=x===void 0?[]:x,C=h[2],N=C===void 0?void 0:C,I=ar(ar({},b),s);return Ru(o,function(_){for(var $ in I)_.addCase($,I[$]);for(var H=0,W=S;H<W.length;H++){var Ze=W[H];_.addMatcher(Ze.matcher,Ze.reducer)}N&&_.addDefaultCase(N)})}var p;return{name:e,reducer:function(h,g){return p||(p=u()),p(h,g)},actions:c,caseReducers:a,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var Iu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_u=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Iu[Math.random()*64|0];return e},Nu=["name","message","stack","code"],ha=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Rd=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Lu=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,i=Nu;o<i.length;o++){var n=i[o];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},AS=function(){function t(e,o,i){var n=sr(e+"/fulfilled",function(h,g,b,x){return{payload:h,meta:ua(ar({},x||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=sr(e+"/pending",function(h,g,b){return{payload:void 0,meta:ua(ar({},b||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=sr(e+"/rejected",function(h,g,b,x,S){return{payload:x,error:(i&&i.serializeError||Lu)(h||"Rejected"),meta:ua(ar({},S||{}),{arg:b,requestId:g,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!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(g,b,x){var S=i?.idGenerator?i.idGenerator(h):_u(),C=new u,N,I=!1;function _(H){N=H,C.abort()}var $=function(){return bu(this,null,function(){var H,W,Ze,Ct,Ve,Ot,Ie;return uu(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),Ct=(H=i?.condition)==null?void 0:H.call(i,h,{getState:b,extra:x}),ku(Ct)?[4,Ct]:[3,2];case 1:Ct=y.sent(),y.label=2;case 2:if(Ct===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,Ve=new Promise(function(v,k){return C.signal.addEventListener("abort",function(){return k({name:"AbortError",message:N||"Aborted"})})}),g(a(S,h,(W=i?.getPendingMeta)==null?void 0:W.call(i,{requestId:S,arg:h},{getState:b,extra:x}))),[4,Promise.race([Ve,Promise.resolve(o(h,{dispatch:g,getState:b,extra:x,requestId:S,signal:C.signal,abort:_,rejectWithValue:function(v,k){return new ha(v,k)},fulfillWithValue:function(v,k){return new Rd(v,k)}})).then(function(v){if(v instanceof ha)throw v;return v instanceof Rd?n(v.payload,S,h,v.meta):n(v,S,h)})])];case 3:return Ze=y.sent(),[3,5];case 4:return Ot=y.sent(),Ze=Ot instanceof ha?s(null,S,h,Ot.payload,Ot.meta):s(Ot,S,h),[3,5];case 5:return Ie=i&&!i.dispatchConditionRejection&&s.match(Ze)&&Ze.meta.condition,Ie||g(Ze),[2,Ze]}})})}();return Object.assign($,{abort:_,requestId:S,arg:h,unwrap:function(){return $.then(Pu)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function Pu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ku(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Pd="listener",kd="completed",Dd="cancelled",RS="task-"+Dd,TS="task-"+kd,IS=Pd+"-"+Dd,_S=Pd+"-"+kd;var ya="listenerMiddleware";var NS=sr(ya+"/add"),LS=sr(ya+"/removeAll"),PS=sr(ya+"/remove");var Td,kS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Td||(Td=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Du=function(t){return function(e){setTimeout(e,t)}},DS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Du(10);fd();function $u(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,i,n){this.eventBus.addEventListener(o,i,n)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,i,n){this.eventBus.removeEventListener(o,i,n)}}}var Oi=class extends $u(Object){};window.ftReduxStores||(window.ftReduxStores={});var $d=class t extends Oi{static get(e){var o;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[i];if(Ao(a))return a;if(n==null)return;let s=Ld({...n,reducers:(o=n.reducers)!==null&&o!==void 0?o:{}}),c=_d({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[n.name]=new t(s,c,n.eventBus)}constructor(e,o,i){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new hi;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let u=s,p=a[u];return p?(...h)=>{let g=p(...h.map(n));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[u]:n(h)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Ri=m(R());var wi=class extends Tt{async listMySearches(){let{session:e}=T.getState();return Pt(e,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ei=class extends Tt{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Mu="ft-user-assets",Ai=Ri.FtReduxStore.get({name:Mu,initialState:{savedSearches:void 0,bookmarks:void 0}}),ma=class{constructor(){this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ei,this.savedSearchesService=new wi,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,Ri.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ai.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ai.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ai.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ai.actions.bookmarks(o)}}},Bd=new ma;var ba=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ba;var Md=m(R()),xa=class{highlightHtml(e,o,i){(0,Md.highlightHtml)(e,o,i)}};window.FluidTopicsHighlightHtmlService=new xa;var Fd=m(R());var va=class{isDate(e){var o,i,n,a;return(a=(n=((i=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]).find(c=>c.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,o){var i,n,a;return Fd.DateFormatter.format(e,(i=o?.locale)!==null&&i!==void 0?i:T.getState().uiLocale,(n=o?.longFormat)!==null&&n!==void 0?n:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new va;var Ud=m(R());var Lo=class{static get(e,o){var i,n,a,s;let c=T.getState(),{lang:u,region:p}=(n=(i=c.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Ud.SearchPlaceConverter(c.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var Sa=class{urlToSearchRequest(e){return Lo.get().parse(e)}searchRequestToUrl(e){return Lo.get().serialize(e)}};window.FluidTopicsUrlService=new Sa;var lr=m(R());var Ir=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ir.eventName="change";var Ca=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))}},zd=new Ca;var Ti=class t extends lr.WithEventBus{static build(){return new t(window.history,zd,()=>window.location,!1)}constructor(e,o,i,n){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,o=!1){let i=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,lr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ir(this.currentItem())),0)}installProxies(){let e=o=>(i,n,[a,s,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...a,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};i.apply(n,[p,s,c]),this.setCurrentState(p,!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 i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(Ir.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ir.eventName,e)}currentItem(){return(0,lr.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,lr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,lr.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)this.hasState(a)&&(n=a),a++;return n}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 i;if(!this.hasState(e))return!1;let n=o??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ti.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});(0,Hd.customElement)("ft-app-context")(de);var Kd=m(Z());var Fu=m(R());function Wd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var Uu=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},Vd=Symbol("i18nAttributes"),Gd=Symbol("i18nListAttributes"),ko=Symbol("i18nProperties"),Ii=Symbol("i18nContexts"),Po=Symbol("i18nUnsubs");function cr(t){var e,o;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?pi:Xr}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let c=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...c)}customI18n(a,s){if(Wd(a)){let[c,u]=a.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,u)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let u=this,p=(h,g,b)=>b?.context&&b.key&&a(h,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,...h})}:b;(s=this[Vd])===null||s===void 0||s.forEach((h,g)=>u[g]=p(h,g,u[g])),(c=this[Gd])===null||c===void 0||c.forEach((h,g)=>{var b;return u[g]=(b=u[g])===null||b===void 0?void 0:b.map(x=>p(h,g,x))})}updateI18nProperties(a){var s;(s=this[ko])===null||s===void 0||s.forEach((c,u)=>{a(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let u=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[Ii].set(u,{isCustomContext:c}),this[Po].has(u)||this[Po].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(a){return this[Ii].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ii].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Po].forEach(a=>a()),this[Po].clear()}}return e=Ii,o=Po,Uu([(0,Kd.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}var jd=class extends cr(Ni.FtLitElement){},_i=class extends cr(Ni.FtLitElementRedux){};var Do=function(t,e,o,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,o):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(n<3?s(a):n>3?s(e,o,a):s(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a},vt=class extends _i{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Li.nothing:Li.html`
1663
1663
  <span class="ft-i18n">
1664
1664
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1665
1665
  </span>
@@ -1726,7 +1726,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
1726
1726
  `;var jd=L`
1727
1727
  `;var $f="ft-app-info",Ds=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Mf={session:(t,e)=>{Ke(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>M.dispatchEvent(new Ds(e.payload)),0))}},M=Nt.get({name:$f,reducers:Mf,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Er=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=M.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=M.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Ho=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Er.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Er.await()}};var yt=class extends Ho{constructor(e=!0,r){var i;super(r);let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new dt,this.cache=e?n.commonCache:new dt}clearCache(){this.cache.clearAll()}};var Gd,Ff=Symbol("clearAfterUnitTest"),Ei=class extends yt{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Gd]=()=>{this.defaultMessages={},this.cache=new dt,this.listeners={}},this.currentUiLocale=M.getState().uiLocale,M.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=M.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};Ke(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Io((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e))}catch(n){!(n instanceof Ot)&&r&&console.error(n)}return r&&await this.notify(e),i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>oi(0).then(()=>r()).catch(()=>null)))}};Gd=Ff;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ei{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ei{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var oo=window.FluidTopicsI18nService,wi=window.FluidTopicsCustomI18nService;var Be=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ge=class extends V{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Er.get(),this.messageContexts=[],this.cache=new dt,this.cleanSessionDebouncer=new he}render(){return N`
1728
1728
  <slot></slot>
1729
- `}update(e){var r,i,n,a,s;super.update(e),e.has("baseUrl")&&(M.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&M.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&M.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&M.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&M.actions.noCustom(this.noCustom),e.has("editorMode")&&M.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&M.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&M.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>oo.addContext(l)),e.has("openExternalDocumentInNewTab")&&M.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&M.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&M.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(M.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),M.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),M.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ge.elementDefinitions={};ge.styles=jd;Be([y()],ge.prototype,"baseUrl",void 0);Be([y()],ge.prototype,"apiIntegrationIdentifier",void 0);Be([y()],ge.prototype,"uiLocale",void 0);Be([pt(null)],ge.prototype,"availableUiLocales",void 0);Be([pt(null)],ge.prototype,"metadataConfiguration",void 0);Be([y({type:Boolean})],ge.prototype,"editorMode",void 0);Be([y({type:Boolean})],ge.prototype,"noCustom",void 0);Be([y({type:Boolean})],ge.prototype,"openExternalDocumentInNewTab",void 0);Be([y({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ge.prototype,"noCustomComponent",void 0);Be([y({type:Boolean})],ge.prototype,"withManualResources",void 0);Be([y({type:Boolean})],ge.prototype,"navigatorOnline",void 0);Be([y({type:Boolean})],ge.prototype,"forcedOffline",void 0);Be([y({type:Object})],ge.prototype,"apiProvider",void 0);Be([pt([])],ge.prototype,"messageContexts",void 0);Be([pt(void 0)],ge.prototype,"session",void 0);Be([W()],ge.prototype,"localesConfiguration",void 0);var Ri=class extends yt{async listMySearches(){let{session:e}=M.getState();return Pt(e,le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ai=class extends yt{async listMyBookmarks(){let e=M.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Bf="ft-user-assets",Ti=Nt.get({name:Bf,initialState:{savedSearches:void 0,bookmarks:void 0}}),$s=class{constructor(){this.currentSession=M.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ai,this.savedSearchesService=new Ri,M.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=M.getState();Ke((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ti.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ti.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ti.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ti.actions.bookmarks(r)}}},Kd=new $s;var Ms=class{addCommand(e,r=!1){M.commands.add(e,r)}consumeCommand(e){return M.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ms;var Fs=class{highlightHtml(e,r,i){ka(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Fs;var Bs=class{isDate(e){var r,i,n,a;return(a=(n=((i=(r=M.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var i,n,a;return Kr.format(e,(i=r?.locale)!==null&&i!==void 0?i:M.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Bs;var zo=class{static get(e,r){var i,n,a,s;let l=M.getState(),{lang:d,region:p}=(n=(i=l.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Gr(l.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,r??`${d}-${p}`)}};var Us=class{urlToSearchRequest(e){return zo.get().parse(e)}searchRequestToUrl(e){return zo.get().serialize(e)}};window.FluidTopicsUrlService=new Us;var wr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};wr.eventName="change";var Hs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Zd=new Hs;var _i=class t extends Ct{static build(){return new t(window.history,Zd,()=>window.location,!1)}constructor(e,r,i,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ke(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new wr(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};i.apply(n,[p,s,l]),this.setCurrentState(p,!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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e,r=!1){var i,n,a;let s={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title},l=r?(n=e?.majorState)!==null&&n!==void 0?n:this.currentState.majorState:(a=this.currentState.majorState)!==null&&a!==void 0?a:e?.majorState;l!=null&&(s.majorState=l),this.setCurrentState(s)}addHistoryChangeListener(e){this.addEventListener(wr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(wr.eventName,e)}currentItem(){return So(this.currentState)}back(){let e=this.previousMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return So(this.states[this.previousMajorPosition()])}previousMajorPosition(){let e=this.currentIndex;for(;e>0&&!this.isMajorState(e);)e--;return this.previousExistingPosition(e)}forward(){let e=this.nextMajorPosition();e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){return So(this.states[this.nextMajorPosition()])}nextMajorPosition(){let e=this.currentIndex;do e++;while(e<this.states.length&&!this.isMajorState(e));do e++;while(e<this.states.length&&!this.isMajorState(e));return this.previousExistingPosition(e)}previousExistingPosition(e){let r=e;do r--;while(r>0&&!this.hasState(r));return r}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isMajorState(e){var r,i;return this.hasState(e)&&((i=(r=this.states[e])===null||r===void 0?void 0:r.majorState)!==null&&i!==void 0?i:!0)}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=_i.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)});Z("ft-app-context")(ge);function qd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var Uf=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Yd=Symbol("i18nAttributes"),Xd=Symbol("i18nListAttributes"),Vo=Symbol("i18nProperties"),Ii=Symbol("i18nContexts"),Wo=Symbol("i18nUnsubs");function tr(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?wi:oo}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let l=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...l)}customI18n(a,s){if(qd(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&a(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,...h})}:m;(s=this[Yd])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Xd])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(v=>p(h,f,v))})}updateI18nProperties(a){var s;(s=this[Vo])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Ii].set(d,{isCustomContext:l}),this[Wo].has(d)||this[Wo].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Ii].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ii].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Wo].forEach(a=>a()),this[Wo].clear()}}return e=Ii,r=Wo,Uf([y({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}var Jd=class extends tr(V){},Ni=class extends tr(Xe){};var jo=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},st=class extends Ni{constructor(){super(),this.editorMode=!1,this.addStore(M)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":B:N`
1729
+ `}update(e){var r,i,n,a,s;super.update(e),e.has("baseUrl")&&(M.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&M.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&M.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&M.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&M.actions.noCustom(this.noCustom),e.has("editorMode")&&M.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&M.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&M.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(l=>oo.addContext(l)),e.has("openExternalDocumentInNewTab")&&M.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&M.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&M.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(M.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),M.actions.availableUiLocales((n=(i=this.localesConfiguration)===null||i===void 0?void 0:i.availableUiLocales)!==null&&n!==void 0?n:[]),M.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}};ge.elementDefinitions={};ge.styles=jd;Be([y()],ge.prototype,"baseUrl",void 0);Be([y()],ge.prototype,"apiIntegrationIdentifier",void 0);Be([y()],ge.prototype,"uiLocale",void 0);Be([pt(null)],ge.prototype,"availableUiLocales",void 0);Be([pt(null)],ge.prototype,"metadataConfiguration",void 0);Be([y({type:Boolean})],ge.prototype,"editorMode",void 0);Be([y({type:Boolean})],ge.prototype,"noCustom",void 0);Be([y({type:Boolean})],ge.prototype,"openExternalDocumentInNewTab",void 0);Be([y({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ge.prototype,"noCustomComponent",void 0);Be([y({type:Boolean})],ge.prototype,"withManualResources",void 0);Be([y({type:Boolean})],ge.prototype,"navigatorOnline",void 0);Be([y({type:Boolean})],ge.prototype,"forcedOffline",void 0);Be([y({type:Object})],ge.prototype,"apiProvider",void 0);Be([pt([])],ge.prototype,"messageContexts",void 0);Be([pt(void 0)],ge.prototype,"session",void 0);Be([W()],ge.prototype,"localesConfiguration",void 0);var Ri=class extends yt{async listMySearches(){let{session:e}=M.getState();return Pt(e,le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ai=class extends yt{async listMyBookmarks(){let e=M.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Bf="ft-user-assets",Ti=Nt.get({name:Bf,initialState:{savedSearches:void 0,bookmarks:void 0}}),$s=class{constructor(){this.currentSession=M.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ai,this.savedSearchesService=new Ri,M.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=M.getState();Ke((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ti.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ti.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ti.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ti.actions.bookmarks(r)}}},Kd=new $s;var Ms=class{addCommand(e,r=!1){M.commands.add(e,r)}consumeCommand(e){return M.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ms;var Fs=class{highlightHtml(e,r,i){ka(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Fs;var Bs=class{isDate(e){var r,i,n,a;return(a=(n=((i=(r=M.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var i,n,a;return Kr.format(e,(i=r?.locale)!==null&&i!==void 0?i:M.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Bs;var zo=class{static get(e,r){var i,n,a,s;let l=M.getState(),{lang:d,region:p}=(n=(i=l.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Gr(l.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,l.searchInAllLanguagesAllowed,r??`${d}-${p}`)}};var Us=class{urlToSearchRequest(e){return zo.get().parse(e)}searchRequestToUrl(e){return zo.get().serialize(e)}};window.FluidTopicsUrlService=new Us;var wr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};wr.eventName="change";var Hs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Zd=new Hs;var _i=class t extends Ct{static build(){return new t(window.history,Zd,()=>window.location,!1)}constructor(e,r,i,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ke(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new wr(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};i.apply(n,[p,s,l]),this.setCurrentState(p,!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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(wr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(wr.eventName,e)}currentItem(){return So(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 So(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 So(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 r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=_i.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)});Z("ft-app-context")(ge);function qd(t){return t.match(/^[\w-]+\.[\w-]+$/)}var Uf=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Yd=Symbol("i18nAttributes"),Xd=Symbol("i18nListAttributes"),Vo=Symbol("i18nProperties"),Ii=Symbol("i18nContexts"),Wo=Symbol("i18nUnsubs");function tr(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?wi:oo}i18n(a){var s;this.hasI18nContext(a.context)||this.addI18nContext(a.context,void 0,a.custom);let l=(s=a.args)!==null&&s!==void 0?s:a.argsProvider?a.argsProvider(this):[];return this.getI18nService(a.custom).resolveMessage(a.context,a.key,...l)}customI18n(a,s){if(qd(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&a(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,...h})}:m;(s=this[Yd])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Xd])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(v=>p(h,f,v))})}updateI18nProperties(a){var s;(s=this[Vo])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Ii].set(d,{isCustomContext:l}),this[Wo].has(d)||this[Wo].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Ii].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ii].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Wo].forEach(a=>a()),this[Wo].clear()}}return e=Ii,r=Wo,Uf([y({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}var Jd=class extends tr(V){},Ni=class extends tr(Xe){};var jo=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},st=class extends Ni{constructor(){super(),this.editorMode=!1,this.addStore(M)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":B:N`
1730
1730
  <span class="ft-i18n">
1731
1731
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1732
1732
  </span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-feedback",
3
- "version": "1.2.73",
3
+ "version": "1.3.0",
4
4
  "description": "Feedback forms for a map and its topics in an integrated reader",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,13 +19,13 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "1.2.73",
23
- "@fluid-topics/ft-reader-context": "1.2.73",
24
- "@fluid-topics/ft-wc-utils": "1.2.73",
22
+ "@fluid-topics/ft-app-context": "1.3.0",
23
+ "@fluid-topics/ft-reader-context": "1.3.0",
24
+ "@fluid-topics/ft-wc-utils": "1.3.0",
25
25
  "lit": "3.1.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluid-topics/public-api": "1.0.98"
29
29
  },
30
- "gitHead": "4f8924d376dd8e1fc58e1cde50904618bfe6ac1d"
30
+ "gitHead": "cc982effbf27c0483e03961ad450fd2057a108b2"
31
31
  }