@fluid-topics/ft-search-quick-filters 2.2.11 → 2.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-quick-filters.d.ts +4 -13
- package/build/ft-search-quick-filters.js +23 -28
- package/build/ft-search-quick-filters.light.js +10 -16
- package/build/ft-search-quick-filters.min.js +24 -30
- package/build/ft-search-quick-filters.properties.d.ts +1 -6
- package/build/ft-search-quick-filters.properties.js +1 -3
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/models/ft-quick-filters.models.d.ts +9 -0
- package/build/models/ft-quick-filters.models.js +1 -0
- package/package.json +4 -4
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
|
|
3
3
|
import { FtSearchQuickFiltersProperties } from "./ft-search-quick-filters.properties";
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
filters: Array<{
|
|
7
|
-
key: string;
|
|
8
|
-
values: string[];
|
|
9
|
-
}>;
|
|
10
|
-
id: string;
|
|
11
|
-
};
|
|
4
|
+
import { FtSearchQuickFiltersPreset } from "./models/ft-quick-filters.models";
|
|
12
5
|
declare const FtSearchQuickFilters_base: typeof FtSearchComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
|
|
13
6
|
export declare class FtSearchQuickFilters extends FtSearchQuickFilters_base implements FtSearchQuickFiltersProperties {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
selectedPresetId?: string;
|
|
17
|
-
contentLocale?: string;
|
|
18
|
-
private metadataFilters;
|
|
7
|
+
builtPresets?: Array<FtSearchQuickFiltersPreset>;
|
|
8
|
+
selectedPreset?: string;
|
|
19
9
|
constructor();
|
|
20
10
|
private get hasPresets();
|
|
11
|
+
private applySelectedPreset;
|
|
21
12
|
protected willUpdate(props: PropertyValues): void;
|
|
22
13
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
23
14
|
}
|
|
@@ -8,35 +8,40 @@ import { html, } from "lit";
|
|
|
8
8
|
import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
|
|
9
9
|
import { withI18n } from "@fluid-topics/ft-i18n";
|
|
10
10
|
import { repeat } from "lit/directives/repeat.js";
|
|
11
|
-
import { property
|
|
12
|
-
import { jsonProperty, redux, } from "@fluid-topics/ft-wc-utils";
|
|
11
|
+
import { property } from "lit/decorators.js";
|
|
13
12
|
import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
|
|
13
|
+
import { waitFor } from "@fluid-topics/ft-wc-utils";
|
|
14
14
|
import { quickFiltersContext, quickFiltersDefaultMessages, } from "./SearchQuickFiltersMessages";
|
|
15
|
-
import { styles } from "./ft-search-quick-filters.styles";
|
|
16
15
|
export class FtSearchQuickFilters extends withI18n(FtSearchComponent) {
|
|
17
16
|
constructor() {
|
|
18
17
|
super();
|
|
19
|
-
this.
|
|
20
|
-
this.metadataFilters = [];
|
|
18
|
+
this.builtPresets = [];
|
|
21
19
|
this.addI18nContext(quickFiltersContext, quickFiltersDefaultMessages);
|
|
22
20
|
this.addStore(ftAppInfoStore);
|
|
23
21
|
}
|
|
24
22
|
get hasPresets() {
|
|
25
|
-
return this.
|
|
23
|
+
return this.builtPresets != null && this.builtPresets.length > 0;
|
|
26
24
|
}
|
|
27
|
-
|
|
28
|
-
var _a
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const currentPreset = ((_a = this.presets) !== null && _a !== void 0 ? _a : []).find((p) => p.name === this.selectedPresetId);
|
|
25
|
+
applySelectedPreset() {
|
|
26
|
+
var _a;
|
|
27
|
+
if (this.selectedPreset && this.stateManager) {
|
|
28
|
+
const currentPreset = ((_a = this.builtPresets) !== null && _a !== void 0 ? _a : []).find((p) => p.id === this.selectedPreset);
|
|
32
29
|
if (currentPreset) {
|
|
33
|
-
|
|
30
|
+
this.stateManager.clearAllFilters();
|
|
34
31
|
for (const filter of currentPreset.filters) {
|
|
35
|
-
|
|
32
|
+
this.stateManager.setValueFilter(filter.key, filter.values);
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
}
|
|
37
|
+
willUpdate(props) {
|
|
38
|
+
super.update(props);
|
|
39
|
+
if (props.has("selectedPreset")) {
|
|
40
|
+
waitFor(() => this.stateManager).then(() => {
|
|
41
|
+
this.applySelectedPreset();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
40
45
|
render() {
|
|
41
46
|
var _a;
|
|
42
47
|
return html `
|
|
@@ -46,11 +51,11 @@ export class FtSearchQuickFilters extends withI18n(FtSearchComponent) {
|
|
|
46
51
|
part="presets"
|
|
47
52
|
label="${quickFiltersContext.messages.presetsSelector()}"
|
|
48
53
|
outlined
|
|
49
|
-
@change=${(e) => this.
|
|
50
|
-
${repeat((_a = this.
|
|
51
|
-
<ft-select-option value="${p.
|
|
54
|
+
@change=${(e) => this.selectedPreset = e.detail}>
|
|
55
|
+
${repeat((_a = this.builtPresets) !== null && _a !== void 0 ? _a : [], (p) => p.name, (p) => html `
|
|
56
|
+
<ft-select-option value="${p.id}"
|
|
52
57
|
label="${p.name}"
|
|
53
|
-
?selected=${p.
|
|
58
|
+
?selected=${p.id === this.selectedPreset}>
|
|
54
59
|
</ft-select-option>
|
|
55
60
|
`)}
|
|
56
61
|
</ft-select>
|
|
@@ -58,16 +63,6 @@ export class FtSearchQuickFilters extends withI18n(FtSearchComponent) {
|
|
|
58
63
|
`;
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
|
-
FtSearchQuickFilters.styles = styles;
|
|
62
|
-
__decorate([
|
|
63
|
-
jsonProperty([])
|
|
64
|
-
], FtSearchQuickFilters.prototype, "presets", void 0);
|
|
65
66
|
__decorate([
|
|
66
67
|
property({ type: String, reflect: true })
|
|
67
|
-
], FtSearchQuickFilters.prototype, "
|
|
68
|
-
__decorate([
|
|
69
|
-
redux({ store: "search", selector: (state) => state.request.contentLocale })
|
|
70
|
-
], FtSearchQuickFilters.prototype, "contentLocale", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
state()
|
|
73
|
-
], FtSearchQuickFilters.prototype, "metadataFilters", void 0);
|
|
68
|
+
], FtSearchQuickFilters.prototype, "selectedPreset", void 0);
|
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
"use strict";(()=>{var $s=Object.create;var _r=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var zs=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ws=Object.prototype.hasOwnProperty;var Ne=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Qs=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of zs(t))!Ws.call(e,s)&&s!==r&&_r(e,s,{get:()=>t[s],enumerable:!(n=Ks(t,s))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?$s(Gs(e)):{},Qs(t||!e||!e.__esModule?_r(r,"default",{value:e,enumerable:!0}):r,e));var b=Ne((la,xr)=>{xr.exports=ftGlobals.wcUtils});var Q=Ne((da,Cr)=>{Cr.exports=ftGlobals.lit});var q=Ne((pa,wr)=>{wr.exports=ftGlobals.litDecorators});var Ns=Ne((Ql,Ds)=>{Ds.exports=ftGlobals.litRepeat});var Vs=f(b());var Rt=f(Q());var ge=f(b()),Sr=f(q());var Dt;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Dt||(Dt={}));var Z=f(b());var Ys=f(b());var Tr;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Tr||(Tr={}));var Or;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Or||(Or={}));var Rr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Rr||(Rr={}));var Ir;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Ir||(Ir={}));var kr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(kr||(kr={}));var Mr;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Mr||(Mr={}));var Dr;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Dr||(Dr={}));var Nr;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Nr||(Nr={}));var Lr;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Lr||(Lr={}));var Pr;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Pr||(Pr={}));var Fr;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Fr||(Fr={}));var Ur;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ur||(Ur={}));var jr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(jr||(jr={}));var Br;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Br||(Br={}));var Vr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Vr||(Vr={}));var qr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(qr||(qr={}));var Nt;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Nt||(Nt={}));var Hr;(function(e){e.ASC="ASC",e.DESC="DESC"})(Hr||(Hr={}));var $r;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})($r||($r={}));var Lt;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Lt||(Lt={}));var Kr;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Kr||(Kr={}));var zr;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(zr||(zr={}));var Gr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Gr||(Gr={}));var Wr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Wr||(Wr={}));var Qr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Qr||(Qr={}));var Pt;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pt||(Pt={}));var Yr;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Yr||(Yr={}));var x;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(x||(x={}));var F;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(F||(F={}));var Xr;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Xr||(Xr={}));var Jr;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Jr||(Jr={}));var Zr;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Zr||(Zr={}));var en;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(en||(en={}));var tn;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(tn||(tn={}));var rn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(rn||(rn={}));var nn;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(nn||(nn={}));var sn;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(sn||(sn={}));var an;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(an||(an={}));var on;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(on||(on={}));var cn;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(cn||(cn={}));var un;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(un||(un={}));var Xs={[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 ln(e,t){return e===t||(Xs[e]??[]).some(r=>ln(r,t))}function Ft(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>ln(n,t))}var ir=f(q());var dn=f(q(),1);var Ut=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function pn(e,t){return(0,dn.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Ae(e);try{return JSON.parse(r)}catch{return Ae(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:be,...t??{}})}function Js(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ue(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!ue(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=a=>Object.keys(a).filter(o=>a[o]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let a=i[n];if(!ue(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ue(e,t){try{return Js(e,t)}catch{return!1}}function be(e,t){return!ue(e,t)}function Ae(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Le(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var hn=f(q(),1);var jt=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:be,attribute:!1,...t};(0,hn.property)(i)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(o=>o[n]),store:t.store})}};var Pe=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var ee=f(q(),1);var Fe=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){s(o);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var mn=f(Q(),1);var Ue=globalThis,Zs=Ue.ShadowRoot&&(Ue.ShadyCSS===void 0||Ue.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var fn=(e,t)=>{if(Zs)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=Ue.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var je=class extends mn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return fn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Ut(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function yn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var de=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},vn,gn=Symbol("constructorPrototype"),Sn=Symbol("constructorName"),An=Symbol("exportpartsDebouncer"),En=Symbol("dynamicDependenciesLoaded"),le=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};le.eventName="exportparts-updated";var H=class extends je{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[vn]=new Fe(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[An].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Sn]=this.constructor.name,this[gn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Sn]&&Object.setPrototypeOf(this,this[gn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[En]||(r[En]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(le.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(le.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new le)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=yn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,a,o;let c=p=>p!=null&&p.trim().length>0,u=t.filter(c).map(p=>p.trim());if(u.length===0){this.exportparts=void 0;return}let l=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],_=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[],T=[...g,..._].filter(c).map(y=>y.trim());for(let y of T)l.add(y)}if(l.size===0){this.exportparts=void 0;return}let d=[...l.values()].flatMap(p=>u.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};vn=An;de([(0,ee.property)()],H.prototype,"exportpartsPrefix",void 0);de([pn([])],H.prototype,"exportpartsPrefixes",void 0);de([(0,ee.property)({reflect:!0})],H.prototype,"exportparts",void 0);de([(0,ee.property)()],H.prototype,"customStylesheet",void 0);de([(0,ee.property)()],H.prototype,"elementToFocus",void 0);de([(0,ee.state)()],H.prototype,"useAdoptedStyleSheets",void 0);function Be(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var _e=Symbol("internalReduxEventsUnsubscribers"),Y=Symbol("internalStoresUnsubscribers"),te=Symbol("internalStores"),ei=Le(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[te].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[te].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[te].get(a)}addStore(a,o){var c;o=(c=o??a.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[te].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[te].delete(o)}setupStores(){this.unsubscribeFromStores(),this[te].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[Y].has(a.store):this[Y].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var c;this[Y].set(a,o.subscribe(()=>this.updateFromStores())),this[_e].set(a,[]),Be(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,l)=>{if(typeof this[l]=="function"&&(!u.store||o.name===u.store)){let d=p=>this[l](p);o.addEventListener(u.eventName,d),this[_e].get(a).push(()=>o.removeEventListener(u.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[Y].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[Y].has(a)&&this[Y].get(a)(),this[Y].delete(a),(o=this[_e].get(a))===null||o===void 0||o.forEach(c=>c()),this[_e].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Y,r=te,n=_e,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),bn=class extends ei(H){};function R(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ti=typeof Symbol=="function"&&Symbol.observable||"@@observable",_n=ti,Bt=()=>Math.random().toString(36).substring(7).split("").join("."),ri={INIT:`@@redux/INIT${Bt()}`,REPLACE:`@@redux/REPLACE${Bt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bt()}`},Ve=ri;function qe(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vt(e,t,r){if(typeof e!="function")throw new Error(R(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(R(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(R(1));return r(Vt)(e,t)}let n=e,s=t,i=new Map,a=i,o=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((y,O)=>{a.set(O,y)}))}function l(){if(c)throw new Error(R(3));return s}function d(y){if(typeof y!="function")throw new Error(R(4));if(c)throw new Error(R(5));let O=!0;u();let N=o++;return a.set(N,y),function(){if(O){if(c)throw new Error(R(6));O=!1,u(),a.delete(N),i=null}}}function p(y){if(!qe(y))throw new Error(R(7));if(typeof y.type>"u")throw new Error(R(8));if(typeof y.type!="string")throw new Error(R(17));if(c)throw new Error(R(9));try{c=!0,s=n(s,y)}finally{c=!1}return(i=a).forEach(N=>{N()}),y}function g(y){if(typeof y!="function")throw new Error(R(10));n=y,p({type:Ve.REPLACE})}function _(){let y=d;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(R(11));function N(){let S=O;S.next&&S.next(l())}return N(),{unsubscribe:y(N)}},[_n](){return this}}}return p({type:Ve.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:g,[_n]:_}}function ni(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ve.INIT})>"u")throw new Error(R(12));if(typeof r(void 0,{type:Ve.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(R(13))})}function xn(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),s,i;try{ni(r)}catch(a){i=a}return function(o={},c){if(i)throw i;let u=!1,l={};for(let d=0;d<n.length;d++){let p=n[d],g=r[p],_=o[p],T=g(_,c);if(typeof T>"u"){let y=c&&c.type;throw new Error(R(14))}l[p]=T,u=u||T!==_}return u=u||n.length!==Object.keys(o).length,u?l:o}}function xe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Cn(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(R(15))},a={getState:s.getState,dispatch:(c,...u)=>i(c,...u)},o=e.map(c=>c(a));return i=xe(...o)(s.dispatch),{...s,dispatch:i}}}function wn(e){return qe(e)&&"type"in e&&typeof e.type=="string"}var Ln=Symbol.for("immer-nothing"),Tn=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function B(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var L=Object,he=L.getPrototypeOf,ze="constructor",Je="prototype",Kt="configurable",Ge="enumerable",$e="writable",Ce="value",$=e=>!!e&&!!e[I];function P(e){return e?Pn(e)||et(e)||!!e[Tn]||!!e[ze]?.[Tn]||tt(e)||rt(e):!1}var si=L[Je][ze].toString(),On=new WeakMap;function Pn(e){if(!e||!Zt(e))return!1;let t=he(e);if(t===null||t===L[Je])return!0;let r=L.hasOwnProperty.call(t,ze)&&t[ze];if(r===Object)return!0;if(!pe(r))return!1;let n=On.get(r);return n===void 0&&(n=Function.toString.call(r),On.set(r,n)),n===si}function Ze(e,t,r=!0){Oe(e)===0?(r?Reflect.ownKeys(e):L.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Oe(e){let t=e[I];return t?t.type_:et(e)?1:tt(e)?2:rt(e)?3:0}var qt=(e,t,r=Oe(e))=>r===2?e.has(t):L[Je].hasOwnProperty.call(e,t),zt=(e,t,r=Oe(e))=>r===2?e.get(t):e[t],We=(e,t,r,n=Oe(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ii(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var et=Array.isArray,tt=e=>e instanceof Map,rt=e=>e instanceof Set,Zt=e=>typeof e=="object",pe=e=>typeof e=="function",Ht=e=>typeof e=="boolean";function ai(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var K=e=>e.copy_||e.base_;var er=e=>e.modified_?e.copy_:e.base_;function Gt(e,t){if(tt(e))return new Map(e);if(rt(e))return new Set(e);if(et(e))return Array[Je].slice.call(e);let r=Pn(e);if(t===!0||t==="class_only"&&!r){let n=L.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let a=s[i],o=n[a];o[$e]===!1&&(o[$e]=!0,o[Kt]=!0),(o.get||o.set)&&(n[a]={[Kt]:!0,[$e]:!0,[Ge]:o[Ge],[Ce]:e[a]})}return L.create(he(e),n)}else{let n=he(e);if(n!==null&&r)return{...e};let s=L.create(n);return L.assign(s,e)}}function tr(e,t=!1){return nt(e)||$(e)||!P(e)||(Oe(e)>1&&L.defineProperties(e,{set:He,add:He,clear:He,delete:He}),L.freeze(e),t&&Ze(e,(r,n)=>{tr(n,!0)},!1)),e}function oi(){B(2)}var He={[Ce]:oi};function nt(e){return e===null||!Zt(e)?!0:L.isFrozen(e)}var Qe="MapSet",Wt="Patches",Rn="ArrayMethods",Fn={};function re(e){let t=Fn[e];return t||B(0,e),t}var In=e=>!!Fn[e];var we,Un=()=>we,ci=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:In(Qe)?re(Qe):void 0,arrayMethodsPlugin_:In(Rn)?re(Rn):void 0});function kn(e,t){t&&(e.patchPlugin_=re(Wt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qt(e){Yt(e),e.drafts_.forEach(ui),e.drafts_=null}function Yt(e){e===we&&(we=e.parent_)}var Mn=e=>we=ci(we,e);function ui(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Dn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(Qt(t),B(4)),P(e)&&(e=Nn(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=Nn(t,r);return li(t,e,!0),Qt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ln?e:void 0}function Nn(e,t){if(nt(t))return t;let r=t[I];if(!r)return Ye(t,e.handledSet_,e);if(!st(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Vn(r,e)}return r.copy_}function li(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tr(t,r)}function jn(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var st=(e,t)=>e.scope_===t,di=[];function Bn(e,t,r,n){let s=K(e),i=e.type_;if(n!==void 0&&zt(s,n,i)===t){We(s,n,r,i);return}if(!e.draftLocations_){let o=e.draftLocations_=new Map;Ze(s,(c,u)=>{if($(u)){let l=o.get(u)||[];l.push(c),o.set(u,l)}})}let a=e.draftLocations_.get(t)??di;for(let o of a)We(s,o,r,i)}function pi(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!st(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let a=er(i);Bn(e,i.draft_??i,a,r),Vn(i,s)})}function Vn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}jn(e)}}function hi(e,t,r){let{scope_:n}=e;if($(r)){let s=r[I];st(s,n)&&s.callbacks_.push(function(){Ke(e);let a=er(s);Bn(e,r,a,t)})}else P(r)&&e.callbacks_.push(function(){let i=K(e);e.type_===3?i.has(r)&&Ye(r,n.handledSet_,n):zt(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ye(zt(e.copy_,t,e.type_),n.handledSet_,n)})}function Ye(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||$(e)||t.has(e)||!P(e)||nt(e)||(t.add(e),Ze(e,(n,s)=>{if($(s)){let i=s[I];if(st(i,r)){let a=er(i);We(e,n,a,e.type_),jn(i)}}else P(s)&&Ye(s,t,r)})),e}function fi(e,t){let r=et(e),n={type_:r?1:0,scope_:t?t.scope_:Un(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Xe;r&&(s=[n],i=Te);let{revoke:a,proxy:o}=Proxy.revocable(s,i);return n.draft_=o,n.revoke_=a,[o,n]}var Xe={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=K(e);if(!qt(s,t,e.type_))return yi(e,s,t);let i=s[t];if(e.finalized_||!P(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ai(t))return i;if(i===$t(e.base_,t)||mi(e,t,i)){Ke(e);let a=e.type_===1?+t:t,o=Jt(e.scope_,i,e,a);return e.copy_[a]=o}return i},has(e,t){return t in K(e)},ownKeys(e){return Reflect.ownKeys(K(e))},set(e,t,r){let n=qn(K(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=$t(K(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ii(r,s)&&(r!==void 0||qt(e.base_,t,e.type_)))return!0;Ke(e),Xt(e)}return e.copy_[t]===r&&(r!==void 0||qt(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),hi(e,t,r)),!0},deleteProperty(e,t){return Ke(e),$t(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Xt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=K(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[$e]:!0,[Kt]:e.type_!==1||t!=="length",[Ge]:n[Ge],[Ce]:r[t]}},defineProperty(){B(11)},getPrototypeOf(e){return he(e.base_)},setPrototypeOf(){B(12)}},Te={};for(let e in Xe){let t=Xe[e];Te[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Te.deleteProperty=function(e,t){return Te.set.call(this,e,t,void 0)};Te.set=function(e,t,r){return Xe.set.call(this,e[0],t,r,e[0])};function $t(e,t){let r=e[I];return(r?K(r):e)[t]}function mi(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!P(r)||r[I]?!1:e.baseRefs_.has(r)}function yi(e,t,r){let n=qn(t,r);return n?Ce in n?n[Ce]:n.get?.call(e.draft_):void 0}function qn(e,t){if(!(t in e))return;let r=he(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=he(r)}}function Xt(e){e.modified_||(e.modified_=!0,e.parent_&&Xt(e.parent_))}function Ke(e){e.copy_||(e.assigned_=new Map,e.copy_=Gt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var gi=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(pe(t)&&!pe(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,l=>r.call(this,l,...u))}}pe(r)||B(6),n!==void 0&&!pe(n)&&B(7);let s;if(P(t)){let i=Mn(this),a=Jt(i,t,void 0),o=!0;try{s=r(a),o=!1}finally{o?Qt(i):Yt(i)}return kn(i,n),Dn(s,i)}else if(!t||!Zt(t)){if(s=r(t),s===void 0&&(s=t),s===Ln&&(s=void 0),this.autoFreeze_&&tr(s,!0),n){let i=[],a=[];re(Wt).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:a}),n(i,a)}return s}else B(1,t)},this.produceWithPatches=(t,r)=>{if(pe(t))return(a,...o)=>this.produceWithPatches(a,c=>t(c,...o));let n,s;return[this.produce(t,r,(a,o)=>{n=a,s=o}),n,s]},Ht(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ht(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ht(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){P(e)||B(8),$(e)&&(e=Hn(e));let t=Mn(this),r=Jt(t,e,void 0);return r[I].isManual_=!0,Yt(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&B(9);let{scope_:n}=r;return kn(n,t),Dn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=re(Wt).applyPatches_;return $(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Jt(e,t,r,n){let[s,i]=tt(t)?re(Qe).proxyMap_(t,r):rt(t)?re(Qe).proxySet_(t,r):fi(t,r);return(r?.scope_??Un()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?pi(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),s}function Hn(e){return $(e)||B(10,e),$n(e)}function $n(e){if(!P(e)||nt(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Gt(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Gt(e,!0);return Ze(r,(s,i)=>{We(r,s,$n(i))},n),t&&(t.finalized_=!1),r}var Si=globalThis.Iterator,ro=typeof Si?.from=="function";var Ei=new gi,rr=Ei.produce;function Kn(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var zn=Kn(),Gn=Kn;var vi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xe:xe.apply(null,arguments)},uo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Ai=e=>e&&typeof e.match=="function";function X(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(z(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>wn(n)&&n.type===e,r}var Jn=class Re extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Re.prototype)}static get[Symbol.species](){return Re}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Re(...t[0].concat(this)):new Re(...t.concat(this))}};function Wn(e){return P(e)?rr(e,()=>{}):e}function it(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function bi(e){return typeof e=="boolean"}var _i=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},a=new Jn;return r&&(bi(r)?a.push(zn):a.push(Gn(r.extraArgument))),a},xi="RTK_autoBatch";var Qn=e=>t=>{setTimeout(t,e)},Ci=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(s),a=setTimeout(s,t)},wi=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,a=!1,o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ci(window.requestAnimationFrame,100):Qn(10):e.type==="callback"?e.queueNotification:Qn(e.timeout),u=()=>{a=!1,i&&(i=!1,o.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let d=()=>s&&l(),p=n.subscribe(d);return o.add(l),()=>{p(),o.delete(l)}},dispatch(l){try{return s=!l?.meta?.[xi],i=!s,i&&(a||(a=!0,c(u))),n.dispatch(l)}finally{s=!0}}})},Ti=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Jn(e);return n&&s.push(wi(typeof n=="object"?n:void 0)),s};function Zn(e){let t=_i(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{},c;if(typeof r=="function")c=r;else if(qe(r))c=xn(r);else throw new Error(z(1));let u;typeof n=="function"?u=n(t):u=t();let l=xe;s&&(l=vi({trace:!1,...typeof s=="object"&&s}));let d=Cn(...u),p=Ti(d),g=typeof o=="function"?o(p):p(),_=l(...g);return Vt(c,a,_)}function es(e){let t={},r=[],n,s={addCase(i,a){let o=typeof i=="string"?i:i.type;if(!o)throw new Error(z(28));if(o in t)throw new Error(z(29));return t[o]=a,s},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Oi(e){return typeof e=="function"}function Ri(e,t){let[r,n,s]=es(t),i;if(Oi(e))i=()=>Wn(e());else{let o=Wn(e);i=()=>o}function a(o=i(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[s]),u.reduce((l,d)=>{if(d)if($(l)){let g=d(l,c);return g===void 0?l:g}else{if(P(l))return rr(l,p=>d(p,c));{let p=d(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},o)}return a.getInitialState=i,a}var Ii=(e,t)=>Ai(e)?e.match(t):e(t);function ki(...e){return t=>e.some(r=>Ii(r,t))}var Mi="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Di=(e=21)=>{let t="",r=e;for(;r--;)t+=Mi[Math.random()*64|0];return t},Ni=["name","message","stack","code"],nr=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Yn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Li=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ni)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Xn="External signal was aborted",Pi=(()=>{function e(t,r,n){let s=X(t+"/fulfilled",(c,u,l,d)=>({payload:c,meta:{...d||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),i=X(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),a=X(t+"/rejected",(c,u,l,d,p)=>({payload:d,error:(n&&n.serializeError||Li)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function o(c,{signal:u}={}){return(l,d,p)=>{let g=n?.idGenerator?n.idGenerator(c):Di(),_=new AbortController,T,y;function O(m){y=m,_.abort()}u&&(u.aborted?O(Xn):u.addEventListener("abort",()=>O(Xn),{once:!0}));let N=(async function(){let m;try{let E=n?.condition?.(c,{getState:d,extra:p});if(Ui(E)&&(E=await E),E===!1||_.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((A,C)=>{T=()=>{C({name:"AbortError",message:y||"Aborted"})},_.signal.addEventListener("abort",T,{once:!0})});l(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:p}))),m=await Promise.race([V,Promise.resolve(r(c,{dispatch:l,getState:d,extra:p,requestId:g,signal:_.signal,abort:O,rejectWithValue:((A,C)=>new nr(A,C)),fulfillWithValue:((A,C)=>new Yn(A,C))})).then(A=>{if(A instanceof nr)throw A;return A instanceof Yn?s(A.payload,g,c,A.meta):s(A,g,c)})])}catch(E){m=E instanceof nr?a(null,g,c,E.payload,E.meta):a(E,g,c)}finally{T&&_.signal.removeEventListener("abort",T)}return n&&!n.dispatchConditionRejection&&a.match(m)&&m.meta.condition||l(m),m})();return Object.assign(N,{abort:O,requestId:g,arg:c,unwrap(){return N.then(Fi)}})}}return Object.assign(o,{pending:i,rejected:a,fulfilled:s,settled:ki(a,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Fi(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ui(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ts=Symbol.for("rtk-slice-createasyncthunk"),po={[ts]:Pi};function ji(e,t){return`${e}/${t}`}function Bi({creators:e}={}){let t=e?.asyncThunk?.[ts];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(z(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(qi()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,S){let E=typeof m=="string"?m:m.type;if(!E)throw new Error(z(12));if(E in c.sliceCaseReducersByType)throw new Error(z(13));return c.sliceCaseReducersByType[E]=S,u},addMatcher(m,S){return c.sliceMatchers.push({matcher:m,reducer:S}),u},exposeAction(m,S){return c.actionCreators[m]=S,u},exposeCaseReducer(m,S){return c.sliceCaseReducersByName[m]=S,u}};o.forEach(m=>{let S=a[m],E={reducerName:m,type:ji(s,m),createNotation:typeof n.reducers=="function"};$i(S)?zi(E,S,u,t):Hi(E,S,u)});function l(){let[m={},S=[],E=void 0]=typeof n.extraReducers=="function"?es(n.extraReducers):[n.extraReducers],V={...m,...c.sliceCaseReducersByType};return Ri(n.initialState,A=>{for(let C in V)A.addCase(C,V[C]);for(let C of c.sliceMatchers)A.addMatcher(C.matcher,C.reducer);for(let C of S)A.addMatcher(C.matcher,C.reducer);E&&A.addDefaultCase(E)})}let d=m=>m,p=new Map,g=new WeakMap,_;function T(m,S){return _||(_=l()),_(m,S)}function y(){return _||(_=l()),_.getInitialState()}function O(m,S=!1){function E(A){let C=A[m];return typeof C>"u"&&S&&(C=it(g,E,y)),C}function V(A=d){let C=it(p,S,()=>new WeakMap);return it(C,A,()=>{let br={};for(let[qs,Hs]of Object.entries(n.selectors??{}))br[qs]=Vi(Hs,A,()=>it(g,A,y),S);return br})}return{reducerPath:m,getSelectors:V,get selectors(){return V(E)},selectSlice:E}}let N={name:s,reducer:T,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...O(i),injectInto(m,{reducerPath:S,...E}={}){let V=S??i;return m.inject({reducerPath:V,reducer:T},E),{...N,...O(V,!0)}}};return N}}function Vi(e,t,r,n){function s(i,...a){let o=t(i);return typeof o>"u"&&n&&(o=r()),e(o,...a)}return s.unwrapped=e,s}var rs=Bi();function qi(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Hi({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!Ki(n))throw new Error(z(17));i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?X(e,a):X(e))}function $i(e){return e._reducerDefinitionType==="asyncThunk"}function Ki(e){return e._reducerDefinitionType==="reducerWithPrepare"}function zi({type:e,reducerName:t},r,n,s){if(!s)throw new Error(z(18));let{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:u,options:l}=r,d=s(e,i,l);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),o&&n.addCase(d.pending,o),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:a||at,pending:o||at,rejected:c||at,settled:u||at})}function at(){}var ns="listener",ss="completed",is="cancelled",ho=`task-${is}`,fo=`task-${ss}`,mo=`${ns}-${is}`,yo=`${ns}-${ss}`;var{assign:as}=Object;var sr="listenerMiddleware";var Gi=as(X(`${sr}/add`),{withTypes:()=>Gi}),go=X(`${sr}/removeAll`),Wi=as(X(`${sr}/remove`),{withTypes:()=>Wi});function z(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Qi=Le(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),ot=class extends Qi(Object){};window.ftReduxStores||(window.ftReduxStores={});var os=class e extends ot{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Be(i))return i;if(s==null)return;let a=rs({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),o=Zn({reducer:(c,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let l=Ae(a.getInitialState());for(let d of u.keeping)l[d]=(c??l)[d];return l}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...u.overwrites};return a.reducer(c,u)}});return window.ftReduxStores[s.name]=new e(a,o,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Pe,this.injectInto=(i,a)=>this.reduxSlice.injectInto(i,a),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,o)=>{let c=a,u=i[c];return u?(...l)=>{let d=u(...l.map(s));return this.reduxStore.dispatch(d),d}:l=>{let d=c,p=this.getState()[d];ue(p,l)||this.setState({[d]:s(l)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var ct=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return i?c:s?`${o} ${c}`:o}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ut=f(b()),Yi="ft-app-info",J=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};J.eventName="authentication-change";var Ie=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ie.eventName="ui-locale-changed";var Xi={session:(e,t)=>{(0,ut.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>h.dispatchEvent(new J(t.payload)),0))}},h=ut.FtReduxStore.get({name:Yi,reducers:Xi,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 cs=f(b()),lt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Go=(0,cs.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(h)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(o=>o.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?o=>ct.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return lt([(0,ir.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),lt([(0,ir.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),lt([jt({store:h.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),lt([jt({store:h.name})],t.prototype,"uiLocale",void 0),t});var mt=f(b());var ar=f(b());var ne=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=h.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=h.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var fe=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:ne.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ne.await()}};var D=class extends fe{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[c])=>o.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new ar.CacheRegistry,this.cache=t?s.commonCache:new ar.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var dt=class extends D{async listMySearches(){let{session:t}=h.getState();return Ft(t,x.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var pt=class extends D{async listMyBookmarks(){let t=h.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var ht=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var ft=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var Ji="ft-user-assets",Zi={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(F).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;cr(e,r,[...or(e,r),s]),us(e,r,1,n),ls(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;cr(e,r,or(e,r).map(s=>s.id===n.id?n:s)),ls(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;cr(e,r,or(e,r).filter(i=>i.id!==s)),us(e,r,-1,n)}},ds={[F.SEARCHES]:"savedSearches",[F.BOOKMARKS]:"bookmarks",[F.BOOKS]:void 0,[F.COLLECTIONS]:void 0},or=(e,t)=>{var r;let n=ds[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},cr=(e,t,r)=>{let n=ds[t];n&&(e[n]=r)},us=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===F.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},ls=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=mt.FtReduxStore.get({name:Ji,reducers:Zi,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(F).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ur=class{constructor(t=new ht,r=new ft){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=h.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pt,this.savedSearchesService=new dt,h.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=h.getState();(0,mt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===F.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(r)}}},ea=new ur;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ea);var lr=class{addCommand(t,r=!1){h.commands.add(t,r)}consumeCommand(t){return h.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new lr;var U=f(b());var ps,me=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ta=Symbol("clearAfterUnitTest"),yt=class extends(0,U.withEventBus)(D){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ps]=()=>{this.defaultMessages={},this.cache=new U.CacheRegistry,this.listeners={}},this.currentUiLocale=h.getState().uiLocale,h.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=h.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,U.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),a=this.resolveContext(i);return new U.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof U.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new me({loadedContexts:t})),this.dispatchEvent(new me({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new me({loadedContexts:[t]})),this.dispatchEvent(new me({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,U.delay)(0).then(()=>n()).catch(()=>null)))}};ps=ta;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var ye=window.FluidTopicsI18nService,gt=window.FluidTopicsCustomI18nService;var hs=f(b()),dr=class{highlightHtml(t,r,n){(0,hs.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new dr;var fs=f(b());var pr=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=h.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,a;if(t==null)return"";try{return fs.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:h.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new pr;var ms=f(b());var ke=class{static get(t,r){var n,s,i,a;let o=h.getState(),{lang:c,region:u}=(i=(s=(n=o.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ms.SearchPlaceConverter(o.baseUrl,t??20,(a=o.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed,r??`${c}-${u}`)}};var hr=class{urlToSearchRequest(t){return ke.get().parse(t)}searchRequestToUrl(t){return ke.get().serialize(t)}};window.FluidTopicsUrlService=new hr;var G=f(b());var se=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};se.eventName="before-location-change";var ie=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};ie.eventName="change";var fr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},ys=new fr;var St=class e extends G.WithEventBus{static build(){return new e(window.history,ys,()=>window.location,!1)}constructor(t,r,n,s){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,G.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new ie(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,a,o])=>{let c=new se(new URL(typeof o=="string"?o:(o??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let u=r(),l={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:c.detail.nextLocation.href};n.apply(s,[l,a,l.href]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(se.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(se.eventName,t)}addHistoryChangeListener(t){this.addEventListener(ie.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ie.eventName,t)}currentItem(){return(0,G.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,G.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,G.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,G.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=St.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var gs=f(Q());var Ss=gs.css`
|
|
2
|
-
`;var
|
|
1
|
+
"use strict";(()=>{var js=Object.create;var Er=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var Vs=Object.getOwnPropertyNames;var qs=Object.getPrototypeOf,Hs=Object.prototype.hasOwnProperty;var Ne=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var $s=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Vs(t))!Hs.call(e,s)&&s!==r&&Er(e,s,{get:()=>t[s],enumerable:!(n=Bs(t,s))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?js(qs(e)):{},$s(t||!e||!e.__esModule?Er(r,"default",{value:e,enumerable:!0}):r,e));var _=Ne((aa,vr)=>{vr.exports=ftGlobals.wcUtils});var J=Ne((oa,Ar)=>{Ar.exports=ftGlobals.lit});var q=Ne((ca,br)=>{br.exports=ftGlobals.litDecorators});var Is=Ne((Kl,Rs)=>{Rs.exports=ftGlobals.litRepeat});var Ps=f(_());var Rt=f(J());var ye=f(_()),mr=f(q());var It;(function(e){e.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(It||(It={}));var X=f(_());var Ks=f(_());var _r;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(_r||(_r={}));var Cr;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Cr||(Cr={}));var xr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(xr||(xr={}));var wr;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(wr||(wr={}));var Tr;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Tr||(Tr={}));var Or;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Or||(Or={}));var Rr;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Rr||(Rr={}));var Ir;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ir||(Ir={}));var kr;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(kr||(kr={}));var Mr;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Mr||(Mr={}));var Dr;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Dr||(Dr={}));var Nr;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Nr||(Nr={}));var Lr;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Lr||(Lr={}));var Pr;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Pr||(Pr={}));var Fr;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Fr||(Fr={}));var Ur;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Ur||(Ur={}));var kt;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(kt||(kt={}));var jr;(function(e){e.ASC="ASC",e.DESC="DESC"})(jr||(jr={}));var Br;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Br||(Br={}));var Mt;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Mt||(Mt={}));var Vr;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Vr||(Vr={}));var qr;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(qr||(qr={}));var Hr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Hr||(Hr={}));var $r;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})($r||($r={}));var Kr;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Kr||(Kr={}));var Dt;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Dt||(Dt={}));var zr;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(zr||(zr={}));var C;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(C||(C={}));var F;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(F||(F={}));var Gr;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Gr||(Gr={}));var Wr;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Wr||(Wr={}));var Qr;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Qr||(Qr={}));var Yr;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Yr||(Yr={}));var Xr;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Xr||(Xr={}));var Jr;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Jr||(Jr={}));var Zr;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Zr||(Zr={}));var en;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(en||(en={}));var tn;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(tn||(tn={}));var rn;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(rn||(rn={}));var nn;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(nn||(nn={}));var sn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(sn||(sn={}));var zs={[C.PERSONAL_BOOK_SHARE_USER]:[C.PERSONAL_BOOK_USER],[C.HTML_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.PDF_EXPORT_USER]:[C.PERSONAL_BOOK_USER],[C.KHUB_ADMIN]:[C.CONTENT_PUBLISHER],[C.ADMIN]:[C.KHUB_ADMIN,C.USERS_ADMIN,C.PORTAL_ADMIN,C.BEHAVIOR_DATA_USER],[C.GENERATIVE_AI_EXPORT_USER]:[C.GENERATIVE_AI_USER]};function an(e,t){return e===t||(zs[e]??[]).some(r=>an(r,t))}function Nt(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>an(n,t))}var rr=f(q());var on=f(q(),1);var Lt=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function cn(e,t){return(0,on.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return ve(e);try{return JSON.parse(r)}catch{return ve(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ae,...t??{}})}function Gs(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ce(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!ce(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=a=>Object.keys(a).filter(o=>a[o]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let a=i[n];if(!ce(e[a],t[a]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ce(e,t){try{return Gs(e,t)}catch{return!1}}function Ae(e,t){return!ce(e,t)}function ve(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Le(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var un=f(q(),1);var Pt=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:Ae,attribute:!1,...t};(0,un.property)(i)(r,n);let a=r.constructor;a.reduxProperties=new Map(a.reduxProperties),a.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(o=>o[n]),store:t.store})}};var Pe=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Z=f(q(),1);var Fe=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let a of n)try{await a()}catch(o){s(o);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var dn=f(J(),1);var Ue=globalThis,Ws=Ue.ShadowRoot&&(Ue.ShadyCSS===void 0||Ue.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ln=(e,t)=>{if(Ws)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=Ue.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var je=class extends dn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return ln(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Lt(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function pn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var le=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},yn,hn=Symbol("constructorPrototype"),fn=Symbol("constructorName"),gn=Symbol("exportpartsDebouncer"),mn=Symbol("dynamicDependenciesLoaded"),ue=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ue.eventName="exportparts-updated";var H=class extends je{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[yn]=new Fe(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[gn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[fn]=this.constructor.name,this[hn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fn]&&Object.setPrototypeOf(this,this[hn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[mn]||(r[mn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ue.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ue.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ue)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=pn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,a,o;let c=p=>p!=null&&p.trim().length>0,u=t.filter(c).map(p=>p.trim());if(u.length===0){this.exportparts=void 0;return}let l=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let g=(i=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&i!==void 0?i:[],b=(o=(a=p.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(y=>y.split(":")[1]))!==null&&o!==void 0?o:[],T=[...g,...b].filter(c).map(y=>y.trim());for(let y of T)l.add(y)}if(l.size===0){this.exportparts=void 0;return}let d=[...l.values()].flatMap(p=>u.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};yn=gn;le([(0,Z.property)()],H.prototype,"exportpartsPrefix",void 0);le([cn([])],H.prototype,"exportpartsPrefixes",void 0);le([(0,Z.property)({reflect:!0})],H.prototype,"exportparts",void 0);le([(0,Z.property)()],H.prototype,"customStylesheet",void 0);le([(0,Z.property)()],H.prototype,"elementToFocus",void 0);le([(0,Z.state)()],H.prototype,"useAdoptedStyleSheets",void 0);function Be(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var be=Symbol("internalReduxEventsUnsubscribers"),W=Symbol("internalStoresUnsubscribers"),ee=Symbol("internalStores"),Qs=Le(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(a){super.willUpdate(a),[...this.reduxConstructor.reduxReactiveProperties].some(o=>a.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[ee].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ee].values()][0]}getStore(a){return a==null?this.getUnnamedStore():this[ee].get(a)}addStore(a,o){var c;o=(c=o??a.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(o),this[ee].set(o,a),this.subscribeToStore(o,a),this.updateFromStores()}removeStore(a){let o=typeof a=="string"?a:a.name;this.unsubscribeFromStore(o),this[ee].delete(o)}setupStores(){this.unsubscribeFromStores(),this[ee].forEach((a,o)=>this.subscribeToStore(o,a)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((a,o)=>{let c=this.constructor.getPropertyOptions(o);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:o)){let u=this.getStore(a.store);u&&(a.store?this[W].has(a.store):this[W].size>0)&&(this[o]=a.selector(u.getState(),this))}})}subscribeToStore(a,o){var c;this[W].set(a,o.subscribe(()=>this.updateFromStores())),this[be].set(a,[]),Be(o)&&o.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,l)=>{if(typeof this[l]=="function"&&(!u.store||o.name===u.store)){let d=p=>this[l](p);o.addEventListener(u.eventName,d),this[be].get(a).push(()=>o.removeEventListener(u.eventName,d))}})),this.onStoreAvailable(a)}unsubscribeFromStores(){this[W].forEach((a,o)=>this.unsubscribeFromStore(o))}unsubscribeFromStore(a){var o;this[W].has(a)&&this[W].get(a)(),this[W].delete(a),(o=this[be].get(a))===null||o===void 0||o.forEach(c=>c()),this[be].delete(a)}onStoreAvailable(a){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=W,r=ee,n=be,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Sn=class extends Qs(H){};function R(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ys=typeof Symbol=="function"&&Symbol.observable||"@@observable",En=Ys,Ft=()=>Math.random().toString(36).substring(7).split("").join("."),Xs={INIT:`@@redux/INIT${Ft()}`,REPLACE:`@@redux/REPLACE${Ft()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ft()}`},Ve=Xs;function qe(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ut(e,t,r){if(typeof e!="function")throw new Error(R(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(R(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(R(1));return r(Ut)(e,t)}let n=e,s=t,i=new Map,a=i,o=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((y,O)=>{a.set(O,y)}))}function l(){if(c)throw new Error(R(3));return s}function d(y){if(typeof y!="function")throw new Error(R(4));if(c)throw new Error(R(5));let O=!0;u();let N=o++;return a.set(N,y),function(){if(O){if(c)throw new Error(R(6));O=!1,u(),a.delete(N),i=null}}}function p(y){if(!qe(y))throw new Error(R(7));if(typeof y.type>"u")throw new Error(R(8));if(typeof y.type!="string")throw new Error(R(17));if(c)throw new Error(R(9));try{c=!0,s=n(s,y)}finally{c=!1}return(i=a).forEach(N=>{N()}),y}function g(y){if(typeof y!="function")throw new Error(R(10));n=y,p({type:Ve.REPLACE})}function b(){let y=d;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(R(11));function N(){let S=O;S.next&&S.next(l())}return N(),{unsubscribe:y(N)}},[En](){return this}}}return p({type:Ve.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:g,[En]:b}}function Js(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Ve.INIT})>"u")throw new Error(R(12));if(typeof r(void 0,{type:Ve.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(R(13))})}function vn(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),s,i;try{Js(r)}catch(a){i=a}return function(o={},c){if(i)throw i;let u=!1,l={};for(let d=0;d<n.length;d++){let p=n[d],g=r[p],b=o[p],T=g(b,c);if(typeof T>"u"){let y=c&&c.type;throw new Error(R(14))}l[p]=T,u=u||T!==b}return u=u||n.length!==Object.keys(o).length,u?l:o}}function _e(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function An(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(R(15))},a={getState:s.getState,dispatch:(c,...u)=>i(c,...u)},o=e.map(c=>c(a));return i=_e(...o)(s.dispatch),{...s,dispatch:i}}}function bn(e){return qe(e)&&"type"in e&&typeof e.type=="string"}var kn=Symbol.for("immer-nothing"),_n=Symbol.for("immer-draftable"),I=Symbol.for("immer-state");function B(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var L=Object,pe=L.getPrototypeOf,ze="constructor",Je="prototype",qt="configurable",Ge="enumerable",$e="writable",Ce="value",$=e=>!!e&&!!e[I];function P(e){return e?Mn(e)||et(e)||!!e[_n]||!!e[ze]?.[_n]||tt(e)||rt(e):!1}var Zs=L[Je][ze].toString(),Cn=new WeakMap;function Mn(e){if(!e||!Yt(e))return!1;let t=pe(e);if(t===null||t===L[Je])return!0;let r=L.hasOwnProperty.call(t,ze)&&t[ze];if(r===Object)return!0;if(!de(r))return!1;let n=Cn.get(r);return n===void 0&&(n=Function.toString.call(r),Cn.set(r,n)),n===Zs}function Ze(e,t,r=!0){Te(e)===0?(r?Reflect.ownKeys(e):L.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Te(e){let t=e[I];return t?t.type_:et(e)?1:tt(e)?2:rt(e)?3:0}var jt=(e,t,r=Te(e))=>r===2?e.has(t):L[Je].hasOwnProperty.call(e,t),Ht=(e,t,r=Te(e))=>r===2?e.get(t):e[t],We=(e,t,r,n=Te(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ei(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var et=Array.isArray,tt=e=>e instanceof Map,rt=e=>e instanceof Set,Yt=e=>typeof e=="object",de=e=>typeof e=="function",Bt=e=>typeof e=="boolean";function ti(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var K=e=>e.copy_||e.base_;var Xt=e=>e.modified_?e.copy_:e.base_;function $t(e,t){if(tt(e))return new Map(e);if(rt(e))return new Set(e);if(et(e))return Array[Je].slice.call(e);let r=Mn(e);if(t===!0||t==="class_only"&&!r){let n=L.getOwnPropertyDescriptors(e);delete n[I];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let a=s[i],o=n[a];o[$e]===!1&&(o[$e]=!0,o[qt]=!0),(o.get||o.set)&&(n[a]={[qt]:!0,[$e]:!0,[Ge]:o[Ge],[Ce]:e[a]})}return L.create(pe(e),n)}else{let n=pe(e);if(n!==null&&r)return{...e};let s=L.create(n);return L.assign(s,e)}}function Jt(e,t=!1){return nt(e)||$(e)||!P(e)||(Te(e)>1&&L.defineProperties(e,{set:He,add:He,clear:He,delete:He}),L.freeze(e),t&&Ze(e,(r,n)=>{Jt(n,!0)},!1)),e}function ri(){B(2)}var He={[Ce]:ri};function nt(e){return e===null||!Yt(e)?!0:L.isFrozen(e)}var Qe="MapSet",Kt="Patches",xn="ArrayMethods",Dn={};function te(e){let t=Dn[e];return t||B(0,e),t}var wn=e=>!!Dn[e];var xe,Nn=()=>xe,ni=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:wn(Qe)?te(Qe):void 0,arrayMethodsPlugin_:wn(xn)?te(xn):void 0});function Tn(e,t){t&&(e.patchPlugin_=te(Kt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function zt(e){Gt(e),e.drafts_.forEach(si),e.drafts_=null}function Gt(e){e===xe&&(xe=e.parent_)}var On=e=>xe=ni(xe,e);function si(e){let t=e[I];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rn(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[I].modified_&&(zt(t),B(4)),P(e)&&(e=In(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[I].base_,e,t)}else e=In(t,r);return ii(t,e,!0),zt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==kn?e:void 0}function In(e,t){if(nt(t))return t;let r=t[I];if(!r)return Ye(t,e.handledSet_,e);if(!st(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Fn(r,e)}return r.copy_}function ii(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Jt(t,r)}function Ln(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var st=(e,t)=>e.scope_===t,ai=[];function Pn(e,t,r,n){let s=K(e),i=e.type_;if(n!==void 0&&Ht(s,n,i)===t){We(s,n,r,i);return}if(!e.draftLocations_){let o=e.draftLocations_=new Map;Ze(s,(c,u)=>{if($(u)){let l=o.get(u)||[];l.push(c),o.set(u,l)}})}let a=e.draftLocations_.get(t)??ai;for(let o of a)We(s,o,r,i)}function oi(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!st(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let a=Xt(i);Pn(e,i.draft_??i,a,r),Fn(i,s)})}function Fn(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Ln(e)}}function ci(e,t,r){let{scope_:n}=e;if($(r)){let s=r[I];st(s,n)&&s.callbacks_.push(function(){Ke(e);let a=Xt(s);Pn(e,r,a,t)})}else P(r)&&e.callbacks_.push(function(){let i=K(e);e.type_===3?i.has(r)&&Ye(r,n.handledSet_,n):Ht(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ye(Ht(e.copy_,t,e.type_),n.handledSet_,n)})}function Ye(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||$(e)||t.has(e)||!P(e)||nt(e)||(t.add(e),Ze(e,(n,s)=>{if($(s)){let i=s[I];if(st(i,r)){let a=Xt(i);We(e,n,a,e.type_),Ln(i)}}else P(s)&&Ye(s,t,r)})),e}function ui(e,t){let r=et(e),n={type_:r?1:0,scope_:t?t.scope_:Nn(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Xe;r&&(s=[n],i=we);let{revoke:a,proxy:o}=Proxy.revocable(s,i);return n.draft_=o,n.revoke_=a,[o,n]}var Xe={get(e,t){if(t===I)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=K(e);if(!jt(s,t,e.type_))return di(e,s,t);let i=s[t];if(e.finalized_||!P(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ti(t))return i;if(i===Vt(e.base_,t)||li(e,t,i)){Ke(e);let a=e.type_===1?+t:t,o=Qt(e.scope_,i,e,a);return e.copy_[a]=o}return i},has(e,t){return t in K(e)},ownKeys(e){return Reflect.ownKeys(K(e))},set(e,t,r){let n=Un(K(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=Vt(K(e),t),i=s?.[I];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ei(r,s)&&(r!==void 0||jt(e.base_,t,e.type_)))return!0;Ke(e),Wt(e)}return e.copy_[t]===r&&(r!==void 0||jt(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),ci(e,t,r)),!0},deleteProperty(e,t){return Ke(e),Vt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Wt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=K(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[$e]:!0,[qt]:e.type_!==1||t!=="length",[Ge]:n[Ge],[Ce]:r[t]}},defineProperty(){B(11)},getPrototypeOf(e){return pe(e.base_)},setPrototypeOf(){B(12)}},we={};for(let e in Xe){let t=Xe[e];we[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}we.deleteProperty=function(e,t){return we.set.call(this,e,t,void 0)};we.set=function(e,t,r){return Xe.set.call(this,e[0],t,r,e[0])};function Vt(e,t){let r=e[I];return(r?K(r):e)[t]}function li(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!P(r)||r[I]?!1:e.baseRefs_.has(r)}function di(e,t,r){let n=Un(t,r);return n?Ce in n?n[Ce]:n.get?.call(e.draft_):void 0}function Un(e,t){if(!(t in e))return;let r=pe(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=pe(r)}}function Wt(e){e.modified_||(e.modified_=!0,e.parent_&&Wt(e.parent_))}function Ke(e){e.copy_||(e.assigned_=new Map,e.copy_=$t(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pi=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(de(t)&&!de(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,l=>r.call(this,l,...u))}}de(r)||B(6),n!==void 0&&!de(n)&&B(7);let s;if(P(t)){let i=On(this),a=Qt(i,t,void 0),o=!0;try{s=r(a),o=!1}finally{o?zt(i):Gt(i)}return Tn(i,n),Rn(s,i)}else if(!t||!Yt(t)){if(s=r(t),s===void 0&&(s=t),s===kn&&(s=void 0),this.autoFreeze_&&Jt(s,!0),n){let i=[],a=[];te(Kt).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:a}),n(i,a)}return s}else B(1,t)},this.produceWithPatches=(t,r)=>{if(de(t))return(a,...o)=>this.produceWithPatches(a,c=>t(c,...o));let n,s;return[this.produce(t,r,(a,o)=>{n=a,s=o}),n,s]},Bt(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Bt(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Bt(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){P(e)||B(8),$(e)&&(e=jn(e));let t=On(this),r=Qt(t,e,void 0);return r[I].isManual_=!0,Gt(t),r}finishDraft(e,t){let r=e&&e[I];(!r||!r.isManual_)&&B(9);let{scope_:n}=r;return Tn(n,t),Rn(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=te(Kt).applyPatches_;return $(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Qt(e,t,r,n){let[s,i]=tt(t)?te(Qe).proxyMap_(t,r):rt(t)?te(Qe).proxySet_(t,r):ui(t,r);return(r?.scope_??Nn()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?oi(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),s}function jn(e){return $(e)||B(10,e),Bn(e)}function Bn(e){if(!P(e)||nt(e))return e;let t=e[I],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=$t(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=$t(e,!0);return Ze(r,(s,i)=>{We(r,s,Bn(i))},n),t&&(t.finalized_=!1),r}var hi=globalThis.Iterator,Ja=typeof hi?.from=="function";var fi=new pi,Zt=fi.produce;function Vn(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var qn=Vn(),Hn=Vn;var mi=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_e:_e.apply(null,arguments)},io=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},yi=e=>e&&typeof e.match=="function";function Q(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(z(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>bn(n)&&n.type===e,r}var Wn=class Oe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Oe.prototype)}static get[Symbol.species](){return Oe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Oe(...t[0].concat(this)):new Oe(...t.concat(this))}};function $n(e){return P(e)?Zt(e,()=>{}):e}function it(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function gi(e){return typeof e=="boolean"}var Si=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},a=new Wn;return r&&(gi(r)?a.push(qn):a.push(Hn(r.extraArgument))),a},Ei="RTK_autoBatch";var Kn=e=>t=>{setTimeout(t,e)},vi=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(s),a=setTimeout(s,t)},Ai=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,a=!1,o=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?vi(window.requestAnimationFrame,100):Kn(10):e.type==="callback"?e.queueNotification:Kn(e.timeout),u=()=>{a=!1,i&&(i=!1,o.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let d=()=>s&&l(),p=n.subscribe(d);return o.add(l),()=>{p(),o.delete(l)}},dispatch(l){try{return s=!l?.meta?.[Ei],i=!s,i&&(a||(a=!0,c(u))),n.dispatch(l)}finally{s=!0}}})},bi=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Wn(e);return n&&s.push(Ai(typeof n=="object"?n:void 0)),s};function Qn(e){let t=Si(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{},c;if(typeof r=="function")c=r;else if(qe(r))c=vn(r);else throw new Error(z(1));let u;typeof n=="function"?u=n(t):u=t();let l=_e;s&&(l=mi({trace:!1,...typeof s=="object"&&s}));let d=An(...u),p=bi(d),g=typeof o=="function"?o(p):p(),b=l(...g);return Ut(c,a,b)}function Yn(e){let t={},r=[],n,s={addCase(i,a){let o=typeof i=="string"?i:i.type;if(!o)throw new Error(z(28));if(o in t)throw new Error(z(29));return t[o]=a,s},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),s},addMatcher(i,a){return r.push({matcher:i,reducer:a}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function _i(e){return typeof e=="function"}function Ci(e,t){let[r,n,s]=Yn(t),i;if(_i(e))i=()=>$n(e());else{let o=$n(e);i=()=>o}function a(o=i(),c){let u=[r[c.type],...n.filter(({matcher:l})=>l(c)).map(({reducer:l})=>l)];return u.filter(l=>!!l).length===0&&(u=[s]),u.reduce((l,d)=>{if(d)if($(l)){let g=d(l,c);return g===void 0?l:g}else{if(P(l))return Zt(l,p=>d(p,c));{let p=d(l,c);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},o)}return a.getInitialState=i,a}var xi=(e,t)=>yi(e)?e.match(t):e(t);function wi(...e){return t=>e.some(r=>xi(r,t))}var Ti="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Oi=(e=21)=>{let t="",r=e;for(;r--;)t+=Ti[Math.random()*64|0];return t},Ri=["name","message","stack","code"],er=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},zn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Ii=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Ri)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Gn="External signal was aborted",ki=(()=>{function e(t,r,n){let s=Q(t+"/fulfilled",(c,u,l,d)=>({payload:c,meta:{...d||{},arg:l,requestId:u,requestStatus:"fulfilled"}})),i=Q(t+"/pending",(c,u,l)=>({payload:void 0,meta:{...l||{},arg:u,requestId:c,requestStatus:"pending"}})),a=Q(t+"/rejected",(c,u,l,d,p)=>({payload:d,error:(n&&n.serializeError||Ii)(c||"Rejected"),meta:{...p||{},arg:l,requestId:u,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function o(c,{signal:u}={}){return(l,d,p)=>{let g=n?.idGenerator?n.idGenerator(c):Oi(),b=new AbortController,T,y;function O(m){y=m,b.abort()}u&&(u.aborted?O(Gn):u.addEventListener("abort",()=>O(Gn),{once:!0}));let N=(async function(){let m;try{let E=n?.condition?.(c,{getState:d,extra:p});if(Di(E)&&(E=await E),E===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((A,x)=>{T=()=>{x({name:"AbortError",message:y||"Aborted"})},b.signal.addEventListener("abort",T,{once:!0})});l(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:p}))),m=await Promise.race([V,Promise.resolve(r(c,{dispatch:l,getState:d,extra:p,requestId:g,signal:b.signal,abort:O,rejectWithValue:((A,x)=>new er(A,x)),fulfillWithValue:((A,x)=>new zn(A,x))})).then(A=>{if(A instanceof er)throw A;return A instanceof zn?s(A.payload,g,c,A.meta):s(A,g,c)})])}catch(E){m=E instanceof er?a(null,g,c,E.payload,E.meta):a(E,g,c)}finally{T&&b.signal.removeEventListener("abort",T)}return n&&!n.dispatchConditionRejection&&a.match(m)&&m.meta.condition||l(m),m})();return Object.assign(N,{abort:O,requestId:g,arg:c,unwrap(){return N.then(Mi)}})}}return Object.assign(o,{pending:i,rejected:a,fulfilled:s,settled:wi(a,s),typePrefix:t})}return e.withTypes=()=>e,e})();function Mi(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Di(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Xn=Symbol.for("rtk-slice-createasyncthunk"),oo={[Xn]:ki};function Ni(e,t){return`${e}/${t}`}function Li({creators:e}={}){let t=e?.asyncThunk?.[Xn];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(z(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Fi()):n.reducers)||{},o=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,S){let E=typeof m=="string"?m:m.type;if(!E)throw new Error(z(12));if(E in c.sliceCaseReducersByType)throw new Error(z(13));return c.sliceCaseReducersByType[E]=S,u},addMatcher(m,S){return c.sliceMatchers.push({matcher:m,reducer:S}),u},exposeAction(m,S){return c.actionCreators[m]=S,u},exposeCaseReducer(m,S){return c.sliceCaseReducersByName[m]=S,u}};o.forEach(m=>{let S=a[m],E={reducerName:m,type:Ni(s,m),createNotation:typeof n.reducers=="function"};ji(S)?Vi(E,S,u,t):Ui(E,S,u)});function l(){let[m={},S=[],E=void 0]=typeof n.extraReducers=="function"?Yn(n.extraReducers):[n.extraReducers],V={...m,...c.sliceCaseReducersByType};return Ci(n.initialState,A=>{for(let x in V)A.addCase(x,V[x]);for(let x of c.sliceMatchers)A.addMatcher(x.matcher,x.reducer);for(let x of S)A.addMatcher(x.matcher,x.reducer);E&&A.addDefaultCase(E)})}let d=m=>m,p=new Map,g=new WeakMap,b;function T(m,S){return b||(b=l()),b(m,S)}function y(){return b||(b=l()),b.getInitialState()}function O(m,S=!1){function E(A){let x=A[m];return typeof x>"u"&&S&&(x=it(g,E,y)),x}function V(A=d){let x=it(p,S,()=>new WeakMap);return it(x,A,()=>{let Sr={};for(let[Fs,Us]of Object.entries(n.selectors??{}))Sr[Fs]=Pi(Us,A,()=>it(g,A,y),S);return Sr})}return{reducerPath:m,getSelectors:V,get selectors(){return V(E)},selectSlice:E}}let N={name:s,reducer:T,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:y,...O(i),injectInto(m,{reducerPath:S,...E}={}){let V=S??i;return m.inject({reducerPath:V,reducer:T},E),{...N,...O(V,!0)}}};return N}}function Pi(e,t,r,n){function s(i,...a){let o=t(i);return typeof o>"u"&&n&&(o=r()),e(o,...a)}return s.unwrapped=e,s}var Jn=Li();function Fi(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Ui({type:e,reducerName:t,createNotation:r},n,s){let i,a;if("reducer"in n){if(r&&!Bi(n))throw new Error(z(17));i=n.reducer,a=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Q(e,a):Q(e))}function ji(e){return e._reducerDefinitionType==="asyncThunk"}function Bi(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Vi({type:e,reducerName:t},r,n,s){if(!s)throw new Error(z(18));let{payloadCreator:i,fulfilled:a,pending:o,rejected:c,settled:u,options:l}=r,d=s(e,i,l);n.exposeAction(t,d),a&&n.addCase(d.fulfilled,a),o&&n.addCase(d.pending,o),c&&n.addCase(d.rejected,c),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:a||at,pending:o||at,rejected:c||at,settled:u||at})}function at(){}var Zn="listener",es="completed",ts="cancelled",co=`task-${ts}`,uo=`task-${es}`,lo=`${Zn}-${ts}`,po=`${Zn}-${es}`;var{assign:rs}=Object;var tr="listenerMiddleware";var qi=rs(Q(`${tr}/add`),{withTypes:()=>qi}),ho=Q(`${tr}/removeAll`),Hi=rs(Q(`${tr}/remove`),{withTypes:()=>Hi});function z(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $i=Le(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),ot=class extends $i(Object){};window.ftReduxStores||(window.ftReduxStores={});var ns=class e extends ot{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Be(i))return i;if(s==null)return;let a=Jn({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),o=Qn({reducer:(c,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let l=ve(a.getInitialState());for(let d of u.keeping)l[d]=(c??l)[d];return l}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...u.overwrites};return a.reducer(c,u)}});return window.ftReduxStores[s.name]=new e(a,o,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Pe,this.injectInto=(i,a)=>this.reduxSlice.injectInto(i,a),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,a,o)=>{let c=a,u=i[c];return u?(...l)=>{let d=u(...l.map(s));return this.reduxStore.dispatch(d),d}:l=>{let d=c,p=this.getState()[d];ce(p,l)||this.setState({[d]:s(l)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var ct=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let a=typeof t=="string"?new Date(t):t,o=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(a),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return i?c:s?`${o} ${c}`:o}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ut=f(_()),Ki="ft-app-info",Y=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Y.eventName="authentication-change";var Re=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Re.eventName="ui-locale-changed";var zi={session:(e,t)=>{(0,ut.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>h.dispatchEvent(new Y(t.payload)),0))}},h=ut.FtReduxStore.get({name:Ki,reducers:zi,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 ss=f(_()),lt=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Ho=(0,ss.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(h)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(o=>o.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?o=>ct.format(o,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return lt([(0,rr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),lt([(0,rr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),lt([Pt({store:h.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),lt([Pt({store:h.name})],t.prototype,"uiLocale",void 0),t});var mt=f(_());var nr=f(_());var re=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=h.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=h.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var he=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:re.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):re.await()}};var D=class extends he{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,a)=>typeof a!="object"||a==null||Array.isArray(a)?a:Object.fromEntries(Object.entries(a).sort(([o],[c])=>o.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new nr.CacheRegistry,this.cache=t?s.commonCache:new nr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var dt=class extends D{async listMySearches(){let{session:t}=h.getState();return Nt(t,C.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var pt=class extends D{async listMyBookmarks(){let t=h.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var ht=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var ft=class extends D{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=h.getState().session;return!!t?.sessionAuthenticated}};var Gi="ft-user-assets",Wi={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(F).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;ir(e,r,[...sr(e,r),s]),is(e,r,1,n),as(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ir(e,r,sr(e,r).map(s=>s.id===n.id?n:s)),as(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;ir(e,r,sr(e,r).filter(i=>i.id!==s)),is(e,r,-1,n)}},os={[F.SEARCHES]:"savedSearches",[F.BOOKMARKS]:"bookmarks",[F.BOOKS]:void 0,[F.COLLECTIONS]:void 0},sr=(e,t)=>{var r;let n=os[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ir=(e,t,r)=>{let n=os[t];n&&(e[n]=r)},is=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===F.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},as=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},k=mt.FtReduxStore.get({name:Gi,reducers:Wi,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(F).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ar=class{constructor(t=new ht,r=new ft){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=h.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new pt,this.savedSearchesService=new dt,h.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=h.getState();(0,mt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),k.actions.clearAssetCount(),k.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),k.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),k.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();k.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();k.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&k.getState().assetCounts.allAsset[t]!==r.count&&k.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&k.getState().assetCounts.bookmarkByMap[t]!==r.count&&k.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(k.getState().assetCounts.bookmarkByMap).length!==0;t===F.BOOKMARKS&&r&&k.actions.clearBookmarkCountByMap(),k.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;k.actions.bookmarks(r)}}},Qi=new ar;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Qi);var or=class{addCommand(t,r=!1){h.commands.add(t,r)}consumeCommand(t){return h.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new or;var U=f(_());var cs,fe=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Yi=Symbol("clearAfterUnitTest"),yt=class extends(0,U.withEventBus)(D){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[cs]=()=>{this.defaultMessages={},this.cache=new U.CacheRegistry,this.listeners={}},this.currentUiLocale=h.getState().uiLocale,h.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=h.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,U.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),a=this.resolveContext(i);return new U.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},a).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof U.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new fe({loadedContexts:t})),this.dispatchEvent(new fe({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new fe({loadedContexts:[t]})),this.dispatchEvent(new fe({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,U.delay)(0).then(()=>n()).catch(()=>null)))}};cs=Yi;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var me=window.FluidTopicsI18nService,gt=window.FluidTopicsCustomI18nService;var us=f(_()),cr=class{highlightHtml(t,r,n){(0,us.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new cr;var ls=f(_());var ur=class{isDate(t){var r,n,s,i;return(i=(s=((n=(r=h.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(o=>o.key===t))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,a;if(t==null)return"";try{return ls.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:h.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(a=r?.onlyTime)!==null&&a!==void 0?a:!1)}catch(o){throw console.error(`Date ${JSON.stringify(t)} is not valid`,o),o}}};window.FluidTopicsDateService=new ur;var ds=f(_());var Ie=class{static get(t,r){var n,s,i,a;let o=h.getState(),{lang:c,region:u}=(i=(s=(n=o.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new ds.SearchPlaceConverter(o.baseUrl,t??20,(a=o.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed,r??`${c}-${u}`)}};var lr=class{urlToSearchRequest(t){return Ie.get().parse(t)}searchRequestToUrl(t){return Ie.get().serialize(t)}};window.FluidTopicsUrlService=new lr;var G=f(_());var ne=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};ne.eventName="before-location-change";var se=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};se.eventName="change";var dr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},ps=new dr;var St=class e extends G.WithEventBus{static build(){return new e(window.history,ps,()=>window.location,!1)}constructor(t,r,n,s){var i,a;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(a=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&a!==void 0?a:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,G.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new se(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,a,o])=>{let c=new ne(new URL(typeof o=="string"?o:(o??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let u=r(),l={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:c.detail.nextLocation.href};n.apply(s,[l,a,l.href]),this.setCurrentState(l,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(ne.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(ne.eventName,t)}addHistoryChangeListener(t){this.addEventListener(se.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(se.eventName,t)}currentItem(){return(0,G.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,G.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,G.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,G.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=St.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var hs=f(J());var fs=hs.css`
|
|
2
|
+
`;var ys=f(J()),M=f(q()),oe=f(_());var ie=f(_());function ms(e,t){let{authenticationRequired:r,session:n}=h.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Et=class extends he{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var pr=class e extends ie.FtStateManager{static build(t){return new e(h,t)}constructor(t,r){super(),this.store=t,this.cache=new ie.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Et,this.cleanSessionDebouncer=new ie.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new ie.Debouncer(500),this.apiProvider=r??(()=>re.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Y.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Y.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>ms(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Re(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},hr=pr.build();var ae=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var ke=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let a=s.deref(),o=i.deref();a===void 0||o===void 0||a.dispatchEvent(new ae(t.context,a,o,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var w=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},v=class extends oe.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=hr,this.contextRoot=new ke}render(){return ys.html`
|
|
3
3
|
<slot></slot>
|
|
4
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>
|
|
5
|
-
`;var wt=f(
|
|
4
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>me.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};v.elementDefinitions={};v.styles=fs;w([(0,M.property)()],v.prototype,"baseUrl",void 0);w([(0,M.property)()],v.prototype,"tenantId",void 0);w([(0,M.property)()],v.prototype,"apiIntegrationIdentifier",void 0);w([(0,M.property)()],v.prototype,"apiIntegrationAppVersion",void 0);w([(0,M.property)()],v.prototype,"uiLocale",void 0);w([(0,oe.jsonProperty)(null)],v.prototype,"availableUiLocales",void 0);w([(0,oe.jsonProperty)(null)],v.prototype,"metadataConfiguration",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"editorMode",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"noCustom",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"openExternalDocumentInNewTab",void 0);w([(0,M.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomComponent",void 0);w([(0,M.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],v.prototype,"noCustomCode",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"withManualResources",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"navigatorOnline",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"forcedOffline",void 0);w([(0,M.property)({type:Boolean})],v.prototype,"authenticationRequired",void 0);w([(0,oe.jsonProperty)([])],v.prototype,"messageContexts",void 0);w([(0,oe.jsonProperty)(void 0)],v.prototype,"session",void 0);var Ss=f(_());var gs={"ft-app-context":v};(0,Ss.customElements)(gs);var vt=class e extends Event{constructor(){super(e.eventName)}};vt.eventName="search-context-clear-all-filters";var Es=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},yr=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},vs=Symbol("registerInterval"),fr=Symbol("registerAttempts"),Zi=40,ea=(0,ye.applyMixinOnce)(Symbol("toFtSearchComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(n){var s,i,a;super.willUpdate(n),n.has("neededSearchRequests")&&((s=this.stateManager)===null||s===void 0||s.unregisterComponent(this,(i=n.get("neededSearchRequests"))!==null&&i!==void 0?i:[]),(a=this.stateManager)===null||a===void 0||a.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(n){this.clearStateManager(),this.stateManager=n,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(n.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[fr]=0,this.tryToRegisterToContext(),this[vs]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[fr]>Zi?window.clearInterval(this[vs]):(this[fr]++,this.dispatchEvent(new yr))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Es([(0,mr.state)()],t.prototype,"stateManager",void 0),Es([(0,mr.state)({hasChanged:ye.hasChanged})],t.prototype,"neededSearchRequests",void 0),t}),At=class extends ea(ye.FtLitElementRedux){};var bt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?gt:me}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return a=>({context:this.name,key:i,custom:this.custom,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var ge=f(_());var _s=f(q());var gr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},As=new gr;var ta=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},ra=Symbol("i18nAttributes"),na=Symbol("i18nListAttributes"),Cs=Symbol("i18nProperties"),_t=Symbol("i18nContexts"),Me=Symbol("i18nUnsubs"),xt=(0,ge.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?gt:me}i18n(i){let{context:a,key:o,message:c}=i,{custom:u,args:l,argsProvider:d}=i;if(a&&o){this.hasI18nContext(a)||this.addI18nContext(a,void 0,u);let p=l??(d?d(this):[]);return this.getI18nService(u).resolveMessage(a,o,...p)}return c}async awaitI18n(i){let{context:a,custom:o}=i;return a&&await this.getI18nService(o).prepareContext(a),this.i18n(i)}customI18n(i,a){if(As.isI18nKey(i)){let[o,c]=i.split(".");return this.i18n({custom:!0,context:o,key:c,...a})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((a,o,c)=>i.has(o)||typeof a.argsProvider=="function"),this.updateI18nProperties(a=>typeof a.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((a,o,c)=>{var u;return((u=c?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(a=>a.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var a,o;let c=this,u=(l,d,p)=>p?.context&&p.key&&i(l,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...l})}:p;(a=this[ra])===null||a===void 0||a.forEach((l,d)=>c[d]=u(l,d,c[d])),(o=this[na])===null||o===void 0||o.forEach((l,d)=>{var p;return c[d]=(p=c[d])===null||p===void 0?void 0:p.map(g=>u(l,d,g))})}updateI18nProperties(i){var a;(a=this[Cs])===null||a===void 0||a.forEach((o,c)=>{i(o,c)&&(this[c]=this.i18n(o))})}addI18nMessages(i,a,o){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,a,o)}addI18nContext(i,a,o){let c=(typeof i=="string"?i:i.name).toLowerCase();o=typeof i=="string"?o:i.custom,this[_t].set(c,{isCustomContext:o}),this[Me].has(c)||this[Me].set(c,this.getI18nService(o).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(o).prepareContext(c,a)}hasI18nContext(i){return this[_t].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[_t].forEach((i,a)=>this.addI18nContext(a,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Me].forEach(i=>i()),this[Me].clear()}}return t=_t,r=Me,ta([(0,_s.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),bs=class extends xt(ge.FtLitElement){},Ct=class extends xt(ge.FtLitElementRedux){};var xs=f(J());var ws=xs.css`
|
|
5
|
+
`;var wt=f(J()),Ee=f(q()),Tt=f(_());var Se=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},j=class extends Ct{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(h)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:wt.nothing:wt.html`
|
|
6
6
|
<span class="ft-i18n">
|
|
7
7
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
8
8
|
</span>
|
|
9
|
-
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};j.elementDefinitions={};j.styles=
|
|
10
|
-
.ft-search-quick-filters {
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
color: ${Ps.textColor};
|
|
13
|
-
background-color: ${Ps.colorSurface};
|
|
14
|
-
}
|
|
15
|
-
`;var It=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},W=class extends Ct(At){constructor(){super(),this.presets=[],this.metadataFilters=[],this.addI18nContext(Ot,Ls),this.addStore(h)}get hasPresets(){return this.presets!=null&&this.presets.length>0}willUpdate(t){var r,n,s;if(super.update(t),t.has("selectedPresetId")){let i=((r=this.presets)!==null&&r!==void 0?r:[]).find(a=>a.name===this.selectedPresetId);if(i){(n=this.stateManager)===null||n===void 0||n.clearAllFilters();for(let a of i.filters)(s=this.stateManager)===null||s===void 0||s.setValueFilter(a.key,a.values)}}}render(){var t;return Rt.html`
|
|
9
|
+
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};j.elementDefinitions={};j.styles=ws;Se([(0,Tt.redux)()],j.prototype,"editorMode",void 0);Se([(0,Ee.property)()],j.prototype,"context",void 0);Se([(0,Ee.property)()],j.prototype,"key",void 0);Se([(0,Tt.jsonProperty)([])],j.prototype,"args",void 0);Se([(0,Ee.property)()],j.prototype,"defaultMessage",void 0);Se([(0,Ee.state)()],j.prototype,"editorMessage",void 0);var Os=f(_());var Ts={"ft-i18n":j};(0,Os.customElements)(Ts);var Ms=f(Is()),Ds=f(q());var Ns=f(_());var Ot=bt.build("designedSearchQuickFilters"),ks={presetsSelector:"Quick filters",noQuickFilter:"No quick filter selected"};var sa=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(i=(s<3?a(i):s>3?a(t,r,i):a(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},De=class extends xt(At){constructor(){super(),this.builtPresets=[],this.addI18nContext(Ot,ks),this.addStore(h)}get hasPresets(){return this.builtPresets!=null&&this.builtPresets.length>0}applySelectedPreset(){var t;if(this.selectedPreset&&this.stateManager){let r=((t=this.builtPresets)!==null&&t!==void 0?t:[]).find(n=>n.id===this.selectedPreset);if(r){this.stateManager.clearAllFilters();for(let n of r.filters)this.stateManager.setValueFilter(n.key,n.values)}}}willUpdate(t){super.update(t),t.has("selectedPreset")&&(0,Ns.waitFor)(()=>this.stateManager).then(()=>{this.applySelectedPreset()})}render(){var t;return Rt.html`
|
|
16
10
|
${this.hasPresets?Rt.html`
|
|
17
11
|
<ft-select
|
|
18
12
|
class="ft-search-quick-filters--presets"
|
|
19
13
|
part="presets"
|
|
20
14
|
label="${Ot.messages.presetsSelector()}"
|
|
21
15
|
outlined
|
|
22
|
-
@change=${r=>this.
|
|
23
|
-
${(0,
|
|
24
|
-
<ft-select-option value="${r.
|
|
16
|
+
@change=${r=>this.selectedPreset=r.detail}>
|
|
17
|
+
${(0,Ms.repeat)((t=this.builtPresets)!==null&&t!==void 0?t:[],r=>r.name,r=>Rt.html`
|
|
18
|
+
<ft-select-option value="${r.id}"
|
|
25
19
|
label="${r.name}"
|
|
26
|
-
?selected=${r.
|
|
20
|
+
?selected=${r.id===this.selectedPreset}>
|
|
27
21
|
</ft-select-option>
|
|
28
22
|
`)}
|
|
29
23
|
</ft-select>
|
|
30
24
|
`:Ot.messages.noQuickFilter()}
|
|
31
|
-
`}};
|
|
25
|
+
`}};sa([(0,Ds.property)({type:String,reflect:!0})],De.prototype,"selectedPreset",void 0);var Ls={"ft-search-quick-filters":De};(0,Ps.customElements)(Ls);})();
|
|
32
26
|
/*! Bundled license information:
|
|
33
27
|
|
|
34
28
|
@lit/reactive-element/css-tag.js:
|