@fluid-topics/ft-search-bar 1.3.11 → 1.3.13

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.
@@ -3420,7 +3420,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
3420
3420
  `;var _p=f(E());var Vd=f(T()),ze=f(te()),Nt=f(E());var nd=f(T());var id=nd.css`
3421
3421
  `;var $n=f(E()),bu="ft-app-info",jr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};jr.eventName="authentication-change";var xu={session:(t,e)=>{(0,$n.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>$.dispatchEvent(new jr(e.payload)),0))}},$=$n.FtReduxStore.get({name:bu,reducers:xu,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 Yi=f(E());var Kr=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=$.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=$.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var Nn=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Kr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Kr.await()}};var $t=class extends Nn{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[p])=>c.localeCompare(p)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Yi.CacheRegistry,this.cache=e?i.commonCache:new Yi.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Pn=class extends $t{async listMyBookmarks(){let e=$.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Xi=class{addCommand(e,o=!1){$.commands.add(e,o)}consumeCommand(e){return $.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Xi;var qt=f(E());var ad,vu=Symbol("clearAfterUnitTest"),_n=class extends $t{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ad]=()=>{this.defaultMessages={},this.cache=new qt.CacheRegistry,this.listeners={}},this.currentUiLocale=$.getState().uiLocale,$.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=$.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,qt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new qt.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),o&&await this.notify(e)}catch(i){!(i instanceof qt.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,qt.delay)(0).then(()=>o()).catch(()=>null)))}};ad=vu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends _n{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends _n{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var sd=window.FluidTopicsI18nService,jO=window.FluidTopicsCustomI18nService;var ld=f(E()),Qi=class{highlightHtml(e,o,n){(0,ld.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Qi;var Ou=f(dd(),1);var pd;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(pd||(pd={}));var ud;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(ud||(ud={}));var fd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE"})(fd||(fd={}));var hd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE"})(hd||(hd={}));var yd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(yd||(yd={}));var md;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(md||(md={}));var gd;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(gd||(gd={}));var bd;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(bd||(bd={}));var xd;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(xd||(xd={}));var vd;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(vd||(vd={}));var Sd;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Sd||(Sd={}));var Od;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Od||(Od={}));var Cd;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Cd||(Cd={}));var wd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(wd||(wd={}));var Ed;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ed||(Ed={}));var Ad;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ad||(Ad={}));var Rd;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Rd||(Rd={}));var Ld;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Ld||(Ld={}));var kd;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(kd||(kd={}));var Id;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Id||(Id={}));var Td;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Td||(Td={}));var $d;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})($d||($d={}));var Nd;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Nd||(Nd={}));var Ie;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Ie||(Ie={}));var Zr;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Zr||(Zr={}));var Pd;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Pd||(Pd={}));var _d;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(_d||(_d={}));var Bd;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Bd||(Bd={}));var Su={[Ie.PERSONAL_BOOK_SHARE_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.HTML_EXPORT_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.PDF_EXPORT_USER]:[Ie.PERSONAL_BOOK_USER],[Ie.KHUB_ADMIN]:[Ie.CONTENT_PUBLISHER],[Ie.ADMIN]:[Ie.KHUB_ADMIN,Ie.USERS_ADMIN,Ie.PORTAL_ADMIN],[Ie.GENERATIVE_AI_EXPORT_USER]:[Ie.GENERATIVE_AI_USER]};function Dd(t,e){return t===e||(Su[t]??[]).some(o=>Dd(o,e))}function Fd(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>Dd(n,e))}var Fn=class extends $t{async listMySearches(){let{session:e}=$.getState();return Fd(e,Ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Md=f(E());var Ji=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=$.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Md.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:$.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Ji;var zd=f(E());var Zo=class{static get(e,o){var n,i,a,s;let c=$.getState(),{lang:p,region:u}=(i=(n=c.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new zd.SearchPlaceConverter(c.baseUrl,(s=(a=window.FluidTopicsClientConfiguration)===null||a===void 0?void 0:a.predefinedSorts)!==null&&s!==void 0?s:{},e??20,c.searchInAllLanguagesAllowed,o??`${p}-${u}`)}};var ea=class{urlToSearchRequest(e){return Zo.get().parse(e)}searchRequestToUrl(e){return Zo.get().serialize(e)}};window.FluidTopicsUrlService=new ea;var Or=f(E());var qr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};qr.eventName="change";var ta=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Ud=new ta;var Mn=class t extends Or.WithEventBus{static build(){return new t(window.history,Ud,()=>window.location,!1)}constructor(e,o,n,i){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Or.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new qr(this.currentItem())),0)}installProxies(){let e=o=>(n,i,[a,s,c])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(i,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(qr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(qr.eventName,e)}currentItem(){return(0,Or.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Or.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Or.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let i=o??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Mn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Hd=$;function Wd(t,e){var o;return Hd.getState().authenticationRequired&&!(!((o=Hd.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(e):t()}var Te=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},pe=class extends Nt.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=()=>Kr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Nt.CacheRegistry,this.cleanSessionDebouncer=new Nt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Vd.html`
3422
3422
  <slot></slot>
3423
- `}connectedCallback(){super.connectedCallback(),$.addEventListener(jr.eventName,this.reloadConfiguration)}disconnectedCallback(){$.addEventListener(jr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,i,a,s,c,p;super.update(e),e.has("baseUrl")&&($.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&$.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&$.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&$.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&$.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&$.actions.noCustom(this.noCustom),e.has("editorMode")&&$.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&$.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&$.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>sd.addContext(u)),e.has("openExternalDocumentInNewTab")&&$.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&$.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&$.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&($.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),$.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),$.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&$.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&$.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Wd(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};pe.elementDefinitions={};pe.styles=id;Te([(0,ze.property)()],pe.prototype,"baseUrl",void 0);Te([(0,ze.property)()],pe.prototype,"apiIntegrationIdentifier",void 0);Te([(0,ze.property)()],pe.prototype,"apiIntegrationAppVersion",void 0);Te([(0,ze.property)()],pe.prototype,"uiLocale",void 0);Te([(0,Nt.jsonProperty)(null)],pe.prototype,"availableUiLocales",void 0);Te([(0,Nt.jsonProperty)(null)],pe.prototype,"metadataConfiguration",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"editorMode",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"noCustom",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,ze.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],pe.prototype,"noCustomComponent",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"withManualResources",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"navigatorOnline",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"forcedOffline",void 0);Te([(0,ze.property)({type:Object})],pe.prototype,"apiProvider",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"authenticationRequired",void 0);Te([(0,Nt.jsonProperty)([])],pe.prototype,"messageContexts",void 0);Te([(0,Nt.jsonProperty)(void 0)],pe.prototype,"session",void 0);Te([(0,ze.state)()],pe.prototype,"localesConfiguration",void 0);Te([(0,ze.state)()],pe.prototype,"availableContentLocales",void 0);var pf=f(te());function Cu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!zn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!zn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!zn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function zn(t,e){try{return Cu(t,e)}catch{return!1}}function Un(t,e){return!zn(t,e)}var wu=f(te(),1);var Hn=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var vo=f(te(),1);var Gd=f(te(),1);function jd(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Gd.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Un,...e??{}})}var Wn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Zd=f(T(),1);var Vn=globalThis,Eu=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rw=Symbol();var Kd=(t,e)=>{if(Eu)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Vn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Gn=class extends Zd.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Kd(n,e.elementStyles),n}};function qd(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var qo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Jd,Yd=Symbol("constructorPrototype"),Xd=Symbol("constructorName"),ep=Symbol("exportpartsDebouncer"),Qd=Symbol("dynamicDependenciesLoaded"),sr=class extends Gn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Jd]=new Wn(5),this[Xd]=this.constructor.name,this[Yd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xd]&&Object.setPrototypeOf(this,this[Yd])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[Qd]||(e[Qd]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=qd(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ep].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(w=>w.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(w=>w.trim()).forEach(w=>m.add(w))}if(m.size===0){this.removeAttribute("exportparts");return}let g=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};Jd=ep;qo([(0,vo.property)()],sr.prototype,"exportpartsPrefix",void 0);qo([jd([])],sr.prototype,"exportpartsPrefixes",void 0);qo([(0,vo.property)()],sr.prototype,"customStylesheet",void 0);qo([(0,vo.property)()],sr.prototype,"elementToFocus",void 0);qo([(0,vo.state)()],sr.prototype,"useAdoptedStyleSheets",void 0);function jn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Yo=Symbol("internalReduxEventsUnsubscribers"),Cr=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores");function Au(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Yr].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[Yr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Yr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Yr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Cr].has(s.store):this[Cr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[Cr].set(s,c.subscribe(()=>this.updateFromStores())),this[Yo].set(s,[]),jn(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let g=b=>this[m](b);c.addEventListener(u.eventName,g),this[Yo].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Cr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Cr].has(s)&&this[Cr].get(s)(),this[Cr].delete(s),(c=this[Yo].get(s))===null||c===void 0||c.forEach(p=>p()),this[Yo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Cr,o=Yr,n=Yo,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}var tp=class extends Au(sr){};function St(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function lr(t){return!!t&&!!t[ge]}function Pt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Pu}(t)||Array.isArray(t)||!!t[lp]||!!(!((e=t.constructor)===null||e===void 0)&&e[lp])||da(t)||pa(t))}function Xr(t,e,o){o===void 0&&(o=!1),Co(t)===0?(o?Object.keys:Oo)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Co(t){var e=t[ge];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:da(t)?2:pa(t)?3:0}function So(t,e){return Co(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ru(t,e){return Co(t)===2?t.get(e):t[e]}function cp(t,e,o){var n=Co(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function dp(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function da(t){return $u&&t instanceof Map}function pa(t){return Nu&&t instanceof Set}function wr(t){return t.o||t.t}function ua(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=fp(t);delete e[ge];for(var o=Oo(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function fa(t,e){return e===void 0&&(e=!1),ha(t)||lr(t)||!Pt(t)||(Co(t)>1&&(t.set=t.add=t.clear=t.delete=Lu),Object.freeze(t),e&&Xr(t,function(o,n){return fa(n,!0)},!0)),t}function Lu(){St(2)}function ha(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Yt(t){var e=ca[t];return e||St(18,t),e}function ku(t,e){ca[t]||(ca[t]=e)}function aa(){return Qo}function ra(t,e){e&&(Yt("Patches"),t.u=[],t.s=[],t.v=e)}function Kn(t){sa(t),t.p.forEach(Iu),t.p=null}function sa(t){t===Qo&&(Qo=t.l)}function rp(t){return Qo={p:[],l:Qo,h:t,m:!0,_:0}}function Iu(t){var e=t[ge];e.i===0||e.i===1?e.j():e.g=!0}function oa(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Yt("ES5").S(e,t,n),n?(o[ge].P&&(Kn(e),St(4)),Pt(t)&&(t=Zn(e,t),e.l||qn(e,t)),e.u&&Yt("Patches").M(o[ge].t,t,e.u,e.s)):t=Zn(e,o,[]),Kn(e),e.u&&e.v(e.u,e.s),t!==up?t:void 0}function Zn(t,e,o){if(ha(e))return e;var n=e[ge];if(!n)return Xr(e,function(c,p){return op(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return qn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=ua(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Xr(a,function(c,p){return op(t,n,i,c,p,o,s)}),qn(t,i,!1),o&&t.u&&Yt("Patches").N(n,o,t.u,t.s)}return n.o}function op(t,e,o,n,i,a,s){if(lr(i)){var c=Zn(t,i,a&&e&&e.i!==3&&!So(e.R,n)?a.concat(n):void 0);if(cp(o,n,c),!lr(c))return;t.m=!1}else s&&o.add(i);if(Pt(i)&&!ha(i)){if(!t.h.D&&t._<1)return;Zn(t,i),e&&e.A.l||qn(t,i)}}function qn(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&fa(e,o)}function na(t,e){var o=t[ge];return(o?wr(o):t)[e]}function np(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Er(t){t.P||(t.P=!0,t.l&&Er(t.l))}function ia(t){t.o||(t.o=ua(t.t))}function la(t,e,o){var n=da(e)?Yt("MapSet").F(e,o):pa(e)?Yt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:aa(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=Jo;s&&(p=[c],u=Xo);var m=Proxy.revocable(p,u),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(e,o):Yt("ES5").J(e,o);return(o?o.A:aa()).p.push(n),n}function Tu(t){return lr(t)||St(22,t),function e(o){if(!Pt(o))return o;var n,i=o[ge],a=Co(o);if(i){if(!i.P&&(i.i<4||!Yt("ES5").K(i)))return i.t;i.I=!0,n=ip(o,a),i.I=!1}else n=ip(o,a);return Xr(n,function(s,c){i&&Ru(i.t,s)===c||cp(n,s,e(c))}),a===3?new Set(n):n}(t)}function ip(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ua(t)}function pp(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[ge];return Jo.get(u,s)},set:function(u){var m=this[ge];Jo.set(m,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][ge];if(!p.P)switch(p.i){case 5:n(p)&&Er(p);break;case 4:o(p)&&Er(p)}}}function o(s){for(var c=s.t,p=s.k,u=Oo(p),m=u.length-1;m>=0;m--){var g=u[m];if(g!==ge){var b=c[g];if(b===void 0&&!So(c,g))return!0;var S=p[g],v=S&&S[ge];if(v?v.t!==b:!dp(S,b))return!0}}var w=!!c[ge];return u.length!==Oo(c).length+(w?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&St(3,JSON.stringify(wr(s)))}var a={};ku("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var w=fp(b);delete w[ge];for(var N=Oo(w),k=0;k<N.length;k++){var I=N[k];w[I]=t(I,g||!!w[I].enumerable)}return Object.create(Object.getPrototypeOf(b),w)}(p,s),m={i:p?5:4,A:c?c.A:aa(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ge,{value:m,writable:!0}),u},S:function(s,c,p){p?lr(c)&&c[ge].A===s&&e(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[ge];if(g){var b=g.t,S=g.k,v=g.R,w=g.i;if(w===4)Xr(S,function(K){K!==ge&&(b[K]!==void 0||So(b,K)?v[K]||u(S[K]):(v[K]=!0,Er(g)))}),Xr(b,function(K){S[K]!==void 0||So(S,K)||(v[K]=!1,Er(g))});else if(w===5){if(n(g)&&(Er(g),v.length=!0),S.length<b.length)for(var N=S.length;N<b.length;N++)v[N]=!1;else for(var k=b.length;k<S.length;k++)v[k]=!0;for(var I=Math.min(S.length,b.length),z=0;z<I;z++)S.hasOwnProperty(z)||(v[z]=!0),v[z]===void 0&&u(S[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ap,Qo,ya=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$u=typeof Map<"u",Nu=typeof Set<"u",sp=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",up=ya?Symbol.for("immer-nothing"):((ap={})["immer-nothing"]=!0,ap),lp=ya?Symbol.for("immer-draftable"):"__$immer_draftable",ge=ya?Symbol.for("immer-state"):"__$immer_state";var Pu=""+Object.prototype.constructor,Oo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,fp=Object.getOwnPropertyDescriptors||function(t){var e={};return Oo(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ca={},Jo={get:function(t,e){if(e===ge)return t;var o=wr(t);if(!So(o,e))return function(i,a,s){var c,p=np(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Pt(n)?n:n===na(t.t,e)?(ia(t),t.o[e]=la(t.A.h,n,t)):n},has:function(t,e){return e in wr(t)},ownKeys:function(t){return Reflect.ownKeys(wr(t))},set:function(t,e,o){var n=np(wr(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=na(wr(t),e),a=i?.[ge];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(dp(o,i)&&(o!==void 0||So(t.t,e)))return!0;ia(t),Er(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return na(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ia(t),Er(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=wr(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){St(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){St(12)}},Xo={};Xr(Jo,function(t,e){Xo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Xo.deleteProperty=function(t,e){return Xo.set.call(this,t,e,void 0)},Xo.set=function(t,e,o){return Jo.set.call(this,t[0],e,o,t[0])};var _u=function(){function t(o){var n=this;this.O=sp,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(w){var N=this;w===void 0&&(w=c);for(var k=arguments.length,I=Array(k>1?k-1:0),z=1;z<k;z++)I[z-1]=arguments[z];return p.produce(w,function(K){var Y;return(Y=a).call.apply(Y,[N,K].concat(I))})}}var u;if(typeof a!="function"&&St(6),s!==void 0&&typeof s!="function"&&St(7),Pt(i)){var m=rp(n),g=la(n,i,void 0),b=!0;try{u=a(g),b=!1}finally{b?Kn(m):sa(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(w){return ra(m,s),oa(w,m)},function(w){throw Kn(m),w}):(ra(m,s),oa(u,m))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===up&&(u=void 0),n.D&&fa(u,!0),s){var S=[],v=[];Yt("Patches").M(i,u,S,v),s(S,v)}return u}St(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(u,function(S){return i.apply(void 0,[S].concat(g))})};var s,c,p=n.produce(i,a,function(u,m){s=u,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Pt(o)||St(8),lr(o)&&(o=Tu(o));var n=rp(this),i=la(this,o,void 0);return i[ge].C=!0,sa(n),i},e.finishDraft=function(o,n){var i=o&&o[ge],a=i.A;return ra(a,n),oa(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!sp&&St(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Yt("Patches").$;return lr(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),yt=new _u,Bu=yt.produce,mw=yt.produceWithPatches.bind(yt),gw=yt.setAutoFreeze.bind(yt),bw=yt.setUseProxies.bind(yt),xw=yt.applyPatches.bind(yt),vw=yt.createDraft.bind(yt),Sw=yt.finishDraft.bind(yt),Yn=Bu;function Qr(t){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qr(t)}function hp(t,e){if(Qr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yp(t){var e=hp(t,"string");return Qr(e)=="symbol"?e:e+""}function mp(t,e,o){return(e=yp(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function gp(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function ma(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?gp(Object(o),!0).forEach(function(n){mp(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):gp(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ke(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var bp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ga=function(){return Math.random().toString(36).substring(7).split("").join(".")},Xn={INIT:"@@redux/INIT"+ga(),REPLACE:"@@redux/REPLACE"+ga(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ga()}};function Du(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ba(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ke(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ke(1));return o(ba)(t,e)}if(typeof t!="function")throw new Error(Ke(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function m(){if(p)throw new Error(Ke(3));return a}function g(w){if(typeof w!="function")throw new Error(Ke(4));if(p)throw new Error(Ke(5));var N=!0;return u(),c.push(w),function(){if(N){if(p)throw new Error(Ke(6));N=!1,u();var I=c.indexOf(w);c.splice(I,1),s=null}}}function b(w){if(!Du(w))throw new Error(Ke(7));if(typeof w.type>"u")throw new Error(Ke(8));if(p)throw new Error(Ke(9));try{p=!0,a=i(a,w)}finally{p=!1}for(var N=s=c,k=0;k<N.length;k++){var I=N[k];I()}return w}function S(w){if(typeof w!="function")throw new Error(Ke(10));i=w,b({type:Xn.REPLACE})}function v(){var w,N=g;return w={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ke(11));function z(){I.next&&I.next(m())}z();var K=N(z);return{unsubscribe:K}}},w[bp]=function(){return this},w}return b({type:Xn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[bp]=v,n}function Fu(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Xn.INIT});if(typeof n>"u")throw new Error(Ke(12));if(typeof o(void 0,{type:Xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function xp(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{Fu(o)}catch(p){c=p}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var w=a[v],N=o[w],k=u[w],I=N(k,m);if(typeof I>"u"){var z=m&&m.type;throw new Error(Ke(14))}S[w]=I,b=b||I!==k}return b=b||a.length!==Object.keys(u).length,b?S:u}}function wo(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function vp(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ke(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=wo.apply(void 0,c)(i.dispatch),ma(ma({},i),{},{dispatch:a})}}}function Sp(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Op=Sp();Op.withExtraArgument=Sp;var xa=Op;var Rp=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Mu=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return p([u,m])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(m){u=[6,m],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Eo=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},zu=Object.defineProperty,Uu=Object.defineProperties,Hu=Object.getOwnPropertyDescriptors,Cp=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable,wp=function(t,e,o){return e in t?zu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ar=function(t,e){for(var o in e||(e={}))Wu.call(e,o)&&wp(t,o,e[o]);if(Cp)for(var n=0,i=Cp(e);n<i.length;n++){var o=i[n];Vu.call(e,o)&&wp(t,o,e[o])}return t},va=function(t,e){return Uu(t,Hu(e))},Gu=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var ju=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wo:wo.apply(null,arguments)},Mw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ku(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Zu=function(t){Rp(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Eo([void 0],o[0].concat(this)))):new(e.bind.apply(e,Eo([void 0],o.concat(this))))},e}(Array),qu=function(t){Rp(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Eo([void 0],o[0].concat(this)))):new(e.bind.apply(e,Eo([void 0],o.concat(this))))},e}(Array);function Ca(t){return Pt(t)?Yn(t,function(){}):t}function Yu(t){return typeof t=="boolean"}function Xu(){return function(e){return Qu(e)}}function Qu(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new Zu;if(o&&(Yu(o)?c.push(xa):c.push(xa.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var Sa=!0;function Lp(t){var e=Xu(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,m=u===void 0?void 0:u,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof i=="function")S=i;else if(Ku(i))S=xp(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!Sa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sa&&v.some(function(K){return typeof K!="function"}))throw new Error("each middleware provided to configureStore must be a function");var w=vp.apply(void 0,v),N=wo;p&&(N=ju(Ar({trace:!Sa},typeof p=="object"&&p)));var k=new qu(w),I=k;Array.isArray(b)?I=Eo([w],b):typeof b=="function"&&(I=b(k));var z=N.apply(void 0,I);return ba(S,m,z)}function Rr(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Ar(Ar({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function kp(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Ju(t){return typeof t=="function"}function ef(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?kp(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Ju(t))p=function(){return Ca(t())};else{var u=Ca(t);p=function(){return u}}function m(g,b){g===void 0&&(g=p());var S=Eo([a[b.type]],s.filter(function(v){var w=v.matcher;return w(b)}).map(function(v){var w=v.reducer;return w}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,w){if(w)if(lr(v)){var N=v,k=w(N,b);return k===void 0?v:k}else{if(Pt(v))return Yn(v,function(I){return w(I,b)});var k=w(v,b);if(k===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return v},g)}return m.getInitialState=p,m}function tf(t,e){return t+"/"+e}function Ip(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Ca(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(m){var g=n[m],b=tf(e,m),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[m]=S,s[b]=S,c[m]=v?Rr(b,v):Rr(b)});function p(){var m=typeof t.extraReducers=="function"?kp(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],v=S===void 0?[]:S,w=m[2],N=w===void 0?void 0:w,k=Ar(Ar({},b),s);return ef(o,function(I){for(var z in k)I.addCase(z,k[z]);for(var K=0,Y=v;K<Y.length;K++){var tt=Y[K];I.addMatcher(tt.matcher,tt.reducer)}N&&I.addDefaultCase(N)})}var u;return{name:e,reducer:function(m,g){return u||(u=p()),u(m,g)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var rf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",of=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=rf[Math.random()*64|0];return e},nf=["name","message","stack","code"],Oa=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ep=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),af=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=nf;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Ww=function(){function t(e,o,n){var i=Rr(e+"/fulfilled",function(m,g,b,S){return{payload:m,meta:va(Ar({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=Rr(e+"/pending",function(m,g,b){return{payload:void 0,meta:va(Ar({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Rr(e+"/rejected",function(m,g,b,S,v){return{payload:S,error:(n&&n.serializeError||af)(m||"Rejected"),meta:va(Ar({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,b,S){var v=n?.idGenerator?n.idGenerator(m):of(),w=new p,N,k=!1;function I(K){N=K,w.abort()}var z=function(){return Gu(this,null,function(){var K,Y,tt,_t,Ze,Bt,Pe;return Mu(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),_t=(K=n?.condition)==null?void 0:K.call(n,m,{getState:b,extra:S}),lf(_t)?[4,_t]:[3,2];case 1:_t=y.sent(),y.label=2;case 2:if(_t===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,Ze=new Promise(function(x,P){return w.signal.addEventListener("abort",function(){return P({name:"AbortError",message:N||"Aborted"})})}),g(a(v,m,(Y=n?.getPendingMeta)==null?void 0:Y.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([Ze,Promise.resolve(o(m,{dispatch:g,getState:b,extra:S,requestId:v,signal:w.signal,abort:I,rejectWithValue:function(x,P){return new Oa(x,P)},fulfillWithValue:function(x,P){return new Ep(x,P)}})).then(function(x){if(x instanceof Oa)throw x;return x instanceof Ep?i(x.payload,v,m,x.meta):i(x,v,m)})])];case 3:return tt=y.sent(),[3,5];case 4:return Bt=y.sent(),tt=Bt instanceof Oa?s(null,v,m,Bt.payload,Bt.meta):s(Bt,v,m),[3,5];case 5:return Pe=n&&!n.dispatchConditionRejection&&s.match(tt)&&tt.meta.condition,Pe||g(tt),[2,tt]}})})}();return Object.assign(z,{abort:I,requestId:v,arg:m,unwrap:function(){return z.then(sf)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function sf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function lf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Tp="listener",$p="completed",Np="cancelled",Vw="task-"+Np,Gw="task-"+$p,jw=Tp+"-"+Np,Kw=Tp+"-"+$p;var wa="listenerMiddleware";var Zw=Rr(wa+"/add"),qw=Rr(wa+"/removeAll"),Yw=Rr(wa+"/remove");var Ap,Xw=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ap||(Ap=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},cf=function(t){return function(e){setTimeout(e,t)}},Qw=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cf(10);pp();function df(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Qn=class extends df(Object){};window.ftReduxStores||(window.ftReduxStores={});var Pp=class t extends Qn{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(jn(a))return a;if(i==null)return;let s=Ip({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Lp({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Hn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...m)=>{let g=u(...m.map(i));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[p]:i(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ei=f(E());var Jn=class extends $t{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=$.getState().session;return!!e?.sessionAuthenticated}};var uf="ft-user-assets",ff={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(Zr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}}},Ot=ei.FtReduxStore.get({name:uf,reducers:ff,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Zr).map(t=>[t,void 0])),bookmarkByMap:{}}}}),Ea=class{constructor(e=new Jn){this.assetCountsService=e,this.currentSession=$.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Pn,this.savedSearchesService=new Fn,$.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=$.getState();(0,ei.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&Ot.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&Ot.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;e===Zr.BOOKMARKS&&o&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(o)}}},hf=new Ea;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=hf);(0,_p.customElement)("ft-app-context")(pe);var G=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var Bp={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Aa=class extends CustomEvent{constructor(e){super("change",{detail:e})}},yf=()=>{},D=class extends se.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new se.ParametrizedLabelResolver(Bp,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new se.SearchPlaceConverter(this.baseUrl,{}).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=mt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new Kt(this),this.selectedFacetsManager=new Zt(this),this.desktopSearchBarManager=new Ko(this),this.mobileSearchBarManager=new jo(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new se.Debouncer(10),this.updateLocalesDebouncer=new se.Debouncer(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(o=>o.contentLocales).catch(()=>[]).then(o=>{this.availableContentLocales=o,this.availableContentLocalesInitialized=!0})}),this.updateFacetsDebouncer.run(()=>{this.retrieveFacetsFromSearch().then(()=>{this.facetsLoaded=!0,this.facetsInitialized=!0})},this.facetsInitialized?500:10)},this.facetsLoaded=!1,this.updateFacetsDebouncer=new se.Debouncer(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(o=>o===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(i=>i===this||i===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,o)=>e.valueFilter&&o.valueFilter?this.compareValueFilters(e.valueFilter,o.valueFilter):e.dateFilter&&o.dateFilter?this.compareDateFilters(e.dateFilter,o.dateFilter):e.rangeFilter&&o.rangeFilter?this.compareRangeFilters(e.rangeFilter,o.rangeFilter):!1,this.compareValueFilters=(e,o)=>e.negative==o.negative&&e.values.length===o.values.length&&e.values.every(n=>o.values.includes(n)),this.compareDateFilters=(e,o)=>e.type===o.type,this.compareRangeFilters=(e,o)=>e.from===o.from&&e.to===o.to,this.compareFilters=(e,o)=>e.key===o.key&&this.compareUnknownFilters(e,o),this.compareRequests=(e,o)=>(e.contentLocale==null||o.contentLocale==null||e.contentLocale===o.contentLocale)&&e.metadataFilters.length===o.metadataFilters.length&&e.metadataFilters.every(n=>o.metadataFilters.some(i=>this.compareFilters(n,i)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(o=>{var n,i;return((i=(n=o.valueFilter)===null||n===void 0?void 0:n.values.length)!==null&&i!==void 0?i:0)>0&&!this.displayedFilters.includes(o.key)}).map(o=>({id:o.key}));return[...this.displayedFilters.map(o=>({id:o})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===mt.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await(0,se.waitFor)(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return J.html`
3423
+ `}connectedCallback(){super.connectedCallback(),$.addEventListener(jr.eventName,this.reloadConfiguration)}disconnectedCallback(){$.addEventListener(jr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,i,a,s,c,p;super.update(e),e.has("baseUrl")&&($.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&$.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&$.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&$.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&$.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&$.actions.noCustom(this.noCustom),e.has("editorMode")&&$.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&$.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&$.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>sd.addContext(u)),e.has("openExternalDocumentInNewTab")&&$.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&$.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&$.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&($.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),$.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),$.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&$.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&$.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Wd(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};pe.elementDefinitions={};pe.styles=id;Te([(0,ze.property)()],pe.prototype,"baseUrl",void 0);Te([(0,ze.property)()],pe.prototype,"apiIntegrationIdentifier",void 0);Te([(0,ze.property)()],pe.prototype,"apiIntegrationAppVersion",void 0);Te([(0,ze.property)()],pe.prototype,"uiLocale",void 0);Te([(0,Nt.jsonProperty)(null)],pe.prototype,"availableUiLocales",void 0);Te([(0,Nt.jsonProperty)(null)],pe.prototype,"metadataConfiguration",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"editorMode",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"noCustom",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,ze.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],pe.prototype,"noCustomComponent",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"withManualResources",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"navigatorOnline",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"forcedOffline",void 0);Te([(0,ze.property)({type:Object})],pe.prototype,"apiProvider",void 0);Te([(0,ze.property)({type:Boolean})],pe.prototype,"authenticationRequired",void 0);Te([(0,Nt.jsonProperty)([])],pe.prototype,"messageContexts",void 0);Te([(0,Nt.jsonProperty)(void 0)],pe.prototype,"session",void 0);Te([(0,ze.state)()],pe.prototype,"localesConfiguration",void 0);Te([(0,ze.state)()],pe.prototype,"availableContentLocales",void 0);var pf=f(te());function Cu(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!zn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!zn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!zn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function zn(t,e){try{return Cu(t,e)}catch{return!1}}function Un(t,e){return!zn(t,e)}var wu=f(te(),1);var Hn=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var vo=f(te(),1);var Gd=f(te(),1);function jd(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Gd.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Un,...e??{}})}var Wn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Zd=f(T(),1);var Vn=globalThis,Eu=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,iw=Symbol();var Kd=(t,e)=>{if(Eu)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Vn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Gn=class extends Zd.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Kd(n,e.elementStyles),n}};function qd(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var qo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Jd,Yd=Symbol("constructorPrototype"),Xd=Symbol("constructorName"),ep=Symbol("exportpartsDebouncer"),Qd=Symbol("dynamicDependenciesLoaded"),sr=class extends Gn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Jd]=new Wn(5),this[Xd]=this.constructor.name,this[Yd]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xd]&&Object.setPrototypeOf(this,this[Yd])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[Qd]||(e[Qd]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=qd(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[ep].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=b=>b!=null&&b.trim().length>0,u=e.filter(p).map(b=>b.trim());if(u.length===0){this.removeAttribute("exportparts");return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(a=(i=b.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(w=>w.split(":")[1]))!==null&&c!==void 0?c:[];new Array(...S,...v).filter(p).map(w=>w.trim()).forEach(w=>m.add(w))}if(m.size===0){this.removeAttribute("exportparts");return}let g=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.setAttribute("exportparts",[...this.part,...g].join(", "))}};Jd=ep;qo([(0,vo.property)()],sr.prototype,"exportpartsPrefix",void 0);qo([jd([])],sr.prototype,"exportpartsPrefixes",void 0);qo([(0,vo.property)()],sr.prototype,"customStylesheet",void 0);qo([(0,vo.property)()],sr.prototype,"elementToFocus",void 0);qo([(0,vo.state)()],sr.prototype,"useAdoptedStyleSheets",void 0);function jn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Yo=Symbol("internalReduxEventsUnsubscribers"),Cr=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores");function Au(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Yr].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[Yr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Yr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Yr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Cr].has(s.store):this[Cr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[Cr].set(s,c.subscribe(()=>this.updateFromStores())),this[Yo].set(s,[]),jn(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let g=b=>this[m](b);c.addEventListener(u.eventName,g),this[Yo].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Cr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Cr].has(s)&&this[Cr].get(s)(),this[Cr].delete(s),(c=this[Yo].get(s))===null||c===void 0||c.forEach(p=>p()),this[Yo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Cr,o=Yr,n=Yo,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}var tp=class extends Au(sr){};function St(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function lr(t){return!!t&&!!t[ge]}function Pt(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Pu}(t)||Array.isArray(t)||!!t[lp]||!!(!((e=t.constructor)===null||e===void 0)&&e[lp])||da(t)||pa(t))}function Xr(t,e,o){o===void 0&&(o=!1),Co(t)===0?(o?Object.keys:Oo)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Co(t){var e=t[ge];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:da(t)?2:pa(t)?3:0}function So(t,e){return Co(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ru(t,e){return Co(t)===2?t.get(e):t[e]}function cp(t,e,o){var n=Co(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function dp(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function da(t){return $u&&t instanceof Map}function pa(t){return Nu&&t instanceof Set}function wr(t){return t.o||t.t}function ua(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=fp(t);delete e[ge];for(var o=Oo(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function fa(t,e){return e===void 0&&(e=!1),ha(t)||lr(t)||!Pt(t)||(Co(t)>1&&(t.set=t.add=t.clear=t.delete=Lu),Object.freeze(t),e&&Xr(t,function(o,n){return fa(n,!0)},!0)),t}function Lu(){St(2)}function ha(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Yt(t){var e=ca[t];return e||St(18,t),e}function ku(t,e){ca[t]||(ca[t]=e)}function aa(){return Qo}function ra(t,e){e&&(Yt("Patches"),t.u=[],t.s=[],t.v=e)}function Kn(t){sa(t),t.p.forEach(Iu),t.p=null}function sa(t){t===Qo&&(Qo=t.l)}function rp(t){return Qo={p:[],l:Qo,h:t,m:!0,_:0}}function Iu(t){var e=t[ge];e.i===0||e.i===1?e.j():e.g=!0}function oa(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||Yt("ES5").S(e,t,n),n?(o[ge].P&&(Kn(e),St(4)),Pt(t)&&(t=Zn(e,t),e.l||qn(e,t)),e.u&&Yt("Patches").M(o[ge].t,t,e.u,e.s)):t=Zn(e,o,[]),Kn(e),e.u&&e.v(e.u,e.s),t!==up?t:void 0}function Zn(t,e,o){if(ha(e))return e;var n=e[ge];if(!n)return Xr(e,function(c,p){return op(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return qn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=ua(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Xr(a,function(c,p){return op(t,n,i,c,p,o,s)}),qn(t,i,!1),o&&t.u&&Yt("Patches").N(n,o,t.u,t.s)}return n.o}function op(t,e,o,n,i,a,s){if(lr(i)){var c=Zn(t,i,a&&e&&e.i!==3&&!So(e.R,n)?a.concat(n):void 0);if(cp(o,n,c),!lr(c))return;t.m=!1}else s&&o.add(i);if(Pt(i)&&!ha(i)){if(!t.h.D&&t._<1)return;Zn(t,i),e&&e.A.l||qn(t,i)}}function qn(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&fa(e,o)}function na(t,e){var o=t[ge];return(o?wr(o):t)[e]}function np(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function Er(t){t.P||(t.P=!0,t.l&&Er(t.l))}function ia(t){t.o||(t.o=ua(t.t))}function la(t,e,o){var n=da(e)?Yt("MapSet").F(e,o):pa(e)?Yt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:aa(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=Jo;s&&(p=[c],u=Xo);var m=Proxy.revocable(p,u),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(e,o):Yt("ES5").J(e,o);return(o?o.A:aa()).p.push(n),n}function Tu(t){return lr(t)||St(22,t),function e(o){if(!Pt(o))return o;var n,i=o[ge],a=Co(o);if(i){if(!i.P&&(i.i<4||!Yt("ES5").K(i)))return i.t;i.I=!0,n=ip(o,a),i.I=!1}else n=ip(o,a);return Xr(n,function(s,c){i&&Ru(i.t,s)===c||cp(n,s,e(c))}),a===3?new Set(n):n}(t)}function ip(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ua(t)}function pp(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[ge];return Jo.get(u,s)},set:function(u){var m=this[ge];Jo.set(m,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][ge];if(!p.P)switch(p.i){case 5:n(p)&&Er(p);break;case 4:o(p)&&Er(p)}}}function o(s){for(var c=s.t,p=s.k,u=Oo(p),m=u.length-1;m>=0;m--){var g=u[m];if(g!==ge){var b=c[g];if(b===void 0&&!So(c,g))return!0;var S=p[g],v=S&&S[ge];if(v?v.t!==b:!dp(S,b))return!0}}var w=!!c[ge];return u.length!==Oo(c).length+(w?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&St(3,JSON.stringify(wr(s)))}var a={};ku("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var w=fp(b);delete w[ge];for(var N=Oo(w),k=0;k<N.length;k++){var I=N[k];w[I]=t(I,g||!!w[I].enumerable)}return Object.create(Object.getPrototypeOf(b),w)}(p,s),m={i:p?5:4,A:c?c.A:aa(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ge,{value:m,writable:!0}),u},S:function(s,c,p){p?lr(c)&&c[ge].A===s&&e(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[ge];if(g){var b=g.t,S=g.k,v=g.R,w=g.i;if(w===4)Xr(S,function(K){K!==ge&&(b[K]!==void 0||So(b,K)?v[K]||u(S[K]):(v[K]=!0,Er(g)))}),Xr(b,function(K){S[K]!==void 0||So(S,K)||(v[K]=!1,Er(g))});else if(w===5){if(n(g)&&(Er(g),v.length=!0),S.length<b.length)for(var N=S.length;N<b.length;N++)v[N]=!1;else for(var k=b.length;k<S.length;k++)v[k]=!0;for(var I=Math.min(S.length,b.length),z=0;z<I;z++)S.hasOwnProperty(z)||(v[z]=!0),v[z]===void 0&&u(S[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var ap,Qo,ya=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$u=typeof Map<"u",Nu=typeof Set<"u",sp=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",up=ya?Symbol.for("immer-nothing"):((ap={})["immer-nothing"]=!0,ap),lp=ya?Symbol.for("immer-draftable"):"__$immer_draftable",ge=ya?Symbol.for("immer-state"):"__$immer_state";var Pu=""+Object.prototype.constructor,Oo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,fp=Object.getOwnPropertyDescriptors||function(t){var e={};return Oo(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},ca={},Jo={get:function(t,e){if(e===ge)return t;var o=wr(t);if(!So(o,e))return function(i,a,s){var c,p=np(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Pt(n)?n:n===na(t.t,e)?(ia(t),t.o[e]=la(t.A.h,n,t)):n},has:function(t,e){return e in wr(t)},ownKeys:function(t){return Reflect.ownKeys(wr(t))},set:function(t,e,o){var n=np(wr(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=na(wr(t),e),a=i?.[ge];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(dp(o,i)&&(o!==void 0||So(t.t,e)))return!0;ia(t),Er(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return na(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ia(t),Er(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=wr(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){St(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){St(12)}},Xo={};Xr(Jo,function(t,e){Xo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Xo.deleteProperty=function(t,e){return Xo.set.call(this,t,e,void 0)},Xo.set=function(t,e,o){return Jo.set.call(this,t[0],e,o,t[0])};var _u=function(){function t(o){var n=this;this.O=sp,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(w){var N=this;w===void 0&&(w=c);for(var k=arguments.length,I=Array(k>1?k-1:0),z=1;z<k;z++)I[z-1]=arguments[z];return p.produce(w,function(K){var Y;return(Y=a).call.apply(Y,[N,K].concat(I))})}}var u;if(typeof a!="function"&&St(6),s!==void 0&&typeof s!="function"&&St(7),Pt(i)){var m=rp(n),g=la(n,i,void 0),b=!0;try{u=a(g),b=!1}finally{b?Kn(m):sa(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(w){return ra(m,s),oa(w,m)},function(w){throw Kn(m),w}):(ra(m,s),oa(u,m))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===up&&(u=void 0),n.D&&fa(u,!0),s){var S=[],v=[];Yt("Patches").M(i,u,S,v),s(S,v)}return u}St(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(u,function(S){return i.apply(void 0,[S].concat(g))})};var s,c,p=n.produce(i,a,function(u,m){s=u,c=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Pt(o)||St(8),lr(o)&&(o=Tu(o));var n=rp(this),i=la(this,o,void 0);return i[ge].C=!0,sa(n),i},e.finishDraft=function(o,n){var i=o&&o[ge],a=i.A;return ra(a,n),oa(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!sp&&St(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=Yt("Patches").$;return lr(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),yt=new _u,Bu=yt.produce,xw=yt.produceWithPatches.bind(yt),vw=yt.setAutoFreeze.bind(yt),Sw=yt.setUseProxies.bind(yt),Ow=yt.applyPatches.bind(yt),Cw=yt.createDraft.bind(yt),ww=yt.finishDraft.bind(yt),Yn=Bu;function Qr(t){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qr(t)}function hp(t,e){if(Qr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yp(t){var e=hp(t,"string");return Qr(e)=="symbol"?e:e+""}function mp(t,e,o){return(e=yp(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function gp(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function ma(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?gp(Object(o),!0).forEach(function(n){mp(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):gp(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Ke(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var bp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ga=function(){return Math.random().toString(36).substring(7).split("").join(".")},Xn={INIT:"@@redux/INIT"+ga(),REPLACE:"@@redux/REPLACE"+ga(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ga()}};function Du(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ba(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Ke(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Ke(1));return o(ba)(t,e)}if(typeof t!="function")throw new Error(Ke(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function m(){if(p)throw new Error(Ke(3));return a}function g(w){if(typeof w!="function")throw new Error(Ke(4));if(p)throw new Error(Ke(5));var N=!0;return u(),c.push(w),function(){if(N){if(p)throw new Error(Ke(6));N=!1,u();var I=c.indexOf(w);c.splice(I,1),s=null}}}function b(w){if(!Du(w))throw new Error(Ke(7));if(typeof w.type>"u")throw new Error(Ke(8));if(p)throw new Error(Ke(9));try{p=!0,a=i(a,w)}finally{p=!1}for(var N=s=c,k=0;k<N.length;k++){var I=N[k];I()}return w}function S(w){if(typeof w!="function")throw new Error(Ke(10));i=w,b({type:Xn.REPLACE})}function v(){var w,N=g;return w={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ke(11));function z(){I.next&&I.next(m())}z();var K=N(z);return{unsubscribe:K}}},w[bp]=function(){return this},w}return b({type:Xn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[bp]=v,n}function Fu(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:Xn.INIT});if(typeof n>"u")throw new Error(Ke(12));if(typeof o(void 0,{type:Xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function xp(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{Fu(o)}catch(p){c=p}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},v=0;v<a.length;v++){var w=a[v],N=o[w],k=u[w],I=N(k,m);if(typeof I>"u"){var z=m&&m.type;throw new Error(Ke(14))}S[w]=I,b=b||I!==k}return b=b||a.length!==Object.keys(u).length,b?S:u}}function wo(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function vp(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Ke(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=wo.apply(void 0,c)(i.dispatch),ma(ma({},i),{},{dispatch:a})}}}function Sp(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Op=Sp();Op.withExtraArgument=Sp;var xa=Op;var Rp=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),Mu=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return p([u,m])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(m){u=[6,m],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Eo=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},zu=Object.defineProperty,Uu=Object.defineProperties,Hu=Object.getOwnPropertyDescriptors,Cp=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,Vu=Object.prototype.propertyIsEnumerable,wp=function(t,e,o){return e in t?zu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ar=function(t,e){for(var o in e||(e={}))Wu.call(e,o)&&wp(t,o,e[o]);if(Cp)for(var n=0,i=Cp(e);n<i.length;n++){var o=i[n];Vu.call(e,o)&&wp(t,o,e[o])}return t},va=function(t,e){return Uu(t,Hu(e))},Gu=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var ju=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wo:wo.apply(null,arguments)},Hw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ku(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var Zu=function(t){Rp(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Eo([void 0],o[0].concat(this)))):new(e.bind.apply(e,Eo([void 0],o.concat(this))))},e}(Array),qu=function(t){Rp(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Eo([void 0],o[0].concat(this)))):new(e.bind.apply(e,Eo([void 0],o.concat(this))))},e}(Array);function Ca(t){return Pt(t)?Yn(t,function(){}):t}function Yu(t){return typeof t=="boolean"}function Xu(){return function(e){return Qu(e)}}function Qu(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new Zu;if(o&&(Yu(o)?c.push(xa):c.push(xa.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var Sa=!0;function Lp(t){var e=Xu(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,m=u===void 0?void 0:u,g=o.enhancers,b=g===void 0?void 0:g,S;if(typeof i=="function")S=i;else if(Ku(i))S=xp(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!Sa&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Sa&&v.some(function(K){return typeof K!="function"}))throw new Error("each middleware provided to configureStore must be a function");var w=vp.apply(void 0,v),N=wo;p&&(N=ju(Ar({trace:!Sa},typeof p=="object"&&p)));var k=new qu(w),I=k;Array.isArray(b)?I=Eo([w],b):typeof b=="function"&&(I=b(k));var z=N.apply(void 0,I);return ba(S,m,z)}function Rr(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Ar(Ar({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function kp(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Ju(t){return typeof t=="function"}function ef(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?kp(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Ju(t))p=function(){return Ca(t())};else{var u=Ca(t);p=function(){return u}}function m(g,b){g===void 0&&(g=p());var S=Eo([a[b.type]],s.filter(function(v){var w=v.matcher;return w(b)}).map(function(v){var w=v.reducer;return w}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,w){if(w)if(lr(v)){var N=v,k=w(N,b);return k===void 0?v:k}else{if(Pt(v))return Yn(v,function(I){return w(I,b)});var k=w(v,b);if(k===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return v},g)}return m.getInitialState=p,m}function tf(t,e){return t+"/"+e}function Ip(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Ca(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(m){var g=n[m],b=tf(e,m),S,v;"reducer"in g?(S=g.reducer,v=g.prepare):S=g,a[m]=S,s[b]=S,c[m]=v?Rr(b,v):Rr(b)});function p(){var m=typeof t.extraReducers=="function"?kp(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],v=S===void 0?[]:S,w=m[2],N=w===void 0?void 0:w,k=Ar(Ar({},b),s);return ef(o,function(I){for(var z in k)I.addCase(z,k[z]);for(var K=0,Y=v;K<Y.length;K++){var tt=Y[K];I.addMatcher(tt.matcher,tt.reducer)}N&&I.addDefaultCase(N)})}var u;return{name:e,reducer:function(m,g){return u||(u=p()),u(m,g)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var rf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",of=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=rf[Math.random()*64|0];return e},nf=["name","message","stack","code"],Oa=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ep=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),af=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=nf;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},jw=function(){function t(e,o,n){var i=Rr(e+"/fulfilled",function(m,g,b,S){return{payload:m,meta:va(Ar({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=Rr(e+"/pending",function(m,g,b){return{payload:void 0,meta:va(Ar({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Rr(e+"/rejected",function(m,g,b,S,v){return{payload:S,error:(n&&n.serializeError||af)(m||"Rejected"),meta:va(Ar({},v||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,b,S){var v=n?.idGenerator?n.idGenerator(m):of(),w=new p,N,k=!1;function I(K){N=K,w.abort()}var z=function(){return Gu(this,null,function(){var K,Y,tt,_t,Ze,Bt,Pe;return Mu(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),_t=(K=n?.condition)==null?void 0:K.call(n,m,{getState:b,extra:S}),lf(_t)?[4,_t]:[3,2];case 1:_t=y.sent(),y.label=2;case 2:if(_t===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,Ze=new Promise(function(x,P){return w.signal.addEventListener("abort",function(){return P({name:"AbortError",message:N||"Aborted"})})}),g(a(v,m,(Y=n?.getPendingMeta)==null?void 0:Y.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([Ze,Promise.resolve(o(m,{dispatch:g,getState:b,extra:S,requestId:v,signal:w.signal,abort:I,rejectWithValue:function(x,P){return new Oa(x,P)},fulfillWithValue:function(x,P){return new Ep(x,P)}})).then(function(x){if(x instanceof Oa)throw x;return x instanceof Ep?i(x.payload,v,m,x.meta):i(x,v,m)})])];case 3:return tt=y.sent(),[3,5];case 4:return Bt=y.sent(),tt=Bt instanceof Oa?s(null,v,m,Bt.payload,Bt.meta):s(Bt,v,m),[3,5];case 5:return Pe=n&&!n.dispatchConditionRejection&&s.match(tt)&&tt.meta.condition,Pe||g(tt),[2,tt]}})})}();return Object.assign(z,{abort:I,requestId:v,arg:m,unwrap:function(){return z.then(sf)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function sf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function lf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Tp="listener",$p="completed",Np="cancelled",Kw="task-"+Np,Zw="task-"+$p,qw=Tp+"-"+Np,Yw=Tp+"-"+$p;var wa="listenerMiddleware";var Xw=Rr(wa+"/add"),Qw=Rr(wa+"/removeAll"),Jw=Rr(wa+"/remove");var Ap,eE=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ap||(Ap=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},cf=function(t){return function(e){setTimeout(e,t)}},tE=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cf(10);pp();function df(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}var Qn=class extends df(Object){};window.ftReduxStores||(window.ftReduxStores={});var Pp=class t extends Qn{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(jn(a))return a;if(i==null)return;let s=Ip({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Lp({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Hn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...m)=>{let g=u(...m.map(i));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[p]:i(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ei=f(E());var Jn=class extends $t{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=$.getState().session;return!!e?.sessionAuthenticated}};var uf="ft-user-assets",ff={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(Zr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}}},Ot=ei.FtReduxStore.get({name:uf,reducers:ff,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Zr).map(t=>[t,void 0])),bookmarkByMap:{}}}}),Ea=class{constructor(e=new Jn){this.assetCountsService=e,this.currentSession=$.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Pn,this.savedSearchesService=new Fn,$.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=$.getState();(0,ei.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts())}clearUserAssetCounts(){Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&Ot.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&Ot.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;e===Zr.BOOKMARKS&&o&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(o)}}},hf=new Ea;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=hf);(0,_p.customElement)("ft-app-context")(pe);var G=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a};window.fluidtopics==null&&console.warn("Fluid Topics public API was not found. You can find it here: https://www.npmjs.com/package/@fluid-topics/public-api");var Bp={filtersButton:"Filters",inputPlaceHolder:"Search",filterInputPlaceHolder:"Filter {0}",clearInputButton:"Clear",clearFilterButton:"Clear",displayMoreFilterValuesButton:"More",noFilterValuesAvailable:"No values available",searchButton:"Search",clearFilters:"Clear filters",contentLocaleSelector:"Lang",presetsSelector:"Quick filters",removeRecentSearch:"Remove {0}",back:"Back",selectLocale:"Select a language"},Aa=class extends CustomEvent{constructor(e){super("change",{detail:e})}},yf=()=>{},D=class extends se.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.mode="auto",this.forceMobileMenuOpen=!1,this.forceMenuOpen=!1,this.baseUrl="",this.apiIntegrationIdentifier="ft-search-bar",this.availableContentLocales=[],this.availableContentLocalesInitialized=!1,this.labels={},this.labelResolver=new se.ParametrizedLabelResolver(Bp,{}),this.displayedFilters=[],this.presets=[],this.priors=[],this.searchRequestSerializer=e=>new se.SearchPlaceConverter(this.baseUrl,{}).serialize(e),this.focusOnDisplay=!1,this.metadataFilters=[],this.sizeCategory=mt.M,this.displayFacets=!1,this.mobileMenuOpen=!1,this.facets=[],this.facetsInitialized=!1,this.knownFacetLabels=new Map,this.query="",this.suggestions=[],this.recentSearches=[],this.reactToFocus=!0,this.displaySuggestListbox=!1,this.selectedSuggestRemoveRecent=!1,this.suggestManager=new Kt(this),this.selectedFacetsManager=new Zt(this),this.desktopSearchBarManager=new Ko(this),this.mobileSearchBarManager=new jo(this,this.selectedFacetsManager,this.suggestManager),this.stateChangeEventDebouncer=new se.Debouncer(10),this.updateLocalesDebouncer=new se.Debouncer(10),this.initSearchData=()=>{this.availableContentLocalesInitialized=!1,this.facetsLoaded=!1,this.facetsInitialized=!1,this.updateLocalesDebouncer.run(()=>{var e;(e=this.api)===null||e===void 0||e.getAvailableSearchLocales().then(o=>o.contentLocales).catch(()=>[]).then(o=>{this.availableContentLocales=o,this.availableContentLocalesInitialized=!0})}),this.updateFacetsDebouncer.run(()=>{this.retrieveFacetsFromSearch().then(()=>{this.facetsLoaded=!0,this.facetsInitialized=!0})},this.facetsInitialized?500:10)},this.facetsLoaded=!1,this.updateFacetsDebouncer=new se.Debouncer(500),this.closeFloatingContainer=e=>{this.isMobile()||(this.displayFacets=this.displayFacets&&e.composedPath().some(o=>o===this.floatingContainer))},this.closeSuggestListbox=e=>{e.composedPath().some(i=>i===this||i===this.shadowRoot)||(this.displaySuggestListbox=!1,this.selectedSuggestOptionId=void 0)},this.compareUnknownFilters=(e,o)=>e.valueFilter&&o.valueFilter?this.compareValueFilters(e.valueFilter,o.valueFilter):e.dateFilter&&o.dateFilter?this.compareDateFilters(e.dateFilter,o.dateFilter):e.rangeFilter&&o.rangeFilter?this.compareRangeFilters(e.rangeFilter,o.rangeFilter):!1,this.compareValueFilters=(e,o)=>e.negative==o.negative&&e.values.length===o.values.length&&e.values.every(n=>o.values.includes(n)),this.compareDateFilters=(e,o)=>e.type===o.type,this.compareRangeFilters=(e,o)=>e.from===o.from&&e.to===o.to,this.compareFilters=(e,o)=>e.key===o.key&&this.compareUnknownFilters(e,o),this.compareRequests=(e,o)=>(e.contentLocale==null||o.contentLocale==null||e.contentLocale===o.contentLocale)&&e.metadataFilters.length===o.metadataFilters.length&&e.metadataFilters.every(n=>o.metadataFilters.some(i=>this.compareFilters(n,i)))}isMobileMenuOpen(){return this.isMobile()&&(this.forceMobileMenuOpen||this.forceMenuOpen||this.mobileMenuOpen)}get request(){return{uiLocale:this.uiLocale,contentLocale:this.contentLocale,query:this.query,facets:this.facetsRequest,priors:this.hasPriors?this.priors:void 0,metadataFilters:this.metadataFilters,paging:{perPage:0,page:1},sort:[]}}get facetsRequest(){let e=this.metadataFilters.filter(o=>{var n,i;return((i=(n=o.valueFilter)===null||n===void 0?void 0:n.values.length)!==null&&i!==void 0?i:0)>0&&!this.displayedFilters.includes(o.key)}).map(o=>({id:o.key}));return[...this.displayedFilters.map(o=>({id:o})),...e]}get suggestRequest(){return{contentLocale:this.contentLocale,input:this.query,metadataFilters:this.metadataFilters,sort:[]}}isMobile(){switch(this.mode){case"mobile":return!0;case"desktop":return!1;default:return this.sizeCategory===mt.S}}hasFacets(){return this.facetsRequest.length>0}get hasPresets(){return this.presets!=null&&this.presets.length>0}get hasPriors(){return this.priors!=null&&this.priors.length>0}hasLocaleSelector(){return this.availableContentLocales.length>1}focus(){var e;(e=this.container)===null||e===void 0||e.focus()}async focusInput(e=!1){this.reactToFocus=e,await(0,se.waitFor)(()=>this.input,50),this.input.focus(),this.reactToFocus=!0}clear(){this.query="",this.metadataFilters=[],this.input&&(this.input.value=""),this.mobileMenuOpen=!1,this.displayFacets=!1}render(){return J.html`
3424
3424
  <ft-size-watcher @change=${this.updateSize}></ft-size-watcher>
3425
3425
  <div class="sr-only" aria-live="polite" aria-atomic="true">
3426
3426
  ${this.renderLiveText()}