@fluid-topics/ft-reader-toc 2.2.18 → 2.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,12 +19,13 @@ import { FtChip } from "@fluid-topics/ft-chip";
|
|
|
19
19
|
import { state } from "lit/decorators.js";
|
|
20
20
|
export class FtReaderAccessibleToc extends FtReaderBaseToc {
|
|
21
21
|
willUpdate(props) {
|
|
22
|
-
var _a, _b
|
|
22
|
+
var _a, _b;
|
|
23
|
+
var _c;
|
|
23
24
|
super.willUpdate(props);
|
|
24
25
|
if (props.has("toc") || props.has("highlightedTocIds")) {
|
|
25
|
-
const allTocIds = (
|
|
26
|
+
const allTocIds = (_c = (_a = this.toc) === null || _a === void 0 ? void 0 : _a.flatMap((t) => this.allTocIds(t))) !== null && _c !== void 0 ? _c : [];
|
|
26
27
|
for (const tocId of allTocIds) {
|
|
27
|
-
if ((
|
|
28
|
+
if ((_b = this.highlightedTocIds) === null || _b === void 0 ? void 0 : _b.includes(tocId)) {
|
|
28
29
|
this.currentTocNode = tocId;
|
|
29
30
|
break;
|
|
30
31
|
}
|
|
@@ -35,7 +36,8 @@ export class FtReaderAccessibleToc extends FtReaderBaseToc {
|
|
|
35
36
|
return [toc.tocId, ...(toc.children.flatMap((t) => this.allTocIds(t)))];
|
|
36
37
|
}
|
|
37
38
|
render() {
|
|
38
|
-
var _a
|
|
39
|
+
var _a;
|
|
40
|
+
var _b;
|
|
39
41
|
return html `
|
|
40
42
|
<div class="${classMap(this.tocClasses)}" part="container">
|
|
41
43
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
@@ -47,12 +49,13 @@ export class FtReaderAccessibleToc extends FtReaderBaseToc {
|
|
|
47
49
|
`;
|
|
48
50
|
}
|
|
49
51
|
renderNode(node) {
|
|
50
|
-
var _a, _b, _c
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
var _d;
|
|
51
54
|
const isHighlighted = (_a = this.highlightedTocIds) === null || _a === void 0 ? void 0 : _a.includes(node.tocId);
|
|
52
55
|
const isCurrent = node.tocId === this.currentTocNode;
|
|
53
56
|
const isExpanded = this.nodeIsExpanded(node);
|
|
54
57
|
const canDisplayChildren = node.children.length > 0;
|
|
55
|
-
const currentPageDepth = this.isCurrentPageToc ? ((
|
|
58
|
+
const currentPageDepth = this.isCurrentPageToc ? ((_d = (_b = this.currentPage) === null || _b === void 0 ? void 0 : _b.breadcrumb.length) !== null && _d !== void 0 ? _d : 0) + 1 : 0;
|
|
56
59
|
const tabNumber = node.depth - 1 - currentPageDepth;
|
|
57
60
|
const styles = {
|
|
58
61
|
"padding-left": `calc( ${FtReaderTocCssVariables.tabulationSize} * ${tabNumber} + 4px)`, // +4px for padding before button
|
|
@@ -68,7 +71,7 @@ export class FtReaderAccessibleToc extends FtReaderBaseToc {
|
|
|
68
71
|
<a part="node-link ${node.contentClass ? `node-link-class-${node.contentClass}` : ""}"
|
|
69
72
|
class="ft-reader-toc--node-link"
|
|
70
73
|
style="${styleMap(styles)}"
|
|
71
|
-
href="${(
|
|
74
|
+
href="${(_c = this.service) === null || _c === void 0 ? void 0 : _c.getLinkWithFilter(node.tocId)}"
|
|
72
75
|
tabindex="${isCurrent ? "0" : "-1"}"
|
|
73
76
|
data-tocId="${node.tocId}"
|
|
74
77
|
data-depth="${node.depth}"
|
|
@@ -190,7 +193,8 @@ export class FtReaderAccessibleToc extends FtReaderBaseToc {
|
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
195
|
get allLinks() {
|
|
193
|
-
var _a
|
|
196
|
+
var _a;
|
|
197
|
+
var _b;
|
|
194
198
|
return Array.from((_b = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[part~=\"node-link\"]")) !== null && _b !== void 0 ? _b : []);
|
|
195
199
|
}
|
|
196
200
|
selectNextNode(target, nodes) {
|
|
@@ -49,13 +49,13 @@ export declare abstract class FtReaderBaseToc extends FtReaderBaseToc_base imple
|
|
|
49
49
|
"ft-reader-toc-loaded": boolean;
|
|
50
50
|
"ft-reader-toc-expanded": boolean;
|
|
51
51
|
};
|
|
52
|
-
protected renderExpandCollapseAll(): TemplateResult<1
|
|
52
|
+
protected renderExpandCollapseAll(): typeof nothing | TemplateResult<1>;
|
|
53
53
|
protected abstract renderNode(node: TocNode): TemplateResult;
|
|
54
54
|
protected buildAutomaticallyExpandedNodes(tocIdsToShow: Array<string>): Set<string>;
|
|
55
55
|
protected manuallyToggle(tocId: string, isExpanded: boolean, e?: MouseEvent): void;
|
|
56
56
|
protected onViewportSizeChange(event: FtSizeChangeEvent): void;
|
|
57
57
|
protected toggleExpandCollapseAll(): void;
|
|
58
|
-
protected getExpandCollapseAllTooltipPosition(): "
|
|
58
|
+
protected getExpandCollapseAllTooltipPosition(): "bottom" | "left" | "right";
|
|
59
59
|
protected getLeafNodeIcon(): TemplateResult<1>;
|
|
60
60
|
}
|
|
61
61
|
export {};
|
|
@@ -225,12 +225,9 @@ __decorate([
|
|
|
225
225
|
], FtReaderBaseToc.prototype, "currentPage", void 0);
|
|
226
226
|
__decorate([
|
|
227
227
|
redux({
|
|
228
|
-
selector: (s, self) => {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
? (((_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.rootTocId) ? [s.currentPage.rootTocId] : [])
|
|
232
|
-
: s.visibleTopics;
|
|
233
|
-
},
|
|
228
|
+
selector: (s, self) => { var _a, _b; return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) && !self.isCurrentPageToc
|
|
229
|
+
? (((_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.rootTocId) ? [s.currentPage.rootTocId] : [])
|
|
230
|
+
: s.visibleTopics; },
|
|
234
231
|
})
|
|
235
232
|
], FtReaderBaseToc.prototype, "highlightedTocIds", void 0);
|
|
236
233
|
__decorate([
|
package/build/ft-reader-toc.js
CHANGED
|
@@ -13,7 +13,8 @@ import { FtReaderBaseToc } from "./ft-reader-base-toc";
|
|
|
13
13
|
import { classMap } from "lit/directives/class-map.js";
|
|
14
14
|
export class FtReaderToc extends FtReaderBaseToc {
|
|
15
15
|
render() {
|
|
16
|
-
var _a
|
|
16
|
+
var _a;
|
|
17
|
+
var _b;
|
|
17
18
|
return html `
|
|
18
19
|
<div class="${classMap(this.tocClasses)}" role="tree" aria-label="${(_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.title}">
|
|
19
20
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
@@ -23,7 +24,8 @@ export class FtReaderToc extends FtReaderBaseToc {
|
|
|
23
24
|
`;
|
|
24
25
|
}
|
|
25
26
|
renderNode(node) {
|
|
26
|
-
var _a, _b
|
|
27
|
+
var _a, _b;
|
|
28
|
+
var _c;
|
|
27
29
|
const isHighlighted = (_a = this.highlightedTocIds) === null || _a === void 0 ? void 0 : _a.includes(node.tocId);
|
|
28
30
|
const isExpanded = this.nodeIsExpanded(node);
|
|
29
31
|
const canDisplayChildren = node.children.length > 0;
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
position: relative;
|
|
287
287
|
word-break: break-word;
|
|
288
288
|
}
|
|
289
|
-
`;var xs=["top","right","bottom","left"],gs=["start","end"],xi=xs.reduce((e,t)=>e.concat(t,t+"-"+gs[0],t+"-"+gs[1]),[]),fr=Math.min,tt=Math.max,hr=Math.round;var Fe=e=>({x:e,y:e}),mu={left:"right",right:"left",bottom:"top",top:"bottom"};function vs(e,t,r){return tt(e,fr(t,r))}function qr(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function vi(e){return e==="x"?"y":"x"}function bi(e){return e==="y"?"height":"width"}function Xr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ei(e){return vi(Xr(e))}function bs(e,t,r){r===void 0&&(r=!1);let n=rt(e),i=Ei(e),o=bi(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=gi(s)),[s,gi(s)]}function Es(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function gi(e){let t=mr(e);return mu[t]+e.slice(t.length)}function yu(e){var t,r,n,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function As(e){return typeof e!="number"?yu(e):{top:e,right:e,bottom:e,left:e}}function Et(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Ss(e,t,r){let{reference:n,floating:i}=e,o=Xr(t),s=Ei(t),a=bi(s),l=mr(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,y;switch(l){case"top":y={x:u,y:n.y-i.height};break;case"bottom":y={x:u,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:d};break;case"left":y={x:n.x-i.width,y:d};break;default:y={x:n.x,y:n.y}}let v=rt(t);return v&&(y[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),y}async function _s(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:y=0}=qr(t,e),v=As(y),x=a[p?d==="floating"?"reference":"floating":d],S=Et(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(b))&&await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1},R=Et(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:b,strategy:l}):k);return{top:(S.top-R.top+v.top)/w.y,bottom:(R.bottom-S.bottom+v.bottom)/w.y,left:(S.left-R.left+v.left)/w.x,right:(R.right-S.right+v.right)/w.x}}var gu=50,Cs=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:_s},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ss(c,n,l),p=n,y=0,v={};for(let A=0;A<o.length;A++){let x=o[A];if(!x)continue;let{name:S,fn:k}=x,{x:b,y:w,data:R,reset:j}=await k({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=w??d,v[S]={...v[S],...R},j&&y<gu&&(y++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(c=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:u,y:d}=Ss(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:v}};function xu(e,t,r){return(e?[...r.filter(i=>rt(i)===e),...r.filter(i=>rt(i)!==e)]:r.filter(i=>mr(i)===i)).filter(i=>e?rt(i)===e||(t?Es(i)!==i:!1):!0)}var ws=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=xi,autoAlignment:y=!0,...v}=qr(e,t),A=d!==void 0||p===xi?xu(d||null,y,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,S=A[x];if(S==null)return{};if(a!==S)return{reset:{placement:A[0]}};let k=await l.detectOverflow(t,v),b=bs(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),w=[k[mr(S)],k[b[0]],k[b[1]]],R=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:w}],j=A[x+1];if(j)return{data:{index:x+1,overflows:R},reset:{placement:j}};let B=R.map(ve=>{let lt=rt(ve.placement);return[ve.placement,lt&&u?ve.overflows.slice(0,2).reduce((eu,tu)=>eu+tu,0):ve.overflows[0],ve.overflows]}).sort((ve,lt)=>ve[1]-lt[1]),sr=((i=B.filter(ve=>ve[2].slice(0,rt(ve[0])?2:3).every(lt=>lt<=0))[0])==null?void 0:i[0])||B[0][0];return sr!==a?{data:{index:x+1,overflows:R},reset:{placement:sr}}:{}}}};var Ts=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:k=>{let{x:b,y:w}=k;return{x:b,y:w}}},...c}=qr(e,t),u={x:r,y:n},d=await o.detectOverflow(t,c),p=Xr(i),y=vi(p),v=u[y],A=u[p],x=(k,b)=>vs(b+d[k==="y"?"top":"left"],b,b-d[k==="y"?"bottom":"right"]);s&&(v=x(y,v)),a&&(A=x(p,A));let S=l.fn({...t,[y]:v,[p]:A});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[y]:s,[p]:a}}}}}};function Zr(){return typeof window<"u"}function St(e){return Rs(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ge(e){var t;return(t=(Rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rs(e){return Zr()?e instanceof Node||e instanceof de(e).Node:!1}function Ne(e){return Zr()?e instanceof Element||e instanceof de(e).Element:!1}function qe(e){return Zr()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function Os(e){return!Zr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function yr(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Ns(e){return/^(table|td|th)$/.test(St(e))}function gr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var vu=/transform|translate|scale|rotate|perspective|filter/,bu=/paint|layout|strict|content/,At=e=>!!e&&e!=="none",Ai;function zt(e){let t=Ne(e)?Le(e):e;return At(t.transform)||At(t.translate)||At(t.scale)||At(t.rotate)||At(t.perspective)||!Jr()&&(At(t.backdropFilter)||At(t.filter))||vu.test(t.willChange||"")||bu.test(t.contain||"")}function Ls(e){let t=nt(e);for(;qe(t)&&!jt(t);){if(zt(t))return t;if(gr(t))return null;t=nt(t)}return null}function Jr(){return Ai==null&&(Ai=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ai}function jt(e){return/^(html|body|#document)$/.test(St(e))}function Le(e){return de(e).getComputedStyle(e)}function xr(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(St(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Os(e)&&e.host||Ge(e);return Os(t)?t.host:t}function Ps(e){let t=nt(e);return jt(t)?(e.ownerDocument||e).body:qe(t)&&yr(t)?t:Ps(t)}function Yr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ps(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=de(i);if(o){let a=Qr(s);return t.concat(s,s.visualViewport||[],yr(i)?i:[],a&&r?Yr(a):[])}else return t.concat(i,Yr(i,[],r))}function Qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ds(e){let t=Le(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=qe(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=hr(r)!==o||hr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function Ms(e){return Ne(e)?e:e.contextElement}function Wt(e){let t=Ms(e);if(!qe(t))return Fe(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Ds(t),s=(o?hr(r.width):r.width)/n,a=(o?hr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Eu=Fe(0);function $s(e){let t=de(e);return!Jr()||!t.visualViewport?Eu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Au(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===de(e)}function vr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Ms(e),s=Fe(1);t&&(n?Ne(n)&&(s=Wt(n)):s=Wt(e));let a=Au(o,r,n)?$s(o):Fe(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o&&n){let p=de(o),y=Ne(n)?de(n):n,v=p,A=Qr(v);for(;A&&y!==v;){let x=Wt(A),S=A.getBoundingClientRect(),k=Le(A),b=S.left+(A.clientLeft+parseFloat(k.paddingLeft))*x.x,w=S.top+(A.clientTop+parseFloat(k.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=w,v=de(A),A=Qr(v)}}return Et({width:u,height:d,x:l,y:c})}function en(e,t){let r=xr(e).scrollLeft;return t?t.left+r:vr(Ge(e)).left+r}function Us(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-en(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Su(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=Ge(n),a=t?gr(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Fe(1),u=Fe(0),d=qe(n);if((d||!o)&&((St(n)!=="body"||yr(s))&&(l=xr(n)),d)){let y=vr(n);c=Wt(n),u.x=y.x+n.clientLeft,u.y=y.y+n.clientTop}let p=s&&!d&&!o?Us(s,l):Fe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function _u(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cu(e){let t=xr(e),r=e.ownerDocument.body,n=tt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=tt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+en(e),s=-t.scrollTop;return Le(r).direction==="rtl"&&(o+=tt(e.clientWidth,r.clientWidth)-n),{width:n,height:i,x:o,y:s}}var wu=25;function Tu(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=de(e),o=Ge(e),s=i.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Jr()||t==="fixed";n?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(en(o)<=0){let p=o.ownerDocument,y=p.body,v=getComputedStyle(y),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(o.clientWidth-y.clientWidth-A),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;S<=wu&&(a-=S)}return{width:a,height:l,x:c,y:u}}function Ou(e,t){let r=vr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Wt(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function ks(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Tu(e,r,t);else if(t==="document")n=Cu(Ge(e));else if(Ne(t))n=Ou(t,r);else{let i=$s(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Et(n)}function Ru(e,t){let r=t.get(e);if(r)return r;let n=Yr(e,[],!1).filter(a=>Ne(a)&&St(a)!=="body"),i=null,o=Le(e).position==="fixed",s=o?nt(e):e;for(;Ne(s)&&!jt(s);){let a=Le(s),l=zt(s),c=i?i.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):i=a,s=nt(s)}return t.set(e,n),n}function Nu(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?gr(t)?[]:Ru(t,this._c):[].concat(r),n],a=ks(t,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let y=ks(t,s[p],i);l=tt(y.top,l),c=fr(y.right,c),u=fr(y.bottom,u),d=tt(y.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Lu(e){let{width:t,height:r}=Ds(e);return{width:t,height:r}}function Pu(e,t,r){let n=qe(t),i=Ge(t),o=r==="fixed",s=vr(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=Fe(0);if((n||!o)&&((St(t)!=="body"||yr(i))&&(a=xr(t)),n)){let p=vr(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!n&&i&&(l.x=en(i));let c=i&&!n&&!o?Us(i,a):Fe(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Si(e){return Le(e).position==="static"}function Is(e,t){if(!qe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ge(e)===r&&(r=r.ownerDocument.body),r}function Bs(e,t){let r=de(e);if(gr(e))return r;if(!qe(e)){let i=nt(e);for(;i&&!jt(i);){if(Ne(i)&&!Si(i))return i;i=nt(i)}return r}let n=Is(e,t);for(;n&&Ns(n)&&Si(n);)n=Is(n,t);return n&&jt(n)&&Si(n)&&!zt(n)?r:n||Ls(e)||r}var ku=async function(e){let t=this.getOffsetParent||Bs,r=this.getDimensions,n=await r(e.floating);return{reference:Pu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Iu(e){return Le(e).direction==="rtl"}var tn={convertOffsetParentRelativeRectToViewportRelativeRect:Su,getDocumentElement:Ge,getClippingRect:Nu,getOffsetParent:Bs,getElementRects:ku,getClientRects:_u,getDimensions:Lu,getScale:Wt,isElement:Ne,isRTL:Iu};var Fs=ws,Hs=Ts;var Vs=(e,t,r)=>{let n=new Map,i=r??{},o={...tn,...i.platform,_c:n};return Cs(e,t,{...i,platform:o})};function zs(e){return Du(e)}function _i(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Du(e){for(let t=e;t;t=_i(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_i(e);t;t=_i(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||zt(r)||t.tagName==="BODY"))return t}return null}async function js(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},Vs(e,t,{strategy:n.strategy,platform:{...tn,getOffsetParent:i=>tn.getOffsetParent(i,zs)},middleware:[Hs({crossAxis:!0}),Fs({allowedPlacements:[n.placement]})]})}var tr=f(E());var Ki=f(X());var Ws=f(X(),1);var Ci=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Mu=e=>({fromAttribute:t=>{if(t==null)return br(e);try{return JSON.parse(t)}catch{return br(e)}},toAttribute:t=>JSON.stringify(t)});function Ks(e,t){return(0,Ws.property)({type:Object,converter:Mu(e),hasChanged:Er,...t??{}})}function $u(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(!Kt(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(!Kt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(e);if(r=o.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Kt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Kt(e,t){try{return $u(e,t)}catch{return!1}}function Er(e,t){return!Kt(e,t)}function br(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function rn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Gs=f(X(),1);var wi=e=>{let t=e??{};return(r,n)=>{var i;let o={hasChanged:Er,attribute:!1,...t};(0,Gs.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var nn=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 _t=f(X(),1);var on=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Xs=f(I(),1);var sn=globalThis,Uu=sn.ShadowRoot&&(sn.ShadyCSS===void 0||sn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var qs=(e,t)=>{if(Uu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=sn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var an=class extends Xs.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 qs(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){Ci(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 Ys(e,t,...r){var n;let i=e.querySelector(t);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var qt=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},ea,Zs=Symbol("constructorPrototype"),Js=Symbol("constructorName"),ta=Symbol("exportpartsDebouncer"),Qs=Symbol("dynamicDependenciesLoaded"),Gt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Gt.eventName="exportparts-updated";var He=class extends an{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ea]=new on(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[ta].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Js]=this.constructor.name,this[Zs]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Js]&&Object.setPrototypeOf(this,this[Zs])}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[Qs]||(r[Qs]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Gt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Gt.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 Gt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Ys(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=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 y=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],A=[...y,...v].filter(l).map(x=>x.trim());for(let x of A)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(y=>`${p}:${y}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};ea=ta;qt([(0,_t.property)()],He.prototype,"exportpartsPrefix",void 0);qt([Ks([])],He.prototype,"exportpartsPrefixes",void 0);qt([(0,_t.property)({reflect:!0})],He.prototype,"exportparts",void 0);qt([(0,_t.property)()],He.prototype,"customStylesheet",void 0);qt([(0,_t.property)()],He.prototype,"elementToFocus",void 0);qt([(0,_t.state)()],He.prototype,"useAdoptedStyleSheets",void 0);function ln(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ar=Symbol("internalReduxEventsUnsubscribers"),it=Symbol("internalStoresUnsubscribers"),Ct=Symbol("internalStores"),Bu=rn(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ct].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ct].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ct].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ct].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Ct].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ct].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[it].has(s.store):this[it].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[it].set(s,a.subscribe(()=>this.updateFromStores())),this[Ar].set(s,[]),ln(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Ar].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[it].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[it].has(s)&&this[it].get(s)(),this[it].delete(s),(a=this[Ar].get(s))===null||a===void 0||a.forEach(l=>l()),this[Ar].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=it,r=Ct,n=Ar,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ra=class extends Bu(He){};function ee(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 Fu=typeof Symbol=="function"&&Symbol.observable||"@@observable",na=Fu,Ti=()=>Math.random().toString(36).substring(7).split("").join("."),Hu={INIT:`@@redux/INIT${Ti()}`,REPLACE:`@@redux/REPLACE${Ti()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ti()}`},cn=Hu;function un(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 Oi(e,t,r){if(typeof e!="function")throw new Error(ee(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ee(1));return r(Oi)(e,t)}let n=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((x,S)=>{s.set(S,x)}))}function u(){if(l)throw new Error(ee(3));return i}function d(x){if(typeof x!="function")throw new Error(ee(4));if(l)throw new Error(ee(5));let S=!0;c();let k=a++;return s.set(k,x),function(){if(S){if(l)throw new Error(ee(6));S=!1,c(),s.delete(k),o=null}}}function p(x){if(!un(x))throw new Error(ee(7));if(typeof x.type>"u")throw new Error(ee(8));if(typeof x.type!="string")throw new Error(ee(17));if(l)throw new Error(ee(9));try{l=!0,i=n(i,x)}finally{l=!1}return(o=s).forEach(k=>{k()}),x}function y(x){if(typeof x!="function")throw new Error(ee(10));n=x,p({type:cn.REPLACE})}function v(){let x=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(ee(11));function k(){let w=S;w.next&&w.next(u())}return k(),{unsubscribe:x(k)}},[na](){return this}}}return p({type:cn.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:y,[na]:v}}function Vu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:cn.INIT})>"u")throw new Error(ee(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function ia(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let a=t[s];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),i,o;try{Vu(r)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<n.length;d++){let p=n[d],y=r[p],v=a[p],A=y(v,l);if(typeof A>"u"){let x=l&&l.type;throw new Error(ee(14))}u[p]=A,c=c||A!==v}return c=c||n.length!==Object.keys(a).length,c?u:a}}function Sr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function oa(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(ee(15))},s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=Sr(...a)(i.dispatch),{...i,dispatch:o}}}function sa(e){return un(e)&&"type"in e&&typeof e.type=="string"}var ma=Symbol.for("immer-nothing"),aa=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function Pe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var me=Object,Yt=me.getPrototypeOf,hn="constructor",bn="prototype",Pi="configurable",mn="enumerable",pn="writable",_r="value",Ve=e=>!!e&&!!e[ne];function ye(e){return e?ya(e)||An(e)||!!e[aa]||!!e[hn]?.[aa]||Sn(e)||_n(e):!1}var zu=me[bn][hn].toString(),la=new WeakMap;function ya(e){if(!e||!Fi(e))return!1;let t=Yt(e);if(t===null||t===me[bn])return!0;let r=me.hasOwnProperty.call(t,hn)&&t[hn];if(r===Object)return!0;if(!Xt(r))return!1;let n=la.get(r);return n===void 0&&(n=Function.toString.call(r),la.set(r,n)),n===zu}function En(e,t,r=!0){Tr(e)===0?(r?Reflect.ownKeys(e):me.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Tr(e){let t=e[ne];return t?t.type_:An(e)?1:Sn(e)?2:_n(e)?3:0}var Ri=(e,t,r=Tr(e))=>r===2?e.has(t):me[bn].hasOwnProperty.call(e,t),ki=(e,t,r=Tr(e))=>r===2?e.get(t):e[t],yn=(e,t,r,n=Tr(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ju(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var An=Array.isArray,Sn=e=>e instanceof Map,_n=e=>e instanceof Set,Fi=e=>typeof e=="object",Xt=e=>typeof e=="function",Ni=e=>typeof e=="boolean";function Wu(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Xe=e=>e.copy_||e.base_;var Hi=e=>e.modified_?e.copy_:e.base_;function Ii(e,t){if(Sn(e))return new Map(e);if(_n(e))return new Set(e);if(An(e))return Array[bn].slice.call(e);let r=ya(e);if(t===!0||t==="class_only"&&!r){let n=me.getOwnPropertyDescriptors(e);delete n[ne];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],a=n[s];a[pn]===!1&&(a[pn]=!0,a[Pi]=!0),(a.get||a.set)&&(n[s]={[Pi]:!0,[pn]:!0,[mn]:a[mn],[_r]:e[s]})}return me.create(Yt(e),n)}else{let n=Yt(e);if(n!==null&&r)return{...e};let i=me.create(n);return me.assign(i,e)}}function Vi(e,t=!1){return Cn(e)||Ve(e)||!ye(e)||(Tr(e)>1&&me.defineProperties(e,{set:dn,add:dn,clear:dn,delete:dn}),me.freeze(e),t&&En(e,(r,n)=>{Vi(n,!0)},!1)),e}function Ku(){Pe(2)}var dn={[_r]:Ku};function Cn(e){return e===null||!Fi(e)?!0:me.isFrozen(e)}var gn="MapSet",Di="Patches",ca="ArrayMethods",ga={};function wt(e){let t=ga[e];return t||Pe(0,e),t}var ua=e=>!!ga[e];var Cr,xa=()=>Cr,Gu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ua(gn)?wt(gn):void 0,arrayMethodsPlugin_:ua(ca)?wt(ca):void 0});function da(e,t){t&&(e.patchPlugin_=wt(Di),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mi(e){$i(e),e.drafts_.forEach(qu),e.drafts_=null}function $i(e){e===Cr&&(Cr=e.parent_)}var pa=e=>Cr=Gu(Cr,e);function qu(e){let t=e[ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[ne].modified_&&(Mi(t),Pe(4)),ye(e)&&(e=ha(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[ne].base_,e,t)}else e=ha(t,r);return Xu(t,e,!0),Mi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ma?e:void 0}function ha(e,t){if(Cn(t))return t;let r=t[ne];if(!r)return xn(t,e.handledSet_,e);if(!wn(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);Ea(r,e)}return r.copy_}function Xu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vi(t,r)}function va(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wn=(e,t)=>e.scope_===t,Yu=[];function ba(e,t,r,n){let i=Xe(e),o=e.type_;if(n!==void 0&&ki(i,n,o)===t){yn(i,n,r,o);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;En(i,(l,c)=>{if(Ve(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=e.draftLocations_.get(t)??Yu;for(let a of s)yn(i,a,r,o)}function Zu(e,t,r){e.callbacks_.push(function(i){let o=t;if(!o||!wn(o,i))return;i.mapSetPlugin_?.fixSetContents(o);let s=Hi(o);ba(e,o.draft_??o,s,r),Ea(o,i)})}function Ea(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 i=n.getPath(e);i&&n.generatePatches_(e,i,t)}va(e)}}function Ju(e,t,r){let{scope_:n}=e;if(Ve(r)){let i=r[ne];wn(i,n)&&i.callbacks_.push(function(){fn(e);let s=Hi(i);ba(e,r,s,t)})}else ye(r)&&e.callbacks_.push(function(){let o=Xe(e);e.type_===3?o.has(r)&&xn(r,n.handledSet_,n):ki(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xn(ki(e.copy_,t,e.type_),n.handledSet_,n)})}function xn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ve(e)||t.has(e)||!ye(e)||Cn(e)||(t.add(e),En(e,(n,i)=>{if(Ve(i)){let o=i[ne];if(wn(o,r)){let s=Hi(o);yn(e,n,s,e.type_),va(o)}}else ye(i)&&xn(i,t,r)})),e}function Qu(e,t){let r=An(e),n={type_:r?1:0,scope_:t?t.scope_:xa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,o=vn;r&&(i=[n],o=wr);let{revoke:s,proxy:a}=Proxy.revocable(i,o);return n.draft_=a,n.revoke_=s,[a,n]}var vn={get(e,t){if(t===ne)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 i=Xe(e);if(!Ri(i,t,e.type_))return td(e,i,t);let o=i[t];if(e.finalized_||!ye(o)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Wu(t))return o;if(o===Li(e.base_,t)||ed(e,t,o)){fn(e);let s=e.type_===1?+t:t,a=Bi(e.scope_,o,e,s);return e.copy_[s]=a}return o},has(e,t){return t in Xe(e)},ownKeys(e){return Reflect.ownKeys(Xe(e))},set(e,t,r){let n=Aa(Xe(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Li(Xe(e),t),o=i?.[ne];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ju(r,i)&&(r!==void 0||Ri(e.base_,t,e.type_)))return!0;fn(e),Ui(e)}return e.copy_[t]===r&&(r!==void 0||Ri(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ju(e,t,r)),!0},deleteProperty(e,t){return fn(e),Li(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ui(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Xe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[pn]:!0,[Pi]:e.type_!==1||t!=="length",[mn]:n[mn],[_r]:r[t]}},defineProperty(){Pe(11)},getPrototypeOf(e){return Yt(e.base_)},setPrototypeOf(){Pe(12)}},wr={};for(let e in vn){let t=vn[e];wr[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}wr.deleteProperty=function(e,t){return wr.set.call(this,e,t,void 0)};wr.set=function(e,t,r){return vn.set.call(this,e[0],t,r,e[0])};function Li(e,t){let r=e[ne];return(r?Xe(r):e)[t]}function ed(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ye(r)||r[ne]?!1:e.baseRefs_.has(r)}function td(e,t,r){let n=Aa(t,r);return n?_r in n?n[_r]:n.get?.call(e.draft_):void 0}function Aa(e,t){if(!(t in e))return;let r=Yt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Yt(r)}}function Ui(e){e.modified_||(e.modified_=!0,e.parent_&&Ui(e.parent_))}function fn(e){e.copy_||(e.assigned_=new Map,e.copy_=Ii(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rd=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Xt(t)&&!Xt(r)){let o=r;r=t;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}Xt(r)||Pe(6),n!==void 0&&!Xt(n)&&Pe(7);let i;if(ye(t)){let o=pa(this),s=Bi(o,t,void 0),a=!0;try{i=r(s),a=!1}finally{a?Mi(o):$i(o)}return da(o,n),fa(i,o)}else if(!t||!Fi(t)){if(i=r(t),i===void 0&&(i=t),i===ma&&(i=void 0),this.autoFreeze_&&Vi(i,!0),n){let o=[],s=[];wt(Di).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),n(o,s)}return i}else Pe(1,t)},this.produceWithPatches=(t,r)=>{if(Xt(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let n,i;return[this.produce(t,r,(s,a)=>{n=s,i=a}),n,i]},Ni(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ni(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ni(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ye(e)||Pe(8),Ve(e)&&(e=Sa(e));let t=pa(this),r=Bi(t,e,void 0);return r[ne].isManual_=!0,$i(t),r}finishDraft(e,t){let r=e&&e[ne];(!r||!r.isManual_)&&Pe(9);let{scope_:n}=r;return da(n,t),fa(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=wt(Di).applyPatches_;return Ve(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Bi(e,t,r,n){let[i,o]=Sn(t)?wt(gn).proxyMap_(t,r):_n(t)?wt(gn).proxySet_(t,r):Qu(t,r);return(r?.scope_??xa()).drafts_.push(i),o.callbacks_=r?.callbacks_??[],o.key_=n,r&&n!==void 0?Zu(r,o,n):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),i}function Sa(e){return Ve(e)||Pe(10,e),_a(e)}function _a(e){if(!ye(e)||Cn(e))return e;let t=e[ne],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ii(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ii(e,!0);return En(r,(i,o)=>{yn(r,i,_a(o))},n),t&&(t.finalized_=!1),r}var nd=globalThis.Iterator,Jf=typeof nd?.from=="function";var id=new rd,zi=id.produce;function Ca(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var wa=Ca(),Ta=Ca;var od=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Sr:Sr.apply(null,arguments)},oh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},sd=e=>e&&typeof e.match=="function";function ot(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ye(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>sa(n)&&n.type===e,r}var Pa=class Or extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Or.prototype)}static get[Symbol.species](){return Or}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Or(...t[0].concat(this)):new Or(...t.concat(this))}};function Oa(e){return ye(e)?zi(e,()=>{}):e}function Tn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function ad(e){return typeof e=="boolean"}var ld=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new Pa;return r&&(ad(r)?s.push(wa):s.push(Ta(r.extraArgument))),s},cd="RTK_autoBatch";var Ra=e=>t=>{setTimeout(t,e)},ud=(e,t)=>r=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=e(i),s=setTimeout(i,t)},dd=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?ud(window.requestAnimationFrame,100):Ra(10):e.type==="callback"?e.queueNotification:Ra(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>i&&u(),p=n.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[cd],o=!i,o&&(s||(s=!0,l(c))),n.dispatch(u)}finally{i=!0}}})},pd=e=>function(r){let{autoBatch:n=!0}=r??{},i=new Pa(e);return n&&i.push(dd(typeof n=="object"?n:void 0)),i};function ka(e){let t=ld(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{},l;if(typeof r=="function")l=r;else if(un(r))l=ia(r);else throw new Error(Ye(1));let c;typeof n=="function"?c=n(t):c=t();let u=Sr;i&&(u=od({trace:!1,...typeof i=="object"&&i}));let d=oa(...c),p=pd(d),y=typeof a=="function"?a(p):p(),v=u(...y);return Oi(l,s,v)}function Ia(e){let t={},r=[],n,i={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Ye(28));if(a in t)throw new Error(Ye(29));return t[a]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function fd(e){return typeof e=="function"}function hd(e,t){let[r,n,i]=Ia(t),o;if(fd(e))o=()=>Oa(e());else{let a=Oa(e);o=()=>a}function s(a=o(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(Ve(u)){let y=d(u,l);return y===void 0?u:y}else{if(ye(u))return zi(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var md=(e,t)=>sd(e)?e.match(t):e(t);function yd(...e){return t=>e.some(r=>md(r,t))}var gd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xd=(e=21)=>{let t="",r=e;for(;r--;)t+=gd[Math.random()*64|0];return t},vd=["name","message","stack","code"],ji=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Na=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},bd=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of vd)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},La="External signal was aborted",Ed=(()=>{function e(t,r,n){let i=ot(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=ot(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=ot(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(n&&n.serializeError||bd)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let y=n?.idGenerator?n.idGenerator(l):xd(),v=new AbortController,A,x;function S(b){x=b,v.abort()}c&&(c.aborted?S(La):c.addEventListener("abort",()=>S(La),{once:!0}));let k=(async function(){let b;try{let R=n?.condition?.(l,{getState:d,extra:p});if(Sd(R)&&(R=await R),R===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((B,W)=>{A=()=>{W({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(o(y,l,n?.getPendingMeta?.({requestId:y,arg:l},{getState:d,extra:p}))),b=await Promise.race([j,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:y,signal:v.signal,abort:S,rejectWithValue:((B,W)=>new ji(B,W)),fulfillWithValue:((B,W)=>new Na(B,W))})).then(B=>{if(B instanceof ji)throw B;return B instanceof Na?i(B.payload,y,l,B.meta):i(B,y,l)})])}catch(R){b=R instanceof ji?s(null,y,l,R.payload,R.meta):s(R,y,l)}finally{A&&v.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&s.match(b)&&b.meta.condition||u(b),b})();return Object.assign(k,{abort:S,requestId:y,arg:l,unwrap(){return k.then(Ad)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:yd(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ad(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Sd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Da=Symbol.for("rtk-slice-createasyncthunk"),ah={[Da]:Ed};function _d(e,t){return`${e}/${t}`}function Cd({creators:e}={}){let t=e?.asyncThunk?.[Da];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Ye(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Td()):n.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,w){let R=typeof b=="string"?b:b.type;if(!R)throw new Error(Ye(12));if(R in l.sliceCaseReducersByType)throw new Error(Ye(13));return l.sliceCaseReducersByType[R]=w,c},addMatcher(b,w){return l.sliceMatchers.push({matcher:b,reducer:w}),c},exposeAction(b,w){return l.actionCreators[b]=w,c},exposeCaseReducer(b,w){return l.sliceCaseReducersByName[b]=w,c}};a.forEach(b=>{let w=s[b],R={reducerName:b,type:_d(i,b),createNotation:typeof n.reducers=="function"};Rd(w)?Ld(R,w,c,t):Od(R,w,c)});function u(){let[b={},w=[],R=void 0]=typeof n.extraReducers=="function"?Ia(n.extraReducers):[n.extraReducers],j={...b,...l.sliceCaseReducersByType};return hd(n.initialState,B=>{for(let W in j)B.addCase(W,j[W]);for(let W of l.sliceMatchers)B.addMatcher(W.matcher,W.reducer);for(let W of w)B.addMatcher(W.matcher,W.reducer);R&&B.addDefaultCase(R)})}let d=b=>b,p=new Map,y=new WeakMap,v;function A(b,w){return v||(v=u()),v(b,w)}function x(){return v||(v=u()),v.getInitialState()}function S(b,w=!1){function R(B){let W=B[b];return typeof W>"u"&&w&&(W=Tn(y,R,x)),W}function j(B=d){let W=Tn(p,w,()=>new WeakMap);return Tn(W,B,()=>{let sr={};for(let[ve,lt]of Object.entries(n.selectors??{}))sr[ve]=wd(lt,B,()=>Tn(y,B,x),w);return sr})}return{reducerPath:b,getSelectors:j,get selectors(){return j(R)},selectSlice:R}}let k={name:i,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:x,...S(o),injectInto(b,{reducerPath:w,...R}={}){let j=w??o;return b.inject({reducerPath:j,reducer:A},R),{...k,...S(j,!0)}}};return k}}function wd(e,t,r,n){function i(o,...s){let a=t(o);return typeof a>"u"&&n&&(a=r()),e(a,...s)}return i.unwrapped=e,i}var Ma=Cd();function Td(){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 Od({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!Nd(n))throw new Error(Ye(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?ot(e,s):ot(e))}function Rd(e){return e._reducerDefinitionType==="asyncThunk"}function Nd(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ld({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ye(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,d=i(e,o,u);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),a&&n.addCase(d.pending,a),l&&n.addCase(d.rejected,l),c&&n.addMatcher(d.settled,c),n.exposeCaseReducer(t,{fulfilled:s||On,pending:a||On,rejected:l||On,settled:c||On})}function On(){}var $a="listener",Ua="completed",Ba="cancelled",lh=`task-${Ba}`,ch=`task-${Ua}`,uh=`${$a}-${Ba}`,dh=`${$a}-${Ua}`;var{assign:Fa}=Object;var Wi="listenerMiddleware";var Pd=Fa(ot(`${Wi}/add`),{withTypes:()=>Pd}),ph=ot(`${Wi}/removeAll`),kd=Fa(ot(`${Wi}/remove`),{withTypes:()=>kd});function Ye(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 Id=rn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Rn=class extends Id(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ha=class e extends Rn{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,o=window.ftReduxStores[n];if(ln(o))return o;if(i==null)return;let s=Ma({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=ka({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new e(s,a,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new nn,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Kt(p,u)||this.setState({[d]:i(u)})}}}),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 Nn=class{static format(t,r,n,i,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(t,r,n,i,!!o)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ln=f(E()),Dd="ft-app-info",Tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Tt.eventName="authentication-change";var Rr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Rr.eventName="ui-locale-changed";var Md={session:(e,t)=>{(0,Ln.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>_.dispatchEvent(new Tt(t.payload)),0))}},_=Ln.FtReduxStore.get({name:Dd,reducers:Md,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 Va=f(E()),Pn=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Vh=(0,Va.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(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>Nn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pn([(0,Ki.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Pn([(0,Ki.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Pn([wi({store:_.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Pn([wi({store:_.name})],t.prototype,"uiLocale",void 0),t});var za;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(za||(za={}));var ja;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(ja||(ja={}));var Wa;(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"})(Wa||(Wa={}));var Ka;(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"})(Ka||(Ka={}));var Ga;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ga||(Ga={}));var qa;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(qa||(qa={}));var Xa;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Xa||(Xa={}));var Ya;(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"})(Ya||(Ya={}));var Za;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Za||(Za={}));var Ja;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ja||(Ja={}));var Qa;(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"})(Qa||(Qa={}));var el;(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"})(el||(el={}));var tl;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(tl||(tl={}));var rl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(rl||(rl={}));var nl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(nl||(nl={}));var il;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(il||(il={}));var ol;(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"})(ol||(ol={}));var sl;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(sl||(sl={}));var al;(function(e){e.ASC="ASC",e.DESC="DESC"})(al||(al={}));var ll;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(ll||(ll={}));var cl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(cl||(cl={}));var ul;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ul||(ul={}));var dl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(dl||(dl={}));var pl;(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"})(pl||(pl={}));var fl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fl||(fl={}));var hl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(hl||(hl={}));var ml;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ml||(ml={}));var yl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(yl||(yl={}));var q;(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"})(q||(q={}));var Ee;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ee||(Ee={}));var gl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(gl||(gl={}));var xl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(xl||(xl={}));var vl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(vl||(vl={}));var bl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(bl||(bl={}));var El;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(El||(El={}));var Al;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Al||(Al={}));var Sl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Sl||(Sl={}));var _l;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(_l||(_l={}));var Cl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Cl||(Cl={}));var wl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(wl||(wl={}));var Tl;(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"})(Tl||(Tl={}));var Ol;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Ol||(Ol={}));var $d={[q.PERSONAL_BOOK_SHARE_USER]:[q.PERSONAL_BOOK_USER],[q.HTML_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.PDF_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.KHUB_ADMIN]:[q.CONTENT_PUBLISHER],[q.ADMIN]:[q.KHUB_ADMIN,q.USERS_ADMIN,q.PORTAL_ADMIN,q.BEHAVIOR_DATA_USER],[q.GENERATIVE_AI_EXPORT_USER]:[q.GENERATIVE_AI_USER]};function Rl(e,t){return e===t||($d[e]??[]).some(r=>Rl(r,t))}function Gi(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=>Rl(n,t))}function Nl(e,...t){return e==null?!1:t.some(r=>Gi(e,r))}var $n=f(E());var qi=f(E());var Ot=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=_.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=_.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var Zt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ot.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ot.await()}};var ge=class extends Zt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new qi.CacheRegistry,this.cache=t?i.commonCache:new qi.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 kn=class extends ge{async listMySearches(){let{session:t}=_.getState();return Gi(t,q.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var In=class extends ge{async listMyBookmarks(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Dn=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var Mn=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var Ud="ft-user-assets",Bd={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Ee).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Yi(e,r,[...Xi(e,r),i]),Ll(e,r,1,n),Pl(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Yi(e,r,Xi(e,r).map(i=>i.id===n.id?n:i)),Pl(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Yi(e,r,Xi(e,r).filter(o=>o.id!==i)),Ll(e,r,-1,n)}},kl={[Ee.SEARCHES]:"savedSearches",[Ee.BOOKMARKS]:"bookmarks",[Ee.BOOKS]:void 0,[Ee.COLLECTIONS]:void 0},Xi=(e,t)=>{var r;let n=kl[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Yi=(e,t,r)=>{let n=kl[t];n&&(e[n]=r)},Ll=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===Ee.BOOKMARKS&&n)){let o=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},Pl=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},oe=$n.FtReduxStore.get({name:Ud,reducers:Bd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ee).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Zi=class{constructor(t=new Dn,r=new Mn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new In,this.savedSearchesService=new kn,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=_.getState();(0,$n.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(),oe.actions.clearAssetCount(),oe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),oe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),oe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();oe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();oe.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&oe.getState().assetCounts.allAsset[t]!==r.count&&oe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&oe.getState().assetCounts.bookmarkByMap[t]!==r.count&&oe.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(oe.getState().assetCounts.bookmarkByMap).length!==0;t===Ee.BOOKMARKS&&r&&oe.actions.clearBookmarkCountByMap(),oe.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;oe.actions.bookmarks(r)}}},Fd=new Zi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Fd);var Ji=class{addCommand(t,r=!1){_.commands.add(t,r)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ji;var Ae=f(E());var Il,Jt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Hd=Symbol("clearAfterUnitTest"),Un=class extends(0,Ae.withEventBus)(ge){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Il]=()=>{this.defaultMessages={},this.cache=new Ae.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Ae.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let o=t.toLowerCase(),s=this.resolveContext(o);return new Ae.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof Ae.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Jt({loadedContexts:t})),this.dispatchEvent(new Jt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Jt({loadedContexts:[t]})),this.dispatchEvent(new Jt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ae.delay)(0).then(()=>n()).catch(()=>null)))}};Il=Hd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Un{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Un{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Qt=window.FluidTopicsI18nService,Bn=window.FluidTopicsCustomI18nService;var Dl=f(E()),Qi=class{highlightHtml(t,r,n){(0,Dl.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Qi;var Ml=f(E());var eo=class{isDate(t){var r,n,i,o;return(o=(i=((n=(r=_.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(t,r){var n,i,o,s;if(t==null)return"";try{return Ml.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new eo;var $l=f(E());var Nr=class{static get(t,r){var n,i,o,s;let a=_.getState(),{lang:l,region:c}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new $l.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var to=class{urlToSearchRequest(t){return Nr.get().parse(t)}searchRequestToUrl(t){return Nr.get().serialize(t)}};window.FluidTopicsUrlService=new to;var Ze=f(E());var Rt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Rt.eventName="before-location-change";var Nt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Nt.eventName="change";var ro=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))}},Ul=new ro;var Fn=class e extends Ze.WithEventBus{static build(){return new e(window.history,Ul,()=>window.location,!1)}constructor(t,r,n,i){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ze.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[o,s,a])=>{let l=new Rt(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...o,index:c,href:l.detail.nextLocation.href};n.apply(i,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Rt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Rt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Nt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Nt.eventName,t)}currentItem(){return(0,Ze.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,Ze.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ze.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,Ze.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fn.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 Bl=f(I());var Fl=Bl.css`
|
|
289
|
+
`;var xs=["top","right","bottom","left"],gs=["start","end"],xi=xs.reduce((e,t)=>e.concat(t,t+"-"+gs[0],t+"-"+gs[1]),[]),fr=Math.min,tt=Math.max,hr=Math.round;var Fe=e=>({x:e,y:e}),mu={left:"right",right:"left",bottom:"top",top:"bottom"};function vs(e,t,r){return tt(e,fr(t,r))}function qr(e,t){return typeof e=="function"?e(t):e}function mr(e){return e.split("-")[0]}function rt(e){return e.split("-")[1]}function vi(e){return e==="x"?"y":"x"}function bi(e){return e==="y"?"height":"width"}function Xr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ei(e){return vi(Xr(e))}function bs(e,t,r){r===void 0&&(r=!1);let n=rt(e),i=Ei(e),o=bi(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=gi(s)),[s,gi(s)]}function Es(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function gi(e){let t=mr(e);return mu[t]+e.slice(t.length)}function yu(e){var t,r,n,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function As(e){return typeof e!="number"?yu(e):{top:e,right:e,bottom:e,left:e}}function Et(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Ss(e,t,r){let{reference:n,floating:i}=e,o=Xr(t),s=Ei(t),a=bi(s),l=mr(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,y;switch(l){case"top":y={x:u,y:n.y-i.height};break;case"bottom":y={x:u,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:d};break;case"left":y={x:n.x-i.width,y:d};break;default:y={x:n.x,y:n.y}}let v=rt(t);return v&&(y[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),y}async function _s(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:y=0}=qr(t,e),v=As(y),x=a[p?d==="floating"?"reference":"floating":d],S=Et(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(b))&&await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1},R=Et(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:b,strategy:l}):k);return{top:(S.top-R.top+v.top)/w.y,bottom:(R.bottom-S.bottom+v.bottom)/w.y,left:(S.left-R.left+v.left)/w.x,right:(R.right-S.right+v.right)/w.x}}var gu=50,Cs=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:_s},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ss(c,n,l),p=n,y=0,v={};for(let A=0;A<o.length;A++){let x=o[A];if(!x)continue;let{name:S,fn:k}=x,{x:b,y:w,data:R,reset:j}=await k({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=w??d,v[S]={...v[S],...R},j&&y<gu&&(y++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(c=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):j.rects),{x:u,y:d}=Ss(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:v}};function xu(e,t,r){return(e?[...r.filter(i=>rt(i)===e),...r.filter(i=>rt(i)!==e)]:r.filter(i=>mr(i)===i)).filter(i=>e?rt(i)===e||(t?Es(i)!==i:!1):!0)}var ws=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=xi,autoAlignment:y=!0,...v}=qr(e,t),A=d!==void 0||p===xi?xu(d||null,y,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,S=A[x];if(S==null)return{};if(a!==S)return{reset:{placement:A[0]}};let k=await l.detectOverflow(t,v),b=bs(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),w=[k[mr(S)],k[b[0]],k[b[1]]],R=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:w}],j=A[x+1];if(j)return{data:{index:x+1,overflows:R},reset:{placement:j}};let B=R.map(ve=>{let lt=rt(ve.placement);return[ve.placement,lt&&u?ve.overflows.slice(0,2).reduce((eu,tu)=>eu+tu,0):ve.overflows[0],ve.overflows]}).sort((ve,lt)=>ve[1]-lt[1]),sr=((i=B.filter(ve=>ve[2].slice(0,rt(ve[0])?2:3).every(lt=>lt<=0))[0])==null?void 0:i[0])||B[0][0];return sr!==a?{data:{index:x+1,overflows:R},reset:{placement:sr}}:{}}}};var Ts=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:k=>{let{x:b,y:w}=k;return{x:b,y:w}}},...c}=qr(e,t),u={x:r,y:n},d=await o.detectOverflow(t,c),p=Xr(i),y=vi(p),v=u[y],A=u[p],x=(k,b)=>vs(b+d[k==="y"?"top":"left"],b,b-d[k==="y"?"bottom":"right"]);s&&(v=x(y,v)),a&&(A=x(p,A));let S=l.fn({...t,[y]:v,[p]:A});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[y]:s,[p]:a}}}}}};function Zr(){return typeof window<"u"}function St(e){return Rs(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ge(e){var t;return(t=(Rs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rs(e){return Zr()?e instanceof Node||e instanceof de(e).Node:!1}function Ne(e){return Zr()?e instanceof Element||e instanceof de(e).Element:!1}function qe(e){return Zr()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function Os(e){return!Zr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function yr(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Ns(e){return/^(table|td|th)$/.test(St(e))}function gr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var vu=/transform|translate|scale|rotate|perspective|filter/,bu=/paint|layout|strict|content/,At=e=>!!e&&e!=="none",Ai;function zt(e){let t=Ne(e)?Le(e):e;return At(t.transform)||At(t.translate)||At(t.scale)||At(t.rotate)||At(t.perspective)||!Jr()&&(At(t.backdropFilter)||At(t.filter))||vu.test(t.willChange||"")||bu.test(t.contain||"")}function Ls(e){let t=nt(e);for(;qe(t)&&!jt(t);){if(zt(t))return t;if(gr(t))return null;t=nt(t)}return null}function Jr(){return Ai==null&&(Ai=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ai}function jt(e){return/^(html|body|#document)$/.test(St(e))}function Le(e){return de(e).getComputedStyle(e)}function xr(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(St(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Os(e)&&e.host||Ge(e);return Os(t)?t.host:t}function Ps(e){let t=nt(e);return jt(t)?(e.ownerDocument||e).body:qe(t)&&yr(t)?t:Ps(t)}function Yr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Ps(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=de(i);if(o){let a=Qr(s);return t.concat(s,s.visualViewport||[],yr(i)?i:[],a&&r?Yr(a):[])}else return t.concat(i,Yr(i,[],r))}function Qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ds(e){let t=Le(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=qe(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=hr(r)!==o||hr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function Ms(e){return Ne(e)?e:e.contextElement}function Wt(e){let t=Ms(e);if(!qe(t))return Fe(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Ds(t),s=(o?hr(r.width):r.width)/n,a=(o?hr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Eu=Fe(0);function $s(e){let t=de(e);return!Jr()||!t.visualViewport?Eu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Au(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===de(e)}function vr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Ms(e),s=Fe(1);t&&(n?Ne(n)&&(s=Wt(n)):s=Wt(e));let a=Au(o,r,n)?$s(o):Fe(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o&&n){let p=de(o),y=Ne(n)?de(n):n,v=p,A=Qr(v);for(;A&&y!==v;){let x=Wt(A),S=A.getBoundingClientRect(),k=Le(A),b=S.left+(A.clientLeft+parseFloat(k.paddingLeft))*x.x,w=S.top+(A.clientTop+parseFloat(k.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=w,v=de(A),A=Qr(v)}}return Et({width:u,height:d,x:l,y:c})}function en(e,t){let r=xr(e).scrollLeft;return t?t.left+r:vr(Ge(e)).left+r}function Us(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-en(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Su(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=Ge(n),a=t?gr(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Fe(1),u=Fe(0),d=qe(n);if((d||!o)&&((St(n)!=="body"||yr(s))&&(l=xr(n)),d)){let y=vr(n);c=Wt(n),u.x=y.x+n.clientLeft,u.y=y.y+n.clientTop}let p=s&&!d&&!o?Us(s,l):Fe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function _u(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cu(e){let t=xr(e),r=e.ownerDocument.body,n=tt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=tt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+en(e),s=-t.scrollTop;return Le(r).direction==="rtl"&&(o+=tt(e.clientWidth,r.clientWidth)-n),{width:n,height:i,x:o,y:s}}var wu=25;function Tu(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=de(e),o=Ge(e),s=i.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Jr()||t==="fixed";n?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(en(o)<=0){let p=o.ownerDocument,y=p.body,v=getComputedStyle(y),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(o.clientWidth-y.clientWidth-A),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;S<=wu&&(a-=S)}return{width:a,height:l,x:c,y:u}}function Ou(e,t){let r=vr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Wt(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function ks(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Tu(e,r,t);else if(t==="document")n=Cu(Ge(e));else if(Ne(t))n=Ou(t,r);else{let i=$s(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Et(n)}function Ru(e,t){let r=t.get(e);if(r)return r;let n=Yr(e,[],!1).filter(a=>Ne(a)&&St(a)!=="body"),i=null,o=Le(e).position==="fixed",s=o?nt(e):e;for(;Ne(s)&&!jt(s);){let a=Le(s),l=zt(s),c=i?i.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):i=a,s=nt(s)}return t.set(e,n),n}function Nu(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?gr(t)?[]:Ru(t,this._c):[].concat(r),n],a=ks(t,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let y=ks(t,s[p],i);l=tt(y.top,l),c=fr(y.right,c),u=fr(y.bottom,u),d=tt(y.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Lu(e){let{width:t,height:r}=Ds(e);return{width:t,height:r}}function Pu(e,t,r){let n=qe(t),i=Ge(t),o=r==="fixed",s=vr(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=Fe(0);if((n||!o)&&((St(t)!=="body"||yr(i))&&(a=xr(t)),n)){let p=vr(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!n&&i&&(l.x=en(i));let c=i&&!n&&!o?Us(i,a):Fe(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Si(e){return Le(e).position==="static"}function Is(e,t){if(!qe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ge(e)===r&&(r=r.ownerDocument.body),r}function Bs(e,t){let r=de(e);if(gr(e))return r;if(!qe(e)){let i=nt(e);for(;i&&!jt(i);){if(Ne(i)&&!Si(i))return i;i=nt(i)}return r}let n=Is(e,t);for(;n&&Ns(n)&&Si(n);)n=Is(n,t);return n&&jt(n)&&Si(n)&&!zt(n)?r:n||Ls(e)||r}var ku=async function(e){let t=this.getOffsetParent||Bs,r=this.getDimensions,n=await r(e.floating);return{reference:Pu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Iu(e){return Le(e).direction==="rtl"}var tn={convertOffsetParentRelativeRectToViewportRelativeRect:Su,getDocumentElement:Ge,getClippingRect:Nu,getOffsetParent:Bs,getElementRects:ku,getClientRects:_u,getDimensions:Lu,getScale:Wt,isElement:Ne,isRTL:Iu};var Fs=ws,Hs=Ts;var Vs=(e,t,r)=>{let n=new Map,i=r??{},o={...tn,...i.platform,_c:n};return Cs(e,t,{...i,platform:o})};function zs(e){return Du(e)}function _i(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Du(e){for(let t=e;t;t=_i(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_i(e);t;t=_i(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||zt(r)||t.tagName==="BODY"))return t}return null}async function js(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},Vs(e,t,{strategy:n.strategy,platform:{...tn,getOffsetParent:i=>tn.getOffsetParent(i,zs)},middleware:[Hs({crossAxis:!0}),Fs({allowedPlacements:[n.placement]})]})}var tr=f(E());var Ki=f(X());var Ws=f(X(),1);var Ci=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Mu=e=>({fromAttribute:t=>{if(t==null)return br(e);try{return JSON.parse(t)}catch{return br(e)}},toAttribute:t=>JSON.stringify(t)});function Ks(e,t){return(0,Ws.property)({type:Object,converter:Mu(e),hasChanged:Er,...t??{}})}function $u(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(!Kt(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(!Kt(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(e);if(r=o.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Kt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Kt(e,t){try{return $u(e,t)}catch{return!1}}function Er(e,t){return!Kt(e,t)}function br(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function rn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var Gs=f(X(),1);var wi=e=>{let t=e??{};return(r,n)=>{var i;let o={hasChanged:Er,attribute:!1,...t};(0,Gs.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var nn=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 _t=f(X(),1);var on=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Xs=f(I(),1);var sn=globalThis,Uu=sn.ShadowRoot&&(sn.ShadyCSS===void 0||sn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var qs=(e,t)=>{if(Uu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=sn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var an=class extends Xs.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 qs(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){Ci(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 Ys(e,t,...r){var n;let i=e.querySelector(t);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var qt=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},ea,Zs=Symbol("constructorPrototype"),Js=Symbol("constructorName"),ta=Symbol("exportpartsDebouncer"),Qs=Symbol("dynamicDependenciesLoaded"),Gt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Gt.eventName="exportparts-updated";var He=class extends an{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ea]=new on(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[ta].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Js]=this.constructor.name,this[Zs]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Js]&&Object.setPrototypeOf(this,this[Zs])}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[Qs]||(r[Qs]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Gt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Gt.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 Gt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Ys(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let y=(s=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&s!==void 0?s:[],v=(a=(i=p.getAttribute("exportparts"))===null||i===void 0?void 0:i.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],A=[...y,...v].filter(l).map(x=>x.trim());for(let x of A)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(y=>`${p}:${y}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};ea=ta;qt([(0,_t.property)()],He.prototype,"exportpartsPrefix",void 0);qt([Ks([])],He.prototype,"exportpartsPrefixes",void 0);qt([(0,_t.property)({reflect:!0})],He.prototype,"exportparts",void 0);qt([(0,_t.property)()],He.prototype,"customStylesheet",void 0);qt([(0,_t.property)()],He.prototype,"elementToFocus",void 0);qt([(0,_t.state)()],He.prototype,"useAdoptedStyleSheets",void 0);function ln(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ar=Symbol("internalReduxEventsUnsubscribers"),it=Symbol("internalStoresUnsubscribers"),Ct=Symbol("internalStores"),Bu=rn(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ct].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ct].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ct].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ct].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Ct].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ct].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[it].has(s.store):this[it].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[it].set(s,a.subscribe(()=>this.updateFromStores())),this[Ar].set(s,[]),ln(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Ar].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[it].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[it].has(s)&&this[it].get(s)(),this[it].delete(s),(a=this[Ar].get(s))===null||a===void 0||a.forEach(l=>l()),this[Ar].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=it,r=Ct,n=Ar,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ra=class extends Bu(He){};function ee(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 Fu=typeof Symbol=="function"&&Symbol.observable||"@@observable",na=Fu,Ti=()=>Math.random().toString(36).substring(7).split("").join("."),Hu={INIT:`@@redux/INIT${Ti()}`,REPLACE:`@@redux/REPLACE${Ti()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ti()}`},cn=Hu;function un(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 Oi(e,t,r){if(typeof e!="function")throw new Error(ee(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ee(1));return r(Oi)(e,t)}let n=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((x,S)=>{s.set(S,x)}))}function u(){if(l)throw new Error(ee(3));return i}function d(x){if(typeof x!="function")throw new Error(ee(4));if(l)throw new Error(ee(5));let S=!0;c();let k=a++;return s.set(k,x),function(){if(S){if(l)throw new Error(ee(6));S=!1,c(),s.delete(k),o=null}}}function p(x){if(!un(x))throw new Error(ee(7));if(typeof x.type>"u")throw new Error(ee(8));if(typeof x.type!="string")throw new Error(ee(17));if(l)throw new Error(ee(9));try{l=!0,i=n(i,x)}finally{l=!1}return(o=s).forEach(k=>{k()}),x}function y(x){if(typeof x!="function")throw new Error(ee(10));n=x,p({type:cn.REPLACE})}function v(){let x=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(ee(11));function k(){let w=S;w.next&&w.next(u())}return k(),{unsubscribe:x(k)}},[na](){return this}}}return p({type:cn.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:y,[na]:v}}function Vu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:cn.INIT})>"u")throw new Error(ee(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function ia(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let a=t[s];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),i,o;try{Vu(r)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<n.length;d++){let p=n[d],y=r[p],v=a[p],A=y(v,l);if(typeof A>"u"){let x=l&&l.type;throw new Error(ee(14))}u[p]=A,c=c||A!==v}return c=c||n.length!==Object.keys(a).length,c?u:a}}function Sr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function oa(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(ee(15))},s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=Sr(...a)(i.dispatch),{...i,dispatch:o}}}function sa(e){return un(e)&&"type"in e&&typeof e.type=="string"}var ma=Symbol.for("immer-nothing"),aa=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function Pe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var me=Object,Yt=me.getPrototypeOf,hn="constructor",bn="prototype",Pi="configurable",mn="enumerable",pn="writable",_r="value",Ve=e=>!!e&&!!e[ne];function ye(e){return e?ya(e)||An(e)||!!e[aa]||!!e[hn]?.[aa]||Sn(e)||_n(e):!1}var zu=me[bn][hn].toString(),la=new WeakMap;function ya(e){if(!e||!Fi(e))return!1;let t=Yt(e);if(t===null||t===me[bn])return!0;let r=me.hasOwnProperty.call(t,hn)&&t[hn];if(r===Object)return!0;if(!Xt(r))return!1;let n=la.get(r);return n===void 0&&(n=Function.toString.call(r),la.set(r,n)),n===zu}function En(e,t,r=!0){Tr(e)===0?(r?Reflect.ownKeys(e):me.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Tr(e){let t=e[ne];return t?t.type_:An(e)?1:Sn(e)?2:_n(e)?3:0}var Ri=(e,t,r=Tr(e))=>r===2?e.has(t):me[bn].hasOwnProperty.call(e,t),ki=(e,t,r=Tr(e))=>r===2?e.get(t):e[t],yn=(e,t,r,n=Tr(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ju(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var An=Array.isArray,Sn=e=>e instanceof Map,_n=e=>e instanceof Set,Fi=e=>typeof e=="object",Xt=e=>typeof e=="function",Ni=e=>typeof e=="boolean";function Wu(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Xe=e=>e.copy_||e.base_;var Hi=e=>e.modified_?e.copy_:e.base_;function Ii(e,t){if(Sn(e))return new Map(e);if(_n(e))return new Set(e);if(An(e))return Array[bn].slice.call(e);let r=ya(e);if(t===!0||t==="class_only"&&!r){let n=me.getOwnPropertyDescriptors(e);delete n[ne];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],a=n[s];a[pn]===!1&&(a[pn]=!0,a[Pi]=!0),(a.get||a.set)&&(n[s]={[Pi]:!0,[pn]:!0,[mn]:a[mn],[_r]:e[s]})}return me.create(Yt(e),n)}else{let n=Yt(e);if(n!==null&&r)return{...e};let i=me.create(n);return me.assign(i,e)}}function Vi(e,t=!1){return Cn(e)||Ve(e)||!ye(e)||(Tr(e)>1&&me.defineProperties(e,{set:dn,add:dn,clear:dn,delete:dn}),me.freeze(e),t&&En(e,(r,n)=>{Vi(n,!0)},!1)),e}function Ku(){Pe(2)}var dn={[_r]:Ku};function Cn(e){return e===null||!Fi(e)?!0:me.isFrozen(e)}var gn="MapSet",Di="Patches",ca="ArrayMethods",ga={};function wt(e){let t=ga[e];return t||Pe(0,e),t}var ua=e=>!!ga[e];var Cr,xa=()=>Cr,Gu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ua(gn)?wt(gn):void 0,arrayMethodsPlugin_:ua(ca)?wt(ca):void 0});function da(e,t){t&&(e.patchPlugin_=wt(Di),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mi(e){$i(e),e.drafts_.forEach(qu),e.drafts_=null}function $i(e){e===Cr&&(Cr=e.parent_)}var pa=e=>Cr=Gu(Cr,e);function qu(e){let t=e[ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fa(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[ne].modified_&&(Mi(t),Pe(4)),ye(e)&&(e=ha(t,e));let{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[ne].base_,e,t)}else e=ha(t,r);return Xu(t,e,!0),Mi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ma?e:void 0}function ha(e,t){if(Cn(t))return t;let r=t[ne];if(!r)return xn(t,e.handledSet_,e);if(!wn(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);Ea(r,e)}return r.copy_}function Xu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vi(t,r)}function va(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wn=(e,t)=>e.scope_===t,Yu=[];function ba(e,t,r,n){let i=Xe(e),o=e.type_;if(n!==void 0&&ki(i,n,o)===t){yn(i,n,r,o);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;En(i,(l,c)=>{if(Ve(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=e.draftLocations_.get(t)??Yu;for(let a of s)yn(i,a,r,o)}function Zu(e,t,r){e.callbacks_.push(function(i){let o=t;if(!o||!wn(o,i))return;i.mapSetPlugin_?.fixSetContents(o);let s=Hi(o);ba(e,o.draft_??o,s,r),Ea(o,i)})}function Ea(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 i=n.getPath(e);i&&n.generatePatches_(e,i,t)}va(e)}}function Ju(e,t,r){let{scope_:n}=e;if(Ve(r)){let i=r[ne];wn(i,n)&&i.callbacks_.push(function(){fn(e);let s=Hi(i);ba(e,r,s,t)})}else ye(r)&&e.callbacks_.push(function(){let o=Xe(e);e.type_===3?o.has(r)&&xn(r,n.handledSet_,n):ki(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xn(ki(e.copy_,t,e.type_),n.handledSet_,n)})}function xn(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ve(e)||t.has(e)||!ye(e)||Cn(e)||(t.add(e),En(e,(n,i)=>{if(Ve(i)){let o=i[ne];if(wn(o,r)){let s=Hi(o);yn(e,n,s,e.type_),va(o)}}else ye(i)&&xn(i,t,r)})),e}function Qu(e,t){let r=An(e),n={type_:r?1:0,scope_:t?t.scope_:xa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,o=vn;r&&(i=[n],o=wr);let{revoke:s,proxy:a}=Proxy.revocable(i,o);return n.draft_=a,n.revoke_=s,[a,n]}var vn={get(e,t){if(t===ne)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 i=Xe(e);if(!Ri(i,t,e.type_))return td(e,i,t);let o=i[t];if(e.finalized_||!ye(o)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Wu(t))return o;if(o===Li(e.base_,t)||ed(e,t,o)){fn(e);let s=e.type_===1?+t:t,a=Bi(e.scope_,o,e,s);return e.copy_[s]=a}return o},has(e,t){return t in Xe(e)},ownKeys(e){return Reflect.ownKeys(Xe(e))},set(e,t,r){let n=Aa(Xe(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=Li(Xe(e),t),o=i?.[ne];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ju(r,i)&&(r!==void 0||Ri(e.base_,t,e.type_)))return!0;fn(e),Ui(e)}return e.copy_[t]===r&&(r!==void 0||Ri(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Ju(e,t,r)),!0},deleteProperty(e,t){return fn(e),Li(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Ui(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Xe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[pn]:!0,[Pi]:e.type_!==1||t!=="length",[mn]:n[mn],[_r]:r[t]}},defineProperty(){Pe(11)},getPrototypeOf(e){return Yt(e.base_)},setPrototypeOf(){Pe(12)}},wr={};for(let e in vn){let t=vn[e];wr[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}wr.deleteProperty=function(e,t){return wr.set.call(this,e,t,void 0)};wr.set=function(e,t,r){return vn.set.call(this,e[0],t,r,e[0])};function Li(e,t){let r=e[ne];return(r?Xe(r):e)[t]}function ed(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ye(r)||r[ne]?!1:e.baseRefs_.has(r)}function td(e,t,r){let n=Aa(t,r);return n?_r in n?n[_r]:n.get?.call(e.draft_):void 0}function Aa(e,t){if(!(t in e))return;let r=Yt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Yt(r)}}function Ui(e){e.modified_||(e.modified_=!0,e.parent_&&Ui(e.parent_))}function fn(e){e.copy_||(e.assigned_=new Map,e.copy_=Ii(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rd=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Xt(t)&&!Xt(r)){let o=r;r=t;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}Xt(r)||Pe(6),n!==void 0&&!Xt(n)&&Pe(7);let i;if(ye(t)){let o=pa(this),s=Bi(o,t,void 0),a=!0;try{i=r(s),a=!1}finally{a?Mi(o):$i(o)}return da(o,n),fa(i,o)}else if(!t||!Fi(t)){if(i=r(t),i===void 0&&(i=t),i===ma&&(i=void 0),this.autoFreeze_&&Vi(i,!0),n){let o=[],s=[];wt(Di).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),n(o,s)}return i}else Pe(1,t)},this.produceWithPatches=(t,r)=>{if(Xt(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let n,i;return[this.produce(t,r,(s,a)=>{n=s,i=a}),n,i]},Ni(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ni(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ni(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ye(e)||Pe(8),Ve(e)&&(e=Sa(e));let t=pa(this),r=Bi(t,e,void 0);return r[ne].isManual_=!0,$i(t),r}finishDraft(e,t){let r=e&&e[ne];(!r||!r.isManual_)&&Pe(9);let{scope_:n}=r;return da(n,t),fa(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 i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=wt(Di).applyPatches_;return Ve(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Bi(e,t,r,n){let[i,o]=Sn(t)?wt(gn).proxyMap_(t,r):_n(t)?wt(gn).proxySet_(t,r):Qu(t,r);return(r?.scope_??xa()).drafts_.push(i),o.callbacks_=r?.callbacks_??[],o.key_=n,r&&n!==void 0?Zu(r,o,n):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),i}function Sa(e){return Ve(e)||Pe(10,e),_a(e)}function _a(e){if(!ye(e)||Cn(e))return e;let t=e[ne],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ii(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ii(e,!0);return En(r,(i,o)=>{yn(r,i,_a(o))},n),t&&(t.finalized_=!1),r}var nd=globalThis.Iterator,Jf=typeof nd?.from=="function";var id=new rd,zi=id.produce;function Ca(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var wa=Ca(),Ta=Ca;var od=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Sr:Sr.apply(null,arguments)},oh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},sd=e=>e&&typeof e.match=="function";function ot(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ye(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>sa(n)&&n.type===e,r}var Pa=class Or extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Or.prototype)}static get[Symbol.species](){return Or}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Or(...t[0].concat(this)):new Or(...t.concat(this))}};function Oa(e){return ye(e)?zi(e,()=>{}):e}function Tn(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function ad(e){return typeof e=="boolean"}var ld=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new Pa;return r&&(ad(r)?s.push(wa):s.push(Ta(r.extraArgument))),s},cd="RTK_autoBatch";var Ra=e=>t=>{setTimeout(t,e)},ud=(e,t)=>r=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=e(i),s=setTimeout(i,t)},dd=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?ud(window.requestAnimationFrame,100):Ra(10):e.type==="callback"?e.queueNotification:Ra(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>i&&u(),p=n.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[cd],o=!i,o&&(s||(s=!0,l(c))),n.dispatch(u)}finally{i=!0}}})},pd=e=>function(r){let{autoBatch:n=!0}=r??{},i=new Pa(e);return n&&i.push(dd(typeof n=="object"?n:void 0)),i};function ka(e){let t=ld(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{},l;if(typeof r=="function")l=r;else if(un(r))l=ia(r);else throw new Error(Ye(1));let c;typeof n=="function"?c=n(t):c=t();let u=Sr;i&&(u=od({trace:!1,...typeof i=="object"&&i}));let d=oa(...c),p=pd(d),y=typeof a=="function"?a(p):p(),v=u(...y);return Oi(l,s,v)}function Ia(e){let t={},r=[],n,i={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Ye(28));if(a in t)throw new Error(Ye(29));return t[a]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function fd(e){return typeof e=="function"}function hd(e,t){let[r,n,i]=Ia(t),o;if(fd(e))o=()=>Oa(e());else{let a=Oa(e);o=()=>a}function s(a=o(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(Ve(u)){let y=d(u,l);return y===void 0?u:y}else{if(ye(u))return zi(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var md=(e,t)=>sd(e)?e.match(t):e(t);function yd(...e){return t=>e.some(r=>md(r,t))}var gd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xd=(e=21)=>{let t="",r=e;for(;r--;)t+=gd[Math.random()*64|0];return t},vd=["name","message","stack","code"],ji=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Na=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},bd=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of vd)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},La="External signal was aborted",Ed=(()=>{function e(t,r,n){let i=ot(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=ot(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=ot(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(n&&n.serializeError||bd)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let y=n?.idGenerator?n.idGenerator(l):xd(),v=new AbortController,A,x;function S(b){x=b,v.abort()}c&&(c.aborted?S(La):c.addEventListener("abort",()=>S(La),{once:!0}));let k=(async function(){let b;try{let R=n?.condition?.(l,{getState:d,extra:p});if(Sd(R)&&(R=await R),R===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((B,W)=>{A=()=>{W({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(o(y,l,n?.getPendingMeta?.({requestId:y,arg:l},{getState:d,extra:p}))),b=await Promise.race([j,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:y,signal:v.signal,abort:S,rejectWithValue:((B,W)=>new ji(B,W)),fulfillWithValue:((B,W)=>new Na(B,W))})).then(B=>{if(B instanceof ji)throw B;return B instanceof Na?i(B.payload,y,l,B.meta):i(B,y,l)})])}catch(R){b=R instanceof ji?s(null,y,l,R.payload,R.meta):s(R,y,l)}finally{A&&v.signal.removeEventListener("abort",A)}return n&&!n.dispatchConditionRejection&&s.match(b)&&b.meta.condition||u(b),b})();return Object.assign(k,{abort:S,requestId:y,arg:l,unwrap(){return k.then(Ad)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:yd(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ad(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Sd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Da=Symbol.for("rtk-slice-createasyncthunk"),ah={[Da]:Ed};function _d(e,t){return`${e}/${t}`}function Cd({creators:e}={}){let t=e?.asyncThunk?.[Da];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Ye(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(Td()):n.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,w){let R=typeof b=="string"?b:b.type;if(!R)throw new Error(Ye(12));if(R in l.sliceCaseReducersByType)throw new Error(Ye(13));return l.sliceCaseReducersByType[R]=w,c},addMatcher(b,w){return l.sliceMatchers.push({matcher:b,reducer:w}),c},exposeAction(b,w){return l.actionCreators[b]=w,c},exposeCaseReducer(b,w){return l.sliceCaseReducersByName[b]=w,c}};a.forEach(b=>{let w=s[b],R={reducerName:b,type:_d(i,b),createNotation:typeof n.reducers=="function"};Rd(w)?Ld(R,w,c,t):Od(R,w,c)});function u(){let[b={},w=[],R=void 0]=typeof n.extraReducers=="function"?Ia(n.extraReducers):[n.extraReducers],j={...b,...l.sliceCaseReducersByType};return hd(n.initialState,B=>{for(let W in j)B.addCase(W,j[W]);for(let W of l.sliceMatchers)B.addMatcher(W.matcher,W.reducer);for(let W of w)B.addMatcher(W.matcher,W.reducer);R&&B.addDefaultCase(R)})}let d=b=>b,p=new Map,y=new WeakMap,v;function A(b,w){return v||(v=u()),v(b,w)}function x(){return v||(v=u()),v.getInitialState()}function S(b,w=!1){function R(B){let W=B[b];return typeof W>"u"&&w&&(W=Tn(y,R,x)),W}function j(B=d){let W=Tn(p,w,()=>new WeakMap);return Tn(W,B,()=>{let sr={};for(let[ve,lt]of Object.entries(n.selectors??{}))sr[ve]=wd(lt,B,()=>Tn(y,B,x),w);return sr})}return{reducerPath:b,getSelectors:j,get selectors(){return j(R)},selectSlice:R}}let k={name:i,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:x,...S(o),injectInto(b,{reducerPath:w,...R}={}){let j=w??o;return b.inject({reducerPath:j,reducer:A},R),{...k,...S(j,!0)}}};return k}}function wd(e,t,r,n){function i(o,...s){let a=t(o);return typeof a>"u"&&n&&(a=r()),e(a,...s)}return i.unwrapped=e,i}var Ma=Cd();function Td(){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 Od({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!Nd(n))throw new Error(Ye(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?ot(e,s):ot(e))}function Rd(e){return e._reducerDefinitionType==="asyncThunk"}function Nd(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ld({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ye(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,d=i(e,o,u);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),a&&n.addCase(d.pending,a),l&&n.addCase(d.rejected,l),c&&n.addMatcher(d.settled,c),n.exposeCaseReducer(t,{fulfilled:s||On,pending:a||On,rejected:l||On,settled:c||On})}function On(){}var $a="listener",Ua="completed",Ba="cancelled",lh=`task-${Ba}`,ch=`task-${Ua}`,uh=`${$a}-${Ba}`,dh=`${$a}-${Ua}`;var{assign:Fa}=Object;var Wi="listenerMiddleware";var Pd=Fa(ot(`${Wi}/add`),{withTypes:()=>Pd}),ph=ot(`${Wi}/removeAll`),kd=Fa(ot(`${Wi}/remove`),{withTypes:()=>kd});function Ye(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 Id=rn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Rn=class extends Id(Object){};window.ftReduxStores||(window.ftReduxStores={});var Ha=class e extends Rn{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,o=window.ftReduxStores[n];if(ln(o))return o;if(i==null)return;let s=Ma({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=ka({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new e(s,a,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new nn,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Kt(p,u)||this.setState({[d]:i(u)})}}}),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 Nn=class{static format(t,r,n,i,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(t,r,n,i,!!o)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ln=f(E()),Dd="ft-app-info",Tt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Tt.eventName="authentication-change";var Rr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Rr.eventName="ui-locale-changed";var Md={session:(e,t)=>{(0,Ln.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>_.dispatchEvent(new Tt(t.payload)),0))}},_=Ln.FtReduxStore.get({name:Dd,reducers:Md,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 Va=f(E()),Pn=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Vh=(0,Va.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(_)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>Nn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pn([(0,Ki.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Pn([(0,Ki.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Pn([wi({store:_.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),Pn([wi({store:_.name})],t.prototype,"uiLocale",void 0),t});var za;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(za||(za={}));var ja;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(ja||(ja={}));var Wa;(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"})(Wa||(Wa={}));var Ka;(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"})(Ka||(Ka={}));var Ga;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ga||(Ga={}));var qa;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(qa||(qa={}));var Xa;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Xa||(Xa={}));var Ya;(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"})(Ya||(Ya={}));var Za;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Za||(Za={}));var Ja;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ja||(Ja={}));var Qa;(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"})(Qa||(Qa={}));var el;(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"})(el||(el={}));var tl;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(tl||(tl={}));var rl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(rl||(rl={}));var nl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(nl||(nl={}));var il;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(il||(il={}));var ol;(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"})(ol||(ol={}));var sl;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(sl||(sl={}));var al;(function(e){e.ASC="ASC",e.DESC="DESC"})(al||(al={}));var ll;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(ll||(ll={}));var cl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(cl||(cl={}));var ul;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ul||(ul={}));var dl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(dl||(dl={}));var pl;(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"})(pl||(pl={}));var fl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fl||(fl={}));var hl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(hl||(hl={}));var ml;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ml||(ml={}));var yl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(yl||(yl={}));var q;(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"})(q||(q={}));var Ee;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ee||(Ee={}));var gl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(gl||(gl={}));var xl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(xl||(xl={}));var vl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(vl||(vl={}));var bl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(bl||(bl={}));var El;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(El||(El={}));var Al;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Al||(Al={}));var Sl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Sl||(Sl={}));var _l;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(_l||(_l={}));var Cl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Cl||(Cl={}));var wl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(wl||(wl={}));var Tl;(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"})(Tl||(Tl={}));var Ol;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Ol||(Ol={}));var $d={[q.PERSONAL_BOOK_SHARE_USER]:[q.PERSONAL_BOOK_USER],[q.HTML_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.PDF_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.KHUB_ADMIN]:[q.CONTENT_PUBLISHER],[q.ADMIN]:[q.KHUB_ADMIN,q.USERS_ADMIN,q.PORTAL_ADMIN,q.BEHAVIOR_DATA_USER],[q.GENERATIVE_AI_EXPORT_USER]:[q.GENERATIVE_AI_USER]};function Rl(e,t){return e===t||($d[e]??[]).some(r=>Rl(r,t))}function Gi(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=>Rl(n,t))}function Nl(e,...t){return e==null?!1:t.some(r=>Gi(e,r))}var $n=f(E());var qi=f(E());var Ot=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=_.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=_.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var Zt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ot.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ot.await()}};var ge=class extends Zt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new qi.CacheRegistry,this.cache=t?i.commonCache:new qi.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 kn=class extends ge{async listMySearches(){let{session:t}=_.getState();return Gi(t,q.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var In=class extends ge{async listMyBookmarks(){let t=_.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Dn=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var Mn=class extends ge{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=_.getState().session;return!!t?.sessionAuthenticated}};var Ud="ft-user-assets",Bd={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(Ee).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Yi(e,r,[...Xi(e,r),i]),Ll(e,r,1,n),Pl(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Yi(e,r,Xi(e,r).map(i=>i.id===n.id?n:i)),Pl(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Yi(e,r,Xi(e,r).filter(o=>o.id!==i)),Ll(e,r,-1,n)}},kl={[Ee.SEARCHES]:"savedSearches",[Ee.BOOKMARKS]:"bookmarks",[Ee.BOOKS]:void 0,[Ee.COLLECTIONS]:void 0},Xi=(e,t)=>{var r;let n=kl[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Yi=(e,t,r)=>{let n=kl[t];n&&(e[n]=r)},Ll=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===Ee.BOOKMARKS&&n)){let o=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},Pl=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},oe=$n.FtReduxStore.get({name:Ud,reducers:Bd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ee).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Zi=class{constructor(t=new Dn,r=new Mn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=_.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new In,this.savedSearchesService=new kn,_.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=_.getState();(0,$n.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(),oe.actions.clearAssetCount(),oe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),oe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),oe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();oe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();oe.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&oe.getState().assetCounts.allAsset[t]!==r.count&&oe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&oe.getState().assetCounts.bookmarkByMap[t]!==r.count&&oe.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(oe.getState().assetCounts.bookmarkByMap).length!==0;t===Ee.BOOKMARKS&&r&&oe.actions.clearBookmarkCountByMap(),oe.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;oe.actions.bookmarks(r)}}},Fd=new Zi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Fd);var Ji=class{addCommand(t,r=!1){_.commands.add(t,r)}consumeCommand(t){return _.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Ji;var Ae=f(E());var Il,Jt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Hd=Symbol("clearAfterUnitTest"),Un=class extends(0,Ae.withEventBus)(ge){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Il]=()=>{this.defaultMessages={},this.cache=new Ae.CacheRegistry,this.listeners={}},this.currentUiLocale=_.getState().uiLocale,_.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=_.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,Ae.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let o=t.toLowerCase(),s=this.resolveContext(o);return new Ae.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof Ae.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Jt({loadedContexts:t})),this.dispatchEvent(new Jt({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Jt({loadedContexts:[t]})),this.dispatchEvent(new Jt({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ae.delay)(0).then(()=>n()).catch(()=>null)))}};Il=Hd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Un{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Un{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Qt=window.FluidTopicsI18nService,Bn=window.FluidTopicsCustomI18nService;var Dl=f(E()),Qi=class{highlightHtml(t,r,n){(0,Dl.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Qi;var Ml=f(E());var eo=class{isDate(t){var r,n,i,o;return(o=(n=((i=(r=_.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var n,i,o,s;if(t==null)return"";try{return Ml.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:_.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new eo;var $l=f(E());var Nr=class{static get(t,r){var n,i,o,s;let a=_.getState(),{lang:l,region:c}=(s=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&s!==void 0?s:{lang:"en",region:"US"};return new $l.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${l}-${c}`)}};var to=class{urlToSearchRequest(t){return Nr.get().parse(t)}searchRequestToUrl(t){return Nr.get().serialize(t)}};window.FluidTopicsUrlService=new to;var Ze=f(E());var Rt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Rt.eventName="before-location-change";var Nt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Nt.eventName="change";var ro=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))}},Ul=new ro;var Fn=class e extends Ze.WithEventBus{static build(){return new e(window.history,Ul,()=>window.location,!1)}constructor(t,r,n,i){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ze.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Nt(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[o,s,a])=>{let l=new Rt(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...o,index:c,href:l.detail.nextLocation.href};n.apply(i,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Rt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Rt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Nt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Nt.eventName,t)}currentItem(){return(0,Ze.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,Ze.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ze.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,Ze.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fn.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 Bl=f(I());var Fl=Bl.css`
|
|
290
290
|
`;var zl=f(I()),se=f(X()),kt=f(E());var Lt=f(E());function Hl(e,t){let{authenticationRequired:r,session:n}=_.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Hn=class extends Zt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var no=class e extends Lt.FtStateManager{static build(t){return new e(_,t)}constructor(t,r){super(),this.store=t,this.cache=new Lt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Hn,this.cleanSessionDebouncer=new Lt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Lt.Debouncer(500),this.apiProvider=r??(()=>Ot.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Tt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Tt.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",()=>Hl(()=>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 Rr(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Nl(_.getState().session,...t)}},Vl=no.build();var Pt=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Lr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Pt(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Z=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},V=class extends kt.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=Vl,this.contextRoot=new Lr}render(){return zl.html`
|
|
291
291
|
<slot></slot>
|
|
292
292
|
`}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=>Qt.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=Fl;Z([(0,se.property)()],V.prototype,"baseUrl",void 0);Z([(0,se.property)()],V.prototype,"tenantId",void 0);Z([(0,se.property)()],V.prototype,"apiIntegrationIdentifier",void 0);Z([(0,se.property)()],V.prototype,"apiIntegrationAppVersion",void 0);Z([(0,se.property)()],V.prototype,"uiLocale",void 0);Z([(0,kt.jsonProperty)(null)],V.prototype,"availableUiLocales",void 0);Z([(0,kt.jsonProperty)(null)],V.prototype,"metadataConfiguration",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"editorMode",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"noCustom",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"openExternalDocumentInNewTab",void 0);Z([(0,se.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],V.prototype,"noCustomComponent",void 0);Z([(0,se.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],V.prototype,"noCustomCode",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"withManualResources",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"navigatorOnline",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"forcedOffline",void 0);Z([(0,se.property)({type:Boolean})],V.prototype,"authenticationRequired",void 0);Z([(0,kt.jsonProperty)([])],V.prototype,"messageContexts",void 0);Z([(0,kt.jsonProperty)(void 0)],V.prototype,"session",void 0);var Wl=f(E());var jl={"ft-app-context":V};(0,Wl.customElements)(jl);var Kl=f(X());var io=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-]+$/)}},er=new io;var jd=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},kr=Symbol("i18nAttributes"),Gl=Symbol("i18nListAttributes"),ql=Symbol("i18nProperties"),Vn=Symbol("i18nContexts"),Pr=Symbol("i18nUnsubs"),Wn=(0,tr.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(o){return o??this.useCustomMessageContexts?Bn:Qt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(er.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[kr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Gl])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(y=>c(u,d,y))})}updateI18nProperties(o){var s;(s=this[ql])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Vn].set(l,{isCustomContext:a}),this[Pr].has(l)||this[Pr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Vn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Vn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Pr].forEach(o=>o()),this[Pr].clear()}}return t=Vn,r=Pr,jd([(0,Kl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),zn=class extends Wn(tr.FtLitElement){},jn=class extends Wn(tr.FtLitElementRedux){};var Xl=f(E());var oo=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?er.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Wd=new oo;var Yl=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:Xl.hasChanged,converter:er,...t}),r[kr]=(i=r[kr])!==null&&i!==void 0?i:new Map,r[kr].set(n,e??{})};var Kn=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?Bn:Qt}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let o=i;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...o)=>this.service.resolveMessage(this.name,i,...o)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var Zl=f(I());var Jl=Zl.css`
|
|
@@ -1048,7 +1048,7 @@
|
|
|
1048
1048
|
<div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
|
|
1049
1049
|
<ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
|
|
1050
1050
|
</div>
|
|
1051
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Qn))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Qn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,or.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};z.elementDefinitions={"ft-ripple":U,"ft-typography":J,"ft-icon":te,"ft-button":T};z.styles=Wc;ce([(0,re.property)({type:Boolean})],z.prototype,"highlighted",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"removable",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"disabled",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"clickable",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"iconClickable",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"dense",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"multiLine",void 0);ce([(0,re.property)()],z.prototype,"label",void 0);ce([(0,re.property)()],z.prototype,"iconLabel",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"hideIconTooltip",void 0);ce([(0,re.property)()],z.prototype,"icon",void 0);ce([(0,re.property)()],z.prototype,"iconVariant",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"trailingIcon",void 0);ce([(0,re.property)()],z.prototype,"typographyVariant",void 0);ce([(0,re.query)("ft-typography slot")],z.prototype,"slottedContent",void 0);var qc=f(E());var Gc={"ft-chip":z};(0,qc.customElements)(Gc);var Zc=f(X()),Kd=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},$t=class extends N{willUpdate(t){var r,n,i;if(super.willUpdate(t),t.has("toc")||t.has("highlightedTocIds")){let o=(
|
|
1051
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Qn))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Qn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,or.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};z.elementDefinitions={"ft-ripple":U,"ft-typography":J,"ft-icon":te,"ft-button":T};z.styles=Wc;ce([(0,re.property)({type:Boolean})],z.prototype,"highlighted",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"removable",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"disabled",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"clickable",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"iconClickable",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"dense",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"multiLine",void 0);ce([(0,re.property)()],z.prototype,"label",void 0);ce([(0,re.property)()],z.prototype,"iconLabel",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"hideIconTooltip",void 0);ce([(0,re.property)()],z.prototype,"icon",void 0);ce([(0,re.property)()],z.prototype,"iconVariant",void 0);ce([(0,re.property)({type:Boolean})],z.prototype,"trailingIcon",void 0);ce([(0,re.property)()],z.prototype,"typographyVariant",void 0);ce([(0,re.query)("ft-typography slot")],z.prototype,"slottedContent",void 0);var qc=f(E());var Gc={"ft-chip":z};(0,qc.customElements)(Gc);var Zc=f(X()),Kd=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},$t=class extends N{willUpdate(t){var r,n,i;if(super.willUpdate(t),t.has("toc")||t.has("highlightedTocIds")){let o=(i=(r=this.toc)===null||r===void 0?void 0:r.flatMap(s=>this.allTocIds(s)))!==null&&i!==void 0?i:[];for(let s of o)if(!((n=this.highlightedTocIds)===null||n===void 0)&&n.includes(s)){this.currentTocNode=s;break}}}allTocIds(t){return[t.tocId,...t.children.flatMap(r=>this.allTocIds(r))]}render(){var t,r;return we.html`
|
|
1052
1052
|
<div class="${(0,Yc.classMap)(this.tocClasses)}" part="container">
|
|
1053
1053
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
1054
1054
|
${this.renderExpandCollapseAll()}
|
|
@@ -1056,7 +1056,7 @@
|
|
|
1056
1056
|
${Bt((r=this.toc)!==null&&r!==void 0?r:[],n=>this.renderNode(n))}
|
|
1057
1057
|
</div>
|
|
1058
1058
|
</div>
|
|
1059
|
-
`}renderNode(t){var r,n,i,o;let s=(r=this.highlightedTocIds)===null||r===void 0?void 0:r.includes(t.tocId),a=t.tocId===this.currentTocNode,l=this.nodeIsExpanded(t),c=t.children.length>0,u=this.isCurrentPageToc?((
|
|
1059
|
+
`}renderNode(t){var r,n,i,o;let s=(r=this.highlightedTocIds)===null||r===void 0?void 0:r.includes(t.tocId),a=t.tocId===this.currentTocNode,l=this.nodeIsExpanded(t),c=t.children.length>0,u=this.isCurrentPageToc?((o=(n=this.currentPage)===null||n===void 0?void 0:n.breadcrumb.length)!==null&&o!==void 0?o:0)+1:0,d=t.depth-1-u,p={"padding-left":`calc( ${L.tabulationSize} * ${d} + 4px)`};return we.html`
|
|
1060
1060
|
<div part="node ${s?"node-highlighted":""}"
|
|
1061
1061
|
class="ft-reader-toc--node ${s?"ft-reader-toc--node-highlighted":""}"
|
|
1062
1062
|
data-depth="${t.depth}">
|
|
@@ -1065,7 +1065,7 @@
|
|
|
1065
1065
|
<a part="node-link ${t.contentClass?`node-link-class-${t.contentClass}`:""}"
|
|
1066
1066
|
class="ft-reader-toc--node-link"
|
|
1067
1067
|
style="${(0,Xc.styleMap)(p)}"
|
|
1068
|
-
href="${(
|
|
1068
|
+
href="${(i=this.service)===null||i===void 0?void 0:i.getLinkWithFilter(t.tocId)}"
|
|
1069
1069
|
tabindex="${a?"0":"-1"}"
|
|
1070
1070
|
data-tocId="${t.tocId}"
|
|
1071
1071
|
data-depth="${t.depth}"
|