@fluid-topics/ft-search-sort-selector 1.3.61 → 1.3.62

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.
@@ -1308,7 +1308,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
1308
1308
  `;var ur=E(P());var _0=E(P());var I2=E(Q()),fe=E(ie()),Me=E(P());var Z1=E(Q());var q1=Z1.css`
1309
1309
  `;var ya=E(P()),xh="ft-app-info",wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};wt.eventName="authentication-change";var Sh={session:(e,t)=>{(0,ya.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>R.dispatchEvent(new wt(t.payload)),0))}},R=ya.FtReduxStore.get({name:xh,reducers:Sh,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 $n=E(P());var _t=class e{static get(t){let{baseUrl:a,apiIntegrationIdentifier:o}=R.getState(),n=t??o;if(a&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(a,n,!0)}static await(t){return new Promise(a=>{let o=e.get(t);if(o)a(o);else{let n=R.subscribe(()=>{o=e.get(t),o&&(n(),a(o))})}})}};var ba=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:_t.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):_t.await()}};var ge=class extends ba{constructor(t=!0,a){var o;super(a),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new $n.CacheRegistry,this.cache=t?n.commonCache:new $n.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((a,o)=>0|31*a+o.charCodeAt(0),0))}};var va=class extends ge{async listMyBookmarks(){let t=R.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var jn=class{addCommand(t,a=!1){R.commands.add(t,a)}consumeCommand(t){return R.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new jn;var Ce=E(P());var Y1,rr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Ch=Symbol("clearAfterUnitTest"),xa=class extends(0,Ce.withEventBus)(ge){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Y1]=()=>{this.defaultMessages={},this.cache=new Ce.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=R.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let a=t.name.toLowerCase();this.cache.setFinal(a,t),this.notify(a)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,a){var o;if(t=t.toLowerCase(),a&&Object.keys(a).length>0){let n={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...a};(0,Ce.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var a,o;return this.fetchContext(t),(o=(a=this.cache.getNow(t))===null||a===void 0?void 0:a.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,a){let o=t.toLowerCase();return this.resolveContext(o)[a]}resolveMessage(t,a,...o){var n;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ce.ParametrizedLabelResolver((n=this.defaultMessages[i])!==null&&n!==void 0?n:{},s).resolve(a,...o)}async fetchContext(t){let a=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),a&&await this.notify(t)}catch(n){!(n instanceof Ce.CanceledPromiseError)&&a&&console.error(n)}return o}subscribe(t,a){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(a),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(a)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new rr({loadedContexts:t})),this.dispatchEvent(new rr({loadedContexts:t})),await Promise.all(t.map(a=>this.notify(a,!1)))}async notify(t,a=!0){a&&(document.body.dispatchEvent(new rr({loadedContexts:[t]})),this.dispatchEvent(new rr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Ce.delay)(0).then(()=>o()).catch(()=>null)))}};Y1=Ch;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends xa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends xa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var ar=window.FluidTopicsI18nService,Sa=window.FluidTopicsCustomI18nService;var X1=E(P()),Kn=class{highlightHtml(t,a,o){(0,X1.highlightHtml)(t,a,o)}};window.FluidTopicsHighlightHtmlService=new Kn;var Lh=E(J1(),1);var e2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(e2||(e2={}));var t2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(t2||(t2={}));var r2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(r2||(r2={}));var a2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(a2||(a2={}));var o2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(o2||(o2={}));var n2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(n2||(n2={}));var i2;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(i2||(i2={}));var s2;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(s2||(s2={}));var c2;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW"})(c2||(c2={}));var l2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(l2||(l2={}));var d2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(d2||(d2={}));var f2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(f2||(f2={}));var u2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(u2||(u2={}));var p2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(p2||(p2={}));var Vn;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Vn||(Vn={}));var h2;(function(e){e.ASC="ASC",e.DESC="DESC"})(h2||(h2={}));var m2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(m2||(m2={}));var Zn;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Zn||(Zn={}));var g2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(g2||(g2={}));var y2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(y2||(y2={}));var b2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(b2||(b2={}));var v2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(v2||(v2={}));var x2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(x2||(x2={}));var qn;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(qn||(qn={}));var S2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(S2||(S2={}));var ae;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(ae||(ae={}));var Ee;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ee||(Ee={}));var C2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(C2||(C2={}));var E2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(E2||(E2={}));var L2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(L2||(L2={}));var A2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(A2||(A2={}));var O2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(O2||(O2={}));var R2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(R2||(R2={}));var Eh={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function N2(e,t){return e===t||(Eh[e]??[]).some(a=>N2(a,t))}function w2(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(o=>N2(o,t))}var La=class extends ge{async listMySearches(){let{session:t}=R.getState();return w2(t,ae.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var _2=E(P());var Yn=class{isDate(t){var a,o,n,i;return(i=(n=((o=(a=R.getState().metadataConfiguration)===null||a===void 0?void 0:a.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,a){var o,n,i;return _2.DateFormatter.format(t,(o=a?.locale)!==null&&o!==void 0?o:R.getState().uiLocale,(n=a?.longFormat)!==null&&n!==void 0?n:!1,(i=a?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Yn;var M2=E(P());var Ir=class{static get(t,a){var o,n;let i=R.getState(),{lang:s,region:l}=(n=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new M2.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,a??`${s}-${l}`)}};var Xn=class{urlToSearchRequest(t){return Ir.get().parse(t)}searchRequestToUrl(t){return Ir.get().serialize(t)}};window.FluidTopicsUrlService=new Xn;var lt=E(P());var Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Mt.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let a=sessionStorage.getItem(this.itemName(t));return a?JSON.parse(a):void 0}set(t,a){sessionStorage.setItem(this.itemName(t),JSON.stringify(a))}},T2=new Qn;var Aa=class e extends lt.WithEventBus{static build(){return new e(window.history,T2,()=>window.location,!1)}constructor(t,a,o,n){var i,s;super(),this.history=t,this.historyStorage=a,this.windowLocation=o,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,a=!1){let o=a&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,lt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Mt(this.currentItem())),0)}installProxies(){let t=a=>(o,n,[i,s,l])=>{let f=a(),p={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[p,s,l]),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 a=this.history.length-1;a>=0;a--)t?this.states[a]=this.historyStorage.get(a):setTimeout(()=>this.states[a]=this.historyStorage.get(a),this.history.length-a)}updateCurrentState(t){var a;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(a=t?.title)!==null&&a!==void 0?a:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(t){this.addEventListener(Mt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Mt.eventName,t)}currentItem(){return(0,lt.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,lt.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,lt.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 a;let o=(a=this.states[t])===null||a===void 0?void 0:a.majorStateId;if(!o)return t;let n=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(n=i),i++;return n}buildCurrentState(){var t,a;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(a=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&a!==void 0?a:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,a){var o;if(!this.hasState(t))return!1;let n=a??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Aa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});function z2(e,t){let{authenticationRequired:a,session:o}=R.getState();return a&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var oe=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},Z=class extends Me.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=()=>_t.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Me.CacheRegistry,this.cleanSessionDebouncer=new Me.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return I2.html`
1310
1310
  <slot></slot>
1311
- `}connectedCallback(){super.connectedCallback(),R.addEventListener(wt.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(wt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var a,o,n,i,s,l,f;super.update(t),t.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&R.actions.noCustom(this.noCustom),t.has("editorMode")&&R.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&R.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>ar.addContext(p)),t.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(R.actions.defaultLocales((a=this.localesConfiguration)===null||a===void 0?void 0:a.defaultLocales),R.actions.availableUiLocales((n=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&n!==void 0?n:[]),R.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&R.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),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",()=>z2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Z.elementDefinitions={};Z.styles=q1;oe([(0,fe.property)()],Z.prototype,"baseUrl",void 0);oe([(0,fe.property)()],Z.prototype,"apiIntegrationIdentifier",void 0);oe([(0,fe.property)()],Z.prototype,"apiIntegrationAppVersion",void 0);oe([(0,fe.property)()],Z.prototype,"uiLocale",void 0);oe([(0,Me.jsonProperty)(null)],Z.prototype,"availableUiLocales",void 0);oe([(0,Me.jsonProperty)(null)],Z.prototype,"metadataConfiguration",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"editorMode",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"noCustom",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"openExternalDocumentInNewTab",void 0);oe([(0,fe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Z.prototype,"noCustomComponent",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"withManualResources",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"navigatorOnline",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"forcedOffline",void 0);oe([(0,fe.property)({type:Object})],Z.prototype,"apiProvider",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"authenticationRequired",void 0);oe([(0,Me.jsonProperty)([])],Z.prototype,"messageContexts",void 0);oe([(0,Me.jsonProperty)(void 0)],Z.prototype,"session",void 0);oe([(0,fe.state)()],Z.prototype,"localesConfiguration",void 0);oe([(0,fe.state)()],Z.prototype,"availableContentLocales",void 0);var Ei=E(ie());function Ah(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let a,o,n;if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;o--!==0;)if(!Oa(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!Oa(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(n=i(e),a=n.length,a!==i(t).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;o--!==0;){let s=n[o];if(!Oa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Oa(e,t){try{return Ah(e,t)}catch{return!1}}function Pr(e,t){return!Oa(e,t)}function Ra(e,t){let a=o=>o[e]===!0;return o=>{if(a(o))return o;let n=t(o);return n[e]=!0,n}}var P2=E(ie(),1);var Jn=e=>{let t=e??{};return(a,o)=>{var n;let i={hasChanged:Pr,attribute:!1,...t};(0,P2.property)(i)(a,o);let s=a.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=t.selector)!==null&&n!==void 0?n:l=>l[o],store:t.store})}};var Na=class{constructor(){this.queue=[]}add(t,a=!1){a&&this.clear(t.type),this.queue.push(t)}consume(t){let a=this.queue.find(o=>o.type===t);return a&&(this.queue=this.queue.filter(o=>o!==a)),a}clear(t){typeof t=="string"?this.queue=this.queue.filter(a=>a.type!==t):this.queue=this.queue.filter(a=>!t.test(a.type))}};var Tt=E(ie(),1);var k2=E(ie(),1);function D2(e,t){let a=()=>JSON.parse(JSON.stringify(e));return(0,k2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return a();try{return JSON.parse(o)}catch{return a()}},toAttribute:o=>JSON.stringify(o)},hasChanged:Pr,...t??{}})}var wa=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,a){return this.callbacks=[t],this.debounce(a)}queue(t,a){return this.callbacks.push(t),this.debounce(a)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((a,o)=>{this.resolvePromise=a,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,a;let o=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(a=this.resolvePromise)!==null&&a!==void 0?a:()=>null;this.clearPromise();for(let s of o)try{await s()}catch(l){n(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var B2=E(Q(),1);var _a=globalThis,Oh=_a.ShadowRoot&&(_a.ShadyCSS===void 0||_a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vS=Symbol();var U2=(e,t)=>{if(Oh)e.adoptedStyleSheets=t.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet);else for(let a of t){let o=document.createElement("style"),n=_a.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=a.cssText,e.appendChild(o)}};var Ma=class extends B2.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let a={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(a);return U2(o,t.elementStyles),o}};function H2(e,t,...a){var o;let n=e.querySelector(t);for(let i of a)n=(o=n?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return n}var ir=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},$2,G2=Symbol("constructorPrototype"),F2=Symbol("constructorName"),j2=Symbol("exportpartsDebouncer"),W2=Symbol("dynamicDependenciesLoaded"),nr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};nr.eventName="exportparts-updated";var Ue=class extends Ma{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[$2]=new wa(5),this.scheduleExportpartsUpdate=()=>{var t,a,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)!==null&&o!==void 0&&o)&&this[j2].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[F2]=this.constructor.name,this[G2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[F2]&&Object.setPrototypeOf(this,this[G2])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let a=this.constructor;a[W2]||(a[W2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(nr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(nr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new nr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:a,selector:o,shadowPath:n}=this.elementToFocus;if(o!=null){let i=[...n??[],o];a=H2(this.shadowRoot,...i)}a?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||a?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var a,o,n;if(((o=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var a,o,n,i,s,l;let f=b=>b!=null&&b.trim().length>0,p=t.filter(f).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(o=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let v=(i=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...v,...S].filter(f).map(_=>_.trim());for(let _ of L)m.add(_)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>p.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};$2=j2;ir([(0,Tt.property)()],Ue.prototype,"exportpartsPrefix",void 0);ir([D2([])],Ue.prototype,"exportpartsPrefixes",void 0);ir([(0,Tt.property)({reflect:!0})],Ue.prototype,"exportparts",void 0);ir([(0,Tt.property)()],Ue.prototype,"customStylesheet",void 0);ir([(0,Tt.property)()],Ue.prototype,"elementToFocus",void 0);ir([(0,Tt.state)()],Ue.prototype,"useAdoptedStyleSheets",void 0);function Ta(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var kr=Symbol("internalReduxEventsUnsubscribers"),dt=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores"),Rh=Ra(Symbol("withRedux"),function(e){var t,a,o;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[a]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[zt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[zt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[zt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[zt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[dt].has(s.store):this[dt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var f;this[dt].set(s,l.subscribe(()=>this.updateFromStores())),this[kr].set(s,[]),Ta(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=b=>this[m](b);l.addEventListener(p.eventName,g),this[kr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[dt].has(s)&&this[dt].get(s)(),this[dt].delete(s),(l=this[kr].get(s))===null||l===void 0||l.forEach(f=>f()),this[kr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=dt,a=zt,o=kr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),K2=class extends Rh(Ue){};function Le(e){for(var t=arguments.length,a=Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(a.length?" "+a.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ye(e){return!!e&&!!e[Y]}function Te(e){var t;return!!e&&(function(a){if(!a||typeof a!="object")return!1;var o=Object.getPrototypeOf(a);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Ph}(e)||Array.isArray(e)||!!e[J2]||!!(!((t=e.constructor)===null||t===void 0)&&t[J2])||ci(e)||li(e))}function It(e,t,a){a===void 0&&(a=!1),lr(e)===0?(a?Object.keys:cr)(e).forEach(function(o){a&&typeof o=="symbol"||t(o,e[o],e)}):e.forEach(function(o,n){return t(n,o,e)})}function lr(e){var t=e[Y];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ci(e)?2:li(e)?3:0}function sr(e,t){return lr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Nh(e,t){return lr(e)===2?e.get(t):e[t]}function e0(e,t,a){var o=lr(e);o===2?e.set(t,a):o===3?e.add(a):e[t]=a}function t0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ci(e){return zh&&e instanceof Map}function li(e){return Ih&&e instanceof Set}function ft(e){return e.o||e.t}function di(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=o0(e);delete t[Y];for(var a=cr(t),o=0;o<a.length;o++){var n=a[o],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function fi(e,t){return t===void 0&&(t=!1),ui(e)||Ye(e)||!Te(e)||(lr(e)>1&&(e.set=e.add=e.clear=e.delete=wh),Object.freeze(e),t&&It(e,function(a,o){return fi(o,!0)},!0)),e}function wh(){Le(2)}function ui(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Be(e){var t=si[e];return t||Le(18,e),t}function _h(e,t){si[e]||(si[e]=t)}function oi(){return Ur}function ei(e,t){t&&(Be("Patches"),e.u=[],e.s=[],e.v=t)}function za(e){ni(e),e.p.forEach(Mh),e.p=null}function ni(e){e===Ur&&(Ur=e.l)}function V2(e){return Ur={p:[],l:Ur,h:e,m:!0,_:0}}function Mh(e){var t=e[Y];t.i===0||t.i===1?t.j():t.g=!0}function ti(e,t){t._=t.p.length;var a=t.p[0],o=e!==void 0&&e!==a;return t.h.O||Be("ES5").S(t,e,o),o?(a[Y].P&&(za(t),Le(4)),Te(e)&&(e=Ia(t,e),t.l||Pa(t,e)),t.u&&Be("Patches").M(a[Y].t,e,t.u,t.s)):e=Ia(t,a,[]),za(t),t.u&&t.v(t.u,t.s),e!==a0?e:void 0}function Ia(e,t,a){if(ui(t))return t;var o=t[Y];if(!o)return It(t,function(l,f){return Z2(e,o,t,l,f,a)},!0),t;if(o.A!==e)return t;if(!o.P)return Pa(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=di(o.k):o.o,i=n,s=!1;o.i===3&&(i=new Set(n),n.clear(),s=!0),It(i,function(l,f){return Z2(e,o,n,l,f,a,s)}),Pa(e,n,!1),a&&e.u&&Be("Patches").N(o,a,e.u,e.s)}return o.o}function Z2(e,t,a,o,n,i,s){if(Ye(n)){var l=Ia(e,n,i&&t&&t.i!==3&&!sr(t.R,o)?i.concat(o):void 0);if(e0(a,o,l),!Ye(l))return;e.m=!1}else s&&a.add(n);if(Te(n)&&!ui(n)){if(!e.h.D&&e._<1)return;Ia(e,n),t&&t.A.l||Pa(e,n)}}function Pa(e,t,a){a===void 0&&(a=!1),!e.l&&e.h.D&&e.m&&fi(t,a)}function ri(e,t){var a=e[Y];return(a?ft(a):e)[t]}function q2(e,t){if(t in e)for(var a=Object.getPrototypeOf(e);a;){var o=Object.getOwnPropertyDescriptor(a,t);if(o)return o;a=Object.getPrototypeOf(a)}}function ut(e){e.P||(e.P=!0,e.l&&ut(e.l))}function ai(e){e.o||(e.o=di(e.t))}function ii(e,t,a){var o=ci(t)?Be("MapSet").F(t,a):li(t)?Be("MapSet").T(t,a):e.O?function(n,i){var s=Array.isArray(n),l={i:s?1:0,A:i?i.A:oi(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},f=l,p=Br;s&&(f=[l],p=Dr);var m=Proxy.revocable(f,p),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b}(t,a):Be("ES5").J(t,a);return(a?a.A:oi()).p.push(o),o}function Th(e){return Ye(e)||Le(22,e),function t(a){if(!Te(a))return a;var o,n=a[Y],i=lr(a);if(n){if(!n.P&&(n.i<4||!Be("ES5").K(n)))return n.t;n.I=!0,o=Y2(a,i),n.I=!1}else o=Y2(a,i);return It(o,function(s,l){n&&Nh(n.t,s)===l||e0(o,s,t(l))}),i===3?new Set(o):o}(e)}function Y2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return di(e)}function r0(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var p=this[Y];return Br.get(p,s)},set:function(p){var m=this[Y];Br.set(m,s,p)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Y];if(!f.P)switch(f.i){case 5:o(f)&&ut(f);break;case 4:a(f)&&ut(f)}}}function a(s){for(var l=s.t,f=s.k,p=cr(f),m=p.length-1;m>=0;m--){var g=p[m];if(g!==Y){var b=l[g];if(b===void 0&&!sr(l,g))return!0;var v=f[g],S=v&&v[Y];if(S?S.t!==b:!t0(v,b))return!0}}var L=!!l[Y];return p.length!==cr(l).length+(L?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&Le(3,JSON.stringify(ft(s)))}var i={};_h("ES5",{J:function(s,l){var f=Array.isArray(s),p=function(g,b){if(g){for(var v=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(v,""+S,e(S,!0));return v}var L=o0(b);delete L[Y];for(var _=cr(L),N=0;N<_.length;N++){var M=_[N];L[M]=e(M,g||!!L[M].enumerable)}return Object.create(Object.getPrototypeOf(b),L)}(f,s),m={i:f?5:4,A:l?l.A:oi(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Y,{value:m,writable:!0}),p},S:function(s,l,f){f?Ye(l)&&l[Y].A===s&&t(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var g=m[Y];if(g){var b=g.t,v=g.k,S=g.R,L=g.i;if(L===4)It(v,function(H){H!==Y&&(b[H]!==void 0||sr(b,H)?S[H]||p(v[H]):(S[H]=!0,ut(g)))}),It(b,function(H){v[H]!==void 0||sr(v,H)||(S[H]=!1,ut(g))});else if(L===5){if(o(g)&&(ut(g),S.length=!0),v.length<b.length)for(var _=v.length;_<b.length;_++)S[_]=!1;else for(var N=b.length;N<v.length;N++)S[N]=!0;for(var M=Math.min(v.length,b.length),U=0;U<M;U++)v.hasOwnProperty(U)||(S[U]=!0),S[U]===void 0&&p(v[U])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?a(s):o(s)}})}var X2,Ur,pi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",zh=typeof Map<"u",Ih=typeof Set<"u",Q2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",a0=pi?Symbol.for("immer-nothing"):((X2={})["immer-nothing"]=!0,X2),J2=pi?Symbol.for("immer-draftable"):"__$immer_draftable",Y=pi?Symbol.for("immer-state"):"__$immer_state";var Ph=""+Object.prototype.constructor,cr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,o0=Object.getOwnPropertyDescriptors||function(e){var t={};return cr(e).forEach(function(a){t[a]=Object.getOwnPropertyDescriptor(e,a)}),t},si={},Br={get:function(e,t){if(t===Y)return e;var a=ft(e);if(!sr(a,t))return function(n,i,s){var l,f=q2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,a,t);var o=a[t];return e.I||!Te(o)?o:o===ri(e.t,t)?(ai(e),e.o[t]=ii(e.A.h,o,e)):o},has:function(e,t){return t in ft(e)},ownKeys:function(e){return Reflect.ownKeys(ft(e))},set:function(e,t,a){var o=q2(ft(e),t);if(o?.set)return o.set.call(e.k,a),!0;if(!e.P){var n=ri(ft(e),t),i=n?.[Y];if(i&&i.t===a)return e.o[t]=a,e.R[t]=!1,!0;if(t0(a,n)&&(a!==void 0||sr(e.t,t)))return!0;ai(e),ut(e)}return e.o[t]===a&&(a!==void 0||t in e.o)||Number.isNaN(a)&&Number.isNaN(e.o[t])||(e.o[t]=a,e.R[t]=!0),!0},deleteProperty:function(e,t){return ri(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ai(e),ut(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var a=ft(e),o=Reflect.getOwnPropertyDescriptor(a,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:a[t]}},defineProperty:function(){Le(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Le(12)}},Dr={};It(Br,function(e,t){Dr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Dr.deleteProperty=function(e,t){return Dr.set.call(this,e,t,void 0)},Dr.set=function(e,t,a){return Br.set.call(this,e[0],t,a,e[0])};var kh=function(){function e(a){var o=this;this.O=Q2,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var l=i;i=n;var f=o;return function(L){var _=this;L===void 0&&(L=l);for(var N=arguments.length,M=Array(N>1?N-1:0),U=1;U<N;U++)M[U-1]=arguments[U];return f.produce(L,function(H){var W;return(W=i).call.apply(W,[_,H].concat(M))})}}var p;if(typeof i!="function"&&Le(6),s!==void 0&&typeof s!="function"&&Le(7),Te(n)){var m=V2(o),g=ii(o,n,void 0),b=!0;try{p=i(g),b=!1}finally{b?za(m):ni(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(L){return ei(m,s),ti(L,m)},function(L){throw za(m),L}):(ei(m,s),ti(p,m))}if(!n||typeof n!="object"){if((p=i(n))===void 0&&(p=n),p===a0&&(p=void 0),o.D&&fi(p,!0),s){var v=[],S=[];Be("Patches").M(n,p,v,S),s(v,S)}return p}Le(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return o.produceWithPatches(p,function(v){return n.apply(void 0,[v].concat(g))})};var s,l,f=o.produce(n,i,function(p,m){s=p,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,s,l]}):[f,s,l]},typeof a?.useProxies=="boolean"&&this.setUseProxies(a.useProxies),typeof a?.autoFreeze=="boolean"&&this.setAutoFreeze(a.autoFreeze)}var t=e.prototype;return t.createDraft=function(a){Te(a)||Le(8),Ye(a)&&(a=Th(a));var o=V2(this),n=ii(this,a,void 0);return n[Y].C=!0,ni(o),n},t.finishDraft=function(a,o){var n=a&&a[Y],i=n.A;return ei(i,o),ti(void 0,i)},t.setAutoFreeze=function(a){this.D=a},t.setUseProxies=function(a){a&&!Q2&&Le(20),this.O=a},t.applyPatches=function(a,o){var n;for(n=o.length-1;n>=0;n--){var i=o[n];if(i.path.length===0&&i.op==="replace"){a=i.value;break}}n>-1&&(o=o.slice(n+1));var s=Be("Patches").$;return Ye(a)?s(a,o):this.produce(a,function(l){return s(l,o)})},e}(),ve=new kh,Dh=ve.produce,IS=ve.produceWithPatches.bind(ve),PS=ve.setAutoFreeze.bind(ve),kS=ve.setUseProxies.bind(ve),DS=ve.applyPatches.bind(ve),US=ve.createDraft.bind(ve),BS=ve.finishDraft.bind(ve),ka=Dh;function Pt(e){"@babel/helpers - typeof";return Pt=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},Pt(e)}function n0(e,t){if(Pt(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var o=a.call(e,t||"default");if(Pt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i0(e){var t=n0(e,"string");return Pt(t)=="symbol"?t:t+""}function s0(e,t,a){return(t=i0(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c0(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,o)}return a}function hi(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(a),!0).forEach(function(o){s0(e,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c0(Object(a)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(a,o))})}return e}function pe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var l0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mi=function(){return Math.random().toString(36).substring(7).split("").join(".")},Da={INIT:"@@redux/INIT"+mi(),REPLACE:"@@redux/REPLACE"+mi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mi()}};function Uh(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gi(e,t,a){var o;if(typeof t=="function"&&typeof a=="function"||typeof a=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof a>"u"&&(a=t,t=void 0),typeof a<"u"){if(typeof a!="function")throw new Error(pe(1));return a(gi)(e,t)}if(typeof e!="function")throw new Error(pe(2));var n=e,i=t,s=[],l=s,f=!1;function p(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(pe(3));return i}function g(L){if(typeof L!="function")throw new Error(pe(4));if(f)throw new Error(pe(5));var _=!0;return p(),l.push(L),function(){if(_){if(f)throw new Error(pe(6));_=!1,p();var M=l.indexOf(L);l.splice(M,1),s=null}}}function b(L){if(!Uh(L))throw new Error(pe(7));if(typeof L.type>"u")throw new Error(pe(8));if(f)throw new Error(pe(9));try{f=!0,i=n(i,L)}finally{f=!1}for(var _=s=l,N=0;N<_.length;N++){var M=_[N];M()}return L}function v(L){if(typeof L!="function")throw new Error(pe(10));n=L,b({type:Da.REPLACE})}function S(){var L,_=g;return L={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(pe(11));function U(){M.next&&M.next(m())}U();var H=_(U);return{unsubscribe:H}}},L[l0]=function(){return this},L}return b({type:Da.INIT}),o={dispatch:b,subscribe:g,getState:m,replaceReducer:v},o[l0]=S,o}function Bh(e){Object.keys(e).forEach(function(t){var a=e[t],o=a(void 0,{type:Da.INIT});if(typeof o>"u")throw new Error(pe(12));if(typeof a(void 0,{type:Da.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function d0(e){for(var t=Object.keys(e),a={},o=0;o<t.length;o++){var n=t[o];typeof e[n]=="function"&&(a[n]=e[n])}var i=Object.keys(a),s,l;try{Bh(a)}catch(f){l=f}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var b=!1,v={},S=0;S<i.length;S++){var L=i[S],_=a[L],N=p[L],M=_(N,m);if(typeof M>"u"){var U=m&&m.type;throw new Error(pe(14))}v[L]=M,b=b||M!==N}return b=b||i.length!==Object.keys(p).length,b?v:p}}function dr(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function f0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(o){return function(){var n=o.apply(void 0,arguments),i=function(){throw new Error(pe(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=dr.apply(void 0,l)(n.dispatch),hi(hi({},n),{},{dispatch:i})}}}function u0(e){var t=function(o){var n=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,i,e):s(l)}}};return t}var p0=u0();p0.withExtraArgument=u0;var yi=p0;var b0=function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function o(){this.constructor=t}t.prototype=a===null?Object.create(a):(o.prototype=a.prototype,new o)}}(),Hh=function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return f([p,m])}}function f(p){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=p[0]&2?n.return:p[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,p[1])).done)return i;switch(n=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return a.label++,{value:p[1],done:!1};case 5:a.label++,n=p[1],p=[0];continue;case 7:p=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){a=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){a.label=p[1];break}if(p[0]===6&&a.label<i[1]){a.label=i[1],i=p;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(p);break}i[2]&&a.ops.pop(),a.trys.pop();continue}p=t.call(e,a)}catch(m){p=[6,m],n=0}finally{o=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},fr=function(e,t){for(var a=0,o=t.length,n=e.length;a<o;a++,n++)e[n]=t[a];return e},Gh=Object.defineProperty,Fh=Object.defineProperties,Wh=Object.getOwnPropertyDescriptors,h0=Object.getOwnPropertySymbols,$h=Object.prototype.hasOwnProperty,jh=Object.prototype.propertyIsEnumerable,m0=function(e,t,a){return t in e?Gh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a},pt=function(e,t){for(var a in t||(t={}))$h.call(t,a)&&m0(e,a,t[a]);if(h0)for(var o=0,n=h0(t);o<n.length;o++){var a=n[o];jh.call(t,a)&&m0(e,a,t[a])}return e},bi=function(e,t){return Fh(e,Wh(t))},Kh=function(e,t,a){return new Promise(function(o,n){var i=function(f){try{l(a.next(f))}catch(p){n(p)}},s=function(f){try{l(a.throw(f))}catch(p){n(p)}},l=function(f){return f.done?o(f.value):Promise.resolve(f.value).then(i,s)};l((a=a.apply(e,t)).next())})};var Vh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dr:dr.apply(null,arguments)},aC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Zh(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var a=t;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return t===a}var qh=function(e){b0(t,e);function t(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var n=e.apply(this,a)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return e.prototype.concat.apply(this,a)},t.prototype.prepend=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return a.length===1&&Array.isArray(a[0])?new(t.bind.apply(t,fr([void 0],a[0].concat(this)))):new(t.bind.apply(t,fr([void 0],a.concat(this))))},t}(Array),Yh=function(e){b0(t,e);function t(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var n=e.apply(this,a)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return e.prototype.concat.apply(this,a)},t.prototype.prepend=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return a.length===1&&Array.isArray(a[0])?new(t.bind.apply(t,fr([void 0],a[0].concat(this)))):new(t.bind.apply(t,fr([void 0],a.concat(this))))},t}(Array);function Si(e){return Te(e)?ka(e,function(){}):e}function Xh(e){return typeof e=="boolean"}function Qh(){return function(t){return Jh(t)}}function Jh(e){e===void 0&&(e={});var t=e.thunk,a=t===void 0?!0:t,o=e.immutableCheck,n=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,l=new qh;if(a&&(Xh(a)?l.push(yi):l.push(yi.withExtraArgument(a.extraArgument))),0){if(n)var f;if(s)var p}return l}var vi=!0;function v0(e){var t=Qh(),a=e||{},o=a.reducer,n=o===void 0?void 0:o,i=a.middleware,s=i===void 0?t():i,l=a.devTools,f=l===void 0?!0:l,p=a.preloadedState,m=p===void 0?void 0:p,g=a.enhancers,b=g===void 0?void 0:g,v;if(typeof n=="function")v=n;else if(Zh(n))v=d0(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(t),!vi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vi&&S.some(function(H){return typeof H!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=f0.apply(void 0,S),_=dr;f&&(_=Vh(pt({trace:!vi},typeof f=="object"&&f)));var N=new Yh(L),M=N;Array.isArray(b)?M=fr([L],b):typeof b=="function"&&(M=b(N));var U=_.apply(void 0,M);return gi(v,m,U)}function ht(e,t){function a(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return pt(pt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return a.toString=function(){return""+e},a.type=e,a.match=function(o){return o.type===e},a}function x0(e){var t={},a=[],o,n={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(i,s){return a.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return o=i,n}};return e(n),[t,a,o]}function em(e){return typeof e=="function"}function tm(e,t,a,o){a===void 0&&(a=[]);var n=typeof t=="function"?x0(t):[t,a,o],i=n[0],s=n[1],l=n[2],f;if(em(e))f=function(){return Si(e())};else{var p=Si(e);f=function(){return p}}function m(g,b){g===void 0&&(g=f());var v=fr([i[b.type]],s.filter(function(S){var L=S.matcher;return L(b)}).map(function(S){var L=S.reducer;return L}));return v.filter(function(S){return!!S}).length===0&&(v=[l]),v.reduce(function(S,L){if(L)if(Ye(S)){var _=S,N=L(_,b);return N===void 0?S:N}else{if(Te(S))return ka(S,function(M){return L(M,b)});var N=L(S,b);if(N===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return S},g)}return m.getInitialState=f,m}function rm(e,t){return e+"/"+t}function S0(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var a=typeof e.initialState=="function"?e.initialState:Si(e.initialState),o=e.reducers||{},n=Object.keys(o),i={},s={},l={};n.forEach(function(m){var g=o[m],b=rm(t,m),v,S;"reducer"in g?(v=g.reducer,S=g.prepare):v=g,i[m]=v,s[b]=v,l[m]=S?ht(b,S):ht(b)});function f(){var m=typeof e.extraReducers=="function"?x0(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,v=m[1],S=v===void 0?[]:v,L=m[2],_=L===void 0?void 0:L,N=pt(pt({},b),s);return tm(a,function(M){for(var U in N)M.addCase(U,N[U]);for(var H=0,W=S;H<W.length;H++){var he=W[H];M.addMatcher(he.matcher,he.reducer)}_&&M.addDefaultCase(_)})}var p;return{name:t,reducer:function(m,g){return p||(p=f()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var am="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",om=function(e){e===void 0&&(e=21);for(var t="",a=e;a--;)t+=am[Math.random()*64|0];return t},nm=["name","message","stack","code"],xi=function(){function e(t,a){this.payload=t,this.meta=a}return e}(),g0=function(){function e(t,a){this.payload=t,this.meta=a}return e}(),im=function(e){if(typeof e=="object"&&e!==null){for(var t={},a=0,o=nm;a<o.length;a++){var n=o[a];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},sC=function(){function e(t,a,o){var n=ht(t+"/fulfilled",function(m,g,b,v){return{payload:m,meta:bi(pt({},v||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=ht(t+"/pending",function(m,g,b){return{payload:void 0,meta:bi(pt({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=ht(t+"/rejected",function(m,g,b,v,S){return{payload:v,error:(o&&o.serializeError||im)(m||"Rejected"),meta:bi(pt({},S||{}),{arg:b,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(g,b,v){var S=o?.idGenerator?o.idGenerator(m):om(),L=new f,_,N=!1;function M(H){_=H,L.abort()}var U=function(){return Kh(this,null,function(){var H,W,he,He,ne,Ge,Dt;return Hh(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),He=(H=o?.condition)==null?void 0:H.call(o,m,{getState:b,extra:v}),cm(He)?[4,He]:[3,2];case 1:He=y.sent(),y.label=2;case 2:if(He===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ne=new Promise(function(x,z){return L.signal.addEventListener("abort",function(){return z({name:"AbortError",message:_||"Aborted"})})}),g(i(S,m,(W=o?.getPendingMeta)==null?void 0:W.call(o,{requestId:S,arg:m},{getState:b,extra:v}))),[4,Promise.race([ne,Promise.resolve(a(m,{dispatch:g,getState:b,extra:v,requestId:S,signal:L.signal,abort:M,rejectWithValue:function(x,z){return new xi(x,z)},fulfillWithValue:function(x,z){return new g0(x,z)}})).then(function(x){if(x instanceof xi)throw x;return x instanceof g0?n(x.payload,S,m,x.meta):n(x,S,m)})])];case 3:return he=y.sent(),[3,5];case 4:return Ge=y.sent(),he=Ge instanceof xi?s(null,S,m,Ge.payload,Ge.meta):s(Ge,S,m),[3,5];case 5:return Dt=o&&!o.dispatchConditionRejection&&s.match(he)&&he.meta.condition,Dt||g(he),[2,he]}})})}();return Object.assign(U,{abort:M,requestId:S,arg:m,unwrap:function(){return U.then(sm)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function sm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var C0="listener",E0="completed",L0="cancelled",cC="task-"+L0,lC="task-"+E0,dC=C0+"-"+L0,fC=C0+"-"+E0;var Ci="listenerMiddleware";var uC=ht(Ci+"/add"),pC=ht(Ci+"/removeAll"),hC=ht(Ci+"/remove");var y0,mC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(y0||(y0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},lm=function(e){return function(t){setTimeout(t,e)}},gC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lm(10);r0();var dm=Ra(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(a,o,n){this.eventBus.addEventListener(a,o,n)}dispatchEvent(a){return this.eventBus.dispatchEvent(a)}removeEventListener(a,o,n){this.eventBus.removeEventListener(a,o,n)}}}),Ua=class extends dm(Object){};window.ftReduxStores||(window.ftReduxStores={});var A0=class e extends Ua{static get(t){var a;let o=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Ta(i))return i;if(n==null)return;let s=S0({...n,reducers:(a=n.reducers)!==null&&a!==void 0?a:{}}),l=v0({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:s.reducer(f,p)});return window.ftReduxStores[n.name]=new e(s,l,n.eventBus)}constructor(t,a,o){super(),this.reduxSlice=t,this.reduxStore=a,this.isFtReduxStore=!0,this.commands=new Na;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,p=i[f];return p?(...m)=>{let g=p(...m.map(n));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:n(m)})}}}),this.eventBus=o??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 Ba=class{static format(t,a,o,n){return window.moment?window.moment(t).locale(a).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(t,a,o,n)}static getMomentDateFormat(t,a){return t?a?"lll":"ll":a?"L LT":"L"}static getIntlDateTime(t,a,o,n){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(a,{dateStyle:o?"medium":"short"}).format(i);if(!n)return s;let l=new Intl.DateTimeFormat(a,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),a=new Date().getTimezoneOffset();return`${a<0?"+":"-"}${t(Math.abs(a)/60)}:${t(Math.abs(a)%60)}`}};var O0=E(P()),Ha=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},FC=(0,O0.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,i;return((i=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?l=>Ba.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ha([(0,Ei.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ha([(0,Ei.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ha([Jn({store:R.name,selector:a=>{var o,n;return(n=(o=a.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),Ha([Jn({store:R.name})],t.prototype,"uiLocale",void 0),t});var Wa=E(P());var Ga=class extends ge{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=R.getState().session;return!!t?.sessionAuthenticated}};var Fa=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=R.getState().session;return!!t?.sessionAuthenticated}};var fm="ft-user-assets",um={setAssetCount:(e,t)=>{let{userAssetType:a,count:o}=t.payload.assetCount;e.assetCounts.allAsset[a]=o},clearAssetCount:e=>{Object.values(Ee).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let a=t.payload.mapId;e.assetCounts.bookmarkByMap[a]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:a,mapId:o,asset:n}=t.payload;Ai(e,a,[...Li(e,a),n]),R0(e,a,1,o),N0(e,n)},editAsset:(e,t)=>{let{assetType:a,asset:o}=t.payload;Ai(e,a,Li(e,a).map(n=>n.id===o.id?o:n)),N0(e,o)},removeAsset:(e,t)=>{let{assetType:a,mapId:o,assetId:n}=t.payload;Ai(e,a,Li(e,a).filter(i=>i.id!==n)),R0(e,a,-1,o)}},w0={[Ee.SEARCHES]:"savedSearches",[Ee.BOOKMARKS]:"bookmarks",[Ee.BOOKS]:void 0,[Ee.COLLECTIONS]:void 0},Li=(e,t)=>{var a;let o=w0[t];return o?(a=e[o])!==null&&a!==void 0?a:[]:[]},Ai=(e,t,a)=>{let o=w0[t];o&&(e[o]=a)},R0=(e,t,a,o)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+a),t===Ee.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+a)}},N0=(e,t)=>{let a=e.assetLabels.map(n=>n.title),o=t.labels.filter(n=>!a.includes(n)).map(n=>({title:n}));e.assetLabels.push(...o)},xe=Wa.FtReduxStore.get({name:fm,reducers:um,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ee).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Oi=class{constructor(t=new Ga,a=new Fa){this.assetCountsService=t,this.assetLabelsService=a,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new va,this.savedSearchesService=new La,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:a}=R.getState();(0,Wa.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,a?.profile)||(this.currentSession=a,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),xe.actions.clearAssetCount(),xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();xe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();xe.actions.assetLabels(t)}async loadAssetCount(t){let a=await this.assetCountsService.getUserAssetCount(t);a&&xe.actions.setAssetCount({assetCount:a})}async loadBookmarkByMapId(t){let a=await this.assetCountsService.getUserBookmarkCountByMap(t);a&&xe.actions.setBookmarkCountByMap({count:a.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let a=Object.keys(xe.getState().assetCounts.bookmarkByMap).length!==0;t===Ee.BOOKMARKS&&a&&xe.actions.clearBookmarkCountByMap(),xe.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 a=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xe.actions.bookmarks(a)}}},pm=new Oi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pm);(0,_0.customElement)("ft-app-context")(Z);var T0=E(ie());var Ri=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:!0,message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},kt=new Ri;var hm=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},z0=Symbol("i18nAttributes"),Gr=Symbol("i18nListAttributes"),I0=Symbol("i18nProperties"),$a=Symbol("i18nContexts"),Hr=Symbol("i18nUnsubs"),Ka=(0,ur.applyMixinOnce)(Symbol("withI18n"),function(e){var t,a;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[a]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Sa:ar}i18n(i){let{context:s,key:l,message:f}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(kt.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var p;return((p=f?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,p=(m,g,b)=>b?.context&&b.key&&i(m,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[z0])===null||s===void 0||s.forEach((m,g)=>f[g]=p(m,g,f[g])),(l=this[Gr])===null||l===void 0||l.forEach((m,g)=>{var b;return f[g]=(b=f[g])===null||b===void 0?void 0:b.map(v=>p(m,g,v))})}updateI18nProperties(i){var s;(s=this[I0])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[$a].set(f,{isCustomContext:l}),this[Hr].has(f)||this[Hr].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[$a].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[$a].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Hr].forEach(i=>i()),this[Hr].clear()}}return t=$a,a=Hr,hm([(0,T0.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),M0=class extends Ka(ur.FtLitElement){},ja=class extends Ka(ur.FtLitElementRedux){};var Fr=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},ze=class extends ja{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Va.nothing:Va.html`
1311
+ `}connectedCallback(){super.connectedCallback(),R.addEventListener(wt.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(wt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var a,o,n,i,s,l,f;super.update(t),t.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&R.actions.noCustom(this.noCustom),t.has("editorMode")&&R.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&R.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>ar.addContext(p)),t.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(R.actions.defaultLocales((a=this.localesConfiguration)===null||a===void 0?void 0:a.defaultLocales),R.actions.availableUiLocales((n=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&n!==void 0?n:[]),R.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&R.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),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",()=>z2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Z.elementDefinitions={};Z.styles=q1;oe([(0,fe.property)()],Z.prototype,"baseUrl",void 0);oe([(0,fe.property)()],Z.prototype,"apiIntegrationIdentifier",void 0);oe([(0,fe.property)()],Z.prototype,"apiIntegrationAppVersion",void 0);oe([(0,fe.property)()],Z.prototype,"uiLocale",void 0);oe([(0,Me.jsonProperty)(null)],Z.prototype,"availableUiLocales",void 0);oe([(0,Me.jsonProperty)(null)],Z.prototype,"metadataConfiguration",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"editorMode",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"noCustom",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"openExternalDocumentInNewTab",void 0);oe([(0,fe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Z.prototype,"noCustomComponent",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"withManualResources",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"navigatorOnline",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"forcedOffline",void 0);oe([(0,fe.property)({type:Object})],Z.prototype,"apiProvider",void 0);oe([(0,fe.property)({type:Boolean})],Z.prototype,"authenticationRequired",void 0);oe([(0,Me.jsonProperty)([])],Z.prototype,"messageContexts",void 0);oe([(0,Me.jsonProperty)(void 0)],Z.prototype,"session",void 0);oe([(0,fe.state)()],Z.prototype,"localesConfiguration",void 0);oe([(0,fe.state)()],Z.prototype,"availableContentLocales",void 0);var Ei=E(ie());function Ah(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let a,o,n;if(Array.isArray(e)){if(a=e.length,a!=t.length)return!1;for(o=a;o--!==0;)if(!Oa(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!Oa(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(n=i(e),a=n.length,a!==i(t).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[o]))return!1;for(o=a;o--!==0;){let s=n[o];if(!Oa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Oa(e,t){try{return Ah(e,t)}catch{return!1}}function Pr(e,t){return!Oa(e,t)}function Ra(e,t){let a=o=>o[e]===!0;return o=>{if(a(o))return o;let n=t(o);return n[e]=!0,n}}var P2=E(ie(),1);var Jn=e=>{let t=e??{};return(a,o)=>{var n;let i={hasChanged:Pr,attribute:!1,...t};(0,P2.property)(i)(a,o);let s=a.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=t.selector)!==null&&n!==void 0?n:l=>l[o],store:t.store})}};var Na=class{constructor(){this.queue=[]}add(t,a=!1){a&&this.clear(t.type),this.queue.push(t)}consume(t){let a=this.queue.find(o=>o.type===t);return a&&(this.queue=this.queue.filter(o=>o!==a)),a}clear(t){typeof t=="string"?this.queue=this.queue.filter(a=>a.type!==t):this.queue=this.queue.filter(a=>!t.test(a.type))}};var Tt=E(ie(),1);var k2=E(ie(),1);function D2(e,t){let a=()=>JSON.parse(JSON.stringify(e));return(0,k2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return a();try{return JSON.parse(o)}catch{return a()}},toAttribute:o=>JSON.stringify(o)},hasChanged:Pr,...t??{}})}var wa=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,a){return this.callbacks=[t],this.debounce(a)}queue(t,a){return this.callbacks.push(t),this.debounce(a)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((a,o)=>{this.resolvePromise=a,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,a;let o=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(a=this.resolvePromise)!==null&&a!==void 0?a:()=>null;this.clearPromise();for(let s of o)try{await s()}catch(l){n(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var B2=E(Q(),1);var _a=globalThis,Oh=_a.ShadowRoot&&(_a.ShadyCSS===void 0||_a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vS=Symbol();var U2=(e,t)=>{if(Oh)e.adoptedStyleSheets=t.map(a=>a instanceof CSSStyleSheet?a:a.styleSheet);else for(let a of t){let o=document.createElement("style"),n=_a.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=a.cssText,e.appendChild(o)}};var Ma=class extends B2.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([n,i])=>t.registry.define(n,i)));let a={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(a);return U2(o,t.elementStyles),o}};function H2(e,t,...a){var o;let n=e.querySelector(t);for(let i of a)n=(o=n?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return n}var ir=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},$2,G2=Symbol("constructorPrototype"),F2=Symbol("constructorName"),j2=Symbol("exportpartsDebouncer"),W2=Symbol("dynamicDependenciesLoaded"),nr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};nr.eventName="exportparts-updated";var Ue=class extends Ma{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[$2]=new wa(5),this.scheduleExportpartsUpdate=()=>{var t,a,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)!==null&&o!==void 0&&o)&&this[j2].run(()=>{var n,i;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[F2]=this.constructor.name,this[G2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[F2]&&Object.setPrototypeOf(this,this[G2])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let a=this.constructor;a[W2]||(a[W2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(nr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(nr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new nr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:a,selector:o,shadowPath:n}=this.elementToFocus;if(o!=null){let i=[...n??[],o];a=H2(this.shadowRoot,...i)}a?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||a?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var a,o,n;if(((o=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var a,o,n,i,s,l;let f=b=>b!=null&&b.trim().length>0,p=t.filter(f).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(o=(a=this.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let v=(i=(n=b.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...v,...S].filter(f).map(_=>_.trim());for(let _ of L)m.add(_)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>p.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};$2=j2;ir([(0,Tt.property)()],Ue.prototype,"exportpartsPrefix",void 0);ir([D2([])],Ue.prototype,"exportpartsPrefixes",void 0);ir([(0,Tt.property)({reflect:!0})],Ue.prototype,"exportparts",void 0);ir([(0,Tt.property)()],Ue.prototype,"customStylesheet",void 0);ir([(0,Tt.property)()],Ue.prototype,"elementToFocus",void 0);ir([(0,Tt.state)()],Ue.prototype,"useAdoptedStyleSheets",void 0);function Ta(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var kr=Symbol("internalReduxEventsUnsubscribers"),dt=Symbol("internalStoresUnsubscribers"),zt=Symbol("internalStores"),Rh=Ra(Symbol("withRedux"),function(e){var t,a,o;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[a]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[zt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[zt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[zt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[zt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[zt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[zt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[dt].has(s.store):this[dt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var f;this[dt].set(s,l.subscribe(()=>this.updateFromStores())),this[kr].set(s,[]),Ta(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=b=>this[m](b);l.addEventListener(p.eventName,g),this[kr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[dt].has(s)&&this[dt].get(s)(),this[dt].delete(s),(l=this[kr].get(s))===null||l===void 0||l.forEach(f=>f()),this[kr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=dt,a=zt,o=kr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),K2=class extends Rh(Ue){};function Le(e){for(var t=arguments.length,a=Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];if(0)var n,i;throw Error("[Immer] minified error nr: "+e+(a.length?" "+a.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ye(e){return!!e&&!!e[Y]}function Te(e){var t;return!!e&&(function(a){if(!a||typeof a!="object")return!1;var o=Object.getPrototypeOf(a);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Ph}(e)||Array.isArray(e)||!!e[J2]||!!(!((t=e.constructor)===null||t===void 0)&&t[J2])||ci(e)||li(e))}function It(e,t,a){a===void 0&&(a=!1),lr(e)===0?(a?Object.keys:cr)(e).forEach(function(o){a&&typeof o=="symbol"||t(o,e[o],e)}):e.forEach(function(o,n){return t(n,o,e)})}function lr(e){var t=e[Y];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ci(e)?2:li(e)?3:0}function sr(e,t){return lr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Nh(e,t){return lr(e)===2?e.get(t):e[t]}function e0(e,t,a){var o=lr(e);o===2?e.set(t,a):o===3?e.add(a):e[t]=a}function t0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ci(e){return zh&&e instanceof Map}function li(e){return Ih&&e instanceof Set}function ft(e){return e.o||e.t}function di(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=o0(e);delete t[Y];for(var a=cr(t),o=0;o<a.length;o++){var n=a[o],i=t[n];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[n]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function fi(e,t){return t===void 0&&(t=!1),ui(e)||Ye(e)||!Te(e)||(lr(e)>1&&(e.set=e.add=e.clear=e.delete=wh),Object.freeze(e),t&&It(e,function(a,o){return fi(o,!0)},!0)),e}function wh(){Le(2)}function ui(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Be(e){var t=si[e];return t||Le(18,e),t}function _h(e,t){si[e]||(si[e]=t)}function oi(){return Ur}function ei(e,t){t&&(Be("Patches"),e.u=[],e.s=[],e.v=t)}function za(e){ni(e),e.p.forEach(Mh),e.p=null}function ni(e){e===Ur&&(Ur=e.l)}function V2(e){return Ur={p:[],l:Ur,h:e,m:!0,_:0}}function Mh(e){var t=e[Y];t.i===0||t.i===1?t.j():t.g=!0}function ti(e,t){t._=t.p.length;var a=t.p[0],o=e!==void 0&&e!==a;return t.h.O||Be("ES5").S(t,e,o),o?(a[Y].P&&(za(t),Le(4)),Te(e)&&(e=Ia(t,e),t.l||Pa(t,e)),t.u&&Be("Patches").M(a[Y].t,e,t.u,t.s)):e=Ia(t,a,[]),za(t),t.u&&t.v(t.u,t.s),e!==a0?e:void 0}function Ia(e,t,a){if(ui(t))return t;var o=t[Y];if(!o)return It(t,function(l,f){return Z2(e,o,t,l,f,a)},!0),t;if(o.A!==e)return t;if(!o.P)return Pa(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=di(o.k):o.o,i=n,s=!1;o.i===3&&(i=new Set(n),n.clear(),s=!0),It(i,function(l,f){return Z2(e,o,n,l,f,a,s)}),Pa(e,n,!1),a&&e.u&&Be("Patches").N(o,a,e.u,e.s)}return o.o}function Z2(e,t,a,o,n,i,s){if(Ye(n)){var l=Ia(e,n,i&&t&&t.i!==3&&!sr(t.R,o)?i.concat(o):void 0);if(e0(a,o,l),!Ye(l))return;e.m=!1}else s&&a.add(n);if(Te(n)&&!ui(n)){if(!e.h.D&&e._<1)return;Ia(e,n),t&&t.A.l||Pa(e,n)}}function Pa(e,t,a){a===void 0&&(a=!1),!e.l&&e.h.D&&e.m&&fi(t,a)}function ri(e,t){var a=e[Y];return(a?ft(a):e)[t]}function q2(e,t){if(t in e)for(var a=Object.getPrototypeOf(e);a;){var o=Object.getOwnPropertyDescriptor(a,t);if(o)return o;a=Object.getPrototypeOf(a)}}function ut(e){e.P||(e.P=!0,e.l&&ut(e.l))}function ai(e){e.o||(e.o=di(e.t))}function ii(e,t,a){var o=ci(t)?Be("MapSet").F(t,a):li(t)?Be("MapSet").T(t,a):e.O?function(n,i){var s=Array.isArray(n),l={i:s?1:0,A:i?i.A:oi(),P:!1,I:!1,R:{},l:i,t:n,k:null,o:null,j:null,C:!1},f=l,p=Br;s&&(f=[l],p=Dr);var m=Proxy.revocable(f,p),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b}(t,a):Be("ES5").J(t,a);return(a?a.A:oi()).p.push(o),o}function Th(e){return Ye(e)||Le(22,e),function t(a){if(!Te(a))return a;var o,n=a[Y],i=lr(a);if(n){if(!n.P&&(n.i<4||!Be("ES5").K(n)))return n.t;n.I=!0,o=Y2(a,i),n.I=!1}else o=Y2(a,i);return It(o,function(s,l){n&&Nh(n.t,s)===l||e0(o,s,t(l))}),i===3?new Set(o):o}(e)}function Y2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return di(e)}function r0(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var p=this[Y];return Br.get(p,s)},set:function(p){var m=this[Y];Br.set(m,s,p)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Y];if(!f.P)switch(f.i){case 5:o(f)&&ut(f);break;case 4:a(f)&&ut(f)}}}function a(s){for(var l=s.t,f=s.k,p=cr(f),m=p.length-1;m>=0;m--){var g=p[m];if(g!==Y){var b=l[g];if(b===void 0&&!sr(l,g))return!0;var v=f[g],S=v&&v[Y];if(S?S.t!==b:!t0(v,b))return!0}}var L=!!l[Y];return p.length!==cr(l).length+(L?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&Le(3,JSON.stringify(ft(s)))}var i={};_h("ES5",{J:function(s,l){var f=Array.isArray(s),p=function(g,b){if(g){for(var v=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(v,""+S,e(S,!0));return v}var L=o0(b);delete L[Y];for(var _=cr(L),N=0;N<_.length;N++){var M=_[N];L[M]=e(M,g||!!L[M].enumerable)}return Object.create(Object.getPrototypeOf(b),L)}(f,s),m={i:f?5:4,A:l?l.A:oi(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Y,{value:m,writable:!0}),p},S:function(s,l,f){f?Ye(l)&&l[Y].A===s&&t(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var g=m[Y];if(g){var b=g.t,v=g.k,S=g.R,L=g.i;if(L===4)It(v,function(H){H!==Y&&(b[H]!==void 0||sr(b,H)?S[H]||p(v[H]):(S[H]=!0,ut(g)))}),It(b,function(H){v[H]!==void 0||sr(v,H)||(S[H]=!1,ut(g))});else if(L===5){if(o(g)&&(ut(g),S.length=!0),v.length<b.length)for(var _=v.length;_<b.length;_++)S[_]=!1;else for(var N=b.length;N<v.length;N++)S[N]=!0;for(var M=Math.min(v.length,b.length),U=0;U<M;U++)v.hasOwnProperty(U)||(S[U]=!0),S[U]===void 0&&p(v[U])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?a(s):o(s)}})}var X2,Ur,pi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",zh=typeof Map<"u",Ih=typeof Set<"u",Q2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",a0=pi?Symbol.for("immer-nothing"):((X2={})["immer-nothing"]=!0,X2),J2=pi?Symbol.for("immer-draftable"):"__$immer_draftable",Y=pi?Symbol.for("immer-state"):"__$immer_state";var Ph=""+Object.prototype.constructor,cr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,o0=Object.getOwnPropertyDescriptors||function(e){var t={};return cr(e).forEach(function(a){t[a]=Object.getOwnPropertyDescriptor(e,a)}),t},si={},Br={get:function(e,t){if(t===Y)return e;var a=ft(e);if(!sr(a,t))return function(n,i,s){var l,f=q2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(n.k):void 0}(e,a,t);var o=a[t];return e.I||!Te(o)?o:o===ri(e.t,t)?(ai(e),e.o[t]=ii(e.A.h,o,e)):o},has:function(e,t){return t in ft(e)},ownKeys:function(e){return Reflect.ownKeys(ft(e))},set:function(e,t,a){var o=q2(ft(e),t);if(o?.set)return o.set.call(e.k,a),!0;if(!e.P){var n=ri(ft(e),t),i=n?.[Y];if(i&&i.t===a)return e.o[t]=a,e.R[t]=!1,!0;if(t0(a,n)&&(a!==void 0||sr(e.t,t)))return!0;ai(e),ut(e)}return e.o[t]===a&&(a!==void 0||t in e.o)||Number.isNaN(a)&&Number.isNaN(e.o[t])||(e.o[t]=a,e.R[t]=!0),!0},deleteProperty:function(e,t){return ri(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ai(e),ut(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var a=ft(e),o=Reflect.getOwnPropertyDescriptor(a,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:a[t]}},defineProperty:function(){Le(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Le(12)}},Dr={};It(Br,function(e,t){Dr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Dr.deleteProperty=function(e,t){return Dr.set.call(this,e,t,void 0)},Dr.set=function(e,t,a){return Br.set.call(this,e[0],t,a,e[0])};var kh=function(){function e(a){var o=this;this.O=Q2,this.D=!0,this.produce=function(n,i,s){if(typeof n=="function"&&typeof i!="function"){var l=i;i=n;var f=o;return function(L){var _=this;L===void 0&&(L=l);for(var N=arguments.length,M=Array(N>1?N-1:0),U=1;U<N;U++)M[U-1]=arguments[U];return f.produce(L,function(H){var W;return(W=i).call.apply(W,[_,H].concat(M))})}}var p;if(typeof i!="function"&&Le(6),s!==void 0&&typeof s!="function"&&Le(7),Te(n)){var m=V2(o),g=ii(o,n,void 0),b=!0;try{p=i(g),b=!1}finally{b?za(m):ni(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(L){return ei(m,s),ti(L,m)},function(L){throw za(m),L}):(ei(m,s),ti(p,m))}if(!n||typeof n!="object"){if((p=i(n))===void 0&&(p=n),p===a0&&(p=void 0),o.D&&fi(p,!0),s){var v=[],S=[];Be("Patches").M(n,p,v,S),s(v,S)}return p}Le(21,n)},this.produceWithPatches=function(n,i){if(typeof n=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return o.produceWithPatches(p,function(v){return n.apply(void 0,[v].concat(g))})};var s,l,f=o.produce(n,i,function(p,m){s=p,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,s,l]}):[f,s,l]},typeof a?.useProxies=="boolean"&&this.setUseProxies(a.useProxies),typeof a?.autoFreeze=="boolean"&&this.setAutoFreeze(a.autoFreeze)}var t=e.prototype;return t.createDraft=function(a){Te(a)||Le(8),Ye(a)&&(a=Th(a));var o=V2(this),n=ii(this,a,void 0);return n[Y].C=!0,ni(o),n},t.finishDraft=function(a,o){var n=a&&a[Y],i=n.A;return ei(i,o),ti(void 0,i)},t.setAutoFreeze=function(a){this.D=a},t.setUseProxies=function(a){a&&!Q2&&Le(20),this.O=a},t.applyPatches=function(a,o){var n;for(n=o.length-1;n>=0;n--){var i=o[n];if(i.path.length===0&&i.op==="replace"){a=i.value;break}}n>-1&&(o=o.slice(n+1));var s=Be("Patches").$;return Ye(a)?s(a,o):this.produce(a,function(l){return s(l,o)})},e}(),ve=new kh,Dh=ve.produce,IS=ve.produceWithPatches.bind(ve),PS=ve.setAutoFreeze.bind(ve),kS=ve.setUseProxies.bind(ve),DS=ve.applyPatches.bind(ve),US=ve.createDraft.bind(ve),BS=ve.finishDraft.bind(ve),ka=Dh;function Pt(e){"@babel/helpers - typeof";return Pt=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},Pt(e)}function n0(e,t){if(Pt(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var o=a.call(e,t||"default");if(Pt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i0(e){var t=n0(e,"string");return Pt(t)=="symbol"?t:t+""}function s0(e,t,a){return(t=i0(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c0(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,o)}return a}function hi(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(a),!0).forEach(function(o){s0(e,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c0(Object(a)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(a,o))})}return e}function pe(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var l0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mi=function(){return Math.random().toString(36).substring(7).split("").join(".")},Da={INIT:"@@redux/INIT"+mi(),REPLACE:"@@redux/REPLACE"+mi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mi()}};function Uh(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gi(e,t,a){var o;if(typeof t=="function"&&typeof a=="function"||typeof a=="function"&&typeof arguments[3]=="function")throw new Error(pe(0));if(typeof t=="function"&&typeof a>"u"&&(a=t,t=void 0),typeof a<"u"){if(typeof a!="function")throw new Error(pe(1));return a(gi)(e,t)}if(typeof e!="function")throw new Error(pe(2));var n=e,i=t,s=[],l=s,f=!1;function p(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(pe(3));return i}function g(L){if(typeof L!="function")throw new Error(pe(4));if(f)throw new Error(pe(5));var _=!0;return p(),l.push(L),function(){if(_){if(f)throw new Error(pe(6));_=!1,p();var M=l.indexOf(L);l.splice(M,1),s=null}}}function b(L){if(!Uh(L))throw new Error(pe(7));if(typeof L.type>"u")throw new Error(pe(8));if(f)throw new Error(pe(9));try{f=!0,i=n(i,L)}finally{f=!1}for(var _=s=l,N=0;N<_.length;N++){var M=_[N];M()}return L}function v(L){if(typeof L!="function")throw new Error(pe(10));n=L,b({type:Da.REPLACE})}function S(){var L,_=g;return L={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(pe(11));function U(){M.next&&M.next(m())}U();var H=_(U);return{unsubscribe:H}}},L[l0]=function(){return this},L}return b({type:Da.INIT}),o={dispatch:b,subscribe:g,getState:m,replaceReducer:v},o[l0]=S,o}function Bh(e){Object.keys(e).forEach(function(t){var a=e[t],o=a(void 0,{type:Da.INIT});if(typeof o>"u")throw new Error(pe(12));if(typeof a(void 0,{type:Da.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(pe(13))})}function d0(e){for(var t=Object.keys(e),a={},o=0;o<t.length;o++){var n=t[o];typeof e[n]=="function"&&(a[n]=e[n])}var i=Object.keys(a),s,l;try{Bh(a)}catch(f){l=f}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var b=!1,v={},S=0;S<i.length;S++){var L=i[S],_=a[L],N=p[L],M=_(N,m);if(typeof M>"u"){var U=m&&m.type;throw new Error(pe(14))}v[L]=M,b=b||M!==N}return b=b||i.length!==Object.keys(p).length,b?v:p}}function dr(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function f0(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return function(o){return function(){var n=o.apply(void 0,arguments),i=function(){throw new Error(pe(15))},s={getState:n.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=dr.apply(void 0,l)(n.dispatch),hi(hi({},n),{},{dispatch:i})}}}function u0(e){var t=function(o){var n=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,i,e):s(l)}}};return t}var p0=u0();p0.withExtraArgument=u0;var yi=p0;var b0=function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(o[i]=n[i])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function o(){this.constructor=t}t.prototype=a===null?Object.create(a):(o.prototype=a.prototype,new o)}}(),Hh=function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return f([p,m])}}function f(p){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(i=p[0]&2?n.return:p[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,p[1])).done)return i;switch(n=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return a.label++,{value:p[1],done:!1};case 5:a.label++,n=p[1],p=[0];continue;case 7:p=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){a=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){a.label=p[1];break}if(p[0]===6&&a.label<i[1]){a.label=i[1],i=p;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(p);break}i[2]&&a.ops.pop(),a.trys.pop();continue}p=t.call(e,a)}catch(m){p=[6,m],n=0}finally{o=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},fr=function(e,t){for(var a=0,o=t.length,n=e.length;a<o;a++,n++)e[n]=t[a];return e},Gh=Object.defineProperty,Fh=Object.defineProperties,Wh=Object.getOwnPropertyDescriptors,h0=Object.getOwnPropertySymbols,$h=Object.prototype.hasOwnProperty,jh=Object.prototype.propertyIsEnumerable,m0=function(e,t,a){return t in e?Gh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a},pt=function(e,t){for(var a in t||(t={}))$h.call(t,a)&&m0(e,a,t[a]);if(h0)for(var o=0,n=h0(t);o<n.length;o++){var a=n[o];jh.call(t,a)&&m0(e,a,t[a])}return e},bi=function(e,t){return Fh(e,Wh(t))},Kh=function(e,t,a){return new Promise(function(o,n){var i=function(f){try{l(a.next(f))}catch(p){n(p)}},s=function(f){try{l(a.throw(f))}catch(p){n(p)}},l=function(f){return f.done?o(f.value):Promise.resolve(f.value).then(i,s)};l((a=a.apply(e,t)).next())})};var Vh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dr:dr.apply(null,arguments)},aC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Zh(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var a=t;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return t===a}var qh=function(e){b0(t,e);function t(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var n=e.apply(this,a)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return e.prototype.concat.apply(this,a)},t.prototype.prepend=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return a.length===1&&Array.isArray(a[0])?new(t.bind.apply(t,fr([void 0],a[0].concat(this)))):new(t.bind.apply(t,fr([void 0],a.concat(this))))},t}(Array),Yh=function(e){b0(t,e);function t(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var n=e.apply(this,a)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return e.prototype.concat.apply(this,a)},t.prototype.prepend=function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return a.length===1&&Array.isArray(a[0])?new(t.bind.apply(t,fr([void 0],a[0].concat(this)))):new(t.bind.apply(t,fr([void 0],a.concat(this))))},t}(Array);function Si(e){return Te(e)?ka(e,function(){}):e}function Xh(e){return typeof e=="boolean"}function Qh(){return function(t){return Jh(t)}}function Jh(e){e===void 0&&(e={});var t=e.thunk,a=t===void 0?!0:t,o=e.immutableCheck,n=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,l=new qh;if(a&&(Xh(a)?l.push(yi):l.push(yi.withExtraArgument(a.extraArgument))),0){if(n)var f;if(s)var p}return l}var vi=!0;function v0(e){var t=Qh(),a=e||{},o=a.reducer,n=o===void 0?void 0:o,i=a.middleware,s=i===void 0?t():i,l=a.devTools,f=l===void 0?!0:l,p=a.preloadedState,m=p===void 0?void 0:p,g=a.enhancers,b=g===void 0?void 0:g,v;if(typeof n=="function")v=n;else if(Zh(n))v=d0(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(t),!vi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vi&&S.some(function(H){return typeof H!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=f0.apply(void 0,S),_=dr;f&&(_=Vh(pt({trace:!vi},typeof f=="object"&&f)));var N=new Yh(L),M=N;Array.isArray(b)?M=fr([L],b):typeof b=="function"&&(M=b(N));var U=_.apply(void 0,M);return gi(v,m,U)}function ht(e,t){function a(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return pt(pt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return a.toString=function(){return""+e},a.type=e,a.match=function(o){return o.type===e},a}function x0(e){var t={},a=[],o,n={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,n},addMatcher:function(i,s){return a.push({matcher:i,reducer:s}),n},addDefaultCase:function(i){return o=i,n}};return e(n),[t,a,o]}function em(e){return typeof e=="function"}function tm(e,t,a,o){a===void 0&&(a=[]);var n=typeof t=="function"?x0(t):[t,a,o],i=n[0],s=n[1],l=n[2],f;if(em(e))f=function(){return Si(e())};else{var p=Si(e);f=function(){return p}}function m(g,b){g===void 0&&(g=f());var v=fr([i[b.type]],s.filter(function(S){var L=S.matcher;return L(b)}).map(function(S){var L=S.reducer;return L}));return v.filter(function(S){return!!S}).length===0&&(v=[l]),v.reduce(function(S,L){if(L)if(Ye(S)){var _=S,N=L(_,b);return N===void 0?S:N}else{if(Te(S))return ka(S,function(M){return L(M,b)});var N=L(S,b);if(N===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return N}return S},g)}return m.getInitialState=f,m}function rm(e,t){return e+"/"+t}function S0(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var a=typeof e.initialState=="function"?e.initialState:Si(e.initialState),o=e.reducers||{},n=Object.keys(o),i={},s={},l={};n.forEach(function(m){var g=o[m],b=rm(t,m),v,S;"reducer"in g?(v=g.reducer,S=g.prepare):v=g,i[m]=v,s[b]=v,l[m]=S?ht(b,S):ht(b)});function f(){var m=typeof e.extraReducers=="function"?x0(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,v=m[1],S=v===void 0?[]:v,L=m[2],_=L===void 0?void 0:L,N=pt(pt({},b),s);return tm(a,function(M){for(var U in N)M.addCase(U,N[U]);for(var H=0,W=S;H<W.length;H++){var he=W[H];M.addMatcher(he.matcher,he.reducer)}_&&M.addDefaultCase(_)})}var p;return{name:t,reducer:function(m,g){return p||(p=f()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=f()),p.getInitialState()}}}var am="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",om=function(e){e===void 0&&(e=21);for(var t="",a=e;a--;)t+=am[Math.random()*64|0];return t},nm=["name","message","stack","code"],xi=function(){function e(t,a){this.payload=t,this.meta=a}return e}(),g0=function(){function e(t,a){this.payload=t,this.meta=a}return e}(),im=function(e){if(typeof e=="object"&&e!==null){for(var t={},a=0,o=nm;a<o.length;a++){var n=o[a];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},sC=function(){function e(t,a,o){var n=ht(t+"/fulfilled",function(m,g,b,v){return{payload:m,meta:bi(pt({},v||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=ht(t+"/pending",function(m,g,b){return{payload:void 0,meta:bi(pt({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=ht(t+"/rejected",function(m,g,b,v,S){return{payload:v,error:(o&&o.serializeError||im)(m||"Rejected"),meta:bi(pt({},S||{}),{arg:b,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(g,b,v){var S=o?.idGenerator?o.idGenerator(m):om(),L=new f,_,N=!1;function M(H){_=H,L.abort()}var U=function(){return Kh(this,null,function(){var H,W,he,He,ne,Ge,Dt;return Hh(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),He=(H=o?.condition)==null?void 0:H.call(o,m,{getState:b,extra:v}),cm(He)?[4,He]:[3,2];case 1:He=y.sent(),y.label=2;case 2:if(He===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return N=!0,ne=new Promise(function(x,z){return L.signal.addEventListener("abort",function(){return z({name:"AbortError",message:_||"Aborted"})})}),g(i(S,m,(W=o?.getPendingMeta)==null?void 0:W.call(o,{requestId:S,arg:m},{getState:b,extra:v}))),[4,Promise.race([ne,Promise.resolve(a(m,{dispatch:g,getState:b,extra:v,requestId:S,signal:L.signal,abort:M,rejectWithValue:function(x,z){return new xi(x,z)},fulfillWithValue:function(x,z){return new g0(x,z)}})).then(function(x){if(x instanceof xi)throw x;return x instanceof g0?n(x.payload,S,m,x.meta):n(x,S,m)})])];case 3:return he=y.sent(),[3,5];case 4:return Ge=y.sent(),he=Ge instanceof xi?s(null,S,m,Ge.payload,Ge.meta):s(Ge,S,m),[3,5];case 5:return Dt=o&&!o.dispatchConditionRejection&&s.match(he)&&he.meta.condition,Dt||g(he),[2,he]}})})}();return Object.assign(U,{abort:M,requestId:S,arg:m,unwrap:function(){return U.then(sm)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e}();function sm(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cm(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var C0="listener",E0="completed",L0="cancelled",cC="task-"+L0,lC="task-"+E0,dC=C0+"-"+L0,fC=C0+"-"+E0;var Ci="listenerMiddleware";var uC=ht(Ci+"/add"),pC=ht(Ci+"/removeAll"),hC=ht(Ci+"/remove");var y0,mC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(y0||(y0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},lm=function(e){return function(t){setTimeout(t,e)}},gC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lm(10);r0();var dm=Ra(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(a,o,n){this.eventBus.addEventListener(a,o,n)}dispatchEvent(a){return this.eventBus.dispatchEvent(a)}removeEventListener(a,o,n){this.eventBus.removeEventListener(a,o,n)}}}),Ua=class extends dm(Object){};window.ftReduxStores||(window.ftReduxStores={});var A0=class e extends Ua{static get(t){var a;let o=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(Ta(i))return i;if(n==null)return;let s=S0({...n,reducers:(a=n.reducers)!==null&&a!==void 0?a:{}}),l=v0({reducer:(f,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...f,...p.overwrites}:s.reducer(f,p)});return window.ftReduxStores[n.name]=new e(s,l,n.eventBus)}constructor(t,a,o){super(),this.reduxSlice=t,this.reduxStore=a,this.isFtReduxStore=!0,this.commands=new Na;let n=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,p=i[f];return p?(...m)=>{let g=p(...m.map(n));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:n(m)})}}}),this.eventBus=o??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 Ba=class{static format(t,a,o,n){return window.moment?window.moment(t).locale(a).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(t,a,o,n)}static getMomentDateFormat(t,a){return t?a?"lll":"ll":a?"L LT":"L"}static getIntlDateTime(t,a,o,n){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(a,{dateStyle:o?"medium":"short"}).format(i);if(!n)return s;let l=new Intl.DateTimeFormat(a,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),a=new Date().getTimezoneOffset();return`${a<0?"+":"-"}${t(Math.abs(a)/60)}:${t(Math.abs(a)%60)}`}};var O0=E(P()),Ha=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},FC=(0,O0.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,i;return((i=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1)?l=>Ba.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ha([(0,Ei.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ha([(0,Ei.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ha([Jn({store:R.name,selector:a=>{var o,n;return(n=(o=a.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),Ha([Jn({store:R.name})],t.prototype,"uiLocale",void 0),t});var Wa=E(P());var Ga=class extends ge{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=R.getState().session;return!!t?.sessionAuthenticated}};var Fa=class extends ge{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=R.getState().session;return!!t?.sessionAuthenticated}};var fm="ft-user-assets",um={setAssetCount:(e,t)=>{let{userAssetType:a,count:o}=t.payload.assetCount;e.assetCounts.allAsset[a]=o},clearAssetCount:e=>{Object.values(Ee).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let a=t.payload.mapId;e.assetCounts.bookmarkByMap[a]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:a,mapId:o,asset:n}=t.payload;Ai(e,a,[...Li(e,a),n]),R0(e,a,1,o),N0(e,n)},editAsset:(e,t)=>{let{assetType:a,asset:o}=t.payload;Ai(e,a,Li(e,a).map(n=>n.id===o.id?o:n)),N0(e,o)},removeAsset:(e,t)=>{let{assetType:a,mapId:o,assetId:n}=t.payload;Ai(e,a,Li(e,a).filter(i=>i.id!==n)),R0(e,a,-1,o)}},w0={[Ee.SEARCHES]:"savedSearches",[Ee.BOOKMARKS]:"bookmarks",[Ee.BOOKS]:void 0,[Ee.COLLECTIONS]:void 0},Li=(e,t)=>{var a;let o=w0[t];return o?(a=e[o])!==null&&a!==void 0?a:[]:[]},Ai=(e,t,a)=>{let o=w0[t];o&&(e[o]=a)},R0=(e,t,a,o)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+a),t===Ee.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+a)}},N0=(e,t)=>{let a=e.assetLabels.map(n=>n.title),o=t.labels.filter(n=>!a.includes(n)).map(n=>({title:n}));e.assetLabels.push(...o)},xe=Wa.FtReduxStore.get({name:fm,reducers:um,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ee).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Oi=class{constructor(t=new Ga,a=new Fa){this.assetCountsService=t,this.assetLabelsService=a,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new va,this.savedSearchesService=new La,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:a}=R.getState();(0,Wa.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,a?.profile)||(this.currentSession=a,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),xe.actions.clearAssetCount(),xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();xe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();xe.actions.assetLabels(t)}async loadAssetCount(t){let a=await this.assetCountsService.getUserAssetCount(t);a&&xe.actions.setAssetCount({assetCount:a})}async loadBookmarkByMapId(t){let a=await this.assetCountsService.getUserBookmarkCountByMap(t);a&&xe.actions.setBookmarkCountByMap({count:a.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let a=Object.keys(xe.getState().assetCounts.bookmarkByMap).length!==0;t===Ee.BOOKMARKS&&a&&xe.actions.clearBookmarkCountByMap(),xe.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 a=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;xe.actions.bookmarks(a)}}},pm=new Oi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pm);(0,_0.customElement)("ft-app-context")(Z);var T0=E(ie());var Ri=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[a,o]=t.split(".");return{context:a,key:o,custom:a!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},kt=new Ri;var hm=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},z0=Symbol("i18nAttributes"),Gr=Symbol("i18nListAttributes"),I0=Symbol("i18nProperties"),$a=Symbol("i18nContexts"),Hr=Symbol("i18nUnsubs"),Ka=(0,ur.applyMixinOnce)(Symbol("withI18n"),function(e){var t,a;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[a]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Sa:ar}i18n(i){let{context:s,key:l,message:f}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(kt.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var p;return((p=f?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,p=(m,g,b)=>b?.context&&b.key&&i(m,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[z0])===null||s===void 0||s.forEach((m,g)=>f[g]=p(m,g,f[g])),(l=this[Gr])===null||l===void 0||l.forEach((m,g)=>{var b;return f[g]=(b=f[g])===null||b===void 0?void 0:b.map(v=>p(m,g,v))})}updateI18nProperties(i){var s;(s=this[I0])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[$a].set(f,{isCustomContext:l}),this[Hr].has(f)||this[Hr].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[$a].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[$a].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Hr].forEach(i=>i()),this[Hr].clear()}}return t=$a,a=Hr,hm([(0,T0.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),M0=class extends Ka(ur.FtLitElement){},ja=class extends Ka(ur.FtLitElementRedux){};var Fr=function(e,t,a,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,a):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,a,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(n<3?s(i):n>3?s(t,a,i):s(t,a))||i);return n>3&&i&&Object.defineProperty(t,a,i),i},ze=class extends ja{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Va.nothing:Va.html`
1312
1312
  <span class="ft-i18n">
1313
1313
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
1314
1314
  </span>