@fluid-topics/ft-search-language-filter 2.1.4 → 2.1.6
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.
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
label="${t.label}"
|
|
643
643
|
.value=${t.value}
|
|
644
644
|
></ft-select-option>
|
|
645
|
-
`}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var r,n;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((n=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||n===void 0||n.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let i=["bottom","top"];(0,te.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",i,"fixed",A.optionsHeight,0).then(({x:s,y:a})=>{this.optionsMenu.style.left=`${s}px`,this.optionsMenu.style.top=`${a}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var r;t.stopPropagation(),this.isSlotEmpty=(0,te.isSlotEmptyOrWithoutContent)(this.optionsSlot);let n=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(i=>i);n&&n.length>0&&(this.options=n)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var r,n;let i,s=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Escape":this.optionsDisplayed=!1,(n=this.mainPanel)===null||n===void 0||n.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),i=this.optionsList[(s-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),i=this.optionsList[(s+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(i=this.handleAlphanumericPress(t.key));break}i?.focus()}isKeyAlphanumeric(t){let r=t.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(t){let r=new Date;r.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let n=this.options.find(i=>{var s;return((s=i.label)===null||s===void 0?void 0:s.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=r,n&&this.optionsList.find(i=>i.value===n.value)}getOptionId(t){if(!t)return;let r=this.options.findIndex(n=>(0,te.deepEqual)(n.value,t.value));if(r!==-1)return`option-${r}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,r=!0){let n=this.options.find(i=>(0,te.deepEqual)(i.value,t));n&&this.selectOption(n,r)}selectOption(t,r=!0){var n,i;if(!(0,te.deepEqual)((n=this.selectedOption)===null||n===void 0?void 0:n.value,t?.value)){this.selectedOption=t;for(let s of this.options)s.selected=s===t;r&&this.dispatchEvent(new CustomEvent("change",{detail:(i=this.selectedOption)===null||i===void 0?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};R.elementDefinitions={"ft-input-label":ae,"ft-typography":ye,"ft-ripple":N,"ft-icon":X,"ft-select-option":V};R.searchTimeoutMilliseconds=2e3;R.styles=[it,rs];F([(0,U.property)({type:String})],R.prototype,"label",void 0);F([(0,U.property)({type:String})],R.prototype,"ariaLabel",void 0);F([(0,U.property)({type:String})],R.prototype,"helper",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"outlined",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"disabled",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"error",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"fixedMenuPosition",void 0);F([(0,U.property)({type:Array})],R.prototype,"options",void 0);F([(0,U.state)()],R.prototype,"selectedOption",void 0);F([(0,U.state)()],R.prototype,"optionsDisplayed",void 0);F([(0,U.state)()],R.prototype,"focusOptions",void 0);F([(0,U.state)()],R.prototype,"currentSearch",void 0);F([(0,U.state)()],R.prototype,"lastSearchInputDate",void 0);F([(0,U.query)(".ft-select")],R.prototype,"container",void 0);F([(0,U.query)(".ft-select--options")],R.prototype,"optionsMenu",void 0);F([(0,U.query)(".ft-select--input-panel")],R.prototype,"mainPanel",void 0);F([(0,U.query)("slot:not([name])")],R.prototype,"optionsSlot",void 0);var us=f(E());var ls={"ft-select":R,"ft-select-option":V};(0,us.customElements)(ls);var gt=f(E()),Hn=f(j());var Qr;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Qr||(Qr={}));var qe=f(E());var Ro=f(E());var cs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(cs||(cs={}));var ps;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(ps||(ps={}));var ds;(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"})(ds||(ds={}));var fs;(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"})(fs||(fs={}));var hs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(hs||(hs={}));var ms;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ms||(ms={}));var ys;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ys||(ys={}));var vs;(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"})(vs||(vs={}));var gs;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(gs||(gs={}));var bs;(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"})(bs||(bs={}));var xs;(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"})(xs||(xs={}));var Ss;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ss||(Ss={}));var Es;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Es||(Es={}));var As;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(As||(As={}));var Cs;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Cs||(Cs={}));var Os;(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"})(Os||(Os={}));var Xr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Xr||(Xr={}));var _s;(function(e){e.ASC="ASC",e.DESC="DESC"})(_s||(_s={}));var Ts;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ts||(Ts={}));var Jr;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Jr||(Jr={}));var Rs;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Rs||(Rs={}));var ws;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ws||(ws={}));var Ls;(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"})(Ls||(Ls={}));var Ns;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ns||(Ns={}));var Ds;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ds||(Ds={}));var Zr;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Zr||(Zr={}));var Ps;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ps||(Ps={}));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 re;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(re||(re={}));var Ms;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Ms||(Ms={}));var Is;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Is||(Is={}));var ks;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(ks||(ks={}));var Us;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Us||(Us={}));var $s;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})($s||($s={}));var Hs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Hs||(Hs={}));var js;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(js||(js={}));var Bs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Bs||(Bs={}));var Fs;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Fs||(Fs={}));var Vs;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Vs||(Vs={}));var Ks;(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"})(Ks||(Ks={}));var qs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(qs||(qs={}));var wo={[$.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 zs(e,t){return e===t||(wo[e]??[]).some(r=>zs(r,t))}function Ws(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=>zs(n,t))}var _n=f(j());var Gs=f(j(),1);var en=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Ys(e,t){return(0,Gs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Pt(e);try{return JSON.parse(r)}catch{return Pt(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Mt,...t??{}})}function Lo(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(!Xt(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(!Xt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=a=>Object.keys(a).filter(o=>a[o]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let a=s[n];if(!Xt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Xt(e,t){try{return Lo(e,t)}catch{return!1}}function Mt(e,t){return!Xt(e,t)}function Pt(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Jt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Qs=f(j(),1);var tn=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:Mt,attribute:!1,...t};(0,Qs.property)(s)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(o=>o[n]),store:t.store})}};var Zt=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 ke=f(j(),1);var er=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 i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){i(o);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Js=f(H(),1);var tr=globalThis,No=tr.ShadowRoot&&(tr.ShadyCSS===void 0||tr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Xs=(e,t)=>{if(No)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of t){let n=document.createElement("style"),i=tr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var rr=class extends Js.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 Xs(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){en(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 Zs(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var lt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},na,ea=Symbol("constructorPrototype"),ta=Symbol("constructorName"),ia=Symbol("exportpartsDebouncer"),ra=Symbol("dynamicDependenciesLoaded"),ot=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ot.eventName="exportparts-updated";var pe=class extends rr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[na]=new er(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[ia].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ta]=this.constructor.name,this[ea]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ta]&&Object.setPrototypeOf(this,this[ea])}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[ra]||(r[ra]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ot.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ot.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 ot)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=Zs(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,n,i,s,a,o;let l=d=>d!=null&&d.trim().length>0,u=t.filter(l).map(d=>d.trim());if(u.length===0){this.exportparts=void 0;return}let c=new Set;for(let d of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=d.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],m=(o=(a=d.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(C=>C.split(":")[1]))!==null&&o!==void 0?o:[],g=[...v,...m].filter(l).map(C=>C.trim());for(let C of g)c.add(C)}if(c.size===0){this.exportparts=void 0;return}let p=[...c.values()].flatMap(d=>u.map(v=>`${d}:${v}--${d}`));this.exportparts=[...this.part,...p].join(", ")}};na=ia;lt([(0,ke.property)()],pe.prototype,"exportpartsPrefix",void 0);lt([Ys([])],pe.prototype,"exportpartsPrefixes",void 0);lt([(0,ke.property)({reflect:!0})],pe.prototype,"exportparts",void 0);lt([(0,ke.property)()],pe.prototype,"customStylesheet",void 0);lt([(0,ke.property)()],pe.prototype,"elementToFocus",void 0);lt([(0,ke.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function nr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var It=Symbol("internalReduxEventsUnsubscribers"),Oe=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),Do=Jt(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[Ue].get(a)}addStore(a,o){var l;o=(l=o??a.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(o),this[Ue].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[Ue].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ue].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let l=this.constructor.getPropertyOptions(o);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[Oe].has(a.store):this[Oe].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var l;this[Oe].set(a,o.subscribe(()=>this.updateFromStores())),this[It].set(a,[]),nr(o)&&o.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,c)=>{if(typeof this[c]=="function"&&(!u.store||o.name===u.store)){let p=d=>this[c](d);o.addEventListener(u.eventName,p),this[It].get(a).push(()=>o.removeEventListener(u.eventName,p))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[Oe].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[Oe].has(a)&&this[Oe].get(a)(),this[Oe].delete(a),(o=this[It].get(a))===null||o===void 0||o.forEach(l=>l()),this[It].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Oe,r=Ue,n=It,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),sa=class extends Do(pe){};function ne(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(a){return"'"+a+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ve(e){return!!e&&!!e[D]}function ue(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===jo})(e)||Array.isArray(e)||!!e[da]||!!(!((t=e.constructor)===null||t===void 0)&&t[da])||pn(e)||dn(e))}function $e(e,t,r){r===void 0&&(r=!1),pt(e)===0?(r?Object.keys:ct)(e).forEach((function(n){r&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,i){return t(i,n,e)}))}function pt(e){var t=e[D];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:pn(e)?2:dn(e)?3:0}function ut(e,t){return pt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Po(e,t){return pt(e)===2?e.get(t):e[t]}function fa(e,t,r){var n=pt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ha(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function pn(e){return $o&&e instanceof Map}function dn(e){return Ho&&e instanceof Set}function _e(e){return e.o||e.t}function fn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=va(e);delete t[D];for(var r=ct(t),n=0;n<r.length;n++){var i=r[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function hn(e,t){return t===void 0&&(t=!1),mn(e)||ve(e)||!ue(e)||(pt(e)>1&&(e.set=e.add=e.clear=e.delete=Mo),Object.freeze(e),t&&$e(e,(function(r,n){return hn(n,!0)}),!0)),e}function Mo(){ne(2)}function mn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function de(e){var t=cn[e];return t||ne(18,e),t}function Io(e,t){cn[e]||(cn[e]=t)}function on(){return Ut}function rn(e,t){t&&(de("Patches"),e.u=[],e.s=[],e.v=t)}function ir(e){ln(e),e.p.forEach(ko),e.p=null}function ln(e){e===Ut&&(Ut=e.l)}function aa(e){return Ut={p:[],l:Ut,h:e,m:!0,_:0}}function ko(e){var t=e[D];t.i===0||t.i===1?t.j():t.g=!0}function nn(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||de("ES5").S(t,e,n),n?(r[D].P&&(ir(t),ne(4)),ue(e)&&(e=sr(t,e),t.l||ar(t,e)),t.u&&de("Patches").M(r[D].t,e,t.u,t.s)):e=sr(t,r,[]),ir(t),t.u&&t.v(t.u,t.s),e!==ya?e:void 0}function sr(e,t,r){if(mn(t))return t;var n=t[D];if(!n)return $e(t,(function(o,l){return oa(e,n,t,o,l,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return ar(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=fn(n.k):n.o,s=i,a=!1;n.i===3&&(s=new Set(i),i.clear(),a=!0),$e(s,(function(o,l){return oa(e,n,i,o,l,r,a)})),ar(e,i,!1),r&&e.u&&de("Patches").N(n,r,e.u,e.s)}return n.o}function oa(e,t,r,n,i,s,a){if(ve(i)){var o=sr(e,i,s&&t&&t.i!==3&&!ut(t.R,n)?s.concat(n):void 0);if(fa(r,n,o),!ve(o))return;e.m=!1}else a&&r.add(i);if(ue(i)&&!mn(i)){if(!e.h.D&&e._<1)return;sr(e,i),t&&t.A.l||ar(e,i)}}function ar(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&hn(t,r)}function sn(e,t){var r=e[D];return(r?_e(r):e)[t]}function la(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Te(e){e.P||(e.P=!0,e.l&&Te(e.l))}function an(e){e.o||(e.o=fn(e.t))}function un(e,t,r){var n=pn(t)?de("MapSet").F(t,r):dn(t)?de("MapSet").T(t,r):e.O?(function(i,s){var a=Array.isArray(i),o={i:a?1:0,A:s?s.A:on(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},l=o,u=$t;a&&(l=[o],u=kt);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return o.k=d,o.j=p,d})(t,r):de("ES5").J(t,r);return(r?r.A:on()).p.push(n),n}function Uo(e){return ve(e)||ne(22,e),(function t(r){if(!ue(r))return r;var n,i=r[D],s=pt(r);if(i){if(!i.P&&(i.i<4||!de("ES5").K(i)))return i.t;i.I=!0,n=ua(r,s),i.I=!1}else n=ua(r,s);return $e(n,(function(a,o){i&&Po(i.t,a)===o||fa(n,a,t(o))})),s===3?new Set(n):n})(e)}function ua(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return fn(e)}function ma(){function e(a,o){var l=s[a];return l?l.enumerable=o:s[a]=l={configurable:!0,enumerable:o,get:function(){var u=this[D];return $t.get(u,a)},set:function(u){var c=this[D];$t.set(c,a,u)}},l}function t(a){for(var o=a.length-1;o>=0;o--){var l=a[o][D];if(!l.P)switch(l.i){case 5:n(l)&&Te(l);break;case 4:r(l)&&Te(l)}}}function r(a){for(var o=a.t,l=a.k,u=ct(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==D){var d=o[p];if(d===void 0&&!ut(o,p))return!0;var v=l[p],m=v&&v[D];if(m?m.t!==d:!ha(v,d))return!0}}var g=!!o[D];return u.length!==ct(o).length+(g?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var l=Object.getOwnPropertyDescriptor(o,o.length-1);if(l&&!l.get)return!0;for(var u=0;u<o.length;u++)if(!o.hasOwnProperty(u))return!0;return!1}function i(a){a.g&&ne(3,JSON.stringify(_e(a)))}var s={};Io("ES5",{J:function(a,o){var l=Array.isArray(a),u=(function(p,d){if(p){for(var v=Array(d.length),m=0;m<d.length;m++)Object.defineProperty(v,""+m,e(m,!0));return v}var g=va(d);delete g[D];for(var C=ct(g),_=0;_<C.length;_++){var T=C[_];g[T]=e(T,p||!!g[T].enumerable)}return Object.create(Object.getPrototypeOf(d),g)})(l,a),c={i:l?5:4,A:o?o.A:on(),P:!1,I:!1,R:{},l:o,t:a,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,D,{value:c,writable:!0}),u},S:function(a,o,l){l?ve(o)&&o[D].A===a&&t(a.p):(a.u&&(function u(c){if(c&&typeof c=="object"){var p=c[D];if(p){var d=p.t,v=p.k,m=p.R,g=p.i;if(g===4)$e(v,(function(w){w!==D&&(d[w]!==void 0||ut(d,w)?m[w]||u(v[w]):(m[w]=!0,Te(p)))})),$e(d,(function(w){v[w]!==void 0||ut(v,w)||(m[w]=!1,Te(p))}));else if(g===5){if(n(p)&&(Te(p),m.length=!0),v.length<d.length)for(var C=v.length;C<d.length;C++)m[C]=!1;else for(var _=d.length;_<v.length;_++)m[_]=!0;for(var T=Math.min(v.length,d.length),P=0;P<T;P++)v.hasOwnProperty(P)||(m[P]=!0),m[P]===void 0&&u(v[P])}}}})(a.p[0]),t(a.p))},K:function(a){return a.i===4?r(a):n(a)}})}var ca,Ut,yn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$o=typeof Map<"u",Ho=typeof Set<"u",pa=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ya=yn?Symbol.for("immer-nothing"):((ca={})["immer-nothing"]=!0,ca),da=yn?Symbol.for("immer-draftable"):"__$immer_draftable",D=yn?Symbol.for("immer-state"):"__$immer_state";var jo=""+Object.prototype.constructor,ct=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,va=Object.getOwnPropertyDescriptors||function(e){var t={};return ct(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},cn={},$t={get:function(e,t){if(t===D)return e;var r=_e(e);if(!ut(r,t))return(function(i,s,a){var o,l=la(s,a);return l?"value"in l?l.value:(o=l.get)===null||o===void 0?void 0:o.call(i.k):void 0})(e,r,t);var n=r[t];return e.I||!ue(n)?n:n===sn(e.t,t)?(an(e),e.o[t]=un(e.A.h,n,e)):n},has:function(e,t){return t in _e(e)},ownKeys:function(e){return Reflect.ownKeys(_e(e))},set:function(e,t,r){var n=la(_e(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=sn(_e(e),t),s=i?.[D];if(s&&s.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ha(r,i)&&(r!==void 0||ut(e.t,t)))return!0;an(e),Te(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return sn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,an(e),Te(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=_e(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ne(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ne(12)}},kt={};$e($t,(function(e,t){kt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),kt.deleteProperty=function(e,t){return kt.set.call(this,e,t,void 0)},kt.set=function(e,t,r){return $t.set.call(this,e[0],t,r,e[0])};var Bo=(function(){function e(r){var n=this;this.O=pa,this.D=!0,this.produce=function(i,s,a){if(typeof i=="function"&&typeof s!="function"){var o=s;s=i;var l=n;return function(g){var C=this;g===void 0&&(g=o);for(var _=arguments.length,T=Array(_>1?_-1:0),P=1;P<_;P++)T[P-1]=arguments[P];return l.produce(g,(function(w){var xe;return(xe=s).call.apply(xe,[C,w].concat(T))}))}}var u;if(typeof s!="function"&&ne(6),a!==void 0&&typeof a!="function"&&ne(7),ue(i)){var c=aa(n),p=un(n,i,void 0),d=!0;try{u=s(p),d=!1}finally{d?ir(c):ln(c)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(g){return rn(c,a),nn(g,c)}),(function(g){throw ir(c),g})):(rn(c,a),nn(u,c))}if(!i||typeof i!="object"){if((u=s(i))===void 0&&(u=i),u===ya&&(u=void 0),n.D&&hn(u,!0),a){var v=[],m=[];de("Patches").M(i,u,v,m),a(v,m)}return u}ne(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return n.produceWithPatches(u,(function(v){return i.apply(void 0,[v].concat(p))}))};var a,o,l=n.produce(i,s,(function(u,c){a=u,o=c}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(u){return[u,a,o]})):[l,a,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ue(r)||ne(8),ve(r)&&(r=Uo(r));var n=aa(this),i=un(this,r,void 0);return i[D].C=!0,ln(n),i},t.finishDraft=function(r,n){var i=r&&r[D],s=i.A;return rn(s,n),nn(void 0,s)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!pa&&ne(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var a=de("Patches").$;return ve(r)?a(r,n):this.produce(r,(function(o){return a(o,n)}))},e})(),J=new Bo,Fo=J.produce,bp=J.produceWithPatches.bind(J),xp=J.setAutoFreeze.bind(J),Sp=J.setUseProxies.bind(J),Ep=J.applyPatches.bind(J),Ap=J.createDraft.bind(J),Cp=J.finishDraft.bind(J),or=Fo;function He(e){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(e)}function ga(e,t){if(He(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(He(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ba(e){var t=ga(e,"string");return He(t)=="symbol"?t:t+""}function xa(e,t,r){return(t=ba(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sa(Object(r),!0).forEach(function(n){xa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}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 Ea=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},lr={INIT:"@@redux/INIT"+gn(),REPLACE:"@@redux/REPLACE"+gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gn()}};function Vo(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function bn(e,t,r){var n;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(bn)(e,t)}if(typeof e!="function")throw new Error(K(2));var i=e,s=t,a=[],o=a,l=!1;function u(){o===a&&(o=a.slice())}function c(){if(l)throw new Error(K(3));return s}function p(g){if(typeof g!="function")throw new Error(K(4));if(l)throw new Error(K(5));var C=!0;return u(),o.push(g),function(){if(C){if(l)throw new Error(K(6));C=!1,u();var T=o.indexOf(g);o.splice(T,1),a=null}}}function d(g){if(!Vo(g))throw new Error(K(7));if(typeof g.type>"u")throw new Error(K(8));if(l)throw new Error(K(9));try{l=!0,s=i(s,g)}finally{l=!1}for(var C=a=o,_=0;_<C.length;_++){var T=C[_];T()}return g}function v(g){if(typeof g!="function")throw new Error(K(10));i=g,d({type:lr.REPLACE})}function m(){var g,C=p;return g={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(K(11));function P(){T.next&&T.next(c())}P();var w=C(P);return{unsubscribe:w}}},g[Ea]=function(){return this},g}return d({type:lr.INIT}),n={dispatch:d,subscribe:p,getState:c,replaceReducer:v},n[Ea]=m,n}function Ko(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:lr.INIT});if(typeof n>"u")throw new Error(K(12));if(typeof r(void 0,{type:lr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(K(13))})}function Aa(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var s=Object.keys(r),a,o;try{Ko(r)}catch(l){o=l}return function(u,c){if(u===void 0&&(u={}),o)throw o;if(0)var p;for(var d=!1,v={},m=0;m<s.length;m++){var g=s[m],C=r[g],_=u[g],T=C(_,c);if(typeof T>"u"){var P=c&&c.type;throw new Error(K(14))}v[g]=T,d=d||T!==_}return d=d||s.length!==Object.keys(u).length,d?v:u}}function dt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ca(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(K(15))},a={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},o=t.map(function(l){return l(a)});return s=dt.apply(void 0,o)(i.dispatch),vn(vn({},i),{},{dispatch:s})}}}function Oa(e){var t=function(n){var i=n.dispatch,s=n.getState;return function(a){return function(o){return typeof o=="function"?o(i,s,e):a(o)}}};return t}var _a=Oa();_a.withExtraArgument=Oa;var xn=_a;var Na=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),qo=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ft=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},zo=Object.defineProperty,Wo=Object.defineProperties,Go=Object.getOwnPropertyDescriptors,Ta=Object.getOwnPropertySymbols,Yo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable,Ra=function(e,t,r){return t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Re=function(e,t){for(var r in t||(t={}))Yo.call(t,r)&&Ra(e,r,t[r]);if(Ta)for(var n=0,i=Ta(t);n<i.length;n++){var r=i[n];Qo.call(t,r)&&Ra(e,r,t[r])}return e},Sn=function(e,t){return Wo(e,Go(t))},Xo=function(e,t,r){return new Promise(function(n,i){var s=function(l){try{o(r.next(l))}catch(u){i(u)}},a=function(l){try{o(r.throw(l))}catch(u){i(u)}},o=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(s,a)};o((r=r.apply(e,t)).next())})};var Jo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dt:dt.apply(null,arguments)},Fp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Zo(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function we(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return Re(Re({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=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}var el=(function(e){Na(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,ft([void 0],r[0].concat(this)))):new(t.bind.apply(t,ft([void 0],r.concat(this))))},t})(Array),tl=(function(e){Na(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,ft([void 0],r[0].concat(this)))):new(t.bind.apply(t,ft([void 0],r.concat(this))))},t})(Array);function Cn(e){return ue(e)?or(e,function(){}):e}function rl(e){return typeof e=="boolean"}function nl(){return function(t){return il(t)}}function il(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,s=e.serializableCheck,a=s===void 0?!0:s,o=e.actionCreatorCheck,l=o===void 0?!0:o,u=new el;if(r&&(rl(r)?u.push(xn):u.push(xn.withExtraArgument(r.extraArgument))),0){if(i)var c;if(a)var p;if(l)var d}return u}var En=!0;function Da(e){var t=nl(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,s=r.middleware,a=s===void 0?t():s,o=r.devTools,l=o===void 0?!0:o,u=r.preloadedState,c=u===void 0?void 0:u,p=r.enhancers,d=p===void 0?void 0:p,v;if(typeof i=="function")v=i;else if(Zo(i))v=Aa(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=a;if(typeof m=="function"&&(m=m(t),!En&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!En&&m.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=Ca.apply(void 0,m),C=dt;l&&(C=Jo(Re({trace:!En},typeof l=="object"&&l)));var _=new tl(g),T=_;Array.isArray(d)?T=ft([g],d):typeof d=="function"&&(T=d(_));var P=C.apply(void 0,T);return bn(v,c,P)}function Pa(e){var t={},r=[],n,i={addCase:function(s,a){var o=typeof s=="string"?s:s.type;if(!o)throw new Error("`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[o]=a,i},addMatcher:function(s,a){return r.push({matcher:s,reducer:a}),i},addDefaultCase:function(s){return n=s,i}};return e(i),[t,r,n]}function sl(e){return typeof e=="function"}function al(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Pa(t):[t,r,n],s=i[0],a=i[1],o=i[2],l;if(sl(e))l=function(){return Cn(e())};else{var u=Cn(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var v=ft([s[d.type]],a.filter(function(m){var g=m.matcher;return g(d)}).map(function(m){var g=m.reducer;return g}));return v.filter(function(m){return!!m}).length===0&&(v=[o]),v.reduce(function(m,g){if(g)if(ve(m)){var C=m,_=g(C,d);return _===void 0?m:_}else{if(ue(m))return or(m,function(T){return g(T,d)});var _=g(m,d);if(_===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return m},p)}return c.getInitialState=l,c}function ol(e,t){return e+"/"+t}function Ma(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Cn(e.initialState),n=e.reducers||{},i=Object.keys(n),s={},a={},o={};i.forEach(function(c){var p=n[c],d=ol(t,c),v,m;"reducer"in p?(v=p.reducer,m=p.prepare):v=p,s[c]=v,a[d]=v,o[c]=m?we(d,m):we(d)});function l(){var c=typeof e.extraReducers=="function"?Pa(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,v=c[1],m=v===void 0?[]:v,g=c[2],C=g===void 0?void 0:g,_=Re(Re({},d),a);return al(r,function(T){for(var P in _)T.addCase(P,_[P]);for(var w=0,xe=m;w<xe.length;w++){var fe=xe[w];T.addMatcher(fe.matcher,fe.reducer)}C&&T.addDefaultCase(C)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:o,caseReducers:s,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var ll="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ul=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=ll[Math.random()*64|0];return t},cl=["name","message","stack","code"],An=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),wa=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),pl=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=cl;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},zp=(function(){function e(t,r,n){var i=we(t+"/fulfilled",function(c,p,d,v){return{payload:c,meta:Sn(Re({},v||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),s=we(t+"/pending",function(c,p,d){return{payload:void 0,meta:Sn(Re({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),a=we(t+"/rejected",function(c,p,d,v,m){return{payload:v,error:(n&&n.serializeError||pl)(c||"Rejected"),meta:Sn(Re({},m||{}),{arg:d,requestId:p,rejectedWithValue:!!v,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),o=!1,l=typeof AbortController<"u"?AbortController:(function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c})();function u(c){return function(p,d,v){var m=n?.idGenerator?n.idGenerator(c):ul(),g=new l,C,_=!1;function T(w){C=w,g.abort()}var P=(function(){return Xo(this,null,function(){var w,xe,fe,xt,Kn,St,qn;return qo(this,function(ze){switch(ze.label){case 0:return ze.trys.push([0,4,,5]),xt=(w=n?.condition)==null?void 0:w.call(n,c,{getState:d,extra:v}),fl(xt)?[4,xt]:[3,2];case 1:xt=ze.sent(),ze.label=2;case 2:if(xt===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,Kn=new Promise(function(se,Et){return g.signal.addEventListener("abort",function(){return Et({name:"AbortError",message:C||"Aborted"})})}),p(s(m,c,(xe=n?.getPendingMeta)==null?void 0:xe.call(n,{requestId:m,arg:c},{getState:d,extra:v}))),[4,Promise.race([Kn,Promise.resolve(r(c,{dispatch:p,getState:d,extra:v,requestId:m,signal:g.signal,abort:T,rejectWithValue:function(se,Et){return new An(se,Et)},fulfillWithValue:function(se,Et){return new wa(se,Et)}})).then(function(se){if(se instanceof An)throw se;return se instanceof wa?i(se.payload,m,c,se.meta):i(se,m,c)})])];case 3:return fe=ze.sent(),[3,5];case 4:return St=ze.sent(),fe=St instanceof An?a(null,m,c,St.payload,St.meta):a(St,m,c),[3,5];case 5:return qn=n&&!n.dispatchConditionRejection&&a.match(fe)&&fe.meta.condition,qn||p(fe),[2,fe]}})})})();return Object.assign(P,{abort:T,requestId:m,arg:c,unwrap:function(){return P.then(dl)}})}}return Object.assign(u,{pending:s,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e})();function dl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function fl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ia="listener",ka="completed",Ua="cancelled",Wp="task-"+Ua,Gp="task-"+ka,Yp=Ia+"-"+Ua,Qp=Ia+"-"+ka;var On="listenerMiddleware";var Xp=we(On+"/add"),Jp=we(On+"/removeAll"),Zp=we(On+"/remove");var La,ed=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(La||(La=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},hl=function(e){return function(t){setTimeout(t,e)}},td=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hl(10);ma();var ml=Jt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),ur=class extends ml(Object){};window.ftReduxStores||(window.ftReduxStores={});var $a=class e extends ur{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(nr(s))return s;if(i==null)return;let a=Ma({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=Da({reducer:(l,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let c=Pt(a.getInitialState());for(let p of u.keeping)c[p]=(l??c)[p];return c}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...u.overwrites};return a.reducer(l,u)}});return window.ftReduxStores[i.name]=new e(a,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Zt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,a,o)=>{let l=a,u=s[l];return u?(...c)=>{let p=u(...c.map(i));return this.reduxStore.dispatch(p),p}:c=>{this.setState({[l]:i(c)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var cr=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return s?l:i?`${o} ${l}`:o}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 pr=f(E()),yl="ft-app-info",ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ht.eventName="authentication-change";var Ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ht.eventName="ui-locale-changed";var vl={session:(e,t)=>{(0,pr.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>S.dispatchEvent(new ht(t.payload)),0))}},S=pr.FtReduxStore.get({name:yl,reducers:vl,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Ha=f(E()),dr=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},wd=(0,Ha.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(S)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(o=>o.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?o=>cr.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return dr([(0,_n.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),dr([(0,_n.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),dr([tn({store:S.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),dr([tn({store:S.name})],t.prototype,"uiLocale",void 0),t});var vr=f(E());var Tn=f(E());var je=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=S.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=S.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var mt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:je.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):je.await()}};var Y=class extends mt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(s,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[l])=>o.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?i.commonCache:new Tn.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 fr=class extends Y{async listMySearches(){let{session:t}=S.getState();return Ws(t,$.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var hr=class extends Y{async listMyBookmarks(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var mr=class extends Y{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=S.getState().session;return!!t?.sessionAuthenticated}};var yr=class extends Y{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=S.getState().session;return!!t?.sessionAuthenticated}};var gl="ft-user-assets",bl={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(re).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:i}=t.payload;wn(e,r,[...Rn(e,r),i]),ja(e,r,1,n),Ba(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;wn(e,r,Rn(e,r).map(i=>i.id===n.id?n:i)),Ba(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;wn(e,r,Rn(e,r).filter(s=>s.id!==i)),ja(e,r,-1,n)}},Fa={[re.SEARCHES]:"savedSearches",[re.BOOKMARKS]:"bookmarks",[re.BOOKS]:void 0,[re.COLLECTIONS]:void 0},Rn=(e,t)=>{var r;let n=Fa[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},wn=(e,t,r)=>{let n=Fa[t];n&&(e[n]=r)},ja=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===re.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+r)}},Ba=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},z=vr.FtReduxStore.get({name:gl,reducers:bl,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(re).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ln=class{constructor(t=new mr,r=new yr){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hr,this.savedSearchesService=new fr,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=S.getState();(0,vr.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(),z.actions.clearAssetCount(),z.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),z.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),z.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();z.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();z.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&z.getState().assetCounts.allAsset[t]!==r.count&&z.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&z.getState().assetCounts.bookmarkByMap[t]!==r.count&&z.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(z.getState().assetCounts.bookmarkByMap).length!==0;t===re.BOOKMARKS&&r&&z.actions.clearBookmarkCountByMap(),z.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;z.actions.bookmarks(r)}}},xl=new Ln;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xl);var Nn=class{addCommand(t,r=!1){S.commands.add(t,r)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Nn;var ie=f(E());var Va,yt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Sl=Symbol("clearAfterUnitTest"),gr=class extends(0,ie.withEventBus)(Y){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Va]=()=>{this.defaultMessages={},this.cache=new ie.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.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 i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,ie.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,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 i;let s=t.toLowerCase(),a=this.resolveContext(s);return new ie.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},a).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(i){!(i instanceof ie.CanceledPromiseError)&&r&&console.error(i)}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 i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new yt({loadedContexts:t})),this.dispatchEvent(new yt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new yt({loadedContexts:[t]})),this.dispatchEvent(new yt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ie.delay)(0).then(()=>n()).catch(()=>null)))}};Va=Sl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends gr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends gr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var vt=window.FluidTopicsI18nService,br=window.FluidTopicsCustomI18nService;var Ka=f(E()),Dn=class{highlightHtml(t,r,n){(0,Ka.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Dn;var qa=f(E());var Pn=class{isDate(t){var r,n,i,s;return(s=(i=((n=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,a;if(t==null)return"";try{return qa.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:S.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new Pn;var za=f(E());var jt=class{static get(t,r){var n,i;let s=S.getState(),{lang:a,region:o}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new za.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,r??`${a}-${o}`)}};var Mn=class{urlToSearchRequest(t){return jt.get().parse(t)}searchRequestToUrl(t){return jt.get().serialize(t)}};window.FluidTopicsUrlService=new Mn;var ge=f(E());var Be=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Be.eventName="change";var In=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))}},Wa=new In;var xr=class e extends ge.WithEventBus{static build(){return new e(window.history,Wa,()=>window.location,!1)}constructor(t,r,n,i){var s,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}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,ge.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Be(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,a,o])=>{let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...s,index:l,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[u,a,o]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Be.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Be.eventName,t)}currentItem(){return(0,ge.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,ge.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ge.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,ge.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 i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}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 i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=xr.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)});var Ga=f(H());var Ya=Ga.css`
|
|
645
|
+
`}willUpdate(t){super.willUpdate(t),t.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(t){var r,n;if(super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&((n=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||n===void 0||n.focus(),this.focusOptions=!1),t.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let i=["bottom","top"];(0,te.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",i,"fixed",A.optionsHeight,0).then(({x:s,y:a})=>{this.optionsMenu.style.left=`${s}px`,this.optionsMenu.style.top=`${a}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var r;t.stopPropagation(),this.isSlotEmpty=(0,te.isSlotEmptyOrWithoutContent)(this.optionsSlot);let n=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(i=>i);n&&n.length>0&&(this.options=n)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(t){var r,n;let i,s=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(t.key){case" ":case"Enter":t.preventDefault(),t.stopPropagation(),this.onSelectOption(t),this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Escape":this.optionsDisplayed=!1,(n=this.mainPanel)===null||n===void 0||n.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),i=this.optionsList[(s-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),i=this.optionsList[(s+1)%this.optionsList.length];break;default:if(t.key.length!=1)break;this.isKeyAlphanumeric(t.key)&&(i=this.handleAlphanumericPress(t.key));break}i?.focus()}isKeyAlphanumeric(t){let r=t.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(t){let r=new Date;r.getTime()-this.lastSearchInputDate.getTime()>e.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=t.toLowerCase();let n=this.options.find(i=>{var s;return((s=i.label)===null||s===void 0?void 0:s.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=r,n&&this.optionsList.find(i=>i.value===n.value)}getOptionId(t){if(!t)return;let r=this.options.findIndex(n=>(0,te.deepEqual)(n.value,t.value));if(r!==-1)return`option-${r}`}onSelectOption(t){t.stopPropagation(),this.setValue(t.target.value)}setValue(t,r=!0){let n=this.options.find(i=>(0,te.deepEqual)(i.value,t));n&&this.selectOption(n,r)}selectOption(t,r=!0){var n,i;if(!(0,te.deepEqual)((n=this.selectedOption)===null||n===void 0?void 0:n.value,t?.value)){this.selectedOption=t;for(let s of this.options)s.selected=s===t;r&&this.dispatchEvent(new CustomEvent("change",{detail:(i=this.selectedOption)===null||i===void 0?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}};R.elementDefinitions={"ft-input-label":ae,"ft-typography":ye,"ft-ripple":N,"ft-icon":X,"ft-select-option":V};R.searchTimeoutMilliseconds=2e3;R.styles=[it,rs];F([(0,U.property)({type:String})],R.prototype,"label",void 0);F([(0,U.property)({type:String})],R.prototype,"ariaLabel",void 0);F([(0,U.property)({type:String})],R.prototype,"helper",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"outlined",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"disabled",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"error",void 0);F([(0,U.property)({type:Boolean})],R.prototype,"fixedMenuPosition",void 0);F([(0,U.property)({type:Array})],R.prototype,"options",void 0);F([(0,U.state)()],R.prototype,"selectedOption",void 0);F([(0,U.state)()],R.prototype,"optionsDisplayed",void 0);F([(0,U.state)()],R.prototype,"focusOptions",void 0);F([(0,U.state)()],R.prototype,"currentSearch",void 0);F([(0,U.state)()],R.prototype,"lastSearchInputDate",void 0);F([(0,U.query)(".ft-select")],R.prototype,"container",void 0);F([(0,U.query)(".ft-select--options")],R.prototype,"optionsMenu",void 0);F([(0,U.query)(".ft-select--input-panel")],R.prototype,"mainPanel",void 0);F([(0,U.query)("slot:not([name])")],R.prototype,"optionsSlot",void 0);var us=f(E());var ls={"ft-select":R,"ft-select-option":V};(0,us.customElements)(ls);var gt=f(E()),Hn=f(j());var Qr;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Qr||(Qr={}));var qe=f(E());var Ro=f(E());var cs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(cs||(cs={}));var ps;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(ps||(ps={}));var ds;(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"})(ds||(ds={}));var fs;(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"})(fs||(fs={}));var hs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(hs||(hs={}));var ms;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ms||(ms={}));var ys;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ys||(ys={}));var vs;(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"})(vs||(vs={}));var gs;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(gs||(gs={}));var bs;(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"})(bs||(bs={}));var xs;(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"})(xs||(xs={}));var Ss;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ss||(Ss={}));var Es;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Es||(Es={}));var As;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(As||(As={}));var Cs;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Cs||(Cs={}));var Os;(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"})(Os||(Os={}));var Xr;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Xr||(Xr={}));var _s;(function(e){e.ASC="ASC",e.DESC="DESC"})(_s||(_s={}));var Ts;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ts||(Ts={}));var Jr;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Jr||(Jr={}));var Rs;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Rs||(Rs={}));var ws;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ws||(ws={}));var Ls;(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"})(Ls||(Ls={}));var Ns;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ns||(Ns={}));var Ds;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ds||(Ds={}));var Zr;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Zr||(Zr={}));var Ps;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ps||(Ps={}));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 re;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(re||(re={}));var Ms;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Ms||(Ms={}));var Is;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Is||(Is={}));var ks;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(ks||(ks={}));var Us;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Us||(Us={}));var $s;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})($s||($s={}));var Hs;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Hs||(Hs={}));var js;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(js||(js={}));var Bs;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Bs||(Bs={}));var Fs;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Fs||(Fs={}));var Vs;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Vs||(Vs={}));var Ks;(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"})(Ks||(Ks={}));var qs;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(qs||(qs={}));var wo={[$.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 zs(e,t){return e===t||(wo[e]??[]).some(r=>zs(r,t))}function Ws(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=>zs(n,t))}var _n=f(j());var Gs=f(j(),1);var en=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Ys(e,t){return(0,Gs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Pt(e);try{return JSON.parse(r)}catch{return Pt(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Mt,...t??{}})}function Lo(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(!Xt(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(!Xt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=a=>Object.keys(a).filter(o=>a[o]!=null),s=i(e);if(r=s.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){let a=s[n];if(!Xt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Xt(e,t){try{return Lo(e,t)}catch{return!1}}function Mt(e,t){return!Xt(e,t)}function Pt(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Jt(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Qs=f(j(),1);var tn=e=>{let t=e??{};return(r,n)=>{var i;let s={hasChanged:Mt,attribute:!1,...t};(0,Qs.property)(s)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(o=>o[n]),store:t.store})}};var Zt=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 ke=f(j(),1);var er=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 i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){i(o);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Js=f(H(),1);var tr=globalThis,No=tr.ShadowRoot&&(tr.ShadyCSS===void 0||tr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Xs=(e,t)=>{if(No)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of t){let n=document.createElement("style"),i=tr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var rr=class extends Js.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 Xs(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){en(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 Zs(e,t,...r){var n;let i=e.querySelector(t);for(let s of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(s);return i}var lt=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},na,ea=Symbol("constructorPrototype"),ta=Symbol("constructorName"),ia=Symbol("exportpartsDebouncer"),ra=Symbol("dynamicDependenciesLoaded"),ot=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ot.eventName="exportparts-updated";var pe=class extends rr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[na]=new er(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[ia].run(()=>{var i,s;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ta]=this.constructor.name,this[ea]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ta]&&Object.setPrototypeOf(this,this[ea])}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[ra]||(r[ra]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ot.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ot.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 ot)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let s=[...i??[],n];r=Zs(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,n,i,s,a,o;let l=d=>d!=null&&d.trim().length>0,u=t.filter(l).map(d=>d.trim());if(u.length===0){this.exportparts=void 0;return}let c=new Set;for(let d of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(s=(i=d.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],m=(o=(a=d.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(C=>C.split(":")[1]))!==null&&o!==void 0?o:[],g=[...v,...m].filter(l).map(C=>C.trim());for(let C of g)c.add(C)}if(c.size===0){this.exportparts=void 0;return}let p=[...c.values()].flatMap(d=>u.map(v=>`${d}:${v}--${d}`));this.exportparts=[...this.part,...p].join(", ")}};na=ia;lt([(0,ke.property)()],pe.prototype,"exportpartsPrefix",void 0);lt([Ys([])],pe.prototype,"exportpartsPrefixes",void 0);lt([(0,ke.property)({reflect:!0})],pe.prototype,"exportparts",void 0);lt([(0,ke.property)()],pe.prototype,"customStylesheet",void 0);lt([(0,ke.property)()],pe.prototype,"elementToFocus",void 0);lt([(0,ke.state)()],pe.prototype,"useAdoptedStyleSheets",void 0);function nr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var It=Symbol("internalReduxEventsUnsubscribers"),Oe=Symbol("internalStoresUnsubscribers"),Ue=Symbol("internalStores"),Do=Jt(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Ue].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ue].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[Ue].get(a)}addStore(a,o){var l;o=(l=o??a.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(o),this[Ue].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[Ue].delete(o)}setupStores(){this.unsubscribeFromStores(),this[Ue].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let l=this.constructor.getPropertyOptions(o);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[Oe].has(a.store):this[Oe].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var l;this[Oe].set(a,o.subscribe(()=>this.updateFromStores())),this[It].set(a,[]),nr(o)&&o.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((u,c)=>{if(typeof this[c]=="function"&&(!u.store||o.name===u.store)){let p=d=>this[c](d);o.addEventListener(u.eventName,p),this[It].get(a).push(()=>o.removeEventListener(u.eventName,p))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[Oe].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[Oe].has(a)&&this[Oe].get(a)(),this[Oe].delete(a),(o=this[It].get(a))===null||o===void 0||o.forEach(l=>l()),this[It].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Oe,r=Ue,n=It,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),sa=class extends Do(pe){};function ne(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,s;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(a){return"'"+a+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ve(e){return!!e&&!!e[D]}function ue(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===jo})(e)||Array.isArray(e)||!!e[da]||!!(!((t=e.constructor)===null||t===void 0)&&t[da])||pn(e)||dn(e))}function $e(e,t,r){r===void 0&&(r=!1),pt(e)===0?(r?Object.keys:ct)(e).forEach((function(n){r&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,i){return t(i,n,e)}))}function pt(e){var t=e[D];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:pn(e)?2:dn(e)?3:0}function ut(e,t){return pt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Po(e,t){return pt(e)===2?e.get(t):e[t]}function fa(e,t,r){var n=pt(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ha(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function pn(e){return $o&&e instanceof Map}function dn(e){return Ho&&e instanceof Set}function _e(e){return e.o||e.t}function fn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=va(e);delete t[D];for(var r=ct(t),n=0;n<r.length;n++){var i=r[n],s=t[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function hn(e,t){return t===void 0&&(t=!1),mn(e)||ve(e)||!ue(e)||(pt(e)>1&&(e.set=e.add=e.clear=e.delete=Mo),Object.freeze(e),t&&$e(e,(function(r,n){return hn(n,!0)}),!0)),e}function Mo(){ne(2)}function mn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function de(e){var t=cn[e];return t||ne(18,e),t}function Io(e,t){cn[e]||(cn[e]=t)}function on(){return Ut}function rn(e,t){t&&(de("Patches"),e.u=[],e.s=[],e.v=t)}function ir(e){ln(e),e.p.forEach(ko),e.p=null}function ln(e){e===Ut&&(Ut=e.l)}function aa(e){return Ut={p:[],l:Ut,h:e,m:!0,_:0}}function ko(e){var t=e[D];t.i===0||t.i===1?t.j():t.g=!0}function nn(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||de("ES5").S(t,e,n),n?(r[D].P&&(ir(t),ne(4)),ue(e)&&(e=sr(t,e),t.l||ar(t,e)),t.u&&de("Patches").M(r[D].t,e,t.u,t.s)):e=sr(t,r,[]),ir(t),t.u&&t.v(t.u,t.s),e!==ya?e:void 0}function sr(e,t,r){if(mn(t))return t;var n=t[D];if(!n)return $e(t,(function(o,l){return oa(e,n,t,o,l,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return ar(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=fn(n.k):n.o,s=i,a=!1;n.i===3&&(s=new Set(i),i.clear(),a=!0),$e(s,(function(o,l){return oa(e,n,i,o,l,r,a)})),ar(e,i,!1),r&&e.u&&de("Patches").N(n,r,e.u,e.s)}return n.o}function oa(e,t,r,n,i,s,a){if(ve(i)){var o=sr(e,i,s&&t&&t.i!==3&&!ut(t.R,n)?s.concat(n):void 0);if(fa(r,n,o),!ve(o))return;e.m=!1}else a&&r.add(i);if(ue(i)&&!mn(i)){if(!e.h.D&&e._<1)return;sr(e,i),t&&t.A.l||ar(e,i)}}function ar(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&hn(t,r)}function sn(e,t){var r=e[D];return(r?_e(r):e)[t]}function la(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Te(e){e.P||(e.P=!0,e.l&&Te(e.l))}function an(e){e.o||(e.o=fn(e.t))}function un(e,t,r){var n=pn(t)?de("MapSet").F(t,r):dn(t)?de("MapSet").T(t,r):e.O?(function(i,s){var a=Array.isArray(i),o={i:a?1:0,A:s?s.A:on(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},l=o,u=$t;a&&(l=[o],u=kt);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return o.k=d,o.j=p,d})(t,r):de("ES5").J(t,r);return(r?r.A:on()).p.push(n),n}function Uo(e){return ve(e)||ne(22,e),(function t(r){if(!ue(r))return r;var n,i=r[D],s=pt(r);if(i){if(!i.P&&(i.i<4||!de("ES5").K(i)))return i.t;i.I=!0,n=ua(r,s),i.I=!1}else n=ua(r,s);return $e(n,(function(a,o){i&&Po(i.t,a)===o||fa(n,a,t(o))})),s===3?new Set(n):n})(e)}function ua(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return fn(e)}function ma(){function e(a,o){var l=s[a];return l?l.enumerable=o:s[a]=l={configurable:!0,enumerable:o,get:function(){var u=this[D];return $t.get(u,a)},set:function(u){var c=this[D];$t.set(c,a,u)}},l}function t(a){for(var o=a.length-1;o>=0;o--){var l=a[o][D];if(!l.P)switch(l.i){case 5:n(l)&&Te(l);break;case 4:r(l)&&Te(l)}}}function r(a){for(var o=a.t,l=a.k,u=ct(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==D){var d=o[p];if(d===void 0&&!ut(o,p))return!0;var v=l[p],m=v&&v[D];if(m?m.t!==d:!ha(v,d))return!0}}var g=!!o[D];return u.length!==ct(o).length+(g?0:1)}function n(a){var o=a.k;if(o.length!==a.t.length)return!0;var l=Object.getOwnPropertyDescriptor(o,o.length-1);if(l&&!l.get)return!0;for(var u=0;u<o.length;u++)if(!o.hasOwnProperty(u))return!0;return!1}function i(a){a.g&&ne(3,JSON.stringify(_e(a)))}var s={};Io("ES5",{J:function(a,o){var l=Array.isArray(a),u=(function(p,d){if(p){for(var v=Array(d.length),m=0;m<d.length;m++)Object.defineProperty(v,""+m,e(m,!0));return v}var g=va(d);delete g[D];for(var C=ct(g),_=0;_<C.length;_++){var T=C[_];g[T]=e(T,p||!!g[T].enumerable)}return Object.create(Object.getPrototypeOf(d),g)})(l,a),c={i:l?5:4,A:o?o.A:on(),P:!1,I:!1,R:{},l:o,t:a,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,D,{value:c,writable:!0}),u},S:function(a,o,l){l?ve(o)&&o[D].A===a&&t(a.p):(a.u&&(function u(c){if(c&&typeof c=="object"){var p=c[D];if(p){var d=p.t,v=p.k,m=p.R,g=p.i;if(g===4)$e(v,(function(w){w!==D&&(d[w]!==void 0||ut(d,w)?m[w]||u(v[w]):(m[w]=!0,Te(p)))})),$e(d,(function(w){v[w]!==void 0||ut(v,w)||(m[w]=!1,Te(p))}));else if(g===5){if(n(p)&&(Te(p),m.length=!0),v.length<d.length)for(var C=v.length;C<d.length;C++)m[C]=!1;else for(var _=d.length;_<v.length;_++)m[_]=!0;for(var T=Math.min(v.length,d.length),P=0;P<T;P++)v.hasOwnProperty(P)||(m[P]=!0),m[P]===void 0&&u(v[P])}}}})(a.p[0]),t(a.p))},K:function(a){return a.i===4?r(a):n(a)}})}var ca,Ut,yn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$o=typeof Map<"u",Ho=typeof Set<"u",pa=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ya=yn?Symbol.for("immer-nothing"):((ca={})["immer-nothing"]=!0,ca),da=yn?Symbol.for("immer-draftable"):"__$immer_draftable",D=yn?Symbol.for("immer-state"):"__$immer_state";var jo=""+Object.prototype.constructor,ct=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,va=Object.getOwnPropertyDescriptors||function(e){var t={};return ct(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},cn={},$t={get:function(e,t){if(t===D)return e;var r=_e(e);if(!ut(r,t))return(function(i,s,a){var o,l=la(s,a);return l?"value"in l?l.value:(o=l.get)===null||o===void 0?void 0:o.call(i.k):void 0})(e,r,t);var n=r[t];return e.I||!ue(n)?n:n===sn(e.t,t)?(an(e),e.o[t]=un(e.A.h,n,e)):n},has:function(e,t){return t in _e(e)},ownKeys:function(e){return Reflect.ownKeys(_e(e))},set:function(e,t,r){var n=la(_e(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=sn(_e(e),t),s=i?.[D];if(s&&s.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ha(r,i)&&(r!==void 0||ut(e.t,t)))return!0;an(e),Te(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return sn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,an(e),Te(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=_e(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ne(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ne(12)}},kt={};$e($t,(function(e,t){kt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),kt.deleteProperty=function(e,t){return kt.set.call(this,e,t,void 0)},kt.set=function(e,t,r){return $t.set.call(this,e[0],t,r,e[0])};var Bo=(function(){function e(r){var n=this;this.O=pa,this.D=!0,this.produce=function(i,s,a){if(typeof i=="function"&&typeof s!="function"){var o=s;s=i;var l=n;return function(g){var C=this;g===void 0&&(g=o);for(var _=arguments.length,T=Array(_>1?_-1:0),P=1;P<_;P++)T[P-1]=arguments[P];return l.produce(g,(function(w){var xe;return(xe=s).call.apply(xe,[C,w].concat(T))}))}}var u;if(typeof s!="function"&&ne(6),a!==void 0&&typeof a!="function"&&ne(7),ue(i)){var c=aa(n),p=un(n,i,void 0),d=!0;try{u=s(p),d=!1}finally{d?ir(c):ln(c)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(g){return rn(c,a),nn(g,c)}),(function(g){throw ir(c),g})):(rn(c,a),nn(u,c))}if(!i||typeof i!="object"){if((u=s(i))===void 0&&(u=i),u===ya&&(u=void 0),n.D&&hn(u,!0),a){var v=[],m=[];de("Patches").M(i,u,v,m),a(v,m)}return u}ne(21,i)},this.produceWithPatches=function(i,s){if(typeof i=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return n.produceWithPatches(u,(function(v){return i.apply(void 0,[v].concat(p))}))};var a,o,l=n.produce(i,s,(function(u,c){a=u,o=c}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(u){return[u,a,o]})):[l,a,o]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ue(r)||ne(8),ve(r)&&(r=Uo(r));var n=aa(this),i=un(this,r,void 0);return i[D].C=!0,ln(n),i},t.finishDraft=function(r,n){var i=r&&r[D],s=i.A;return rn(s,n),nn(void 0,s)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!pa&&ne(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var a=de("Patches").$;return ve(r)?a(r,n):this.produce(r,(function(o){return a(o,n)}))},e})(),J=new Bo,Fo=J.produce,bp=J.produceWithPatches.bind(J),xp=J.setAutoFreeze.bind(J),Sp=J.setUseProxies.bind(J),Ep=J.applyPatches.bind(J),Ap=J.createDraft.bind(J),Cp=J.finishDraft.bind(J),or=Fo;function He(e){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(e)}function ga(e,t){if(He(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(He(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ba(e){var t=ga(e,"string");return He(t)=="symbol"?t:t+""}function xa(e,t,r){return(t=ba(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sa(Object(r),!0).forEach(function(n){xa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}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 Ea=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},lr={INIT:"@@redux/INIT"+gn(),REPLACE:"@@redux/REPLACE"+gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+gn()}};function Vo(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function bn(e,t,r){var n;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(bn)(e,t)}if(typeof e!="function")throw new Error(K(2));var i=e,s=t,a=[],o=a,l=!1;function u(){o===a&&(o=a.slice())}function c(){if(l)throw new Error(K(3));return s}function p(g){if(typeof g!="function")throw new Error(K(4));if(l)throw new Error(K(5));var C=!0;return u(),o.push(g),function(){if(C){if(l)throw new Error(K(6));C=!1,u();var T=o.indexOf(g);o.splice(T,1),a=null}}}function d(g){if(!Vo(g))throw new Error(K(7));if(typeof g.type>"u")throw new Error(K(8));if(l)throw new Error(K(9));try{l=!0,s=i(s,g)}finally{l=!1}for(var C=a=o,_=0;_<C.length;_++){var T=C[_];T()}return g}function v(g){if(typeof g!="function")throw new Error(K(10));i=g,d({type:lr.REPLACE})}function m(){var g,C=p;return g={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(K(11));function P(){T.next&&T.next(c())}P();var w=C(P);return{unsubscribe:w}}},g[Ea]=function(){return this},g}return d({type:lr.INIT}),n={dispatch:d,subscribe:p,getState:c,replaceReducer:v},n[Ea]=m,n}function Ko(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:lr.INIT});if(typeof n>"u")throw new Error(K(12));if(typeof r(void 0,{type:lr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(K(13))})}function Aa(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var s=Object.keys(r),a,o;try{Ko(r)}catch(l){o=l}return function(u,c){if(u===void 0&&(u={}),o)throw o;if(0)var p;for(var d=!1,v={},m=0;m<s.length;m++){var g=s[m],C=r[g],_=u[g],T=C(_,c);if(typeof T>"u"){var P=c&&c.type;throw new Error(K(14))}v[g]=T,d=d||T!==_}return d=d||s.length!==Object.keys(u).length,d?v:u}}function dt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Ca(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),s=function(){throw new Error(K(15))},a={getState:i.getState,dispatch:function(){return s.apply(void 0,arguments)}},o=t.map(function(l){return l(a)});return s=dt.apply(void 0,o)(i.dispatch),vn(vn({},i),{},{dispatch:s})}}}function Oa(e){var t=function(n){var i=n.dispatch,s=n.getState;return function(a){return function(o){return typeof o=="function"?o(i,s,e):a(o)}}};return t}var _a=Oa();_a.withExtraArgument=Oa;var xn=_a;var Na=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),qo=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ft=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},zo=Object.defineProperty,Wo=Object.defineProperties,Go=Object.getOwnPropertyDescriptors,Ta=Object.getOwnPropertySymbols,Yo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable,Ra=function(e,t,r){return t in e?zo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Re=function(e,t){for(var r in t||(t={}))Yo.call(t,r)&&Ra(e,r,t[r]);if(Ta)for(var n=0,i=Ta(t);n<i.length;n++){var r=i[n];Qo.call(t,r)&&Ra(e,r,t[r])}return e},Sn=function(e,t){return Wo(e,Go(t))},Xo=function(e,t,r){return new Promise(function(n,i){var s=function(l){try{o(r.next(l))}catch(u){i(u)}},a=function(l){try{o(r.throw(l))}catch(u){i(u)}},o=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(s,a)};o((r=r.apply(e,t)).next())})};var Jo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dt:dt.apply(null,arguments)},Fp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Zo(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function we(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var s=t.apply(void 0,n);if(!s)throw new Error("prepareAction did not return an object");return Re(Re({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=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}var el=(function(e){Na(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,ft([void 0],r[0].concat(this)))):new(t.bind.apply(t,ft([void 0],r.concat(this))))},t})(Array),tl=(function(e){Na(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,ft([void 0],r[0].concat(this)))):new(t.bind.apply(t,ft([void 0],r.concat(this))))},t})(Array);function Cn(e){return ue(e)?or(e,function(){}):e}function rl(e){return typeof e=="boolean"}function nl(){return function(t){return il(t)}}function il(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,s=e.serializableCheck,a=s===void 0?!0:s,o=e.actionCreatorCheck,l=o===void 0?!0:o,u=new el;if(r&&(rl(r)?u.push(xn):u.push(xn.withExtraArgument(r.extraArgument))),0){if(i)var c;if(a)var p;if(l)var d}return u}var En=!0;function Da(e){var t=nl(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,s=r.middleware,a=s===void 0?t():s,o=r.devTools,l=o===void 0?!0:o,u=r.preloadedState,c=u===void 0?void 0:u,p=r.enhancers,d=p===void 0?void 0:p,v;if(typeof i=="function")v=i;else if(Zo(i))v=Aa(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=a;if(typeof m=="function"&&(m=m(t),!En&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!En&&m.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=Ca.apply(void 0,m),C=dt;l&&(C=Jo(Re({trace:!En},typeof l=="object"&&l)));var _=new tl(g),T=_;Array.isArray(d)?T=ft([g],d):typeof d=="function"&&(T=d(_));var P=C.apply(void 0,T);return bn(v,c,P)}function Pa(e){var t={},r=[],n,i={addCase:function(s,a){var o=typeof s=="string"?s:s.type;if(!o)throw new Error("`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[o]=a,i},addMatcher:function(s,a){return r.push({matcher:s,reducer:a}),i},addDefaultCase:function(s){return n=s,i}};return e(i),[t,r,n]}function sl(e){return typeof e=="function"}function al(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Pa(t):[t,r,n],s=i[0],a=i[1],o=i[2],l;if(sl(e))l=function(){return Cn(e())};else{var u=Cn(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var v=ft([s[d.type]],a.filter(function(m){var g=m.matcher;return g(d)}).map(function(m){var g=m.reducer;return g}));return v.filter(function(m){return!!m}).length===0&&(v=[o]),v.reduce(function(m,g){if(g)if(ve(m)){var C=m,_=g(C,d);return _===void 0?m:_}else{if(ue(m))return or(m,function(T){return g(T,d)});var _=g(m,d);if(_===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return m},p)}return c.getInitialState=l,c}function ol(e,t){return e+"/"+t}function Ma(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Cn(e.initialState),n=e.reducers||{},i=Object.keys(n),s={},a={},o={};i.forEach(function(c){var p=n[c],d=ol(t,c),v,m;"reducer"in p?(v=p.reducer,m=p.prepare):v=p,s[c]=v,a[d]=v,o[c]=m?we(d,m):we(d)});function l(){var c=typeof e.extraReducers=="function"?Pa(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,v=c[1],m=v===void 0?[]:v,g=c[2],C=g===void 0?void 0:g,_=Re(Re({},d),a);return al(r,function(T){for(var P in _)T.addCase(P,_[P]);for(var w=0,xe=m;w<xe.length;w++){var fe=xe[w];T.addMatcher(fe.matcher,fe.reducer)}C&&T.addDefaultCase(C)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:o,caseReducers:s,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var ll="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ul=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=ll[Math.random()*64|0];return t},cl=["name","message","stack","code"],An=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),wa=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),pl=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=cl;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},zp=(function(){function e(t,r,n){var i=we(t+"/fulfilled",function(c,p,d,v){return{payload:c,meta:Sn(Re({},v||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),s=we(t+"/pending",function(c,p,d){return{payload:void 0,meta:Sn(Re({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),a=we(t+"/rejected",function(c,p,d,v,m){return{payload:v,error:(n&&n.serializeError||pl)(c||"Rejected"),meta:Sn(Re({},m||{}),{arg:d,requestId:p,rejectedWithValue:!!v,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),o=!1,l=typeof AbortController<"u"?AbortController:(function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c})();function u(c){return function(p,d,v){var m=n?.idGenerator?n.idGenerator(c):ul(),g=new l,C,_=!1;function T(w){C=w,g.abort()}var P=(function(){return Xo(this,null,function(){var w,xe,fe,xt,Kn,St,qn;return qo(this,function(ze){switch(ze.label){case 0:return ze.trys.push([0,4,,5]),xt=(w=n?.condition)==null?void 0:w.call(n,c,{getState:d,extra:v}),fl(xt)?[4,xt]:[3,2];case 1:xt=ze.sent(),ze.label=2;case 2:if(xt===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return _=!0,Kn=new Promise(function(se,Et){return g.signal.addEventListener("abort",function(){return Et({name:"AbortError",message:C||"Aborted"})})}),p(s(m,c,(xe=n?.getPendingMeta)==null?void 0:xe.call(n,{requestId:m,arg:c},{getState:d,extra:v}))),[4,Promise.race([Kn,Promise.resolve(r(c,{dispatch:p,getState:d,extra:v,requestId:m,signal:g.signal,abort:T,rejectWithValue:function(se,Et){return new An(se,Et)},fulfillWithValue:function(se,Et){return new wa(se,Et)}})).then(function(se){if(se instanceof An)throw se;return se instanceof wa?i(se.payload,m,c,se.meta):i(se,m,c)})])];case 3:return fe=ze.sent(),[3,5];case 4:return St=ze.sent(),fe=St instanceof An?a(null,m,c,St.payload,St.meta):a(St,m,c),[3,5];case 5:return qn=n&&!n.dispatchConditionRejection&&a.match(fe)&&fe.meta.condition,qn||p(fe),[2,fe]}})})})();return Object.assign(P,{abort:T,requestId:m,arg:c,unwrap:function(){return P.then(dl)}})}}return Object.assign(u,{pending:s,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e})();function dl(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function fl(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ia="listener",ka="completed",Ua="cancelled",Wp="task-"+Ua,Gp="task-"+ka,Yp=Ia+"-"+Ua,Qp=Ia+"-"+ka;var On="listenerMiddleware";var Xp=we(On+"/add"),Jp=we(On+"/removeAll"),Zp=we(On+"/remove");var La,ed=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(La||(La=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},hl=function(e){return function(t){setTimeout(t,e)}},td=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hl(10);ma();var ml=Jt(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),ur=class extends ml(Object){};window.ftReduxStores||(window.ftReduxStores={});var $a=class e extends ur{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,s=window.ftReduxStores[n];if(nr(s))return s;if(i==null)return;let a=Ma({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),o=Da({reducer:(l,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let c=Pt(a.getInitialState());for(let p of u.keeping)c[p]=(l??c)[p];return c}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...u.overwrites};return a.reducer(l,u)}});return window.ftReduxStores[i.name]=new e(a,o,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Zt;let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,a,o)=>{let l=a,u=s[l];return u?(...c)=>{let p=u(...c.map(i));return this.reduxStore.dispatch(p),p}:c=>{this.setState({[l]:i(c)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var cr=class{static format(t,r,n,i,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!s)):this.getIntlDateTime(t,r,n,i,!!s)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,s){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return s?l:i?`${o} ${l}`:o}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 pr=f(E()),yl="ft-app-info",ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};ht.eventName="authentication-change";var Ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ht.eventName="ui-locale-changed";var vl={session:(e,t)=>{(0,pr.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>S.dispatchEvent(new ht(t.payload)),0))}},S=pr.FtReduxStore.get({name:yl,reducers:vl,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Ha=f(E()),dr=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},wd=(0,Ha.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(S)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,s;return((s=(i=this.metadataDescriptors.find(o=>o.key===n))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1)?o=>cr.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return dr([(0,_n.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),dr([(0,_n.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),dr([tn({store:S.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),dr([tn({store:S.name})],t.prototype,"uiLocale",void 0),t});var vr=f(E());var Tn=f(E());var je=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=S.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=S.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var mt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:je.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):je.await()}};var Y=class extends mt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(s,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[l])=>o.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Tn.CacheRegistry,this.cache=t?i.commonCache:new Tn.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 fr=class extends Y{async listMySearches(){let{session:t}=S.getState();return Ws(t,$.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var hr=class extends Y{async listMyBookmarks(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var mr=class extends Y{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=S.getState().session;return!!t?.sessionAuthenticated}};var yr=class extends Y{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=S.getState().session;return!!t?.sessionAuthenticated}};var gl="ft-user-assets",bl={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(re).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:i}=t.payload;wn(e,r,[...Rn(e,r),i]),ja(e,r,1,n),Ba(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;wn(e,r,Rn(e,r).map(i=>i.id===n.id?n:i)),Ba(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;wn(e,r,Rn(e,r).filter(s=>s.id!==i)),ja(e,r,-1,n)}},Fa={[re.SEARCHES]:"savedSearches",[re.BOOKMARKS]:"bookmarks",[re.BOOKS]:void 0,[re.COLLECTIONS]:void 0},Rn=(e,t)=>{var r;let n=Fa[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},wn=(e,t,r)=>{let n=Fa[t];n&&(e[n]=r)},ja=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===re.BOOKMARKS&&n)){let s=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,s+r)}},Ba=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},z=vr.FtReduxStore.get({name:gl,reducers:bl,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(re).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ln=class{constructor(t=new mr,r=new yr){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new hr,this.savedSearchesService=new fr,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=S.getState();(0,vr.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(),z.actions.clearAssetCount(),z.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),z.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),z.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();z.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();z.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&z.getState().assetCounts.allAsset[t]!==r.count&&z.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&z.getState().assetCounts.bookmarkByMap[t]!==r.count&&z.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(z.getState().assetCounts.bookmarkByMap).length!==0;t===re.BOOKMARKS&&r&&z.actions.clearBookmarkCountByMap(),z.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;z.actions.bookmarks(r)}}},xl=new Ln;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xl);var Nn=class{addCommand(t,r=!1){S.commands.add(t,r)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Nn;var ie=f(E());var Va,yt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Sl=Symbol("clearAfterUnitTest"),gr=class extends(0,ie.withEventBus)(Y){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Va]=()=>{this.defaultMessages={},this.cache=new ie.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.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 i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,ie.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,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 i;let s=t.toLowerCase(),a=this.resolveContext(s);return new ie.ParametrizedLabelResolver((i=this.defaultMessages[s])!==null&&i!==void 0?i:{},a).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(i){!(i instanceof ie.CanceledPromiseError)&&r&&console.error(i)}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 i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new yt({loadedContexts:t})),this.dispatchEvent(new yt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new yt({loadedContexts:[t]})),this.dispatchEvent(new yt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ie.delay)(0).then(()=>n()).catch(()=>null)))}};Va=Sl;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends gr{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends gr{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var vt=window.FluidTopicsI18nService,br=window.FluidTopicsCustomI18nService;var Ka=f(E()),Dn=class{highlightHtml(t,r,n){(0,Ka.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Dn;var qa=f(E());var Pn=class{isDate(t){var r,n,i,s;return(s=(i=((n=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(t,r){var n,i,s,a;if(t==null)return"";try{return qa.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:S.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new Pn;var za=f(E());var jt=class{static get(t,r){var n,i;let s=S.getState(),{lang:a,region:o}=(i=(n=s.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new za.SearchPlaceConverter(s.baseUrl,t??20,s.searchInAllLanguagesAllowed,r??`${a}-${o}`)}};var Mn=class{urlToSearchRequest(t){return jt.get().parse(t)}searchRequestToUrl(t){return jt.get().serialize(t)}};window.FluidTopicsUrlService=new Mn;var ge=f(E());var Be=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Be.eventName="change";var In=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))}},Wa=new In;var xr=class e extends ge.WithEventBus{static build(){return new e(window.history,Wa,()=>window.location,!1)}constructor(t,r,n,i){var s,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}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,ge.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Be(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[s,a,o])=>{let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...s,index:l,href:typeof o=="string"?o:(o??this.windowLocation()).href};n.apply(i,[u,a,o]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Be.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Be.eventName,t)}currentItem(){return(0,ge.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,ge.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ge.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,ge.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 i=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,n);)this.hasState(s)&&(i=s),s++;return i}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 i=r??this.currentState.majorStateId,s=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return s==null||s!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=xr.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)});var Ga=f(H());var Ya=Ga.css`
|
|
646
646
|
`;var Xa=f(H()),Z=f(j()),Ke=f(E());var Fe=f(E());function Qa(e,t){let{authenticationRequired:r,session:n}=S.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Sr=class extends mt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var kn=class e extends Fe.FtStateManager{static build(t){return new e(S,t)}constructor(t,r){super(),this.store=t,this.cache=new Fe.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Sr,this.cleanSessionDebouncer=new Fe.Debouncer,this.reloadDebouncer=new Fe.Debouncer(500),this.apiProvider=r??(()=>je.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(ht.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.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",()=>Qa(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var r,n,i,s,a;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((i=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsSearchLanguage((s=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&s!==void 0?s:!1),this.store.actions.uiLanguageSetsReaderLanguage((a=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&a!==void 0?a:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ht(r)))}).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)}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)}},Un=kn.build();var Ve=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Bt=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:i,callbackRef:s}of n){let a=i.deref(),o=s.deref();a===void 0||o===void 0||a.dispatchEvent(new Ve(t.context,a,o,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let s=i.callbacks.get(r);s===void 0&&i.callbacks.set(r,s=new WeakSet),s.has(n)||(s.add(n),i.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 q=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},M=class extends Ke.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.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Un,this.contextRoot=new Bt}render(){return Xa.html`
|
|
647
647
|
<slot></slot>
|
|
648
648
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),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("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>vt.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())}};M.elementDefinitions={};M.styles=Ya;q([(0,Z.property)()],M.prototype,"baseUrl",void 0);q([(0,Z.property)()],M.prototype,"apiIntegrationIdentifier",void 0);q([(0,Z.property)()],M.prototype,"apiIntegrationAppVersion",void 0);q([(0,Z.property)()],M.prototype,"uiLocale",void 0);q([(0,Ke.jsonProperty)(null)],M.prototype,"availableUiLocales",void 0);q([(0,Ke.jsonProperty)(null)],M.prototype,"metadataConfiguration",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"editorMode",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"noCustom",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"openExternalDocumentInNewTab",void 0);q([(0,Z.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],M.prototype,"noCustomComponent",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"withManualResources",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"navigatorOnline",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"forcedOffline",void 0);q([(0,Z.property)({type:Boolean})],M.prototype,"authenticationRequired",void 0);q([(0,Ke.jsonProperty)([])],M.prototype,"messageContexts",void 0);q([(0,Ke.jsonProperty)(void 0)],M.prototype,"session",void 0);var Za=f(E());var Ja={"ft-app-context":M};(0,Za.customElements)(Ja);var Er=class e extends Event{constructor(){super(e.eventName)}};Er.eventName="search-context-clear-all-filters";var eo=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},jn=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},to=Symbol("registerInterval"),$n=Symbol("registerAttempts"),Cl=40,Ol=(0,gt.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var i,s,a;super.willUpdate(n),n.has("neededSearchRequests")&&((i=this.stateManager)===null||i===void 0||i.unregisterComponent(this,(s=n.get("neededSearchRequests"))!==null&&s!==void 0?s:[]),(a=this.stateManager)===null||a===void 0||a.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[$n]=0,this.tryToRegisterToContext(),this[to]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[$n]>Cl?window.clearInterval(this[to]):(this[$n]++,this.dispatchEvent(new jn))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return eo([(0,Hn.state)()],t.prototype,"stateManager",void 0),eo([(0,Hn.state)({hasChanged:gt.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),Ar=class extends Ol(gt.FtLitElementRedux){};var Cr=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?br:vt}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let s=i;return a=>({context:this.name,key:s,custom:this.custom,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...s)=>this.service.resolveMessage(this.name,i,...s)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var bt=f(E());var io=f(j());var Bn=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ro=new Bn;var _l=function(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},Tl=Symbol("i18nAttributes"),Rl=Symbol("i18nListAttributes"),so=Symbol("i18nProperties"),Or=Symbol("i18nContexts"),Ft=Symbol("i18nUnsubs"),Tr=(0,bt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?br:vt}i18n(s){let{context:a,key:o,message:l}=s,{custom:u,args:c,argsProvider:p}=s;if(a&&o){this.hasI18nContext(a)||this.addI18nContext(a,void 0,u);let d=c??(p?p(this):[]);return this.getI18nService(u).resolveMessage(a,o,...d)}return l}async awaitI18n(s){let{context:a,custom:o}=s;return a&&await this.getI18nService(o).prepareContext(a),this.i18n(s)}customI18n(s,a){if(ro.isI18nKey(s)){let[o,l]=s.split(".");return this.i18n({custom:!0,context:o,key:l,...a})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((a,o,l)=>s.has(o)||typeof a.argsProvider=="function"),this.updateI18nProperties(a=>typeof a.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((a,o,l)=>{var u;return((u=l?.context)===null||u===void 0?void 0:u.toLowerCase())===s}),this.updateI18nProperties(a=>a.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var a,o;let l=this,u=(c,p,d)=>d?.context&&d.key&&s(c,p,d)?{...d,message:this.i18n({context:d.context,key:d.key,custom:d.custom,...c})}:d;(a=this[Tl])===null||a===void 0||a.forEach((c,p)=>l[p]=u(c,p,l[p])),(o=this[Rl])===null||o===void 0||o.forEach((c,p)=>{var d;return l[p]=(d=l[p])===null||d===void 0?void 0:d.map(v=>u(c,p,v))})}updateI18nProperties(s){var a;(a=this[so])===null||a===void 0||a.forEach((o,l)=>{s(o,l)&&(this[l]=this.i18n(o))})}addI18nMessages(s,a,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,a,o)}addI18nContext(s,a,o){let l=(typeof s=="string"?s:s.name).toLowerCase();o=typeof s=="string"?o:s.custom,this[Or].set(l,{isCustomContext:o}),this[Ft].has(l)||this[Ft].set(l,this.getI18nService(o).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(o).prepareContext(l,a)}hasI18nContext(s){return this[Or].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Or].forEach((s,a)=>this.addI18nContext(a,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ft].forEach(s=>s()),this[Ft].clear()}}return t=Or,r=Ft,_l([(0,io.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),no=class extends Tr(bt.FtLitElement){},_r=class extends Tr(bt.FtLitElementRedux){};var ao=f(H());var oo=ao.css`
|
|
@@ -44,7 +44,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
44
44
|
input::-webkit-search-results-decoration {
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
|
-
`;var qs={};var ia={};M(ia,{ParametrizedLabelResolver:()=>Hr});var Hr=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,a;e=this.resolvePluralKey(e,r);let i=(a=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((n,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let a=`${String(e)}[\\=${n}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return n(document.documentElement.lang)}catch{return n()}}};var _a={};M(_a,{FtCommandQueue:()=>Wr,FtLitElementRedux:()=>Ke,FtReduxStore:()=>dt,FtStateManager:()=>rr,ReduxWatcher:()=>Ro,clearAllStores:()=>Zp,isFtReduxStore:()=>Yt,redux:()=>Ve,reduxEventListener:()=>up,reduxReactive:()=>dp,watch:()=>Tc,withRedux:()=>Ys});var dp=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},Ve=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:ze,attribute:!1,...e};E(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(l=>l[n]),store:e.store})}},up=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var Wr=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function Yt(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var zr=Symbol("internalReduxEventsUnsubscribers"),at=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),Ys=ee(Symbol("withRedux"),function(t){var e,r,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ot].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[Ot].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ot].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ot].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[at].has(s.store):this[at].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[at].set(s,l.subscribe(()=>this.updateFromStores())),this[zr].set(s,[]),Yt(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,f)=>{if(typeof this[f]=="function"&&(!p.store||l.name===p.store)){let h=m=>this[f](m);l.addEventListener(p.eventName,h),this[zr].get(s).push(()=>l.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[at].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[at].has(s)&&this[at].get(s)(),this[at].delete(s),(l=this[zr].get(s))===null||l===void 0||l.forEach(d=>d()),this[zr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=at,r=Ot,n=zr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ke=class extends Ys(j){};function we(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ze(t){return!!t&&!!t[K]}function Pe(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===xp})(t)||Array.isArray(t)||!!t[oc]||!!(!((e=t.constructor)===null||e===void 0)&&e[oc])||ma(t)||ga(t))}function At(t,e,r){r===void 0&&(r=!1),Jt(t)===0?(r?Object.keys:Qt)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function Jt(t){var e=t[K];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ma(t)?2:ga(t)?3:0}function Xt(t,e){return Jt(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function pp(t,e){return Jt(t)===2?t.get(e):t[e]}function nc(t,e,r){var n=Jt(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function ac(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ma(t){return yp&&t instanceof Map}function ga(t){return bp&&t instanceof Set}function it(t){return t.o||t.t}function ya(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=cc(t);delete e[K];for(var r=Qt(e),n=0;n<r.length;n++){var a=r[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function ba(t,e){return e===void 0&&(e=!1),xa(t)||Ze(t)||!Pe(t)||(Jt(t)>1&&(t.set=t.add=t.clear=t.delete=fp),Object.freeze(t),e&&At(t,(function(r,n){return ba(n,!0)}),!0)),t}function fp(){we(2)}function xa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function $e(t){var e=ha[t];return e||we(18,t),e}function hp(t,e){ha[t]||(ha[t]=e)}function ua(){return jr}function sa(t,e){e&&($e("Patches"),t.u=[],t.s=[],t.v=e)}function Eo(t){pa(t),t.p.forEach(mp),t.p=null}function pa(t){t===jr&&(jr=t.l)}function Xs(t){return jr={p:[],l:jr,h:t,m:!0,_:0}}function mp(t){var e=t[K];e.i===0||e.i===1?e.j():e.g=!0}function ca(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||$e("ES5").S(e,t,n),n?(r[K].P&&(Eo(e),we(4)),Pe(t)&&(t=Co(e,t),e.l||Oo(e,t)),e.u&&$e("Patches").M(r[K].t,t,e.u,e.s)):t=Co(e,r,[]),Eo(e),e.u&&e.v(e.u,e.s),t!==sc?t:void 0}function Co(t,e,r){if(xa(e))return e;var n=e[K];if(!n)return At(e,(function(l,d){return Qs(t,n,e,l,d,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return Oo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ya(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),At(i,(function(l,d){return Qs(t,n,a,l,d,r,s)})),Oo(t,a,!1),r&&t.u&&$e("Patches").N(n,r,t.u,t.s)}return n.o}function Qs(t,e,r,n,a,i,s){if(Ze(a)){var l=Co(t,a,i&&e&&e.i!==3&&!Xt(e.R,n)?i.concat(n):void 0);if(nc(r,n,l),!Ze(l))return;t.m=!1}else s&&r.add(a);if(Pe(a)&&!xa(a)){if(!t.h.D&&t._<1)return;Co(t,a),e&&e.A.l||Oo(t,a)}}function Oo(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ba(e,r)}function la(t,e){var r=t[K];return(r?it(r):t)[e]}function Js(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function st(t){t.P||(t.P=!0,t.l&&st(t.l))}function da(t){t.o||(t.o=ya(t.t))}function fa(t,e,r){var n=ma(e)?$e("MapSet").F(e,r):ga(e)?$e("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ua(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=l,p=Vr;s&&(d=[l],p=Gr);var f=Proxy.revocable(d,p),h=f.revoke,m=f.proxy;return l.k=m,l.j=h,m})(e,r):$e("ES5").J(e,r);return(r?r.A:ua()).p.push(n),n}function gp(t){return Ze(t)||we(22,t),(function e(r){if(!Pe(r))return r;var n,a=r[K],i=Jt(r);if(a){if(!a.P&&(a.i<4||!$e("ES5").K(a)))return a.t;a.I=!0,n=ec(r,i),a.I=!1}else n=ec(r,i);return At(n,(function(s,l){a&&pp(a.t,s)===l||nc(n,s,e(l))})),i===3?new Set(n):n})(t)}function ec(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ya(t)}function ic(){function t(s,l){var d=i[s];return d?d.enumerable=l:i[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[K];return Vr.get(p,s)},set:function(p){var f=this[K];Vr.set(f,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][K];if(!d.P)switch(d.i){case 5:n(d)&&st(d);break;case 4:r(d)&&st(d)}}}function r(s){for(var l=s.t,d=s.k,p=Qt(d),f=p.length-1;f>=0;f--){var h=p[f];if(h!==K){var m=l[h];if(m===void 0&&!Xt(l,h))return!0;var y=d[h],g=y&&y[K];if(g?g.t!==m:!ac(y,m))return!0}}var v=!!l[K];return p.length!==Qt(l).length+(v?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&we(3,JSON.stringify(it(s)))}var i={};hp("ES5",{J:function(s,l){var d=Array.isArray(s),p=(function(h,m){if(h){for(var y=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(y,""+g,t(g,!0));return y}var v=cc(m);delete v[K];for(var C=Qt(v),O=0;O<C.length;O++){var w=C[O];v[w]=t(w,h||!!v[w].enumerable)}return Object.create(Object.getPrototypeOf(m),v)})(d,s),f={i:d?5:4,A:l?l.A:ua(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,K,{value:f,writable:!0}),p},S:function(s,l,d){d?Ze(l)&&l[K].A===s&&e(s.p):(s.u&&(function p(f){if(f&&typeof f=="object"){var h=f[K];if(h){var m=h.t,y=h.k,g=h.R,v=h.i;if(v===4)At(y,(function(b){b!==K&&(m[b]!==void 0||Xt(m,b)?g[b]||p(y[b]):(g[b]=!0,st(h)))})),At(m,(function(b){y[b]!==void 0||Xt(y,b)||(g[b]=!1,st(h))}));else if(v===5){if(n(h)&&(st(h),g.length=!0),y.length<m.length)for(var C=y.length;C<m.length;C++)g[C]=!1;else for(var O=m.length;O<y.length;O++)g[O]=!0;for(var w=Math.min(y.length,m.length),x=0;x<w;x++)y.hasOwnProperty(x)||(g[x]=!0),g[x]===void 0&&p(y[x])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var tc,jr,va=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yp=typeof Map<"u",bp=typeof Set<"u",rc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",sc=va?Symbol.for("immer-nothing"):((tc={})["immer-nothing"]=!0,tc),oc=va?Symbol.for("immer-draftable"):"__$immer_draftable",K=va?Symbol.for("immer-state"):"__$immer_state";var xp=""+Object.prototype.constructor,Qt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,cc=Object.getOwnPropertyDescriptors||function(t){var e={};return Qt(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},ha={},Vr={get:function(t,e){if(e===K)return t;var r=it(t);if(!Xt(r,e))return(function(a,i,s){var l,d=Js(i,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(a.k):void 0})(t,r,e);var n=r[e];return t.I||!Pe(n)?n:n===la(t.t,e)?(da(t),t.o[e]=fa(t.A.h,n,t)):n},has:function(t,e){return e in it(t)},ownKeys:function(t){return Reflect.ownKeys(it(t))},set:function(t,e,r){var n=Js(it(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=la(it(t),e),i=a?.[K];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ac(r,a)&&(r!==void 0||Xt(t.t,e)))return!0;da(t),st(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return la(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,da(t),st(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=it(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){we(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){we(12)}},Gr={};At(Vr,(function(t,e){Gr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Gr.deleteProperty=function(t,e){return Gr.set.call(this,t,e,void 0)},Gr.set=function(t,e,r){return Vr.set.call(this,t[0],e,r,t[0])};var vp=(function(){function t(r){var n=this;this.O=rc,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var d=n;return function(v){var C=this;v===void 0&&(v=l);for(var O=arguments.length,w=Array(O>1?O-1:0),x=1;x<O;x++)w[x-1]=arguments[x];return d.produce(v,(function(b){var S;return(S=i).call.apply(S,[C,b].concat(w))}))}}var p;if(typeof i!="function"&&we(6),s!==void 0&&typeof s!="function"&&we(7),Pe(a)){var f=Xs(n),h=fa(n,a,void 0),m=!0;try{p=i(h),m=!1}finally{m?Eo(f):pa(f)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(v){return sa(f,s),ca(v,f)}),(function(v){throw Eo(f),v})):(sa(f,s),ca(p,f))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===sc&&(p=void 0),n.D&&ba(p,!0),s){var y=[],g=[];$e("Patches").M(a,p,y,g),s(y,g)}return p}we(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var f=arguments.length,h=Array(f>1?f-1:0),m=1;m<f;m++)h[m-1]=arguments[m];return n.produceWithPatches(p,(function(y){return a.apply(void 0,[y].concat(h))}))};var s,l,d=n.produce(a,i,(function(p,f){s=p,l=f}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(p){return[p,s,l]})):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Pe(r)||we(8),Ze(r)&&(r=gp(r));var n=Xs(this),a=fa(this,r,void 0);return a[K].C=!0,pa(n),a},e.finishDraft=function(r,n){var a=r&&r[K],i=a.A;return sa(i,n),ca(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!rc&&we(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=$e("Patches").$;return Ze(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),ge=new vp,Sp=ge.produce,mx=ge.produceWithPatches.bind(ge),gx=ge.setAutoFreeze.bind(ge),yx=ge.setUseProxies.bind(ge),bx=ge.applyPatches.bind(ge),xx=ge.createDraft.bind(ge),vx=ge.finishDraft.bind(ge),Ao=Sp;function wt(t){"@babel/helpers - typeof";return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(t)}function lc(t,e){if(wt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dc(t){var e=lc(t,"string");return wt(e)=="symbol"?e:e+""}function uc(t,e,r){return(e=dc(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Sa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pc(Object(r),!0).forEach(function(n){uc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ae(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var fc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ea=function(){return Math.random().toString(36).substring(7).split("").join(".")},wo={INIT:"@@redux/INIT"+Ea(),REPLACE:"@@redux/REPLACE"+Ea(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ea()}};function Ep(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ca(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ae(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ae(1));return r(Ca)(t,e)}if(typeof t!="function")throw new Error(ae(2));var a=t,i=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function f(){if(d)throw new Error(ae(3));return i}function h(v){if(typeof v!="function")throw new Error(ae(4));if(d)throw new Error(ae(5));var C=!0;return p(),l.push(v),function(){if(C){if(d)throw new Error(ae(6));C=!1,p();var w=l.indexOf(v);l.splice(w,1),s=null}}}function m(v){if(!Ep(v))throw new Error(ae(7));if(typeof v.type>"u")throw new Error(ae(8));if(d)throw new Error(ae(9));try{d=!0,i=a(i,v)}finally{d=!1}for(var C=s=l,O=0;O<C.length;O++){var w=C[O];w()}return v}function y(v){if(typeof v!="function")throw new Error(ae(10));a=v,m({type:wo.REPLACE})}function g(){var v,C=h;return v={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(ae(11));function x(){w.next&&w.next(f())}x();var b=C(x);return{unsubscribe:b}}},v[fc]=function(){return this},v}return m({type:wo.INIT}),n={dispatch:m,subscribe:h,getState:f,replaceReducer:y},n[fc]=g,n}function Cp(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:wo.INIT});if(typeof n>"u")throw new Error(ae(12));if(typeof r(void 0,{type:wo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ae(13))})}function hc(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{Cp(r)}catch(d){l=d}return function(p,f){if(p===void 0&&(p={}),l)throw l;if(0)var h;for(var m=!1,y={},g=0;g<i.length;g++){var v=i[g],C=r[v],O=p[v],w=C(O,f);if(typeof w>"u"){var x=f&&f.type;throw new Error(ae(14))}y[v]=w,m=m||w!==O}return m=m||i.length!==Object.keys(p).length,m?y:p}}function er(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function mc(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(ae(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return i=er.apply(void 0,l)(a.dispatch),Sa(Sa({},a),{},{dispatch:i})}}}function gc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var yc=gc();yc.withExtraArgument=gc;var Oa=yc;var Ec=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Op=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(f){return d([p,f])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(f){p=[6,f],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},tr=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},Ap=Object.defineProperty,wp=Object.defineProperties,Rp=Object.getOwnPropertyDescriptors,bc=Object.getOwnPropertySymbols,Lp=Object.prototype.hasOwnProperty,Tp=Object.prototype.propertyIsEnumerable,xc=function(t,e,r){return e in t?Ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ct=function(t,e){for(var r in e||(e={}))Lp.call(e,r)&&xc(t,r,e[r]);if(bc)for(var n=0,a=bc(e);n<a.length;n++){var r=a[n];Tp.call(e,r)&&xc(t,r,e[r])}return t},Aa=function(t,e){return wp(t,Rp(e))},_p=function(t,e,r){return new Promise(function(n,a){var i=function(d){try{l(r.next(d))}catch(p){a(p)}},s=function(d){try{l(r.throw(d))}catch(p){a(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,s)};l((r=r.apply(t,e)).next())})};var Pp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},Bx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ip(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function lt(t,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return ct(ct({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Np=(function(t){Ec(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,tr([void 0],r[0].concat(this)))):new(e.bind.apply(e,tr([void 0],r.concat(this))))},e})(Array),kp=(function(t){Ec(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,tr([void 0],r[0].concat(this)))):new(e.bind.apply(e,tr([void 0],r.concat(this))))},e})(Array);function La(t){return Pe(t)?Ao(t,function(){}):t}function Dp(t){return typeof t=="boolean"}function Mp(){return function(e){return Up(e)}}function Up(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,l=t.actionCreatorCheck,d=l===void 0?!0:l,p=new Np;if(r&&(Dp(r)?p.push(Oa):p.push(Oa.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var h;if(d)var m}return p}var wa=!0;function Cc(t){var e=Mp(),r=t||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?e():i,l=r.devTools,d=l===void 0?!0:l,p=r.preloadedState,f=p===void 0?void 0:p,h=r.enhancers,m=h===void 0?void 0:h,y;if(typeof a=="function")y=a;else if(Ip(a))y=hc(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=s;if(typeof g=="function"&&(g=g(e),!wa&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wa&&g.some(function(b){return typeof b!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=mc.apply(void 0,g),C=er;d&&(C=Pp(ct({trace:!wa},typeof d=="object"&&d)));var O=new kp(v),w=O;Array.isArray(m)?w=tr([v],m):typeof m=="function"&&(w=m(O));var x=C.apply(void 0,w);return Ca(y,f,x)}function Oc(t){var e={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,r,n]}function Bp(t){return typeof t=="function"}function Fp(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?Oc(e):[e,r,n],i=a[0],s=a[1],l=a[2],d;if(Bp(t))d=function(){return La(t())};else{var p=La(t);d=function(){return p}}function f(h,m){h===void 0&&(h=d());var y=tr([i[m.type]],s.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return y.filter(function(g){return!!g}).length===0&&(y=[l]),y.reduce(function(g,v){if(v)if(Ze(g)){var C=g,O=v(C,m);return O===void 0?g:O}else{if(Pe(g))return Ao(g,function(w){return v(w,m)});var O=v(g,m);if(O===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return g},h)}return f.getInitialState=d,f}function $p(t,e){return t+"/"+e}function Ac(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:La(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(f){var h=n[f],m=$p(e,f),y,g;"reducer"in h?(y=h.reducer,g=h.prepare):y=h,i[f]=y,s[m]=y,l[f]=g?lt(m,g):lt(m)});function d(){var f=typeof t.extraReducers=="function"?Oc(t.extraReducers):[t.extraReducers],h=f[0],m=h===void 0?{}:h,y=f[1],g=y===void 0?[]:y,v=f[2],C=v===void 0?void 0:v,O=ct(ct({},m),s);return Fp(r,function(w){for(var x in O)w.addCase(x,O[x]);for(var b=0,S=g;b<S.length;b++){var R=S[b];w.addMatcher(R.matcher,R.reducer)}C&&w.addDefaultCase(C)})}var p;return{name:e,reducer:function(f,h){return p||(p=d()),p(f,h)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Hp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wp=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Hp[Math.random()*64|0];return e},zp=["name","message","stack","code"],Ra=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),vc=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Gp=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=zp;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Wx=(function(){function t(e,r,n){var a=lt(e+"/fulfilled",function(f,h,m,y){return{payload:f,meta:Aa(ct({},y||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),i=lt(e+"/pending",function(f,h,m){return{payload:void 0,meta:Aa(ct({},m||{}),{arg:h,requestId:f,requestStatus:"pending"})}}),s=lt(e+"/rejected",function(f,h,m,y,g){return{payload:y,error:(n&&n.serializeError||Gp)(f||"Rejected"),meta:Aa(ct({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:(function(){function f(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return f.prototype.abort=function(){},f})();function p(f){return function(h,m,y){var g=n?.idGenerator?n.idGenerator(f):Wp(),v=new d,C,O=!1;function w(b){C=b,v.abort()}var x=(function(){return _p(this,null,function(){var b,S,R,I,Y,H,L;return Op(this,function(P){switch(P.label){case 0:return P.trys.push([0,4,,5]),I=(b=n?.condition)==null?void 0:b.call(n,f,{getState:m,extra:y}),Vp(I)?[4,I]:[3,2];case 1:I=P.sent(),P.label=2;case 2:if(I===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return O=!0,Y=new Promise(function(F,Q){return v.signal.addEventListener("abort",function(){return Q({name:"AbortError",message:C||"Aborted"})})}),h(i(g,f,(S=n?.getPendingMeta)==null?void 0:S.call(n,{requestId:g,arg:f},{getState:m,extra:y}))),[4,Promise.race([Y,Promise.resolve(r(f,{dispatch:h,getState:m,extra:y,requestId:g,signal:v.signal,abort:w,rejectWithValue:function(F,Q){return new Ra(F,Q)},fulfillWithValue:function(F,Q){return new vc(F,Q)}})).then(function(F){if(F instanceof Ra)throw F;return F instanceof vc?a(F.payload,g,f,F.meta):a(F,g,f)})])];case 3:return R=P.sent(),[3,5];case 4:return H=P.sent(),R=H instanceof Ra?s(null,g,f,H.payload,H.meta):s(H,g,f),[3,5];case 5:return L=n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition,L||h(R),[2,R]}})})})();return Object.assign(x,{abort:w,requestId:g,arg:f,unwrap:function(){return x.then(jp)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function jp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Vp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var wc="listener",Rc="completed",Lc="cancelled",zx="task-"+Lc,Gx="task-"+Rc,jx=wc+"-"+Lc,Vx=wc+"-"+Rc;var Ta="listenerMiddleware";var Kx=lt(Ta+"/add"),Zx=lt(Ta+"/removeAll"),qx=lt(Ta+"/remove");var Sc,Yx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Sc||(Sc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Kp=function(t){return function(e){setTimeout(e,t)}},Xx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Kp(10);ic();window.ftReduxStores||(window.ftReduxStores={});var dt=class t extends Ge{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Yt(i))return i;if(a==null)return;let s=Ac({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Cc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=Ee(s.getInitialState());for(let h of p.keeping)f[h]=(d??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Wr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,p=i[d];return p?(...f)=>{let h=p(...f.map(a));return this.reduxStore.dispatch(h),h}:f=>{this.setState({[d]:a(f)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Zp(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Yt(e)&&e.clear()}var Ro=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);ze(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Tc(t,e,r){return new Ro(t,e,r).watch()}var rr=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Na={};M(Na,{scrollHelper:()=>qp});var Pa,Lo=new Map,Ia=class{lock(e,r){if(r){let n=Lo.get(r);if(n==null||n===e)return Lo.set(r,e),r}}release(e,r){r&&Lo.get(r)===e&&Lo.delete(r)}findFirstScrollableParent(e){var r;let n,a;for(let i of yn(e)){let s=i,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&a==null&&(a=s)}return(r=n??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var n,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(n=r.offsetTop)!==null&&n!==void 0?n:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let a=this.getAbsoluteScrollOffset(n,e),i=a-n.clientHeight+e.clientHeight,s=a,l=rt(0,(s-n.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,l)*(i-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(Pa=window.FluidTopicsScrollHelper)!==null&&Pa!==void 0?Pa:new Ia;var qp=window.FluidTopicsScrollHelper;var Da={};M(Da,{SearchPlaceConverter:()=>nr,SearchPlaceQueryParams:()=>k,isSearchPlaceQueryParams:()=>gl,serializeRequest:()=>Qp});var _c;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(_c||(_c={}));var Pc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Pc||(Pc={}));var Ic;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ic||(Ic={}));var Nc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Nc||(Nc={}));var kc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(kc||(kc={}));var Dc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Dc||(Dc={}));var Mc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Mc||(Mc={}));var Uc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Uc||(Uc={}));var Bc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Bc||(Bc={}));var Fc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Fc||(Fc={}));var $c;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})($c||($c={}));var Hc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Hc||(Hc={}));var Wc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Wc||(Wc={}));var zc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(zc||(zc={}));var Gc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Gc||(Gc={}));var jc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(jc||(jc={}));var Rt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Rt||(Rt={}));var Vc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Vc||(Vc={}));var Kc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Kc||(Kc={}));var To;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(To||(To={}));var el=t=>Object.keys(To).includes(t);var Zc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Zc||(Zc={}));var qc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(qc||(qc={}));var Yc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Yc||(Yc={}));var or;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(or||(or={}));var tl=t=>Object.keys(or).includes(t);var Xc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Xc||(Xc={}));var ka;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ka||(ka={}));var Qc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Qc||(Qc={}));var X;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(X||(X={}));var Re;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Re||(Re={}));var Jc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Jc||(Jc={}));var rl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(rl||(rl={}));var ol;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ol||(ol={}));var nl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(nl||(nl={}));var al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(al||(al={}));var il;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(il||(il={}));var sl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(sl||(sl={}));var cl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(cl||(cl={}));var ll;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(ll||(ll={}));var dl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(dl||(dl={}));var ul;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ul||(ul={}));var pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(pl||(pl={}));var Yp={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function fl(t,e){return t===e||(Yp[t]??[]).some(r=>fl(r,e))}function hl(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>fl(n,e))}function Xp(t){return`"${t}"`}function ml(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Qp(t,e){return new nr(t).serialize(e)}var k;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(k||(k={}));var Jp=new Set(Object.values(k));function gl(t){return Jp.has(t)}var nr=class{constructor(e,r=20,n=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=n,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let n=r==null||r.trim().length===0,a=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var n,a,i,s,l,d,p,f,h,m,y;let g=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&g.append(k.LOCALE,e.contentLocale):g.append(k.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&g.append(k.QUERY,e.query);let v=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(b=>b.valueFilter&&!b.valueFilter.negative))!==null&&i!==void 0?i:[];if(v.length>0){let b=v.map(S=>{var R,I;let Y=((I=(R=S.valueFilter)===null||R===void 0?void 0:R.values)!==null&&I!==void 0?I:[]).map(H=>this.escapeFilters(H)).map(H=>Xp(ml(H))).join("_");return`${S.key}~${Y}`}).join("*");g.append(k.VALUE_FILTERS,b)}let C=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(b=>b.dateFilter))!==null&&l!==void 0?l:[];if(C.length>0){let b=C.map(S=>{var R;return`${S.key}~${(R=S.dateFilter)===null||R===void 0?void 0:R.type.toLowerCase()}`}).join("*");g.append(k.DATE_FILTERS,b)}let O=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(b=>b.rangeFilter))!==null&&p!==void 0?p:[];if(O.length>0){let b=O.map(S=>{var R,I;return`${S.key}~${(R=S.rangeFilter)===null||R===void 0?void 0:R.from}_${(I=S.rangeFilter)===null||I===void 0?void 0:I.to}`}).join("*");g.append(k.RANGE_FILTERS,b)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&g.append(k.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&g.append(k.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&g.append(k.SORT,e.sortId),!((f=e.paging)===null||f===void 0)&&f.perPage&&((m=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&g.append(k.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&g.append(k.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let w=(y=e.otherQueryParams)!==null&&y!==void 0?y:{};for(let b in w)g.append(b,w[b]);let x=new Array;return g.forEach((b,S)=>{x.push(this.encodeQueryString(S)+"="+this.encodeQueryString(b))}),encodeURI(x.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let n=e.split("?"),a=this.fromURLSearchParams(n.slice(1).join("?")),i=n[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,n,a,i,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(O){console.warn("Could not decode search request query params, fallback on raw value",O)}let d=new URLSearchParams(e),p=d.get(k.LOCALE)==="all"?void 0:d.get(k.LOCALE),f=((r=d.get(k.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(n=d.get(k.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(a=d.get(k.SCOPE))!==null&&a!==void 0?a:"default",y=+((i=d.get(k.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),g=d.get(k.KEYWORD_MATCH),v=g?g.toUpperCase()===Rt.MANDATORY?Rt.MANDATORY:Rt.OPTIONAL:void 0,C={};for(let O of d.keys())gl(O)||(C[O]=d.get(O));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(k.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:el(f)?f:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:rt(1,isNaN(y)?this.defaultPerPage:y,1e3)},keywordMatch:v,otherQueryParams:C}}parseCompatFilters(e){var r,n,a,i,s,l;let d=[];return e.has(k.FILTERS)&&(d=this.parseValueFilters((r=e.get(k.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(k.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(k.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(k.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(k.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(k.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(ml).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:or[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,n,a]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,a]of this.filtersEscapeMapping)e=e.replaceAll(n,a);return e}unescapeFilterValue(e){for(let[r,n,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(tl(e))return[{key:"ft:lastEdition",dateFilter:{type:or[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[k.LOCALE,k.FILTERS,k.VALUE_FILTERS,k.DATE_FILTERS,k.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let n=new URL(e);return n.searchParams.delete(k.LOCALE),r!==void 0&&n.searchParams.append(k.LOCALE,r),n.toString()}};var Ua={};M(Ua,{toFtFormComponent:()=>ef});var Ma=Symbol("elementInternals"),ef=ee(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ma].form}constructor(...n){super(n),this[Ma]=this.attachInternals()}setFormValue(n){this[Ma].setFormValue(n)}}return e});var Ba={};M(Ba,{DateFormatter:()=>Lt});var Lt=class{static format(e,r,n,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,r,n,a,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var $a={};M($a,{ALL_KEYS_VALUE:()=>Fa,SameWindowStorageEvent:()=>ar});var Fa="__all__",ar=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Fa}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new ar(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new ar(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new ar(Fa))}});var Wa={};M(Wa,{FocusMainContentEvent:()=>Ha});var Ha=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var yl={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function tf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function rf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",tf);document.addEventListener("click",rf);var bl=_`
|
|
47
|
+
`;var qs={};var ia={};M(ia,{ParametrizedLabelResolver:()=>Hr});var Hr=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,a;e=this.resolvePluralKey(e,r);let i=(a=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((n,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let a=`${String(e)}[\\=${n}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let n=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return n(document.documentElement.lang)}catch{return n()}}};var _a={};M(_a,{FtCommandQueue:()=>Wr,FtLitElementRedux:()=>Ke,FtReduxStore:()=>dt,FtStateManager:()=>rr,ReduxWatcher:()=>Ro,clearAllStores:()=>Zp,isFtReduxStore:()=>Yt,redux:()=>Ve,reduxEventListener:()=>up,reduxReactive:()=>dp,watch:()=>Tc,withRedux:()=>Ys});var dp=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},Ve=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:ze,attribute:!1,...e};E(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(l=>l[n]),store:e.store})}},up=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var Wr=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function Yt(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var zr=Symbol("internalReduxEventsUnsubscribers"),at=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),Ys=ee(Symbol("withRedux"),function(t){var e,r,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ot].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[Ot].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ot].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ot].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[at].has(s.store):this[at].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[at].set(s,l.subscribe(()=>this.updateFromStores())),this[zr].set(s,[]),Yt(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,f)=>{if(typeof this[f]=="function"&&(!p.store||l.name===p.store)){let h=m=>this[f](m);l.addEventListener(p.eventName,h),this[zr].get(s).push(()=>l.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[at].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[at].has(s)&&this[at].get(s)(),this[at].delete(s),(l=this[zr].get(s))===null||l===void 0||l.forEach(d=>d()),this[zr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=at,r=Ot,n=zr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ke=class extends Ys(j){};function we(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ze(t){return!!t&&!!t[K]}function Pe(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===xp})(t)||Array.isArray(t)||!!t[oc]||!!(!((e=t.constructor)===null||e===void 0)&&e[oc])||ma(t)||ga(t))}function At(t,e,r){r===void 0&&(r=!1),Jt(t)===0?(r?Object.keys:Qt)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function Jt(t){var e=t[K];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ma(t)?2:ga(t)?3:0}function Xt(t,e){return Jt(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function pp(t,e){return Jt(t)===2?t.get(e):t[e]}function nc(t,e,r){var n=Jt(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function ac(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ma(t){return yp&&t instanceof Map}function ga(t){return bp&&t instanceof Set}function it(t){return t.o||t.t}function ya(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=cc(t);delete e[K];for(var r=Qt(e),n=0;n<r.length;n++){var a=r[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function ba(t,e){return e===void 0&&(e=!1),xa(t)||Ze(t)||!Pe(t)||(Jt(t)>1&&(t.set=t.add=t.clear=t.delete=fp),Object.freeze(t),e&&At(t,(function(r,n){return ba(n,!0)}),!0)),t}function fp(){we(2)}function xa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function $e(t){var e=ha[t];return e||we(18,t),e}function hp(t,e){ha[t]||(ha[t]=e)}function ua(){return jr}function sa(t,e){e&&($e("Patches"),t.u=[],t.s=[],t.v=e)}function Eo(t){pa(t),t.p.forEach(mp),t.p=null}function pa(t){t===jr&&(jr=t.l)}function Xs(t){return jr={p:[],l:jr,h:t,m:!0,_:0}}function mp(t){var e=t[K];e.i===0||e.i===1?e.j():e.g=!0}function ca(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||$e("ES5").S(e,t,n),n?(r[K].P&&(Eo(e),we(4)),Pe(t)&&(t=Co(e,t),e.l||Oo(e,t)),e.u&&$e("Patches").M(r[K].t,t,e.u,e.s)):t=Co(e,r,[]),Eo(e),e.u&&e.v(e.u,e.s),t!==sc?t:void 0}function Co(t,e,r){if(xa(e))return e;var n=e[K];if(!n)return At(e,(function(l,d){return Qs(t,n,e,l,d,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return Oo(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ya(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),At(i,(function(l,d){return Qs(t,n,a,l,d,r,s)})),Oo(t,a,!1),r&&t.u&&$e("Patches").N(n,r,t.u,t.s)}return n.o}function Qs(t,e,r,n,a,i,s){if(Ze(a)){var l=Co(t,a,i&&e&&e.i!==3&&!Xt(e.R,n)?i.concat(n):void 0);if(nc(r,n,l),!Ze(l))return;t.m=!1}else s&&r.add(a);if(Pe(a)&&!xa(a)){if(!t.h.D&&t._<1)return;Co(t,a),e&&e.A.l||Oo(t,a)}}function Oo(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&ba(e,r)}function la(t,e){var r=t[K];return(r?it(r):t)[e]}function Js(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function st(t){t.P||(t.P=!0,t.l&&st(t.l))}function da(t){t.o||(t.o=ya(t.t))}function fa(t,e,r){var n=ma(e)?$e("MapSet").F(e,r):ga(e)?$e("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ua(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=l,p=Vr;s&&(d=[l],p=Gr);var f=Proxy.revocable(d,p),h=f.revoke,m=f.proxy;return l.k=m,l.j=h,m})(e,r):$e("ES5").J(e,r);return(r?r.A:ua()).p.push(n),n}function gp(t){return Ze(t)||we(22,t),(function e(r){if(!Pe(r))return r;var n,a=r[K],i=Jt(r);if(a){if(!a.P&&(a.i<4||!$e("ES5").K(a)))return a.t;a.I=!0,n=ec(r,i),a.I=!1}else n=ec(r,i);return At(n,(function(s,l){a&&pp(a.t,s)===l||nc(n,s,e(l))})),i===3?new Set(n):n})(t)}function ec(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ya(t)}function ic(){function t(s,l){var d=i[s];return d?d.enumerable=l:i[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[K];return Vr.get(p,s)},set:function(p){var f=this[K];Vr.set(f,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][K];if(!d.P)switch(d.i){case 5:n(d)&&st(d);break;case 4:r(d)&&st(d)}}}function r(s){for(var l=s.t,d=s.k,p=Qt(d),f=p.length-1;f>=0;f--){var h=p[f];if(h!==K){var m=l[h];if(m===void 0&&!Xt(l,h))return!0;var y=d[h],g=y&&y[K];if(g?g.t!==m:!ac(y,m))return!0}}var v=!!l[K];return p.length!==Qt(l).length+(v?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&we(3,JSON.stringify(it(s)))}var i={};hp("ES5",{J:function(s,l){var d=Array.isArray(s),p=(function(h,m){if(h){for(var y=Array(m.length),g=0;g<m.length;g++)Object.defineProperty(y,""+g,t(g,!0));return y}var v=cc(m);delete v[K];for(var C=Qt(v),O=0;O<C.length;O++){var w=C[O];v[w]=t(w,h||!!v[w].enumerable)}return Object.create(Object.getPrototypeOf(m),v)})(d,s),f={i:d?5:4,A:l?l.A:ua(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,K,{value:f,writable:!0}),p},S:function(s,l,d){d?Ze(l)&&l[K].A===s&&e(s.p):(s.u&&(function p(f){if(f&&typeof f=="object"){var h=f[K];if(h){var m=h.t,y=h.k,g=h.R,v=h.i;if(v===4)At(y,(function(b){b!==K&&(m[b]!==void 0||Xt(m,b)?g[b]||p(y[b]):(g[b]=!0,st(h)))})),At(m,(function(b){y[b]!==void 0||Xt(y,b)||(g[b]=!1,st(h))}));else if(v===5){if(n(h)&&(st(h),g.length=!0),y.length<m.length)for(var C=y.length;C<m.length;C++)g[C]=!1;else for(var O=m.length;O<y.length;O++)g[O]=!0;for(var w=Math.min(y.length,m.length),x=0;x<w;x++)y.hasOwnProperty(x)||(g[x]=!0),g[x]===void 0&&p(y[x])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var tc,jr,va=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yp=typeof Map<"u",bp=typeof Set<"u",rc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",sc=va?Symbol.for("immer-nothing"):((tc={})["immer-nothing"]=!0,tc),oc=va?Symbol.for("immer-draftable"):"__$immer_draftable",K=va?Symbol.for("immer-state"):"__$immer_state";var xp=""+Object.prototype.constructor,Qt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,cc=Object.getOwnPropertyDescriptors||function(t){var e={};return Qt(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},ha={},Vr={get:function(t,e){if(e===K)return t;var r=it(t);if(!Xt(r,e))return(function(a,i,s){var l,d=Js(i,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(a.k):void 0})(t,r,e);var n=r[e];return t.I||!Pe(n)?n:n===la(t.t,e)?(da(t),t.o[e]=fa(t.A.h,n,t)):n},has:function(t,e){return e in it(t)},ownKeys:function(t){return Reflect.ownKeys(it(t))},set:function(t,e,r){var n=Js(it(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=la(it(t),e),i=a?.[K];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ac(r,a)&&(r!==void 0||Xt(t.t,e)))return!0;da(t),st(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return la(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,da(t),st(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=it(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){we(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){we(12)}},Gr={};At(Vr,(function(t,e){Gr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Gr.deleteProperty=function(t,e){return Gr.set.call(this,t,e,void 0)},Gr.set=function(t,e,r){return Vr.set.call(this,t[0],e,r,t[0])};var vp=(function(){function t(r){var n=this;this.O=rc,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var d=n;return function(v){var C=this;v===void 0&&(v=l);for(var O=arguments.length,w=Array(O>1?O-1:0),x=1;x<O;x++)w[x-1]=arguments[x];return d.produce(v,(function(b){var S;return(S=i).call.apply(S,[C,b].concat(w))}))}}var p;if(typeof i!="function"&&we(6),s!==void 0&&typeof s!="function"&&we(7),Pe(a)){var f=Xs(n),h=fa(n,a,void 0),m=!0;try{p=i(h),m=!1}finally{m?Eo(f):pa(f)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(v){return sa(f,s),ca(v,f)}),(function(v){throw Eo(f),v})):(sa(f,s),ca(p,f))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===sc&&(p=void 0),n.D&&ba(p,!0),s){var y=[],g=[];$e("Patches").M(a,p,y,g),s(y,g)}return p}we(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var f=arguments.length,h=Array(f>1?f-1:0),m=1;m<f;m++)h[m-1]=arguments[m];return n.produceWithPatches(p,(function(y){return a.apply(void 0,[y].concat(h))}))};var s,l,d=n.produce(a,i,(function(p,f){s=p,l=f}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(p){return[p,s,l]})):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Pe(r)||we(8),Ze(r)&&(r=gp(r));var n=Xs(this),a=fa(this,r,void 0);return a[K].C=!0,pa(n),a},e.finishDraft=function(r,n){var a=r&&r[K],i=a.A;return sa(i,n),ca(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!rc&&we(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=$e("Patches").$;return Ze(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),ge=new vp,Sp=ge.produce,mx=ge.produceWithPatches.bind(ge),gx=ge.setAutoFreeze.bind(ge),yx=ge.setUseProxies.bind(ge),bx=ge.applyPatches.bind(ge),xx=ge.createDraft.bind(ge),vx=ge.finishDraft.bind(ge),Ao=Sp;function wt(t){"@babel/helpers - typeof";return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(t)}function lc(t,e){if(wt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dc(t){var e=lc(t,"string");return wt(e)=="symbol"?e:e+""}function uc(t,e,r){return(e=dc(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Sa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pc(Object(r),!0).forEach(function(n){uc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ae(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var fc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ea=function(){return Math.random().toString(36).substring(7).split("").join(".")},wo={INIT:"@@redux/INIT"+Ea(),REPLACE:"@@redux/REPLACE"+Ea(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ea()}};function Ep(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ca(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ae(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ae(1));return r(Ca)(t,e)}if(typeof t!="function")throw new Error(ae(2));var a=t,i=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function f(){if(d)throw new Error(ae(3));return i}function h(v){if(typeof v!="function")throw new Error(ae(4));if(d)throw new Error(ae(5));var C=!0;return p(),l.push(v),function(){if(C){if(d)throw new Error(ae(6));C=!1,p();var w=l.indexOf(v);l.splice(w,1),s=null}}}function m(v){if(!Ep(v))throw new Error(ae(7));if(typeof v.type>"u")throw new Error(ae(8));if(d)throw new Error(ae(9));try{d=!0,i=a(i,v)}finally{d=!1}for(var C=s=l,O=0;O<C.length;O++){var w=C[O];w()}return v}function y(v){if(typeof v!="function")throw new Error(ae(10));a=v,m({type:wo.REPLACE})}function g(){var v,C=h;return v={subscribe:function(w){if(typeof w!="object"||w===null)throw new Error(ae(11));function x(){w.next&&w.next(f())}x();var b=C(x);return{unsubscribe:b}}},v[fc]=function(){return this},v}return m({type:wo.INIT}),n={dispatch:m,subscribe:h,getState:f,replaceReducer:y},n[fc]=g,n}function Cp(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:wo.INIT});if(typeof n>"u")throw new Error(ae(12));if(typeof r(void 0,{type:wo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ae(13))})}function hc(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{Cp(r)}catch(d){l=d}return function(p,f){if(p===void 0&&(p={}),l)throw l;if(0)var h;for(var m=!1,y={},g=0;g<i.length;g++){var v=i[g],C=r[v],O=p[v],w=C(O,f);if(typeof w>"u"){var x=f&&f.type;throw new Error(ae(14))}y[v]=w,m=m||w!==O}return m=m||i.length!==Object.keys(p).length,m?y:p}}function er(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function mc(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(ae(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return i=er.apply(void 0,l)(a.dispatch),Sa(Sa({},a),{},{dispatch:i})}}}function gc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var yc=gc();yc.withExtraArgument=gc;var Oa=yc;var Ec=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Op=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(f){return d([p,f])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,a=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(f){p=[6,f],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},tr=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},Ap=Object.defineProperty,wp=Object.defineProperties,Rp=Object.getOwnPropertyDescriptors,bc=Object.getOwnPropertySymbols,Lp=Object.prototype.hasOwnProperty,Tp=Object.prototype.propertyIsEnumerable,xc=function(t,e,r){return e in t?Ap(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},ct=function(t,e){for(var r in e||(e={}))Lp.call(e,r)&&xc(t,r,e[r]);if(bc)for(var n=0,a=bc(e);n<a.length;n++){var r=a[n];Tp.call(e,r)&&xc(t,r,e[r])}return t},Aa=function(t,e){return wp(t,Rp(e))},_p=function(t,e,r){return new Promise(function(n,a){var i=function(d){try{l(r.next(d))}catch(p){a(p)}},s=function(d){try{l(r.throw(d))}catch(p){a(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,s)};l((r=r.apply(t,e)).next())})};var Pp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},Bx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Ip(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function lt(t,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return ct(ct({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Np=(function(t){Ec(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,tr([void 0],r[0].concat(this)))):new(e.bind.apply(e,tr([void 0],r.concat(this))))},e})(Array),kp=(function(t){Ec(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,tr([void 0],r[0].concat(this)))):new(e.bind.apply(e,tr([void 0],r.concat(this))))},e})(Array);function La(t){return Pe(t)?Ao(t,function(){}):t}function Dp(t){return typeof t=="boolean"}function Mp(){return function(e){return Up(e)}}function Up(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,l=t.actionCreatorCheck,d=l===void 0?!0:l,p=new Np;if(r&&(Dp(r)?p.push(Oa):p.push(Oa.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var h;if(d)var m}return p}var wa=!0;function Cc(t){var e=Mp(),r=t||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?e():i,l=r.devTools,d=l===void 0?!0:l,p=r.preloadedState,f=p===void 0?void 0:p,h=r.enhancers,m=h===void 0?void 0:h,y;if(typeof a=="function")y=a;else if(Ip(a))y=hc(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var g=s;if(typeof g=="function"&&(g=g(e),!wa&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!wa&&g.some(function(b){return typeof b!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=mc.apply(void 0,g),C=er;d&&(C=Pp(ct({trace:!wa},typeof d=="object"&&d)));var O=new kp(v),w=O;Array.isArray(m)?w=tr([v],m):typeof m=="function"&&(w=m(O));var x=C.apply(void 0,w);return Ca(y,f,x)}function Oc(t){var e={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,r,n]}function Bp(t){return typeof t=="function"}function Fp(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?Oc(e):[e,r,n],i=a[0],s=a[1],l=a[2],d;if(Bp(t))d=function(){return La(t())};else{var p=La(t);d=function(){return p}}function f(h,m){h===void 0&&(h=d());var y=tr([i[m.type]],s.filter(function(g){var v=g.matcher;return v(m)}).map(function(g){var v=g.reducer;return v}));return y.filter(function(g){return!!g}).length===0&&(y=[l]),y.reduce(function(g,v){if(v)if(Ze(g)){var C=g,O=v(C,m);return O===void 0?g:O}else{if(Pe(g))return Ao(g,function(w){return v(w,m)});var O=v(g,m);if(O===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return g},h)}return f.getInitialState=d,f}function $p(t,e){return t+"/"+e}function Ac(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:La(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(f){var h=n[f],m=$p(e,f),y,g;"reducer"in h?(y=h.reducer,g=h.prepare):y=h,i[f]=y,s[m]=y,l[f]=g?lt(m,g):lt(m)});function d(){var f=typeof t.extraReducers=="function"?Oc(t.extraReducers):[t.extraReducers],h=f[0],m=h===void 0?{}:h,y=f[1],g=y===void 0?[]:y,v=f[2],C=v===void 0?void 0:v,O=ct(ct({},m),s);return Fp(r,function(w){for(var x in O)w.addCase(x,O[x]);for(var b=0,S=g;b<S.length;b++){var R=S[b];w.addMatcher(R.matcher,R.reducer)}C&&w.addDefaultCase(C)})}var p;return{name:e,reducer:function(f,h){return p||(p=d()),p(f,h)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Hp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wp=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Hp[Math.random()*64|0];return e},zp=["name","message","stack","code"],Ra=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),vc=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Gp=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=zp;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Wx=(function(){function t(e,r,n){var a=lt(e+"/fulfilled",function(f,h,m,y){return{payload:f,meta:Aa(ct({},y||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),i=lt(e+"/pending",function(f,h,m){return{payload:void 0,meta:Aa(ct({},m||{}),{arg:h,requestId:f,requestStatus:"pending"})}}),s=lt(e+"/rejected",function(f,h,m,y,g){return{payload:y,error:(n&&n.serializeError||Gp)(f||"Rejected"),meta:Aa(ct({},g||{}),{arg:m,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:(function(){function f(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return f.prototype.abort=function(){},f})();function p(f){return function(h,m,y){var g=n?.idGenerator?n.idGenerator(f):Wp(),v=new d,C,O=!1;function w(b){C=b,v.abort()}var x=(function(){return _p(this,null,function(){var b,S,R,I,Y,H,L;return Op(this,function(P){switch(P.label){case 0:return P.trys.push([0,4,,5]),I=(b=n?.condition)==null?void 0:b.call(n,f,{getState:m,extra:y}),Vp(I)?[4,I]:[3,2];case 1:I=P.sent(),P.label=2;case 2:if(I===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return O=!0,Y=new Promise(function(F,Q){return v.signal.addEventListener("abort",function(){return Q({name:"AbortError",message:C||"Aborted"})})}),h(i(g,f,(S=n?.getPendingMeta)==null?void 0:S.call(n,{requestId:g,arg:f},{getState:m,extra:y}))),[4,Promise.race([Y,Promise.resolve(r(f,{dispatch:h,getState:m,extra:y,requestId:g,signal:v.signal,abort:w,rejectWithValue:function(F,Q){return new Ra(F,Q)},fulfillWithValue:function(F,Q){return new vc(F,Q)}})).then(function(F){if(F instanceof Ra)throw F;return F instanceof vc?a(F.payload,g,f,F.meta):a(F,g,f)})])];case 3:return R=P.sent(),[3,5];case 4:return H=P.sent(),R=H instanceof Ra?s(null,g,f,H.payload,H.meta):s(H,g,f),[3,5];case 5:return L=n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition,L||h(R),[2,R]}})})})();return Object.assign(x,{abort:w,requestId:g,arg:f,unwrap:function(){return x.then(jp)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function jp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Vp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var wc="listener",Rc="completed",Lc="cancelled",zx="task-"+Lc,Gx="task-"+Rc,jx=wc+"-"+Lc,Vx=wc+"-"+Rc;var Ta="listenerMiddleware";var Kx=lt(Ta+"/add"),Zx=lt(Ta+"/removeAll"),qx=lt(Ta+"/remove");var Sc,Yx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Sc||(Sc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Kp=function(t){return function(e){setTimeout(e,t)}},Xx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Kp(10);ic();window.ftReduxStores||(window.ftReduxStores={});var dt=class t extends Ge{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Yt(i))return i;if(a==null)return;let s=Ac({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Cc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let f=Ee(s.getInitialState());for(let h of p.keeping)f[h]=(d??f)[h];return f}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Wr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,p=i[d];return p?(...f)=>{let h=p(...f.map(a));return this.reduxStore.dispatch(h),h}:f=>{this.setState({[d]:a(f)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Zp(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Yt(e)&&e.clear()}var Ro=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);ze(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Tc(t,e,r){return new Ro(t,e,r).watch()}var rr=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Na={};M(Na,{scrollHelper:()=>qp});var Pa,Lo=new Map,Ia=class{lock(e,r){if(r){let n=Lo.get(r);if(n==null||n===e)return Lo.set(r,e),r}}release(e,r){r&&Lo.get(r)===e&&Lo.delete(r)}findFirstScrollableParent(e){var r;let n,a;for(let i of yn(e)){let s=i,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&a==null&&(a=s)}return(r=n??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var n,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(n=r.offsetTop)!==null&&n!==void 0?n:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let a=this.getAbsoluteScrollOffset(n,e),i=a-n.clientHeight+e.clientHeight,s=a,l=rt(0,(s-n.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,l)*(i-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(Pa=window.FluidTopicsScrollHelper)!==null&&Pa!==void 0?Pa:new Ia;var qp=window.FluidTopicsScrollHelper;var Da={};M(Da,{SearchPlaceConverter:()=>nr,SearchPlaceQueryParams:()=>k,isSearchPlaceQueryParams:()=>gl,serializeRequest:()=>Qp});var _c;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(_c||(_c={}));var Pc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Pc||(Pc={}));var Ic;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Ic||(Ic={}));var Nc;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Nc||(Nc={}));var kc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(kc||(kc={}));var Dc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Dc||(Dc={}));var Mc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Mc||(Mc={}));var Uc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Uc||(Uc={}));var Bc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Bc||(Bc={}));var Fc;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Fc||(Fc={}));var $c;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})($c||($c={}));var Hc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Hc||(Hc={}));var Wc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Wc||(Wc={}));var zc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(zc||(zc={}));var Gc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Gc||(Gc={}));var jc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(jc||(jc={}));var Rt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Rt||(Rt={}));var Vc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Vc||(Vc={}));var Kc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Kc||(Kc={}));var To;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(To||(To={}));var el=t=>Object.keys(To).includes(t);var Zc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Zc||(Zc={}));var qc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(qc||(qc={}));var Yc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Yc||(Yc={}));var or;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(or||(or={}));var tl=t=>Object.keys(or).includes(t);var Xc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Xc||(Xc={}));var ka;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ka||(ka={}));var Qc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Qc||(Qc={}));var X;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(X||(X={}));var Re;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Re||(Re={}));var Jc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Jc||(Jc={}));var rl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(rl||(rl={}));var ol;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ol||(ol={}));var nl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(nl||(nl={}));var al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(al||(al={}));var il;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(il||(il={}));var sl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(sl||(sl={}));var cl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(cl||(cl={}));var ll;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(ll||(ll={}));var dl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(dl||(dl={}));var ul;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(ul||(ul={}));var pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(pl||(pl={}));var Yp={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function fl(t,e){return t===e||(Yp[t]??[]).some(r=>fl(r,e))}function hl(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>fl(n,e))}function Xp(t){return`"${t}"`}function ml(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Qp(t,e){return new nr(t).serialize(e)}var k;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(k||(k={}));var Jp=new Set(Object.values(k));function gl(t){return Jp.has(t)}var nr=class{constructor(e,r=20,n=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=n,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let n=r==null||r.trim().length===0,a=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var n,a,i,s,l,d,p,f,h,m,y;let g=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&g.append(k.LOCALE,e.contentLocale):g.append(k.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&g.append(k.QUERY,e.query);let v=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(b=>b.valueFilter&&!b.valueFilter.negative))!==null&&i!==void 0?i:[];if(v.length>0){let b=v.map(S=>{var R,I;let Y=((I=(R=S.valueFilter)===null||R===void 0?void 0:R.values)!==null&&I!==void 0?I:[]).map(H=>this.escapeFilters(H)).map(H=>Xp(ml(H))).join("_");return`${S.key}~${Y}`}).join("*");g.append(k.VALUE_FILTERS,b)}let C=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(b=>b.dateFilter))!==null&&l!==void 0?l:[];if(C.length>0){let b=C.map(S=>{var R;return`${S.key}~${(R=S.dateFilter)===null||R===void 0?void 0:R.type.toLowerCase()}`}).join("*");g.append(k.DATE_FILTERS,b)}let O=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(b=>b.rangeFilter))!==null&&p!==void 0?p:[];if(O.length>0){let b=O.map(S=>{var R,I;return`${S.key}~${(R=S.rangeFilter)===null||R===void 0?void 0:R.from}_${(I=S.rangeFilter)===null||I===void 0?void 0:I.to}`}).join("*");g.append(k.RANGE_FILTERS,b)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&g.append(k.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&g.append(k.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&g.append(k.SORT,e.sortId),!((f=e.paging)===null||f===void 0)&&f.perPage&&((m=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&g.append(k.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&g.append(k.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let w=(y=e.otherQueryParams)!==null&&y!==void 0?y:{};for(let b in w)g.append(b,w[b]);let x=new Array;return g.forEach((b,S)=>{x.push(this.encodeQueryString(S)+"="+this.encodeQueryString(b))}),encodeURI(x.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let n=e.split("?"),a=this.fromURLSearchParams(n.slice(1).join("?")),i=n[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,n,a,i,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(O){console.warn("Could not decode search request query params, fallback on raw value",O)}let d=new URLSearchParams(e),p=d.get(k.LOCALE)==="all"?void 0:d.get(k.LOCALE),f=((r=d.get(k.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(n=d.get(k.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(a=d.get(k.SCOPE))!==null&&a!==void 0?a:"default",y=+((i=d.get(k.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),g=d.get(k.KEYWORD_MATCH),v=g?g.toUpperCase()===Rt.MANDATORY?Rt.MANDATORY:Rt.OPTIONAL:void 0,C={};for(let O of d.keys())gl(O)||(C[O]=d.get(O));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(k.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:el(f)?f:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:rt(1,isNaN(y)?this.defaultPerPage:y,1e3)},keywordMatch:v,otherQueryParams:C}}parseCompatFilters(e){var r,n,a,i,s,l;let d=[];return e.has(k.FILTERS)&&(d=this.parseValueFilters((r=e.get(k.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(k.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(k.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(k.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(k.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(k.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(ml).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:or[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,n,a]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,a]of this.filtersEscapeMapping)e=e.replaceAll(n,a);return e}unescapeFilterValue(e){for(let[r,n,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(tl(e))return[{key:"ft:lastEdition",dateFilter:{type:or[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[k.LOCALE,k.FILTERS,k.VALUE_FILTERS,k.DATE_FILTERS,k.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let n=new URL(e);return n.searchParams.delete(k.LOCALE),r!==void 0&&n.searchParams.append(k.LOCALE,r),n.toString()}};var Ua={};M(Ua,{toFtFormComponent:()=>ef});var Ma=Symbol("elementInternals"),ef=ee(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ma].form}constructor(...n){super(n),this[Ma]=this.attachInternals()}setFormValue(n){this[Ma].setFormValue(n)}}return e});var Ba={};M(Ba,{DateFormatter:()=>Lt});var Lt=class{static format(e,r,n,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,r,n,a,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${l} ${d}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var $a={};M($a,{ALL_KEYS_VALUE:()=>Fa,SameWindowStorageEvent:()=>ar});var Fa="__all__",ar=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Fa}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new ar(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new ar(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new ar(Fa))}});var Wa={};M(Wa,{FocusMainContentEvent:()=>Ha});var Ha=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var yl={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function tf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function rf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",tf);document.addEventListener("click",rf);var bl=_`
|
|
48
48
|
.sr-only {
|
|
49
49
|
position:absolute;
|
|
50
50
|
left:-10000px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-language-filter",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "Content language filter for integrated fluid-topics search pages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.1.6",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@fluid-topics/ft-wc-test-utils": "2.1.
|
|
26
|
+
"@fluid-topics/ft-wc-test-utils": "2.1.6"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "70ba8e6b58f0f1c74a92965f3b7dbf3db605698e"
|
|
29
29
|
}
|