@fluid-topics/ft-reader-page-title 1.3.12 → 1.3.14

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.
@@ -117,7 +117,7 @@ Also for action icons.`,a.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
117
117
  `}};ce.styles=[Qo,Jo,en,tn,rn,on,nn,an,cn,sn,ln,...dn];un([(0,gr.property)()],ce.prototype,"element",void 0);un([(0,gr.property)()],ce.prototype,"variant",void 0);(0,fn.customElement)("ft-typography")(ce);var ja=A(D());var Jn=A(Y()),z=A(X()),J=A(D());var hn=A(Y());var yn=hn.css`
118
118
  `;var vt=A(D()),gi="ft-app-info",Ae=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:t})}};Ae.eventName="authentication-change";var mi={session:(r,t)=>{(0,vt.deepEqual)(r.session,t.payload)||(r.session=t.payload,setTimeout(()=>O.dispatchEvent(new Ae(t.payload)),0))}},O=vt.FtReduxStore.get({name:gi,reducers:mi,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var mr=A(D());var we=class r{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=O.getState(),i=t??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(t){return new Promise(o=>{let n=r.get(t);if(n)o(n);else{let i=O.subscribe(()=>{n=r.get(t),n&&(i(),o(n))})}})}};var St=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:we.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):we.await()}};var Q=class extends St{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(c,l)=>typeof l!="object"||l==null||Array.isArray(l)?l:Object.fromEntries(Object.entries(l).sort(([d],[u])=>d.localeCompare(u)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new mr.CacheRegistry,this.cache=t?i.commonCache:new mr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Ot=class extends Q{async listMyBookmarks(){let t=O.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var br=class{addCommand(t,o=!1){O.commands.add(t,o)}consumeCommand(t){return O.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new br;var re=A(D());var gn,bi=Symbol("clearAfterUnitTest"),Ct=class extends Q{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[gn]=()=>{this.defaultMessages={},this.cache=new re.CacheRegistry,this.listeners={}},this.currentUiLocale=O.getState().uiLocale,O.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=O.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,re.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var i;let c=t.toLowerCase(),l=this.resolveContext(c);return new re.ParametrizedLabelResolver((i=this.defaultMessages[c])!==null&&i!==void 0?i:{},l).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(i){!(i instanceof re.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(t=>this.notify(t)))}async notify(t){this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,re.delay)(0).then(()=>o()).catch(()=>null)))}};gn=bi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ct{constructor(){super(async(r,t)=>(await this.awaitApi).getFluidTopicsMessageContext(r,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ct{constructor(){super(async(r,t)=>(await this.awaitApi).getCustomMessageContext(r,t))}});var $e=window.FluidTopicsI18nService,Et=window.FluidTopicsCustomI18nService;var mn=A(D()),xr=class{highlightHtml(t,o,n){(0,mn.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new xr;var vi=A(xn(),1);var vn;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(vn||(vn={}));var Sn;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(Sn||(Sn={}));var On;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE"})(On||(On={}));var Cn;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE"})(Cn||(Cn={}));var En;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(En||(En={}));var An;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(An||(An={}));var wn;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(wn||(wn={}));var In;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(In||(In={}));var Rn;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT"})(Rn||(Rn={}));var Nn;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(Nn||(Nn={}));var Tn;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(Tn||(Tn={}));var _n;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(_n||(_n={}));var Pn;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(Pn||(Pn={}));var Ln;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(Ln||(Ln={}));var kn;(function(r){r.ASC="ASC",r.DESC="DESC"})(kn||(kn={}));var Fn;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(Fn||(Fn={}));var Dn;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(Dn||(Dn={}));var Un;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Un||(Un={}));var Bn;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(Bn||(Bn={}));var Mn;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK"})(Mn||(Mn={}));var Wn;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Wn||(Wn={}));var Hn;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC"})(Hn||(Hn={}));var zn;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(zn||(zn={}));var U;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(U||(U={}));var Ie;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(Ie||(Ie={}));var Gn;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Gn||(Gn={}));var jn;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(jn||(jn={}));var $n;(function(r){r.TEXT="TEXT",r.HTML="HTML"})($n||($n={}));var xi={[U.PERSONAL_BOOK_SHARE_USER]:[U.PERSONAL_BOOK_USER],[U.HTML_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.PDF_EXPORT_USER]:[U.PERSONAL_BOOK_USER],[U.KHUB_ADMIN]:[U.CONTENT_PUBLISHER],[U.ADMIN]:[U.KHUB_ADMIN,U.USERS_ADMIN,U.PORTAL_ADMIN],[U.GENERATIVE_AI_EXPORT_USER]:[U.GENERATIVE_AI_USER]};function Kn(r,t){return r===t||(xi[r]??[]).some(o=>Kn(o,t))}function Vn(r,t){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Kn(n,t))}var It=class extends Q{async listMySearches(){let{session:t}=O.getState();return Vn(t,U.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Zn=A(D());var vr=class{isDate(t){var o,n,i,c;return(c=(i=((n=(o=O.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(d=>d.key===t))===null||i===void 0?void 0:i.date)!==null&&c!==void 0?c:!1}format(t,o){var n,i,c;return Zn.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:O.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(c=o?.withTime)!==null&&c!==void 0?c:!1)}};window.FluidTopicsDateService=new vr;var qn=A(D());var ot=class{static get(t,o){var n,i,c,l;let d=O.getState(),{lang:u,region:p}=(i=(n=d.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new qn.SearchPlaceConverter(d.baseUrl,(l=(c=window.FluidTopicsClientConfiguration)===null||c===void 0?void 0:c.predefinedSorts)!==null&&l!==void 0?l:{},t??20,d.searchInAllLanguagesAllowed,o??`${u}-${p}`)}};var Sr=class{urlToSearchRequest(t){return ot.get().parse(t)}searchRequestToUrl(t){return ot.get().serialize(t)}};window.FluidTopicsUrlService=new Sr;var fe=A(D());var Re=class r extends CustomEvent{constructor(t){super(r.eventName,{detail:{currentItem:t}})}};Re.eventName="change";var Or=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Yn=new Or;var Rt=class r extends fe.WithEventBus{static build(){return new r(window.history,Yn,()=>window.location,!1)}constructor(t,o,n,i){var c,l;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(l=(c=t.state)===null||c===void 0?void 0:c.index)!==null&&l!==void 0?l:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,fe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Re(this.currentItem())),0)}installProxies(){let t=o=>(n,i,[c,l,d])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...c,index:u,href:typeof d=="string"?d:(d??this.windowLocation()).href};n.apply(i,[p,l,d]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Re.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Re.eventName,t)}currentItem(){return(0,fe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,fe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,fe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let i=t,c=t+1;for(;this.states.length>c&&!this.isDifferentMajorState(c,n);)this.hasState(c)&&(i=c),c++;return i}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let i=o??this.currentState.majorStateId,c=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return c==null||c!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Rt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var Xn=O;function Qn(r,t){var o;return Xn.getState().authenticationRequired&&!(!((o=Xn.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(t):r()}var B=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},L=class extends J.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>we.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new J.CacheRegistry,this.cleanSessionDebouncer=new J.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Jn.html`
119
119
  <slot></slot>
120
- `}connectedCallback(){super.connectedCallback(),O.addEventListener(Ae.eventName,this.reloadConfiguration)}disconnectedCallback(){O.addEventListener(Ae.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var o,n,i,c,l,d,u;super.update(t),t.has("baseUrl")&&(O.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&O.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&O.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&O.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&O.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&O.actions.noCustom(this.noCustom),t.has("editorMode")&&O.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&O.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&O.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>$e.addContext(p)),t.has("openExternalDocumentInNewTab")&&O.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&O.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&O.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(O.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),O.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),O.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),t.has("authenticationRequired")&&O.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&O.actions.availableContentLocales((u=(d=this.availableContentLocales)===null||d===void 0?void 0:d.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Qn(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};L.elementDefinitions={};L.styles=yn;B([(0,z.property)()],L.prototype,"baseUrl",void 0);B([(0,z.property)()],L.prototype,"apiIntegrationIdentifier",void 0);B([(0,z.property)()],L.prototype,"apiIntegrationAppVersion",void 0);B([(0,z.property)()],L.prototype,"uiLocale",void 0);B([(0,J.jsonProperty)(null)],L.prototype,"availableUiLocales",void 0);B([(0,J.jsonProperty)(null)],L.prototype,"metadataConfiguration",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"editorMode",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"noCustom",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"openExternalDocumentInNewTab",void 0);B([(0,z.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],L.prototype,"noCustomComponent",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"withManualResources",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"navigatorOnline",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"forcedOffline",void 0);B([(0,z.property)({type:Object})],L.prototype,"apiProvider",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"authenticationRequired",void 0);B([(0,J.jsonProperty)([])],L.prototype,"messageContexts",void 0);B([(0,J.jsonProperty)(void 0)],L.prototype,"session",void 0);B([(0,z.state)()],L.prototype,"localesConfiguration",void 0);B([(0,z.state)()],L.prototype,"availableContentLocales",void 0);var sc=A(X());function Si(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Nt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Nt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Nt(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Nt(r,t){try{return Si(r,t)}catch{return!1}}function Tt(r,t){return!Nt(r,t)}var Oi=A(X(),1);var _t=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Ve=A(X(),1);var ea=A(X(),1);function ta(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,ea.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Tt,...t??{}})}var Pt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var oa=A(Y(),1);var Lt=globalThis,Ci=Lt.ShadowRoot&&(Lt.ShadyCSS===void 0||Lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Rf=Symbol();var ra=(r,t)=>{if(Ci)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=Lt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var kt=class extends oa.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ra(n,t.elementStyles),n}};function na(r,t,...o){var n;let i=r.querySelector(t);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var nt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},sa,aa=Symbol("constructorPrototype"),ia=Symbol("constructorName"),la=Symbol("exportpartsDebouncer"),ca=Symbol("dynamicDependenciesLoaded"),se=class extends kt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[sa]=new Pt(5),this[ia]=this.constructor.name,this[aa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ia]&&Object.setPrototypeOf(this,this[aa])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[ca]||(t[ca]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=na(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[la].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(u).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};sa=la;nt([(0,Ve.property)()],se.prototype,"exportpartsPrefix",void 0);nt([ta([])],se.prototype,"exportpartsPrefixes",void 0);nt([(0,Ve.property)()],se.prototype,"customStylesheet",void 0);nt([(0,Ve.property)()],se.prototype,"elementToFocus",void 0);nt([(0,Ve.state)()],se.prototype,"useAdoptedStyleSheets",void 0);function Ft(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var at=Symbol("internalReduxEventsUnsubscribers"),he=Symbol("internalStoresUnsubscribers"),Ne=Symbol("internalStores");function Ei(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ne].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ne].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Ne].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ne].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Ne].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ne].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(l.store);p&&(l.store?this[he].has(l.store):this[he].size>0)&&(this[d]=l.selector(p.getState(),this))}})}subscribeToStore(l,d){var u;this[he].set(l,d.subscribe(()=>this.updateFromStores())),this[at].set(l,[]),Ft(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,y)=>{if(typeof this[y]=="function"&&(!p.store||d.name===p.store)){let h=g=>this[y](g);d.addEventListener(p.eventName,h),this[at].get(l).push(()=>d.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[he].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[he].has(l)&&this[he].get(l)(),this[he].delete(l),(d=this[at].get(l))===null||d===void 0||d.forEach(u=>u()),this[at].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=he,o=Ne,n=at,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}var da=class extends Ei(se){};function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function le(r){return!!r&&!!r[k]}function ee(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Pi}(r)||Array.isArray(r)||!!r[ma]||!!(!((t=r.constructor)===null||t===void 0)&&t[ma])||_r(r)||Pr(r))}function Te(r,t,o){o===void 0&&(o=!1),Ye(r)===0?(o?Object.keys:qe)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Ye(r){var t=r[k];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:_r(r)?2:Pr(r)?3:0}function Ze(r,t){return Ye(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Ai(r,t){return Ye(r)===2?r.get(t):r[t]}function ba(r,t,o){var n=Ye(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function xa(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function _r(r){return Ti&&r instanceof Map}function Pr(r){return _i&&r instanceof Set}function ye(r){return r.o||r.t}function Lr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Oa(r);delete t[k];for(var o=qe(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function kr(r,t){return t===void 0&&(t=!1),Fr(r)||le(r)||!ee(r)||(Ye(r)>1&&(r.set=r.add=r.clear=r.delete=wi),Object.freeze(r),t&&Te(r,function(o,n){return kr(n,!0)},!0)),r}function wi(){V(2)}function Fr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function oe(r){var t=Tr[r];return t||V(18,r),t}function Ii(r,t){Tr[r]||(Tr[r]=t)}function Ir(){return ct}function Cr(r,t){t&&(oe("Patches"),r.u=[],r.s=[],r.v=t)}function Dt(r){Rr(r),r.p.forEach(Ri),r.p=null}function Rr(r){r===ct&&(ct=r.l)}function ua(r){return ct={p:[],l:ct,h:r,m:!0,_:0}}function Ri(r){var t=r[k];t.i===0||t.i===1?t.j():t.g=!0}function Er(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||oe("ES5").S(t,r,n),n?(o[k].P&&(Dt(t),V(4)),ee(r)&&(r=Ut(t,r),t.l||Bt(t,r)),t.u&&oe("Patches").M(o[k].t,r,t.u,t.s)):r=Ut(t,o,[]),Dt(t),t.u&&t.v(t.u,t.s),r!==Sa?r:void 0}function Ut(r,t,o){if(Fr(t))return t;var n=t[k];if(!n)return Te(t,function(d,u){return pa(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Bt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Lr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Te(c,function(d,u){return pa(r,n,i,d,u,o,l)}),Bt(r,i,!1),o&&r.u&&oe("Patches").N(n,o,r.u,r.s)}return n.o}function pa(r,t,o,n,i,c,l){if(le(i)){var d=Ut(r,i,c&&t&&t.i!==3&&!Ze(t.R,n)?c.concat(n):void 0);if(ba(o,n,d),!le(d))return;r.m=!1}else l&&o.add(i);if(ee(i)&&!Fr(i)){if(!r.h.D&&r._<1)return;Ut(r,i),t&&t.A.l||Bt(r,i)}}function Bt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&kr(t,o)}function Ar(r,t){var o=r[k];return(o?ye(o):r)[t]}function fa(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ge(r){r.P||(r.P=!0,r.l&&ge(r.l))}function wr(r){r.o||(r.o=Lr(r.t))}function Nr(r,t,o){var n=_r(t)?oe("MapSet").F(t,o):Pr(t)?oe("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:Ir(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},u=d,p=st;l&&(u=[d],p=it);var y=Proxy.revocable(u,p),h=y.revoke,g=y.proxy;return d.k=g,d.j=h,g}(t,o):oe("ES5").J(t,o);return(o?o.A:Ir()).p.push(n),n}function Ni(r){return le(r)||V(22,r),function t(o){if(!ee(o))return o;var n,i=o[k],c=Ye(o);if(i){if(!i.P&&(i.i<4||!oe("ES5").K(i)))return i.t;i.I=!0,n=ha(o,c),i.I=!1}else n=ha(o,c);return Te(n,function(l,d){i&&Ai(i.t,l)===d||ba(n,l,t(d))}),c===3?new Set(n):n}(r)}function ha(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Lr(r)}function va(){function r(l,d){var u=c[l];return u?u.enumerable=d:c[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[k];return st.get(p,l)},set:function(p){var y=this[k];st.set(y,l,p)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][k];if(!u.P)switch(u.i){case 5:n(u)&&ge(u);break;case 4:o(u)&&ge(u)}}}function o(l){for(var d=l.t,u=l.k,p=qe(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==k){var g=d[h];if(g===void 0&&!Ze(d,h))return!0;var v=u[h],b=v&&v[k];if(b?b.t!==g:!xa(v,g))return!0}}var S=!!d[k];return p.length!==qe(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(ye(l)))}var c={};Ii("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(h,g){if(h){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Oa(g);delete S[k];for(var N=qe(S),w=0;w<N.length;w++){var I=N[w];S[I]=r(I,h||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(u,l),y={i:u?5:4,A:d?d.A:Ir(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,k,{value:y,writable:!0}),p},S:function(l,d,u){u?le(d)&&d[k].A===l&&t(l.p):(l.u&&function p(y){if(y&&typeof y=="object"){var h=y[k];if(h){var g=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Te(v,function(T){T!==k&&(g[T]!==void 0||Ze(g,T)?b[T]||p(v[T]):(b[T]=!0,ge(h)))}),Te(g,function(T){v[T]!==void 0||Ze(v,T)||(b[T]=!1,ge(h))});else if(S===5){if(n(h)&&(ge(h),b.length=!0),v.length<g.length)for(var N=v.length;N<g.length;N++)b[N]=!1;else for(var w=g.length;w<v.length;w++)b[w]=!0;for(var I=Math.min(v.length,g.length),P=0;P<I;P++)v.hasOwnProperty(P)||(b[P]=!0),b[P]===void 0&&p(v[P])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var ya,ct,Dr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ti=typeof Map<"u",_i=typeof Set<"u",ga=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Sa=Dr?Symbol.for("immer-nothing"):((ya={})["immer-nothing"]=!0,ya),ma=Dr?Symbol.for("immer-draftable"):"__$immer_draftable",k=Dr?Symbol.for("immer-state"):"__$immer_state";var Pi=""+Object.prototype.constructor,qe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Oa=Object.getOwnPropertyDescriptors||function(r){var t={};return qe(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Tr={},st={get:function(r,t){if(t===k)return r;var o=ye(r);if(!Ze(o,t))return function(i,c,l){var d,u=fa(c,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!ee(n)?n:n===Ar(r.t,t)?(wr(r),r.o[t]=Nr(r.A.h,n,r)):n},has:function(r,t){return t in ye(r)},ownKeys:function(r){return Reflect.ownKeys(ye(r))},set:function(r,t,o){var n=fa(ye(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Ar(ye(r),t),c=i?.[k];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(xa(o,i)&&(o!==void 0||Ze(r.t,t)))return!0;wr(r),ge(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Ar(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,wr(r),ge(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ye(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},it={};Te(st,function(r,t){it[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),it.deleteProperty=function(r,t){return it.set.call(this,r,t,void 0)},it.set=function(r,t,o){return st.set.call(this,r[0],t,o,r[0])};var Li=function(){function r(o){var n=this;this.O=ga,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var u=n;return function(S){var N=this;S===void 0&&(S=d);for(var w=arguments.length,I=Array(w>1?w-1:0),P=1;P<w;P++)I[P-1]=arguments[P];return u.produce(S,function(T){var W;return(W=c).call.apply(W,[N,T].concat(I))})}}var p;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),ee(i)){var y=ua(n),h=Nr(n,i,void 0),g=!0;try{p=c(h),g=!1}finally{g?Dt(y):Rr(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return Cr(y,l),Er(S,y)},function(S){throw Dt(y),S}):(Cr(y,l),Er(p,y))}if(!i||typeof i!="object"){if((p=c(i))===void 0&&(p=i),p===Sa&&(p=void 0),n.D&&kr(p,!0),l){var v=[],b=[];oe("Patches").M(i,p,v,b),l(v,b)}return p}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),g=1;g<y;g++)h[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,u=n.produce(i,c,function(p,y){l=p,d=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){ee(o)||V(8),le(o)&&(o=Ni(o));var n=ua(this),i=Nr(this,o,void 0);return i[k].C=!0,Rr(n),i},t.finishDraft=function(o,n){var i=o&&o[k],c=i.A;return Cr(c,n),Er(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ga&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=oe("Patches").$;return le(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),$=new Li,ki=$.produce,zf=$.produceWithPatches.bind($),Gf=$.setAutoFreeze.bind($),jf=$.setUseProxies.bind($),$f=$.applyPatches.bind($),Kf=$.createDraft.bind($),Vf=$.finishDraft.bind($),Mt=ki;function _e(r){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(r)}function Ca(r,t){if(_e(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(_e(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Ea(r){var t=Ca(r,"string");return _e(t)=="symbol"?t:t+""}function Aa(r,t,o){return(t=Ea(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function wa(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Ur(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?wa(Object(o),!0).forEach(function(n){Aa(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):wa(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function G(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Ia=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Br=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wt={INIT:"@@redux/INIT"+Br(),REPLACE:"@@redux/REPLACE"+Br(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Br()}};function Fi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Mr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(G(1));return o(Mr)(r,t)}if(typeof r!="function")throw new Error(G(2));var i=r,c=t,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function y(){if(u)throw new Error(G(3));return c}function h(S){if(typeof S!="function")throw new Error(G(4));if(u)throw new Error(G(5));var N=!0;return p(),d.push(S),function(){if(N){if(u)throw new Error(G(6));N=!1,p();var I=d.indexOf(S);d.splice(I,1),l=null}}}function g(S){if(!Fi(S))throw new Error(G(7));if(typeof S.type>"u")throw new Error(G(8));if(u)throw new Error(G(9));try{u=!0,c=i(c,S)}finally{u=!1}for(var N=l=d,w=0;w<N.length;w++){var I=N[w];I()}return S}function v(S){if(typeof S!="function")throw new Error(G(10));i=S,g({type:Wt.REPLACE})}function b(){var S,N=h;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(G(11));function P(){I.next&&I.next(y())}P();var T=N(P);return{unsubscribe:T}}},S[Ia]=function(){return this},S}return g({type:Wt.INIT}),n={dispatch:g,subscribe:h,getState:y,replaceReducer:v},n[Ia]=b,n}function Di(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Wt.INIT});if(typeof n>"u")throw new Error(G(12));if(typeof o(void 0,{type:Wt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(G(13))})}function Ra(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{Di(o)}catch(u){d=u}return function(p,y){if(p===void 0&&(p={}),d)throw d;if(0)var h;for(var g=!1,v={},b=0;b<c.length;b++){var S=c[b],N=o[S],w=p[S],I=N(w,y);if(typeof I>"u"){var P=y&&y.type;throw new Error(G(14))}v[S]=I,g=g||I!==w}return g=g||c.length!==Object.keys(p).length,g?v:p}}function Xe(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Na(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(G(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return c=Xe.apply(void 0,d)(i.dispatch),Ur(Ur({},i),{},{dispatch:c})}}}function Ta(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var _a=Ta();_a.withExtraArgument=Ta;var Wr=_a;var Da=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ui=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=p[0]&2?i.return:p[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,p[1])).done)return c;switch(i=0,c&&(p=[p[0]&2,c.value]),p[0]){case 0:case 1:c=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!c||p[1]>c[0]&&p[1]<c[3])){o.label=p[1];break}if(p[0]===6&&o.label<c[1]){o.label=c[1],c=p;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(p);break}c[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(y){p=[6,y],i=0}finally{n=c=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Qe=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Bi=Object.defineProperty,Mi=Object.defineProperties,Wi=Object.getOwnPropertyDescriptors,Pa=Object.getOwnPropertySymbols,Hi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable,La=function(r,t,o){return t in r?Bi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},me=function(r,t){for(var o in t||(t={}))Hi.call(t,o)&&La(r,o,t[o]);if(Pa)for(var n=0,i=Pa(t);n<i.length;n++){var o=i[n];zi.call(t,o)&&La(r,o,t[o])}return r},Hr=function(r,t){return Mi(r,Wi(t))},Gi=function(r,t,o){return new Promise(function(n,i){var c=function(u){try{d(o.next(u))}catch(p){i(p)}},l=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(c,l)};d((o=o.apply(r,t)).next())})};var ji=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xe:Xe.apply(null,arguments)},uh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function $i(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Ki=function(r){Da(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Qe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Qe([void 0],o.concat(this))))},t}(Array),Vi=function(r){Da(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Qe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Qe([void 0],o.concat(this))))},t}(Array);function jr(r){return ee(r)?Mt(r,function(){}):r}function Zi(r){return typeof r=="boolean"}function qi(){return function(t){return Yi(t)}}function Yi(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new Ki;if(o&&(Zi(o)?d.push(Wr):d.push(Wr.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return d}var zr=!0;function Ua(r){var t=qi(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,g=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if($i(i))v=Ra(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!zr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!zr&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Na.apply(void 0,b),N=Xe;u&&(N=ji(me({trace:!zr},typeof u=="object"&&u)));var w=new Vi(S),I=w;Array.isArray(g)?I=Qe([S],g):typeof g=="function"&&(I=g(w));var P=N.apply(void 0,I);return Mr(v,y,P)}function be(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return me(me({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Ba(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Xi(r){return typeof r=="function"}function Qi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Ba(t):[t,o,n],c=i[0],l=i[1],d=i[2],u;if(Xi(r))u=function(){return jr(r())};else{var p=jr(r);u=function(){return p}}function y(h,g){h===void 0&&(h=u());var v=Qe([c[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(le(b)){var N=b,w=S(N,g);return w===void 0?b:w}else{if(ee(b))return Mt(b,function(I){return S(I,g)});var w=S(b,g);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},h)}return y.getInitialState=u,y}function Ji(r,t){return r+"/"+t}function Ma(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:jr(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],g=Ji(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[g]=v,d[y]=b?be(g,b):be(g)});function u(){var y=typeof r.extraReducers=="function"?Ba(r.extraReducers):[r.extraReducers],h=y[0],g=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],N=S===void 0?void 0:S,w=me(me({},g),l);return Qi(o,function(I){for(var P in w)I.addCase(P,w[P]);for(var T=0,W=b;T<W.length;T++){var q=W[T];I.addMatcher(q.matcher,q.reducer)}N&&I.addDefaultCase(N)})}var p;return{name:t,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:d,caseReducers:c,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var ec="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",tc=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=ec[Math.random()*64|0];return t},rc=["name","message","stack","code"],Gr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ka=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),oc=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=rc;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},yh=function(){function r(t,o,n){var i=be(t+"/fulfilled",function(y,h,g,v){return{payload:y,meta:Hr(me({},v||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),c=be(t+"/pending",function(y,h,g){return{payload:void 0,meta:Hr(me({},g||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=be(t+"/rejected",function(y,h,g,v,b){return{payload:v,error:(n&&n.serializeError||oc)(y||"Rejected"),meta:Hr(me({},b||{}),{arg:g,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(h,g,v){var b=n?.idGenerator?n.idGenerator(y):tc(),S=new u,N,w=!1;function I(T){N=T,S.abort()}var P=function(){return Gi(this,null,function(){var T,W,q,xe,j,ve,Pe;return Ui(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),xe=(T=n?.condition)==null?void 0:T.call(n,y,{getState:g,extra:v}),ac(xe)?[4,xe]:[3,2];case 1:xe=f.sent(),f.label=2;case 2:if(xe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,j=new Promise(function(m,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:N||"Aborted"})})}),h(c(b,y,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:b,arg:y},{getState:g,extra:v}))),[4,Promise.race([j,Promise.resolve(o(y,{dispatch:h,getState:g,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(m,E){return new Gr(m,E)},fulfillWithValue:function(m,E){return new ka(m,E)}})).then(function(m){if(m instanceof Gr)throw m;return m instanceof ka?i(m.payload,b,y,m.meta):i(m,b,y)})])];case 3:return q=f.sent(),[3,5];case 4:return ve=f.sent(),q=ve instanceof Gr?l(null,b,y,ve.payload,ve.meta):l(ve,b,y),[3,5];case 5:return Pe=n&&!n.dispatchConditionRejection&&l.match(q)&&q.meta.condition,Pe||h(q),[2,q]}})})}();return Object.assign(P,{abort:I,requestId:b,arg:y,unwrap:function(){return P.then(nc)}})}}return Object.assign(p,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function nc(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function ac(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Wa="listener",Ha="completed",za="cancelled",gh="task-"+za,mh="task-"+Ha,bh=Wa+"-"+za,xh=Wa+"-"+Ha;var $r="listenerMiddleware";var vh=be($r+"/add"),Sh=be($r+"/removeAll"),Oh=be($r+"/remove");var Fa,Ch=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Fa||(Fa=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},ic=function(r){return function(t){setTimeout(t,r)}},Eh=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ic(10);va();function cc(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Ht=class extends cc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ga=class r extends Ht{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(Ft(c))return c;if(i==null)return;let l=Ma({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Ua({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new _t;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,l,d)=>{let u=l,p=c[u];return p?(...y)=>{let h=p(...y.map(i));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[u]:i(y)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Gt=A(D());var zt=class extends Q{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=O.getState().session;return!!t?.sessionAuthenticated}};var lc="ft-user-assets",dc={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(Ie).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}}},Z=Gt.FtReduxStore.get({name:lc,reducers:dc,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ie).map(r=>[r,void 0])),bookmarkByMap:{}}}}),Kr=class{constructor(t=new zt){this.assetCountsService=t,this.currentSession=O.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ot,this.savedSearchesService=new It,O.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=O.getState();(0,Gt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){Z.actions.clearAssetCount(),Z.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Z.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Z.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Z.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&Z.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&Z.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(Z.getState().assetCounts.bookmarkByMap).length!==0;t===Ie.BOOKMARKS&&o&&Z.actions.clearBookmarkCountByMap(),Z.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Z.actions.bookmarks(o)}}},uc=new Kr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=uc);(0,ja.customElement)("ft-app-context")(L);var Ja=A(D());var Zt=A(Y()),qt=A(X()),Yt=A(D());var $a=A(Y());var Ka=$a.css`
120
+ `}connectedCallback(){super.connectedCallback(),O.addEventListener(Ae.eventName,this.reloadConfiguration)}disconnectedCallback(){O.addEventListener(Ae.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var o,n,i,c,l,d,u;super.update(t),t.has("baseUrl")&&(O.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&O.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&O.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&O.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&O.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&O.actions.noCustom(this.noCustom),t.has("editorMode")&&O.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&O.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&O.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>$e.addContext(p)),t.has("openExternalDocumentInNewTab")&&O.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&O.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&O.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(O.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),O.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),O.actions.searchInAllLanguagesAllowed((l=(c=this.localesConfiguration)===null||c===void 0?void 0:c.allLanguagesAllowed)!==null&&l!==void 0?l:!1)),t.has("authenticationRequired")&&O.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&O.actions.availableContentLocales((u=(d=this.availableContentLocales)===null||d===void 0?void 0:d.contentLocales)!==null&&u!==void 0?u:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Qn(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};L.elementDefinitions={};L.styles=yn;B([(0,z.property)()],L.prototype,"baseUrl",void 0);B([(0,z.property)()],L.prototype,"apiIntegrationIdentifier",void 0);B([(0,z.property)()],L.prototype,"apiIntegrationAppVersion",void 0);B([(0,z.property)()],L.prototype,"uiLocale",void 0);B([(0,J.jsonProperty)(null)],L.prototype,"availableUiLocales",void 0);B([(0,J.jsonProperty)(null)],L.prototype,"metadataConfiguration",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"editorMode",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"noCustom",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"openExternalDocumentInNewTab",void 0);B([(0,z.property)({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],L.prototype,"noCustomComponent",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"withManualResources",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"navigatorOnline",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"forcedOffline",void 0);B([(0,z.property)({type:Object})],L.prototype,"apiProvider",void 0);B([(0,z.property)({type:Boolean})],L.prototype,"authenticationRequired",void 0);B([(0,J.jsonProperty)([])],L.prototype,"messageContexts",void 0);B([(0,J.jsonProperty)(void 0)],L.prototype,"session",void 0);B([(0,z.state)()],L.prototype,"localesConfiguration",void 0);B([(0,z.state)()],L.prototype,"availableContentLocales",void 0);var sc=A(X());function Si(r,t){if(r===t)return!0;if(r&&t&&typeof r=="object"&&typeof t=="object"){if(r.constructor!==t.constructor)return!1;var o,n,i;if(Array.isArray(r)){if(o=r.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Nt(r[n],t[n]))return!1;return!0}if(r instanceof Map&&t instanceof Map){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;for(n of r.entries())if(!Nt(n[1],t.get(n[0])))return!1;return!0}if(r instanceof Set&&t instanceof Set){if(r.size!==t.size)return!1;for(n of r.entries())if(!t.has(n[0]))return!1;return!0}if(r.constructor===RegExp)return r.source===t.source&&r.flags===t.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===t.valueOf();let c=l=>Object.keys(l).filter(d=>l[d]!=null);if(i=c(r),o=i.length,o!==c(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let l=i[n];if(!Nt(r[l],t[l]))return!1}return!0}return r!==r&&t!==t||r==null&&t==null}function Nt(r,t){try{return Si(r,t)}catch{return!1}}function Tt(r,t){return!Nt(r,t)}var Oi=A(X(),1);var _t=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Ve=A(X(),1);var ea=A(X(),1);function ta(r,t){let o=()=>JSON.parse(JSON.stringify(r));return(0,ea.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Tt,...t??{}})}var Pt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,c=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let l of n)try{await l()}catch(d){i(d);return}c(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var oa=A(Y(),1);var Lt=globalThis,Ci=Lt.ShadowRoot&&(Lt.ShadyCSS===void 0||Lt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_f=Symbol();var ra=(r,t)=>{if(Ci)r.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),i=Lt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,r.appendChild(n)}};var kt=class extends oa.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([i,c])=>t.registry.define(i,c)));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ra(n,t.elementStyles),n}};function na(r,t,...o){var n;let i=r.querySelector(t);for(let c of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(c);return i}var nt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},sa,aa=Symbol("constructorPrototype"),ia=Symbol("constructorName"),la=Symbol("exportpartsDebouncer"),ca=Symbol("dynamicDependenciesLoaded"),se=class extends kt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[sa]=new Pt(5),this[ia]=this.constructor.name,this[aa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ia]&&Object.setPrototypeOf(this,this[aa])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let t=this.constructor;t[ca]||(t[ca]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate()})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let c=[...i??[],n];o=na(this.shadowRoot,...c)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(c=>c.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(c){console.error(c,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let c=document.createElement("style");c.classList.add("ft-lit-element--custom-stylesheet"),c.innerHTML=this.customStylesheet,this.shadowRoot.append(c)}}scheduleExportpartsUpdate(){var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[la].run(()=>{var i,c;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((c=this.exportpartsPrefixes)===null||c===void 0?void 0:c.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(t){var o,n,i,c,l,d;let u=g=>g!=null&&g.trim().length>0,p=t.filter(u).map(g=>g.trim());if(p.length===0){this.removeAttribute("exportparts");return}let y=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(c=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&c!==void 0?c:[],b=(d=(l=g.getAttribute("exportparts"))===null||l===void 0?void 0:l.split(",").map(S=>S.split(":")[1]))!==null&&d!==void 0?d:[];new Array(...v,...b).filter(u).map(S=>S.trim()).forEach(S=>y.add(S))}if(y.size===0){this.removeAttribute("exportparts");return}let h=[...y.values()].flatMap(g=>p.map(v=>`${g}:${v}--${g}`));this.setAttribute("exportparts",[...this.part,...h].join(", "))}};sa=la;nt([(0,Ve.property)()],se.prototype,"exportpartsPrefix",void 0);nt([ta([])],se.prototype,"exportpartsPrefixes",void 0);nt([(0,Ve.property)()],se.prototype,"customStylesheet",void 0);nt([(0,Ve.property)()],se.prototype,"elementToFocus",void 0);nt([(0,Ve.state)()],se.prototype,"useAdoptedStyleSheets",void 0);function Ft(r){var t;return(t=r?.isFtReduxStore)!==null&&t!==void 0?t:!1}var at=Symbol("internalReduxEventsUnsubscribers"),he=Symbol("internalStoresUnsubscribers"),Ne=Symbol("internalStores");function Ei(r){var t,o,n;class i extends r{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(l){super.willUpdate(l),[...this.reduxConstructor.reduxReactiveProperties].some(d=>l.has(d))&&this.updateFromStores()}getUnnamedStore(){if(this[Ne].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ne].values()][0]}getStore(l){return l==null?this.getUnnamedStore():this[Ne].get(l)}addStore(l,d){var u;d=(u=d??l.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(d),this[Ne].set(d,l),this.subscribeToStore(d,l),this.updateFromStores()}removeStore(l){let d=typeof l=="string"?l:l.name;this.unsubscribeFromStore(d),this[Ne].delete(d)}setupStores(){this.unsubscribeFromStores(),this[Ne].forEach((l,d)=>this.subscribeToStore(d,l)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((l,d)=>{let u=this.constructor.getPropertyOptions(d);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:d)){let p=this.getStore(l.store);p&&(l.store?this[he].has(l.store):this[he].size>0)&&(this[d]=l.selector(p.getState(),this))}})}subscribeToStore(l,d){var u;this[he].set(l,d.subscribe(()=>this.updateFromStores())),this[at].set(l,[]),Ft(d)&&d.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,y)=>{if(typeof this[y]=="function"&&(!p.store||d.name===p.store)){let h=g=>this[y](g);d.addEventListener(p.eventName,h),this[at].get(l).push(()=>d.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(l)}unsubscribeFromStores(){this[he].forEach((l,d)=>this.unsubscribeFromStore(d))}unsubscribeFromStore(l){var d;this[he].has(l)&&this[he].get(l)(),this[he].delete(l),(d=this[at].get(l))===null||d===void 0||d.forEach(u=>u()),this[at].delete(l)}onStoreAvailable(l){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=he,o=Ne,n=at,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}var da=class extends Ei(se){};function V(r){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var i,c;throw Error("[Immer] minified error nr: "+r+(o.length?" "+o.map(function(l){return"'"+l+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function le(r){return!!r&&!!r[k]}function ee(r){var t;return!!r&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Pi}(r)||Array.isArray(r)||!!r[ma]||!!(!((t=r.constructor)===null||t===void 0)&&t[ma])||_r(r)||Pr(r))}function Te(r,t,o){o===void 0&&(o=!1),Ye(r)===0?(o?Object.keys:qe)(r).forEach(function(n){o&&typeof n=="symbol"||t(n,r[n],r)}):r.forEach(function(n,i){return t(i,n,r)})}function Ye(r){var t=r[k];return t?t.i>3?t.i-4:t.i:Array.isArray(r)?1:_r(r)?2:Pr(r)?3:0}function Ze(r,t){return Ye(r)===2?r.has(t):Object.prototype.hasOwnProperty.call(r,t)}function Ai(r,t){return Ye(r)===2?r.get(t):r[t]}function ba(r,t,o){var n=Ye(r);n===2?r.set(t,o):n===3?r.add(o):r[t]=o}function xa(r,t){return r===t?r!==0||1/r==1/t:r!=r&&t!=t}function _r(r){return Ti&&r instanceof Map}function Pr(r){return _i&&r instanceof Set}function ye(r){return r.o||r.t}function Lr(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var t=Oa(r);delete t[k];for(var o=qe(t),n=0;n<o.length;n++){var i=o[n],c=t[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(t[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:r[i]})}return Object.create(Object.getPrototypeOf(r),t)}function kr(r,t){return t===void 0&&(t=!1),Fr(r)||le(r)||!ee(r)||(Ye(r)>1&&(r.set=r.add=r.clear=r.delete=wi),Object.freeze(r),t&&Te(r,function(o,n){return kr(n,!0)},!0)),r}function wi(){V(2)}function Fr(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function oe(r){var t=Tr[r];return t||V(18,r),t}function Ii(r,t){Tr[r]||(Tr[r]=t)}function Ir(){return ct}function Cr(r,t){t&&(oe("Patches"),r.u=[],r.s=[],r.v=t)}function Dt(r){Rr(r),r.p.forEach(Ri),r.p=null}function Rr(r){r===ct&&(ct=r.l)}function ua(r){return ct={p:[],l:ct,h:r,m:!0,_:0}}function Ri(r){var t=r[k];t.i===0||t.i===1?t.j():t.g=!0}function Er(r,t){t._=t.p.length;var o=t.p[0],n=r!==void 0&&r!==o;return t.h.O||oe("ES5").S(t,r,n),n?(o[k].P&&(Dt(t),V(4)),ee(r)&&(r=Ut(t,r),t.l||Bt(t,r)),t.u&&oe("Patches").M(o[k].t,r,t.u,t.s)):r=Ut(t,o,[]),Dt(t),t.u&&t.v(t.u,t.s),r!==Sa?r:void 0}function Ut(r,t,o){if(Fr(t))return t;var n=t[k];if(!n)return Te(t,function(d,u){return pa(r,n,t,d,u,o)},!0),t;if(n.A!==r)return t;if(!n.P)return Bt(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Lr(n.k):n.o,c=i,l=!1;n.i===3&&(c=new Set(i),i.clear(),l=!0),Te(c,function(d,u){return pa(r,n,i,d,u,o,l)}),Bt(r,i,!1),o&&r.u&&oe("Patches").N(n,o,r.u,r.s)}return n.o}function pa(r,t,o,n,i,c,l){if(le(i)){var d=Ut(r,i,c&&t&&t.i!==3&&!Ze(t.R,n)?c.concat(n):void 0);if(ba(o,n,d),!le(d))return;r.m=!1}else l&&o.add(i);if(ee(i)&&!Fr(i)){if(!r.h.D&&r._<1)return;Ut(r,i),t&&t.A.l||Bt(r,i)}}function Bt(r,t,o){o===void 0&&(o=!1),!r.l&&r.h.D&&r.m&&kr(t,o)}function Ar(r,t){var o=r[k];return(o?ye(o):r)[t]}function fa(r,t){if(t in r)for(var o=Object.getPrototypeOf(r);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ge(r){r.P||(r.P=!0,r.l&&ge(r.l))}function wr(r){r.o||(r.o=Lr(r.t))}function Nr(r,t,o){var n=_r(t)?oe("MapSet").F(t,o):Pr(t)?oe("MapSet").T(t,o):r.O?function(i,c){var l=Array.isArray(i),d={i:l?1:0,A:c?c.A:Ir(),P:!1,I:!1,R:{},l:c,t:i,k:null,o:null,j:null,C:!1},u=d,p=st;l&&(u=[d],p=it);var y=Proxy.revocable(u,p),h=y.revoke,g=y.proxy;return d.k=g,d.j=h,g}(t,o):oe("ES5").J(t,o);return(o?o.A:Ir()).p.push(n),n}function Ni(r){return le(r)||V(22,r),function t(o){if(!ee(o))return o;var n,i=o[k],c=Ye(o);if(i){if(!i.P&&(i.i<4||!oe("ES5").K(i)))return i.t;i.I=!0,n=ha(o,c),i.I=!1}else n=ha(o,c);return Te(n,function(l,d){i&&Ai(i.t,l)===d||ba(n,l,t(d))}),c===3?new Set(n):n}(r)}function ha(r,t){switch(t){case 2:return new Map(r);case 3:return Array.from(r)}return Lr(r)}function va(){function r(l,d){var u=c[l];return u?u.enumerable=d:c[l]=u={configurable:!0,enumerable:d,get:function(){var p=this[k];return st.get(p,l)},set:function(p){var y=this[k];st.set(y,l,p)}},u}function t(l){for(var d=l.length-1;d>=0;d--){var u=l[d][k];if(!u.P)switch(u.i){case 5:n(u)&&ge(u);break;case 4:o(u)&&ge(u)}}}function o(l){for(var d=l.t,u=l.k,p=qe(u),y=p.length-1;y>=0;y--){var h=p[y];if(h!==k){var g=d[h];if(g===void 0&&!Ze(d,h))return!0;var v=u[h],b=v&&v[k];if(b?b.t!==g:!xa(v,g))return!0}}var S=!!d[k];return p.length!==qe(d).length+(S?0:1)}function n(l){var d=l.k;if(d.length!==l.t.length)return!0;var u=Object.getOwnPropertyDescriptor(d,d.length-1);if(u&&!u.get)return!0;for(var p=0;p<d.length;p++)if(!d.hasOwnProperty(p))return!0;return!1}function i(l){l.g&&V(3,JSON.stringify(ye(l)))}var c={};Ii("ES5",{J:function(l,d){var u=Array.isArray(l),p=function(h,g){if(h){for(var v=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(v,""+b,r(b,!0));return v}var S=Oa(g);delete S[k];for(var N=qe(S),w=0;w<N.length;w++){var I=N[w];S[I]=r(I,h||!!S[I].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(u,l),y={i:u?5:4,A:d?d.A:Ir(),P:!1,I:!1,R:{},l:d,t:l,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,k,{value:y,writable:!0}),p},S:function(l,d,u){u?le(d)&&d[k].A===l&&t(l.p):(l.u&&function p(y){if(y&&typeof y=="object"){var h=y[k];if(h){var g=h.t,v=h.k,b=h.R,S=h.i;if(S===4)Te(v,function(T){T!==k&&(g[T]!==void 0||Ze(g,T)?b[T]||p(v[T]):(b[T]=!0,ge(h)))}),Te(g,function(T){v[T]!==void 0||Ze(v,T)||(b[T]=!1,ge(h))});else if(S===5){if(n(h)&&(ge(h),b.length=!0),v.length<g.length)for(var N=v.length;N<g.length;N++)b[N]=!1;else for(var w=g.length;w<v.length;w++)b[w]=!0;for(var I=Math.min(v.length,g.length),P=0;P<I;P++)v.hasOwnProperty(P)||(b[P]=!0),b[P]===void 0&&p(v[P])}}}}(l.p[0]),t(l.p))},K:function(l){return l.i===4?o(l):n(l)}})}var ya,ct,Dr=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Ti=typeof Map<"u",_i=typeof Set<"u",ga=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Sa=Dr?Symbol.for("immer-nothing"):((ya={})["immer-nothing"]=!0,ya),ma=Dr?Symbol.for("immer-draftable"):"__$immer_draftable",k=Dr?Symbol.for("immer-state"):"__$immer_state";var Pi=""+Object.prototype.constructor,qe=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,Oa=Object.getOwnPropertyDescriptors||function(r){var t={};return qe(r).forEach(function(o){t[o]=Object.getOwnPropertyDescriptor(r,o)}),t},Tr={},st={get:function(r,t){if(t===k)return r;var o=ye(r);if(!Ze(o,t))return function(i,c,l){var d,u=fa(c,l);return u?"value"in u?u.value:(d=u.get)===null||d===void 0?void 0:d.call(i.k):void 0}(r,o,t);var n=o[t];return r.I||!ee(n)?n:n===Ar(r.t,t)?(wr(r),r.o[t]=Nr(r.A.h,n,r)):n},has:function(r,t){return t in ye(r)},ownKeys:function(r){return Reflect.ownKeys(ye(r))},set:function(r,t,o){var n=fa(ye(r),t);if(n?.set)return n.set.call(r.k,o),!0;if(!r.P){var i=Ar(ye(r),t),c=i?.[k];if(c&&c.t===o)return r.o[t]=o,r.R[t]=!1,!0;if(xa(o,i)&&(o!==void 0||Ze(r.t,t)))return!0;wr(r),ge(r)}return r.o[t]===o&&(o!==void 0||t in r.o)||Number.isNaN(o)&&Number.isNaN(r.o[t])||(r.o[t]=o,r.R[t]=!0),!0},deleteProperty:function(r,t){return Ar(r.t,t)!==void 0||t in r.t?(r.R[t]=!1,wr(r),ge(r)):delete r.R[t],r.o&&delete r.o[t],!0},getOwnPropertyDescriptor:function(r,t){var o=ye(r),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:r.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){V(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){V(12)}},it={};Te(st,function(r,t){it[r]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),it.deleteProperty=function(r,t){return it.set.call(this,r,t,void 0)},it.set=function(r,t,o){return st.set.call(this,r[0],t,o,r[0])};var Li=function(){function r(o){var n=this;this.O=ga,this.D=!0,this.produce=function(i,c,l){if(typeof i=="function"&&typeof c!="function"){var d=c;c=i;var u=n;return function(S){var N=this;S===void 0&&(S=d);for(var w=arguments.length,I=Array(w>1?w-1:0),P=1;P<w;P++)I[P-1]=arguments[P];return u.produce(S,function(T){var W;return(W=c).call.apply(W,[N,T].concat(I))})}}var p;if(typeof c!="function"&&V(6),l!==void 0&&typeof l!="function"&&V(7),ee(i)){var y=ua(n),h=Nr(n,i,void 0),g=!0;try{p=c(h),g=!1}finally{g?Dt(y):Rr(y)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(S){return Cr(y,l),Er(S,y)},function(S){throw Dt(y),S}):(Cr(y,l),Er(p,y))}if(!i||typeof i!="object"){if((p=c(i))===void 0&&(p=i),p===Sa&&(p=void 0),n.D&&kr(p,!0),l){var v=[],b=[];oe("Patches").M(i,p,v,b),l(v,b)}return p}V(21,i)},this.produceWithPatches=function(i,c){if(typeof i=="function")return function(p){for(var y=arguments.length,h=Array(y>1?y-1:0),g=1;g<y;g++)h[g-1]=arguments[g];return n.produceWithPatches(p,function(v){return i.apply(void 0,[v].concat(h))})};var l,d,u=n.produce(i,c,function(p,y){l=p,d=y});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,l,d]}):[u,l,d]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=r.prototype;return t.createDraft=function(o){ee(o)||V(8),le(o)&&(o=Ni(o));var n=ua(this),i=Nr(this,o,void 0);return i[k].C=!0,Rr(n),i},t.finishDraft=function(o,n){var i=o&&o[k],c=i.A;return Cr(c,n),Er(void 0,c)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!ga&&V(20),this.O=o},t.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var c=n[i];if(c.path.length===0&&c.op==="replace"){o=c.value;break}}i>-1&&(n=n.slice(i+1));var l=oe("Patches").$;return le(o)?l(o,n):this.produce(o,function(d){return l(d,n)})},r}(),$=new Li,ki=$.produce,$f=$.produceWithPatches.bind($),Kf=$.setAutoFreeze.bind($),Vf=$.setUseProxies.bind($),Zf=$.applyPatches.bind($),qf=$.createDraft.bind($),Yf=$.finishDraft.bind($),Mt=ki;function _e(r){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(r)}function Ca(r,t){if(_e(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var n=o.call(r,t||"default");if(_e(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function Ea(r){var t=Ca(r,"string");return _e(t)=="symbol"?t:t+""}function Aa(r,t,o){return(t=Ea(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function wa(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),o.push.apply(o,n)}return o}function Ur(r){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?wa(Object(o),!0).forEach(function(n){Aa(r,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):wa(Object(o)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(o,n))})}return r}function G(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Ia=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Br=function(){return Math.random().toString(36).substring(7).split("").join(".")},Wt={INIT:"@@redux/INIT"+Br(),REPLACE:"@@redux/REPLACE"+Br(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Br()}};function Fi(r){if(typeof r!="object"||r===null)return!1;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t}function Mr(r,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(G(1));return o(Mr)(r,t)}if(typeof r!="function")throw new Error(G(2));var i=r,c=t,l=[],d=l,u=!1;function p(){d===l&&(d=l.slice())}function y(){if(u)throw new Error(G(3));return c}function h(S){if(typeof S!="function")throw new Error(G(4));if(u)throw new Error(G(5));var N=!0;return p(),d.push(S),function(){if(N){if(u)throw new Error(G(6));N=!1,p();var I=d.indexOf(S);d.splice(I,1),l=null}}}function g(S){if(!Fi(S))throw new Error(G(7));if(typeof S.type>"u")throw new Error(G(8));if(u)throw new Error(G(9));try{u=!0,c=i(c,S)}finally{u=!1}for(var N=l=d,w=0;w<N.length;w++){var I=N[w];I()}return S}function v(S){if(typeof S!="function")throw new Error(G(10));i=S,g({type:Wt.REPLACE})}function b(){var S,N=h;return S={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(G(11));function P(){I.next&&I.next(y())}P();var T=N(P);return{unsubscribe:T}}},S[Ia]=function(){return this},S}return g({type:Wt.INIT}),n={dispatch:g,subscribe:h,getState:y,replaceReducer:v},n[Ia]=b,n}function Di(r){Object.keys(r).forEach(function(t){var o=r[t],n=o(void 0,{type:Wt.INIT});if(typeof n>"u")throw new Error(G(12));if(typeof o(void 0,{type:Wt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(G(13))})}function Ra(r){for(var t=Object.keys(r),o={},n=0;n<t.length;n++){var i=t[n];typeof r[i]=="function"&&(o[i]=r[i])}var c=Object.keys(o),l,d;try{Di(o)}catch(u){d=u}return function(p,y){if(p===void 0&&(p={}),d)throw d;if(0)var h;for(var g=!1,v={},b=0;b<c.length;b++){var S=c[b],N=o[S],w=p[S],I=N(w,y);if(typeof I>"u"){var P=y&&y.type;throw new Error(G(14))}v[S]=I,g=g||I!==w}return g=g||c.length!==Object.keys(p).length,g?v:p}}function Xe(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Na(){for(var r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),c=function(){throw new Error(G(15))},l={getState:i.getState,dispatch:function(){return c.apply(void 0,arguments)}},d=t.map(function(u){return u(l)});return c=Xe.apply(void 0,d)(i.dispatch),Ur(Ur({},i),{},{dispatch:c})}}}function Ta(r){var t=function(n){var i=n.dispatch,c=n.getState;return function(l){return function(d){return typeof d=="function"?d(i,c,r):l(d)}}};return t}var _a=Ta();_a.withExtraArgument=Ta;var Wr=_a;var Da=function(){var r=function(t,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(n[c]=i[c])},r(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ui=function(r,t){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},n,i,c,l;return l={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function d(p){return function(y){return u([p,y])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(c=p[0]&2?i.return:p[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,p[1])).done)return c;switch(i=0,c&&(p=[p[0]&2,c.value]),p[0]){case 0:case 1:c=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,i=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(c=o.trys,!(c=c.length>0&&c[c.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!c||p[1]>c[0]&&p[1]<c[3])){o.label=p[1];break}if(p[0]===6&&o.label<c[1]){o.label=c[1],c=p;break}if(c&&o.label<c[2]){o.label=c[2],o.ops.push(p);break}c[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(r,o)}catch(y){p=[6,y],i=0}finally{n=c=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Qe=function(r,t){for(var o=0,n=t.length,i=r.length;o<n;o++,i++)r[i]=t[o];return r},Bi=Object.defineProperty,Mi=Object.defineProperties,Wi=Object.getOwnPropertyDescriptors,Pa=Object.getOwnPropertySymbols,Hi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable,La=function(r,t,o){return t in r?Bi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[t]=o},me=function(r,t){for(var o in t||(t={}))Hi.call(t,o)&&La(r,o,t[o]);if(Pa)for(var n=0,i=Pa(t);n<i.length;n++){var o=i[n];zi.call(t,o)&&La(r,o,t[o])}return r},Hr=function(r,t){return Mi(r,Wi(t))},Gi=function(r,t,o){return new Promise(function(n,i){var c=function(u){try{d(o.next(u))}catch(p){i(p)}},l=function(u){try{d(o.throw(u))}catch(p){i(p)}},d=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(c,l)};d((o=o.apply(r,t)).next())})};var ji=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xe:Xe.apply(null,arguments)},hh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function $i(r){if(typeof r!="object"||r===null)return!1;var t=Object.getPrototypeOf(r);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}var Ki=function(r){Da(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Qe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Qe([void 0],o.concat(this))))},t}(Array),Vi=function(r){Da(t,r);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=r.apply(this,o)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return r.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Qe([void 0],o[0].concat(this)))):new(t.bind.apply(t,Qe([void 0],o.concat(this))))},t}(Array);function jr(r){return ee(r)?Mt(r,function(){}):r}function Zi(r){return typeof r=="boolean"}function qi(){return function(t){return Yi(t)}}function Yi(r){r===void 0&&(r={});var t=r.thunk,o=t===void 0?!0:t,n=r.immutableCheck,i=n===void 0?!0:n,c=r.serializableCheck,l=c===void 0?!0:c,d=new Ki;if(o&&(Zi(o)?d.push(Wr):d.push(Wr.withExtraArgument(o.extraArgument))),0){if(i)var u;if(l)var p}return d}var zr=!0;function Ua(r){var t=qi(),o=r||{},n=o.reducer,i=n===void 0?void 0:n,c=o.middleware,l=c===void 0?t():c,d=o.devTools,u=d===void 0?!0:d,p=o.preloadedState,y=p===void 0?void 0:p,h=o.enhancers,g=h===void 0?void 0:h,v;if(typeof i=="function")v=i;else if($i(i))v=Ra(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var b=l;if(typeof b=="function"&&(b=b(t),!zr&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!zr&&b.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Na.apply(void 0,b),N=Xe;u&&(N=ji(me({trace:!zr},typeof u=="object"&&u)));var w=new Vi(S),I=w;Array.isArray(g)?I=Qe([S],g):typeof g=="function"&&(I=g(w));var P=N.apply(void 0,I);return Mr(v,y,P)}function be(r,t){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var c=t.apply(void 0,n);if(!c)throw new Error("prepareAction did not return an object");return me(me({type:r,payload:c.payload},"meta"in c&&{meta:c.meta}),"error"in c&&{error:c.error})}return{type:r,payload:n[0]}}return o.toString=function(){return""+r},o.type=r,o.match=function(n){return n.type===r},o}function Ba(r){var t={},o=[],n,i={addCase:function(c,l){var d=typeof c=="string"?c:c.type;if(d in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[d]=l,i},addMatcher:function(c,l){return o.push({matcher:c,reducer:l}),i},addDefaultCase:function(c){return n=c,i}};return r(i),[t,o,n]}function Xi(r){return typeof r=="function"}function Qi(r,t,o,n){o===void 0&&(o=[]);var i=typeof t=="function"?Ba(t):[t,o,n],c=i[0],l=i[1],d=i[2],u;if(Xi(r))u=function(){return jr(r())};else{var p=jr(r);u=function(){return p}}function y(h,g){h===void 0&&(h=u());var v=Qe([c[g.type]],l.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return v.filter(function(b){return!!b}).length===0&&(v=[d]),v.reduce(function(b,S){if(S)if(le(b)){var N=b,w=S(N,g);return w===void 0?b:w}else{if(ee(b))return Mt(b,function(I){return S(I,g)});var w=S(b,g);if(w===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return b},h)}return y.getInitialState=u,y}function Ji(r,t){return r+"/"+t}function Ma(r){var t=r.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof r.initialState=="function"?r.initialState:jr(r.initialState),n=r.reducers||{},i=Object.keys(n),c={},l={},d={};i.forEach(function(y){var h=n[y],g=Ji(t,y),v,b;"reducer"in h?(v=h.reducer,b=h.prepare):v=h,c[y]=v,l[g]=v,d[y]=b?be(g,b):be(g)});function u(){var y=typeof r.extraReducers=="function"?Ba(r.extraReducers):[r.extraReducers],h=y[0],g=h===void 0?{}:h,v=y[1],b=v===void 0?[]:v,S=y[2],N=S===void 0?void 0:S,w=me(me({},g),l);return Qi(o,function(I){for(var P in w)I.addCase(P,w[P]);for(var T=0,W=b;T<W.length;T++){var q=W[T];I.addMatcher(q.matcher,q.reducer)}N&&I.addDefaultCase(N)})}var p;return{name:t,reducer:function(y,h){return p||(p=u()),p(y,h)},actions:d,caseReducers:c,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var ec="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",tc=function(r){r===void 0&&(r=21);for(var t="",o=r;o--;)t+=ec[Math.random()*64|0];return t},rc=["name","message","stack","code"],Gr=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),ka=function(){function r(t,o){this.payload=t,this.meta=o}return r}(),oc=function(r){if(typeof r=="object"&&r!==null){for(var t={},o=0,n=rc;o<n.length;o++){var i=n[o];typeof r[i]=="string"&&(t[i]=r[i])}return t}return{message:String(r)}},bh=function(){function r(t,o,n){var i=be(t+"/fulfilled",function(y,h,g,v){return{payload:y,meta:Hr(me({},v||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),c=be(t+"/pending",function(y,h,g){return{payload:void 0,meta:Hr(me({},g||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),l=be(t+"/rejected",function(y,h,g,v,b){return{payload:v,error:(n&&n.serializeError||oc)(y||"Rejected"),meta:Hr(me({},b||{}),{arg:g,requestId:h,rejectedWithValue:!!v,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),d=!1,u=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function p(y){return function(h,g,v){var b=n?.idGenerator?n.idGenerator(y):tc(),S=new u,N,w=!1;function I(T){N=T,S.abort()}var P=function(){return Gi(this,null,function(){var T,W,q,xe,j,ve,Pe;return Ui(this,function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),xe=(T=n?.condition)==null?void 0:T.call(n,y,{getState:g,extra:v}),ac(xe)?[4,xe]:[3,2];case 1:xe=f.sent(),f.label=2;case 2:if(xe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,j=new Promise(function(m,E){return S.signal.addEventListener("abort",function(){return E({name:"AbortError",message:N||"Aborted"})})}),h(c(b,y,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:b,arg:y},{getState:g,extra:v}))),[4,Promise.race([j,Promise.resolve(o(y,{dispatch:h,getState:g,extra:v,requestId:b,signal:S.signal,abort:I,rejectWithValue:function(m,E){return new Gr(m,E)},fulfillWithValue:function(m,E){return new ka(m,E)}})).then(function(m){if(m instanceof Gr)throw m;return m instanceof ka?i(m.payload,b,y,m.meta):i(m,b,y)})])];case 3:return q=f.sent(),[3,5];case 4:return ve=f.sent(),q=ve instanceof Gr?l(null,b,y,ve.payload,ve.meta):l(ve,b,y),[3,5];case 5:return Pe=n&&!n.dispatchConditionRejection&&l.match(q)&&q.meta.condition,Pe||h(q),[2,q]}})})}();return Object.assign(P,{abort:I,requestId:b,arg:y,unwrap:function(){return P.then(nc)}})}}return Object.assign(p,{pending:c,rejected:l,fulfilled:i,typePrefix:t})}return r.withTypes=function(){return r},r}();function nc(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function ac(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Wa="listener",Ha="completed",za="cancelled",xh="task-"+za,vh="task-"+Ha,Sh=Wa+"-"+za,Oh=Wa+"-"+Ha;var $r="listenerMiddleware";var Ch=be($r+"/add"),Eh=be($r+"/removeAll"),Ah=be($r+"/remove");var Fa,wh=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Fa||(Fa=Promise.resolve())).then(r).catch(function(t){return setTimeout(function(){throw t},0)})},ic=function(r){return function(t){setTimeout(t,r)}},Ih=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ic(10);va();function cc(r,t){return class extends r{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Ht=class extends cc(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ga=class r extends Ht{static get(t){var o;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,c=window.ftReduxStores[n];if(Ft(c))return c;if(i==null)return;let l=Ma({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),d=Ua({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?l.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:l.reducer(u,p)});return window.ftReduxStores[i.name]=new r(l,d,i.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new _t;let i=c=>c!=null?JSON.parse(JSON.stringify(c)):c;this.actions=new Proxy(this.reduxSlice.actions,{get:(c,l,d)=>{let u=l,p=c[u];return p?(...y)=>{let h=p(...y.map(i));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[u]:i(y)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Gt=A(D());var zt=class extends Q{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=O.getState().session;return!!t?.sessionAuthenticated}};var lc="ft-user-assets",dc={setAssetCount:(r,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;r.assetCounts.allAsset[o]=n},clearAssetCount:r=>{Object.values(Ie).forEach(t=>{r.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(r,t)=>{let o=t.payload.mapId;r.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}}},Z=Gt.FtReduxStore.get({name:lc,reducers:dc,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ie).map(r=>[r,void 0])),bookmarkByMap:{}}}}),Kr=class{constructor(t=new zt){this.assetCountsService=t,this.currentSession=O.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ot,this.savedSearchesService=new It,O.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=O.getState();(0,Gt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){Z.actions.clearAssetCount(),Z.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Z.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Z.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Z.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&Z.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&Z.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(Z.getState().assetCounts.bookmarkByMap).length!==0;t===Ie.BOOKMARKS&&o&&Z.actions.clearBookmarkCountByMap(),Z.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Z.actions.bookmarks(o)}}},uc=new Kr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=uc);(0,ja.customElement)("ft-app-context")(L);var Ja=A(D());var Zt=A(Y()),qt=A(X()),Yt=A(D());var $a=A(Y());var Ka=$a.css`
121
121
  `;var Kt=A(D());var Xa=A(X());var pc=A(D());function Va(r){return r.match(/^[\w-]+\.[\w-]+$/)}var fc=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},Za=Symbol("i18nAttributes"),qa=Symbol("i18nListAttributes"),Qa=Symbol("i18nProperties"),jt=Symbol("i18nContexts"),lt=Symbol("i18nUnsubs");function Vt(r){var t,o;class n extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(c){return c??this.useCustomMessageContexts?Et:$e}i18n(c){var l;this.hasI18nContext(c.context)||this.addI18nContext(c.context,void 0,c.custom);let d=(l=c.args)!==null&&l!==void 0?l:c.argsProvider?c.argsProvider(this):[];return this.getI18nService(c.custom).resolveMessage(c.context,c.key,...d)}customI18n(c,l){if(Va(c)){let[d,u]=c.split(".");return this.i18n({custom:!0,context:d,key:u,...l})||c}return c}firstUpdated(c){super.firstUpdated(c),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(c){super.update(c),this.updateI18nAttributes((l,d,u)=>c.has(d)||typeof l.argsProvider=="function"),this.updateI18nProperties(l=>typeof l.argsProvider=="function")}onI18nUpdate(c){this.updateI18nAttributes((l,d,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===c}),this.updateI18nProperties(l=>l.context.toLowerCase()===c),this.requestUpdate()}updateI18nAttributes(c){var l,d;let u=this,p=(y,h,g)=>g?.context&&g.key&&c(y,h,g)?{...g,message:this.i18n({context:g.context,key:g.key,...y})}:g;(l=this[Za])===null||l===void 0||l.forEach((y,h)=>u[h]=p(y,h,u[h])),(d=this[qa])===null||d===void 0||d.forEach((y,h)=>{var g;return u[h]=(g=u[h])===null||g===void 0?void 0:g.map(v=>p(y,h,v))})}updateI18nProperties(c){var l;(l=this[Qa])===null||l===void 0||l.forEach((d,u)=>{c(d,u)&&(this[u]=this.i18n(d))})}addI18nMessages(c,l,d){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(c,l,d)}addI18nContext(c,l,d){let u=(typeof c=="string"?c:c.name).toLowerCase();d=typeof c=="string"?d:c.custom,this[jt].set(u,{isCustomContext:d}),this[lt].has(u)||this[lt].set(u,this.getI18nService(d).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(d).prepareContext(u,l)}hasI18nContext(c){return this[jt].has(c.toLowerCase())}connectedCallback(){super.connectedCallback(),this[jt].forEach((c,l)=>this.addI18nContext(l,void 0,c.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[lt].forEach(c=>c()),this[lt].clear()}}return t=jt,o=lt,fc([(0,Xa.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}var Ya=class extends Vt(Kt.FtLitElement){},$t=class extends Vt(Kt.FtLitElementRedux){};var dt=function(r,t,o,n){var i=arguments.length,c=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(r,t,o,n);else for(var d=r.length-1;d>=0;d--)(l=r[d])&&(c=(i<3?l(c):i>3?l(t,o,c):l(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},te=class extends $t{constructor(){super(),this.editorMode=!1,this.addStore(O)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Zt.nothing:Zt.html`
122
122
  <span class="ft-i18n">
123
123
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}