@fluid-topics/ft-search-result-title 2.2.39 → 2.2.41

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.
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Zi=Object.create;var sn=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var ro=Object.getPrototypeOf,no=Object.prototype.hasOwnProperty;var ot=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var so=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of to(t))!no.call(e,s)&&s!==r&&sn(e,s,{get:()=>t[s],enumerable:!(n=eo(t,s))||n.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Zi(ro(e)):{},so(t||!e||!e.__esModule?sn(r,"default",{value:e,enumerable:!0}):r,e));var b=ot((Ca,on)=>{on.exports=ftGlobals.wcUtils});var oe=ot((Ta,an)=>{an.exports=ftGlobals.lit});var z=ot((wa,cn)=>{cn.exports=ftGlobals.litDecorators});var Bi=ot((cp,Hi)=>{Hi.exports=ftGlobals.litUnsafeHTML});var Yi=y(b());var it=y(oe()),Ki=y(z()),Wi=y(b());var Fe=y(b());var se=y(b()),Ze=y(z());var nr;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(nr||(nr={}));var ne=y(b());var io=y(b());var ln;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ln||(ln={}));var un;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(un||(un={}));var dn;(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"})(dn||(dn={}));var pn;(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"})(pn||(pn={}));var hn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(hn||(hn={}));var fn;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(fn||(fn={}));var yn;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(yn||(yn={}));var mn;(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"})(mn||(mn={}));var gn;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(gn||(gn={}));var Sn;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Sn||(Sn={}));var En;(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",e.DOC_DIFF="DOC_DIFF"})(En||(En={}));var An;(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"})(An||(An={}));var vn;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(vn||(vn={}));var bn;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(bn||(bn={}));var xn;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(xn||(xn={}));var _n;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(_n||(_n={}));var Cn;(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"})(Cn||(Cn={}));var sr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(sr||(sr={}));var Tn;(function(e){e.ASC="ASC",e.DESC="DESC"})(Tn||(Tn={}));var wn;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(wn||(wn={}));var ir;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ir||(ir={}));var On;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(On||(On={}));var at;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(at||(at={}));var Rn;(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"})(Rn||(Rn={}));var In;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(In||(In={}));var kn;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(kn||(kn={}));var or;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(or||(or={}));var Dn;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Dn||(Dn={}));var _;(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"})(_||(_={}));var B;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(B||(B={}));var Nn;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Nn||(Nn={}));var Mn;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Mn||(Mn={}));var Ln;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ln||(Ln={}));var Fn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Fn||(Fn={}));var Pn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Pn||(Pn={}));var Un;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Un||(Un={}));var $n;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})($n||($n={}));var Hn;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Hn||(Hn={}));var Bn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Bn||(Bn={}));var jn;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(jn||(jn={}));var Vn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Vn||(Vn={}));var qn;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(qn||(qn={}));var zn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(zn||(zn={}));var oo={[_.PERSONAL_BOOK_SHARE_USER]:[_.PERSONAL_BOOK_USER],[_.HTML_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.PDF_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.KHUB_ADMIN]:[_.CONTENT_PUBLISHER],[_.ADMIN]:[_.KHUB_ADMIN,_.USERS_ADMIN,_.PORTAL_ADMIN,_.BEHAVIOR_DATA_USER],[_.GENERATIVE_AI_EXPORT_USER]:[_.GENERATIVE_AI_USER]};function Kn(e,t){return e===t||(oo[e]??[]).some(r=>Kn(r,t))}function ct(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=>Kn(n,t))}function Wn(e,...t){return e==null?!1:t.some(r=>ct(e,r))}var Or=y(z());var Gn=y(z(),1);var ar=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},ao=e=>({fromAttribute:t=>{if(t==null)return He(e);try{return JSON.parse(t)}catch{return He(e)}},toAttribute:t=>JSON.stringify(t)});function Qn(e,t){return(0,Gn.property)({type:Object,converter:ao(e),hasChanged:Be,...t??{}})}function co(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;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Re(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(!Re(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 s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Re(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Re(e,t){try{return co(e,t)}catch{return!1}}function Be(e,t){return!Re(e,t)}function He(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function lt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Yn=y(z(),1);var cr=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Be,attribute:!1,...t};(0,Yn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var ut=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 ae=y(z(),1);var dt=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 s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);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 ht=y(oe(),1);var pt=class extends ht.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,ht.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){ar(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var ke=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ts,Jn=Symbol("constructorPrototype"),Zn=Symbol("constructorName"),rs=Symbol("exportpartsDebouncer"),es=Symbol("dynamicDependenciesLoaded"),Ie=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ie.eventName="exportparts-updated";var K=class extends pt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ts]=new dt(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[rs].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[Zn]=this.constructor.name,this[Jn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Zn]&&Object.setPrototypeOf(this,this[Jn])}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[es]||(r[es]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ie.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ie.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 Ie)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Xn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;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((s=this.customStylesheet)!==null&&s!==void 0?s:"")}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,s,i,o,a;let c=f=>f!=null&&f.trim().length>0,l=t.filter(c).map(f=>f.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let S=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(A=>A.split(":")[1]))!==null&&a!==void 0?a:[],O=[...S,...v].filter(c).map(A=>A.trim());for(let A of O)u.add(A)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>l.map(S=>`${f}:${S}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};ts=rs;ke([(0,ae.property)()],K.prototype,"exportpartsPrefix",void 0);ke([Qn([])],K.prototype,"exportpartsPrefixes",void 0);ke([(0,ae.property)({reflect:!0})],K.prototype,"exportparts",void 0);ke([(0,ae.property)()],K.prototype,"customStylesheet",void 0);ke([(0,ae.property)()],K.prototype,"elementToFocus",void 0);ke([(0,ae.state)()],K.prototype,"useAdoptedStyleSheets",void 0);function ft(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var je=Symbol("internalReduxEventsUnsubscribers"),ee=Symbol("internalStoresUnsubscribers"),ce=Symbol("internalStores"),lo=lt(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ce].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ce].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ce].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ce].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ce].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ce].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[ee].has(o.store):this[ee].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[ee].set(o,a.subscribe(()=>this.updateFromStores())),this[je].set(o,[]),ft(a)&&(!((c=a.deprecatedKeys)===null||c===void 0)&&c.length&&this.reduxConstructor.reduxProperties.forEach((u,p)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(p)&&console.warn("Element",this,"is subscribed to deprecated key",p,"in store",a.name)}),a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,p)=>{if(typeof this[p]=="function"&&(!u.store||a.name===u.store)){let f=S=>this[p](S);a.addEventListener(u.eventName,f),this[je].get(o).push(()=>a.removeEventListener(u.eventName,f))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ee].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ee].has(o)&&this[ee].get(o)(),this[ee].delete(o),(a=this[je].get(o))===null||a===void 0||a.forEach(c=>c()),this[je].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ee,r=ce,n=je,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),ns=class extends lo(K){};function k(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 uo=typeof Symbol=="function"&&Symbol.observable||"@@observable",ss=uo,lr=()=>Math.random().toString(36).substring(7).split("").join("."),po={INIT:`@@redux/INIT${lr()}`,REPLACE:`@@redux/REPLACE${lr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lr()}`},yt=po;function mt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ur(e,t,r){if(typeof e!="function")throw new Error(k(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(ur)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((A,R)=>{o.set(R,A)}))}function u(){if(c)throw new Error(k(3));return s}function p(A){if(typeof A!="function")throw new Error(k(4));if(c)throw new Error(k(5));let R=!0;l();let U=a++;return o.set(U,A),function(){if(R){if(c)throw new Error(k(6));R=!1,l(),o.delete(U),i=null}}}function f(A){if(!mt(A))throw new Error(k(7));if(typeof A.type>"u")throw new Error(k(8));if(typeof A.type!="string")throw new Error(k(17));if(c)throw new Error(k(9));try{c=!0,s=n(s,A)}finally{c=!1}return(i=o).forEach(U=>{U()}),A}function S(A){if(typeof A!="function")throw new Error(k(10));n=A,f({type:yt.REPLACE})}function v(){let A=p;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(k(11));function U(){let E=R;E.next&&E.next(u())}return U(),{unsubscribe:A(U)}},[ss](){return this}}}return f({type:yt.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:S,[ss]:v}}function ho(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:yt.INIT})>"u")throw new Error(k(12));if(typeof r(void 0,{type:yt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(k(13))})}function dr(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{ho(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<n.length;p++){let f=n[p],S=r[f],v=a[f],O=S(v,c);if(typeof O>"u"){let A=c&&c.type;throw new Error(k(14))}u[f]=O,l=l||O!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ve(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function is(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(k(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=Ve(...a)(s.dispatch),{...s,dispatch:i}}}function os(e){return mt(e)&&"type"in e&&typeof e.type=="string"}var ys=Symbol.for("immer-nothing"),as=Symbol.for("immer-draftable"),N=Symbol.for("immer-state");function q(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var $=Object,Ne=$.getPrototypeOf,At="constructor",Tt="prototype",yr="configurable",vt="enumerable",St="writable",qe="value",W=e=>!!e&&!!e[N];function H(e){return e?ms(e)||Ot(e)||!!e[as]||!!e[At]?.[as]||Rt(e)||Ge(e):!1}var fo=$[Tt][At].toString(),cs=new WeakMap;function ms(e){if(!e||!xr(e))return!1;let t=Ne(e);if(t===null||t===$[Tt])return!0;let r=$.hasOwnProperty.call(t,At)&&t[At];if(r===Object)return!0;if(!De(r))return!1;let n=cs.get(r);return n===void 0&&(n=Function.toString.call(r),cs.set(r,n)),n===fo}function wt(e,t,r=!0){We(e)===0?(r?Reflect.ownKeys(e):$.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function We(e){let t=e[N];return t?t.type_:Ot(e)?1:Rt(e)?2:Ge(e)?3:0}var pr=(e,t,r=We(e))=>r===2?e.has(t):$[Tt].hasOwnProperty.call(e,t),mr=(e,t,r=We(e))=>r===2?e.get(t):e[t],bt=(e,t,r,n=We(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function yo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ot=Array.isArray,Rt=e=>e instanceof Map,Ge=e=>e instanceof Set,xr=e=>typeof e=="object",De=e=>typeof e=="function",hr=e=>typeof e=="boolean";function mo(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Y=e=>e.copy_||e.base_;var _r=e=>e.modified_?e.copy_:e.base_;function gr(e,t){if(Rt(e))return new Map(e);if(Ge(e))return new Set(e);if(Ot(e))return Array[Tt].slice.call(e);let r=ms(e);if(t===!0||t==="class_only"&&!r){let n=$.getOwnPropertyDescriptors(e);delete n[N];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[St]===!1&&(a[St]=!0,a[yr]=!0),(a.get||a.set)&&(n[o]={[yr]:!0,[St]:!0,[vt]:a[vt],[qe]:e[o]})}return $.create(Ne(e),n)}else{let n=Ne(e);if(n!==null&&r)return{...e};let s=$.create(n);return $.assign(s,e)}}function It(e,t=!1){return kt(e)||W(e)||!H(e)||(We(e)>1&&$.defineProperties(e,{set:gt,add:gt,clear:gt,delete:gt}),$.freeze(e),t&&wt(e,(r,n)=>{It(n,!0)},!1)),e}function go(){q(2)}var gt={[qe]:go};function kt(e){return e===null||!xr(e)?!0:$.isFrozen(e)}var xt="MapSet",Sr="Patches",ls="ArrayMethods",gs={};function le(e){let t=gs[e];return t||q(0,e),t}var us=e=>!!gs[e];var ze,Ss=()=>ze,So=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:us(xt)?le(xt):void 0,arrayMethodsPlugin_:us(ls)?le(ls):void 0});function ds(e,t){t&&(e.patchPlugin_=le(Sr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Er(e){Ar(e),e.drafts_.forEach(Eo),e.drafts_=null}function Ar(e){e===ze&&(ze=e.parent_)}var ps=e=>ze=So(ze,e);function Eo(e){let t=e[N];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hs(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[N].modified_&&(Er(t),q(4)),H(e)&&(e=fs(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[N].base_,e,t)}else e=fs(t,r);return Ao(t,e,!0),Er(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ys?e:void 0}function fs(e,t){if(kt(t))return t;let r=t[N];if(!r)return _t(t,e.handledSet_,e);if(!Dt(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vs(r,e)}return r.copy_}function Ao(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&It(t,r)}function Es(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Dt=(e,t)=>e.scope_===t,vo=[];function As(e,t,r,n){let s=Y(e),i=e.type_;if(n!==void 0&&mr(s,n,i)===t){bt(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;wt(s,(c,l)=>{if(W(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??vo;for(let a of o)bt(s,a,r,i)}function bo(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!Dt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=_r(i);As(e,i.draft_??i,o,r),vs(i,s)})}function vs(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Es(e)}}function xo(e,t,r){let{scope_:n}=e;if(W(r)){let s=r[N];Dt(s,n)&&s.callbacks_.push(function(){Et(e);let o=_r(s);As(e,r,o,t)})}else H(r)&&e.callbacks_.push(function(){let i=Y(e);e.type_===3?i.has(r)&&_t(r,n.handledSet_,n):mr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&_t(mr(e.copy_,t,e.type_),n.handledSet_,n)})}function _t(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||W(e)||t.has(e)||!H(e)||kt(e)||(t.add(e),wt(e,(n,s)=>{if(W(s)){let i=s[N];if(Dt(i,r)){let o=_r(i);bt(e,n,o,e.type_),Es(i)}}else H(s)&&_t(s,t,r)})),e}function _o(e,t){let r=Ot(e),n={type_:r?1:0,scope_:t?t.scope_:Ss(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Ct;r&&(s=[n],i=Ke);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var Ct={get(e,t){if(t===N)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Y(e);if(!pr(s,t,e.type_))return To(e,s,t);let i=s[t];if(e.finalized_||!H(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&mo(t))return i;if(i===fr(e.base_,t)||Co(e,t,i)){Et(e);let o=e.type_===1?+t:t,a=br(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Y(e)},ownKeys(e){return Reflect.ownKeys(Y(e))},set(e,t,r){let n=bs(Y(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=fr(Y(e),t),i=s?.[N];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(yo(r,s)&&(r!==void 0||pr(e.base_,t,e.type_)))return!0;Et(e),vr(e)}return e.copy_[t]===r&&(r!==void 0||pr(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),xo(e,t,r)),!0},deleteProperty(e,t){return Et(e),fr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Y(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[St]:!0,[yr]:e.type_!==1||t!=="length",[vt]:n[vt],[qe]:r[t]}},defineProperty(){q(11)},getPrototypeOf(e){return Ne(e.base_)},setPrototypeOf(){q(12)}},Ke={};for(let e in Ct){let t=Ct[e];Ke[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ke.deleteProperty=function(e,t){return Ke.set.call(this,e,t,void 0)};Ke.set=function(e,t,r){return Ct.set.call(this,e[0],t,r,e[0])};function fr(e,t){let r=e[N];return(r?Y(r):e)[t]}function Co(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!H(r)||r[N]?!1:e.baseRefs_.has(r)}function To(e,t,r){let n=bs(t,r);return n?qe in n?n[qe]:n.get?.call(e.draft_):void 0}function bs(e,t){if(!(t in e))return;let r=Ne(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ne(r)}}function vr(e){e.modified_||(e.modified_=!0,e.parent_&&vr(e.parent_))}function Et(e){e.copy_||(e.assigned_=new Map,e.copy_=gr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(De(t)&&!De(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}De(r)||q(6),n!==void 0&&!De(n)&&q(7);let s;if(H(t)){let i=ps(this),o=br(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Er(i):Ar(i)}return ds(i,n),hs(s,i)}else if(!t||!xr(t)){if(s=r(t),s===void 0&&(s=t),s===ys&&(s=void 0),this.autoFreeze_&&It(s,!0),n){let i=[],o=[];le(Sr).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else q(1,t)},this.produceWithPatches=(t,r)=>{if(De(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},hr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),hr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),hr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){H(e)||q(8),W(e)&&(e=xs(e));let t=ps(this),r=br(t,e,void 0);return r[N].isManual_=!0,Ar(t),r}finishDraft(e,t){let r=e&&e[N];(!r||!r.isManual_)&&q(9);let{scope_:n}=r;return ds(n,t),hs(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=le(Sr).applyPatches_;return W(e)?n(e,t):this.produce(e,s=>n(s,t))}};function br(e,t,r,n){let[s,i]=Rt(t)?le(xt).proxyMap_(t,r):Ge(t)?le(xt).proxySet_(t,r):_o(t,r);return(r?.scope_??Ss()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?bo(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function xs(e){return W(e)||q(10,e),_s(e)}function _s(e){if(!H(e)||kt(e))return e;let t=e[N],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gr(e,!0);let s=r;return Ge(r)&&(r=new Set),wt(s,(i,o)=>{bt(r,i,_s(o))},n),t&&(t.finalized_=!1),r}var Oo=globalThis.Iterator,yc=typeof Oo?.from=="function";var Ro=new wo,Cr=Ro.produce;function Cs(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var Ts=Cs(),ws=Cs;var Io=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ve:Ve.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var ko=e=>e&&typeof e.match=="function";function te(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(G(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>os(n)&&n.type===e,r}var Ds=class Qe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Qe.prototype)}static get[Symbol.species](){return Qe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Qe(...t[0].concat(this)):new Qe(...t.concat(this))}};function Os(e){return H(e)?Cr(e,()=>{}):e}function Nt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Do(e){return typeof e=="boolean"}var No=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new Ds;return r&&(Do(r)?o.push(Ts):o.push(ws(r.extraArgument))),o},Mo="RTK_autoBatch";var Rs=e=>t=>{setTimeout(t,e)},Lo=(e,t)=>r=>{let n=!1,s,i,o=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(i),r())};s=e(o),i=setTimeout(o,t)},Fo=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Lo(window.requestAnimationFrame,100):Rs(10):e.type==="callback"?e.queueNotification:Rs(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let p=()=>s&&u(),f=n.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Mo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Po=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Ds(e);return n&&s.push(Fo(typeof n=="object"?n:void 0)),s};function Ns(e){let t=No(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(mt(r))c=dr(r);else throw new Error(G(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ve;s&&(u=Io({trace:!1,...typeof s=="object"&&s}));let p=is(...l),f=Po(p),S=typeof a=="function"?a(f):f(),v=u(...S);return ur(c,o,v)}function Ms(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(G(28));if(a in t)throw new Error(G(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Uo(e){return typeof e=="function"}function $o(e,t){let[r,n,s]=Ms(t),i;if(Uo(e))i=()=>Os(e());else{let a=Os(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,p)=>{if(p)if(W(u)){let f=p(u,c);return f===void 0?u:f}else{if(H(u))return Cr(u,f=>p(f,c));{let f=p(u,c);if(f===void 0){if(u===null)return u;throw new Error(G(9))}return f}}return u},a)}return o.getInitialState=i,o}var Ho=(e,t)=>ko(e)?e.match(t):e(t);function Bo(...e){return t=>e.some(r=>Ho(r,t))}var jo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Vo=(e=21)=>{let t="",r=e;for(;r--;)t+=jo[Math.random()*64|0];return t},qo=["name","message","stack","code"],Tr=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Is=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},zo=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of qo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ks="External signal was aborted",Ko=(()=>{function e(t,r,n){let s=te(t+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=te(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=te(t+"/rejected",(c,l,u,p,f)=>({payload:p,error:(n&&n.serializeError||zo)(c||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:p!==void 0,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,p,f)=>{let S=n?.idGenerator?n.idGenerator(c):Vo(),v=new AbortController,O,A;function R(g){A=g,v.abort()}l&&(l.aborted?R(ks):l.addEventListener("abort",()=>R(ks),{once:!0}));let U=(async function(){let g;try{let E=n?.condition?.(c,{getState:p,extra:f});if(Go(E)&&(E=await E),E===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(v.signal.aborted)throw{name:"AbortError",message:A||"Aborted"};let I=new Promise((C,D)=>{O=()=>{D({name:"AbortError",message:A||"Aborted"})},v.signal.addEventListener("abort",O,{once:!0})});u(i(S,c,n?.getPendingMeta?.({requestId:S,arg:c},{getState:p,extra:f}))),g=await Promise.race([I,Promise.resolve(r(c,{dispatch:u,getState:p,extra:f,requestId:S,signal:v.signal,abort:R,rejectWithValue:((C,D)=>new Tr(C,D)),fulfillWithValue:((C,D)=>new Is(C,D))})).then(C=>{if(C instanceof Tr)throw C;return C instanceof Is?s(C.payload,S,c,C.meta):s(C,S,c)})])}catch(E){g=E instanceof Tr?o(null,S,c,E.payload,E.meta):o(E,S,c)}finally{O&&v.signal.removeEventListener("abort",O)}return n&&!n.dispatchConditionRejection&&o.match(g)&&g.meta.condition||u(g),g})();return Object.assign(U,{abort:R,requestId:S,arg:c,unwrap(){return U.then(Wo)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Bo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Wo(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Go(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ls=Symbol.for("rtk-slice-createasyncthunk"),xc={[Ls]:Ko};function Qo(e,t){return`${e}/${t}`}function Yo({creators:e}={}){let t=e?.asyncThunk?.[Ls];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(G(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Jo()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(g,E){let I=typeof g=="string"?g:g.type;if(!I)throw new Error(G(12));if(I in c.sliceCaseReducersByType)throw new Error(G(13));return c.sliceCaseReducersByType[I]=E,l},addMatcher(g,E){return c.sliceMatchers.push({matcher:g,reducer:E}),l},exposeAction(g,E){return c.actionCreators[g]=E,l},exposeCaseReducer(g,E){return c.sliceCaseReducersByName[g]=E,l}};a.forEach(g=>{let E=o[g],I={reducerName:g,type:Qo(s,g),createNotation:typeof n.reducers=="function"};ea(E)?ra(I,E,l,t):Zo(I,E,l)});function u(){let[g={},E=[],I=void 0]=typeof n.extraReducers=="function"?Ms(n.extraReducers):[n.extraReducers],C={...g,...c.sliceCaseReducersByType};return $o(n.initialState,D=>{for(let M in C)D.addCase(M,C[M]);for(let M of c.sliceMatchers)D.addMatcher(M.matcher,M.reducer);for(let M of E)D.addMatcher(M.matcher,M.reducer);I&&D.addDefaultCase(I)})}let p=g=>g,f=new Map,S=new WeakMap,v;function O(g,E){return v||(v=u()),v(g,E)}function A(){return v||(v=u()),v.getInitialState()}function R(g,E=!1){function I(D){let M=D[g];return typeof M>"u"&&E&&(M=Nt(S,I,A)),M}function C(D=p){return Nt(Nt(f,E,()=>new WeakMap),D,()=>{let M={};for(let[Xi,Ji]of Object.entries(n.selectors??{}))M[Xi]=Xo(Ji,D,()=>Nt(S,D,A),E);return M})}return{reducerPath:g,getSelectors:C,get selectors(){return C(I)},selectSlice:I}}let U={name:s,reducer:O,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:A,...R(i),injectInto(g,{reducerPath:E,...I}={}){let C=E??i;return g.inject({reducerPath:C,reducer:O},I),{...U,...R(C,!0)}}};return U}}function Xo(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Fs=Yo();function Jo(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Zo({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!ta(n))throw new Error(G(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?te(e,o):te(e))}function ea(e){return e._reducerDefinitionType==="asyncThunk"}function ta(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ra({type:e,reducerName:t},r,n,s){if(!s)throw new Error(G(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,p=s(e,i,u);n.exposeAction(t,p),o&&n.addCase(p.fulfilled,o),a&&n.addCase(p.pending,a),c&&n.addCase(p.rejected,c),l&&n.addMatcher(p.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Mt,pending:a||Mt,rejected:c||Mt,settled:l||Mt})}function Mt(){}var Ps="listener",Us="completed",$s="cancelled",_c=`task-${$s}`,Cc=`task-${Us}`,Tc=`${Ps}-${$s}`,wc=`${Ps}-${Us}`;var{assign:Hs}=Object;var wr="listenerMiddleware";var na=Hs(te(`${wr}/add`),{withTypes:()=>na}),Oc=te(`${wr}/removeAll`),sa=Hs(te(`${wr}/remove`),{withTypes:()=>sa});function G(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ia=lt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Lt=class extends ia(Object){};window.ftReduxStores||(window.ftReduxStores={});var Bs=class e extends Lt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(ft(i))return i;if(s==null)return;let o=Fs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ns({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=He(o.getInitialState());for(let p of l.keeping)u[p]=(c??u)[p];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus,s.deprecatedKeys)}constructor(t,r,n,s){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new ut,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,c)=>{let l=a,u=o[l];return u?(...p)=>{let f=u(...p.map(i));return this.reduxStore.dispatch(f),f}:p=>{let f=l,S=this.getState()[f];Re(S,p)||this.setState({[f]:i(p)})}}}),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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Ft=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}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 Pt=y(b()),oa="ft-app-info",re=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};re.eventName="authentication-change";var Ye=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ye.eventName="ui-locale-changed";var aa={session:(e,t)=>{(0,Pt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>m.dispatchEvent(new re(t.payload)),0))}},m=Pt.FtReduxStore.get({name:oa,reducers:aa,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var js=y(b()),Ut=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},sl=(0,js.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(m)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Ft.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ut([(0,Or.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ut([(0,Or.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ut([cr({store:m.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Ut([cr({store:m.name})],t.prototype,"uiLocale",void 0),t});var Vt=y(b());var Rr=y(b());var ue=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=m.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Me=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ue.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ue.await()}};var P=class extends Me{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Rr.CacheRegistry,this.cache=t?s.commonCache:new Rr.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 $t=class extends P{async listMySearches(){let{session:t}=m.getState();return ct(t,_.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ht=class extends P{async listMyBookmarks(){let t=m.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Bt=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*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=m.getState().session;return!!t?.sessionAuthenticated}};var jt=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*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=m.getState().session;return!!t?.sessionAuthenticated}};var ca="ft-user-assets",la={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(B).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:s}=t.payload;kr(e,r,[...Ir(e,r),s]),Vs(e,r,1,n),qs(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;kr(e,r,Ir(e,r).map(s=>s.id===n.id?n:s)),qs(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;kr(e,r,Ir(e,r).filter(i=>i.id!==s)),Vs(e,r,-1,n)}},zs={[B.SEARCHES]:"savedSearches",[B.BOOKMARKS]:"bookmarks",[B.BOOKS]:void 0,[B.COLLECTIONS]:void 0},Ir=(e,t)=>{var r;let n=zs[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},kr=(e,t,r)=>{let n=zs[t];n&&(e[n]=r)},Vs=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===B.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},qs=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},L=Vt.FtReduxStore.get({name:ca,reducers:la,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(B).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Dr=class{constructor(t=new Bt,r=new jt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ht,this.savedSearchesService=new $t,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=m.getState();(0,Vt.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(),L.actions.clearAssetCount(),L.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),L.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),L.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();L.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();L.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&L.getState().assetCounts.allAsset[t]!==r.count&&L.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&L.getState().assetCounts.bookmarkByMap[t]!==r.count&&L.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(L.getState().assetCounts.bookmarkByMap).length!==0;t===B.BOOKMARKS&&r&&L.actions.clearBookmarkCountByMap(),L.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;L.actions.bookmarks(r)}}},ua=new Dr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ua);var Nr=class{addCommand(t,r=!1){m.commands.add(t,r)}consumeCommand(t){return m.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Nr;var j=y(b());var Ks,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},da=Symbol("clearAfterUnitTest"),qt=class extends(0,j.withEventBus)(P){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ks]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=m.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 s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,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 s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).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(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}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 s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};Ks=da;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends qt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends qt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ws=window.FluidTopicsI18nService,$l=window.FluidTopicsCustomI18nService;var Gs=y(b()),Mr=class{highlightHtml(t,r,n){(0,Gs.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Mr;var Qs=y(b());var Lr=class{isDate(t){var r,n,s,i;return(i=(n=((s=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return Qs.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:m.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Lr;var Ys=y(b());var Xe=class{static get(t,r,{baseUrl:n,localesConfiguration:s,availableContentLocales:i}=m.getState()){var o;if(!r||i.length>0&&!i.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=i[0])===null||o===void 0?void 0:o.lang}return new Ys.SearchPlaceConverter(n,t??20,s?.allLanguagesAllowed,r,i)}};var Fr=class{urlToSearchRequest(t){return Xe.get().parse(t)}searchRequestToUrl(t){return Xe.get().serialize(t)}};window.FluidTopicsUrlService=new Fr;var X=y(b());var de=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};de.eventName="before-location-change";var pe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};pe.eventName="change";var Pr=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))}},Xs=new Pr;var zt=class e extends X.WithEventBus{static build(){return new e(window.history,Xs,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}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,X.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new pe(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),l=new de(c);this.dispatchEvent(l);let u=r(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:l.detail.nextLocation.href};n.apply(s,[p,o,p.href]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let 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)}addBeforeLocationChangeListener(t){this.addEventListener(de.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(de.eventName,t)}addHistoryChangeListener(t){this.addEventListener(pe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(pe.eventName,t)}currentItem(){return(0,X.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,X.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,X.deepCopy)(r.find(n=>t(n)))}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,X.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 s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}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 s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Js=y(oe());var Zs=Js.css`
1
+ "use strict";(()=>{var Zi=Object.create;var sn=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var ro=Object.getPrototypeOf,no=Object.prototype.hasOwnProperty;var ot=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var so=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of to(t))!no.call(e,s)&&s!==r&&sn(e,s,{get:()=>t[s],enumerable:!(n=eo(t,s))||n.enumerable});return e};var y=(e,t,r)=>(r=e!=null?Zi(ro(e)):{},so(t||!e||!e.__esModule?sn(r,"default",{value:e,enumerable:!0}):r,e));var b=ot((Ca,on)=>{on.exports=ftGlobals.wcUtils});var oe=ot((Ta,an)=>{an.exports=ftGlobals.lit});var z=ot((wa,cn)=>{cn.exports=ftGlobals.litDecorators});var Bi=ot((cp,Hi)=>{Hi.exports=ftGlobals.litUnsafeHTML});var Yi=y(b());var it=y(oe()),Ki=y(z()),Wi=y(b());var Fe=y(b());var se=y(b()),Ze=y(z());var nr;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(nr||(nr={}));var ne=y(b());var io=y(b());var ln;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ln||(ln={}));var un;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(un||(un={}));var dn;(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"})(dn||(dn={}));var pn;(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"})(pn||(pn={}));var hn;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(hn||(hn={}));var fn;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(fn||(fn={}));var yn;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(yn||(yn={}));var mn;(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"})(mn||(mn={}));var gn;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(gn||(gn={}));var Sn;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Sn||(Sn={}));var En;(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",e.DOC_DIFF="DOC_DIFF"})(En||(En={}));var An;(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"})(An||(An={}));var vn;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(vn||(vn={}));var bn;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(bn||(bn={}));var xn;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(xn||(xn={}));var _n;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(_n||(_n={}));var Cn;(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"})(Cn||(Cn={}));var sr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(sr||(sr={}));var Tn;(function(e){e.ASC="ASC",e.DESC="DESC"})(Tn||(Tn={}));var wn;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(wn||(wn={}));var ir;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ir||(ir={}));var On;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(On||(On={}));var at;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(at||(at={}));var Rn;(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"})(Rn||(Rn={}));var In;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(In||(In={}));var kn;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(kn||(kn={}));var or;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(or||(or={}));var Dn;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Dn||(Dn={}));var _;(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"})(_||(_={}));var B;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(B||(B={}));var Nn;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Nn||(Nn={}));var Mn;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Mn||(Mn={}));var Ln;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ln||(Ln={}));var Fn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Fn||(Fn={}));var Pn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Pn||(Pn={}));var Un;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Un||(Un={}));var $n;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})($n||($n={}));var Hn;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Hn||(Hn={}));var Bn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Bn||(Bn={}));var jn;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(jn||(jn={}));var Vn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Vn||(Vn={}));var qn;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(qn||(qn={}));var zn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(zn||(zn={}));var oo={[_.PERSONAL_BOOK_SHARE_USER]:[_.PERSONAL_BOOK_USER],[_.HTML_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.PDF_EXPORT_USER]:[_.PERSONAL_BOOK_USER],[_.KHUB_ADMIN]:[_.CONTENT_PUBLISHER],[_.ADMIN]:[_.KHUB_ADMIN,_.USERS_ADMIN,_.PORTAL_ADMIN,_.BEHAVIOR_DATA_USER],[_.GENERATIVE_AI_EXPORT_USER]:[_.GENERATIVE_AI_USER]};function Kn(e,t){return e===t||(oo[e]??[]).some(r=>Kn(r,t))}function ct(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=>Kn(n,t))}function Wn(e,...t){return e==null?!1:t.some(r=>ct(e,r))}var Or=y(z());var Gn=y(z(),1);var ar=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},ao=e=>({fromAttribute:t=>{if(t==null)return He(e);try{return JSON.parse(t)}catch{return He(e)}},toAttribute:t=>JSON.stringify(t)});function Qn(e,t){return(0,Gn.property)({type:Object,converter:ao(e),hasChanged:Be,...t??{}})}function co(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;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Re(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(!Re(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 s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Re(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Re(e,t){try{return co(e,t)}catch{return!1}}function Be(e,t){return!Re(e,t)}function He(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function lt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Yn=y(z(),1);var cr=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Be,attribute:!1,...t};(0,Yn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var ut=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 ae=y(z(),1);var dt=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 s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);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 ht=y(oe(),1);var pt=class extends ht.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,ht.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){ar(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var ke=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ts,Jn=Symbol("constructorPrototype"),Zn=Symbol("constructorName"),rs=Symbol("exportpartsDebouncer"),es=Symbol("dynamicDependenciesLoaded"),Ie=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Ie.eventName="exportparts-updated";var K=class extends pt{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ts]=new dt(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[rs].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.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[Zn]=this.constructor.name,this[Jn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Zn]&&Object.setPrototypeOf(this,this[Jn])}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[es]||(r[es]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Ie.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Ie.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 Ie)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Xn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;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((s=this.customStylesheet)!==null&&s!==void 0?s:"")}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,s,i,o,a;let c=f=>f!=null&&f.trim().length>0,l=t.filter(c).map(f=>f.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let S=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(A=>A.split(":")[1]))!==null&&a!==void 0?a:[],O=[...S,...v].filter(c).map(A=>A.trim());for(let A of O)u.add(A)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>l.map(S=>`${f}:${S}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};ts=rs;ke([(0,ae.property)()],K.prototype,"exportpartsPrefix",void 0);ke([Qn([])],K.prototype,"exportpartsPrefixes",void 0);ke([(0,ae.property)({reflect:!0})],K.prototype,"exportparts",void 0);ke([(0,ae.property)()],K.prototype,"customStylesheet",void 0);ke([(0,ae.property)()],K.prototype,"elementToFocus",void 0);ke([(0,ae.state)()],K.prototype,"useAdoptedStyleSheets",void 0);function ft(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var je=Symbol("internalReduxEventsUnsubscribers"),ee=Symbol("internalStoresUnsubscribers"),ce=Symbol("internalStores"),lo=lt(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ce].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ce].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ce].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ce].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ce].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ce].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[ee].has(o.store):this[ee].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c,l;this[ee].set(o,a.subscribe(()=>this.updateFromStores())),this[je].set(o,[]),ft(a)&&(!((c=a.deprecatedKeys)===null||c===void 0)&&c.length&&this.reduxConstructor.reduxProperties.forEach((u,p)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(p)&&console.warn("Element",this,"is subscribed to deprecated key",p,"in store",a.name)}),a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,p)=>{if(typeof this[p]=="function"&&(!u.store||a.name===u.store)){let f=S=>this[p](S);a.addEventListener(u.eventName,f),this[je].get(o).push(()=>a.removeEventListener(u.eventName,f))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ee].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ee].has(o)&&this[ee].get(o)(),this[ee].delete(o),(a=this[je].get(o))===null||a===void 0||a.forEach(c=>c()),this[je].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ee,r=ce,n=je,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),ns=class extends lo(K){};function k(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 uo=typeof Symbol=="function"&&Symbol.observable||"@@observable",ss=uo,lr=()=>Math.random().toString(36).substring(7).split("").join("."),po={INIT:`@@redux/INIT${lr()}`,REPLACE:`@@redux/REPLACE${lr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lr()}`},yt=po;function mt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ur(e,t,r){if(typeof e!="function")throw new Error(k(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(k(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(k(1));return r(ur)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((A,R)=>{o.set(R,A)}))}function u(){if(c)throw new Error(k(3));return s}function p(A){if(typeof A!="function")throw new Error(k(4));if(c)throw new Error(k(5));let R=!0;l();let U=a++;return o.set(U,A),function(){if(R){if(c)throw new Error(k(6));R=!1,l(),o.delete(U),i=null}}}function f(A){if(!mt(A))throw new Error(k(7));if(typeof A.type>"u")throw new Error(k(8));if(typeof A.type!="string")throw new Error(k(17));if(c)throw new Error(k(9));try{c=!0,s=n(s,A)}finally{c=!1}return(i=o).forEach(U=>{U()}),A}function S(A){if(typeof A!="function")throw new Error(k(10));n=A,f({type:yt.REPLACE})}function v(){let A=p;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(k(11));function U(){let E=R;E.next&&E.next(u())}return U(),{unsubscribe:A(U)}},[ss](){return this}}}return f({type:yt.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:S,[ss]:v}}function ho(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:yt.INIT})>"u")throw new Error(k(12));if(typeof r(void 0,{type:yt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(k(13))})}function dr(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{ho(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let p=0;p<n.length;p++){let f=n[p],S=r[f],v=a[f],O=S(v,c);if(typeof O>"u"){let A=c&&c.type;throw new Error(k(14))}u[f]=O,l=l||O!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ve(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function is(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(k(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=Ve(...a)(s.dispatch),{...s,dispatch:i}}}function os(e){return mt(e)&&"type"in e&&typeof e.type=="string"}var ys=Symbol.for("immer-nothing"),as=Symbol.for("immer-draftable"),N=Symbol.for("immer-state");function q(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var $=Object,Ne=$.getPrototypeOf,At="constructor",Tt="prototype",yr="configurable",vt="enumerable",St="writable",qe="value",W=e=>!!e&&!!e[N];function H(e){return e?ms(e)||Ot(e)||!!e[as]||!!e[At]?.[as]||Rt(e)||Ge(e):!1}var fo=$[Tt][At].toString(),cs=new WeakMap;function ms(e){if(!e||!xr(e))return!1;let t=Ne(e);if(t===null||t===$[Tt])return!0;let r=$.hasOwnProperty.call(t,At)&&t[At];if(r===Object)return!0;if(!De(r))return!1;let n=cs.get(r);return n===void 0&&(n=Function.toString.call(r),cs.set(r,n)),n===fo}function wt(e,t,r=!0){We(e)===0?(r?Reflect.ownKeys(e):$.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function We(e){let t=e[N];return t?t.type_:Ot(e)?1:Rt(e)?2:Ge(e)?3:0}var pr=(e,t,r=We(e))=>r===2?e.has(t):$[Tt].hasOwnProperty.call(e,t),mr=(e,t,r=We(e))=>r===2?e.get(t):e[t],bt=(e,t,r,n=We(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function yo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ot=Array.isArray,Rt=e=>e instanceof Map,Ge=e=>e instanceof Set,xr=e=>typeof e=="object",De=e=>typeof e=="function",hr=e=>typeof e=="boolean";function mo(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Y=e=>e.copy_||e.base_;var _r=e=>e.modified_?e.copy_:e.base_;function gr(e,t){if(Rt(e))return new Map(e);if(Ge(e))return new Set(e);if(Ot(e))return Array[Tt].slice.call(e);let r=ms(e);if(t===!0||t==="class_only"&&!r){let n=$.getOwnPropertyDescriptors(e);delete n[N];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[St]===!1&&(a[St]=!0,a[yr]=!0),(a.get||a.set)&&(n[o]={[yr]:!0,[St]:!0,[vt]:a[vt],[qe]:e[o]})}return $.create(Ne(e),n)}else{let n=Ne(e);if(n!==null&&r)return{...e};let s=$.create(n);return $.assign(s,e)}}function It(e,t=!1){return kt(e)||W(e)||!H(e)||(We(e)>1&&$.defineProperties(e,{set:gt,add:gt,clear:gt,delete:gt}),$.freeze(e),t&&wt(e,(r,n)=>{It(n,!0)},!1)),e}function go(){q(2)}var gt={[qe]:go};function kt(e){return e===null||!xr(e)?!0:$.isFrozen(e)}var xt="MapSet",Sr="Patches",ls="ArrayMethods",gs={};function le(e){let t=gs[e];return t||q(0,e),t}var us=e=>!!gs[e];var ze,Ss=()=>ze,So=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:us(xt)?le(xt):void 0,arrayMethodsPlugin_:us(ls)?le(ls):void 0});function ds(e,t){t&&(e.patchPlugin_=le(Sr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Er(e){Ar(e),e.drafts_.forEach(Eo),e.drafts_=null}function Ar(e){e===ze&&(ze=e.parent_)}var ps=e=>ze=So(ze,e);function Eo(e){let t=e[N];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hs(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[N].modified_&&(Er(t),q(4)),H(e)&&(e=fs(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[N].base_,e,t)}else e=fs(t,r);return Ao(t,e,!0),Er(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ys?e:void 0}function fs(e,t){if(kt(t))return t;let r=t[N];if(!r)return _t(t,e.handledSet_,e);if(!Dt(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vs(r,e)}return r.copy_}function Ao(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&It(t,r)}function Es(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Dt=(e,t)=>e.scope_===t,vo=[];function As(e,t,r,n){let s=Y(e),i=e.type_;if(n!==void 0&&mr(s,n,i)===t){bt(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;wt(s,(c,l)=>{if(W(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??vo;for(let a of o)bt(s,a,r,i)}function bo(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!Dt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=_r(i);As(e,i.draft_??i,o,r),vs(i,s)})}function vs(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Es(e)}}function xo(e,t,r){let{scope_:n}=e;if(W(r)){let s=r[N];Dt(s,n)&&s.callbacks_.push(function(){Et(e);let o=_r(s);As(e,r,o,t)})}else H(r)&&e.callbacks_.push(function(){let i=Y(e);e.type_===3?i.has(r)&&_t(r,n.handledSet_,n):mr(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&_t(mr(e.copy_,t,e.type_),n.handledSet_,n)})}function _t(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||W(e)||t.has(e)||!H(e)||kt(e)||(t.add(e),wt(e,(n,s)=>{if(W(s)){let i=s[N];if(Dt(i,r)){let o=_r(i);bt(e,n,o,e.type_),Es(i)}}else H(s)&&_t(s,t,r)})),e}function _o(e,t){let r=Ot(e),n={type_:r?1:0,scope_:t?t.scope_:Ss(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Ct;r&&(s=[n],i=Ke);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var Ct={get(e,t){if(t===N)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Y(e);if(!pr(s,t,e.type_))return To(e,s,t);let i=s[t];if(e.finalized_||!H(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&mo(t))return i;if(i===fr(e.base_,t)||Co(e,t,i)){Et(e);let o=e.type_===1?+t:t,a=br(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Y(e)},ownKeys(e){return Reflect.ownKeys(Y(e))},set(e,t,r){let n=bs(Y(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=fr(Y(e),t),i=s?.[N];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.delete(t),!0;if(yo(r,s)&&(r!==void 0||pr(e.base_,t,e.type_)))return!0;Et(e),vr(e)}return e.copy_[t]===r&&(r!==void 0||pr(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),xo(e,t,r)),!0},deleteProperty(e,t){return Et(e),fr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Y(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[St]:!0,[yr]:e.type_!==1||t!=="length",[vt]:n[vt],[qe]:r[t]}},defineProperty(){q(11)},getPrototypeOf(e){return Ne(e.base_)},setPrototypeOf(){q(12)}},Ke={};for(let e in Ct){let t=Ct[e];Ke[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Ke.deleteProperty=function(e,t){return Ke.set.call(this,e,t,void 0)};Ke.set=function(e,t,r){return Ct.set.call(this,e[0],t,r,e[0])};function fr(e,t){let r=e[N];return(r?Y(r):e)[t]}function Co(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||!H(r)||r[N]?!1:e.baseRefs_.has(r)}function To(e,t,r){let n=bs(t,r);return n?qe in n?n[qe]:n.get?.call(e.draft_):void 0}function bs(e,t){if(!(t in e))return;let r=Ne(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ne(r)}}function vr(e){e.modified_||(e.modified_=!0,e.parent_&&vr(e.parent_))}function Et(e){e.copy_||(e.assigned_=new Map,e.copy_=gr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(De(t)&&!De(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}De(r)||q(6),n!==void 0&&!De(n)&&q(7);let s;if(H(t)){let i=ps(this),o=br(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Er(i):Ar(i)}return ds(i,n),hs(s,i)}else if(!t||!xr(t)){if(s=r(t),s===void 0&&(s=t),s===ys&&(s=void 0),this.autoFreeze_&&It(s,!0),n){let i=[],o=[];le(Sr).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else q(1,t)},this.produceWithPatches=(t,r)=>{if(De(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},hr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),hr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),hr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){H(e)||q(8),W(e)&&(e=xs(e));let t=ps(this),r=br(t,e,void 0);return r[N].isManual_=!0,Ar(t),r}finishDraft(e,t){let r=e&&e[N];(!r||!r.isManual_)&&q(9);let{scope_:n}=r;return ds(n,t),hs(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=le(Sr).applyPatches_;return W(e)?n(e,t):this.produce(e,s=>n(s,t))}};function br(e,t,r,n){let[s,i]=Rt(t)?le(xt).proxyMap_(t,r):Ge(t)?le(xt).proxySet_(t,r):_o(t,r);return(r?.scope_??Ss()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?bo(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function xs(e){return W(e)||q(10,e),_s(e)}function _s(e){if(!H(e)||kt(e))return e;let t=e[N],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gr(e,!0);let s=r;return Ge(r)&&(r=new Set),wt(s,(i,o)=>{bt(r,i,_s(o))},n),t&&(t.finalized_=!1),r}var Oo=globalThis.Iterator,yc=typeof Oo?.from=="function";var Ro=new wo,Cr=Ro.produce;function Cs(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var Ts=Cs(),ws=Cs;var Io=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ve:Ve.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var ko=e=>e&&typeof e.match=="function";function te(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(G(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>os(n)&&n.type===e,r}var Ds=class Qe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Qe.prototype)}static get[Symbol.species](){return Qe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Qe(...t[0].concat(this)):new Qe(...t.concat(this))}};function Os(e){return H(e)?Cr(e,()=>{}):e}function Nt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Do(e){return typeof e=="boolean"}var No=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new Ds;return r&&(Do(r)?o.push(Ts):o.push(ws(r.extraArgument))),o},Mo="RTK_autoBatch";var Rs=e=>t=>{setTimeout(t,e)},Lo=(e,t)=>r=>{let n=!1,s,i,o=()=>{n||(n=!0,cancelAnimationFrame(s),clearTimeout(i),r())};s=e(o),i=setTimeout(o,t)},Fo=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Lo(window.requestAnimationFrame,100):Rs(10):e.type==="callback"?e.queueNotification:Rs(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let p=()=>s&&u(),f=n.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Mo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Po=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Ds(e);return n&&s.push(Fo(typeof n=="object"?n:void 0)),s};function Ns(e){let t=No(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(mt(r))c=dr(r);else throw new Error(G(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ve;s&&(u=Io({trace:!1,...typeof s=="object"&&s}));let p=is(...l),f=Po(p),S=typeof a=="function"?a(f):f(),v=u(...S);return ur(c,o,v)}function Ms(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(G(28));if(a in t)throw new Error(G(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Uo(e){return typeof e=="function"}function $o(e,t){let[r,n,s]=Ms(t),i;if(Uo(e))i=()=>Os(e());else{let a=Os(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,p)=>{if(p)if(W(u)){let f=p(u,c);return f===void 0?u:f}else{if(H(u))return Cr(u,f=>p(f,c));{let f=p(u,c);if(f===void 0){if(u===null)return u;throw new Error(G(9))}return f}}return u},a)}return o.getInitialState=i,o}var Ho=(e,t)=>ko(e)?e.match(t):e(t);function Bo(...e){return t=>e.some(r=>Ho(r,t))}var jo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Vo=(e=21)=>{let t="",r=e;for(;r--;)t+=jo[Math.random()*64|0];return t},qo=["name","message","stack","code"],Tr=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Is=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},zo=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of qo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ks="External signal was aborted",Ko=(()=>{function e(t,r,n){let s=te(t+"/fulfilled",(c,l,u,p)=>({payload:c,meta:{...p||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=te(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=te(t+"/rejected",(c,l,u,p,f)=>({payload:p,error:(n&&n.serializeError||zo)(c||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:p!==void 0,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,p,f)=>{let S=n?.idGenerator?n.idGenerator(c):Vo(),v=new AbortController,O,A;function R(g){A=g,v.abort()}l&&(l.aborted?R(ks):l.addEventListener("abort",()=>R(ks),{once:!0}));let U=(async function(){let g;try{let E=n?.condition?.(c,{getState:p,extra:f});if(Go(E)&&(E=await E),E===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(v.signal.aborted)throw{name:"AbortError",message:A||"Aborted"};let I=new Promise((C,D)=>{O=()=>{D({name:"AbortError",message:A||"Aborted"})},v.signal.addEventListener("abort",O,{once:!0})});u(i(S,c,n?.getPendingMeta?.({requestId:S,arg:c},{getState:p,extra:f}))),g=await Promise.race([I,Promise.resolve(r(c,{dispatch:u,getState:p,extra:f,requestId:S,signal:v.signal,abort:R,rejectWithValue:((C,D)=>new Tr(C,D)),fulfillWithValue:((C,D)=>new Is(C,D))})).then(C=>{if(C instanceof Tr)throw C;return C instanceof Is?s(C.payload,S,c,C.meta):s(C,S,c)})])}catch(E){g=E instanceof Tr?o(null,S,c,E.payload,E.meta):o(E,S,c)}finally{O&&v.signal.removeEventListener("abort",O)}return n&&!n.dispatchConditionRejection&&o.match(g)&&g.meta.condition||u(g),g})();return Object.assign(U,{abort:R,requestId:S,arg:c,unwrap(){return U.then(Wo)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Bo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Wo(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Go(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ls=Symbol.for("rtk-slice-createasyncthunk"),xc={[Ls]:Ko};function Qo(e,t){return`${e}/${t}`}function Yo({creators:e}={}){let t=e?.asyncThunk?.[Ls];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(G(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(Jo()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(g,E){let I=typeof g=="string"?g:g.type;if(!I)throw new Error(G(12));if(I in c.sliceCaseReducersByType)throw new Error(G(13));return c.sliceCaseReducersByType[I]=E,l},addMatcher(g,E){return c.sliceMatchers.push({matcher:g,reducer:E}),l},exposeAction(g,E){return c.actionCreators[g]=E,l},exposeCaseReducer(g,E){return c.sliceCaseReducersByName[g]=E,l}};a.forEach(g=>{let E=o[g],I={reducerName:g,type:Qo(s,g),createNotation:typeof n.reducers=="function"};ea(E)?ra(I,E,l,t):Zo(I,E,l)});function u(){let[g={},E=[],I=void 0]=typeof n.extraReducers=="function"?Ms(n.extraReducers):[n.extraReducers],C={...g,...c.sliceCaseReducersByType};return $o(n.initialState,D=>{for(let M in C)D.addCase(M,C[M]);for(let M of c.sliceMatchers)D.addMatcher(M.matcher,M.reducer);for(let M of E)D.addMatcher(M.matcher,M.reducer);I&&D.addDefaultCase(I)})}let p=g=>g,f=new Map,S=new WeakMap,v;function O(g,E){return v||(v=u()),v(g,E)}function A(){return v||(v=u()),v.getInitialState()}function R(g,E=!1){function I(D){let M=D[g];return typeof M>"u"&&E&&(M=Nt(S,I,A)),M}function C(D=p){return Nt(Nt(f,E,()=>new WeakMap),D,()=>{let M={};for(let[Xi,Ji]of Object.entries(n.selectors??{}))M[Xi]=Xo(Ji,D,()=>Nt(S,D,A),E);return M})}return{reducerPath:g,getSelectors:C,get selectors(){return C(I)},selectSlice:I}}let U={name:s,reducer:O,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:A,...R(i),injectInto(g,{reducerPath:E,...I}={}){let C=E??i;return g.inject({reducerPath:C,reducer:O},I),{...U,...R(C,!0)}}};return U}}function Xo(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Fs=Yo();function Jo(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Zo({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!ta(n))throw new Error(G(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?te(e,o):te(e))}function ea(e){return e._reducerDefinitionType==="asyncThunk"}function ta(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ra({type:e,reducerName:t},r,n,s){if(!s)throw new Error(G(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,p=s(e,i,u);n.exposeAction(t,p),o&&n.addCase(p.fulfilled,o),a&&n.addCase(p.pending,a),c&&n.addCase(p.rejected,c),l&&n.addMatcher(p.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Mt,pending:a||Mt,rejected:c||Mt,settled:l||Mt})}function Mt(){}var Ps="listener",Us="completed",$s="cancelled",_c=`task-${$s}`,Cc=`task-${Us}`,Tc=`${Ps}-${$s}`,wc=`${Ps}-${Us}`;var{assign:Hs}=Object;var wr="listenerMiddleware";var na=Hs(te(`${wr}/add`),{withTypes:()=>na}),Oc=te(`${wr}/removeAll`),sa=Hs(te(`${wr}/remove`),{withTypes:()=>sa});function G(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ia=lt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Lt=class extends ia(Object){};window.ftReduxStores||(window.ftReduxStores={});var Bs=class e extends Lt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(ft(i))return i;if(s==null)return;let o=Fs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ns({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=He(o.getInitialState());for(let p of l.keeping)u[p]=(c??u)[p];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus,s.deprecatedKeys)}constructor(t,r,n,s){super(),this.reduxSlice=t,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new ut,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,c)=>{let l=a,u=o[l];return u?(...p)=>{let f=u(...p.map(i));return this.reduxStore.dispatch(f),f}:p=>{let f=l,S=this.getState()[f];Re(S,p)||this.setState({[f]:i(p)})}}}),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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Ft=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}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 Pt=y(b()),oa="ft-app-info",re=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};re.eventName="authentication-change";var Ye=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ye.eventName="ui-locale-changed";var aa={session:(e,t)=>{(0,Pt.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>m.dispatchEvent(new re(t.payload)),0))}},m=Pt.FtReduxStore.get({name:oa,reducers:aa,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var js=y(b()),Ut=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},sl=(0,js.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(m)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Ft.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ut([(0,Or.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Ut([(0,Or.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Ut([cr({store:m.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Ut([cr({store:m.name})],t.prototype,"uiLocale",void 0),t});var Vt=y(b());var Rr=y(b());var ue=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=m.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=m.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Me=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ue.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ue.await()}};var P=class extends Me{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Rr.CacheRegistry,this.cache=t?s.commonCache:new Rr.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 $t=class extends P{async listMySearches(){let{session:t}=m.getState();return ct(t,_.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ht=class extends P{async listMyBookmarks(){let t=m.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Bt=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*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=m.getState().session;return!!t?.sessionAuthenticated}};var jt=class extends P{constructor(){super(...arguments),this.CACHE_DURATION=180*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=m.getState().session;return!!t?.sessionAuthenticated}};var ca="ft-user-assets",la={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(B).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:s}=t.payload;kr(e,r,[...Ir(e,r),s]),Vs(e,r,1,n),qs(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;kr(e,r,Ir(e,r).map(s=>s.id===n.id?n:s)),qs(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;kr(e,r,Ir(e,r).filter(i=>i.id!==s)),Vs(e,r,-1,n)}},zs={[B.SEARCHES]:"savedSearches",[B.BOOKMARKS]:"bookmarks",[B.BOOKS]:void 0,[B.COLLECTIONS]:void 0},Ir=(e,t)=>{var r;let n=zs[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},kr=(e,t,r)=>{let n=zs[t];n&&(e[n]=r)},Vs=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===B.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},qs=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},L=Vt.FtReduxStore.get({name:ca,reducers:la,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(B).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Dr=class{constructor(t=new Bt,r=new jt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=m.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ht,this.savedSearchesService=new $t,m.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=m.getState();(0,Vt.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(),L.actions.clearAssetCount(),L.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),L.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),L.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();L.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();L.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&L.getState().assetCounts.allAsset[t]!==r.count&&L.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&L.getState().assetCounts.bookmarkByMap[t]!==r.count&&L.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(L.getState().assetCounts.bookmarkByMap).length!==0;t===B.BOOKMARKS&&r&&L.actions.clearBookmarkCountByMap(),L.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;L.actions.bookmarks(r)}}},ua=new Dr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ua);var Nr=class{addCommand(t,r=!1){m.commands.add(t,r)}consumeCommand(t){return m.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Nr;var j=y(b());var Ks,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},da=Symbol("clearAfterUnitTest"),qt=class extends(0,j.withEventBus)(P){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ks]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=m.getState().uiLocale,m.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=m.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 s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,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 s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).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(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}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 s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};Ks=da;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends qt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends qt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ws=window.FluidTopicsI18nService,$l=window.FluidTopicsCustomI18nService;var Gs=y(b()),Mr=class{highlightHtml(t,r,n){(0,Gs.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Mr;var Qs=y(b());var Lr=class{isDate(t){var r,n,s,i;return(i=(n=((s=(r=m.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return Qs.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:m.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Lr;var Ys=y(b());var Xe=class{static get(t,r,{baseUrl:n,localesConfiguration:s,availableContentLocales:i}=m.getState()){var o;if(r==="all"&&s?.allLanguagesAllowed)r=void 0;else if(!r||i.length>0&&!i.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=i[0])===null||o===void 0?void 0:o.lang}return new Ys.SearchPlaceConverter(n,t??20,s?.allLanguagesAllowed,r,i)}};var Fr=class{urlToSearchRequest(t){return Xe.get().parse(t)}searchRequestToUrl(t){return Xe.get().serialize(t)}};window.FluidTopicsUrlService=new Fr;var X=y(b());var de=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};de.eventName="before-location-change";var pe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};pe.eventName="change";var Pr=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))}},Xs=new Pr;var zt=class e extends X.WithEventBus{static build(){return new e(window.history,Xs,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}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,X.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new pe(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),l=new de(c);this.dispatchEvent(l);let u=r(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:l.detail.nextLocation.href};n.apply(s,[p,o,p.href]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let 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)}addBeforeLocationChangeListener(t){this.addEventListener(de.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(de.eventName,t)}addHistoryChangeListener(t){this.addEventListener(pe.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(pe.eventName,t)}currentItem(){return(0,X.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,X.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,X.deepCopy)(r.find(n=>t(n)))}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,X.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 s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}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 s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Js=y(oe());var Zs=Js.css`
2
2
  `;var ti=y(oe()),F=y(z()),fe=y(b());var Q=y(b());function ei(e,t){let{authenticationRequired:r,session:n}=m.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Kt=class extends Me{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Ur=class e extends Q.FtStateManager{static build(t){return new e(m,t)}constructor(t,r){super(),this.store=t,this.cache=new Q.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Kt,this.knownContexts=new Q.AbstractRegistry,this.knownCustomComponents=new Q.AbstractRegistry,this.cleanSessionDebouncer=new Q.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Q.Debouncer(500),this.apiProvider=r??(()=>ue.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(re.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(re.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>ei(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ye(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Wn(m.getState().session,...t)}},$r=Ur.build();var he=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var Je=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new he(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var w=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},x=class extends fe.FtLitElementRedux{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.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=$r,this.contextRoot=new Je}render(){return ti.html`
3
3
  <slot></slot>
4
4
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Ws.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};x.elementDefinitions={};x.styles=Zs;w([(0,F.property)()],x.prototype,"baseUrl",void 0);w([(0,F.property)()],x.prototype,"tenantId",void 0);w([(0,F.property)()],x.prototype,"apiIntegrationIdentifier",void 0);w([(0,F.property)()],x.prototype,"apiIntegrationAppVersion",void 0);w([(0,F.property)()],x.prototype,"uiLocale",void 0);w([(0,fe.jsonProperty)(null)],x.prototype,"availableUiLocales",void 0);w([(0,fe.jsonProperty)(null)],x.prototype,"metadataConfiguration",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"editorMode",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"noCustom",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"openExternalDocumentInNewTab",void 0);w([(0,F.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],x.prototype,"noCustomComponent",void 0);w([(0,F.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],x.prototype,"noCustomCode",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"withManualResources",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"navigatorOnline",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"forcedOffline",void 0);w([(0,F.property)({type:Boolean})],x.prototype,"authenticationRequired",void 0);w([(0,fe.jsonProperty)([])],x.prototype,"messageContexts",void 0);w([(0,fe.jsonProperty)(void 0)],x.prototype,"session",void 0);var ni=y(b());var ri={"ft-app-context":x};(0,ni.customElements)(ri);var Wt=class extends CustomEvent{constructor(t,r){super("ft-search-result-click",{detail:{result:t,rank:r},bubbles:!0,composed:!0})}},Gt=class extends CustomEvent{constructor(t,r){super("ft-search-result-open-context-menu",{detail:{result:t,rank:r},bubbles:!0,composed:!0})}};var Qt=class e extends Event{constructor(){super(e.eventName)}};Qt.eventName="search-context-clear-all-filters";var Hr=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},jr=class extends se.FtContextRegistrationEvent{constructor(t){super("register-ft-search-component",t)}},si=Symbol("registerInterval"),Br=Symbol("registerAttempts"),fa=40,ya=(0,se.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var s,i,o;super.willUpdate(n),n.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(o=n.get("neededSearchRequests"))!==null&&o!==void 0?o:[]),(i=this.stateManager)===null||i===void 0||i.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[Br]=0,this.tryToRegisterToContext(),this[si]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Br]>fa?window.clearInterval(this[si]):(this[Br]++,this.dispatchEvent(new jr({target:this,registrationId:this.searchRegistrationId})))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Hr([(0,Ze.state)()],t.prototype,"stateManager",void 0),Hr([(0,Ze.state)({hasChanged:se.hasChanged})],t.prototype,"neededSearchRequests",void 0),Hr([(0,Ze.property)()],t.prototype,"searchRegistrationId",void 0),t}),Yt=class extends ya(se.FtLitElementRedux){};var Jt=y(z()),Xt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},qr=class extends Fe.FtContextRegistrationEvent{constructor(t){super("register-ft-search-result-component",t)}},Vr=Symbol("registerInterval"),ma=(0,Fe.applyMixinOnce)(Symbol("toFtSearchResultComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setResultStateManager(s){this.resultStateManager=s}unregisterResultStateManager(){this.resultStateManager&&(this.resultStateManager.unregisterComponent(this),this.resultStateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Vr]=window.setInterval(()=>this.tryToRegisterToResultContext(),50)}tryToRegisterToResultContext(){this.result!=null?window.clearInterval(this[Vr]):this.dispatchEvent(new qr({target:this}))}disconnectedCallback(){super.disconnectedCallback(),this.unregisterResultStateManager()}}return t=Vr,Xt([(0,Jt.property)({attribute:!1})],r.prototype,"cluster",void 0),Xt([(0,Jt.property)({attribute:!1})],r.prototype,"result",void 0),Xt([(0,Fe.numberProperty)()],r.prototype,"rank",void 0),Xt([(0,Jt.property)({attribute:!1,type:Boolean})],r.prototype,"openResultInNewTab",void 0),r}),Zt=class extends ma(Yt){};var ii=y(oe()),oi=y(b()),ga={highlightBackgroundColor:oi.FtCssVariableFactory.create("--ft-srt-highlight-background-color","","COLOR","transparent")},ai=ii.css`