@fluid-topics/ft-text-field 2.2.18 → 2.2.19
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.
|
@@ -81,7 +81,8 @@ export class FtTextFieldSuggestion extends FtLitElement {
|
|
|
81
81
|
(_a = (targetRemoveButton ? this.removeButton : this.suggestion)) === null || _a === void 0 ? void 0 : _a.click();
|
|
82
82
|
}
|
|
83
83
|
isRemoveButtonFocused() {
|
|
84
|
-
var _a
|
|
84
|
+
var _a;
|
|
85
|
+
var _b;
|
|
85
86
|
return (_b = (_a = this.removeButton) === null || _a === void 0 ? void 0 : _a.matches(":focus-within")) !== null && _b !== void 0 ? _b : false;
|
|
86
87
|
}
|
|
87
88
|
selectSuggestion() {
|
package/build/ft-text-field.js
CHANGED
|
@@ -161,9 +161,7 @@ export class FtTextField extends toFtFormComponent(FtLitElement) {
|
|
|
161
161
|
renderSuggestions() {
|
|
162
162
|
if (this.suggestionsProvider) {
|
|
163
163
|
return html `
|
|
164
|
-
${repeat(this.providedSuggestions, (suggestion) => {
|
|
165
|
-
var _a;
|
|
166
|
-
return html `
|
|
164
|
+
${repeat(this.providedSuggestions, (suggestion) => { var _a; return html `
|
|
167
165
|
<ft-text-field-suggestion part="suggestion"
|
|
168
166
|
value="${suggestion.value}"
|
|
169
167
|
?removable=${suggestion.removable} }
|
|
@@ -172,8 +170,7 @@ export class FtTextField extends toFtFormComponent(FtLitElement) {
|
|
|
172
170
|
${suggestion.icon ? html `<ft-icon .value=${suggestion.icon}></ft-icon>` : nothing}
|
|
173
171
|
${suggestion.label}
|
|
174
172
|
</ft-text-field-suggestion>
|
|
175
|
-
`;
|
|
176
|
-
})}
|
|
173
|
+
`; })}
|
|
177
174
|
`;
|
|
178
175
|
}
|
|
179
176
|
else {
|
|
@@ -287,7 +284,8 @@ export class FtTextField extends toFtFormComponent(FtLitElement) {
|
|
|
287
284
|
this.clearWatchAutofill();
|
|
288
285
|
}
|
|
289
286
|
setValue(newValue, fireChangeEvent = false) {
|
|
290
|
-
var _a
|
|
287
|
+
var _a;
|
|
288
|
+
var _b;
|
|
291
289
|
if (this.value !== newValue) {
|
|
292
290
|
this.inputValid = true;
|
|
293
291
|
this.setInternalValue(newValue);
|
|
@@ -628,7 +628,7 @@
|
|
|
628
628
|
position: relative;
|
|
629
629
|
word-break: break-word;
|
|
630
630
|
}
|
|
631
|
-
`;var ao=["top","right","bottom","left"],oo=["start","end"],Zi=ao.reduce((e,t)=>e.concat(t,t+"-"+oo[0],t+"-"+oo[1]),[]),nr=Math.min,Xe=Math.max,sr=Math.round;var De=e=>({x:e,y:e}),wc={left:"right",right:"left",bottom:"top",top:"bottom"};function lo(e,t,r){return Xe(e,nr(t,r))}function Dr(e,t){return typeof e=="function"?e(t):e}function or(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Ji(e){return e==="x"?"y":"x"}function Qi(e){return e==="y"?"height":"width"}function kr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function en(e){return Ji(kr(e))}function co(e,t,r){r===void 0&&(r=!1);let i=Ze(e),n=en(e),s=Qi(n),o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Xi(o)),[o,Xi(o)]}function uo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Xi(e){let t=or(e);return wc[t]+e.slice(t.length)}function Tc(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function po(e){return typeof e!="number"?Tc(e):{top:e,right:e,bottom:e,left:e}}function ht(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function fo(e,t,r){let{reference:i,floating:n}=e,s=kr(t),o=en(t),a=Qi(o),l=or(t),c=s==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,g;switch(l){case"top":g={x:u,y:i.y-n.height};break;case"bottom":g={x:u,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:d};break;case"left":g={x:i.x-n.width,y:d};break;default:g={x:i.x,y:i.y}}let v=Ze(t);return v&&(g[o]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),g}async function ho(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:g=0}=Dr(t,e),v=po(g),x=a[p?d==="floating"?"reference":"floating":d],C=ht(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),M=d==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),O=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},L=ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:b,strategy:l}):M);return{top:(C.top-L.top+v.top)/O.y,bottom:(L.bottom-C.bottom+v.bottom)/O.y,left:(C.left-L.left+v.left)/O.x,right:(L.right-C.right+v.right)/O.x}}var Oc=50,mo=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:ho},l=await(o.isRTL==null?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=fo(c,i,l),p=i,g=0,v={};for(let E=0;E<s.length;E++){let x=s[E];if(!x)continue;let{name:C,fn:M}=x,{x:b,y:O,data:L,reset:z}=await M({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=O??d,v[C]={...v[C],...L},z&&g<Oc&&(g++,typeof z=="object"&&(z.placement&&(p=z.placement),z.rects&&(c=z.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:n}):z.rects),{x:u,y:d}=fo(c,p,l)),E=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Rc(e,t,r){return(e?[...r.filter(n=>Ze(n)===e),...r.filter(n=>Ze(n)!==e)]:r.filter(n=>or(n)===n)).filter(n=>e?Ze(n)===e||(t?uo(n)!==n:!1):!0)}var go=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:s,middlewareData:o,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Zi,autoAlignment:g=!0,...v}=Dr(e,t),E=d!==void 0||p===Zi?Rc(d||null,g,p):p,x=((r=o.autoPlacement)==null?void 0:r.index)||0,C=E[x];if(C==null)return{};if(a!==C)return{reset:{placement:E[0]}};let M=await l.detectOverflow(t,v),b=co(C,s,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[M[or(C)],M[b[0]],M[b[1]]],L=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:C,overflows:O}],z=E[x+1];if(z)return{data:{index:x+1,overflows:L},reset:{placement:z}};let U=L.map(ge=>{let rt=Ze(ge.placement);return[ge.placement,rt&&u?ge.overflows.slice(0,2).reduce((fc,hc)=>fc+hc,0):ge.overflows[0],ge.overflows]}).sort((ge,rt)=>ge[1]-rt[1]),Yt=((n=U.filter(ge=>ge[2].slice(0,Ze(ge[0])?2:3).every(rt=>rt<=0))[0])==null?void 0:n[0])||U[0][0];return Yt!==a?{data:{index:x+1,overflows:L},reset:{placement:Yt}}:{}}}};var yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:M=>{let{x:b,y:O}=M;return{x:b,y:O}}},...c}=Dr(e,t),u={x:r,y:i},d=await s.detectOverflow(t,c),p=kr(n),g=Ji(p),v=u[g],E=u[p],x=(M,b)=>lo(b+d[M==="y"?"top":"left"],b,b-d[M==="y"?"bottom":"right"]);o&&(v=x(g,v)),a&&(E=x(p,E));let C=l.fn({...t,[g]:v,[p]:E});return{...C,data:{x:C.x-r,y:C.y-i,enabled:{[g]:o,[p]:a}}}}}};function Ir(){return typeof window<"u"}function gt(e){return vo(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function He(e){var t;return(t=(vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vo(e){return Ir()?e instanceof Node||e instanceof de(e).Node:!1}function Te(e){return Ir()?e instanceof Element||e instanceof de(e).Element:!1}function Ve(e){return Ir()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function xo(e){return!Ir()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function ar(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function bo(e){return/^(table|td|th)$/.test(gt(e))}function lr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pc=/transform|translate|scale|rotate|perspective|filter/,Lc=/paint|layout|strict|content/,mt=e=>!!e&&e!=="none",tn;function Mt(e){let t=Te(e)?Oe(e):e;return mt(t.transform)||mt(t.translate)||mt(t.scale)||mt(t.rotate)||mt(t.perspective)||!$r()&&(mt(t.backdropFilter)||mt(t.filter))||Pc.test(t.willChange||"")||Lc.test(t.contain||"")}function So(e){let t=Je(e);for(;Ve(t)&&!It(t);){if(Mt(t))return t;if(lr(t))return null;t=Je(t)}return null}function $r(){return tn==null&&(tn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tn}function It(e){return/^(html|body|#document)$/.test(gt(e))}function Oe(e){return de(e).getComputedStyle(e)}function cr(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||xo(e)&&e.host||He(e);return xo(t)?t.host:t}function Eo(e){let t=Je(e);return It(t)?(e.ownerDocument||e).body:Ve(t)&&ar(t)?t:Eo(t)}function Mr(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Eo(e),s=n===((i=e.ownerDocument)==null?void 0:i.body),o=de(n);if(s){let a=Ur(o);return t.concat(o,o.visualViewport||[],ar(n)?n:[],a&&r?Mr(a):[])}else return t.concat(n,Mr(n,[],r))}function Ur(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Co(e){let t=Oe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=Ve(e),s=n?e.offsetWidth:r,o=n?e.offsetHeight:i,a=sr(r)!==s||sr(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function wo(e){return Te(e)?e:e.contextElement}function $t(e){let t=wo(e);if(!Ve(t))return De(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:s}=Co(t),o=(s?sr(r.width):r.width)/i,a=(s?sr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var Nc=De(0);function To(e){let t=de(e);return!$r()||!t.visualViewport?Nc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Dc(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===de(e)}function ur(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),s=wo(e),o=De(1);t&&(i?Te(i)&&(o=$t(i)):o=$t(e));let a=Dc(s,r,i)?To(s):De(0),l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(s&&i){let p=de(s),g=Te(i)?de(i):i,v=p,E=Ur(v);for(;E&&g!==v;){let x=$t(E),C=E.getBoundingClientRect(),M=Oe(E),b=C.left+(E.clientLeft+parseFloat(M.paddingLeft))*x.x,O=C.top+(E.clientTop+parseFloat(M.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=O,v=de(E),E=Ur(v)}}return ht({width:u,height:d,x:l,y:c})}function Br(e,t){let r=cr(e).scrollLeft;return t?t.left+r:ur(He(e)).left+r}function Oo(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Br(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function kc(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,s=n==="fixed",o=He(i),a=t?lr(t.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=De(1),u=De(0),d=Ve(i);if((d||!s)&&((gt(i)!=="body"||ar(o))&&(l=cr(i)),d)){let g=ur(i);c=$t(i),u.x=g.x+i.clientLeft,u.y=g.y+i.clientTop}let p=o&&!d&&!s?Oo(o,l):De(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 Mc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ic(e){let t=cr(e),r=e.ownerDocument.body,i=Xe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Xe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),s=-t.scrollLeft+Br(e),o=-t.scrollTop;return Oe(r).direction==="rtl"&&(s+=Xe(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:o}}var $c=25;function Uc(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=de(e),s=He(e),o=n.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(o){let p=!$r()||t==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(Br(s)<=0){let p=s.ownerDocument,g=p.body,v=getComputedStyle(g),E=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(s.clientWidth-g.clientWidth-E),C=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;C<=$c&&(a-=C)}return{width:a,height:l,x:c,y:u}}function Bc(e,t){let r=ur(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,s=$t(e),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=n*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function Ao(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=Uc(e,r,t);else if(t==="document")i=Ic(He(e));else if(Te(t))i=Bc(t,r);else{let n=To(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ht(i)}function Fc(e,t){let r=t.get(e);if(r)return r;let i=Mr(e,[],!1).filter(a=>Te(a)&>(a)!=="body"),n=null,s=Oe(e).position==="fixed",o=s?Je(e):e;for(;Te(o)&&!It(o);){let a=Oe(o),l=Mt(o),c=n?n.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==o):n=a,o=Je(o)}return t.set(e,i),i}function Hc(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,o=[...r==="clippingAncestors"?lr(t)?[]:Fc(t,this._c):[].concat(r),i],a=Ao(t,o[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<o.length;p++){let g=Ao(t,o[p],n);l=Xe(g.top,l),c=nr(g.right,c),u=nr(g.bottom,u),d=Xe(g.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Vc(e){let{width:t,height:r}=Co(e);return{width:t,height:r}}function zc(e,t,r){let i=Ve(t),n=He(t),s=r==="fixed",o=ur(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=De(0);if((i||!s)&&((gt(t)!=="body"||ar(n))&&(a=cr(t)),i)){let p=ur(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!i&&n&&(l.x=Br(n));let c=n&&!i&&!s?Oo(n,a):De(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function rn(e){return Oe(e).position==="static"}function _o(e,t){if(!Ve(e)||Oe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return He(e)===r&&(r=r.ownerDocument.body),r}function Ro(e,t){let r=de(e);if(lr(e))return r;if(!Ve(e)){let n=Je(e);for(;n&&!It(n);){if(Te(n)&&!rn(n))return n;n=Je(n)}return r}let i=_o(e,t);for(;i&&bo(i)&&rn(i);)i=_o(i,t);return i&&It(i)&&rn(i)&&!Mt(i)?r:i||So(e)||r}var jc=async function(e){let t=this.getOffsetParent||Ro,r=this.getDimensions,i=await r(e.floating);return{reference:zc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Wc(e){return Oe(e).direction==="rtl"}var Fr={convertOffsetParentRelativeRectToViewportRelativeRect:kc,getDocumentElement:He,getClippingRect:Hc,getOffsetParent:Ro,getElementRects:jc,getClientRects:Mc,getDimensions:Vc,getScale:$t,isElement:Te,isRTL:Wc};var Po=go,Lo=yo;var No=(e,t,r)=>{let i=new Map,n=r??{},s={...Fr,...n.platform,_c:i};return mo(e,t,{...n,platform:s})};function Do(e){return Kc(e)}function nn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Kc(e){for(let t=e;t;t=nn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=nn(e);t;t=nn(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Mt(r)||t.tagName==="BODY"))return t}return null}async function ko(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},No(e,t,{strategy:i.strategy,platform:{...Fr,getOffsetParent:n=>Fr.getOffsetParent(n,Do)},middleware:[Lo({crossAxis:!0}),Po({allowedPlacements:[i.placement]})]})}var Kt=f(A());var wn=f(J());var Mo=f(J(),1);var sn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Gc=e=>({fromAttribute:t=>{if(t==null)return dr(e);try{return JSON.parse(t)}catch{return dr(e)}},toAttribute:t=>JSON.stringify(t)});function Io(e,t){return(0,Mo.property)({type:Object,converter:Gc(e),hasChanged:pr,...t??{}})}function qc(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,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Ut(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Ut(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[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 n=o=>Object.keys(o).filter(a=>o[a]!=null),s=n(e);if(r=s.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;){let o=s[i];if(!Ut(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ut(e,t){try{return qc(e,t)}catch{return!1}}function pr(e,t){return!Ut(e,t)}function dr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Hr(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var $o=f(J(),1);var on=e=>{let t=e??{};return(r,i)=>{var n;let s={hasChanged:pr,attribute:!1,...t};(0,$o.property)(s)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Vr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==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 yt=f(J(),1);var zr=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,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){n(a);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Bo=f(V(),1);var jr=globalThis,Yc=jr.ShadowRoot&&(jr.ShadyCSS===void 0||jr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Uo=(e,t)=>{if(Yc)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=jr.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Wr=class extends Bo.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},i=this.renderOptions.creationScope=this.attachShadow(r);return Uo(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){sn(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 Fo(e,t,...r){var i;let n=e.querySelector(t);for(let s of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(s);return n}var Ft=function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},jo,Ho=Symbol("constructorPrototype"),Vo=Symbol("constructorName"),Wo=Symbol("exportpartsDebouncer"),zo=Symbol("dynamicDependenciesLoaded"),Bt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Bt.eventName="exportparts-updated";var ke=class extends Wr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[jo]=new zr(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Wo].run(()=>{var n,s;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Vo]=this.constructor.name,this[Ho]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Vo]&&Object.setPrototypeOf(this,this[Ho])}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(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[zo]||(r[zo]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Bt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Bt.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 Bt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let s=[...n??[],i];r=Fo(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,i,n,s,o,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(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let g=(s=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&s!==void 0?s:[],v=(a=(o=p.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],E=[...g,...v].filter(l).map(x=>x.trim());for(let x of E)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};jo=Wo;Ft([(0,yt.property)()],ke.prototype,"exportpartsPrefix",void 0);Ft([Io([])],ke.prototype,"exportpartsPrefixes",void 0);Ft([(0,yt.property)({reflect:!0})],ke.prototype,"exportparts",void 0);Ft([(0,yt.property)()],ke.prototype,"customStylesheet",void 0);Ft([(0,yt.property)()],ke.prototype,"elementToFocus",void 0);Ft([(0,yt.state)()],ke.prototype,"useAdoptedStyleSheets",void 0);function Kr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var fr=Symbol("internalReduxEventsUnsubscribers"),Qe=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Xc=Hr(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[xt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[xt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[Qe].has(o.store):this[Qe].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l;this[Qe].set(o,a.subscribe(()=>this.updateFromStores())),this[fr].set(o,[]),Kr(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[fr].get(o).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Qe].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Qe].has(o)&&this[Qe].get(o)(),this[Qe].delete(o),(a=this[fr].get(o))===null||a===void 0||a.forEach(l=>l()),this[fr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Qe,r=xt,i=fr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Ko=class extends Xc(ke){};function te(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 Zc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Go=Zc,an=()=>Math.random().toString(36).substring(7).split("").join("."),Jc={INIT:`@@redux/INIT${an()}`,REPLACE:`@@redux/REPLACE${an()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${an()}`},Gr=Jc;function qr(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 ln(e,t,r){if(typeof e!="function")throw new Error(te(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(te(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(te(1));return r(ln)(e,t)}let i=e,n=t,s=new Map,o=s,a=0,l=!1;function c(){o===s&&(o=new Map,s.forEach((x,C)=>{o.set(C,x)}))}function u(){if(l)throw new Error(te(3));return n}function d(x){if(typeof x!="function")throw new Error(te(4));if(l)throw new Error(te(5));let C=!0;c();let M=a++;return o.set(M,x),function(){if(C){if(l)throw new Error(te(6));C=!1,c(),o.delete(M),s=null}}}function p(x){if(!qr(x))throw new Error(te(7));if(typeof x.type>"u")throw new Error(te(8));if(typeof x.type!="string")throw new Error(te(17));if(l)throw new Error(te(9));try{l=!0,n=i(n,x)}finally{l=!1}return(s=o).forEach(M=>{M()}),x}function g(x){if(typeof x!="function")throw new Error(te(10));i=x,p({type:Gr.REPLACE})}function v(){let x=d;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(te(11));function M(){let O=C;O.next&&O.next(u())}return M(),{unsubscribe:x(M)}},[Go](){return this}}}return p({type:Gr.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:g,[Go]:v}}function Qc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Gr.INIT})>"u")throw new Error(te(12));if(typeof r(void 0,{type:Gr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(te(13))})}function qo(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let i=Object.keys(r),n,s;try{Qc(r)}catch(o){s=o}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],g=r[p],v=a[p],E=g(v,l);if(typeof E>"u"){let x=l&&l.type;throw new Error(te(14))}u[p]=E,c=c||E!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function hr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function Yo(...e){return t=>(r,i)=>{let n=t(r,i),s=()=>{throw new Error(te(15))},o={getState:n.getState,dispatch:(l,...c)=>s(l,...c)},a=e.map(l=>l(o));return s=hr(...a)(n.dispatch),{...n,dispatch:s}}}function Xo(e){return qr(e)&&"type"in e&&typeof e.type=="string"}var sa=Symbol.for("immer-nothing"),Zo=Symbol.for("immer-draftable"),re=Symbol.for("immer-state");function Re(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var fe=Object,Vt=fe.getPrototypeOf,Jr="constructor",ni="prototype",pn="configurable",Qr="enumerable",Xr="writable",mr="value",Me=e=>!!e&&!!e[re];function he(e){return e?oa(e)||oi(e)||!!e[Zo]||!!e[Jr]?.[Zo]||ai(e)||li(e):!1}var eu=fe[ni][Jr].toString(),Jo=new WeakMap;function oa(e){if(!e||!bn(e))return!1;let t=Vt(e);if(t===null||t===fe[ni])return!0;let r=fe.hasOwnProperty.call(t,Jr)&&t[Jr];if(r===Object)return!0;if(!Ht(r))return!1;let i=Jo.get(r);return i===void 0&&(i=Function.toString.call(r),Jo.set(r,i)),i===eu}function si(e,t,r=!0){xr(e)===0?(r?Reflect.ownKeys(e):fe.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((i,n)=>t(n,i,e))}function xr(e){let t=e[re];return t?t.type_:oi(e)?1:ai(e)?2:li(e)?3:0}var cn=(e,t,r=xr(e))=>r===2?e.has(t):fe[ni].hasOwnProperty.call(e,t),fn=(e,t,r=xr(e))=>r===2?e.get(t):e[t],ei=(e,t,r,i=xr(e))=>{i===2?e.set(t,r):i===3?e.add(r):e[t]=r};function tu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var oi=Array.isArray,ai=e=>e instanceof Map,li=e=>e instanceof Set,bn=e=>typeof e=="object",Ht=e=>typeof e=="function",un=e=>typeof e=="boolean";function ru(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ze=e=>e.copy_||e.base_;var Sn=e=>e.modified_?e.copy_:e.base_;function hn(e,t){if(ai(e))return new Map(e);if(li(e))return new Set(e);if(oi(e))return Array[ni].slice.call(e);let r=oa(e);if(t===!0||t==="class_only"&&!r){let i=fe.getOwnPropertyDescriptors(e);delete i[re];let n=Reflect.ownKeys(i);for(let s=0;s<n.length;s++){let o=n[s],a=i[o];a[Xr]===!1&&(a[Xr]=!0,a[pn]=!0),(a.get||a.set)&&(i[o]={[pn]:!0,[Xr]:!0,[Qr]:a[Qr],[mr]:e[o]})}return fe.create(Vt(e),i)}else{let i=Vt(e);if(i!==null&&r)return{...e};let n=fe.create(i);return fe.assign(n,e)}}function En(e,t=!1){return ci(e)||Me(e)||!he(e)||(xr(e)>1&&fe.defineProperties(e,{set:Yr,add:Yr,clear:Yr,delete:Yr}),fe.freeze(e),t&&si(e,(r,i)=>{En(i,!0)},!1)),e}function iu(){Re(2)}var Yr={[mr]:iu};function ci(e){return e===null||!bn(e)?!0:fe.isFrozen(e)}var ti="MapSet",mn="Patches",Qo="ArrayMethods",aa={};function vt(e){let t=aa[e];return t||Re(0,e),t}var ea=e=>!!aa[e];var gr,la=()=>gr,nu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ea(ti)?vt(ti):void 0,arrayMethodsPlugin_:ea(Qo)?vt(Qo):void 0});function ta(e,t){t&&(e.patchPlugin_=vt(mn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gn(e){yn(e),e.drafts_.forEach(su),e.drafts_=null}function yn(e){e===gr&&(gr=e.parent_)}var ra=e=>gr=nu(gr,e);function su(e){let t=e[re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ia(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[re].modified_&&(gn(t),Re(4)),he(e)&&(e=na(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[re].base_,e,t)}else e=na(t,r);return ou(t,e,!0),gn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sa?e:void 0}function na(e,t){if(ci(t))return t;let r=t[re];if(!r)return ri(t,e.handledSet_,e);if(!ui(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(e);da(r,e)}return r.copy_}function ou(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&En(t,r)}function ca(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ui=(e,t)=>e.scope_===t,au=[];function ua(e,t,r,i){let n=ze(e),s=e.type_;if(i!==void 0&&fn(n,i,s)===t){ei(n,i,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;si(n,(l,c)=>{if(Me(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=e.draftLocations_.get(t)??au;for(let a of o)ei(n,a,r,s)}function lu(e,t,r){e.callbacks_.push(function(n){let s=t;if(!s||!ui(s,n))return;n.mapSetPlugin_?.fixSetContents(s);let o=Sn(s);ua(e,s.draft_??s,o,r),da(s,n)})}function da(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:i}=t;if(i){let n=i.getPath(e);n&&i.generatePatches_(e,n,t)}ca(e)}}function cu(e,t,r){let{scope_:i}=e;if(Me(r)){let n=r[re];ui(n,i)&&n.callbacks_.push(function(){Zr(e);let o=Sn(n);ua(e,r,o,t)})}else he(r)&&e.callbacks_.push(function(){let s=ze(e);e.type_===3?s.has(r)&&ri(r,i.handledSet_,i):fn(s,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ri(fn(e.copy_,t,e.type_),i.handledSet_,i)})}function ri(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Me(e)||t.has(e)||!he(e)||ci(e)||(t.add(e),si(e,(i,n)=>{if(Me(n)){let s=n[re];if(ui(s,r)){let o=Sn(s);ei(e,i,o,e.type_),ca(s)}}else he(n)&&ri(n,t,r)})),e}function uu(e,t){let r=oi(e),i={type_:r?1:0,scope_:t?t.scope_:la(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,s=ii;r&&(n=[i],s=yr);let{revoke:o,proxy:a}=Proxy.revocable(n,s);return i.draft_=a,i.revoke_=o,[a,i]}var ii={get(e,t){if(t===re)return e;let r=e.scope_.arrayMethodsPlugin_,i=e.type_===1&&typeof t=="string";if(i&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let n=ze(e);if(!cn(n,t,e.type_))return pu(e,n,t);let s=n[t];if(e.finalized_||!he(s)||i&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ru(t))return s;if(s===dn(e.base_,t)||du(e,t,s)){Zr(e);let o=e.type_===1?+t:t,a=vn(e.scope_,s,e,o);return e.copy_[o]=a}return s},has(e,t){return t in ze(e)},ownKeys(e){return Reflect.ownKeys(ze(e))},set(e,t,r){let i=pa(ze(e),t);if(i?.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){let n=dn(ze(e),t),s=n?.[re];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(tu(r,n)&&(r!==void 0||cn(e.base_,t,e.type_)))return!0;Zr(e),xn(e)}return e.copy_[t]===r&&(r!==void 0||cn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),cu(e,t,r)),!0},deleteProperty(e,t){return Zr(e),dn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=ze(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{[Xr]:!0,[pn]:e.type_!==1||t!=="length",[Qr]:i[Qr],[mr]:r[t]}},defineProperty(){Re(11)},getPrototypeOf(e){return Vt(e.base_)},setPrototypeOf(){Re(12)}},yr={};for(let e in ii){let t=ii[e];yr[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}yr.deleteProperty=function(e,t){return yr.set.call(this,e,t,void 0)};yr.set=function(e,t,r){return ii.set.call(this,e[0],t,r,e[0])};function dn(e,t){let r=e[re];return(r?ze(r):e)[t]}function du(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!he(r)||r[re]?!1:e.baseRefs_.has(r)}function pu(e,t,r){let i=pa(t,r);return i?mr in i?i[mr]:i.get?.call(e.draft_):void 0}function pa(e,t){if(!(t in e))return;let r=Vt(e);for(;r;){let i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Vt(r)}}function xn(e){e.modified_||(e.modified_=!0,e.parent_&&xn(e.parent_))}function Zr(e){e.copy_||(e.assigned_=new Map,e.copy_=hn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,i)=>{if(Ht(t)&&!Ht(r)){let s=r;r=t;let o=this;return function(l=s,...c){return o.produce(l,u=>r.call(this,u,...c))}}Ht(r)||Re(6),i!==void 0&&!Ht(i)&&Re(7);let n;if(he(t)){let s=ra(this),o=vn(s,t,void 0),a=!0;try{n=r(o),a=!1}finally{a?gn(s):yn(s)}return ta(s,i),ia(n,s)}else if(!t||!bn(t)){if(n=r(t),n===void 0&&(n=t),n===sa&&(n=void 0),this.autoFreeze_&&En(n,!0),i){let s=[],o=[];vt(mn).generateReplacementPatches_(t,n,{patches_:s,inversePatches_:o}),i(s,o)}return n}else Re(1,t)},this.produceWithPatches=(t,r)=>{if(Ht(t))return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let i,n;return[this.produce(t,r,(o,a)=>{i=o,n=a}),i,n]},un(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),un(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),un(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){he(e)||Re(8),Me(e)&&(e=fa(e));let t=ra(this),r=vn(t,e,void 0);return r[re].isManual_=!0,yn(t),r}finishDraft(e,t){let r=e&&e[re];(!r||!r.isManual_)&&Re(9);let{scope_:i}=r;return ta(i,t),ia(void 0,i)}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 n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let i=vt(mn).applyPatches_;return Me(e)?i(e,t):this.produce(e,n=>i(n,t))}};function vn(e,t,r,i){let[n,s]=ai(t)?vt(ti).proxyMap_(t,r):li(t)?vt(ti).proxySet_(t,r):uu(t,r);return(r?.scope_??la()).drafts_.push(n),s.callbacks_=r?.callbacks_??[],s.key_=i,r&&i!==void 0?lu(r,s,i):s.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:c}=l;s.modified_&&c&&c.generatePatches_(s,[],l)}),n}function fa(e){return Me(e)||Re(10,e),ha(e)}function ha(e){if(!he(e)||ci(e))return e;let t=e[re],r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=hn(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=hn(e,!0);return si(r,(n,s)=>{ei(r,n,ha(s))},i),t&&(t.finalized_=!1),r}var hu=globalThis.Iterator,Mf=typeof hu?.from=="function";var mu=new fu,An=mu.produce;function ma(e){return({dispatch:r,getState:i})=>n=>s=>typeof s=="function"?s(r,i,e):n(s)}var ga=ma(),ya=ma;var gu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?hr:hr.apply(null,arguments)},Vf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},yu=e=>e&&typeof e.match=="function";function et(e,t){function r(...i){if(t){let n=t(...i);if(!n)throw new Error(je(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>Xo(i)&&i.type===e,r}var Ea=class vr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,vr.prototype)}static get[Symbol.species](){return vr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new vr(...t[0].concat(this)):new vr(...t.concat(this))}};function xa(e){return he(e)?An(e,()=>{}):e}function di(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function xu(e){return typeof e=="boolean"}var vu=()=>function(t){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:s=!0}=t??{},o=new Ea;return r&&(xu(r)?o.push(ga):o.push(ya(r.extraArgument))),o},bu="RTK_autoBatch";var va=e=>t=>{setTimeout(t,e)},Su=(e,t)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(s),clearTimeout(o),r())},s=e(n),o=setTimeout(n,t)},Eu=(e={type:"raf"})=>t=>(...r)=>{let i=t(...r),n=!0,s=!1,o=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Su(window.requestAnimationFrame,100):va(10):e.type==="callback"?e.queueNotification:va(e.timeout),c=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[bu],s=!n,s&&(o||(o=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},Au=e=>function(r){let{autoBatch:i=!0}=r??{},n=new Ea(e);return i&&n.push(Eu(typeof i=="object"?i:void 0)),n};function Aa(e){let t=vu(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},l;if(typeof r=="function")l=r;else if(qr(r))l=qo(r);else throw new Error(je(1));let c;typeof i=="function"?c=i(t):c=t();let u=hr;n&&(u=gu({trace:!1,...typeof n=="object"&&n}));let d=Yo(...c),p=Au(d),g=typeof a=="function"?a(p):p(),v=u(...g);return ln(l,o,v)}function _a(e){let t={},r=[],i,n={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(je(28));if(a in t)throw new Error(je(29));return t[a]=o,n},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),n},addMatcher(s,o){return r.push({matcher:s,reducer:o}),n},addDefaultCase(s){return i=s,n}};return e(n),[t,r,i]}function _u(e){return typeof e=="function"}function Cu(e,t){let[r,i,n]=_a(t),s;if(_u(e))s=()=>xa(e());else{let a=xa(e);s=()=>a}function o(a=s(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Me(u)){let g=d(u,l);return g===void 0?u:g}else{if(he(u))return An(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 o.getInitialState=s,o}var wu=(e,t)=>yu(e)?e.match(t):e(t);function Tu(...e){return t=>e.some(r=>wu(r,t))}var Ou="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ru=(e=21)=>{let t="",r=e;for(;r--;)t+=Ou[Math.random()*64|0];return t},Pu=["name","message","stack","code"],_n=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ba=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Lu=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Pu)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Sa="External signal was aborted",Nu=(()=>{function e(t,r,i){let n=et(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),s=et(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=et(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||Lu)(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 g=i?.idGenerator?i.idGenerator(l):Ru(),v=new AbortController,E,x;function C(b){x=b,v.abort()}c&&(c.aborted?C(Sa):c.addEventListener("abort",()=>C(Sa),{once:!0}));let M=(async function(){let b;try{let L=i?.condition?.(l,{getState:d,extra:p});if(ku(L)&&(L=await L),L===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let z=new Promise((U,j)=>{E=()=>{j({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",E,{once:!0})});u(s(g,l,i?.getPendingMeta?.({requestId:g,arg:l},{getState:d,extra:p}))),b=await Promise.race([z,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:g,signal:v.signal,abort:C,rejectWithValue:((U,j)=>new _n(U,j)),fulfillWithValue:((U,j)=>new ba(U,j))})).then(U=>{if(U instanceof _n)throw U;return U instanceof ba?n(U.payload,g,l,U.meta):n(U,g,l)})])}catch(L){b=L instanceof _n?o(null,g,l,L.payload,L.meta):o(L,g,l)}finally{E&&v.signal.removeEventListener("abort",E)}return i&&!i.dispatchConditionRejection&&o.match(b)&&b.meta.condition||u(b),b})();return Object.assign(M,{abort:C,requestId:g,arg:l,unwrap(){return M.then(Du)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:n,settled:Tu(o,n),typePrefix:t})}return e.withTypes=()=>e,e})();function Du(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ku(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ca=Symbol.for("rtk-slice-createasyncthunk"),jf={[Ca]:Nu};function Mu(e,t){return`${e}/${t}`}function Iu({creators:e}={}){let t=e?.asyncThunk?.[Ca];return function(i){let{name:n,reducerPath:s=n}=i;if(!n)throw new Error(je(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(Uu()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,O){let L=typeof b=="string"?b:b.type;if(!L)throw new Error(je(12));if(L in l.sliceCaseReducersByType)throw new Error(je(13));return l.sliceCaseReducersByType[L]=O,c},addMatcher(b,O){return l.sliceMatchers.push({matcher:b,reducer:O}),c},exposeAction(b,O){return l.actionCreators[b]=O,c},exposeCaseReducer(b,O){return l.sliceCaseReducersByName[b]=O,c}};a.forEach(b=>{let O=o[b],L={reducerName:b,type:Mu(n,b),createNotation:typeof i.reducers=="function"};Fu(O)?Vu(L,O,c,t):Bu(L,O,c)});function u(){let[b={},O=[],L=void 0]=typeof i.extraReducers=="function"?_a(i.extraReducers):[i.extraReducers],z={...b,...l.sliceCaseReducersByType};return Cu(i.initialState,U=>{for(let j in z)U.addCase(j,z[j]);for(let j of l.sliceMatchers)U.addMatcher(j.matcher,j.reducer);for(let j of O)U.addMatcher(j.matcher,j.reducer);L&&U.addDefaultCase(L)})}let d=b=>b,p=new Map,g=new WeakMap,v;function E(b,O){return v||(v=u()),v(b,O)}function x(){return v||(v=u()),v.getInitialState()}function C(b,O=!1){function L(U){let j=U[b];return typeof j>"u"&&O&&(j=di(g,L,x)),j}function z(U=d){let j=di(p,O,()=>new WeakMap);return di(j,U,()=>{let Yt={};for(let[ge,rt]of Object.entries(i.selectors??{}))Yt[ge]=$u(rt,U,()=>di(g,U,x),O);return Yt})}return{reducerPath:b,getSelectors:z,get selectors(){return z(L)},selectSlice:L}}let M={name:n,reducer:E,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:x,...C(s),injectInto(b,{reducerPath:O,...L}={}){let z=O??s;return b.inject({reducerPath:z,reducer:E},L),{...M,...C(z,!0)}}};return M}}function $u(e,t,r,i){function n(s,...o){let a=t(s);return typeof a>"u"&&i&&(a=r()),e(a,...o)}return n.unwrapped=e,n}var wa=Iu();function Uu(){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 Bu({type:e,reducerName:t,createNotation:r},i,n){let s,o;if("reducer"in i){if(r&&!Hu(i))throw new Error(je(17));s=i.reducer,o=i.prepare}else s=i;n.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?et(e,o):et(e))}function Fu(e){return e._reducerDefinitionType==="asyncThunk"}function Hu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Vu({type:e,reducerName:t},r,i,n){if(!n)throw new Error(je(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,d=n(e,s,u);i.exposeAction(t,d),o&&i.addCase(d.fulfilled,o),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(t,{fulfilled:o||pi,pending:a||pi,rejected:l||pi,settled:c||pi})}function pi(){}var Ta="listener",Oa="completed",Ra="cancelled",Wf=`task-${Ra}`,Kf=`task-${Oa}`,Gf=`${Ta}-${Ra}`,qf=`${Ta}-${Oa}`;var{assign:Pa}=Object;var Cn="listenerMiddleware";var zu=Pa(et(`${Cn}/add`),{withTypes:()=>zu}),Yf=et(`${Cn}/removeAll`),ju=Pa(et(`${Cn}/remove`),{withTypes:()=>ju});function je(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 Wu=Hr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),fi=class extends Wu(Object){};window.ftReduxStores||(window.ftReduxStores={});var La=class e extends fi{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,s=window.ftReduxStores[i];if(Kr(s))return s;if(n==null)return;let o=wa({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=Aa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=dr(o.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 o.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(o,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Vr,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let n=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let l=o,c=s[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Ut(p,u)||this.setState({[d]:n(u)})}}}),this.eventBus=i??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 hi=class{static format(t,r,i,n,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!s)):this.getIntlDateTime(t,r,i,n,!!s)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,s){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var mi=f(A()),Ku="ft-app-info",bt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bt.eventName="authentication-change";var br=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};br.eventName="ui-locale-changed";var Gu={session:(e,t)=>{(0,mi.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new bt(t.payload)),0))}},w=mi.FtReduxStore.get({name:Ku,reducers:Gu,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 Na=f(A()),gi=function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},Ch=(0,Na.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,s;return((s=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1)?a=>hi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return gi([(0,wn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),gi([(0,wn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),gi([on({store:w.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),gi([on({store:w.name})],t.prototype,"uiLocale",void 0),t});var Da;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Da||(Da={}));var ka;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(ka||(ka={}));var Ma;(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"})(Ma||(Ma={}));var Ia;(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"})(Ia||(Ia={}));var $a;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})($a||($a={}));var Ua;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Ua||(Ua={}));var Ba;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ba||(Ba={}));var Fa;(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"})(Fa||(Fa={}));var Ha;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ha||(Ha={}));var Va;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Va||(Va={}));var za;(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"})(za||(za={}));var ja;(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"})(ja||(ja={}));var Wa;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Wa||(Wa={}));var Ka;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ka||(Ka={}));var Ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ga||(Ga={}));var qa;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(qa||(qa={}));var Ya;(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"})(Ya||(Ya={}));var Xa;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Xa||(Xa={}));var Za;(function(e){e.ASC="ASC",e.DESC="DESC"})(Za||(Za={}));var Ja;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ja||(Ja={}));var Qa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Qa||(Qa={}));var el;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(el||(el={}));var tl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(tl||(tl={}));var rl;(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"})(rl||(rl={}));var il;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(il||(il={}));var nl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(nl||(nl={}));var sl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(sl||(sl={}));var ol;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ol||(ol={}));var G;(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"})(G||(G={}));var ve;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ve||(ve={}));var al;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(al||(al={}));var ll;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ll||(ll={}));var cl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(cl||(cl={}));var ul;(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"})(ul||(ul={}));var dl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(dl||(dl={}));var pl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(pl||(pl={}));var fl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(fl||(fl={}));var hl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(hl||(hl={}));var ml;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ml||(ml={}));var gl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(gl||(gl={}));var yl;(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"})(yl||(yl={}));var xl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(xl||(xl={}));var qu={[G.PERSONAL_BOOK_SHARE_USER]:[G.PERSONAL_BOOK_USER],[G.HTML_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.PDF_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.KHUB_ADMIN]:[G.CONTENT_PUBLISHER],[G.ADMIN]:[G.KHUB_ADMIN,G.USERS_ADMIN,G.PORTAL_ADMIN,G.BEHAVIOR_DATA_USER],[G.GENERATIVE_AI_EXPORT_USER]:[G.GENERATIVE_AI_USER]};function vl(e,t){return e===t||(qu[e]??[]).some(r=>vl(r,t))}function Tn(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(i=>vl(i,t))}function bl(e,...t){return e==null?!1:t.some(r=>Tn(e,r))}var Si=f(A());var On=f(A());var St=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=w.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var zt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var me=class extends zt{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(s,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new On.CacheRegistry,this.cache=t?n.commonCache:new On.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var yi=class extends me{async listMySearches(){let{session:t}=w.getState();return Tn(t,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var xi=class extends me{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var vi=class extends me{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=w.getState().session;return!!t?.sessionAuthenticated}};var bi=class extends me{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=w.getState().session;return!!t?.sessionAuthenticated}};var Yu="ft-user-assets",Xu={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(ve).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:i,asset:n}=t.payload;Pn(e,r,[...Rn(e,r),n]),Sl(e,r,1,i),El(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;Pn(e,r,Rn(e,r).map(n=>n.id===i.id?i:n)),El(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;Pn(e,r,Rn(e,r).filter(s=>s.id!==n)),Sl(e,r,-1,i)}},Al={[ve.SEARCHES]:"savedSearches",[ve.BOOKMARKS]:"bookmarks",[ve.BOOKS]:void 0,[ve.COLLECTIONS]:void 0},Rn=(e,t)=>{var r;let i=Al[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},Pn=(e,t,r)=>{let i=Al[t];i&&(e[i]=r)},Sl=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===ve.BOOKMARKS&&i)){let s=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,s+r)}},El=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},se=Si.FtReduxStore.get({name:Yu,reducers:Xu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ve).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ln=class{constructor(t=new vi,r=new bi){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new xi,this.savedSearchesService=new yi,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,Si.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(),se.actions.clearAssetCount(),se.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),se.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),se.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();se.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();se.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&se.getState().assetCounts.allAsset[t]!==r.count&&se.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&se.getState().assetCounts.bookmarkByMap[t]!==r.count&&se.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(se.getState().assetCounts.bookmarkByMap).length!==0;t===ve.BOOKMARKS&&r&&se.actions.clearBookmarkCountByMap(),se.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;se.actions.bookmarks(r)}}},Zu=new Ln;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Zu);var Nn=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Nn;var be=f(A());var _l,jt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Ju=Symbol("clearAfterUnitTest"),Ei=class extends(0,be.withEventBus)(me){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[_l]=()=>{this.defaultMessages={},this.cache=new be.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.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 i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,be.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let s=t.toLowerCase(),o=this.resolveContext(s);return new be.ParametrizedLabelResolver((n=this.defaultMessages[s])!==null&&n!==void 0?n:{},o).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof be.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.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(i=>(0,be.delay)(0).then(()=>i()).catch(()=>null)))}};_l=Ju;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ei{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ei{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Sr=window.FluidTopicsI18nService,Dn=window.FluidTopicsCustomI18nService;var Cl=f(A()),kn=class{highlightHtml(t,r,i){(0,Cl.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new kn;var wl=f(A());var Mn=class{isDate(t){var r,i,n,s;return(s=(n=((i=(r=w.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&&s!==void 0?s:!1}format(t,r){var i,n,s,o;if(t==null)return"";try{return wl.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Mn;var Tl=f(A());var Er=class{static get(t,r){var i,n,s,o;let a=w.getState(),{lang:l,region:c}=(s=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&s!==void 0?s:{lang:"en",region:"US"};return new Tl.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${l}-${c}`)}};var In=class{urlToSearchRequest(t){return Er.get().parse(t)}searchRequestToUrl(t){return Er.get().serialize(t)}};window.FluidTopicsUrlService=new In;var We=f(A());var Et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Et.eventName="before-location-change";var At=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};At.eventName="change";var $n=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))}},Ol=new $n;var Ai=class e extends We.WithEventBus{static build(){return new e(window.history,Ol,()=>window.location,!1)}constructor(t,r,i,n){var s,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,We.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new At(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[s,o,a])=>{let l=new Et(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,...s,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,o,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 i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(t){this.addEventListener(Et.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Et.eventName,t)}addHistoryChangeListener(t){this.addEventListener(At.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(At.eventName,t)}currentItem(){return(0,We.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,We.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,We.deepCopy)(r.find(i=>t(i)))}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,We.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 i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,i);)this.hasState(s)&&(n=s),s++;return n}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 i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,s=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return s==null||s!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ai.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 Rl=f(V());var Pl=Rl.css`
|
|
631
|
+
`;var ao=["top","right","bottom","left"],oo=["start","end"],Zi=ao.reduce((e,t)=>e.concat(t,t+"-"+oo[0],t+"-"+oo[1]),[]),nr=Math.min,Xe=Math.max,sr=Math.round;var De=e=>({x:e,y:e}),wc={left:"right",right:"left",bottom:"top",top:"bottom"};function lo(e,t,r){return Xe(e,nr(t,r))}function Dr(e,t){return typeof e=="function"?e(t):e}function or(e){return e.split("-")[0]}function Ze(e){return e.split("-")[1]}function Ji(e){return e==="x"?"y":"x"}function Qi(e){return e==="y"?"height":"width"}function kr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function en(e){return Ji(kr(e))}function co(e,t,r){r===void 0&&(r=!1);let i=Ze(e),n=en(e),s=Qi(n),o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Xi(o)),[o,Xi(o)]}function uo(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Xi(e){let t=or(e);return wc[t]+e.slice(t.length)}function Tc(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function po(e){return typeof e!="number"?Tc(e):{top:e,right:e,bottom:e,left:e}}function ht(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function fo(e,t,r){let{reference:i,floating:n}=e,s=kr(t),o=en(t),a=Qi(o),l=or(t),c=s==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,g;switch(l){case"top":g={x:u,y:i.y-n.height};break;case"bottom":g={x:u,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:d};break;case"left":g={x:i.x-n.width,y:d};break;default:g={x:i.x,y:i.y}}let v=Ze(t);return v&&(g[o]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),g}async function ho(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:g=0}=Dr(t,e),v=po(g),x=a[p?d==="floating"?"reference":"floating":d],C=ht(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(x)))==null||r?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),M=d==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),O=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},L=ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:b,strategy:l}):M);return{top:(C.top-L.top+v.top)/O.y,bottom:(L.bottom-C.bottom+v.bottom)/O.y,left:(C.left-L.left+v.left)/O.x,right:(L.right-C.right+v.right)/O.x}}var Oc=50,mo=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:ho},l=await(o.isRTL==null?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=fo(c,i,l),p=i,g=0,v={};for(let E=0;E<s.length;E++){let x=s[E];if(!x)continue;let{name:C,fn:M}=x,{x:b,y:O,data:L,reset:z}=await M({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=O??d,v[C]={...v[C],...L},z&&g<Oc&&(g++,typeof z=="object"&&(z.placement&&(p=z.placement),z.rects&&(c=z.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:n}):z.rects),{x:u,y:d}=fo(c,p,l)),E=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Rc(e,t,r){return(e?[...r.filter(n=>Ze(n)===e),...r.filter(n=>Ze(n)!==e)]:r.filter(n=>or(n)===n)).filter(n=>e?Ze(n)===e||(t?uo(n)!==n:!1):!0)}var go=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:s,middlewareData:o,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Zi,autoAlignment:g=!0,...v}=Dr(e,t),E=d!==void 0||p===Zi?Rc(d||null,g,p):p,x=((r=o.autoPlacement)==null?void 0:r.index)||0,C=E[x];if(C==null)return{};if(a!==C)return{reset:{placement:E[0]}};let M=await l.detectOverflow(t,v),b=co(C,s,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[M[or(C)],M[b[0]],M[b[1]]],L=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:C,overflows:O}],z=E[x+1];if(z)return{data:{index:x+1,overflows:L},reset:{placement:z}};let U=L.map(ge=>{let rt=Ze(ge.placement);return[ge.placement,rt&&u?ge.overflows.slice(0,2).reduce((fc,hc)=>fc+hc,0):ge.overflows[0],ge.overflows]}).sort((ge,rt)=>ge[1]-rt[1]),Yt=((n=U.filter(ge=>ge[2].slice(0,Ze(ge[0])?2:3).every(rt=>rt<=0))[0])==null?void 0:n[0])||U[0][0];return Yt!==a?{data:{index:x+1,overflows:L},reset:{placement:Yt}}:{}}}};var yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:M=>{let{x:b,y:O}=M;return{x:b,y:O}}},...c}=Dr(e,t),u={x:r,y:i},d=await s.detectOverflow(t,c),p=kr(n),g=Ji(p),v=u[g],E=u[p],x=(M,b)=>lo(b+d[M==="y"?"top":"left"],b,b-d[M==="y"?"bottom":"right"]);o&&(v=x(g,v)),a&&(E=x(p,E));let C=l.fn({...t,[g]:v,[p]:E});return{...C,data:{x:C.x-r,y:C.y-i,enabled:{[g]:o,[p]:a}}}}}};function Ir(){return typeof window<"u"}function gt(e){return vo(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function He(e){var t;return(t=(vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vo(e){return Ir()?e instanceof Node||e instanceof de(e).Node:!1}function Te(e){return Ir()?e instanceof Element||e instanceof de(e).Element:!1}function Ve(e){return Ir()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function xo(e){return!Ir()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function ar(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function bo(e){return/^(table|td|th)$/.test(gt(e))}function lr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pc=/transform|translate|scale|rotate|perspective|filter/,Lc=/paint|layout|strict|content/,mt=e=>!!e&&e!=="none",tn;function Mt(e){let t=Te(e)?Oe(e):e;return mt(t.transform)||mt(t.translate)||mt(t.scale)||mt(t.rotate)||mt(t.perspective)||!$r()&&(mt(t.backdropFilter)||mt(t.filter))||Pc.test(t.willChange||"")||Lc.test(t.contain||"")}function So(e){let t=Je(e);for(;Ve(t)&&!It(t);){if(Mt(t))return t;if(lr(t))return null;t=Je(t)}return null}function $r(){return tn==null&&(tn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tn}function It(e){return/^(html|body|#document)$/.test(gt(e))}function Oe(e){return de(e).getComputedStyle(e)}function cr(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||xo(e)&&e.host||He(e);return xo(t)?t.host:t}function Eo(e){let t=Je(e);return It(t)?(e.ownerDocument||e).body:Ve(t)&&ar(t)?t:Eo(t)}function Mr(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Eo(e),s=n===((i=e.ownerDocument)==null?void 0:i.body),o=de(n);if(s){let a=Ur(o);return t.concat(o,o.visualViewport||[],ar(n)?n:[],a&&r?Mr(a):[])}else return t.concat(n,Mr(n,[],r))}function Ur(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Co(e){let t=Oe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=Ve(e),s=n?e.offsetWidth:r,o=n?e.offsetHeight:i,a=sr(r)!==s||sr(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function wo(e){return Te(e)?e:e.contextElement}function $t(e){let t=wo(e);if(!Ve(t))return De(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:s}=Co(t),o=(s?sr(r.width):r.width)/i,a=(s?sr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var Nc=De(0);function To(e){let t=de(e);return!$r()||!t.visualViewport?Nc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Dc(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===de(e)}function ur(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),s=wo(e),o=De(1);t&&(i?Te(i)&&(o=$t(i)):o=$t(e));let a=Dc(s,r,i)?To(s):De(0),l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(s&&i){let p=de(s),g=Te(i)?de(i):i,v=p,E=Ur(v);for(;E&&g!==v;){let x=$t(E),C=E.getBoundingClientRect(),M=Oe(E),b=C.left+(E.clientLeft+parseFloat(M.paddingLeft))*x.x,O=C.top+(E.clientTop+parseFloat(M.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=O,v=de(E),E=Ur(v)}}return ht({width:u,height:d,x:l,y:c})}function Br(e,t){let r=cr(e).scrollLeft;return t?t.left+r:ur(He(e)).left+r}function Oo(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Br(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function kc(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,s=n==="fixed",o=He(i),a=t?lr(t.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=De(1),u=De(0),d=Ve(i);if((d||!s)&&((gt(i)!=="body"||ar(o))&&(l=cr(i)),d)){let g=ur(i);c=$t(i),u.x=g.x+i.clientLeft,u.y=g.y+i.clientTop}let p=o&&!d&&!s?Oo(o,l):De(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 Mc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ic(e){let t=cr(e),r=e.ownerDocument.body,i=Xe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Xe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),s=-t.scrollLeft+Br(e),o=-t.scrollTop;return Oe(r).direction==="rtl"&&(s+=Xe(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:o}}var $c=25;function Uc(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=de(e),s=He(e),o=n.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(o){let p=!$r()||t==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(Br(s)<=0){let p=s.ownerDocument,g=p.body,v=getComputedStyle(g),E=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(s.clientWidth-g.clientWidth-E),C=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;C<=$c&&(a-=C)}return{width:a,height:l,x:c,y:u}}function Bc(e,t){let r=ur(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,s=$t(e),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=n*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function Ao(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=Uc(e,r,t);else if(t==="document")i=Ic(He(e));else if(Te(t))i=Bc(t,r);else{let n=To(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ht(i)}function Fc(e,t){let r=t.get(e);if(r)return r;let i=Mr(e,[],!1).filter(a=>Te(a)&>(a)!=="body"),n=null,s=Oe(e).position==="fixed",o=s?Je(e):e;for(;Te(o)&&!It(o);){let a=Oe(o),l=Mt(o),c=n?n.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==o):n=a,o=Je(o)}return t.set(e,i),i}function Hc(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,o=[...r==="clippingAncestors"?lr(t)?[]:Fc(t,this._c):[].concat(r),i],a=Ao(t,o[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<o.length;p++){let g=Ao(t,o[p],n);l=Xe(g.top,l),c=nr(g.right,c),u=nr(g.bottom,u),d=Xe(g.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Vc(e){let{width:t,height:r}=Co(e);return{width:t,height:r}}function zc(e,t,r){let i=Ve(t),n=He(t),s=r==="fixed",o=ur(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=De(0);if((i||!s)&&((gt(t)!=="body"||ar(n))&&(a=cr(t)),i)){let p=ur(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!i&&n&&(l.x=Br(n));let c=n&&!i&&!s?Oo(n,a):De(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function rn(e){return Oe(e).position==="static"}function _o(e,t){if(!Ve(e)||Oe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return He(e)===r&&(r=r.ownerDocument.body),r}function Ro(e,t){let r=de(e);if(lr(e))return r;if(!Ve(e)){let n=Je(e);for(;n&&!It(n);){if(Te(n)&&!rn(n))return n;n=Je(n)}return r}let i=_o(e,t);for(;i&&bo(i)&&rn(i);)i=_o(i,t);return i&&It(i)&&rn(i)&&!Mt(i)?r:i||So(e)||r}var jc=async function(e){let t=this.getOffsetParent||Ro,r=this.getDimensions,i=await r(e.floating);return{reference:zc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Wc(e){return Oe(e).direction==="rtl"}var Fr={convertOffsetParentRelativeRectToViewportRelativeRect:kc,getDocumentElement:He,getClippingRect:Hc,getOffsetParent:Ro,getElementRects:jc,getClientRects:Mc,getDimensions:Vc,getScale:$t,isElement:Te,isRTL:Wc};var Po=go,Lo=yo;var No=(e,t,r)=>{let i=new Map,n=r??{},s={...Fr,...n.platform,_c:i};return mo(e,t,{...n,platform:s})};function Do(e){return Kc(e)}function nn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Kc(e){for(let t=e;t;t=nn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=nn(e);t;t=nn(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Mt(r)||t.tagName==="BODY"))return t}return null}async function ko(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},No(e,t,{strategy:i.strategy,platform:{...Fr,getOffsetParent:n=>Fr.getOffsetParent(n,Do)},middleware:[Lo({crossAxis:!0}),Po({allowedPlacements:[i.placement]})]})}var Kt=f(A());var wn=f(J());var Mo=f(J(),1);var sn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Gc=e=>({fromAttribute:t=>{if(t==null)return dr(e);try{return JSON.parse(t)}catch{return dr(e)}},toAttribute:t=>JSON.stringify(t)});function Io(e,t){return(0,Mo.property)({type:Object,converter:Gc(e),hasChanged:pr,...t??{}})}function qc(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,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Ut(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Ut(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[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 n=o=>Object.keys(o).filter(a=>o[a]!=null),s=n(e);if(r=s.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;){let o=s[i];if(!Ut(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ut(e,t){try{return qc(e,t)}catch{return!1}}function pr(e,t){return!Ut(e,t)}function dr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Hr(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var $o=f(J(),1);var on=e=>{let t=e??{};return(r,i)=>{var n;let s={hasChanged:pr,attribute:!1,...t};(0,$o.property)(s)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Vr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==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 yt=f(J(),1);var zr=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,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){n(a);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Bo=f(V(),1);var jr=globalThis,Yc=jr.ShadowRoot&&(jr.ShadyCSS===void 0||jr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Uo=(e,t)=>{if(Yc)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=jr.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Wr=class extends Bo.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},i=this.renderOptions.creationScope=this.attachShadow(r);return Uo(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){sn(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 Fo(e,t,...r){var i;let n=e.querySelector(t);for(let s of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(s);return n}var Ft=function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},jo,Ho=Symbol("constructorPrototype"),Vo=Symbol("constructorName"),Wo=Symbol("exportpartsDebouncer"),zo=Symbol("dynamicDependenciesLoaded"),Bt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Bt.eventName="exportparts-updated";var ke=class extends Wr{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[jo]=new zr(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Wo].run(()=>{var n,s;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Vo]=this.constructor.name,this[Ho]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Vo]&&Object.setPrototypeOf(this,this[Ho])}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(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[zo]||(r[zo]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Bt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Bt.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 Bt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let s=[...n??[],i];r=Fo(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(t){var r,i,n,s,o,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(s=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let g=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],v=(a=(n=p.getAttribute("exportparts"))===null||n===void 0?void 0:n.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],E=[...g,...v].filter(l).map(x=>x.trim());for(let x of E)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(g=>`${p}:${g}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};jo=Wo;Ft([(0,yt.property)()],ke.prototype,"exportpartsPrefix",void 0);Ft([Io([])],ke.prototype,"exportpartsPrefixes",void 0);Ft([(0,yt.property)({reflect:!0})],ke.prototype,"exportparts",void 0);Ft([(0,yt.property)()],ke.prototype,"customStylesheet",void 0);Ft([(0,yt.property)()],ke.prototype,"elementToFocus",void 0);Ft([(0,yt.state)()],ke.prototype,"useAdoptedStyleSheets",void 0);function Kr(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var fr=Symbol("internalReduxEventsUnsubscribers"),Qe=Symbol("internalStoresUnsubscribers"),xt=Symbol("internalStores"),Xc=Hr(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[xt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[xt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xt].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[Qe].has(o.store):this[Qe].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l;this[Qe].set(o,a.subscribe(()=>this.updateFromStores())),this[fr].set(o,[]),Kr(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[fr].get(o).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Qe].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Qe].has(o)&&this[Qe].get(o)(),this[Qe].delete(o),(a=this[fr].get(o))===null||a===void 0||a.forEach(l=>l()),this[fr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Qe,r=xt,i=fr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Ko=class extends Xc(ke){};function te(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 Zc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Go=Zc,an=()=>Math.random().toString(36).substring(7).split("").join("."),Jc={INIT:`@@redux/INIT${an()}`,REPLACE:`@@redux/REPLACE${an()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${an()}`},Gr=Jc;function qr(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 ln(e,t,r){if(typeof e!="function")throw new Error(te(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(te(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(te(1));return r(ln)(e,t)}let i=e,n=t,s=new Map,o=s,a=0,l=!1;function c(){o===s&&(o=new Map,s.forEach((x,C)=>{o.set(C,x)}))}function u(){if(l)throw new Error(te(3));return n}function d(x){if(typeof x!="function")throw new Error(te(4));if(l)throw new Error(te(5));let C=!0;c();let M=a++;return o.set(M,x),function(){if(C){if(l)throw new Error(te(6));C=!1,c(),o.delete(M),s=null}}}function p(x){if(!qr(x))throw new Error(te(7));if(typeof x.type>"u")throw new Error(te(8));if(typeof x.type!="string")throw new Error(te(17));if(l)throw new Error(te(9));try{l=!0,n=i(n,x)}finally{l=!1}return(s=o).forEach(M=>{M()}),x}function g(x){if(typeof x!="function")throw new Error(te(10));i=x,p({type:Gr.REPLACE})}function v(){let x=d;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(te(11));function M(){let O=C;O.next&&O.next(u())}return M(),{unsubscribe:x(M)}},[Go](){return this}}}return p({type:Gr.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:g,[Go]:v}}function Qc(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Gr.INIT})>"u")throw new Error(te(12));if(typeof r(void 0,{type:Gr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(te(13))})}function qo(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let i=Object.keys(r),n,s;try{Qc(r)}catch(o){s=o}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],g=r[p],v=a[p],E=g(v,l);if(typeof E>"u"){let x=l&&l.type;throw new Error(te(14))}u[p]=E,c=c||E!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function hr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function Yo(...e){return t=>(r,i)=>{let n=t(r,i),s=()=>{throw new Error(te(15))},o={getState:n.getState,dispatch:(l,...c)=>s(l,...c)},a=e.map(l=>l(o));return s=hr(...a)(n.dispatch),{...n,dispatch:s}}}function Xo(e){return qr(e)&&"type"in e&&typeof e.type=="string"}var sa=Symbol.for("immer-nothing"),Zo=Symbol.for("immer-draftable"),re=Symbol.for("immer-state");function Re(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var fe=Object,Vt=fe.getPrototypeOf,Jr="constructor",ni="prototype",pn="configurable",Qr="enumerable",Xr="writable",mr="value",Me=e=>!!e&&!!e[re];function he(e){return e?oa(e)||oi(e)||!!e[Zo]||!!e[Jr]?.[Zo]||ai(e)||li(e):!1}var eu=fe[ni][Jr].toString(),Jo=new WeakMap;function oa(e){if(!e||!bn(e))return!1;let t=Vt(e);if(t===null||t===fe[ni])return!0;let r=fe.hasOwnProperty.call(t,Jr)&&t[Jr];if(r===Object)return!0;if(!Ht(r))return!1;let i=Jo.get(r);return i===void 0&&(i=Function.toString.call(r),Jo.set(r,i)),i===eu}function si(e,t,r=!0){xr(e)===0?(r?Reflect.ownKeys(e):fe.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((i,n)=>t(n,i,e))}function xr(e){let t=e[re];return t?t.type_:oi(e)?1:ai(e)?2:li(e)?3:0}var cn=(e,t,r=xr(e))=>r===2?e.has(t):fe[ni].hasOwnProperty.call(e,t),fn=(e,t,r=xr(e))=>r===2?e.get(t):e[t],ei=(e,t,r,i=xr(e))=>{i===2?e.set(t,r):i===3?e.add(r):e[t]=r};function tu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var oi=Array.isArray,ai=e=>e instanceof Map,li=e=>e instanceof Set,bn=e=>typeof e=="object",Ht=e=>typeof e=="function",un=e=>typeof e=="boolean";function ru(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ze=e=>e.copy_||e.base_;var Sn=e=>e.modified_?e.copy_:e.base_;function hn(e,t){if(ai(e))return new Map(e);if(li(e))return new Set(e);if(oi(e))return Array[ni].slice.call(e);let r=oa(e);if(t===!0||t==="class_only"&&!r){let i=fe.getOwnPropertyDescriptors(e);delete i[re];let n=Reflect.ownKeys(i);for(let s=0;s<n.length;s++){let o=n[s],a=i[o];a[Xr]===!1&&(a[Xr]=!0,a[pn]=!0),(a.get||a.set)&&(i[o]={[pn]:!0,[Xr]:!0,[Qr]:a[Qr],[mr]:e[o]})}return fe.create(Vt(e),i)}else{let i=Vt(e);if(i!==null&&r)return{...e};let n=fe.create(i);return fe.assign(n,e)}}function En(e,t=!1){return ci(e)||Me(e)||!he(e)||(xr(e)>1&&fe.defineProperties(e,{set:Yr,add:Yr,clear:Yr,delete:Yr}),fe.freeze(e),t&&si(e,(r,i)=>{En(i,!0)},!1)),e}function iu(){Re(2)}var Yr={[mr]:iu};function ci(e){return e===null||!bn(e)?!0:fe.isFrozen(e)}var ti="MapSet",mn="Patches",Qo="ArrayMethods",aa={};function vt(e){let t=aa[e];return t||Re(0,e),t}var ea=e=>!!aa[e];var gr,la=()=>gr,nu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ea(ti)?vt(ti):void 0,arrayMethodsPlugin_:ea(Qo)?vt(Qo):void 0});function ta(e,t){t&&(e.patchPlugin_=vt(mn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gn(e){yn(e),e.drafts_.forEach(su),e.drafts_=null}function yn(e){e===gr&&(gr=e.parent_)}var ra=e=>gr=nu(gr,e);function su(e){let t=e[re];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ia(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[re].modified_&&(gn(t),Re(4)),he(e)&&(e=na(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[re].base_,e,t)}else e=na(t,r);return ou(t,e,!0),gn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sa?e:void 0}function na(e,t){if(ci(t))return t;let r=t[re];if(!r)return ri(t,e.handledSet_,e);if(!ui(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(e);da(r,e)}return r.copy_}function ou(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&En(t,r)}function ca(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ui=(e,t)=>e.scope_===t,au=[];function ua(e,t,r,i){let n=ze(e),s=e.type_;if(i!==void 0&&fn(n,i,s)===t){ei(n,i,r,s);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;si(n,(l,c)=>{if(Me(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=e.draftLocations_.get(t)??au;for(let a of o)ei(n,a,r,s)}function lu(e,t,r){e.callbacks_.push(function(n){let s=t;if(!s||!ui(s,n))return;n.mapSetPlugin_?.fixSetContents(s);let o=Sn(s);ua(e,s.draft_??s,o,r),da(s,n)})}function da(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:i}=t;if(i){let n=i.getPath(e);n&&i.generatePatches_(e,n,t)}ca(e)}}function cu(e,t,r){let{scope_:i}=e;if(Me(r)){let n=r[re];ui(n,i)&&n.callbacks_.push(function(){Zr(e);let o=Sn(n);ua(e,r,o,t)})}else he(r)&&e.callbacks_.push(function(){let s=ze(e);e.type_===3?s.has(r)&&ri(r,i.handledSet_,i):fn(s,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ri(fn(e.copy_,t,e.type_),i.handledSet_,i)})}function ri(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Me(e)||t.has(e)||!he(e)||ci(e)||(t.add(e),si(e,(i,n)=>{if(Me(n)){let s=n[re];if(ui(s,r)){let o=Sn(s);ei(e,i,o,e.type_),ca(s)}}else he(n)&&ri(n,t,r)})),e}function uu(e,t){let r=oi(e),i={type_:r?1:0,scope_:t?t.scope_:la(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,s=ii;r&&(n=[i],s=yr);let{revoke:o,proxy:a}=Proxy.revocable(n,s);return i.draft_=a,i.revoke_=o,[a,i]}var ii={get(e,t){if(t===re)return e;let r=e.scope_.arrayMethodsPlugin_,i=e.type_===1&&typeof t=="string";if(i&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let n=ze(e);if(!cn(n,t,e.type_))return pu(e,n,t);let s=n[t];if(e.finalized_||!he(s)||i&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&ru(t))return s;if(s===dn(e.base_,t)||du(e,t,s)){Zr(e);let o=e.type_===1?+t:t,a=vn(e.scope_,s,e,o);return e.copy_[o]=a}return s},has(e,t){return t in ze(e)},ownKeys(e){return Reflect.ownKeys(ze(e))},set(e,t,r){let i=pa(ze(e),t);if(i?.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){let n=dn(ze(e),t),s=n?.[re];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(tu(r,n)&&(r!==void 0||cn(e.base_,t,e.type_)))return!0;Zr(e),xn(e)}return e.copy_[t]===r&&(r!==void 0||cn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),cu(e,t,r)),!0},deleteProperty(e,t){return Zr(e),dn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=ze(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{[Xr]:!0,[pn]:e.type_!==1||t!=="length",[Qr]:i[Qr],[mr]:r[t]}},defineProperty(){Re(11)},getPrototypeOf(e){return Vt(e.base_)},setPrototypeOf(){Re(12)}},yr={};for(let e in ii){let t=ii[e];yr[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}yr.deleteProperty=function(e,t){return yr.set.call(this,e,t,void 0)};yr.set=function(e,t,r){return ii.set.call(this,e[0],t,r,e[0])};function dn(e,t){let r=e[re];return(r?ze(r):e)[t]}function du(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!he(r)||r[re]?!1:e.baseRefs_.has(r)}function pu(e,t,r){let i=pa(t,r);return i?mr in i?i[mr]:i.get?.call(e.draft_):void 0}function pa(e,t){if(!(t in e))return;let r=Vt(e);for(;r;){let i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Vt(r)}}function xn(e){e.modified_||(e.modified_=!0,e.parent_&&xn(e.parent_))}function Zr(e){e.copy_||(e.assigned_=new Map,e.copy_=hn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,i)=>{if(Ht(t)&&!Ht(r)){let s=r;r=t;let o=this;return function(l=s,...c){return o.produce(l,u=>r.call(this,u,...c))}}Ht(r)||Re(6),i!==void 0&&!Ht(i)&&Re(7);let n;if(he(t)){let s=ra(this),o=vn(s,t,void 0),a=!0;try{n=r(o),a=!1}finally{a?gn(s):yn(s)}return ta(s,i),ia(n,s)}else if(!t||!bn(t)){if(n=r(t),n===void 0&&(n=t),n===sa&&(n=void 0),this.autoFreeze_&&En(n,!0),i){let s=[],o=[];vt(mn).generateReplacementPatches_(t,n,{patches_:s,inversePatches_:o}),i(s,o)}return n}else Re(1,t)},this.produceWithPatches=(t,r)=>{if(Ht(t))return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let i,n;return[this.produce(t,r,(o,a)=>{i=o,n=a}),i,n]},un(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),un(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),un(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){he(e)||Re(8),Me(e)&&(e=fa(e));let t=ra(this),r=vn(t,e,void 0);return r[re].isManual_=!0,yn(t),r}finishDraft(e,t){let r=e&&e[re];(!r||!r.isManual_)&&Re(9);let{scope_:i}=r;return ta(i,t),ia(void 0,i)}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 n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let i=vt(mn).applyPatches_;return Me(e)?i(e,t):this.produce(e,n=>i(n,t))}};function vn(e,t,r,i){let[n,s]=ai(t)?vt(ti).proxyMap_(t,r):li(t)?vt(ti).proxySet_(t,r):uu(t,r);return(r?.scope_??la()).drafts_.push(n),s.callbacks_=r?.callbacks_??[],s.key_=i,r&&i!==void 0?lu(r,s,i):s.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:c}=l;s.modified_&&c&&c.generatePatches_(s,[],l)}),n}function fa(e){return Me(e)||Re(10,e),ha(e)}function ha(e){if(!he(e)||ci(e))return e;let t=e[re],r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=hn(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=hn(e,!0);return si(r,(n,s)=>{ei(r,n,ha(s))},i),t&&(t.finalized_=!1),r}var hu=globalThis.Iterator,Mf=typeof hu?.from=="function";var mu=new fu,An=mu.produce;function ma(e){return({dispatch:r,getState:i})=>n=>s=>typeof s=="function"?s(r,i,e):n(s)}var ga=ma(),ya=ma;var gu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?hr:hr.apply(null,arguments)},Vf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},yu=e=>e&&typeof e.match=="function";function et(e,t){function r(...i){if(t){let n=t(...i);if(!n)throw new Error(je(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>Xo(i)&&i.type===e,r}var Ea=class vr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,vr.prototype)}static get[Symbol.species](){return vr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new vr(...t[0].concat(this)):new vr(...t.concat(this))}};function xa(e){return he(e)?An(e,()=>{}):e}function di(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function xu(e){return typeof e=="boolean"}var vu=()=>function(t){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:s=!0}=t??{},o=new Ea;return r&&(xu(r)?o.push(ga):o.push(ya(r.extraArgument))),o},bu="RTK_autoBatch";var va=e=>t=>{setTimeout(t,e)},Su=(e,t)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(s),clearTimeout(o),r())},s=e(n),o=setTimeout(n,t)},Eu=(e={type:"raf"})=>t=>(...r)=>{let i=t(...r),n=!0,s=!1,o=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Su(window.requestAnimationFrame,100):va(10):e.type==="callback"?e.queueNotification:va(e.timeout),c=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[bu],s=!n,s&&(o||(o=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},Au=e=>function(r){let{autoBatch:i=!0}=r??{},n=new Ea(e);return i&&n.push(Eu(typeof i=="object"?i:void 0)),n};function Aa(e){let t=vu(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},l;if(typeof r=="function")l=r;else if(qr(r))l=qo(r);else throw new Error(je(1));let c;typeof i=="function"?c=i(t):c=t();let u=hr;n&&(u=gu({trace:!1,...typeof n=="object"&&n}));let d=Yo(...c),p=Au(d),g=typeof a=="function"?a(p):p(),v=u(...g);return ln(l,o,v)}function _a(e){let t={},r=[],i,n={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(je(28));if(a in t)throw new Error(je(29));return t[a]=o,n},addAsyncThunk(s,o){return o.pending&&(t[s.pending.type]=o.pending),o.rejected&&(t[s.rejected.type]=o.rejected),o.fulfilled&&(t[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),n},addMatcher(s,o){return r.push({matcher:s,reducer:o}),n},addDefaultCase(s){return i=s,n}};return e(n),[t,r,i]}function _u(e){return typeof e=="function"}function Cu(e,t){let[r,i,n]=_a(t),s;if(_u(e))s=()=>xa(e());else{let a=xa(e);s=()=>a}function o(a=s(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Me(u)){let g=d(u,l);return g===void 0?u:g}else{if(he(u))return An(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 o.getInitialState=s,o}var wu=(e,t)=>yu(e)?e.match(t):e(t);function Tu(...e){return t=>e.some(r=>wu(r,t))}var Ou="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ru=(e=21)=>{let t="",r=e;for(;r--;)t+=Ou[Math.random()*64|0];return t},Pu=["name","message","stack","code"],_n=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ba=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Lu=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Pu)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Sa="External signal was aborted",Nu=(()=>{function e(t,r,i){let n=et(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),s=et(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=et(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||Lu)(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 g=i?.idGenerator?i.idGenerator(l):Ru(),v=new AbortController,E,x;function C(b){x=b,v.abort()}c&&(c.aborted?C(Sa):c.addEventListener("abort",()=>C(Sa),{once:!0}));let M=(async function(){let b;try{let L=i?.condition?.(l,{getState:d,extra:p});if(ku(L)&&(L=await L),L===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let z=new Promise((U,j)=>{E=()=>{j({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",E,{once:!0})});u(s(g,l,i?.getPendingMeta?.({requestId:g,arg:l},{getState:d,extra:p}))),b=await Promise.race([z,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:g,signal:v.signal,abort:C,rejectWithValue:((U,j)=>new _n(U,j)),fulfillWithValue:((U,j)=>new ba(U,j))})).then(U=>{if(U instanceof _n)throw U;return U instanceof ba?n(U.payload,g,l,U.meta):n(U,g,l)})])}catch(L){b=L instanceof _n?o(null,g,l,L.payload,L.meta):o(L,g,l)}finally{E&&v.signal.removeEventListener("abort",E)}return i&&!i.dispatchConditionRejection&&o.match(b)&&b.meta.condition||u(b),b})();return Object.assign(M,{abort:C,requestId:g,arg:l,unwrap(){return M.then(Du)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:n,settled:Tu(o,n),typePrefix:t})}return e.withTypes=()=>e,e})();function Du(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ku(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ca=Symbol.for("rtk-slice-createasyncthunk"),jf={[Ca]:Nu};function Mu(e,t){return`${e}/${t}`}function Iu({creators:e}={}){let t=e?.asyncThunk?.[Ca];return function(i){let{name:n,reducerPath:s=n}=i;if(!n)throw new Error(je(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(Uu()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,O){let L=typeof b=="string"?b:b.type;if(!L)throw new Error(je(12));if(L in l.sliceCaseReducersByType)throw new Error(je(13));return l.sliceCaseReducersByType[L]=O,c},addMatcher(b,O){return l.sliceMatchers.push({matcher:b,reducer:O}),c},exposeAction(b,O){return l.actionCreators[b]=O,c},exposeCaseReducer(b,O){return l.sliceCaseReducersByName[b]=O,c}};a.forEach(b=>{let O=o[b],L={reducerName:b,type:Mu(n,b),createNotation:typeof i.reducers=="function"};Fu(O)?Vu(L,O,c,t):Bu(L,O,c)});function u(){let[b={},O=[],L=void 0]=typeof i.extraReducers=="function"?_a(i.extraReducers):[i.extraReducers],z={...b,...l.sliceCaseReducersByType};return Cu(i.initialState,U=>{for(let j in z)U.addCase(j,z[j]);for(let j of l.sliceMatchers)U.addMatcher(j.matcher,j.reducer);for(let j of O)U.addMatcher(j.matcher,j.reducer);L&&U.addDefaultCase(L)})}let d=b=>b,p=new Map,g=new WeakMap,v;function E(b,O){return v||(v=u()),v(b,O)}function x(){return v||(v=u()),v.getInitialState()}function C(b,O=!1){function L(U){let j=U[b];return typeof j>"u"&&O&&(j=di(g,L,x)),j}function z(U=d){let j=di(p,O,()=>new WeakMap);return di(j,U,()=>{let Yt={};for(let[ge,rt]of Object.entries(i.selectors??{}))Yt[ge]=$u(rt,U,()=>di(g,U,x),O);return Yt})}return{reducerPath:b,getSelectors:z,get selectors(){return z(L)},selectSlice:L}}let M={name:n,reducer:E,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:x,...C(s),injectInto(b,{reducerPath:O,...L}={}){let z=O??s;return b.inject({reducerPath:z,reducer:E},L),{...M,...C(z,!0)}}};return M}}function $u(e,t,r,i){function n(s,...o){let a=t(s);return typeof a>"u"&&i&&(a=r()),e(a,...o)}return n.unwrapped=e,n}var wa=Iu();function Uu(){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 Bu({type:e,reducerName:t,createNotation:r},i,n){let s,o;if("reducer"in i){if(r&&!Hu(i))throw new Error(je(17));s=i.reducer,o=i.prepare}else s=i;n.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?et(e,o):et(e))}function Fu(e){return e._reducerDefinitionType==="asyncThunk"}function Hu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Vu({type:e,reducerName:t},r,i,n){if(!n)throw new Error(je(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,d=n(e,s,u);i.exposeAction(t,d),o&&i.addCase(d.fulfilled,o),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(t,{fulfilled:o||pi,pending:a||pi,rejected:l||pi,settled:c||pi})}function pi(){}var Ta="listener",Oa="completed",Ra="cancelled",Wf=`task-${Ra}`,Kf=`task-${Oa}`,Gf=`${Ta}-${Ra}`,qf=`${Ta}-${Oa}`;var{assign:Pa}=Object;var Cn="listenerMiddleware";var zu=Pa(et(`${Cn}/add`),{withTypes:()=>zu}),Yf=et(`${Cn}/removeAll`),ju=Pa(et(`${Cn}/remove`),{withTypes:()=>ju});function je(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 Wu=Hr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),fi=class extends Wu(Object){};window.ftReduxStores||(window.ftReduxStores={});var La=class e extends fi{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,s=window.ftReduxStores[i];if(Kr(s))return s;if(n==null)return;let o=wa({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=Aa({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=dr(o.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 o.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(o,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Vr,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let n=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let l=o,c=s[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Ut(p,u)||this.setState({[d]:n(u)})}}}),this.eventBus=i??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 hi=class{static format(t,r,i,n,s){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!s)):this.getIntlDateTime(t,r,i,n,!!s)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,s){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var mi=f(A()),Ku="ft-app-info",bt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bt.eventName="authentication-change";var br=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};br.eventName="ui-locale-changed";var Gu={session:(e,t)=>{(0,mi.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new bt(t.payload)),0))}},w=mi.FtReduxStore.get({name:Ku,reducers:Gu,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 Na=f(A()),gi=function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},Ch=(0,Na.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,s;return((s=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1)?a=>hi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return gi([(0,wn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),gi([(0,wn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),gi([on({store:w.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),gi([on({store:w.name})],t.prototype,"uiLocale",void 0),t});var Da;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Da||(Da={}));var ka;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(ka||(ka={}));var Ma;(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"})(Ma||(Ma={}));var Ia;(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"})(Ia||(Ia={}));var $a;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})($a||($a={}));var Ua;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Ua||(Ua={}));var Ba;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ba||(Ba={}));var Fa;(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"})(Fa||(Fa={}));var Ha;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ha||(Ha={}));var Va;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Va||(Va={}));var za;(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"})(za||(za={}));var ja;(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"})(ja||(ja={}));var Wa;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Wa||(Wa={}));var Ka;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ka||(Ka={}));var Ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Ga||(Ga={}));var qa;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(qa||(qa={}));var Ya;(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"})(Ya||(Ya={}));var Xa;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Xa||(Xa={}));var Za;(function(e){e.ASC="ASC",e.DESC="DESC"})(Za||(Za={}));var Ja;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Ja||(Ja={}));var Qa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Qa||(Qa={}));var el;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(el||(el={}));var tl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(tl||(tl={}));var rl;(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"})(rl||(rl={}));var il;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(il||(il={}));var nl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(nl||(nl={}));var sl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(sl||(sl={}));var ol;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ol||(ol={}));var G;(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"})(G||(G={}));var ve;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ve||(ve={}));var al;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(al||(al={}));var ll;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ll||(ll={}));var cl;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(cl||(cl={}));var ul;(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"})(ul||(ul={}));var dl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(dl||(dl={}));var pl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(pl||(pl={}));var fl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(fl||(fl={}));var hl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(hl||(hl={}));var ml;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(ml||(ml={}));var gl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(gl||(gl={}));var yl;(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"})(yl||(yl={}));var xl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(xl||(xl={}));var qu={[G.PERSONAL_BOOK_SHARE_USER]:[G.PERSONAL_BOOK_USER],[G.HTML_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.PDF_EXPORT_USER]:[G.PERSONAL_BOOK_USER],[G.KHUB_ADMIN]:[G.CONTENT_PUBLISHER],[G.ADMIN]:[G.KHUB_ADMIN,G.USERS_ADMIN,G.PORTAL_ADMIN,G.BEHAVIOR_DATA_USER],[G.GENERATIVE_AI_EXPORT_USER]:[G.GENERATIVE_AI_USER]};function vl(e,t){return e===t||(qu[e]??[]).some(r=>vl(r,t))}function Tn(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(i=>vl(i,t))}function bl(e,...t){return e==null?!1:t.some(r=>Tn(e,r))}var Si=f(A());var On=f(A());var St=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=w.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var zt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:St.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):St.await()}};var me=class extends zt{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(s,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new On.CacheRegistry,this.cache=t?n.commonCache:new On.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var yi=class extends me{async listMySearches(){let{session:t}=w.getState();return Tn(t,G.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var xi=class extends me{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var vi=class extends me{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=w.getState().session;return!!t?.sessionAuthenticated}};var bi=class extends me{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=w.getState().session;return!!t?.sessionAuthenticated}};var Yu="ft-user-assets",Xu={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(ve).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:i,asset:n}=t.payload;Pn(e,r,[...Rn(e,r),n]),Sl(e,r,1,i),El(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;Pn(e,r,Rn(e,r).map(n=>n.id===i.id?i:n)),El(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;Pn(e,r,Rn(e,r).filter(s=>s.id!==n)),Sl(e,r,-1,i)}},Al={[ve.SEARCHES]:"savedSearches",[ve.BOOKMARKS]:"bookmarks",[ve.BOOKS]:void 0,[ve.COLLECTIONS]:void 0},Rn=(e,t)=>{var r;let i=Al[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},Pn=(e,t,r)=>{let i=Al[t];i&&(e[i]=r)},Sl=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===ve.BOOKMARKS&&i)){let s=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,s+r)}},El=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},se=Si.FtReduxStore.get({name:Yu,reducers:Xu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ve).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ln=class{constructor(t=new vi,r=new bi){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new xi,this.savedSearchesService=new yi,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,Si.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(),se.actions.clearAssetCount(),se.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),se.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),se.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();se.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();se.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&se.getState().assetCounts.allAsset[t]!==r.count&&se.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&se.getState().assetCounts.bookmarkByMap[t]!==r.count&&se.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(se.getState().assetCounts.bookmarkByMap).length!==0;t===ve.BOOKMARKS&&r&&se.actions.clearBookmarkCountByMap(),se.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;se.actions.bookmarks(r)}}},Zu=new Ln;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Zu);var Nn=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Nn;var be=f(A());var _l,jt=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Ju=Symbol("clearAfterUnitTest"),Ei=class extends(0,be.withEventBus)(me){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[_l]=()=>{this.defaultMessages={},this.cache=new be.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.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 i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,be.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let s=t.toLowerCase(),o=this.resolveContext(s);return new be.ParametrizedLabelResolver((n=this.defaultMessages[s])!==null&&n!==void 0?n:{},o).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof be.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.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(i=>(0,be.delay)(0).then(()=>i()).catch(()=>null)))}};_l=Ju;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ei{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ei{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Sr=window.FluidTopicsI18nService,Dn=window.FluidTopicsCustomI18nService;var Cl=f(A()),kn=class{highlightHtml(t,r,i){(0,Cl.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new kn;var wl=f(A());var Mn=class{isDate(t){var r,i,n,s;return(s=(i=((n=(r=w.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&&s!==void 0?s:!1}format(t,r){var i,n,s,o;if(t==null)return"";try{return wl.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Mn;var Tl=f(A());var Er=class{static get(t,r){var i,n,s,o;let a=w.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Tl.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var In=class{urlToSearchRequest(t){return Er.get().parse(t)}searchRequestToUrl(t){return Er.get().serialize(t)}};window.FluidTopicsUrlService=new In;var We=f(A());var Et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Et.eventName="before-location-change";var At=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};At.eventName="change";var $n=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))}},Ol=new $n;var Ai=class e extends We.WithEventBus{static build(){return new e(window.history,Ol,()=>window.location,!1)}constructor(t,r,i,n){var s,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(s=t.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,We.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new At(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[s,o,a])=>{let l=new Et(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,...s,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,o,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 i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(t){this.addEventListener(Et.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Et.eventName,t)}addHistoryChangeListener(t){this.addEventListener(At.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(At.eventName,t)}currentItem(){return(0,We.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,We.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,We.deepCopy)(r.find(i=>t(i)))}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,We.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 i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,s=t+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,i);)this.hasState(s)&&(n=s),s++;return n}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 i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,s=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return s==null||s!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ai.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 Rl=f(V());var Pl=Rl.css`
|
|
632
632
|
`;var Dl=f(V()),oe=f(J()),wt=f(A());var _t=f(A());function Ll(e,t){let{authenticationRequired:r,session:i}=w.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var _i=class extends zt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Un=class e extends _t.FtStateManager{static build(t){return new e(w,t)}constructor(t,r){super(),this.store=t,this.cache=new _t.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new _i,this.cleanSessionDebouncer=new _t.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new _t.Debouncer(500),this.apiProvider=r??(()=>St.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(bt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(bt.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",()=>Ll(()=>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(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new br(i)))}).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 bl(w.getState().session,...t)}},Nl=Un.build();var Ct=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Ar=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:i}=r;for(let{elementRef:n,callbackRef:s}of i){let o=n.deref(),a=s.deref();o===void 0||a===void 0||o.dispatchEvent(new Ct(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let s=n.callbacks.get(r);s===void 0&&n.callbacks.set(r,s=new WeakSet),s.has(i)||(s.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}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,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},H=class extends wt.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=Nl,this.contextRoot=new Ar}render(){return Dl.html`
|
|
633
633
|
<slot></slot>
|
|
634
634
|
`}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(i=>Sr.addContext(i)),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())}};H.elementDefinitions={};H.styles=Pl;Z([(0,oe.property)()],H.prototype,"baseUrl",void 0);Z([(0,oe.property)()],H.prototype,"tenantId",void 0);Z([(0,oe.property)()],H.prototype,"apiIntegrationIdentifier",void 0);Z([(0,oe.property)()],H.prototype,"apiIntegrationAppVersion",void 0);Z([(0,oe.property)()],H.prototype,"uiLocale",void 0);Z([(0,wt.jsonProperty)(null)],H.prototype,"availableUiLocales",void 0);Z([(0,wt.jsonProperty)(null)],H.prototype,"metadataConfiguration",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"editorMode",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"noCustom",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"openExternalDocumentInNewTab",void 0);Z([(0,oe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],H.prototype,"noCustomComponent",void 0);Z([(0,oe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],H.prototype,"noCustomCode",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"withManualResources",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"navigatorOnline",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"forcedOffline",void 0);Z([(0,oe.property)({type:Boolean})],H.prototype,"authenticationRequired",void 0);Z([(0,wt.jsonProperty)([])],H.prototype,"messageContexts",void 0);Z([(0,wt.jsonProperty)(void 0)],H.prototype,"session",void 0);var Ml=f(A());var kl={"ft-app-context":H};(0,Ml.customElements)(kl);var Il=f(J());var Bn=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Wt=new Bn;var td=function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s},Cr=Symbol("i18nAttributes"),$l=Symbol("i18nListAttributes"),Ul=Symbol("i18nProperties"),Ci=Symbol("i18nContexts"),_r=Symbol("i18nUnsubs"),Bl=(0,Kt.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?Dn:Sr}i18n(s){let{context:o,key:a,message:l}=s,{custom:c,args:u,argsProvider:d}=s;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(o,a,...p)}return l}async awaitI18n(s){let{context:o,custom:a}=s;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(s)}customI18n(s,o){if(Wt.isI18nKey(s)){let[a,l]=s.split(".");return this.i18n({custom:!0,context:a,key:l,...o})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((o,a,l)=>s.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((o,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===s}),this.updateI18nProperties(o=>o.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var o,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&s(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[Cr])===null||o===void 0||o.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[$l])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(g=>c(u,d,g))})}updateI18nProperties(s){var o;(o=this[Ul])===null||o===void 0||o.forEach((a,l)=>{s(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(s,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,o,a)}addI18nContext(s,o,a){let l=(typeof s=="string"?s:s.name).toLowerCase();a=typeof s=="string"?a:s.custom,this[Ci].set(l,{isCustomContext:a}),this[_r].has(l)||this[_r].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,o)}hasI18nContext(s){return this[Ci].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ci].forEach((s,o)=>this.addI18nContext(o,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[_r].forEach(s=>s()),this[_r].clear()}}return t=Ci,r=_r,td([(0,Il.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),wi=class extends Bl(Kt.FtLitElement){},Ti=class extends Bl(Kt.FtLitElementRedux){};var Fl=f(A());var Fn=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?Wt.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},rd=new Fn;var Hl=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Fl.hasChanged,converter:Wt,...t}),r[Cr]=(n=r[Cr])!==null&&n!==void 0?n:new Map,r[Cr].set(i,e??{})};var Vl=f(V());var zl=Vl.css`
|