@fluid-topics/ft-search-selected-facets 2.2.18 → 2.2.20

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.
@@ -49,7 +49,8 @@ export class FtSearchSelectedFacets extends withAriaNotification(withDateFormat(
49
49
  this.addI18nContext(periodFilterContext, periodFilterDefaultMessages);
50
50
  }
51
51
  render() {
52
- var _a, _b;
52
+ var _a;
53
+ var _b;
53
54
  if (!this.hasSomethingToDisplay) {
54
55
  return nothing;
55
56
  }
@@ -267,17 +268,18 @@ export class FtSearchSelectedFacets extends withAriaNotification(withDateFormat(
267
268
  </ft-tooltip>`;
268
269
  }
269
270
  updated(props) {
270
- var _a, _b, _c, _d;
271
+ var _a, _b;
272
+ var _c, _d;
271
273
  super.updated(props);
272
274
  if (props.get("filters")) {
273
- const visibleFiltersNumber = (_b = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.filter((f) => f.dateFilter || f.rangeFilter).length) !== null && _b !== void 0 ? _b : 0;
275
+ const visibleFiltersNumber = (_c = (_a = this.filters) === null || _a === void 0 ? void 0 : _a.filter((f) => f.dateFilter || f.rangeFilter).length) !== null && _c !== void 0 ? _c : 0;
274
276
  const oldFiltersNumber = props.get("filters").filter((f) => f.dateFilter || f.rangeFilter).length;
275
277
  if ((visibleFiltersNumber - oldFiltersNumber == 1) || (oldFiltersNumber > 0 && !this.hasSomethingToDisplay)) {
276
278
  this.announceFilters();
277
279
  }
278
280
  }
279
281
  if (props.get("facets")) {
280
- const visibleFacetsNumber = (_d = (_c = this.facets) === null || _c === void 0 ? void 0 : _c.filter((facet) => this.getSelectedValues(facet).length > 0).length) !== null && _d !== void 0 ? _d : 0;
282
+ const visibleFacetsNumber = (_d = (_b = this.facets) === null || _b === void 0 ? void 0 : _b.filter((facet) => this.getSelectedValues(facet).length > 0).length) !== null && _d !== void 0 ? _d : 0;
281
283
  const oldFacetsNumber = props.get("facets").filter((facet) => this.getSelectedValues(facet).length > 0).length;
282
284
  if ((visibleFacetsNumber - oldFacetsNumber == 1) || (oldFacetsNumber > 0 && !this.hasSomethingToDisplay)) {
283
285
  this.announceFilters();
@@ -8,10 +8,10 @@
8
8
  .ft-search-selected-facets--container > * {
9
9
  min-width: 0;
10
10
  }
11
- `;var wr=d(v()),Zr=d(U());var Ur;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Ur||(Ur={}));var Et=d(v());var fd=d(v());var fo;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(fo||(fo={}));var ho;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(ho||(ho={}));var mo;(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"})(mo||(mo={}));var yo;(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"})(yo||(yo={}));var go;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(go||(go={}));var vo;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(vo||(vo={}));var bo;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(bo||(bo={}));var xo;(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"})(xo||(xo={}));var So;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(So||(So={}));var Eo;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Eo||(Eo={}));var Ao;(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"})(Ao||(Ao={}));var _o;(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"})(_o||(_o={}));var Co;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Co||(Co={}));var wo;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(wo||(wo={}));var Oo;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Oo||(Oo={}));var To;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(To||(To={}));var Ro;(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"})(Ro||(Ro={}));var dt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(dt||(dt={}));var ko;(function(t){t.ASC="ASC",t.DESC="DESC"})(ko||(ko={}));var Lo;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Lo||(Lo={}));var Ai;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ai||(Ai={}));var Do;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Do||(Do={}));var Po;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Po||(Po={}));var No;(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"})(No||(No={}));var _i;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_i||(_i={}));var Io;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Io||(Io={}));var Ci;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ci||(Ci={}));var Mo;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Mo||(Mo={}));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 Fe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Fe||(Fe={}));var $o;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})($o||($o={}));var Fo;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Fo||(Fo={}));var Uo;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Uo||(Uo={}));var Bo;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Bo||(Bo={}));var Ho;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ho||(Ho={}));var Vo;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Vo||(Vo={}));var zo;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(zo||(zo={}));var jo;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(jo||(jo={}));var qo;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(qo||(qo={}));var Wo;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Wo||(Wo={}));var Ko;(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"})(Ko||(Ko={}));var Go;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Go||(Go={}));var hd={[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 Yo(t,e){return t===e||(hd[t]??[]).some(r=>Yo(r,e))}function wi(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(i=>Yo(i,e))}function Xo(t,...e){return t==null?!1:e.some(r=>wi(t,r))}var ps=d(U());var Qo=d(U(),1);var qn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},md=t=>({fromAttribute:e=>{if(e==null)return Br(t);try{return JSON.parse(e)}catch{return Br(t)}},toAttribute:e=>JSON.stringify(e)});function Zo(t,e){return(0,Qo.property)({type:Object,converter:md(t),hasChanged:Hr,...e??{}})}function yd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!vr(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!vr(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),n=s(t);if(r=n.length,r!==s(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let o=n[i];if(!vr(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function vr(t,e){try{return yd(t,e)}catch{return!1}}function Hr(t,e){return!vr(t,e)}function Br(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Oi(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let s=e(i);return s[t]=!0,s}}var Jo=d(U(),1);var Wn=t=>{let e=t??{};return(r,i)=>{var s;let n={hasChanged:Hr,attribute:!1,...e};(0,Jo.property)(n)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[i]),store:e.store})}};var Ti=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==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))}};var Bt=d(U(),1);var Ri=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){s(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ta=d(R(),1);var ki=globalThis,gd=ki.ShadowRoot&&(ki.ShadyCSS===void 0||ki.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ea=(t,e)=>{if(gd)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),s=ki.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=r.cssText,t.appendChild(i)}};var Li=class extends ta.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return ea(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){qn(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ra(t,e,...r){var i;let s=t.querySelector(e);for(let n of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return s}var xr=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},oa,ia=Symbol("constructorPrototype"),na=Symbol("constructorName"),aa=Symbol("exportpartsDebouncer"),sa=Symbol("dynamicDependenciesLoaded"),br=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};br.eventName="exportparts-updated";var rt=class extends Li{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oa]=new Ri(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[aa].run(()=>{var s,n;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[na]=this.constructor.name,this[ia]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[na]&&Object.setPrototypeOf(this,this[ia])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[sa]||(r[sa]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(br.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(br.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new br)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let n=[...s??[],i];r=ra(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(e){var r,i,s,n,o,a;let l=f=>f!=null&&f.trim().length>0,c=e.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let g=(n=(s=f.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&n!==void 0?n:[],x=(a=(o=f.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],A=[...g,...x].filter(l).map(b=>b.trim());for(let b of A)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>c.map(g=>`${f}:${g}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};oa=aa;xr([(0,Bt.property)()],rt.prototype,"exportpartsPrefix",void 0);xr([Zo([])],rt.prototype,"exportpartsPrefixes",void 0);xr([(0,Bt.property)({reflect:!0})],rt.prototype,"exportparts",void 0);xr([(0,Bt.property)()],rt.prototype,"customStylesheet",void 0);xr([(0,Bt.property)()],rt.prototype,"elementToFocus",void 0);xr([(0,Bt.state)()],rt.prototype,"useAdoptedStyleSheets",void 0);function Di(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Vr=Symbol("internalReduxEventsUnsubscribers"),bt=Symbol("internalStoresUnsubscribers"),Ht=Symbol("internalStores"),vd=Oi(Symbol("withRedux"),function(t){var e,r,i;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ht].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ht].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Ht].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ht].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Ht].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ht].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[bt].has(o.store):this[bt].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l;this[bt].set(o,a.subscribe(()=>this.updateFromStores())),this[Vr].set(o,[]),Di(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let p=f=>this[u](f);a.addEventListener(c.eventName,p),this[Vr].get(o).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[bt].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[bt].has(o)&&this[bt].get(o)(),this[bt].delete(o),(a=this[Vr].get(o))===null||a===void 0||a.forEach(l=>l()),this[Vr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=bt,r=Ht,i=Vr,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),la=class extends vd(rt){};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 bd=typeof Symbol=="function"&&Symbol.observable||"@@observable",ca=bd,Kn=()=>Math.random().toString(36).substring(7).split("").join("."),xd={INIT:`@@redux/INIT${Kn()}`,REPLACE:`@@redux/REPLACE${Kn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kn()}`},Pi=xd;function Ni(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Gn(t,e,r){if(typeof t!="function")throw new Error(ae(2));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(Gn)(t,e)}let i=t,s=e,n=new Map,o=n,a=0,l=!1;function c(){o===n&&(o=new Map,n.forEach((b,_)=>{o.set(_,b)}))}function u(){if(l)throw new Error(ae(3));return s}function p(b){if(typeof b!="function")throw new Error(ae(4));if(l)throw new Error(ae(5));let _=!0;c();let P=a++;return o.set(P,b),function(){if(_){if(l)throw new Error(ae(6));_=!1,c(),o.delete(P),n=null}}}function f(b){if(!Ni(b))throw new Error(ae(7));if(typeof b.type>"u")throw new Error(ae(8));if(typeof b.type!="string")throw new Error(ae(17));if(l)throw new Error(ae(9));try{l=!0,s=i(s,b)}finally{l=!1}return(n=o).forEach(P=>{P()}),b}function g(b){if(typeof b!="function")throw new Error(ae(10));i=b,f({type:Pi.REPLACE})}function x(){let b=p;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ae(11));function P(){let O=_;O.next&&O.next(u())}return P(),{unsubscribe:b(P)}},[ca](){return this}}}return f({type:Pi.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:g,[ca]:x}}function Sd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Pi.INIT})>"u")throw new Error(ae(12));if(typeof r(void 0,{type:Pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ae(13))})}function ua(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),s,n;try{Sd(r)}catch(o){n=o}return function(a={},l){if(n)throw n;let c=!1,u={};for(let p=0;p<i.length;p++){let f=i[p],g=r[f],x=a[f],A=g(x,l);if(typeof A>"u"){let b=l&&l.type;throw new Error(ae(14))}u[f]=A,c=c||A!==x}return c=c||i.length!==Object.keys(a).length,c?u:a}}function zr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function da(...t){return e=>(r,i)=>{let s=e(r,i),n=()=>{throw new Error(ae(15))},o={getState:s.getState,dispatch:(l,...c)=>n(l,...c)},a=t.map(l=>l(o));return n=zr(...a)(s.dispatch),{...s,dispatch:n}}}function pa(t){return Ni(t)&&"type"in t&&typeof t.type=="string"}var Sa=Symbol.for("immer-nothing"),fa=Symbol.for("immer-draftable"),ye=Symbol.for("immer-state");function je(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ke=Object,Er=ke.getPrototypeOf,Fi="constructor",ji="prototype",Zn="configurable",Ui="enumerable",Mi="writable",jr="value",it=t=>!!t&&!!t[ye];function Le(t){return t?Ea(t)||Wi(t)||!!t[fa]||!!t[Fi]?.[fa]||Ki(t)||Gi(t):!1}var Ed=ke[ji][Fi].toString(),ha=new WeakMap;function Ea(t){if(!t||!os(t))return!1;let e=Er(t);if(e===null||e===ke[ji])return!0;let r=ke.hasOwnProperty.call(e,Fi)&&e[Fi];if(r===Object)return!0;if(!Sr(r))return!1;let i=ha.get(r);return i===void 0&&(i=Function.toString.call(r),ha.set(r,i)),i===Ed}function qi(t,e,r=!0){Kr(t)===0?(r?Reflect.ownKeys(t):ke.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((i,s)=>e(s,i,t))}function Kr(t){let e=t[ye];return e?e.type_:Wi(t)?1:Ki(t)?2:Gi(t)?3:0}var Yn=(t,e,r=Kr(t))=>r===2?t.has(e):ke[ji].hasOwnProperty.call(t,e),Jn=(t,e,r=Kr(t))=>r===2?t.get(e):t[e],Bi=(t,e,r,i=Kr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function Ad(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Wi=Array.isArray,Ki=t=>t instanceof Map,Gi=t=>t instanceof Set,os=t=>typeof t=="object",Sr=t=>typeof t=="function",Xn=t=>typeof t=="boolean";function _d(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var pt=t=>t.copy_||t.base_;var as=t=>t.modified_?t.copy_:t.base_;function es(t,e){if(Ki(t))return new Map(t);if(Gi(t))return new Set(t);if(Wi(t))return Array[ji].slice.call(t);let r=Ea(t);if(e===!0||e==="class_only"&&!r){let i=ke.getOwnPropertyDescriptors(t);delete i[ye];let s=Reflect.ownKeys(i);for(let n=0;n<s.length;n++){let o=s[n],a=i[o];a[Mi]===!1&&(a[Mi]=!0,a[Zn]=!0),(a.get||a.set)&&(i[o]={[Zn]:!0,[Mi]:!0,[Ui]:a[Ui],[jr]:t[o]})}return ke.create(Er(t),i)}else{let i=Er(t);if(i!==null&&r)return{...t};let s=ke.create(i);return ke.assign(s,t)}}function ls(t,e=!1){return Yi(t)||it(t)||!Le(t)||(Kr(t)>1&&ke.defineProperties(t,{set:Ii,add:Ii,clear:Ii,delete:Ii}),ke.freeze(t),e&&qi(t,(r,i)=>{ls(i,!0)},!1)),t}function Cd(){je(2)}var Ii={[jr]:Cd};function Yi(t){return t===null||!os(t)?!0:ke.isFrozen(t)}var Hi="MapSet",ts="Patches",ma="ArrayMethods",Aa={};function Vt(t){let e=Aa[t];return e||je(0,t),e}var ya=t=>!!Aa[t];var qr,_a=()=>qr,wd=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ya(Hi)?Vt(Hi):void 0,arrayMethodsPlugin_:ya(ma)?Vt(ma):void 0});function ga(t,e){e&&(t.patchPlugin_=Vt(ts),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function rs(t){is(t),t.drafts_.forEach(Od),t.drafts_=null}function is(t){t===qr&&(qr=t.parent_)}var va=t=>qr=wd(qr,t);function Od(t){let e=t[ye];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function ba(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ye].modified_&&(rs(e),je(4)),Le(t)&&(t=xa(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[ye].base_,t,e)}else t=xa(e,r);return Td(e,t,!0),rs(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Sa?t:void 0}function xa(t,e){if(Yi(e))return e;let r=e[ye];if(!r)return Vi(e,t.handledSet_,t);if(!Xi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Oa(r,t)}return r.copy_}function Td(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&ls(e,r)}function Ca(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Xi=(t,e)=>t.scope_===e,Rd=[];function wa(t,e,r,i){let s=pt(t),n=t.type_;if(i!==void 0&&Jn(s,i,n)===e){Bi(s,i,r,n);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;qi(s,(l,c)=>{if(it(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=t.draftLocations_.get(e)??Rd;for(let a of o)Bi(s,a,r,n)}function kd(t,e,r){t.callbacks_.push(function(s){let n=e;if(!n||!Xi(n,s))return;s.mapSetPlugin_?.fixSetContents(n);let o=as(n);wa(t,n.draft_??n,o,r),Oa(n,s)})}function Oa(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let s=i.getPath(t);s&&i.generatePatches_(t,s,e)}Ca(t)}}function Ld(t,e,r){let{scope_:i}=t;if(it(r)){let s=r[ye];Xi(s,i)&&s.callbacks_.push(function(){$i(t);let o=as(s);wa(t,r,o,e)})}else Le(r)&&t.callbacks_.push(function(){let n=pt(t);t.type_===3?n.has(r)&&Vi(r,i.handledSet_,i):Jn(n,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Vi(Jn(t.copy_,e,t.type_),i.handledSet_,i)})}function Vi(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||it(t)||e.has(t)||!Le(t)||Yi(t)||(e.add(t),qi(t,(i,s)=>{if(it(s)){let n=s[ye];if(Xi(n,r)){let o=as(n);Bi(t,i,o,t.type_),Ca(n)}}else Le(s)&&Vi(s,e,r)})),t}function Dd(t,e){let r=Wi(t),i={type_:r?1:0,scope_:e?e.scope_:_a(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,n=zi;r&&(s=[i],n=Wr);let{revoke:o,proxy:a}=Proxy.revocable(s,n);return i.draft_=a,i.revoke_=o,[a,i]}var zi={get(t,e){if(e===ye)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=pt(t);if(!Yn(s,e,t.type_))return Nd(t,s,e);let n=s[e];if(t.finalized_||!Le(n)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&_d(e))return n;if(n===Qn(t.base_,e)||Pd(t,e,n)){$i(t);let o=t.type_===1?+e:e,a=ss(t.scope_,n,t,o);return t.copy_[o]=a}return n},has(t,e){return e in pt(t)},ownKeys(t){return Reflect.ownKeys(pt(t))},set(t,e,r){let i=Ta(pt(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let s=Qn(pt(t),e),n=s?.[ye];if(n&&n.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(Ad(r,s)&&(r!==void 0||Yn(t.base_,e,t.type_)))return!0;$i(t),ns(t)}return t.copy_[e]===r&&(r!==void 0||Yn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),Ld(t,e,r)),!0},deleteProperty(t,e){return $i(t),Qn(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ns(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=pt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[Mi]:!0,[Zn]:t.type_!==1||e!=="length",[Ui]:i[Ui],[jr]:r[e]}},defineProperty(){je(11)},getPrototypeOf(t){return Er(t.base_)},setPrototypeOf(){je(12)}},Wr={};for(let t in zi){let e=zi[t];Wr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Wr.deleteProperty=function(t,e){return Wr.set.call(this,t,e,void 0)};Wr.set=function(t,e,r){return zi.set.call(this,t[0],e,r,t[0])};function Qn(t,e){let r=t[ye];return(r?pt(r):t)[e]}function Pd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!Le(r)||r[ye]?!1:t.baseRefs_.has(r)}function Nd(t,e,r){let i=Ta(e,r);return i?jr in i?i[jr]:i.get?.call(t.draft_):void 0}function Ta(t,e){if(!(e in t))return;let r=Er(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Er(r)}}function ns(t){t.modified_||(t.modified_=!0,t.parent_&&ns(t.parent_))}function $i(t){t.copy_||(t.assigned_=new Map,t.copy_=es(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Id=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(Sr(e)&&!Sr(r)){let n=r;r=e;let o=this;return function(l=n,...c){return o.produce(l,u=>r.call(this,u,...c))}}Sr(r)||je(6),i!==void 0&&!Sr(i)&&je(7);let s;if(Le(e)){let n=va(this),o=ss(n,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?rs(n):is(n)}return ga(n,i),ba(s,n)}else if(!e||!os(e)){if(s=r(e),s===void 0&&(s=e),s===Sa&&(s=void 0),this.autoFreeze_&&ls(s,!0),i){let n=[],o=[];Vt(ts).generateReplacementPatches_(e,s,{patches_:n,inversePatches_:o}),i(n,o)}return s}else je(1,e)},this.produceWithPatches=(e,r)=>{if(Sr(e))return(o,...a)=>this.produceWithPatches(o,l=>e(l,...a));let i,s;return[this.produce(e,r,(o,a)=>{i=o,s=a}),i,s]},Xn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Xn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Xn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Le(t)||je(8),it(t)&&(t=Ra(t));let e=va(this),r=ss(e,t,void 0);return r[ye].isManual_=!0,is(e),r}finishDraft(t,e){let r=t&&t[ye];(!r||!r.isManual_)&&je(9);let{scope_:i}=r;return ga(i,e),ba(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let i=Vt(ts).applyPatches_;return it(t)?i(t,e):this.produce(t,s=>i(s,e))}};function ss(t,e,r,i){let[s,n]=Ki(e)?Vt(Hi).proxyMap_(e,r):Gi(e)?Vt(Hi).proxySet_(e,r):Dd(e,r);return(r?.scope_??_a()).drafts_.push(s),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?kd(r,n,i):n.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:c}=l;n.modified_&&c&&c.generatePatches_(n,[],l)}),s}function Ra(t){return it(t)||je(10,t),ka(t)}function ka(t){if(!Le(t)||Yi(t))return t;let e=t[ye],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=es(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=es(t,!0);return qi(r,(s,n)=>{Bi(r,s,ka(n))},i),e&&(e.finalized_=!1),r}var Md=globalThis.Iterator,Yf=typeof Md?.from=="function";var $d=new Id,cs=$d.produce;function La(t){return({dispatch:r,getState:i})=>s=>n=>typeof n=="function"?n(r,i,t):s(n)}var Da=La(),Pa=La;var Fd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zr:zr.apply(null,arguments)},rh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Ud=t=>t&&typeof t.match=="function";function xt(t,e){function r(...i){if(e){let s=e(...i);if(!s)throw new Error(ft(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>pa(i)&&i.type===t,r}var Fa=class Gr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Gr.prototype)}static get[Symbol.species](){return Gr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Gr(...e[0].concat(this)):new Gr(...e.concat(this))}};function Na(t){return Le(t)?cs(t,()=>{}):t}function Qi(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Bd(t){return typeof t=="boolean"}var Hd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:n=!0}=e??{},o=new Fa;return r&&(Bd(r)?o.push(Da):o.push(Pa(r.extraArgument))),o},Vd="RTK_autoBatch";var Ia=t=>e=>{setTimeout(e,t)},zd=(t,e)=>r=>{let i=!1,s=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(o),r())},n=t(s),o=setTimeout(s,e)},jd=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),s=!0,n=!1,o=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zd(window.requestAnimationFrame,100):Ia(10):t.type==="callback"?t.queueNotification:Ia(t.timeout),c=()=>{o=!1,n&&(n=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let p=()=>s&&u(),f=i.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Vd],n=!s,n&&(o||(o=!0,l(c))),i.dispatch(u)}finally{s=!0}}})},qd=t=>function(r){let{autoBatch:i=!0}=r??{},s=new Fa(t);return i&&s.push(jd(typeof i=="object"?i:void 0)),s};function Ua(t){let e=Hd(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:n=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(Ni(r))l=ua(r);else throw new Error(ft(1));let c;typeof i=="function"?c=i(e):c=e();let u=zr;s&&(u=Fd({trace:!1,...typeof s=="object"&&s}));let p=da(...c),f=qd(p),g=typeof a=="function"?a(f):f(),x=u(...g);return Gn(l,o,x)}function Ba(t){let e={},r=[],i,s={addCase(n,o){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(ft(28));if(a in e)throw new Error(ft(29));return e[a]=o,s},addAsyncThunk(n,o){return o.pending&&(e[n.pending.type]=o.pending),o.rejected&&(e[n.rejected.type]=o.rejected),o.fulfilled&&(e[n.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:n.settled,reducer:o.settled}),s},addMatcher(n,o){return r.push({matcher:n,reducer:o}),s},addDefaultCase(n){return i=n,s}};return t(s),[e,r,i]}function Wd(t){return typeof t=="function"}function Kd(t,e){let[r,i,s]=Ba(e),n;if(Wd(t))n=()=>Na(t());else{let a=Na(t);n=()=>a}function o(a=n(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[s]),c.reduce((u,p)=>{if(p)if(it(u)){let g=p(u,l);return g===void 0?u:g}else{if(Le(u))return cs(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return o.getInitialState=n,o}var Gd=(t,e)=>Ud(t)?t.match(e):t(e);function Yd(...t){return e=>t.some(r=>Gd(r,e))}var Xd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qd=(t=21)=>{let e="",r=t;for(;r--;)e+=Xd[Math.random()*64|0];return e},Zd=["name","message","stack","code"],us=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Ma=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Jd=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Zd)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},$a="External signal was aborted",ep=(()=>{function t(e,r,i){let s=xt(e+"/fulfilled",(l,c,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),n=xt(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=xt(e+"/rejected",(l,c,u,p,f)=>({payload:p,error:(i&&i.serializeError||Jd)(l||"Rejected"),meta:{...f||{},arg:u,requestId:c,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,p,f)=>{let g=i?.idGenerator?i.idGenerator(l):Qd(),x=new AbortController,A,b;function _(S){b=S,x.abort()}c&&(c.aborted?_($a):c.addEventListener("abort",()=>_($a),{once:!0}));let P=(async function(){let S;try{let k=i?.condition?.(l,{getState:p,extra:f});if(rp(k)&&(k=await k),k===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let G=new Promise((F,Y)=>{A=()=>{Y({name:"AbortError",message:b||"Aborted"})},x.signal.addEventListener("abort",A,{once:!0})});u(n(g,l,i?.getPendingMeta?.({requestId:g,arg:l},{getState:p,extra:f}))),S=await Promise.race([G,Promise.resolve(r(l,{dispatch:u,getState:p,extra:f,requestId:g,signal:x.signal,abort:_,rejectWithValue:((F,Y)=>new us(F,Y)),fulfillWithValue:((F,Y)=>new Ma(F,Y))})).then(F=>{if(F instanceof us)throw F;return F instanceof Ma?s(F.payload,g,l,F.meta):s(F,g,l)})])}catch(k){S=k instanceof us?o(null,g,l,k.payload,k.meta):o(k,g,l)}finally{A&&x.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(P,{abort:_,requestId:g,arg:l,unwrap(){return P.then(tp)}})}}return Object.assign(a,{pending:n,rejected:o,fulfilled:s,settled:Yd(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function tp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function rp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ha=Symbol.for("rtk-slice-createasyncthunk"),nh={[Ha]:ep};function ip(t,e){return`${t}/${e}`}function np({creators:t}={}){let e=t?.asyncThunk?.[Ha];return function(i){let{name:s,reducerPath:n=s}=i;if(!s)throw new Error(ft(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(op()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(S,O){let k=typeof S=="string"?S:S.type;if(!k)throw new Error(ft(12));if(k in l.sliceCaseReducersByType)throw new Error(ft(13));return l.sliceCaseReducersByType[k]=O,c},addMatcher(S,O){return l.sliceMatchers.push({matcher:S,reducer:O}),c},exposeAction(S,O){return l.actionCreators[S]=O,c},exposeCaseReducer(S,O){return l.sliceCaseReducersByName[S]=O,c}};a.forEach(S=>{let O=o[S],k={reducerName:S,type:ip(s,S),createNotation:typeof i.reducers=="function"};lp(O)?up(k,O,c,e):ap(k,O,c)});function u(){let[S={},O=[],k=void 0]=typeof i.extraReducers=="function"?Ba(i.extraReducers):[i.extraReducers],G={...S,...l.sliceCaseReducersByType};return Kd(i.initialState,F=>{for(let Y in G)F.addCase(Y,G[Y]);for(let Y of l.sliceMatchers)F.addMatcher(Y.matcher,Y.reducer);for(let Y of O)F.addMatcher(Y.matcher,Y.reducer);k&&F.addDefaultCase(k)})}let p=S=>S,f=new Map,g=new WeakMap,x;function A(S,O){return x||(x=u()),x(S,O)}function b(){return x||(x=u()),x.getInitialState()}function _(S,O=!1){function k(F){let Y=F[S];return typeof Y>"u"&&O&&(Y=Qi(g,k,b)),Y}function G(F=p){let Y=Qi(f,O,()=>new WeakMap);return Qi(Y,F,()=>{let Fr={};for(let[$e,Ut]of Object.entries(i.selectors??{}))Fr[$e]=sp(Ut,F,()=>Qi(g,F,b),O);return Fr})}return{reducerPath:S,getSelectors:G,get selectors(){return G(k)},selectSlice:k}}let P={name:s,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,..._(n),injectInto(S,{reducerPath:O,...k}={}){let G=O??n;return S.inject({reducerPath:G,reducer:A},k),{...P,..._(G,!0)}}};return P}}function sp(t,e,r,i){function s(n,...o){let a=e(n);return typeof a>"u"&&i&&(a=r()),t(a,...o)}return s.unwrapped=t,s}var Va=np();function op(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function ap({type:t,reducerName:e,createNotation:r},i,s){let n,o;if("reducer"in i){if(r&&!cp(i))throw new Error(ft(17));n=i.reducer,o=i.prepare}else n=i;s.addCase(t,n).exposeCaseReducer(e,n).exposeAction(e,o?xt(t,o):xt(t))}function lp(t){return t._reducerDefinitionType==="asyncThunk"}function cp(t){return t._reducerDefinitionType==="reducerWithPrepare"}function up({type:t,reducerName:e},r,i,s){if(!s)throw new Error(ft(18));let{payloadCreator:n,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,p=s(t,n,u);i.exposeAction(e,p),o&&i.addCase(p.fulfilled,o),a&&i.addCase(p.pending,a),l&&i.addCase(p.rejected,l),c&&i.addMatcher(p.settled,c),i.exposeCaseReducer(e,{fulfilled:o||Zi,pending:a||Zi,rejected:l||Zi,settled:c||Zi})}function Zi(){}var za="listener",ja="completed",qa="cancelled",sh=`task-${qa}`,oh=`task-${ja}`,ah=`${za}-${qa}`,lh=`${za}-${ja}`;var{assign:Wa}=Object;var ds="listenerMiddleware";var dp=Wa(xt(`${ds}/add`),{withTypes:()=>dp}),ch=xt(`${ds}/removeAll`),pp=Wa(xt(`${ds}/remove`),{withTypes:()=>pp});function ft(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var fp=Oi(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Ji=class extends fp(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ka=class t extends Ji{static get(e){var r;let i=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,n=window.ftReduxStores[i];if(Di(n))return n;if(s==null)return;let o=Va({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ua({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Br(o.getInitialState());for(let p of c.keeping)u[p]=(l??u)[p];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return o.reducer(l,c)}});return window.ftReduxStores[s.name]=new t(o,a,s.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ti,this.injectInto=(n,o)=>this.reduxSlice.injectInto(n,o),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let s=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,o,a)=>{let l=o,c=n[l];return c?(...u)=>{let p=c(...u.map(s));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];vr(f,u)||this.setState({[p]:s(u)})}}}),this.eventBus=i??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var en=class{static format(e,r,i,s,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,s,!!n)):this.getIntlDateTime(e,r,i,s,!!n)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,s,n){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return n?l:s?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var tn=d(v()),hp="ft-app-info",St=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};St.eventName="authentication-change";var Yr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yr.eventName="ui-locale-changed";var mp={session:(t,e)=>{(0,tn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>E.dispatchEvent(new St(e.payload)),0))}},E=tn.FtReduxStore.get({name:hp,reducers:mp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ga=d(v()),rn=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},Ya=(0,Ga.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(E)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,n;return((n=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1)?a=>en.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return rn([(0,ps.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),rn([(0,ps.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),rn([Wn({store:E.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),rn([Wn({store:E.name})],e.prototype,"uiLocale",void 0),e});var ln=d(v());var fs=d(v());var zt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=E.getState(),s=e??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let s=E.subscribe(()=>{i=t.get(e),i&&(s(),r(i))})}})}};var Ar=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:zt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):zt.await()}};var Ee=class extends Ar{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(n,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new fs.CacheRegistry,this.cache=e?s.commonCache:new fs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var nn=class extends Ee{async listMySearches(){let{session:e}=E.getState();return wi(e,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var sn=class extends Ee{async listMyBookmarks(){let e=E.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var on=class extends Ee{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=E.getState().session;return!!e?.sessionAuthenticated}};var an=class extends Ee{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 e=E.getState().session;return!!e?.sessionAuthenticated}};var yp="ft-user-assets",gp={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Fe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:s}=e.payload;ms(t,r,[...hs(t,r),s]),Xa(t,r,1,i),Qa(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;ms(t,r,hs(t,r).map(s=>s.id===i.id?i:s)),Qa(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:s}=e.payload;ms(t,r,hs(t,r).filter(n=>n.id!==s)),Xa(t,r,-1,i)}},Za={[Fe.SEARCHES]:"savedSearches",[Fe.BOOKMARKS]:"bookmarks",[Fe.BOOKS]:void 0,[Fe.COLLECTIONS]:void 0},hs=(t,e)=>{var r;let i=Za[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},ms=(t,e,r)=>{let i=Za[e];i&&(t[i]=r)},Xa=(t,e,r,i)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===Fe.BOOKMARKS&&i)){let n=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},Qa=(t,e)=>{let r=t.assetLabels.map(s=>s.title),i=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...i)},be=ln.FtReduxStore.get({name:yp,reducers:gp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Fe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ys=class{constructor(e=new on,r=new an){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sn,this.savedSearchesService=new nn,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=E.getState();(0,ln.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),be.actions.clearAssetCount(),be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();be.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&be.getState().assetCounts.allAsset[e]!==r.count&&be.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&be.getState().assetCounts.bookmarkByMap[e]!==r.count&&be.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(be.getState().assetCounts.bookmarkByMap).length!==0;e===Fe.BOOKMARKS&&r&&be.actions.clearBookmarkCountByMap(),be.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;be.actions.bookmarks(r)}}},vp=new ys;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=vp);var gs=class{addCommand(e,r=!1){E.commands.add(e,r)}consumeCommand(e){return E.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new gs;var Ue=d(v());var Ja,_r=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},bp=Symbol("clearAfterUnitTest"),cn=class extends(0,Ue.withEventBus)(Ee){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ja]=()=>{this.defaultMessages={},this.cache=new Ue.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=E.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Ue.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var s;let n=e.toLowerCase(),o=this.resolveContext(n);return new Ue.ParametrizedLabelResolver((s=this.defaultMessages[n])!==null&&s!==void 0?s:{},o).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof Ue.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new _r({loadedContexts:e})),this.dispatchEvent(new _r({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new _r({loadedContexts:[e]})),this.dispatchEvent(new _r({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Ue.delay)(0).then(()=>i()).catch(()=>null)))}};Ja=bp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Cr=window.FluidTopicsI18nService,un=window.FluidTopicsCustomI18nService;var el=d(v()),vs=class{highlightHtml(e,r,i){(0,el.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new vs;var tl=d(v());var bs=class{isDate(e){var r,i,s,n;return(n=(s=((i=(r=E.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1}format(e,r){var i,s,n,o;if(e==null)return"";try{return tl.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:E.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new bs;var rl=d(v());var Xr=class{static get(e,r){var i,s,n,o;let a=E.getState(),{lang:l,region:c}=(n=(s=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new rl.SearchPlaceConverter(a.baseUrl,e??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${l}-${c}`)}};var xs=class{urlToSearchRequest(e){return Xr.get().parse(e)}searchRequestToUrl(e){return Xr.get().serialize(e)}};window.FluidTopicsUrlService=new xs;var ht=d(v());var jt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};jt.eventName="before-location-change";var qt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};qt.eventName="change";var Ss=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},il=new Ss;var dn=class t extends ht.WithEventBus{static build(){return new t(window.history,il,()=>window.location,!1)}constructor(e,r,i,s){var n,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(n=e.state)===null||n===void 0?void 0:n.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ht.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new qt(this.currentItem())),0)}installProxies(){let e=r=>(i,s,[n,o,a])=>{let l=new jt(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...n,index:c,href:l.detail.nextLocation.href};i.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(jt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(jt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(qt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(qt.eventName,e)}currentItem(){return(0,ht.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ht.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,ht.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,ht.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let s=e,n=e+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(s=n),n++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,n=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=dn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var nl=d(R());var sl=nl.css`
11
+ `;var wr=d(v()),Zr=d(U());var Ur;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Ur||(Ur={}));var Et=d(v());var fd=d(v());var fo;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(fo||(fo={}));var ho;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(ho||(ho={}));var mo;(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"})(mo||(mo={}));var yo;(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"})(yo||(yo={}));var go;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(go||(go={}));var vo;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(vo||(vo={}));var bo;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(bo||(bo={}));var xo;(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"})(xo||(xo={}));var So;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(So||(So={}));var Eo;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Eo||(Eo={}));var Ao;(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"})(Ao||(Ao={}));var _o;(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"})(_o||(_o={}));var Co;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Co||(Co={}));var wo;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(wo||(wo={}));var Oo;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Oo||(Oo={}));var To;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(To||(To={}));var Ro;(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"})(Ro||(Ro={}));var dt;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(dt||(dt={}));var ko;(function(t){t.ASC="ASC",t.DESC="DESC"})(ko||(ko={}));var Lo;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Lo||(Lo={}));var Ai;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ai||(Ai={}));var Do;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Do||(Do={}));var Po;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Po||(Po={}));var No;(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"})(No||(No={}));var _i;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_i||(_i={}));var Io;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Io||(Io={}));var Ci;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ci||(Ci={}));var Mo;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Mo||(Mo={}));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 Fe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Fe||(Fe={}));var $o;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})($o||($o={}));var Fo;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Fo||(Fo={}));var Uo;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Uo||(Uo={}));var Bo;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Bo||(Bo={}));var Ho;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ho||(Ho={}));var Vo;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Vo||(Vo={}));var zo;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(zo||(zo={}));var jo;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(jo||(jo={}));var qo;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(qo||(qo={}));var Wo;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Wo||(Wo={}));var Ko;(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"})(Ko||(Ko={}));var Go;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Go||(Go={}));var hd={[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 Yo(t,e){return t===e||(hd[t]??[]).some(r=>Yo(r,e))}function wi(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(i=>Yo(i,e))}function Xo(t,...e){return t==null?!1:e.some(r=>wi(t,r))}var ps=d(U());var Qo=d(U(),1);var qn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},md=t=>({fromAttribute:e=>{if(e==null)return Br(t);try{return JSON.parse(e)}catch{return Br(t)}},toAttribute:e=>JSON.stringify(e)});function Zo(t,e){return(0,Qo.property)({type:Object,converter:md(t),hasChanged:Hr,...e??{}})}function yd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!vr(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!vr(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),n=s(t);if(r=n.length,r!==s(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let o=n[i];if(!vr(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function vr(t,e){try{return yd(t,e)}catch{return!1}}function Hr(t,e){return!vr(t,e)}function Br(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Oi(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let s=e(i);return s[t]=!0,s}}var Jo=d(U(),1);var Wn=t=>{let e=t??{};return(r,i)=>{var s;let n={hasChanged:Hr,attribute:!1,...e};(0,Jo.property)(n)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[i]),store:e.store})}};var Ti=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==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))}};var Bt=d(U(),1);var Ri=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){s(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ta=d(R(),1);var ki=globalThis,gd=ki.ShadowRoot&&(ki.ShadyCSS===void 0||ki.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ea=(t,e)=>{if(gd)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),s=ki.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=r.cssText,t.appendChild(i)}};var Li=class extends ta.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return ea(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){qn(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function ra(t,e,...r){var i;let s=t.querySelector(e);for(let n of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return s}var xr=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},oa,ia=Symbol("constructorPrototype"),na=Symbol("constructorName"),aa=Symbol("exportpartsDebouncer"),sa=Symbol("dynamicDependenciesLoaded"),br=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};br.eventName="exportparts-updated";var rt=class extends Li{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oa]=new Ri(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[aa].run(()=>{var s,n;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[na]=this.constructor.name,this[ia]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[na]&&Object.setPrototypeOf(this,this[ia])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[sa]||(r[sa]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(br.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(br.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new br)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let n=[...s??[],i];r=ra(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(e){var r,i,s,n,o,a;let l=f=>f!=null&&f.trim().length>0,c=e.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(o=(i=f.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],x=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],A=[...g,...x].filter(l).map(b=>b.trim());for(let b of A)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>c.map(g=>`${f}:${g}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};oa=aa;xr([(0,Bt.property)()],rt.prototype,"exportpartsPrefix",void 0);xr([Zo([])],rt.prototype,"exportpartsPrefixes",void 0);xr([(0,Bt.property)({reflect:!0})],rt.prototype,"exportparts",void 0);xr([(0,Bt.property)()],rt.prototype,"customStylesheet",void 0);xr([(0,Bt.property)()],rt.prototype,"elementToFocus",void 0);xr([(0,Bt.state)()],rt.prototype,"useAdoptedStyleSheets",void 0);function Di(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Vr=Symbol("internalReduxEventsUnsubscribers"),bt=Symbol("internalStoresUnsubscribers"),Ht=Symbol("internalStores"),vd=Oi(Symbol("withRedux"),function(t){var e,r,i;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ht].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ht].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Ht].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ht].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Ht].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ht].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[bt].has(o.store):this[bt].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l;this[bt].set(o,a.subscribe(()=>this.updateFromStores())),this[Vr].set(o,[]),Di(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let p=f=>this[u](f);a.addEventListener(c.eventName,p),this[Vr].get(o).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[bt].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[bt].has(o)&&this[bt].get(o)(),this[bt].delete(o),(a=this[Vr].get(o))===null||a===void 0||a.forEach(l=>l()),this[Vr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=bt,r=Ht,i=Vr,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),la=class extends vd(rt){};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 bd=typeof Symbol=="function"&&Symbol.observable||"@@observable",ca=bd,Kn=()=>Math.random().toString(36).substring(7).split("").join("."),xd={INIT:`@@redux/INIT${Kn()}`,REPLACE:`@@redux/REPLACE${Kn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kn()}`},Pi=xd;function Ni(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Gn(t,e,r){if(typeof t!="function")throw new Error(ae(2));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(Gn)(t,e)}let i=t,s=e,n=new Map,o=n,a=0,l=!1;function c(){o===n&&(o=new Map,n.forEach((b,_)=>{o.set(_,b)}))}function u(){if(l)throw new Error(ae(3));return s}function p(b){if(typeof b!="function")throw new Error(ae(4));if(l)throw new Error(ae(5));let _=!0;c();let P=a++;return o.set(P,b),function(){if(_){if(l)throw new Error(ae(6));_=!1,c(),o.delete(P),n=null}}}function f(b){if(!Ni(b))throw new Error(ae(7));if(typeof b.type>"u")throw new Error(ae(8));if(typeof b.type!="string")throw new Error(ae(17));if(l)throw new Error(ae(9));try{l=!0,s=i(s,b)}finally{l=!1}return(n=o).forEach(P=>{P()}),b}function g(b){if(typeof b!="function")throw new Error(ae(10));i=b,f({type:Pi.REPLACE})}function x(){let b=p;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ae(11));function P(){let O=_;O.next&&O.next(u())}return P(),{unsubscribe:b(P)}},[ca](){return this}}}return f({type:Pi.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:g,[ca]:x}}function Sd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Pi.INIT})>"u")throw new Error(ae(12));if(typeof r(void 0,{type:Pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ae(13))})}function ua(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),s,n;try{Sd(r)}catch(o){n=o}return function(a={},l){if(n)throw n;let c=!1,u={};for(let p=0;p<i.length;p++){let f=i[p],g=r[f],x=a[f],A=g(x,l);if(typeof A>"u"){let b=l&&l.type;throw new Error(ae(14))}u[f]=A,c=c||A!==x}return c=c||i.length!==Object.keys(a).length,c?u:a}}function zr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function da(...t){return e=>(r,i)=>{let s=e(r,i),n=()=>{throw new Error(ae(15))},o={getState:s.getState,dispatch:(l,...c)=>n(l,...c)},a=t.map(l=>l(o));return n=zr(...a)(s.dispatch),{...s,dispatch:n}}}function pa(t){return Ni(t)&&"type"in t&&typeof t.type=="string"}var Sa=Symbol.for("immer-nothing"),fa=Symbol.for("immer-draftable"),ye=Symbol.for("immer-state");function je(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var ke=Object,Er=ke.getPrototypeOf,Fi="constructor",ji="prototype",Zn="configurable",Ui="enumerable",Mi="writable",jr="value",it=t=>!!t&&!!t[ye];function Le(t){return t?Ea(t)||Wi(t)||!!t[fa]||!!t[Fi]?.[fa]||Ki(t)||Gi(t):!1}var Ed=ke[ji][Fi].toString(),ha=new WeakMap;function Ea(t){if(!t||!os(t))return!1;let e=Er(t);if(e===null||e===ke[ji])return!0;let r=ke.hasOwnProperty.call(e,Fi)&&e[Fi];if(r===Object)return!0;if(!Sr(r))return!1;let i=ha.get(r);return i===void 0&&(i=Function.toString.call(r),ha.set(r,i)),i===Ed}function qi(t,e,r=!0){Kr(t)===0?(r?Reflect.ownKeys(t):ke.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((i,s)=>e(s,i,t))}function Kr(t){let e=t[ye];return e?e.type_:Wi(t)?1:Ki(t)?2:Gi(t)?3:0}var Yn=(t,e,r=Kr(t))=>r===2?t.has(e):ke[ji].hasOwnProperty.call(t,e),Jn=(t,e,r=Kr(t))=>r===2?t.get(e):t[e],Bi=(t,e,r,i=Kr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function Ad(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Wi=Array.isArray,Ki=t=>t instanceof Map,Gi=t=>t instanceof Set,os=t=>typeof t=="object",Sr=t=>typeof t=="function",Xn=t=>typeof t=="boolean";function _d(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var pt=t=>t.copy_||t.base_;var as=t=>t.modified_?t.copy_:t.base_;function es(t,e){if(Ki(t))return new Map(t);if(Gi(t))return new Set(t);if(Wi(t))return Array[ji].slice.call(t);let r=Ea(t);if(e===!0||e==="class_only"&&!r){let i=ke.getOwnPropertyDescriptors(t);delete i[ye];let s=Reflect.ownKeys(i);for(let n=0;n<s.length;n++){let o=s[n],a=i[o];a[Mi]===!1&&(a[Mi]=!0,a[Zn]=!0),(a.get||a.set)&&(i[o]={[Zn]:!0,[Mi]:!0,[Ui]:a[Ui],[jr]:t[o]})}return ke.create(Er(t),i)}else{let i=Er(t);if(i!==null&&r)return{...t};let s=ke.create(i);return ke.assign(s,t)}}function ls(t,e=!1){return Yi(t)||it(t)||!Le(t)||(Kr(t)>1&&ke.defineProperties(t,{set:Ii,add:Ii,clear:Ii,delete:Ii}),ke.freeze(t),e&&qi(t,(r,i)=>{ls(i,!0)},!1)),t}function Cd(){je(2)}var Ii={[jr]:Cd};function Yi(t){return t===null||!os(t)?!0:ke.isFrozen(t)}var Hi="MapSet",ts="Patches",ma="ArrayMethods",Aa={};function Vt(t){let e=Aa[t];return e||je(0,t),e}var ya=t=>!!Aa[t];var qr,_a=()=>qr,wd=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ya(Hi)?Vt(Hi):void 0,arrayMethodsPlugin_:ya(ma)?Vt(ma):void 0});function ga(t,e){e&&(t.patchPlugin_=Vt(ts),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function rs(t){is(t),t.drafts_.forEach(Od),t.drafts_=null}function is(t){t===qr&&(qr=t.parent_)}var va=t=>qr=wd(qr,t);function Od(t){let e=t[ye];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function ba(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ye].modified_&&(rs(e),je(4)),Le(t)&&(t=xa(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[ye].base_,t,e)}else t=xa(e,r);return Td(e,t,!0),rs(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Sa?t:void 0}function xa(t,e){if(Yi(e))return e;let r=e[ye];if(!r)return Vi(e,t.handledSet_,t);if(!Xi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Oa(r,t)}return r.copy_}function Td(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&ls(e,r)}function Ca(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Xi=(t,e)=>t.scope_===e,Rd=[];function wa(t,e,r,i){let s=pt(t),n=t.type_;if(i!==void 0&&Jn(s,i,n)===e){Bi(s,i,r,n);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;qi(s,(l,c)=>{if(it(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=t.draftLocations_.get(e)??Rd;for(let a of o)Bi(s,a,r,n)}function kd(t,e,r){t.callbacks_.push(function(s){let n=e;if(!n||!Xi(n,s))return;s.mapSetPlugin_?.fixSetContents(n);let o=as(n);wa(t,n.draft_??n,o,r),Oa(n,s)})}function Oa(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let s=i.getPath(t);s&&i.generatePatches_(t,s,e)}Ca(t)}}function Ld(t,e,r){let{scope_:i}=t;if(it(r)){let s=r[ye];Xi(s,i)&&s.callbacks_.push(function(){$i(t);let o=as(s);wa(t,r,o,e)})}else Le(r)&&t.callbacks_.push(function(){let n=pt(t);t.type_===3?n.has(r)&&Vi(r,i.handledSet_,i):Jn(n,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Vi(Jn(t.copy_,e,t.type_),i.handledSet_,i)})}function Vi(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||it(t)||e.has(t)||!Le(t)||Yi(t)||(e.add(t),qi(t,(i,s)=>{if(it(s)){let n=s[ye];if(Xi(n,r)){let o=as(n);Bi(t,i,o,t.type_),Ca(n)}}else Le(s)&&Vi(s,e,r)})),t}function Dd(t,e){let r=Wi(t),i={type_:r?1:0,scope_:e?e.scope_:_a(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,n=zi;r&&(s=[i],n=Wr);let{revoke:o,proxy:a}=Proxy.revocable(s,n);return i.draft_=a,i.revoke_=o,[a,i]}var zi={get(t,e){if(e===ye)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=pt(t);if(!Yn(s,e,t.type_))return Nd(t,s,e);let n=s[e];if(t.finalized_||!Le(n)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&_d(e))return n;if(n===Qn(t.base_,e)||Pd(t,e,n)){$i(t);let o=t.type_===1?+e:e,a=ss(t.scope_,n,t,o);return t.copy_[o]=a}return n},has(t,e){return e in pt(t)},ownKeys(t){return Reflect.ownKeys(pt(t))},set(t,e,r){let i=Ta(pt(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let s=Qn(pt(t),e),n=s?.[ye];if(n&&n.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(Ad(r,s)&&(r!==void 0||Yn(t.base_,e,t.type_)))return!0;$i(t),ns(t)}return t.copy_[e]===r&&(r!==void 0||Yn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),Ld(t,e,r)),!0},deleteProperty(t,e){return $i(t),Qn(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ns(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=pt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[Mi]:!0,[Zn]:t.type_!==1||e!=="length",[Ui]:i[Ui],[jr]:r[e]}},defineProperty(){je(11)},getPrototypeOf(t){return Er(t.base_)},setPrototypeOf(){je(12)}},Wr={};for(let t in zi){let e=zi[t];Wr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Wr.deleteProperty=function(t,e){return Wr.set.call(this,t,e,void 0)};Wr.set=function(t,e,r){return zi.set.call(this,t[0],e,r,t[0])};function Qn(t,e){let r=t[ye];return(r?pt(r):t)[e]}function Pd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!Le(r)||r[ye]?!1:t.baseRefs_.has(r)}function Nd(t,e,r){let i=Ta(e,r);return i?jr in i?i[jr]:i.get?.call(t.draft_):void 0}function Ta(t,e){if(!(e in t))return;let r=Er(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Er(r)}}function ns(t){t.modified_||(t.modified_=!0,t.parent_&&ns(t.parent_))}function $i(t){t.copy_||(t.assigned_=new Map,t.copy_=es(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Id=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(Sr(e)&&!Sr(r)){let n=r;r=e;let o=this;return function(l=n,...c){return o.produce(l,u=>r.call(this,u,...c))}}Sr(r)||je(6),i!==void 0&&!Sr(i)&&je(7);let s;if(Le(e)){let n=va(this),o=ss(n,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?rs(n):is(n)}return ga(n,i),ba(s,n)}else if(!e||!os(e)){if(s=r(e),s===void 0&&(s=e),s===Sa&&(s=void 0),this.autoFreeze_&&ls(s,!0),i){let n=[],o=[];Vt(ts).generateReplacementPatches_(e,s,{patches_:n,inversePatches_:o}),i(n,o)}return s}else je(1,e)},this.produceWithPatches=(e,r)=>{if(Sr(e))return(o,...a)=>this.produceWithPatches(o,l=>e(l,...a));let i,s;return[this.produce(e,r,(o,a)=>{i=o,s=a}),i,s]},Xn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Xn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Xn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Le(t)||je(8),it(t)&&(t=Ra(t));let e=va(this),r=ss(e,t,void 0);return r[ye].isManual_=!0,is(e),r}finishDraft(t,e){let r=t&&t[ye];(!r||!r.isManual_)&&je(9);let{scope_:i}=r;return ga(i,e),ba(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let i=Vt(ts).applyPatches_;return it(t)?i(t,e):this.produce(t,s=>i(s,e))}};function ss(t,e,r,i){let[s,n]=Ki(e)?Vt(Hi).proxyMap_(e,r):Gi(e)?Vt(Hi).proxySet_(e,r):Dd(e,r);return(r?.scope_??_a()).drafts_.push(s),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?kd(r,n,i):n.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:c}=l;n.modified_&&c&&c.generatePatches_(n,[],l)}),s}function Ra(t){return it(t)||je(10,t),ka(t)}function ka(t){if(!Le(t)||Yi(t))return t;let e=t[ye],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=es(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=es(t,!0);return qi(r,(s,n)=>{Bi(r,s,ka(n))},i),e&&(e.finalized_=!1),r}var Md=globalThis.Iterator,Yf=typeof Md?.from=="function";var $d=new Id,cs=$d.produce;function La(t){return({dispatch:r,getState:i})=>s=>n=>typeof n=="function"?n(r,i,t):s(n)}var Da=La(),Pa=La;var Fd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zr:zr.apply(null,arguments)},rh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Ud=t=>t&&typeof t.match=="function";function xt(t,e){function r(...i){if(e){let s=e(...i);if(!s)throw new Error(ft(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>pa(i)&&i.type===t,r}var Fa=class Gr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Gr.prototype)}static get[Symbol.species](){return Gr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Gr(...e[0].concat(this)):new Gr(...e.concat(this))}};function Na(t){return Le(t)?cs(t,()=>{}):t}function Qi(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Bd(t){return typeof t=="boolean"}var Hd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:n=!0}=e??{},o=new Fa;return r&&(Bd(r)?o.push(Da):o.push(Pa(r.extraArgument))),o},Vd="RTK_autoBatch";var Ia=t=>e=>{setTimeout(e,t)},zd=(t,e)=>r=>{let i=!1,s=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(o),r())},n=t(s),o=setTimeout(s,e)},jd=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),s=!0,n=!1,o=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zd(window.requestAnimationFrame,100):Ia(10):t.type==="callback"?t.queueNotification:Ia(t.timeout),c=()=>{o=!1,n&&(n=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let p=()=>s&&u(),f=i.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Vd],n=!s,n&&(o||(o=!0,l(c))),i.dispatch(u)}finally{s=!0}}})},qd=t=>function(r){let{autoBatch:i=!0}=r??{},s=new Fa(t);return i&&s.push(jd(typeof i=="object"?i:void 0)),s};function Ua(t){let e=Hd(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:n=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(Ni(r))l=ua(r);else throw new Error(ft(1));let c;typeof i=="function"?c=i(e):c=e();let u=zr;s&&(u=Fd({trace:!1,...typeof s=="object"&&s}));let p=da(...c),f=qd(p),g=typeof a=="function"?a(f):f(),x=u(...g);return Gn(l,o,x)}function Ba(t){let e={},r=[],i,s={addCase(n,o){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(ft(28));if(a in e)throw new Error(ft(29));return e[a]=o,s},addAsyncThunk(n,o){return o.pending&&(e[n.pending.type]=o.pending),o.rejected&&(e[n.rejected.type]=o.rejected),o.fulfilled&&(e[n.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:n.settled,reducer:o.settled}),s},addMatcher(n,o){return r.push({matcher:n,reducer:o}),s},addDefaultCase(n){return i=n,s}};return t(s),[e,r,i]}function Wd(t){return typeof t=="function"}function Kd(t,e){let[r,i,s]=Ba(e),n;if(Wd(t))n=()=>Na(t());else{let a=Na(t);n=()=>a}function o(a=n(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[s]),c.reduce((u,p)=>{if(p)if(it(u)){let g=p(u,l);return g===void 0?u:g}else{if(Le(u))return cs(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return o.getInitialState=n,o}var Gd=(t,e)=>Ud(t)?t.match(e):t(e);function Yd(...t){return e=>t.some(r=>Gd(r,e))}var Xd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qd=(t=21)=>{let e="",r=t;for(;r--;)e+=Xd[Math.random()*64|0];return e},Zd=["name","message","stack","code"],us=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Ma=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Jd=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Zd)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},$a="External signal was aborted",ep=(()=>{function t(e,r,i){let s=xt(e+"/fulfilled",(l,c,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),n=xt(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=xt(e+"/rejected",(l,c,u,p,f)=>({payload:p,error:(i&&i.serializeError||Jd)(l||"Rejected"),meta:{...f||{},arg:u,requestId:c,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,p,f)=>{let g=i?.idGenerator?i.idGenerator(l):Qd(),x=new AbortController,A,b;function _(S){b=S,x.abort()}c&&(c.aborted?_($a):c.addEventListener("abort",()=>_($a),{once:!0}));let P=(async function(){let S;try{let k=i?.condition?.(l,{getState:p,extra:f});if(rp(k)&&(k=await k),k===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let G=new Promise((F,Y)=>{A=()=>{Y({name:"AbortError",message:b||"Aborted"})},x.signal.addEventListener("abort",A,{once:!0})});u(n(g,l,i?.getPendingMeta?.({requestId:g,arg:l},{getState:p,extra:f}))),S=await Promise.race([G,Promise.resolve(r(l,{dispatch:u,getState:p,extra:f,requestId:g,signal:x.signal,abort:_,rejectWithValue:((F,Y)=>new us(F,Y)),fulfillWithValue:((F,Y)=>new Ma(F,Y))})).then(F=>{if(F instanceof us)throw F;return F instanceof Ma?s(F.payload,g,l,F.meta):s(F,g,l)})])}catch(k){S=k instanceof us?o(null,g,l,k.payload,k.meta):o(k,g,l)}finally{A&&x.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(P,{abort:_,requestId:g,arg:l,unwrap(){return P.then(tp)}})}}return Object.assign(a,{pending:n,rejected:o,fulfilled:s,settled:Yd(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function tp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function rp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ha=Symbol.for("rtk-slice-createasyncthunk"),nh={[Ha]:ep};function ip(t,e){return`${t}/${e}`}function np({creators:t}={}){let e=t?.asyncThunk?.[Ha];return function(i){let{name:s,reducerPath:n=s}=i;if(!s)throw new Error(ft(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(op()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(S,O){let k=typeof S=="string"?S:S.type;if(!k)throw new Error(ft(12));if(k in l.sliceCaseReducersByType)throw new Error(ft(13));return l.sliceCaseReducersByType[k]=O,c},addMatcher(S,O){return l.sliceMatchers.push({matcher:S,reducer:O}),c},exposeAction(S,O){return l.actionCreators[S]=O,c},exposeCaseReducer(S,O){return l.sliceCaseReducersByName[S]=O,c}};a.forEach(S=>{let O=o[S],k={reducerName:S,type:ip(s,S),createNotation:typeof i.reducers=="function"};lp(O)?up(k,O,c,e):ap(k,O,c)});function u(){let[S={},O=[],k=void 0]=typeof i.extraReducers=="function"?Ba(i.extraReducers):[i.extraReducers],G={...S,...l.sliceCaseReducersByType};return Kd(i.initialState,F=>{for(let Y in G)F.addCase(Y,G[Y]);for(let Y of l.sliceMatchers)F.addMatcher(Y.matcher,Y.reducer);for(let Y of O)F.addMatcher(Y.matcher,Y.reducer);k&&F.addDefaultCase(k)})}let p=S=>S,f=new Map,g=new WeakMap,x;function A(S,O){return x||(x=u()),x(S,O)}function b(){return x||(x=u()),x.getInitialState()}function _(S,O=!1){function k(F){let Y=F[S];return typeof Y>"u"&&O&&(Y=Qi(g,k,b)),Y}function G(F=p){let Y=Qi(f,O,()=>new WeakMap);return Qi(Y,F,()=>{let Fr={};for(let[$e,Ut]of Object.entries(i.selectors??{}))Fr[$e]=sp(Ut,F,()=>Qi(g,F,b),O);return Fr})}return{reducerPath:S,getSelectors:G,get selectors(){return G(k)},selectSlice:k}}let P={name:s,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,..._(n),injectInto(S,{reducerPath:O,...k}={}){let G=O??n;return S.inject({reducerPath:G,reducer:A},k),{...P,..._(G,!0)}}};return P}}function sp(t,e,r,i){function s(n,...o){let a=e(n);return typeof a>"u"&&i&&(a=r()),t(a,...o)}return s.unwrapped=t,s}var Va=np();function op(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function ap({type:t,reducerName:e,createNotation:r},i,s){let n,o;if("reducer"in i){if(r&&!cp(i))throw new Error(ft(17));n=i.reducer,o=i.prepare}else n=i;s.addCase(t,n).exposeCaseReducer(e,n).exposeAction(e,o?xt(t,o):xt(t))}function lp(t){return t._reducerDefinitionType==="asyncThunk"}function cp(t){return t._reducerDefinitionType==="reducerWithPrepare"}function up({type:t,reducerName:e},r,i,s){if(!s)throw new Error(ft(18));let{payloadCreator:n,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,p=s(t,n,u);i.exposeAction(e,p),o&&i.addCase(p.fulfilled,o),a&&i.addCase(p.pending,a),l&&i.addCase(p.rejected,l),c&&i.addMatcher(p.settled,c),i.exposeCaseReducer(e,{fulfilled:o||Zi,pending:a||Zi,rejected:l||Zi,settled:c||Zi})}function Zi(){}var za="listener",ja="completed",qa="cancelled",sh=`task-${qa}`,oh=`task-${ja}`,ah=`${za}-${qa}`,lh=`${za}-${ja}`;var{assign:Wa}=Object;var ds="listenerMiddleware";var dp=Wa(xt(`${ds}/add`),{withTypes:()=>dp}),ch=xt(`${ds}/removeAll`),pp=Wa(xt(`${ds}/remove`),{withTypes:()=>pp});function ft(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var fp=Oi(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Ji=class extends fp(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ka=class t extends Ji{static get(e){var r;let i=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,n=window.ftReduxStores[i];if(Di(n))return n;if(s==null)return;let o=Va({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ua({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Br(o.getInitialState());for(let p of c.keeping)u[p]=(l??u)[p];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return o.reducer(l,c)}});return window.ftReduxStores[s.name]=new t(o,a,s.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ti,this.injectInto=(n,o)=>this.reduxSlice.injectInto(n,o),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let s=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,o,a)=>{let l=o,c=n[l];return c?(...u)=>{let p=c(...u.map(s));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];vr(f,u)||this.setState({[p]:s(u)})}}}),this.eventBus=i??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var en=class{static format(e,r,i,s,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,s,!!n)):this.getIntlDateTime(e,r,i,s,!!n)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,s,n){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return n?l:s?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var tn=d(v()),hp="ft-app-info",St=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};St.eventName="authentication-change";var Yr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yr.eventName="ui-locale-changed";var mp={session:(t,e)=>{(0,tn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>E.dispatchEvent(new St(e.payload)),0))}},E=tn.FtReduxStore.get({name:hp,reducers:mp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ga=d(v()),rn=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},Ya=(0,Ga.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(E)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,n;return((n=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1)?a=>en.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return rn([(0,ps.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),rn([(0,ps.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),rn([Wn({store:E.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),rn([Wn({store:E.name})],e.prototype,"uiLocale",void 0),e});var ln=d(v());var fs=d(v());var zt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=E.getState(),s=e??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let s=E.subscribe(()=>{i=t.get(e),i&&(s(),r(i))})}})}};var Ar=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:zt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):zt.await()}};var Ee=class extends Ar{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(n,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new fs.CacheRegistry,this.cache=e?s.commonCache:new fs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var nn=class extends Ee{async listMySearches(){let{session:e}=E.getState();return wi(e,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var sn=class extends Ee{async listMyBookmarks(){let e=E.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var on=class extends Ee{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=E.getState().session;return!!e?.sessionAuthenticated}};var an=class extends Ee{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 e=E.getState().session;return!!e?.sessionAuthenticated}};var yp="ft-user-assets",gp={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Fe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:s}=e.payload;ms(t,r,[...hs(t,r),s]),Xa(t,r,1,i),Qa(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;ms(t,r,hs(t,r).map(s=>s.id===i.id?i:s)),Qa(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:s}=e.payload;ms(t,r,hs(t,r).filter(n=>n.id!==s)),Xa(t,r,-1,i)}},Za={[Fe.SEARCHES]:"savedSearches",[Fe.BOOKMARKS]:"bookmarks",[Fe.BOOKS]:void 0,[Fe.COLLECTIONS]:void 0},hs=(t,e)=>{var r;let i=Za[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},ms=(t,e,r)=>{let i=Za[e];i&&(t[i]=r)},Xa=(t,e,r,i)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===Fe.BOOKMARKS&&i)){let n=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},Qa=(t,e)=>{let r=t.assetLabels.map(s=>s.title),i=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...i)},be=ln.FtReduxStore.get({name:yp,reducers:gp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Fe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ys=class{constructor(e=new on,r=new an){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=E.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sn,this.savedSearchesService=new nn,E.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=E.getState();(0,ln.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),be.actions.clearAssetCount(),be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();be.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&be.getState().assetCounts.allAsset[e]!==r.count&&be.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&be.getState().assetCounts.bookmarkByMap[e]!==r.count&&be.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(be.getState().assetCounts.bookmarkByMap).length!==0;e===Fe.BOOKMARKS&&r&&be.actions.clearBookmarkCountByMap(),be.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;be.actions.bookmarks(r)}}},vp=new ys;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=vp);var gs=class{addCommand(e,r=!1){E.commands.add(e,r)}consumeCommand(e){return E.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new gs;var Ue=d(v());var Ja,_r=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},bp=Symbol("clearAfterUnitTest"),cn=class extends(0,Ue.withEventBus)(Ee){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ja]=()=>{this.defaultMessages={},this.cache=new Ue.CacheRegistry,this.listeners={}},this.currentUiLocale=E.getState().uiLocale,E.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=E.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Ue.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var s;let n=e.toLowerCase(),o=this.resolveContext(n);return new Ue.ParametrizedLabelResolver((s=this.defaultMessages[n])!==null&&s!==void 0?s:{},o).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof Ue.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new _r({loadedContexts:e})),this.dispatchEvent(new _r({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new _r({loadedContexts:[e]})),this.dispatchEvent(new _r({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Ue.delay)(0).then(()=>i()).catch(()=>null)))}};Ja=bp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Cr=window.FluidTopicsI18nService,un=window.FluidTopicsCustomI18nService;var el=d(v()),vs=class{highlightHtml(e,r,i){(0,el.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new vs;var tl=d(v());var bs=class{isDate(e){var r,i,s,n;return(n=(i=((s=(r=E.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&n!==void 0?n:!1}format(e,r){var i,s,n,o;if(e==null)return"";try{return tl.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:E.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new bs;var rl=d(v());var Xr=class{static get(e,r){var i,s,n,o;let a=E.getState(),{lang:l,region:c}=(o=(s=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new rl.SearchPlaceConverter(a.baseUrl,e??20,(n=a.localesConfiguration)===null||n===void 0?void 0:n.allLanguagesAllowed,r??`${l}-${c}`)}};var xs=class{urlToSearchRequest(e){return Xr.get().parse(e)}searchRequestToUrl(e){return Xr.get().serialize(e)}};window.FluidTopicsUrlService=new xs;var ht=d(v());var jt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};jt.eventName="before-location-change";var qt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};qt.eventName="change";var Ss=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},il=new Ss;var dn=class t extends ht.WithEventBus{static build(){return new t(window.history,il,()=>window.location,!1)}constructor(e,r,i,s){var n,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(n=e.state)===null||n===void 0?void 0:n.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ht.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new qt(this.currentItem())),0)}installProxies(){let e=r=>(i,s,[n,o,a])=>{let l=new jt(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...n,index:c,href:l.detail.nextLocation.href};i.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(jt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(jt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(qt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(qt.eventName,e)}currentItem(){return(0,ht.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ht.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,ht.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,ht.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let s=e,n=e+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(s=n),n++;return s}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,n=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=dn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var nl=d(R());var sl=nl.css`
12
12
  `;var al=d(R()),xe=d(U()),Gt=d(v());var Wt=d(v());function ol(t,e){let{authenticationRequired:r,session:i}=E.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var pn=class extends Ar{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Es=class t extends Wt.FtStateManager{static build(e){return new t(E,e)}constructor(e,r){super(),this.store=e,this.cache=new Wt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new pn,this.cleanSessionDebouncer=new Wt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Wt.Debouncer(500),this.apiProvider=r??(()=>zt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(St.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(St.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=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(e)}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 e;let r=await this.cache.get("availableContentLocales",()=>ol(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Yr(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return Xo(E.getState().session,...e)}},As=Es.build();var Kt=class extends Event{constructor(e,r,i,s){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=s??!1}};var Qr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:s,callbackRef:n}of i){let o=s.deref(),a=n.deref();o===void 0||a===void 0||o.dispatchEvent(new Kt(e.context,o,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,s=this.pendingContextRequests.get(e.context);s===void 0&&this.pendingContextRequests.set(e.context,s={callbacks:new WeakMap,requests:[]});let n=s.callbacks.get(r);n===void 0&&s.callbacks.set(r,n=new WeakSet),n.has(i)||(n.add(i),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var ne=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},z=class extends Gt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=As,this.contextRoot=new Qr}render(){return al.html`
13
13
  <slot></slot>
14
- `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Cr.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};z.elementDefinitions={};z.styles=sl;ne([(0,xe.property)()],z.prototype,"baseUrl",void 0);ne([(0,xe.property)()],z.prototype,"tenantId",void 0);ne([(0,xe.property)()],z.prototype,"apiIntegrationIdentifier",void 0);ne([(0,xe.property)()],z.prototype,"apiIntegrationAppVersion",void 0);ne([(0,xe.property)()],z.prototype,"uiLocale",void 0);ne([(0,Gt.jsonProperty)(null)],z.prototype,"availableUiLocales",void 0);ne([(0,Gt.jsonProperty)(null)],z.prototype,"metadataConfiguration",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"editorMode",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"noCustom",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"openExternalDocumentInNewTab",void 0);ne([(0,xe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],z.prototype,"noCustomComponent",void 0);ne([(0,xe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],z.prototype,"noCustomCode",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"withManualResources",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"navigatorOnline",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"forcedOffline",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"authenticationRequired",void 0);ne([(0,Gt.jsonProperty)([])],z.prototype,"messageContexts",void 0);ne([(0,Gt.jsonProperty)(void 0)],z.prototype,"session",void 0);var cl=d(v());var ll={"ft-app-context":z};(0,cl.customElements)(ll);var fn=class t extends Event{constructor(){super(t.eventName)}};fn.eventName="search-context-clear-all-filters";var hn=t=>t.request.virtualField===Ai.TITLE_ONLY&&t.request.scope===Ci.DOCUMENTS,mn=t=>t.request.keywordMatch==dt.MANDATORY;var _s=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},ws=class extends CustomEvent{constructor(e){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:e}})}},ul=Symbol("registerInterval"),Cs=Symbol("registerAttempts"),Ep=40,Ap=(0,wr.applyMixinOnce)(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(i){var s,n,o;super.willUpdate(i),i.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(n=i.get("neededSearchRequests"))!==null&&n!==void 0?n:[]),(o=this.stateManager)===null||o===void 0||o.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Cs]=0,this.tryToRegisterToContext(),this[ul]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Cs]>Ep?window.clearInterval(this[ul]):(this[Cs]++,this.dispatchEvent(new ws(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return _s([(0,Zr.state)()],e.prototype,"stateManager",void 0),_s([(0,Zr.state)({hasChanged:wr.hasChanged})],e.prototype,"neededSearchRequests",void 0),_s([(0,Zr.property)()],e.prototype,"searchRegistrationId",void 0),e}),At=class extends Ap(wr.FtLitElementRedux){};var In=d(R()),pe=d(U()),pu=d(Yt()),Mr=d(v());var bl=d(R()),ce=d(U()),xl=d(Yt()),Jr=d(v());var gl=d(R()),J=d(v()),pl=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorContent),le={color:pl,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",pl),opacityContentOnSurfacePressed:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:J.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},fl=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorPrimary),hl={color:fl,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",fl)},ml=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorSecondary),yl={color:ml,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",ml)},vl=gl.css`
14
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Cr.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};z.elementDefinitions={};z.styles=sl;ne([(0,xe.property)()],z.prototype,"baseUrl",void 0);ne([(0,xe.property)()],z.prototype,"tenantId",void 0);ne([(0,xe.property)()],z.prototype,"apiIntegrationIdentifier",void 0);ne([(0,xe.property)()],z.prototype,"apiIntegrationAppVersion",void 0);ne([(0,xe.property)()],z.prototype,"uiLocale",void 0);ne([(0,Gt.jsonProperty)(null)],z.prototype,"availableUiLocales",void 0);ne([(0,Gt.jsonProperty)(null)],z.prototype,"metadataConfiguration",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"editorMode",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"noCustom",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"openExternalDocumentInNewTab",void 0);ne([(0,xe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],z.prototype,"noCustomComponent",void 0);ne([(0,xe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],z.prototype,"noCustomCode",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"withManualResources",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"navigatorOnline",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"forcedOffline",void 0);ne([(0,xe.property)({type:Boolean})],z.prototype,"authenticationRequired",void 0);ne([(0,Gt.jsonProperty)([])],z.prototype,"messageContexts",void 0);ne([(0,Gt.jsonProperty)(void 0)],z.prototype,"session",void 0);var cl=d(v());var ll={"ft-app-context":z};(0,cl.customElements)(ll);var fn=class t extends Event{constructor(){super(t.eventName)}};fn.eventName="search-context-clear-all-filters";var hn=t=>t.request.virtualField===Ai.TITLE_ONLY&&t.request.scope===Ci.DOCUMENTS,mn=t=>t.request.keywordMatch==dt.MANDATORY;var _s=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},ws=class extends CustomEvent{constructor(e){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:e}})}},ul=Symbol("registerInterval"),Cs=Symbol("registerAttempts"),Ep=40,Ap=(0,wr.applyMixinOnce)(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(i){var s,n,o;super.willUpdate(i),i.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(o=i.get("neededSearchRequests"))!==null&&o!==void 0?o:[]),(n=this.stateManager)===null||n===void 0||n.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Cs]=0,this.tryToRegisterToContext(),this[ul]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Cs]>Ep?window.clearInterval(this[ul]):(this[Cs]++,this.dispatchEvent(new ws(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return _s([(0,Zr.state)()],e.prototype,"stateManager",void 0),_s([(0,Zr.state)({hasChanged:wr.hasChanged})],e.prototype,"neededSearchRequests",void 0),_s([(0,Zr.property)()],e.prototype,"searchRegistrationId",void 0),e}),At=class extends Ap(wr.FtLitElementRedux){};var In=d(R()),pe=d(U()),pu=d(Yt()),Mr=d(v());var bl=d(R()),ce=d(U()),xl=d(Yt()),Jr=d(v());var gl=d(R()),J=d(v()),pl=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorContent),le={color:pl,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",pl),opacityContentOnSurfacePressed:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:J.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},fl=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorPrimary),hl={color:fl,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",fl)},ml=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorSecondary),yl={color:ml,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",ml)},vl=gl.css`
15
15
  :host {
16
16
  display: contents;
17
17
  }
@@ -1684,7 +1684,7 @@
1684
1684
  ${ge.messages.CUSTOM()}
1685
1685
  </span>
1686
1686
  </ft-chip>
1687
- </ft-tooltip>`}updated(e){var r,i,s,n;if(super.updated(e),e.get("filters")){let o=(i=(r=this.filters)===null||r===void 0?void 0:r.filter(l=>l.dateFilter||l.rangeFilter).length)!==null&&i!==void 0?i:0,a=e.get("filters").filter(l=>l.dateFilter||l.rangeFilter).length;(o-a==1||a>0&&!this.hasSomethingToDisplay)&&this.announceFilters()}if(e.get("facets")){let o=(n=(s=this.facets)===null||s===void 0?void 0:s.filter(l=>this.getSelectedValues(l).length>0).length)!==null&&n!==void 0?n:0,a=e.get("facets").filter(l=>this.getSelectedValues(l).length>0).length;(o-a==1||a>0&&!this.hasSomethingToDisplay)&&this.announceFilters()}if(e.has("searchInDocumentTitlesOnly")){let o=e.get("searchInDocumentTitlesOnly");(!o&&this.searchInDocumentTitlesOnly||o&&!this.hasSomethingToDisplay)&&this.announceFilters()}if(e.has("keywordMatch")){let o=e.get("keywordMatch");(!o&&this.keywordMatch||o&&!this.hasSomethingToDisplay)&&this.announceFilters()}}announceFilters(){this.ariaNotificationDebouncer.run(async()=>{let e=await this.awaitI18n({...this.selectedFacetsAriaNotification,args:[this.numberOfChips]});this.sendAriaNotification(e,{checkVisibility:this.numberOfChips!=0})})}};ve.elementDefinitions={"ft-chip":q,"ft-tooltip":Q};ve.styles=po;ut([(0,zn.property)({type:Boolean})],ve.prototype,"displayLabel",void 0);ut([(0,zn.property)({type:Boolean})],ve.prototype,"forceTooltip",void 0);ut([(0,zn.property)({type:Boolean})],ve.prototype,"multiLine",void 0);ut([(0,K.numberProperty)()],ve.prototype,"hierarchicalValueTruncatingLevel",void 0);ut([(0,K.redux)({store:"search"})],ve.prototype,"facets",void 0);ut([(0,K.redux)({store:"search",selector:hn})],ve.prototype,"searchInDocumentTitlesOnly",void 0);ut([(0,K.redux)({store:"search",selector:mn})],ve.prototype,"keywordMatch",void 0);ut([(0,K.redux)({store:"search",selector:t=>t.request.metadataFilters})],ve.prototype,"filters",void 0);ut([(0,K.redux)({store:"search",selector:t=>t.request.scope})],ve.prototype,"scope",void 0);ut([(0,K.jsonProperty)({context:"officialContext",key:"searchSelectedFacetsAriaNotification"})],ve.prototype,"selectedFacetsAriaNotification",void 0);var rd={"ft-search-selected-facets":ve};(0,id.customElements)(rd);})();
1687
+ </ft-tooltip>`}updated(e){var r,i,s,n;if(super.updated(e),e.get("filters")){let o=(s=(r=this.filters)===null||r===void 0?void 0:r.filter(l=>l.dateFilter||l.rangeFilter).length)!==null&&s!==void 0?s:0,a=e.get("filters").filter(l=>l.dateFilter||l.rangeFilter).length;(o-a==1||a>0&&!this.hasSomethingToDisplay)&&this.announceFilters()}if(e.get("facets")){let o=(n=(i=this.facets)===null||i===void 0?void 0:i.filter(l=>this.getSelectedValues(l).length>0).length)!==null&&n!==void 0?n:0,a=e.get("facets").filter(l=>this.getSelectedValues(l).length>0).length;(o-a==1||a>0&&!this.hasSomethingToDisplay)&&this.announceFilters()}if(e.has("searchInDocumentTitlesOnly")){let o=e.get("searchInDocumentTitlesOnly");(!o&&this.searchInDocumentTitlesOnly||o&&!this.hasSomethingToDisplay)&&this.announceFilters()}if(e.has("keywordMatch")){let o=e.get("keywordMatch");(!o&&this.keywordMatch||o&&!this.hasSomethingToDisplay)&&this.announceFilters()}}announceFilters(){this.ariaNotificationDebouncer.run(async()=>{let e=await this.awaitI18n({...this.selectedFacetsAriaNotification,args:[this.numberOfChips]});this.sendAriaNotification(e,{checkVisibility:this.numberOfChips!=0})})}};ve.elementDefinitions={"ft-chip":q,"ft-tooltip":Q};ve.styles=po;ut([(0,zn.property)({type:Boolean})],ve.prototype,"displayLabel",void 0);ut([(0,zn.property)({type:Boolean})],ve.prototype,"forceTooltip",void 0);ut([(0,zn.property)({type:Boolean})],ve.prototype,"multiLine",void 0);ut([(0,K.numberProperty)()],ve.prototype,"hierarchicalValueTruncatingLevel",void 0);ut([(0,K.redux)({store:"search"})],ve.prototype,"facets",void 0);ut([(0,K.redux)({store:"search",selector:hn})],ve.prototype,"searchInDocumentTitlesOnly",void 0);ut([(0,K.redux)({store:"search",selector:mn})],ve.prototype,"keywordMatch",void 0);ut([(0,K.redux)({store:"search",selector:t=>t.request.metadataFilters})],ve.prototype,"filters",void 0);ut([(0,K.redux)({store:"search",selector:t=>t.request.scope})],ve.prototype,"scope",void 0);ut([(0,K.jsonProperty)({context:"officialContext",key:"searchSelectedFacetsAriaNotification"})],ve.prototype,"selectedFacetsAriaNotification",void 0);var rd={"ft-search-selected-facets":ve};(0,id.customElements)(rd);})();
1688
1688
  /*! Bundled license information:
1689
1689
 
1690
1690
  @lit/reactive-element/css-tag.js: