@fluid-topics/ft-search-selected-facets 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  .ft-search-selected-facets--container > * {
10
10
  min-width: 0;
11
11
  }
12
- `;var ko=y(w()),Rs=y(j());var fn;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(fn||(fn={}));var bn=y(w());var Sl=y(w());var ap=y(Ol(),1);var Ll;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ll||(Ll={}));var El;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(El||(El={}));var Al;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Al||(Al={}));var Rl;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Rl||(Rl={}));var wl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(wl||(wl={}));var _l;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(_l||(_l={}));var Tl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__DISPLAY="TOPIC__DISPLAY",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Tl||(Tl={}));var Nl;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Nl||(Nl={}));var kl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(kl||(kl={}));var Ml;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ml||(Ml={}));var Pl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var zl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(zl||(zl={}));var Il;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Il||(Il={}));var Dl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Dl||(Dl={}));var ar;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ar||(ar={}));var $l;(function(e){e.ASC="ASC",e.DESC="DESC"})($l||($l={}));var Bl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Bl||(Bl={}));var da;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(da||(da={}));var Ul;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ul||(Ul={}));var Fl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Fl||(Fl={}));var Hl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var fa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fa||(fa={}));var Gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gl||(Gl={}));var ua;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ua||(ua={}));var Wl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wl||(Wl={}));var xe;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(xe||(xe={}));var vt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(vt||(vt={}));var Vl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Vl||(Vl={}));var jl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(jl||(jl={}));var Kl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Kl||(Kl={}));var ql;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ql||(ql={}));var Zl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zl||(Zl={}));var Yl;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Yl||(Yl={}));var Xl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Xl||(Xl={}));var Ql;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ql||(Ql={}));var Jl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jl||(Jl={}));var np={[xe.PERSONAL_BOOK_SHARE_USER]:[xe.PERSONAL_BOOK_USER],[xe.HTML_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.PDF_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.KHUB_ADMIN]:[xe.CONTENT_PUBLISHER],[xe.ADMIN]:[xe.KHUB_ADMIN,xe.USERS_ADMIN,xe.PORTAL_ADMIN,xe.BEHAVIOR_DATA_USER],[xe.GENERATIVE_AI_EXPORT_USER]:[xe.GENERATIVE_AI_USER]};function e1(e,t){return e===t||(np[e]??[]).some(r=>e1(r,t))}function t1(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>e1(n,t))}var gs=y(j());function ip(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pa(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!pa(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!pa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pa(e,t){try{return ip(e,t)}catch{return!1}}function un(e,t){return!pa(e,t)}function r1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ha(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var o1=y(j(),1);var ji=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:un,attribute:!1,...t};(0,o1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[n],store:t.store})}};var ma=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Zr=y(j(),1);var n1=y(j(),1);function a1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,n1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:un,...t??{}})}var ga=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var s1=y(I(),1);var ya=globalThis,sp=ya.ShadowRoot&&(ya.ShadyCSS===void 0||ya.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i7=Symbol();var i1=(e,t)=>{if(sp)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=ya.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var ba=class extends s1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return i1(n,t.elementStyles),n}};function c1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Lo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},u1,l1=Symbol("constructorPrototype"),d1=Symbol("constructorName"),p1=Symbol("exportpartsDebouncer"),f1=Symbol("dynamicDependenciesLoaded"),Oo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Oo.eventName="exportparts-updated";var Vt=class extends ba{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[u1]=new ga(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[p1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[d1]=this.constructor.name,this[l1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[d1]&&Object.setPrototypeOf(this,this[l1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[f1]||(r[f1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Oo)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=c1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,c;let f=b=>b!=null&&b.trim().length>0,u=t.filter(f).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...C].filter(f).map(T=>T.trim());for(let T of E)m.add(T)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};u1=p1;Lo([(0,Zr.property)()],Vt.prototype,"exportpartsPrefix",void 0);Lo([a1([])],Vt.prototype,"exportpartsPrefixes",void 0);Lo([(0,Zr.property)({reflect:!0})],Vt.prototype,"exportparts",void 0);Lo([(0,Zr.property)()],Vt.prototype,"customStylesheet",void 0);Lo([(0,Zr.property)()],Vt.prototype,"elementToFocus",void 0);Lo([(0,Zr.state)()],Vt.prototype,"useAdoptedStyleSheets",void 0);function va(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var pn=Symbol("internalReduxEventsUnsubscribers"),br=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores"),cp=ha(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=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 f;c=(f=c??s.name)!==null&&f!==void 0?f:"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 f=this.constructor.getPropertyOptions(c);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[br].has(s.store):this[br].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var f;this[br].set(s,c.subscribe(()=>this.updateFromStores())),this[pn].set(s,[]),va(c)&&c.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.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[pn].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[br].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[br].has(s)&&this[br].get(s)(),this[br].delete(s),(c=this[pn].get(s))===null||c===void 0||c.forEach(f=>f()),this[pn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=br,r=Yr,n=pn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),h1=class extends cp(Vt){};function xt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ir(e){return!!e&&!!e[de]}function kt(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===gp}(e)||Array.isArray(e)||!!e[S1]||!!(!((t=e.constructor)===null||t===void 0)&&t[S1])||ts(e)||rs(e))}function Xr(e,t,r){r===void 0&&(r=!1),Ro(e)===0?(r?Object.keys:Ao)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function Ro(e){var t=e[de];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ts(e)?2:rs(e)?3:0}function Eo(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lp(e,t){return Ro(e)===2?e.get(t):e[t]}function C1(e,t,r){var n=Ro(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function O1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ts(e){return hp&&e instanceof Map}function rs(e){return mp&&e instanceof Set}function vr(e){return e.o||e.t}function os(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A1(e);delete t[de];for(var r=Ao(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ns(e,t){return t===void 0&&(t=!1),as(e)||ir(e)||!kt(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=dp),Object.freeze(e),t&&Xr(e,function(r,n){return ns(n,!0)},!0)),e}function dp(){xt(2)}function as(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function jt(e){var t=es[e];return t||xt(18,e),t}function fp(e,t){es[e]||(es[e]=t)}function Xi(){return mn}function Ki(e,t){t&&(jt("Patches"),e.u=[],e.s=[],e.v=t)}function xa(e){Qi(e),e.p.forEach(up),e.p=null}function Qi(e){e===mn&&(mn=e.l)}function m1(e){return mn={p:[],l:mn,h:e,m:!0,_:0}}function up(e){var t=e[de];t.i===0||t.i===1?t.j():t.g=!0}function qi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||jt("ES5").S(t,e,n),n?(r[de].P&&(xa(t),xt(4)),kt(e)&&(e=Sa(t,e),t.l||Ca(t,e)),t.u&&jt("Patches").M(r[de].t,e,t.u,t.s)):e=Sa(t,r,[]),xa(t),t.u&&t.v(t.u,t.s),e!==E1?e:void 0}function Sa(e,t,r){if(as(t))return t;var n=t[de];if(!n)return Xr(t,function(c,f){return g1(e,n,t,c,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Ca(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=os(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Xr(i,function(c,f){return g1(e,n,a,c,f,r,s)}),Ca(e,a,!1),r&&e.u&&jt("Patches").N(n,r,e.u,e.s)}return n.o}function g1(e,t,r,n,a,i,s){if(ir(a)){var c=Sa(e,a,i&&t&&t.i!==3&&!Eo(t.R,n)?i.concat(n):void 0);if(C1(r,n,c),!ir(c))return;e.m=!1}else s&&r.add(a);if(kt(a)&&!as(a)){if(!e.h.D&&e._<1)return;Sa(e,a),t&&t.A.l||Ca(e,a)}}function Ca(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ns(t,r)}function Zi(e,t){var r=e[de];return(r?vr(r):e)[t]}function y1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function xr(e){e.P||(e.P=!0,e.l&&xr(e.l))}function Yi(e){e.o||(e.o=os(e.t))}function Ji(e,t,r){var n=ts(t)?jt("MapSet").F(t,r):rs(t)?jt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Xi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=c,u=gn;s&&(f=[c],u=hn);var m=Proxy.revocable(f,u),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(t,r):jt("ES5").J(t,r);return(r?r.A:Xi()).p.push(n),n}function pp(e){return ir(e)||xt(22,e),function t(r){if(!kt(r))return r;var n,a=r[de],i=Ro(r);if(a){if(!a.P&&(a.i<4||!jt("ES5").K(a)))return a.t;a.I=!0,n=b1(r,i),a.I=!1}else n=b1(r,i);return Xr(n,function(s,c){a&&lp(a.t,s)===c||C1(n,s,t(c))}),i===3?new Set(n):n}(e)}function b1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return os(e)}function L1(){function e(s,c){var f=i[s];return f?f.enumerable=c:i[s]=f={configurable:!0,enumerable:c,get:function(){var u=this[de];return gn.get(u,s)},set:function(u){var m=this[de];gn.set(m,s,u)}},f}function t(s){for(var c=s.length-1;c>=0;c--){var f=s[c][de];if(!f.P)switch(f.i){case 5:n(f)&&xr(f);break;case 4:r(f)&&xr(f)}}}function r(s){for(var c=s.t,f=s.k,u=Ao(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==de){var b=c[g];if(b===void 0&&!Eo(c,g))return!0;var S=f[g],C=S&&S[de];if(C?C.t!==b:!O1(S,b))return!0}}var E=!!c[de];return u.length!==Ao(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(c,c.length-1);if(f&&!f.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&xt(3,JSON.stringify(vr(s)))}var i={};fp("ES5",{J:function(s,c){var f=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),C=0;C<b.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var E=A1(b);delete E[de];for(var T=Ao(E),M=0;M<T.length;M++){var N=T[M];E[N]=e(N,g||!!E[N].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(f,s),m={i:f?5:4,A:c?c.A:Xi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,de,{value:m,writable:!0}),u},S:function(s,c,f){f?ir(c)&&c[de].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[de];if(g){var b=g.t,S=g.k,C=g.R,E=g.i;if(E===4)Xr(S,function(U){U!==de&&(b[U]!==void 0||Eo(b,U)?C[U]||u(S[U]):(C[U]=!0,xr(g)))}),Xr(b,function(U){S[U]!==void 0||Eo(S,U)||(C[U]=!1,xr(g))});else if(E===5){if(n(g)&&(xr(g),C.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)C[T]=!1;else for(var M=b.length;M<S.length;M++)C[M]=!0;for(var N=Math.min(S.length,b.length),$=0;$<N;$++)S.hasOwnProperty($)||(C[$]=!0),C[$]===void 0&&u(S[$])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var v1,mn,is=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hp=typeof Map<"u",mp=typeof Set<"u",x1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",E1=is?Symbol.for("immer-nothing"):((v1={})["immer-nothing"]=!0,v1),S1=is?Symbol.for("immer-draftable"):"__$immer_draftable",de=is?Symbol.for("immer-state"):"__$immer_state";var gp=""+Object.prototype.constructor,Ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A1=Object.getOwnPropertyDescriptors||function(e){var t={};return Ao(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},es={},gn={get:function(e,t){if(t===de)return e;var r=vr(e);if(!Eo(r,t))return function(a,i,s){var c,f=y1(i,s);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!kt(n)?n:n===Zi(e.t,t)?(Yi(e),e.o[t]=Ji(e.A.h,n,e)):n},has:function(e,t){return t in vr(e)},ownKeys:function(e){return Reflect.ownKeys(vr(e))},set:function(e,t,r){var n=y1(vr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Zi(vr(e),t),i=a?.[de];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(O1(r,a)&&(r!==void 0||Eo(e.t,t)))return!0;Yi(e),xr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Zi(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Yi(e),xr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=vr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){xt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xt(12)}},hn={};Xr(gn,function(e,t){hn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),hn.deleteProperty=function(e,t){return hn.set.call(this,e,t,void 0)},hn.set=function(e,t,r){return gn.set.call(this,e[0],t,r,e[0])};var yp=function(){function e(r){var n=this;this.O=x1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var f=n;return function(E){var T=this;E===void 0&&(E=c);for(var M=arguments.length,N=Array(M>1?M-1:0),$=1;$<M;$++)N[$-1]=arguments[$];return f.produce(E,function(U){var K;return(K=i).call.apply(K,[T,U].concat(N))})}}var u;if(typeof i!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),kt(a)){var m=m1(n),g=Ji(n,a,void 0),b=!0;try{u=i(g),b=!1}finally{b?xa(m):Qi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return Ki(m,s),qi(E,m)},function(E){throw xa(m),E}):(Ki(m,s),qi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===E1&&(u=void 0),n.D&&ns(u,!0),s){var S=[],C=[];jt("Patches").M(a,u,S,C),s(S,C)}return u}xt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="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 a.apply(void 0,[S].concat(g))})};var s,c,f=n.produce(a,i,function(u,m){s=u,c=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,c]}):[f,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){kt(r)||xt(8),ir(r)&&(r=pp(r));var n=m1(this),a=Ji(this,r,void 0);return a[de].C=!0,Qi(n),a},t.finishDraft=function(r,n){var a=r&&r[de],i=a.A;return Ki(i,n),qi(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!x1&&xt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=jt("Patches").$;return ir(r)?s(r,n):this.produce(r,function(c){return s(c,n)})},e}(),ft=new yp,bp=ft.produce,S7=ft.produceWithPatches.bind(ft),C7=ft.setAutoFreeze.bind(ft),O7=ft.setUseProxies.bind(ft),L7=ft.applyPatches.bind(ft),E7=ft.createDraft.bind(ft),A7=ft.finishDraft.bind(ft),Oa=bp;function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(e)}function R1(e,t){if(Qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w1(e){var t=R1(e,"string");return Qr(t)=="symbol"?t:t+""}function _1(e,t,r){return(t=w1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(n){_1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ve(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var N1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cs=function(){return Math.random().toString(36).substring(7).split("").join(".")},La={INIT:"@@redux/INIT"+cs(),REPLACE:"@@redux/REPLACE"+cs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cs()}};function vp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ls(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(ls)(e,t)}if(typeof e!="function")throw new Error(Ve(2));var a=e,i=t,s=[],c=s,f=!1;function u(){c===s&&(c=s.slice())}function m(){if(f)throw new Error(Ve(3));return i}function g(E){if(typeof E!="function")throw new Error(Ve(4));if(f)throw new Error(Ve(5));var T=!0;return u(),c.push(E),function(){if(T){if(f)throw new Error(Ve(6));T=!1,u();var N=c.indexOf(E);c.splice(N,1),s=null}}}function b(E){if(!vp(E))throw new Error(Ve(7));if(typeof E.type>"u")throw new Error(Ve(8));if(f)throw new Error(Ve(9));try{f=!0,i=a(i,E)}finally{f=!1}for(var T=s=c,M=0;M<T.length;M++){var N=T[M];N()}return E}function S(E){if(typeof E!="function")throw new Error(Ve(10));a=E,b({type:La.REPLACE})}function C(){var E,T=g;return E={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ve(11));function $(){N.next&&N.next(m())}$();var U=T($);return{unsubscribe:U}}},E[N1]=function(){return this},E}return b({type:La.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[N1]=C,n}function xp(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:La.INIT});if(typeof n>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:La.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function k1(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,c;try{xp(r)}catch(f){c=f}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},C=0;C<i.length;C++){var E=i[C],T=r[E],M=u[E],N=T(M,m);if(typeof N>"u"){var $=m&&m.type;throw new Error(Ve(14))}S[E]=N,b=b||N!==M}return b=b||i.length!==Object.keys(u).length,b?S:u}}function wo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function M1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Ve(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(f){return f(s)});return i=wo.apply(void 0,c)(a.dispatch),ss(ss({},a),{},{dispatch:i})}}}function P1(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var z1=P1();z1.withExtraArgument=P1;var ds=z1;var U1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sp=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,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 f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},_o=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Cp=Object.defineProperty,Op=Object.defineProperties,Lp=Object.getOwnPropertyDescriptors,I1=Object.getOwnPropertySymbols,Ep=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,D1=function(e,t,r){return t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Sr=function(e,t){for(var r in t||(t={}))Ep.call(t,r)&&D1(e,r,t[r]);if(I1)for(var n=0,a=I1(t);n<a.length;n++){var r=a[n];Ap.call(t,r)&&D1(e,r,t[r])}return e},fs=function(e,t){return Op(e,Lp(t))},Rp=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{c(r.next(f))}catch(u){a(u)}},s=function(f){try{c(r.throw(f))}catch(u){a(u)}},c=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};c((r=r.apply(e,t)).next())})};var wp=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)},W7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function _p(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Tp=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array),Np=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array);function hs(e){return kt(e)?Oa(e,function(){}):e}function kp(e){return typeof e=="boolean"}function Mp(){return function(t){return Pp(t)}}function Pp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,c=new Tp;if(r&&(kp(r)?c.push(ds):c.push(ds.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return c}var us=!0;function F1(e){var t=Mp(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,c=r.devTools,f=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,b=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(_p(a))S=k1(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!us&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!us&&C.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=M1.apply(void 0,C),T=wo;f&&(T=wp(Sr({trace:!us},typeof f=="object"&&f)));var M=new Np(E),N=M;Array.isArray(b)?N=_o([E],b):typeof b=="function"&&(N=b(M));var $=T.apply(void 0,N);return ls(S,m,$)}function Cr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Sr(Sr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function H1(e){var t={},r=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function zp(e){return typeof e=="function"}function Ip(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?H1(t):[t,r,n],i=a[0],s=a[1],c=a[2],f;if(zp(e))f=function(){return hs(e())};else{var u=hs(e);f=function(){return u}}function m(g,b){g===void 0&&(g=f());var S=_o([i[b.type]],s.filter(function(C){var E=C.matcher;return E(b)}).map(function(C){var E=C.reducer;return E}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,E){if(E)if(ir(C)){var T=C,M=E(T,b);return M===void 0?C:M}else{if(kt(C))return Oa(C,function(N){return E(N,b)});var M=E(C,b);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function Dp(e,t){return e+"/"+t}function G1(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:hs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var g=n[m],b=Dp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[b]=S,c[m]=C?Cr(b,C):Cr(b)});function f(){var m=typeof e.extraReducers=="function"?H1(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,E=m[2],T=E===void 0?void 0:E,M=Sr(Sr({},b),s);return Ip(r,function(N){for(var $ in M)N.addCase($,M[$]);for(var U=0,K=C;U<K.length;U++){var le=K[U];N.addMatcher(le.matcher,le.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var $p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=$p[Math.random()*64|0];return t},Up=["name","message","stack","code"],ps=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),$1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Fp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Up;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},q7=function(){function e(t,r,n){var a=Cr(t+"/fulfilled",function(m,g,b,S){return{payload:m,meta:fs(Sr({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Cr(t+"/pending",function(m,g,b){return{payload:void 0,meta:fs(Sr({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Cr(t+"/rejected",function(m,g,b,S,C){return{payload:S,error:(n&&n.serializeError||Fp)(m||"Rejected"),meta:fs(Sr({},C||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,b,S){var C=n?.idGenerator?n.idGenerator(m):Bp(),E=new f,T,M=!1;function N(U){T=U,E.abort()}var $=function(){return Rp(this,null,function(){var U,K,le,et,ze,Wt,Ie;return Sp(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),et=(U=n?.condition)==null?void 0:U.call(n,m,{getState:b,extra:S}),Gp(et)?[4,et]:[3,2];case 1:et=x.sent(),x.label=2;case 2:if(et===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,ze=new Promise(function(L,F){return E.signal.addEventListener("abort",function(){return F({name:"AbortError",message:T||"Aborted"})})}),g(i(C,m,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:C,arg:m},{getState:b,extra:S}))),[4,Promise.race([ze,Promise.resolve(r(m,{dispatch:g,getState:b,extra:S,requestId:C,signal:E.signal,abort:N,rejectWithValue:function(L,F){return new ps(L,F)},fulfillWithValue:function(L,F){return new $1(L,F)}})).then(function(L){if(L instanceof ps)throw L;return L instanceof $1?a(L.payload,C,m,L.meta):a(L,C,m)})])];case 3:return le=x.sent(),[3,5];case 4:return Wt=x.sent(),le=Wt instanceof ps?s(null,C,m,Wt.payload,Wt.meta):s(Wt,C,m),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&s.match(le)&&le.meta.condition,Ie||g(le),[2,le]}})})}();return Object.assign($,{abort:N,requestId:C,arg:m,unwrap:function(){return $.then(Hp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Hp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var W1="listener",V1="completed",j1="cancelled",Z7="task-"+j1,Y7="task-"+V1,X7=W1+"-"+j1,Q7=W1+"-"+V1;var ms="listenerMiddleware";var J7=Cr(ms+"/add"),eb=Cr(ms+"/removeAll"),tb=Cr(ms+"/remove");var B1,rb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(B1||(B1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Wp=function(e){return function(t){setTimeout(t,e)}},ob=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wp(10);L1();var Vp=ha(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Ea=class extends Vp(Object){};window.ftReduxStores||(window.ftReduxStores={});var K1=class e extends Ea{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(va(i))return i;if(a==null)return;let s=G1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=F1({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=r1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,c,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ma;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Aa=class{static format(t,r,n,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,r,n,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${c}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ra=y(w()),jp="ft-app-info",Jr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Jr.eventName="authentication-change";var Kp={session:(e,t)=>{(0,Ra.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new Jr(t.payload)),0))}},z=Ra.FtReduxStore.get({name:jp,reducers:Kp,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 q1=y(w()),wa=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Z1=(0,q1.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Aa.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wa([(0,gs.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wa([(0,gs.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wa([ji({store:z.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),wa([ji({store:z.name})],t.prototype,"uiLocale",void 0),t});var Pa=y(w());var ys=y(w());var eo=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=z.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=z.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var _a=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:eo.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):eo.await()}};var tt=class extends _a{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[f])=>c.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ys.CacheRegistry,this.cache=t?a.commonCache:new ys.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Ta=class extends tt{async listMySearches(){let{session:t}=z.getState();return t1(t,xe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Na=class extends tt{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ka=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var Ma=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var qp="ft-user-assets",Zp={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(vt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;vs(e,r,[...bs(e,r),a]),Y1(e,r,1,n),X1(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;vs(e,r,bs(e,r).map(a=>a.id===n.id?n:a)),X1(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;vs(e,r,bs(e,r).filter(i=>i.id!==a)),Y1(e,r,-1,n)}},Q1={[vt.SEARCHES]:"savedSearches",[vt.BOOKMARKS]:"bookmarks",[vt.BOOKS]:void 0,[vt.COLLECTIONS]:void 0},bs=(e,t)=>{var r;let n=Q1[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},vs=(e,t,r)=>{let n=Q1[t];n&&(e[n]=r)},Y1=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===vt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},X1=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ut=Pa.FtReduxStore.get({name:qp,reducers:Zp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(vt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xs=class{constructor(t=new ka,r=new Ma){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Na,this.savedSearchesService=new Ta,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=z.getState();(0,Pa.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ut.actions.clearAssetCount(),ut.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ut.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ut.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&ut.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&ut.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(ut.getState().assetCounts.bookmarkByMap).length!==0;t===vt.BOOKMARKS&&r&&ut.actions.clearBookmarkCountByMap(),ut.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ut.actions.bookmarks(r)}}},Yp=new xs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Yp);var Ss=class{addCommand(t,r=!1){z.commands.add(t,r)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ss;var St=y(w());var J1,To=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Xp=Symbol("clearAfterUnitTest"),za=class extends(0,St.withEventBus)(tt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[J1]=()=>{this.defaultMessages={},this.cache=new St.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,St.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new St.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof St.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new To({loadedContexts:t})),this.dispatchEvent(new To({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new To({loadedContexts:[t]})),this.dispatchEvent(new To({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,St.delay)(0).then(()=>n()).catch(()=>null)))}};J1=Xp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var No=window.FluidTopicsI18nService,Ia=window.FluidTopicsCustomI18nService;var ed=y(w()),Cs=class{highlightHtml(t,r,n){(0,ed.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Cs;var td=y(w());var Os=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;if(t==null)return"";try{return td.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new Os;var rd=y(w());var yn=class{static get(t,r){var n,a;let i=z.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new rd.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Ls=class{urlToSearchRequest(t){return yn.get().parse(t)}searchRequestToUrl(t){return yn.get().serialize(t)}};window.FluidTopicsUrlService=new Ls;var Or=y(w());var to=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};to.eventName="change";var Es=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},od=new Es;var Da=class e extends Or.WithEventBus{static build(){return new e(window.history,od,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Or.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new to(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,c])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(to.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(to.eventName,t)}currentItem(){return(0,Or.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Or.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Or.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Da.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var nd=y(I());var ad=nd.css`
12
+ `;var ko=y(w()),Rs=y(j());var fn;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(fn||(fn={}));var bn=y(w());var Sl=y(w());var ap=y(Ol(),1);var Ll;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Ll||(Ll={}));var El;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(El||(El={}));var Al;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Al||(Al={}));var Rl;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Rl||(Rl={}));var wl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(wl||(wl={}));var _l;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(_l||(_l={}));var Tl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Tl||(Tl={}));var Nl;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Nl||(Nl={}));var kl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(kl||(kl={}));var Ml;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ml||(Ml={}));var Pl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var zl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(zl||(zl={}));var Il;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Il||(Il={}));var Dl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Dl||(Dl={}));var ar;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ar||(ar={}));var $l;(function(e){e.ASC="ASC",e.DESC="DESC"})($l||($l={}));var Bl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Bl||(Bl={}));var da;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(da||(da={}));var Ul;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ul||(Ul={}));var Fl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Fl||(Fl={}));var Hl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var fa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fa||(fa={}));var Gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gl||(Gl={}));var ua;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ua||(ua={}));var Wl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wl||(Wl={}));var xe;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(xe||(xe={}));var vt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(vt||(vt={}));var Vl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Vl||(Vl={}));var jl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(jl||(jl={}));var Kl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Kl||(Kl={}));var ql;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ql||(ql={}));var Zl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zl||(Zl={}));var Yl;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(Yl||(Yl={}));var Xl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Xl||(Xl={}));var Ql;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ql||(Ql={}));var Jl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jl||(Jl={}));var np={[xe.PERSONAL_BOOK_SHARE_USER]:[xe.PERSONAL_BOOK_USER],[xe.HTML_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.PDF_EXPORT_USER]:[xe.PERSONAL_BOOK_USER],[xe.KHUB_ADMIN]:[xe.CONTENT_PUBLISHER],[xe.ADMIN]:[xe.KHUB_ADMIN,xe.USERS_ADMIN,xe.PORTAL_ADMIN,xe.BEHAVIOR_DATA_USER],[xe.GENERATIVE_AI_EXPORT_USER]:[xe.GENERATIVE_AI_USER]};function e1(e,t){return e===t||(np[e]??[]).some(r=>e1(r,t))}function t1(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>e1(n,t))}var gs=y(j());function ip(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!pa(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!pa(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!pa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function pa(e,t){try{return ip(e,t)}catch{return!1}}function un(e,t){return!pa(e,t)}function r1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ha(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var o1=y(j(),1);var ji=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:un,attribute:!1,...t};(0,o1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:c=>c[n],store:t.store})}};var ma=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Zr=y(j(),1);var n1=y(j(),1);function a1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,n1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:un,...t??{}})}var ga=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var s1=y(I(),1);var ya=globalThis,sp=ya.ShadowRoot&&(ya.ShadyCSS===void 0||ya.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i7=Symbol();var i1=(e,t)=>{if(sp)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=ya.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var ba=class extends s1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return i1(n,t.elementStyles),n}};function c1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Lo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},u1,l1=Symbol("constructorPrototype"),d1=Symbol("constructorName"),p1=Symbol("exportpartsDebouncer"),f1=Symbol("dynamicDependenciesLoaded"),Oo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Oo.eventName="exportparts-updated";var Vt=class extends ba{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[u1]=new ga(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[p1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[d1]=this.constructor.name,this[l1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[d1]&&Object.setPrototypeOf(this,this[l1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[f1]||(r[f1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Oo.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Oo)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=c1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,c;let f=b=>b!=null&&b.trim().length>0,u=t.filter(f).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...C].filter(f).map(T=>T.trim());for(let T of E)m.add(T)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};u1=p1;Lo([(0,Zr.property)()],Vt.prototype,"exportpartsPrefix",void 0);Lo([a1([])],Vt.prototype,"exportpartsPrefixes",void 0);Lo([(0,Zr.property)({reflect:!0})],Vt.prototype,"exportparts",void 0);Lo([(0,Zr.property)()],Vt.prototype,"customStylesheet",void 0);Lo([(0,Zr.property)()],Vt.prototype,"elementToFocus",void 0);Lo([(0,Zr.state)()],Vt.prototype,"useAdoptedStyleSheets",void 0);function va(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var pn=Symbol("internalReduxEventsUnsubscribers"),br=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores"),cp=ha(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=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 f;c=(f=c??s.name)!==null&&f!==void 0?f:"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 f=this.constructor.getPropertyOptions(c);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[br].has(s.store):this[br].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var f;this[br].set(s,c.subscribe(()=>this.updateFromStores())),this[pn].set(s,[]),va(c)&&c.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.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[pn].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[br].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[br].has(s)&&this[br].get(s)(),this[br].delete(s),(c=this[pn].get(s))===null||c===void 0||c.forEach(f=>f()),this[pn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=br,r=Yr,n=pn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),h1=class extends cp(Vt){};function xt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ir(e){return!!e&&!!e[de]}function kt(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===gp}(e)||Array.isArray(e)||!!e[S1]||!!(!((t=e.constructor)===null||t===void 0)&&t[S1])||ts(e)||rs(e))}function Xr(e,t,r){r===void 0&&(r=!1),Ro(e)===0?(r?Object.keys:Ao)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function Ro(e){var t=e[de];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ts(e)?2:rs(e)?3:0}function Eo(e,t){return Ro(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lp(e,t){return Ro(e)===2?e.get(t):e[t]}function C1(e,t,r){var n=Ro(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function O1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ts(e){return hp&&e instanceof Map}function rs(e){return mp&&e instanceof Set}function vr(e){return e.o||e.t}function os(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A1(e);delete t[de];for(var r=Ao(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ns(e,t){return t===void 0&&(t=!1),as(e)||ir(e)||!kt(e)||(Ro(e)>1&&(e.set=e.add=e.clear=e.delete=dp),Object.freeze(e),t&&Xr(e,function(r,n){return ns(n,!0)},!0)),e}function dp(){xt(2)}function as(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function jt(e){var t=es[e];return t||xt(18,e),t}function fp(e,t){es[e]||(es[e]=t)}function Xi(){return mn}function Ki(e,t){t&&(jt("Patches"),e.u=[],e.s=[],e.v=t)}function xa(e){Qi(e),e.p.forEach(up),e.p=null}function Qi(e){e===mn&&(mn=e.l)}function m1(e){return mn={p:[],l:mn,h:e,m:!0,_:0}}function up(e){var t=e[de];t.i===0||t.i===1?t.j():t.g=!0}function qi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||jt("ES5").S(t,e,n),n?(r[de].P&&(xa(t),xt(4)),kt(e)&&(e=Sa(t,e),t.l||Ca(t,e)),t.u&&jt("Patches").M(r[de].t,e,t.u,t.s)):e=Sa(t,r,[]),xa(t),t.u&&t.v(t.u,t.s),e!==E1?e:void 0}function Sa(e,t,r){if(as(t))return t;var n=t[de];if(!n)return Xr(t,function(c,f){return g1(e,n,t,c,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Ca(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=os(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Xr(i,function(c,f){return g1(e,n,a,c,f,r,s)}),Ca(e,a,!1),r&&e.u&&jt("Patches").N(n,r,e.u,e.s)}return n.o}function g1(e,t,r,n,a,i,s){if(ir(a)){var c=Sa(e,a,i&&t&&t.i!==3&&!Eo(t.R,n)?i.concat(n):void 0);if(C1(r,n,c),!ir(c))return;e.m=!1}else s&&r.add(a);if(kt(a)&&!as(a)){if(!e.h.D&&e._<1)return;Sa(e,a),t&&t.A.l||Ca(e,a)}}function Ca(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ns(t,r)}function Zi(e,t){var r=e[de];return(r?vr(r):e)[t]}function y1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function xr(e){e.P||(e.P=!0,e.l&&xr(e.l))}function Yi(e){e.o||(e.o=os(e.t))}function Ji(e,t,r){var n=ts(t)?jt("MapSet").F(t,r):rs(t)?jt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Xi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=c,u=gn;s&&(f=[c],u=hn);var m=Proxy.revocable(f,u),g=m.revoke,b=m.proxy;return c.k=b,c.j=g,b}(t,r):jt("ES5").J(t,r);return(r?r.A:Xi()).p.push(n),n}function pp(e){return ir(e)||xt(22,e),function t(r){if(!kt(r))return r;var n,a=r[de],i=Ro(r);if(a){if(!a.P&&(a.i<4||!jt("ES5").K(a)))return a.t;a.I=!0,n=b1(r,i),a.I=!1}else n=b1(r,i);return Xr(n,function(s,c){a&&lp(a.t,s)===c||C1(n,s,t(c))}),i===3?new Set(n):n}(e)}function b1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return os(e)}function L1(){function e(s,c){var f=i[s];return f?f.enumerable=c:i[s]=f={configurable:!0,enumerable:c,get:function(){var u=this[de];return gn.get(u,s)},set:function(u){var m=this[de];gn.set(m,s,u)}},f}function t(s){for(var c=s.length-1;c>=0;c--){var f=s[c][de];if(!f.P)switch(f.i){case 5:n(f)&&xr(f);break;case 4:r(f)&&xr(f)}}}function r(s){for(var c=s.t,f=s.k,u=Ao(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==de){var b=c[g];if(b===void 0&&!Eo(c,g))return!0;var S=f[g],C=S&&S[de];if(C?C.t!==b:!O1(S,b))return!0}}var E=!!c[de];return u.length!==Ao(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(c,c.length-1);if(f&&!f.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&xt(3,JSON.stringify(vr(s)))}var i={};fp("ES5",{J:function(s,c){var f=Array.isArray(s),u=function(g,b){if(g){for(var S=Array(b.length),C=0;C<b.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var E=A1(b);delete E[de];for(var T=Ao(E),M=0;M<T.length;M++){var N=T[M];E[N]=e(N,g||!!E[N].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(f,s),m={i:f?5:4,A:c?c.A:Xi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,de,{value:m,writable:!0}),u},S:function(s,c,f){f?ir(c)&&c[de].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[de];if(g){var b=g.t,S=g.k,C=g.R,E=g.i;if(E===4)Xr(S,function(U){U!==de&&(b[U]!==void 0||Eo(b,U)?C[U]||u(S[U]):(C[U]=!0,xr(g)))}),Xr(b,function(U){S[U]!==void 0||Eo(S,U)||(C[U]=!1,xr(g))});else if(E===5){if(n(g)&&(xr(g),C.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)C[T]=!1;else for(var M=b.length;M<S.length;M++)C[M]=!0;for(var N=Math.min(S.length,b.length),$=0;$<N;$++)S.hasOwnProperty($)||(C[$]=!0),C[$]===void 0&&u(S[$])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var v1,mn,is=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hp=typeof Map<"u",mp=typeof Set<"u",x1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",E1=is?Symbol.for("immer-nothing"):((v1={})["immer-nothing"]=!0,v1),S1=is?Symbol.for("immer-draftable"):"__$immer_draftable",de=is?Symbol.for("immer-state"):"__$immer_state";var gp=""+Object.prototype.constructor,Ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A1=Object.getOwnPropertyDescriptors||function(e){var t={};return Ao(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},es={},gn={get:function(e,t){if(t===de)return e;var r=vr(e);if(!Eo(r,t))return function(a,i,s){var c,f=y1(i,s);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!kt(n)?n:n===Zi(e.t,t)?(Yi(e),e.o[t]=Ji(e.A.h,n,e)):n},has:function(e,t){return t in vr(e)},ownKeys:function(e){return Reflect.ownKeys(vr(e))},set:function(e,t,r){var n=y1(vr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Zi(vr(e),t),i=a?.[de];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(O1(r,a)&&(r!==void 0||Eo(e.t,t)))return!0;Yi(e),xr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Zi(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Yi(e),xr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=vr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){xt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){xt(12)}},hn={};Xr(gn,function(e,t){hn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),hn.deleteProperty=function(e,t){return hn.set.call(this,e,t,void 0)},hn.set=function(e,t,r){return gn.set.call(this,e[0],t,r,e[0])};var yp=function(){function e(r){var n=this;this.O=x1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var f=n;return function(E){var T=this;E===void 0&&(E=c);for(var M=arguments.length,N=Array(M>1?M-1:0),$=1;$<M;$++)N[$-1]=arguments[$];return f.produce(E,function(U){var K;return(K=i).call.apply(K,[T,U].concat(N))})}}var u;if(typeof i!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),kt(a)){var m=m1(n),g=Ji(n,a,void 0),b=!0;try{u=i(g),b=!1}finally{b?xa(m):Qi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(E){return Ki(m,s),qi(E,m)},function(E){throw xa(m),E}):(Ki(m,s),qi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===E1&&(u=void 0),n.D&&ns(u,!0),s){var S=[],C=[];jt("Patches").M(a,u,S,C),s(S,C)}return u}xt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="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 a.apply(void 0,[S].concat(g))})};var s,c,f=n.produce(a,i,function(u,m){s=u,c=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,c]}):[f,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){kt(r)||xt(8),ir(r)&&(r=pp(r));var n=m1(this),a=Ji(this,r,void 0);return a[de].C=!0,Qi(n),a},t.finishDraft=function(r,n){var a=r&&r[de],i=a.A;return Ki(i,n),qi(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!x1&&xt(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=jt("Patches").$;return ir(r)?s(r,n):this.produce(r,function(c){return s(c,n)})},e}(),ft=new yp,bp=ft.produce,S7=ft.produceWithPatches.bind(ft),C7=ft.setAutoFreeze.bind(ft),O7=ft.setUseProxies.bind(ft),L7=ft.applyPatches.bind(ft),E7=ft.createDraft.bind(ft),A7=ft.finishDraft.bind(ft),Oa=bp;function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(e)}function R1(e,t){if(Qr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w1(e){var t=R1(e,"string");return Qr(t)=="symbol"?t:t+""}function _1(e,t,r){return(t=w1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(n){_1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ve(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var N1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cs=function(){return Math.random().toString(36).substring(7).split("").join(".")},La={INIT:"@@redux/INIT"+cs(),REPLACE:"@@redux/REPLACE"+cs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cs()}};function vp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ls(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(ls)(e,t)}if(typeof e!="function")throw new Error(Ve(2));var a=e,i=t,s=[],c=s,f=!1;function u(){c===s&&(c=s.slice())}function m(){if(f)throw new Error(Ve(3));return i}function g(E){if(typeof E!="function")throw new Error(Ve(4));if(f)throw new Error(Ve(5));var T=!0;return u(),c.push(E),function(){if(T){if(f)throw new Error(Ve(6));T=!1,u();var N=c.indexOf(E);c.splice(N,1),s=null}}}function b(E){if(!vp(E))throw new Error(Ve(7));if(typeof E.type>"u")throw new Error(Ve(8));if(f)throw new Error(Ve(9));try{f=!0,i=a(i,E)}finally{f=!1}for(var T=s=c,M=0;M<T.length;M++){var N=T[M];N()}return E}function S(E){if(typeof E!="function")throw new Error(Ve(10));a=E,b({type:La.REPLACE})}function C(){var E,T=g;return E={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ve(11));function $(){N.next&&N.next(m())}$();var U=T($);return{unsubscribe:U}}},E[N1]=function(){return this},E}return b({type:La.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:S},n[N1]=C,n}function xp(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:La.INIT});if(typeof n>"u")throw new Error(Ve(12));if(typeof r(void 0,{type:La.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function k1(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,c;try{xp(r)}catch(f){c=f}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var b=!1,S={},C=0;C<i.length;C++){var E=i[C],T=r[E],M=u[E],N=T(M,m);if(typeof N>"u"){var $=m&&m.type;throw new Error(Ve(14))}S[E]=N,b=b||N!==M}return b=b||i.length!==Object.keys(u).length,b?S:u}}function wo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function M1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Ve(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=t.map(function(f){return f(s)});return i=wo.apply(void 0,c)(a.dispatch),ss(ss({},a),{},{dispatch:i})}}}function P1(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,e):s(c)}}};return t}var z1=P1();z1.withExtraArgument=P1;var ds=z1;var U1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sp=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,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 f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},_o=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Cp=Object.defineProperty,Op=Object.defineProperties,Lp=Object.getOwnPropertyDescriptors,I1=Object.getOwnPropertySymbols,Ep=Object.prototype.hasOwnProperty,Ap=Object.prototype.propertyIsEnumerable,D1=function(e,t,r){return t in e?Cp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Sr=function(e,t){for(var r in t||(t={}))Ep.call(t,r)&&D1(e,r,t[r]);if(I1)for(var n=0,a=I1(t);n<a.length;n++){var r=a[n];Ap.call(t,r)&&D1(e,r,t[r])}return e},fs=function(e,t){return Op(e,Lp(t))},Rp=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{c(r.next(f))}catch(u){a(u)}},s=function(f){try{c(r.throw(f))}catch(u){a(u)}},c=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};c((r=r.apply(e,t)).next())})};var wp=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)},W7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function _p(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var Tp=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array),Np=function(e){U1(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,_o([void 0],r[0].concat(this)))):new(t.bind.apply(t,_o([void 0],r.concat(this))))},t}(Array);function hs(e){return kt(e)?Oa(e,function(){}):e}function kp(e){return typeof e=="boolean"}function Mp(){return function(t){return Pp(t)}}function Pp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,c=new Tp;if(r&&(kp(r)?c.push(ds):c.push(ds.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return c}var us=!0;function F1(e){var t=Mp(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,c=r.devTools,f=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,b=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(_p(a))S=k1(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!us&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!us&&C.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=M1.apply(void 0,C),T=wo;f&&(T=wp(Sr({trace:!us},typeof f=="object"&&f)));var M=new Np(E),N=M;Array.isArray(b)?N=_o([E],b):typeof b=="function"&&(N=b(M));var $=T.apply(void 0,N);return ls(S,m,$)}function Cr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Sr(Sr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function H1(e){var t={},r=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function zp(e){return typeof e=="function"}function Ip(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?H1(t):[t,r,n],i=a[0],s=a[1],c=a[2],f;if(zp(e))f=function(){return hs(e())};else{var u=hs(e);f=function(){return u}}function m(g,b){g===void 0&&(g=f());var S=_o([i[b.type]],s.filter(function(C){var E=C.matcher;return E(b)}).map(function(C){var E=C.reducer;return E}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,E){if(E)if(ir(C)){var T=C,M=E(T,b);return M===void 0?C:M}else{if(kt(C))return Oa(C,function(N){return E(N,b)});var M=E(C,b);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function Dp(e,t){return e+"/"+t}function G1(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:hs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var g=n[m],b=Dp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[b]=S,c[m]=C?Cr(b,C):Cr(b)});function f(){var m=typeof e.extraReducers=="function"?H1(e.extraReducers):[e.extraReducers],g=m[0],b=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,E=m[2],T=E===void 0?void 0:E,M=Sr(Sr({},b),s);return Ip(r,function(N){for(var $ in M)N.addCase($,M[$]);for(var U=0,K=C;U<K.length;U++){var le=K[U];N.addMatcher(le.matcher,le.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var $p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=$p[Math.random()*64|0];return t},Up=["name","message","stack","code"],ps=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),$1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Fp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Up;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},q7=function(){function e(t,r,n){var a=Cr(t+"/fulfilled",function(m,g,b,S){return{payload:m,meta:fs(Sr({},S||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Cr(t+"/pending",function(m,g,b){return{payload:void 0,meta:fs(Sr({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Cr(t+"/rejected",function(m,g,b,S,C){return{payload:S,error:(n&&n.serializeError||Fp)(m||"Rejected"),meta:fs(Sr({},C||{}),{arg:b,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,b,S){var C=n?.idGenerator?n.idGenerator(m):Bp(),E=new f,T,M=!1;function N(U){T=U,E.abort()}var $=function(){return Rp(this,null,function(){var U,K,le,et,ze,Wt,Ie;return Sp(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),et=(U=n?.condition)==null?void 0:U.call(n,m,{getState:b,extra:S}),Gp(et)?[4,et]:[3,2];case 1:et=x.sent(),x.label=2;case 2:if(et===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,ze=new Promise(function(L,F){return E.signal.addEventListener("abort",function(){return F({name:"AbortError",message:T||"Aborted"})})}),g(i(C,m,(K=n?.getPendingMeta)==null?void 0:K.call(n,{requestId:C,arg:m},{getState:b,extra:S}))),[4,Promise.race([ze,Promise.resolve(r(m,{dispatch:g,getState:b,extra:S,requestId:C,signal:E.signal,abort:N,rejectWithValue:function(L,F){return new ps(L,F)},fulfillWithValue:function(L,F){return new $1(L,F)}})).then(function(L){if(L instanceof ps)throw L;return L instanceof $1?a(L.payload,C,m,L.meta):a(L,C,m)})])];case 3:return le=x.sent(),[3,5];case 4:return Wt=x.sent(),le=Wt instanceof ps?s(null,C,m,Wt.payload,Wt.meta):s(Wt,C,m),[3,5];case 5:return Ie=n&&!n.dispatchConditionRejection&&s.match(le)&&le.meta.condition,Ie||g(le),[2,le]}})})}();return Object.assign($,{abort:N,requestId:C,arg:m,unwrap:function(){return $.then(Hp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Hp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var W1="listener",V1="completed",j1="cancelled",Z7="task-"+j1,Y7="task-"+V1,X7=W1+"-"+j1,Q7=W1+"-"+V1;var ms="listenerMiddleware";var J7=Cr(ms+"/add"),eb=Cr(ms+"/removeAll"),tb=Cr(ms+"/remove");var B1,rb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(B1||(B1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Wp=function(e){return function(t){setTimeout(t,e)}},ob=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Wp(10);L1();var Vp=ha(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),Ea=class extends Vp(Object){};window.ftReduxStores||(window.ftReduxStores={});var K1=class e extends Ea{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(va(i))return i;if(a==null)return;let s=G1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=F1({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=r1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,c,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ma;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Aa=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,c=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?f:a?`${c} ${f}`:c}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ra=y(w()),jp="ft-app-info",Jr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Jr.eventName="authentication-change";var Kp={session:(e,t)=>{(0,Ra.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new Jr(t.payload)),0))}},z=Ra.FtReduxStore.get({name:jp,reducers:Kp,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 q1=y(w()),wa=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},Z1=(0,q1.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Aa.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wa([(0,gs.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),wa([(0,gs.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),wa([ji({store:z.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),wa([ji({store:z.name})],t.prototype,"uiLocale",void 0),t});var Pa=y(w());var ys=y(w());var eo=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=z.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=z.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var _a=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:eo.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):eo.await()}};var tt=class extends _a{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[f])=>c.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ys.CacheRegistry,this.cache=t?a.commonCache:new ys.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Ta=class extends tt{async listMySearches(){let{session:t}=z.getState();return t1(t,xe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Na=class extends tt{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ka=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var Ma=class extends tt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=z.getState().session;return!!t?.sessionAuthenticated}};var qp="ft-user-assets",Zp={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(vt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;vs(e,r,[...bs(e,r),a]),Y1(e,r,1,n),X1(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;vs(e,r,bs(e,r).map(a=>a.id===n.id?n:a)),X1(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;vs(e,r,bs(e,r).filter(i=>i.id!==a)),Y1(e,r,-1,n)}},Q1={[vt.SEARCHES]:"savedSearches",[vt.BOOKMARKS]:"bookmarks",[vt.BOOKS]:void 0,[vt.COLLECTIONS]:void 0},bs=(e,t)=>{var r;let n=Q1[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},vs=(e,t,r)=>{let n=Q1[t];n&&(e[n]=r)},Y1=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===vt.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},X1=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ut=Pa.FtReduxStore.get({name:qp,reducers:Zp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(vt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),xs=class{constructor(t=new ka,r=new Ma){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Na,this.savedSearchesService=new Ta,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=z.getState();(0,Pa.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ut.actions.clearAssetCount(),ut.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ut.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ut.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&ut.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&ut.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(ut.getState().assetCounts.bookmarkByMap).length!==0;t===vt.BOOKMARKS&&r&&ut.actions.clearBookmarkCountByMap(),ut.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ut.actions.bookmarks(r)}}},Yp=new xs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Yp);var Ss=class{addCommand(t,r=!1){z.commands.add(t,r)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ss;var St=y(w());var J1,To=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Xp=Symbol("clearAfterUnitTest"),za=class extends(0,St.withEventBus)(tt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[J1]=()=>{this.defaultMessages={},this.cache=new St.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,St.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new St.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof St.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new To({loadedContexts:t})),this.dispatchEvent(new To({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new To({loadedContexts:[t]})),this.dispatchEvent(new To({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,St.delay)(0).then(()=>n()).catch(()=>null)))}};J1=Xp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends za{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var No=window.FluidTopicsI18nService,Ia=window.FluidTopicsCustomI18nService;var ed=y(w()),Cs=class{highlightHtml(t,r,n){(0,ed.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Cs;var td=y(w());var Os=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return td.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(t)} is not valid`,c),c}}};window.FluidTopicsDateService=new Os;var rd=y(w());var yn=class{static get(t,r){var n,a;let i=z.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new rd.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Ls=class{urlToSearchRequest(t){return yn.get().parse(t)}searchRequestToUrl(t){return yn.get().serialize(t)}};window.FluidTopicsUrlService=new Ls;var Or=y(w());var to=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};to.eventName="change";var Es=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},od=new Es;var Da=class e extends Or.WithEventBus{static build(){return new e(window.history,od,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Or.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new to(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,c])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(to.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(to.eventName,t)}currentItem(){return(0,Or.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Or.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Or.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Da.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var nd=y(I());var ad=nd.css`
13
13
  `;var sd=y(I()),$e=y(j()),Mt=y(w());function id(e,t){let{authenticationRequired:r,session:n}=z.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Ee=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ae=class extends Mt.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=()=>eo.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Mt.CacheRegistry,this.cleanSessionDebouncer=new Mt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return sd.html`
14
14
  <slot></slot>
15
15
  `}connectedCallback(){super.connectedCallback(),z.addEventListener(Jr.eventName,this.reloadConfiguration)}disconnectedCallback(){z.addEventListener(Jr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,a,i,s,c,f;super.update(t),t.has("baseUrl")&&(z.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&z.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&z.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&z.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&z.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&z.actions.noCustom(this.noCustom),t.has("editorMode")&&z.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&z.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&z.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>No.addContext(u)),t.has("openExternalDocumentInNewTab")&&z.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&z.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&z.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(z.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),z.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),z.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&z.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&z.actions.availableContentLocales((f=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&f!==void 0?f:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>id(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ae.elementDefinitions={};ae.styles=ad;Ee([(0,$e.property)()],ae.prototype,"baseUrl",void 0);Ee([(0,$e.property)()],ae.prototype,"apiIntegrationIdentifier",void 0);Ee([(0,$e.property)()],ae.prototype,"apiIntegrationAppVersion",void 0);Ee([(0,$e.property)()],ae.prototype,"uiLocale",void 0);Ee([(0,Mt.jsonProperty)(null)],ae.prototype,"availableUiLocales",void 0);Ee([(0,Mt.jsonProperty)(null)],ae.prototype,"metadataConfiguration",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"editorMode",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"noCustom",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"openExternalDocumentInNewTab",void 0);Ee([(0,$e.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],ae.prototype,"noCustomComponent",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"withManualResources",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"navigatorOnline",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"forcedOffline",void 0);Ee([(0,$e.property)({type:Object})],ae.prototype,"apiProvider",void 0);Ee([(0,$e.property)({type:Boolean})],ae.prototype,"authenticationRequired",void 0);Ee([(0,Mt.jsonProperty)([])],ae.prototype,"messageContexts",void 0);Ee([(0,Mt.jsonProperty)(void 0)],ae.prototype,"session",void 0);Ee([(0,$e.state)()],ae.prototype,"localesConfiguration",void 0);Ee([(0,$e.state)()],ae.prototype,"availableContentLocales",void 0);var cd=y(w());(0,cd.customElement)("ft-app-context")(ae);var $a=class e extends Event{constructor(){super(e.eventName)}};$a.eventName="search-context-clear-all-filters";var Ba=e=>e.request.virtualField===da.TITLE_ONLY&&e.request.scope===ua.DOCUMENTS,Ua=e=>e.request.keywordMatch==ar.MANDATORY;var ld=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ws=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},dd=Symbol("registerInterval"),As=Symbol("registerAttempts"),Qp=40,Jp=(0,ko.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var a,i,s;super.willUpdate(n),n.has("neededSearchRequests")&&((a=this.stateManager)===null||a===void 0||a.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[As]=0,this.tryToRegisterToContext(),this[dd]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[As]>Qp?window.clearInterval(this[dd]):(this[As]++,this.dispatchEvent(new ws))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ld([(0,Rs.state)()],t.prototype,"stateManager",void 0),ld([(0,Rs.state)({hasChanged:ko.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Lr=class extends Jp(ko.FtLitElementRedux){};var Oi=y(I()),Ue=y(j()),Ku=y(Ct()),tn=y(w());var vd=y(I()),Be=y(j()),xd=y(Ct()),vn=y(w());var yd=y(I()),Se=y(w()),ud=Se.FtCssVariableFactory.extend("--ft-ripple-color","",Se.designSystemVariables.colorContent),O={color:ud,backgroundColor:Se.FtCssVariableFactory.extend("--ft-ripple-background-color","",ud),opacityContentOnSurfacePressed:Se.FtCssVariableFactory.external(Se.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Se.FtCssVariableFactory.external(Se.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Se.FtCssVariableFactory.external(Se.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Se.FtCssVariableFactory.external(Se.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Se.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},pd=Se.FtCssVariableFactory.extend("--ft-ripple-color","",Se.designSystemVariables.colorPrimary),hd={color:pd,backgroundColor:Se.FtCssVariableFactory.extend("--ft-ripple-background-color","",pd)},md=Se.FtCssVariableFactory.extend("--ft-ripple-color","",Se.designSystemVariables.colorSecondary),gd={color:md,backgroundColor:Se.FtCssVariableFactory.extend("--ft-ripple-background-color","",md)},bd=yd.css`