@fluid-topics/ft-search-type 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-search-type.light.js +1 -1
- package/build/ft-search-type.min.js +145 -145
- package/package.json +3 -3
|
@@ -602,7 +602,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
602
602
|
position: relative;
|
|
603
603
|
word-break: break-word;
|
|
604
604
|
}
|
|
605
|
-
`;var Ql=["top","right","bottom","left"],Xl=["start","end"],Ai=Ql.reduce((e,t)=>e.concat(t,t+"-"+Xl[0],t+"-"+Xl[1]),[]),Ko=Math.min,rr=Math.max,qo=Math.round;var xt=e=>({x:e,y:e}),uu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e,t,r){return rr(e,Ko(t,r))}function Un(e,t){return typeof e=="function"?e(t):e}function fo(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function wi(e){return e==="x"?"y":"x"}function _i(e){return e==="y"?"height":"width"}function Hn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ni(e){return wi(Hn(e))}function Jl(e,t,r){r===void 0&&(r=!1);let n=or(e),a=Ni(e),i=_i(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Li(s)),[s,Li(s)]}function e1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Li(e){let t=fo(e);return uu[t]+e.slice(t.length)}function pu(e){return{top:0,right:0,bottom:0,left:0,...e}}function t1(e){return typeof e!="number"?pu(e):{top:e,right:e,bottom:e,left:e}}function _r(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function r1(e,t,r){let{reference:n,floating:a}=e,i=Hn(t),s=Ni(t),l=_i(s),f=fo(t),u=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,S;switch(f){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:g};break;case"left":S={x:n.x-a.width,y:g};break;default:S={x:n.x,y:n.y}}switch(or(t)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function o1(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=Un(t,e),C=t1(S),N=l[y?g==="floating"?"reference":"floating":g],M=_r(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(N)))==null||r?N:N.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),T=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),$=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},W=_r(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:D,strategy:f}):T);return{top:(M.top-W.top+C.top)/$.y,bottom:(W.bottom-M.bottom+C.bottom)/$.y,left:(M.left-W.left+C.left)/$.x,right:(W.right-M.right+C.right)/$.x}}var hu=50,n1=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:o1},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=r1(u,n,f),y=n,S=0,C={};for(let L=0;L<i.length;L++){let N=i[L];if(!N)continue;let{name:M,fn:T}=N,{x:D,y:$,data:W,reset:ne}=await T({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=D??m,g=$??g,C[M]={...C[M],...W},ne&&S<hu&&(S++,typeof ne=="object"&&(ne.placement&&(y=ne.placement),ne.rects&&(u=ne.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):ne.rects),{x:m,y:g}=r1(u,y,f)),L=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:C}};function mu(e,t,r){return(e?[...r.filter(a=>or(a)===e),...r.filter(a=>or(a)!==e)]:r.filter(a=>fo(a)===a)).filter(a=>e?or(a)===e||(t?e1(a)!==a:!1):!0)}var a1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Ai,autoAlignment:S=!0,...C}=Un(e,t),L=g!==void 0||y===Ai?mu(g||null,S,y):y,N=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,T=L[M];if(T==null)return{};let D=Jl(T,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==T)return{reset:{placement:L[0]}};let $=[N[fo(T)],N[D[0]],N[D[1]]],W=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:T,overflows:$}],ne=L[M+1];if(ne)return{data:{index:M+1,overflows:W},reset:{placement:ne}};let Fe=W.map(_e=>{let x=or(_e.placement);return[_e.placement,x&&m?_e.overflows.slice(0,2).reduce((E,H)=>E+H,0):_e.overflows[0],_e.overflows]}).sort((_e,x)=>_e[1]-x[1]),_t=((a=Fe.filter(_e=>_e[2].slice(0,or(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Fe[0][0];return _t!==l?{data:{index:M+1,overflows:W},reset:{placement:_t}}:{}}}};var i1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:T,y:D}=M;return{x:T,y:D}}},...u}=Un(e,t),m={x:r,y:n},g=await i.detectOverflow(t,u),y=Hn(fo(a)),S=wi(y),C=m[S],L=m[y];if(s){let M=S==="y"?"top":"left",T=S==="y"?"bottom":"right",D=C+g[M],$=C-g[T];C=Ri(D,C,$)}if(l){let M=y==="y"?"top":"left",T=y==="y"?"bottom":"right",D=L+g[M],$=L-g[T];L=Ri(D,L,$)}let N=f.fn({...t,[S]:C,[y]:L});return{...N,data:{x:N.x-r,y:N.y-n,enabled:{[S]:s,[y]:l}}}}}};function Gn(){return typeof window<"u"}function Tr(e){return c1(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(c1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function c1(e){return Gn()?e instanceof Node||e instanceof We(e).Node:!1}function at(e){return Gn()?e instanceof Element||e instanceof We(e).Element:!1}function Pt(e){return Gn()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function s1(e){return!Gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function uo(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function l1(e){return/^(table|td|th)$/.test(Tr(e))}function Zo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var gu=/transform|translate|scale|rotate|perspective|filter/,yu=/paint|layout|strict|content/,Nr=e=>!!e&&e!=="none",Ti;function Wn(e){let t=at(e)?it(e):e;return Nr(t.transform)||Nr(t.translate)||Nr(t.scale)||Nr(t.rotate)||Nr(t.perspective)||!Vn()&&(Nr(t.backdropFilter)||Nr(t.filter))||gu.test(t.willChange||"")||yu.test(t.contain||"")}function d1(e){let t=Wt(e);for(;Pt(t)&&!kr(t);){if(Wn(t))return t;if(Zo(t))return null;t=Wt(t)}return null}function Vn(){return Ti==null&&(Ti=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ti}function kr(e){return/^(html|body|#document)$/.test(Tr(e))}function it(e){return We(e).getComputedStyle(e)}function Yo(e){return at(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wt(e){if(Tr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||s1(e)&&e.host||Mt(e);return s1(t)?t.host:t}function f1(e){let t=Wt(e);return kr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&uo(t)?t:f1(t)}function Fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=f1(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=We(a);if(i){let l=jn(s);return t.concat(s,s.visualViewport||[],uo(a)?a:[],l&&r?Fn(l):[])}else return t.concat(a,Fn(a,[],r))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function m1(e){let t=it(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Pt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=qo(r)!==i||qo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function g1(e){return at(e)?e:e.contextElement}function po(e){let t=g1(e);if(!Pt(t))return xt(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=m1(t),s=(i?qo(r.width):r.width)/n,l=(i?qo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var bu=xt(0);function y1(e){let t=We(e);return!Vn()||!t.visualViewport?bu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==We(e)?!1:t}function Xo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=g1(e),s=xt(1);t&&(n?at(n)&&(s=po(n)):s=po(e));let l=vu(i,r,n)?y1(i):xt(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=We(i),S=n&&at(n)?We(n):n,C=y,L=jn(C);for(;L&&n&&S!==C;){let N=po(L),M=L.getBoundingClientRect(),T=it(L),D=M.left+(L.clientLeft+parseFloat(T.paddingLeft))*N.x,$=M.top+(L.clientTop+parseFloat(T.paddingTop))*N.y;f*=N.x,u*=N.y,m*=N.x,g*=N.y,f+=D,u+=$,C=We(L),L=jn(C)}}return _r({width:m,height:g,x:f,y:u})}function Kn(e,t){let r=Yo(e).scrollLeft;return t?t.left+r:Xo(Mt(e)).left+r}function b1(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Kn(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function xu(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Mt(n),l=t?Zo(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=xt(1),m=xt(0),g=Pt(n);if((g||!g&&!i)&&((Tr(n)!=="body"||uo(s))&&(f=Yo(n)),g)){let S=Xo(n);u=po(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let y=s&&!g&&!i?b1(s,f):xt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+m.x+y.x,y:r.y*u.y-f.scrollTop*u.y+m.y+y.y}}function Su(e){return Array.from(e.getClientRects())}function Cu(e){let t=Mt(e),r=Yo(e),n=e.ownerDocument.body,a=rr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=rr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Kn(e),l=-r.scrollTop;return it(n).direction==="rtl"&&(s+=rr(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var u1=25;function Ou(e,t){let r=We(e),n=Mt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Vn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=Kn(n);if(u<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-S);C<=u1&&(i-=C)}else u<=u1&&(i+=u);return{width:i,height:s,x:l,y:f}}function Eu(e,t){let r=Xo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Pt(e)?po(e):xt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,u=n*i.y;return{width:s,height:l,x:f,y:u}}function p1(e,t,r){let n;if(t==="viewport")n=Ou(e,r);else if(t==="document")n=Cu(Mt(e));else if(at(t))n=Eu(t,r);else{let a=y1(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return _r(n)}function v1(e,t){let r=Wt(e);return r===t||!at(r)||kr(r)?!1:it(r).position==="fixed"||v1(r,t)}function Lu(e,t){let r=t.get(e);if(r)return r;let n=Fn(e,[],!1).filter(l=>at(l)&&Tr(l)!=="body"),a=null,i=it(e).position==="fixed",s=i?Wt(e):e;for(;at(s)&&!kr(s);){let l=it(s),f=Wn(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||uo(s)&&!f&&v1(e,s))?n=n.filter(m=>m!==s):a=l,s=Wt(s)}return t.set(e,n),n}function Au(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?Zo(t)?[]:Lu(t,this._c):[].concat(r),n],l=p1(t,s[0],a),f=l.top,u=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let S=p1(t,s[y],a);f=rr(S.top,f),u=Ko(S.right,u),m=Ko(S.bottom,m),g=rr(S.left,g)}return{width:u-g,height:m-f,x:g,y:f}}function Ru(e){let{width:t,height:r}=m1(e);return{width:t,height:r}}function wu(e,t,r){let n=Pt(t),a=Mt(t),i=r==="fixed",s=Xo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=xt(0);function u(){f.x=Kn(a)}if(n||!n&&!i)if((Tr(t)!=="body"||uo(a))&&(l=Yo(t)),n){let S=Xo(t,!0,i,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else a&&u();i&&!n&&a&&u();let m=a&&!n&&!i?b1(a,l):xt(0),g=s.left+l.scrollLeft-f.x-m.x,y=s.top+l.scrollTop-f.y-m.y;return{x:g,y,width:s.width,height:s.height}}function ki(e){return it(e).position==="static"}function h1(e,t){if(!Pt(e)||it(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Mt(e)===r&&(r=r.ownerDocument.body),r}function x1(e,t){let r=We(e);if(Zo(e))return r;if(!Pt(e)){let a=Wt(e);for(;a&&!kr(a);){if(at(a)&&!ki(a))return a;a=Wt(a)}return r}let n=h1(e,t);for(;n&&l1(n)&&ki(n);)n=h1(n,t);return n&&kr(n)&&ki(n)&&!Wn(n)?r:n||d1(e)||r}var _u=async function(e){let t=this.getOffsetParent||x1,r=this.getDimensions,n=await r(e.floating);return{reference:wu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nu(e){return it(e).direction==="rtl"}var qn={convertOffsetParentRelativeRectToViewportRelativeRect:xu,getDocumentElement:Mt,getClippingRect:Au,getOffsetParent:x1,getElementRects:_u,getClientRects:Su,getDimensions:Ru,getScale:po,isElement:at,isRTL:Nu};var S1=a1,C1=i1;var O1=(e,t,r)=>{let n=new Map,a={platform:qn,...r},i={...a.platform,_c:n};return n1(e,t,{...a,platform:i})};function E1(e){return Tu(e)}function Mi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Tu(e){for(let t=e;t;t=Mi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Mi(e);t;t=Mi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||t.tagName==="BODY"))return t}return null}async function L1(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},O1(e,t,{strategy:n.strategy,platform:{...qn,getOffsetParent:a=>qn.getOffsetParent(a,E1)},middleware:[C1({crossAxis:!0}),S1({allowedPlacements:[n.placement]})]})}var Lo=v(w());var ns=v(K());function ku(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Zn(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Zn(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!Zn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Zn(e,t){try{return ku(e,t)}catch{return!1}}function Qo(e,t){return!Zn(e,t)}function A1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Yn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var R1=v(K(),1);var Pi=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Qo,attribute:!1,...t};(0,R1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:l=>l[n],store:t.store})}};var Xn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Mr=v(K(),1);var w1=v(K(),1);function _1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,w1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Qo,...t??{}})}var Qn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var T1=v(U(),1);var Jn=globalThis,Mu=Jn.ShadowRoot&&(Jn.ShadyCSS===void 0||Jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mx=Symbol();var N1=(e,t)=>{if(Mu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Jn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var ea=class extends T1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return N1(n,t.elementStyles),n}};function k1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var mo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},I1,M1=Symbol("constructorPrototype"),P1=Symbol("constructorName"),D1=Symbol("exportpartsDebouncer"),z1=Symbol("dynamicDependenciesLoaded"),ho=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ho.eventName="exportparts-updated";var zt=class extends ea{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[I1]=new Qn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[D1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[P1]=this.constructor.name,this[M1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[P1]&&Object.setPrototypeOf(this,this[M1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[z1]||(r[z1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ho.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ho.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 ho)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=k1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(N=>N.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(N=>N.trim());for(let N of L)m.add(N)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};I1=D1;mo([(0,Mr.property)()],zt.prototype,"exportpartsPrefix",void 0);mo([_1([])],zt.prototype,"exportpartsPrefixes",void 0);mo([(0,Mr.property)({reflect:!0})],zt.prototype,"exportparts",void 0);mo([(0,Mr.property)()],zt.prototype,"customStylesheet",void 0);mo([(0,Mr.property)()],zt.prototype,"elementToFocus",void 0);mo([(0,Mr.state)()],zt.prototype,"useAdoptedStyleSheets",void 0);function ta(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Jo=Symbol("internalReduxEventsUnsubscribers"),nr=Symbol("internalStoresUnsubscribers"),Pr=Symbol("internalStores"),Pu=Yn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Pr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Pr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Pr].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Pr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Pr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Pr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let u=this.getStore(s.store);u&&(s.store?this[nr].has(s.store):this[nr].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[nr].set(s,l.subscribe(()=>this.updateFromStores())),this[Jo].set(s,[]),ta(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[m](y);l.addEventListener(u.eventName,g),this[Jo].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[nr].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[nr].has(s)&&this[nr].get(s)(),this[nr].delete(s),(l=this[Jo].get(s))===null||l===void 0||l.forEach(f=>f()),this[Jo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nr,r=Pr,n=Jo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),B1=class extends Pu(zt){};function st(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Vt(e){return!!e&&!!e[ie]}function St(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Fu}(e)||Array.isArray(e)||!!e[V1]||!!(!((t=e.constructor)===null||t===void 0)&&t[V1])||Gi(e)||Wi(e))}function zr(e,t,r){r===void 0&&(r=!1),bo(e)===0?(r?Object.keys:yo)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function bo(e){var t=e[ie];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Gi(e)?2:Wi(e)?3:0}function go(e,t){return bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zu(e,t){return bo(e)===2?e.get(t):e[t]}function j1(e,t,r){var n=bo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function K1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gi(e){return Uu&&e instanceof Map}function Wi(e){return Hu&&e instanceof Set}function ar(e){return e.o||e.t}function Vi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y1(e);delete t[ie];for(var r=yo(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ji(e,t){return t===void 0&&(t=!1),Ki(e)||Vt(e)||!St(e)||(bo(e)>1&&(e.set=e.add=e.clear=e.delete=Iu),Object.freeze(e),t&&zr(e,function(r,n){return ji(n,!0)},!0)),e}function Iu(){st(2)}function Ki(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function It(e){var t=Fi[e];return t||st(18,e),t}function Du(e,t){Fi[e]||(Fi[e]=t)}function $i(){return tn}function zi(e,t){t&&(It("Patches"),e.u=[],e.s=[],e.v=t)}function ra(e){Ui(e),e.p.forEach(Bu),e.p=null}function Ui(e){e===tn&&(tn=e.l)}function $1(e){return tn={p:[],l:tn,h:e,m:!0,_:0}}function Bu(e){var t=e[ie];t.i===0||t.i===1?t.j():t.g=!0}function Ii(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||It("ES5").S(t,e,n),n?(r[ie].P&&(ra(t),st(4)),St(e)&&(e=oa(t,e),t.l||na(t,e)),t.u&&It("Patches").M(r[ie].t,e,t.u,t.s)):e=oa(t,r,[]),ra(t),t.u&&t.v(t.u,t.s),e!==Z1?e:void 0}function oa(e,t,r){if(Ki(t))return t;var n=t[ie];if(!n)return zr(t,function(l,f){return U1(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return na(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),zr(i,function(l,f){return U1(e,n,a,l,f,r,s)}),na(e,a,!1),r&&e.u&&It("Patches").N(n,r,e.u,e.s)}return n.o}function U1(e,t,r,n,a,i,s){if(Vt(a)){var l=oa(e,a,i&&t&&t.i!==3&&!go(t.R,n)?i.concat(n):void 0);if(j1(r,n,l),!Vt(l))return;e.m=!1}else s&&r.add(a);if(St(a)&&!Ki(a)){if(!e.h.D&&e._<1)return;oa(e,a),t&&t.A.l||na(e,a)}}function na(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ji(t,r)}function Di(e,t){var r=e[ie];return(r?ar(r):e)[t]}function H1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function ir(e){e.P||(e.P=!0,e.l&&ir(e.l))}function Bi(e){e.o||(e.o=Vi(e.t))}function Hi(e,t,r){var n=Gi(t)?It("MapSet").F(t,r):Wi(t)?It("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:$i(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=rn;s&&(f=[l],u=en);var m=Proxy.revocable(f,u),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y}(t,r):It("ES5").J(t,r);return(r?r.A:$i()).p.push(n),n}function $u(e){return Vt(e)||st(22,e),function t(r){if(!St(r))return r;var n,a=r[ie],i=bo(r);if(a){if(!a.P&&(a.i<4||!It("ES5").K(a)))return a.t;a.I=!0,n=F1(r,i),a.I=!1}else n=F1(r,i);return zr(n,function(s,l){a&&zu(a.t,s)===l||j1(n,s,t(l))}),i===3?new Set(n):n}(e)}function F1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Vi(e)}function q1(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[ie];return rn.get(u,s)},set:function(u){var m=this[ie];rn.set(m,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][ie];if(!f.P)switch(f.i){case 5:n(f)&&ir(f);break;case 4:r(f)&&ir(f)}}}function r(s){for(var l=s.t,f=s.k,u=yo(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==ie){var y=l[g];if(y===void 0&&!go(l,g))return!0;var S=f[g],C=S&&S[ie];if(C?C.t!==y:!K1(S,y))return!0}}var L=!!l[ie];return u.length!==yo(l).length+(L?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&st(3,JSON.stringify(ar(s)))}var i={};Du("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=Y1(y);delete L[ie];for(var N=yo(L),M=0;M<N.length;M++){var T=N[M];L[T]=e(T,g||!!L[T].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),m={i:f?5:4,A:l?l.A:$i(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ie,{value:m,writable:!0}),u},S:function(s,l,f){f?Vt(l)&&l[ie].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[ie];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)zr(S,function($){$!==ie&&(y[$]!==void 0||go(y,$)?C[$]||u(S[$]):(C[$]=!0,ir(g)))}),zr(y,function($){S[$]!==void 0||go(S,$)||(C[$]=!1,ir(g))});else if(L===5){if(n(g)&&(ir(g),C.length=!0),S.length<y.length)for(var N=S.length;N<y.length;N++)C[N]=!1;else for(var M=y.length;M<S.length;M++)C[M]=!0;for(var T=Math.min(S.length,y.length),D=0;D<T;D++)S.hasOwnProperty(D)||(C[D]=!0),C[D]===void 0&&u(S[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var G1,tn,qi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Uu=typeof Map<"u",Hu=typeof Set<"u",W1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Z1=qi?Symbol.for("immer-nothing"):((G1={})["immer-nothing"]=!0,G1),V1=qi?Symbol.for("immer-draftable"):"__$immer_draftable",ie=qi?Symbol.for("immer-state"):"__$immer_state";var Fu=""+Object.prototype.constructor,yo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Y1=Object.getOwnPropertyDescriptors||function(e){var t={};return yo(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Fi={},rn={get:function(e,t){if(t===ie)return e;var r=ar(e);if(!go(r,t))return function(a,i,s){var l,f=H1(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!St(n)?n:n===Di(e.t,t)?(Bi(e),e.o[t]=Hi(e.A.h,n,e)):n},has:function(e,t){return t in ar(e)},ownKeys:function(e){return Reflect.ownKeys(ar(e))},set:function(e,t,r){var n=H1(ar(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Di(ar(e),t),i=a?.[ie];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(K1(r,a)&&(r!==void 0||go(e.t,t)))return!0;Bi(e),ir(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Di(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bi(e),ir(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ar(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){st(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){st(12)}},en={};zr(rn,function(e,t){en[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),en.deleteProperty=function(e,t){return en.set.call(this,e,t,void 0)},en.set=function(e,t,r){return rn.set.call(this,e[0],t,r,e[0])};var Gu=function(){function e(r){var n=this;this.O=W1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(L){var N=this;L===void 0&&(L=l);for(var M=arguments.length,T=Array(M>1?M-1:0),D=1;D<M;D++)T[D-1]=arguments[D];return f.produce(L,function($){var W;return(W=i).call.apply(W,[N,$].concat(T))})}}var u;if(typeof i!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),St(a)){var m=$1(n),g=Hi(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?ra(m):Ui(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return zi(m,s),Ii(L,m)},function(L){throw ra(m),L}):(zi(m,s),Ii(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Z1&&(u=void 0),n.D&&ji(u,!0),s){var S=[],C=[];It("Patches").M(a,u,S,C),s(S,C)}return u}st(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,l,f=n.produce(a,i,function(u,m){s=u,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){St(r)||st(8),Vt(r)&&(r=$u(r));var n=$1(this),a=Hi(this,r,void 0);return a[ie].C=!0,Ui(n),a},t.finishDraft=function(r,n){var a=r&&r[ie],i=a.A;return zi(i,n),Ii(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!W1&&st(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=It("Patches").$;return Vt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ze=new Gu,Wu=Ze.produce,Nx=Ze.produceWithPatches.bind(Ze),Tx=Ze.setAutoFreeze.bind(Ze),kx=Ze.setUseProxies.bind(Ze),Mx=Ze.applyPatches.bind(Ze),Px=Ze.createDraft.bind(Ze),zx=Ze.finishDraft.bind(Ze),aa=Wu;function Ir(e){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(e)}function X1(e,t){if(Ir(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q1(e){var t=X1(e,"string");return Ir(t)=="symbol"?t:t+""}function J1(e,t,r){return(t=Q1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e2(Object(r),!0).forEach(function(n){J1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(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 t2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yi=function(){return Math.random().toString(36).substring(7).split("").join(".")},ia={INIT:"@@redux/INIT"+Yi(),REPLACE:"@@redux/REPLACE"+Yi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yi()}};function Vu(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xi(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Be(1));return r(Xi)(e,t)}if(typeof e!="function")throw new Error(Be(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(Be(3));return i}function g(L){if(typeof L!="function")throw new Error(Be(4));if(f)throw new Error(Be(5));var N=!0;return u(),l.push(L),function(){if(N){if(f)throw new Error(Be(6));N=!1,u();var T=l.indexOf(L);l.splice(T,1),s=null}}}function y(L){if(!Vu(L))throw new Error(Be(7));if(typeof L.type>"u")throw new Error(Be(8));if(f)throw new Error(Be(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var N=s=l,M=0;M<N.length;M++){var T=N[M];T()}return L}function S(L){if(typeof L!="function")throw new Error(Be(10));a=L,y({type:ia.REPLACE})}function C(){var L,N=g;return L={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(Be(11));function D(){T.next&&T.next(m())}D();var $=N(D);return{unsubscribe:$}}},L[t2]=function(){return this},L}return y({type:ia.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:S},n[t2]=C,n}function ju(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:ia.INIT});if(typeof n>"u")throw new Error(Be(12));if(typeof r(void 0,{type:ia.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function r2(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,l;try{ju(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],N=r[L],M=u[L],T=N(M,m);if(typeof T>"u"){var D=m&&m.type;throw new Error(Be(14))}S[L]=T,y=y||T!==M}return y=y||i.length!==Object.keys(u).length,y?S:u}}function vo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function o2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Be(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=vo.apply(void 0,l)(a.dispatch),Zi(Zi({},a),{},{dispatch:i})}}}function n2(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var a2=n2();a2.withExtraArgument=n2;var Qi=a2;var d2=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ku=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},xo=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},qu=Object.defineProperty,Zu=Object.defineProperties,Yu=Object.getOwnPropertyDescriptors,i2=Object.getOwnPropertySymbols,Xu=Object.prototype.hasOwnProperty,Qu=Object.prototype.propertyIsEnumerable,s2=function(e,t,r){return t in e?qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},sr=function(e,t){for(var r in t||(t={}))Xu.call(t,r)&&s2(e,r,t[r]);if(i2)for(var n=0,a=i2(t);n<a.length;n++){var r=a[n];Qu.call(t,r)&&s2(e,r,t[r])}return e},Ji=function(e,t){return Zu(e,Yu(t))},Ju=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(e,t)).next())})};var ep=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vo:vo.apply(null,arguments)},Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function tp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var rp=function(e){d2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,xo([void 0],r[0].concat(this)))):new(t.bind.apply(t,xo([void 0],r.concat(this))))},t}(Array),op=function(e){d2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,xo([void 0],r[0].concat(this)))):new(t.bind.apply(t,xo([void 0],r.concat(this))))},t}(Array);function rs(e){return St(e)?aa(e,function(){}):e}function np(e){return typeof e=="boolean"}function ap(){return function(t){return ip(t)}}function ip(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=new rp;if(r&&(np(r)?l.push(Qi):l.push(Qi.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var es=!0;function f2(e){var t=ap(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(tp(a))S=r2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!es&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!es&&C.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=o2.apply(void 0,C),N=vo;f&&(N=ep(sr({trace:!es},typeof f=="object"&&f)));var M=new op(L),T=M;Array.isArray(y)?T=xo([L],y):typeof y=="function"&&(T=y(M));var D=N.apply(void 0,T);return Xi(S,m,D)}function cr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return sr(sr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function u2(e){var t={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function sp(e){return typeof e=="function"}function cp(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?u2(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(sp(e))f=function(){return rs(e())};else{var u=rs(e);f=function(){return u}}function m(g,y){g===void 0&&(g=f());var S=xo([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[l]),S.reduce(function(C,L){if(L)if(Vt(C)){var N=C,M=L(N,y);return M===void 0?C:M}else{if(St(C))return aa(C,function(T){return L(T,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function lp(e,t){return e+"/"+t}function p2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:rs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=lp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[y]=S,l[m]=C?cr(y,C):cr(y)});function f(){var m=typeof e.extraReducers=="function"?u2(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,L=m[2],N=L===void 0?void 0:L,M=sr(sr({},y),s);return cp(r,function(T){for(var D in M)T.addCase(D,M[D]);for(var $=0,W=C;$<W.length;$++){var ne=W[$];T.addMatcher(ne.matcher,ne.reducer)}N&&T.addDefaultCase(N)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var dp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",fp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=dp[Math.random()*64|0];return t},up=["name","message","stack","code"],ts=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),c2=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),pp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=up;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},oS=function(){function e(t,r,n){var a=cr(t+"/fulfilled",function(m,g,y,S){return{payload:m,meta:Ji(sr({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=cr(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ji(sr({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=cr(t+"/rejected",function(m,g,y,S,C){return{payload:S,error:(n&&n.serializeError||pp)(m||"Rejected"),meta:Ji(sr({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,y,S){var C=n?.idGenerator?n.idGenerator(m):fp(),L=new f,N,M=!1;function T($){N=$,L.abort()}var D=function(){return Ju(this,null,function(){var $,W,ne,Fe,we,_t,_e;return Ku(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Fe=($=n?.condition)==null?void 0:$.call(n,m,{getState:y,extra:S}),mp(Fe)?[4,Fe]:[3,2];case 1:Fe=x.sent(),x.label=2;case 2:if(Fe===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,we=new Promise(function(E,H){return L.signal.addEventListener("abort",function(){return H({name:"AbortError",message:N||"Aborted"})})}),g(i(C,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:C,arg:m},{getState:y,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:T,rejectWithValue:function(E,H){return new ts(E,H)},fulfillWithValue:function(E,H){return new c2(E,H)}})).then(function(E){if(E instanceof ts)throw E;return E instanceof c2?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return ne=x.sent(),[3,5];case 4:return _t=x.sent(),ne=_t instanceof ts?s(null,C,m,_t.payload,_t.meta):s(_t,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(ne)&&ne.meta.condition,_e||g(ne),[2,ne]}})})}();return Object.assign(D,{abort:T,requestId:C,arg:m,unwrap:function(){return D.then(hp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function hp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var h2="listener",m2="completed",g2="cancelled",nS="task-"+g2,aS="task-"+m2,iS=h2+"-"+g2,sS=h2+"-"+m2;var os="listenerMiddleware";var cS=cr(os+"/add"),lS=cr(os+"/removeAll"),dS=cr(os+"/remove");var l2,fS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(l2||(l2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},gp=function(e){return function(t){setTimeout(t,e)}},uS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gp(10);q1();var yp=Yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),sa=class extends yp(Object){};window.ftReduxStores||(window.ftReduxStores={});var y2=class e extends sa{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(ta(i))return i;if(a==null)return;let s=p2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=f2({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=A1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Xn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ca=class{static format(t,r,n,a){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(t,r,n,a)}static getMomentDateFormat(t,r){return t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a){let i=typeof t=="string"?new Date(t):t,s=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var la=v(w()),bp="ft-app-info",Dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Dr.eventName="authentication-change";var vp={session:(e,t)=>{(0,la.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new Dr(t.payload)),0))}},I=la.FtReduxStore.get({name:bp,reducers:vp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var b2=v(w()),da=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},US=(0,b2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>ca.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return da([(0,ns.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),da([(0,ns.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),da([Pi({store:I.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),da([Pi({store:I.name})],t.prototype,"uiLocale",void 0),t});var Sp=v(x2(),1);var S2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(S2||(S2={}));var C2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(C2||(C2={}));var O2;(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"})(O2||(O2={}));var E2;(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"})(E2||(E2={}));var L2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(L2||(L2={}));var A2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(A2||(A2={}));var R2;(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__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",e.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",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__DISPLAY="TOPIC__DISPLAY",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"})(R2||(R2={}));var w2;(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"})(w2||(w2={}));var _2;(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"})(_2||(_2={}));var N2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(N2||(N2={}));var T2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(T2||(T2={}));var k2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(k2||(k2={}));var M2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(M2||(M2={}));var P2;(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"})(P2||(P2={}));var Br;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Br||(Br={}));var z2;(function(e){e.ASC="ASC",e.DESC="DESC"})(z2||(z2={}));var I2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(I2||(I2={}));var pa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(pa||(pa={}));var D2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(D2||(D2={}));var B2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(B2||(B2={}));var $2;(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"})($2||($2={}));var U2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(U2||(U2={}));var H2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(H2||(H2={}));var ha;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ha||(ha={}));var F2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(F2||(F2={}));var ge;(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"})(ge||(ge={}));var ct;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ct||(ct={}));var G2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(G2||(G2={}));var W2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(W2||(W2={}));var V2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(V2||(V2={}));var j2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(j2||(j2={}));var K2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(K2||(K2={}));var q2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(q2||(q2={}));var Z2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Z2||(Z2={}));var Y2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Y2||(Y2={}));var X2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(X2||(X2={}));var xp={[ge.PERSONAL_BOOK_SHARE_USER]:[ge.PERSONAL_BOOK_USER],[ge.HTML_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.PDF_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.KHUB_ADMIN]:[ge.CONTENT_PUBLISHER],[ge.ADMIN]:[ge.KHUB_ADMIN,ge.USERS_ADMIN,ge.PORTAL_ADMIN,ge.BEHAVIOR_DATA_USER],[ge.GENERATIVE_AI_EXPORT_USER]:[ge.GENERATIVE_AI_USER]};function Q2(e,t){return e===t||(xp[e]??[]).some(r=>Q2(r,t))}function J2(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Q2(n,t))}var xa=v(w());var as=v(w());var $r=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var ma=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:$r.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$r.await()}};var Ve=class extends ma{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new as.CacheRegistry,this.cache=t?a.commonCache:new as.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ga=class extends Ve{async listMySearches(){let{session:t}=I.getState();return J2(t,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var ya=class extends Ve{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ba=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var va=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var Cp="ft-user-assets",Op={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(ct).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;ss(e,r,[...is(e,r),a]),ed(e,r,1,n),td(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ss(e,r,is(e,r).map(a=>a.id===n.id?n:a)),td(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;ss(e,r,is(e,r).filter(i=>i.id!==a)),ed(e,r,-1,n)}},rd={[ct.SEARCHES]:"savedSearches",[ct.BOOKMARKS]:"bookmarks",[ct.BOOKS]:void 0,[ct.COLLECTIONS]:void 0},is=(e,t)=>{var r;let n=rd[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ss=(e,t,r)=>{let n=rd[t];n&&(e[n]=r)},ed=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===ct.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},td=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Ye=xa.FtReduxStore.get({name:Cp,reducers:Op,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ct).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),cs=class{constructor(t=new ba,r=new va){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ya,this.savedSearchesService=new ga,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,xa.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(),Ye.actions.clearAssetCount(),Ye.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ye.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ye.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ye.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ye.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ye.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ye.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ye.getState().assetCounts.bookmarkByMap).length!==0;t===ct.BOOKMARKS&&r&&Ye.actions.clearBookmarkCountByMap(),Ye.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;Ye.actions.bookmarks(r)}}},Ep=new cs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ep);var ls=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ls;var lt=v(w());var od,Co=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Lp=Symbol("clearAfterUnitTest"),Sa=class extends(0,lt.withEventBus)(Ve){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[od]=()=>{this.defaultMessages={},this.cache=new lt.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,lt.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new lt.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof lt.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Co({loadedContexts:t})),this.dispatchEvent(new Co({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Co({loadedContexts:[t]})),this.dispatchEvent(new Co({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,lt.delay)(0).then(()=>n()).catch(()=>null)))}};od=Lp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Sa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Sa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Oo=window.FluidTopicsI18nService,Ca=window.FluidTopicsCustomI18nService;var nd=v(w()),ds=class{highlightHtml(t,r,n){(0,nd.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ds;var ad=v(w());var fs=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i;if(t==null)return"";try{return ad.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(t)} is not valid`,s),s}}};window.FluidTopicsDateService=new fs;var id=v(w());var on=class{static get(t,r){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new id.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var us=class{urlToSearchRequest(t){return on.get().parse(t)}searchRequestToUrl(t){return on.get().serialize(t)}};window.FluidTopicsUrlService=new us;var dr=v(w());var Ur=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ur.eventName="change";var ps=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))}},sd=new ps;var Oa=class e extends dr.WithEventBus{static build(){return new e(window.history,sd,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,dr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ur(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ur.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ur.eventName,t)}currentItem(){return(0,dr.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,dr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,dr.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Oa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var cd=v(U());var ld=cd.css`
|
|
605
|
+
`;var Ql=["top","right","bottom","left"],Xl=["start","end"],Ai=Ql.reduce((e,t)=>e.concat(t,t+"-"+Xl[0],t+"-"+Xl[1]),[]),Ko=Math.min,rr=Math.max,qo=Math.round;var xt=e=>({x:e,y:e}),uu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e,t,r){return rr(e,Ko(t,r))}function Un(e,t){return typeof e=="function"?e(t):e}function fo(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function wi(e){return e==="x"?"y":"x"}function _i(e){return e==="y"?"height":"width"}function Hn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ni(e){return wi(Hn(e))}function Jl(e,t,r){r===void 0&&(r=!1);let n=or(e),a=Ni(e),i=_i(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Li(s)),[s,Li(s)]}function e1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Li(e){let t=fo(e);return uu[t]+e.slice(t.length)}function pu(e){return{top:0,right:0,bottom:0,left:0,...e}}function t1(e){return typeof e!="number"?pu(e):{top:e,right:e,bottom:e,left:e}}function _r(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function r1(e,t,r){let{reference:n,floating:a}=e,i=Hn(t),s=Ni(t),l=_i(s),f=fo(t),u=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,S;switch(f){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:g};break;case"left":S={x:n.x-a.width,y:g};break;default:S={x:n.x,y:n.y}}switch(or(t)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function o1(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=Un(t,e),C=t1(S),N=l[y?g==="floating"?"reference":"floating":g],M=_r(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(N)))==null||r?N:N.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),T=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),$=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},W=_r(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:D,strategy:f}):T);return{top:(M.top-W.top+C.top)/$.y,bottom:(W.bottom-M.bottom+C.bottom)/$.y,left:(M.left-W.left+C.left)/$.x,right:(W.right-M.right+C.right)/$.x}}var hu=50,n1=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:o1},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=r1(u,n,f),y=n,S=0,C={};for(let L=0;L<i.length;L++){let N=i[L];if(!N)continue;let{name:M,fn:T}=N,{x:D,y:$,data:W,reset:ne}=await T({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=D??m,g=$??g,C[M]={...C[M],...W},ne&&S<hu&&(S++,typeof ne=="object"&&(ne.placement&&(y=ne.placement),ne.rects&&(u=ne.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):ne.rects),{x:m,y:g}=r1(u,y,f)),L=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:C}};function mu(e,t,r){return(e?[...r.filter(a=>or(a)===e),...r.filter(a=>or(a)!==e)]:r.filter(a=>fo(a)===a)).filter(a=>e?or(a)===e||(t?e1(a)!==a:!1):!0)}var a1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Ai,autoAlignment:S=!0,...C}=Un(e,t),L=g!==void 0||y===Ai?mu(g||null,S,y):y,N=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,T=L[M];if(T==null)return{};let D=Jl(T,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==T)return{reset:{placement:L[0]}};let $=[N[fo(T)],N[D[0]],N[D[1]]],W=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:T,overflows:$}],ne=L[M+1];if(ne)return{data:{index:M+1,overflows:W},reset:{placement:ne}};let Fe=W.map(_e=>{let x=or(_e.placement);return[_e.placement,x&&m?_e.overflows.slice(0,2).reduce((E,H)=>E+H,0):_e.overflows[0],_e.overflows]}).sort((_e,x)=>_e[1]-x[1]),_t=((a=Fe.filter(_e=>_e[2].slice(0,or(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Fe[0][0];return _t!==l?{data:{index:M+1,overflows:W},reset:{placement:_t}}:{}}}};var i1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:T,y:D}=M;return{x:T,y:D}}},...u}=Un(e,t),m={x:r,y:n},g=await i.detectOverflow(t,u),y=Hn(fo(a)),S=wi(y),C=m[S],L=m[y];if(s){let M=S==="y"?"top":"left",T=S==="y"?"bottom":"right",D=C+g[M],$=C-g[T];C=Ri(D,C,$)}if(l){let M=y==="y"?"top":"left",T=y==="y"?"bottom":"right",D=L+g[M],$=L-g[T];L=Ri(D,L,$)}let N=f.fn({...t,[S]:C,[y]:L});return{...N,data:{x:N.x-r,y:N.y-n,enabled:{[S]:s,[y]:l}}}}}};function Gn(){return typeof window<"u"}function Tr(e){return c1(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(c1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function c1(e){return Gn()?e instanceof Node||e instanceof We(e).Node:!1}function at(e){return Gn()?e instanceof Element||e instanceof We(e).Element:!1}function Pt(e){return Gn()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function s1(e){return!Gn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function uo(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function l1(e){return/^(table|td|th)$/.test(Tr(e))}function Zo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var gu=/transform|translate|scale|rotate|perspective|filter/,yu=/paint|layout|strict|content/,Nr=e=>!!e&&e!=="none",Ti;function Wn(e){let t=at(e)?it(e):e;return Nr(t.transform)||Nr(t.translate)||Nr(t.scale)||Nr(t.rotate)||Nr(t.perspective)||!Vn()&&(Nr(t.backdropFilter)||Nr(t.filter))||gu.test(t.willChange||"")||yu.test(t.contain||"")}function d1(e){let t=Wt(e);for(;Pt(t)&&!kr(t);){if(Wn(t))return t;if(Zo(t))return null;t=Wt(t)}return null}function Vn(){return Ti==null&&(Ti=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ti}function kr(e){return/^(html|body|#document)$/.test(Tr(e))}function it(e){return We(e).getComputedStyle(e)}function Yo(e){return at(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wt(e){if(Tr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||s1(e)&&e.host||Mt(e);return s1(t)?t.host:t}function f1(e){let t=Wt(e);return kr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&uo(t)?t:f1(t)}function Fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=f1(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=We(a);if(i){let l=jn(s);return t.concat(s,s.visualViewport||[],uo(a)?a:[],l&&r?Fn(l):[])}else return t.concat(a,Fn(a,[],r))}function jn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function m1(e){let t=it(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Pt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=qo(r)!==i||qo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function g1(e){return at(e)?e:e.contextElement}function po(e){let t=g1(e);if(!Pt(t))return xt(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=m1(t),s=(i?qo(r.width):r.width)/n,l=(i?qo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var bu=xt(0);function y1(e){let t=We(e);return!Vn()||!t.visualViewport?bu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==We(e)?!1:t}function Xo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=g1(e),s=xt(1);t&&(n?at(n)&&(s=po(n)):s=po(e));let l=vu(i,r,n)?y1(i):xt(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=We(i),S=n&&at(n)?We(n):n,C=y,L=jn(C);for(;L&&n&&S!==C;){let N=po(L),M=L.getBoundingClientRect(),T=it(L),D=M.left+(L.clientLeft+parseFloat(T.paddingLeft))*N.x,$=M.top+(L.clientTop+parseFloat(T.paddingTop))*N.y;f*=N.x,u*=N.y,m*=N.x,g*=N.y,f+=D,u+=$,C=We(L),L=jn(C)}}return _r({width:m,height:g,x:f,y:u})}function Kn(e,t){let r=Yo(e).scrollLeft;return t?t.left+r:Xo(Mt(e)).left+r}function b1(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Kn(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function xu(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Mt(n),l=t?Zo(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=xt(1),m=xt(0),g=Pt(n);if((g||!g&&!i)&&((Tr(n)!=="body"||uo(s))&&(f=Yo(n)),g)){let S=Xo(n);u=po(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let y=s&&!g&&!i?b1(s,f):xt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+m.x+y.x,y:r.y*u.y-f.scrollTop*u.y+m.y+y.y}}function Su(e){return Array.from(e.getClientRects())}function Cu(e){let t=Mt(e),r=Yo(e),n=e.ownerDocument.body,a=rr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=rr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Kn(e),l=-r.scrollTop;return it(n).direction==="rtl"&&(s+=rr(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var u1=25;function Ou(e,t){let r=We(e),n=Mt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Vn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=Kn(n);if(u<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),S=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-S);C<=u1&&(i-=C)}else u<=u1&&(i+=u);return{width:i,height:s,x:l,y:f}}function Eu(e,t){let r=Xo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Pt(e)?po(e):xt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,u=n*i.y;return{width:s,height:l,x:f,y:u}}function p1(e,t,r){let n;if(t==="viewport")n=Ou(e,r);else if(t==="document")n=Cu(Mt(e));else if(at(t))n=Eu(t,r);else{let a=y1(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return _r(n)}function v1(e,t){let r=Wt(e);return r===t||!at(r)||kr(r)?!1:it(r).position==="fixed"||v1(r,t)}function Lu(e,t){let r=t.get(e);if(r)return r;let n=Fn(e,[],!1).filter(l=>at(l)&&Tr(l)!=="body"),a=null,i=it(e).position==="fixed",s=i?Wt(e):e;for(;at(s)&&!kr(s);){let l=it(s),f=Wn(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||uo(s)&&!f&&v1(e,s))?n=n.filter(m=>m!==s):a=l,s=Wt(s)}return t.set(e,n),n}function Au(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?Zo(t)?[]:Lu(t,this._c):[].concat(r),n],l=p1(t,s[0],a),f=l.top,u=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let S=p1(t,s[y],a);f=rr(S.top,f),u=Ko(S.right,u),m=Ko(S.bottom,m),g=rr(S.left,g)}return{width:u-g,height:m-f,x:g,y:f}}function Ru(e){let{width:t,height:r}=m1(e);return{width:t,height:r}}function wu(e,t,r){let n=Pt(t),a=Mt(t),i=r==="fixed",s=Xo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=xt(0);function u(){f.x=Kn(a)}if(n||!n&&!i)if((Tr(t)!=="body"||uo(a))&&(l=Yo(t)),n){let S=Xo(t,!0,i,t);f.x=S.x+t.clientLeft,f.y=S.y+t.clientTop}else a&&u();i&&!n&&a&&u();let m=a&&!n&&!i?b1(a,l):xt(0),g=s.left+l.scrollLeft-f.x-m.x,y=s.top+l.scrollTop-f.y-m.y;return{x:g,y,width:s.width,height:s.height}}function ki(e){return it(e).position==="static"}function h1(e,t){if(!Pt(e)||it(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Mt(e)===r&&(r=r.ownerDocument.body),r}function x1(e,t){let r=We(e);if(Zo(e))return r;if(!Pt(e)){let a=Wt(e);for(;a&&!kr(a);){if(at(a)&&!ki(a))return a;a=Wt(a)}return r}let n=h1(e,t);for(;n&&l1(n)&&ki(n);)n=h1(n,t);return n&&kr(n)&&ki(n)&&!Wn(n)?r:n||d1(e)||r}var _u=async function(e){let t=this.getOffsetParent||x1,r=this.getDimensions,n=await r(e.floating);return{reference:wu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nu(e){return it(e).direction==="rtl"}var qn={convertOffsetParentRelativeRectToViewportRelativeRect:xu,getDocumentElement:Mt,getClippingRect:Au,getOffsetParent:x1,getElementRects:_u,getClientRects:Su,getDimensions:Ru,getScale:po,isElement:at,isRTL:Nu};var S1=a1,C1=i1;var O1=(e,t,r)=>{let n=new Map,a={platform:qn,...r},i={...a.platform,_c:n};return n1(e,t,{...a,platform:i})};function E1(e){return Tu(e)}function Mi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Tu(e){for(let t=e;t;t=Mi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Mi(e);t;t=Mi(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||t.tagName==="BODY"))return t}return null}async function L1(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},O1(e,t,{strategy:n.strategy,platform:{...qn,getOffsetParent:a=>qn.getOffsetParent(a,E1)},middleware:[C1({crossAxis:!0}),S1({allowedPlacements:[n.placement]})]})}var Lo=v(w());var ns=v(K());function ku(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Zn(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Zn(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(e),r=a.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!Zn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Zn(e,t){try{return ku(e,t)}catch{return!1}}function Qo(e,t){return!Zn(e,t)}function A1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Yn(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let a=t(n);return a[e]=!0,a}}var R1=v(K(),1);var Pi=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Qo,attribute:!1,...t};(0,R1.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:l=>l[n],store:t.store})}};var Xn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Mr=v(K(),1);var w1=v(K(),1);function _1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,w1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return r();try{return JSON.parse(n)}catch{return r()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Qo,...t??{}})}var Qn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var T1=v(U(),1);var Jn=globalThis,Mu=Jn.ShadowRoot&&(Jn.ShadyCSS===void 0||Jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mx=Symbol();var N1=(e,t)=>{if(Mu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Jn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var ea=class extends T1.LitElement{createRenderRoot(){let t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach(([a,i])=>t.registry.define(a,i)));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return N1(n,t.elementStyles),n}};function k1(e,t,...r){var n;let a=e.querySelector(t);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var mo=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},I1,M1=Symbol("constructorPrototype"),P1=Symbol("constructorName"),D1=Symbol("exportpartsDebouncer"),z1=Symbol("dynamicDependenciesLoaded"),ho=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ho.eventName="exportparts-updated";var zt=class extends ea{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[I1]=new Qn(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[D1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[P1]=this.constructor.name,this[M1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[P1]&&Object.setPrototypeOf(this,this[M1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[z1]||(r[z1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ho.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ho.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 ho)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=k1(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(N=>N.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(N=>N.trim());for(let N of L)m.add(N)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};I1=D1;mo([(0,Mr.property)()],zt.prototype,"exportpartsPrefix",void 0);mo([_1([])],zt.prototype,"exportpartsPrefixes",void 0);mo([(0,Mr.property)({reflect:!0})],zt.prototype,"exportparts",void 0);mo([(0,Mr.property)()],zt.prototype,"customStylesheet",void 0);mo([(0,Mr.property)()],zt.prototype,"elementToFocus",void 0);mo([(0,Mr.state)()],zt.prototype,"useAdoptedStyleSheets",void 0);function ta(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Jo=Symbol("internalReduxEventsUnsubscribers"),nr=Symbol("internalStoresUnsubscribers"),Pr=Symbol("internalStores"),Pu=Yn(Symbol("withRedux"),function(e){var t,r,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Pr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Pr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Pr].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Pr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Pr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Pr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let u=this.getStore(s.store);u&&(s.store?this[nr].has(s.store):this[nr].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[nr].set(s,l.subscribe(()=>this.updateFromStores())),this[Jo].set(s,[]),ta(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[m](y);l.addEventListener(u.eventName,g),this[Jo].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[nr].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[nr].has(s)&&this[nr].get(s)(),this[nr].delete(s),(l=this[Jo].get(s))===null||l===void 0||l.forEach(f=>f()),this[Jo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nr,r=Pr,n=Jo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),B1=class extends Pu(zt){};function st(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Vt(e){return!!e&&!!e[ie]}function St(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Fu}(e)||Array.isArray(e)||!!e[V1]||!!(!((t=e.constructor)===null||t===void 0)&&t[V1])||Gi(e)||Wi(e))}function zr(e,t,r){r===void 0&&(r=!1),bo(e)===0?(r?Object.keys:yo)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function bo(e){var t=e[ie];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Gi(e)?2:Wi(e)?3:0}function go(e,t){return bo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zu(e,t){return bo(e)===2?e.get(t):e[t]}function j1(e,t,r){var n=bo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function K1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gi(e){return Uu&&e instanceof Map}function Wi(e){return Hu&&e instanceof Set}function ar(e){return e.o||e.t}function Vi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y1(e);delete t[ie];for(var r=yo(t),n=0;n<r.length;n++){var a=r[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function ji(e,t){return t===void 0&&(t=!1),Ki(e)||Vt(e)||!St(e)||(bo(e)>1&&(e.set=e.add=e.clear=e.delete=Iu),Object.freeze(e),t&&zr(e,function(r,n){return ji(n,!0)},!0)),e}function Iu(){st(2)}function Ki(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function It(e){var t=Fi[e];return t||st(18,e),t}function Du(e,t){Fi[e]||(Fi[e]=t)}function $i(){return tn}function zi(e,t){t&&(It("Patches"),e.u=[],e.s=[],e.v=t)}function ra(e){Ui(e),e.p.forEach(Bu),e.p=null}function Ui(e){e===tn&&(tn=e.l)}function $1(e){return tn={p:[],l:tn,h:e,m:!0,_:0}}function Bu(e){var t=e[ie];t.i===0||t.i===1?t.j():t.g=!0}function Ii(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||It("ES5").S(t,e,n),n?(r[ie].P&&(ra(t),st(4)),St(e)&&(e=oa(t,e),t.l||na(t,e)),t.u&&It("Patches").M(r[ie].t,e,t.u,t.s)):e=oa(t,r,[]),ra(t),t.u&&t.v(t.u,t.s),e!==Z1?e:void 0}function oa(e,t,r){if(Ki(t))return t;var n=t[ie];if(!n)return zr(t,function(l,f){return U1(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return na(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),zr(i,function(l,f){return U1(e,n,a,l,f,r,s)}),na(e,a,!1),r&&e.u&&It("Patches").N(n,r,e.u,e.s)}return n.o}function U1(e,t,r,n,a,i,s){if(Vt(a)){var l=oa(e,a,i&&t&&t.i!==3&&!go(t.R,n)?i.concat(n):void 0);if(j1(r,n,l),!Vt(l))return;e.m=!1}else s&&r.add(a);if(St(a)&&!Ki(a)){if(!e.h.D&&e._<1)return;oa(e,a),t&&t.A.l||na(e,a)}}function na(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ji(t,r)}function Di(e,t){var r=e[ie];return(r?ar(r):e)[t]}function H1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function ir(e){e.P||(e.P=!0,e.l&&ir(e.l))}function Bi(e){e.o||(e.o=Vi(e.t))}function Hi(e,t,r){var n=Gi(t)?It("MapSet").F(t,r):Wi(t)?It("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:$i(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=rn;s&&(f=[l],u=en);var m=Proxy.revocable(f,u),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y}(t,r):It("ES5").J(t,r);return(r?r.A:$i()).p.push(n),n}function $u(e){return Vt(e)||st(22,e),function t(r){if(!St(r))return r;var n,a=r[ie],i=bo(r);if(a){if(!a.P&&(a.i<4||!It("ES5").K(a)))return a.t;a.I=!0,n=F1(r,i),a.I=!1}else n=F1(r,i);return zr(n,function(s,l){a&&zu(a.t,s)===l||j1(n,s,t(l))}),i===3?new Set(n):n}(e)}function F1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Vi(e)}function q1(){function e(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[ie];return rn.get(u,s)},set:function(u){var m=this[ie];rn.set(m,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][ie];if(!f.P)switch(f.i){case 5:n(f)&&ir(f);break;case 4:r(f)&&ir(f)}}}function r(s){for(var l=s.t,f=s.k,u=yo(f),m=u.length-1;m>=0;m--){var g=u[m];if(g!==ie){var y=l[g];if(y===void 0&&!go(l,g))return!0;var S=f[g],C=S&&S[ie];if(C?C.t!==y:!K1(S,y))return!0}}var L=!!l[ie];return u.length!==yo(l).length+(L?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&st(3,JSON.stringify(ar(s)))}var i={};Du("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=Y1(y);delete L[ie];for(var N=yo(L),M=0;M<N.length;M++){var T=N[M];L[T]=e(T,g||!!L[T].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),m={i:f?5:4,A:l?l.A:$i(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ie,{value:m,writable:!0}),u},S:function(s,l,f){f?Vt(l)&&l[ie].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var g=m[ie];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)zr(S,function($){$!==ie&&(y[$]!==void 0||go(y,$)?C[$]||u(S[$]):(C[$]=!0,ir(g)))}),zr(y,function($){S[$]!==void 0||go(S,$)||(C[$]=!1,ir(g))});else if(L===5){if(n(g)&&(ir(g),C.length=!0),S.length<y.length)for(var N=S.length;N<y.length;N++)C[N]=!1;else for(var M=y.length;M<S.length;M++)C[M]=!0;for(var T=Math.min(S.length,y.length),D=0;D<T;D++)S.hasOwnProperty(D)||(C[D]=!0),C[D]===void 0&&u(S[D])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var G1,tn,qi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Uu=typeof Map<"u",Hu=typeof Set<"u",W1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Z1=qi?Symbol.for("immer-nothing"):((G1={})["immer-nothing"]=!0,G1),V1=qi?Symbol.for("immer-draftable"):"__$immer_draftable",ie=qi?Symbol.for("immer-state"):"__$immer_state";var Fu=""+Object.prototype.constructor,yo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Y1=Object.getOwnPropertyDescriptors||function(e){var t={};return yo(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Fi={},rn={get:function(e,t){if(t===ie)return e;var r=ar(e);if(!go(r,t))return function(a,i,s){var l,f=H1(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(e,r,t);var n=r[t];return e.I||!St(n)?n:n===Di(e.t,t)?(Bi(e),e.o[t]=Hi(e.A.h,n,e)):n},has:function(e,t){return t in ar(e)},ownKeys:function(e){return Reflect.ownKeys(ar(e))},set:function(e,t,r){var n=H1(ar(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Di(ar(e),t),i=a?.[ie];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(K1(r,a)&&(r!==void 0||go(e.t,t)))return!0;Bi(e),ir(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Di(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bi(e),ir(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ar(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){st(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){st(12)}},en={};zr(rn,function(e,t){en[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),en.deleteProperty=function(e,t){return en.set.call(this,e,t,void 0)},en.set=function(e,t,r){return rn.set.call(this,e[0],t,r,e[0])};var Gu=function(){function e(r){var n=this;this.O=W1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=n;return function(L){var N=this;L===void 0&&(L=l);for(var M=arguments.length,T=Array(M>1?M-1:0),D=1;D<M;D++)T[D-1]=arguments[D];return f.produce(L,function($){var W;return(W=i).call.apply(W,[N,$].concat(T))})}}var u;if(typeof i!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),St(a)){var m=$1(n),g=Hi(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?ra(m):Ui(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return zi(m,s),Ii(L,m)},function(L){throw ra(m),L}):(zi(m,s),Ii(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Z1&&(u=void 0),n.D&&ji(u,!0),s){var S=[],C=[];It("Patches").M(a,u,S,C),s(S,C)}return u}st(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,l,f=n.produce(a,i,function(u,m){s=u,l=m});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){St(r)||st(8),Vt(r)&&(r=$u(r));var n=$1(this),a=Hi(this,r,void 0);return a[ie].C=!0,Ui(n),a},t.finishDraft=function(r,n){var a=r&&r[ie],i=a.A;return zi(i,n),Ii(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!W1&&st(20),this.O=r},t.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=It("Patches").$;return Vt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ze=new Gu,Wu=Ze.produce,Nx=Ze.produceWithPatches.bind(Ze),Tx=Ze.setAutoFreeze.bind(Ze),kx=Ze.setUseProxies.bind(Ze),Mx=Ze.applyPatches.bind(Ze),Px=Ze.createDraft.bind(Ze),zx=Ze.finishDraft.bind(Ze),aa=Wu;function Ir(e){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(e)}function X1(e,t){if(Ir(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q1(e){var t=X1(e,"string");return Ir(t)=="symbol"?t:t+""}function J1(e,t,r){return(t=Q1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e2(Object(r),!0).forEach(function(n){J1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Be(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 t2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Yi=function(){return Math.random().toString(36).substring(7).split("").join(".")},ia={INIT:"@@redux/INIT"+Yi(),REPLACE:"@@redux/REPLACE"+Yi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Yi()}};function Vu(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xi(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Be(1));return r(Xi)(e,t)}if(typeof e!="function")throw new Error(Be(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function m(){if(f)throw new Error(Be(3));return i}function g(L){if(typeof L!="function")throw new Error(Be(4));if(f)throw new Error(Be(5));var N=!0;return u(),l.push(L),function(){if(N){if(f)throw new Error(Be(6));N=!1,u();var T=l.indexOf(L);l.splice(T,1),s=null}}}function y(L){if(!Vu(L))throw new Error(Be(7));if(typeof L.type>"u")throw new Error(Be(8));if(f)throw new Error(Be(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var N=s=l,M=0;M<N.length;M++){var T=N[M];T()}return L}function S(L){if(typeof L!="function")throw new Error(Be(10));a=L,y({type:ia.REPLACE})}function C(){var L,N=g;return L={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(Be(11));function D(){T.next&&T.next(m())}D();var $=N(D);return{unsubscribe:$}}},L[t2]=function(){return this},L}return y({type:ia.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:S},n[t2]=C,n}function ju(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:ia.INIT});if(typeof n>"u")throw new Error(Be(12));if(typeof r(void 0,{type:ia.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function r2(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(r[a]=e[a])}var i=Object.keys(r),s,l;try{ju(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],N=r[L],M=u[L],T=N(M,m);if(typeof T>"u"){var D=m&&m.type;throw new Error(Be(14))}S[L]=T,y=y||T!==M}return y=y||i.length!==Object.keys(u).length,y?S:u}}function vo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function o2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Be(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=vo.apply(void 0,l)(a.dispatch),Zi(Zi({},a),{},{dispatch:i})}}}function n2(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var a2=n2();a2.withExtraArgument=n2;var Qi=a2;var d2=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ku=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(m){return f([u,m])}}function f(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(m){u=[6,m],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},xo=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},qu=Object.defineProperty,Zu=Object.defineProperties,Yu=Object.getOwnPropertyDescriptors,i2=Object.getOwnPropertySymbols,Xu=Object.prototype.hasOwnProperty,Qu=Object.prototype.propertyIsEnumerable,s2=function(e,t,r){return t in e?qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},sr=function(e,t){for(var r in t||(t={}))Xu.call(t,r)&&s2(e,r,t[r]);if(i2)for(var n=0,a=i2(t);n<a.length;n++){var r=a[n];Qu.call(t,r)&&s2(e,r,t[r])}return e},Ji=function(e,t){return Zu(e,Yu(t))},Ju=function(e,t,r){return new Promise(function(n,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?n(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(e,t)).next())})};var ep=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vo:vo.apply(null,arguments)},Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function tp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}var rp=function(e){d2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,xo([void 0],r[0].concat(this)))):new(t.bind.apply(t,xo([void 0],r.concat(this))))},t}(Array),op=function(e){d2(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=e.apply(this,r)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,xo([void 0],r[0].concat(this)))):new(t.bind.apply(t,xo([void 0],r.concat(this))))},t}(Array);function rs(e){return St(e)?aa(e,function(){}):e}function np(e){return typeof e=="boolean"}function ap(){return function(t){return ip(t)}}function ip(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=new rp;if(r&&(np(r)?l.push(Qi):l.push(Qi.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var es=!0;function f2(e){var t=ap(),r=e||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?t():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,m=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(tp(a))S=r2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(t),!es&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!es&&C.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=o2.apply(void 0,C),N=vo;f&&(N=ep(sr({trace:!es},typeof f=="object"&&f)));var M=new op(L),T=M;Array.isArray(y)?T=xo([L],y):typeof y=="function"&&(T=y(M));var D=N.apply(void 0,T);return Xi(S,m,D)}function cr(e,t){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return sr(sr({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}function u2(e){var t={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,r,n]}function sp(e){return typeof e=="function"}function cp(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?u2(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(sp(e))f=function(){return rs(e())};else{var u=rs(e);f=function(){return u}}function m(g,y){g===void 0&&(g=f());var S=xo([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[l]),S.reduce(function(C,L){if(L)if(Vt(C)){var N=C,M=L(N,y);return M===void 0?C:M}else{if(St(C))return aa(C,function(T){return L(T,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return m.getInitialState=f,m}function lp(e,t){return e+"/"+t}function p2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:rs(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=lp(t,m),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[m]=S,s[y]=S,l[m]=C?cr(y,C):cr(y)});function f(){var m=typeof e.extraReducers=="function"?u2(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,S=m[1],C=S===void 0?[]:S,L=m[2],N=L===void 0?void 0:L,M=sr(sr({},y),s);return cp(r,function(T){for(var D in M)T.addCase(D,M[D]);for(var $=0,W=C;$<W.length;$++){var ne=W[$];T.addMatcher(ne.matcher,ne.reducer)}N&&T.addDefaultCase(N)})}var u;return{name:t,reducer:function(m,g){return u||(u=f()),u(m,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var dp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",fp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=dp[Math.random()*64|0];return t},up=["name","message","stack","code"],ts=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),c2=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),pp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=up;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},oS=function(){function e(t,r,n){var a=cr(t+"/fulfilled",function(m,g,y,S){return{payload:m,meta:Ji(sr({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=cr(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ji(sr({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=cr(t+"/rejected",function(m,g,y,S,C){return{payload:S,error:(n&&n.serializeError||pp)(m||"Rejected"),meta:Ji(sr({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function u(m){return function(g,y,S){var C=n?.idGenerator?n.idGenerator(m):fp(),L=new f,N,M=!1;function T($){N=$,L.abort()}var D=function(){return Ju(this,null,function(){var $,W,ne,Fe,we,_t,_e;return Ku(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Fe=($=n?.condition)==null?void 0:$.call(n,m,{getState:y,extra:S}),mp(Fe)?[4,Fe]:[3,2];case 1:Fe=x.sent(),x.label=2;case 2:if(Fe===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,we=new Promise(function(E,H){return L.signal.addEventListener("abort",function(){return H({name:"AbortError",message:N||"Aborted"})})}),g(i(C,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:C,arg:m},{getState:y,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:T,rejectWithValue:function(E,H){return new ts(E,H)},fulfillWithValue:function(E,H){return new c2(E,H)}})).then(function(E){if(E instanceof ts)throw E;return E instanceof c2?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return ne=x.sent(),[3,5];case 4:return _t=x.sent(),ne=_t instanceof ts?s(null,C,m,_t.payload,_t.meta):s(_t,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(ne)&&ne.meta.condition,_e||g(ne),[2,ne]}})})}();return Object.assign(D,{abort:T,requestId:C,arg:m,unwrap:function(){return D.then(hp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function hp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var h2="listener",m2="completed",g2="cancelled",nS="task-"+g2,aS="task-"+m2,iS=h2+"-"+g2,sS=h2+"-"+m2;var os="listenerMiddleware";var cS=cr(os+"/add"),lS=cr(os+"/removeAll"),dS=cr(os+"/remove");var l2,fS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(l2||(l2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},gp=function(e){return function(t){setTimeout(t,e)}},uS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gp(10);q1();var yp=Yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),sa=class extends yp(Object){};window.ftReduxStores||(window.ftReduxStores={});var y2=class e extends sa{static get(t){var r;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(ta(i))return i;if(a==null)return;let s=p2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=f2({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=A1(s.getInitialState());for(let g of u.keeping)m[g]=(f??m)[g];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Xn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...m)=>{let g=u(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[f]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ca=class{static format(t,r,n,a,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,r,n,a,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var la=v(w()),bp="ft-app-info",Dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Dr.eventName="authentication-change";var vp={session:(e,t)=>{(0,la.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new Dr(t.payload)),0))}},I=la.FtReduxStore.get({name:bp,reducers:vp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var b2=v(w()),da=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},US=(0,b2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>ca.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return da([(0,ns.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),da([(0,ns.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),da([Pi({store:I.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),da([Pi({store:I.name})],t.prototype,"uiLocale",void 0),t});var Sp=v(x2(),1);var S2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(S2||(S2={}));var C2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(C2||(C2={}));var O2;(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"})(O2||(O2={}));var E2;(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"})(E2||(E2={}));var L2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(L2||(L2={}));var A2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(A2||(A2={}));var R2;(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"})(R2||(R2={}));var w2;(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"})(w2||(w2={}));var _2;(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"})(_2||(_2={}));var N2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(N2||(N2={}));var T2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(T2||(T2={}));var k2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(k2||(k2={}));var M2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(M2||(M2={}));var P2;(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"})(P2||(P2={}));var Br;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Br||(Br={}));var z2;(function(e){e.ASC="ASC",e.DESC="DESC"})(z2||(z2={}));var I2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(I2||(I2={}));var pa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(pa||(pa={}));var D2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(D2||(D2={}));var B2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(B2||(B2={}));var $2;(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"})($2||($2={}));var U2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(U2||(U2={}));var H2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(H2||(H2={}));var ha;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ha||(ha={}));var F2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(F2||(F2={}));var ge;(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"})(ge||(ge={}));var ct;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ct||(ct={}));var G2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(G2||(G2={}));var W2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(W2||(W2={}));var V2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(V2||(V2={}));var j2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(j2||(j2={}));var K2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(K2||(K2={}));var q2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(q2||(q2={}));var Z2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Z2||(Z2={}));var Y2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Y2||(Y2={}));var X2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(X2||(X2={}));var xp={[ge.PERSONAL_BOOK_SHARE_USER]:[ge.PERSONAL_BOOK_USER],[ge.HTML_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.PDF_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.KHUB_ADMIN]:[ge.CONTENT_PUBLISHER],[ge.ADMIN]:[ge.KHUB_ADMIN,ge.USERS_ADMIN,ge.PORTAL_ADMIN,ge.BEHAVIOR_DATA_USER],[ge.GENERATIVE_AI_EXPORT_USER]:[ge.GENERATIVE_AI_USER]};function Q2(e,t){return e===t||(xp[e]??[]).some(r=>Q2(r,t))}function J2(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Q2(n,t))}var xa=v(w());var as=v(w());var $r=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=I.getState(),a=t??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let a=I.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var ma=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:$r.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$r.await()}};var Ve=class extends ma{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new as.CacheRegistry,this.cache=t?a.commonCache:new as.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ga=class extends Ve{async listMySearches(){let{session:t}=I.getState();return J2(t,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var ya=class extends Ve{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var ba=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var va=class extends Ve{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=I.getState().session;return!!t?.sessionAuthenticated}};var Cp="ft-user-assets",Op={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(ct).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:a}=t.payload;ss(e,r,[...is(e,r),a]),ed(e,r,1,n),td(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;ss(e,r,is(e,r).map(a=>a.id===n.id?n:a)),td(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;ss(e,r,is(e,r).filter(i=>i.id!==a)),ed(e,r,-1,n)}},rd={[ct.SEARCHES]:"savedSearches",[ct.BOOKMARKS]:"bookmarks",[ct.BOOKS]:void 0,[ct.COLLECTIONS]:void 0},is=(e,t)=>{var r;let n=rd[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},ss=(e,t,r)=>{let n=rd[t];n&&(e[n]=r)},ed=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===ct.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},td=(e,t)=>{let r=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},Ye=xa.FtReduxStore.get({name:Cp,reducers:Op,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ct).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),cs=class{constructor(t=new ba,r=new va){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ya,this.savedSearchesService=new ga,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,xa.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(),Ye.actions.clearAssetCount(),Ye.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ye.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ye.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ye.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ye.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ye.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ye.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ye.getState().assetCounts.bookmarkByMap).length!==0;t===ct.BOOKMARKS&&r&&Ye.actions.clearBookmarkCountByMap(),Ye.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;Ye.actions.bookmarks(r)}}},Ep=new cs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ep);var ls=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ls;var lt=v(w());var od,Co=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Lp=Symbol("clearAfterUnitTest"),Sa=class extends(0,lt.withEventBus)(Ve){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[od]=()=>{this.defaultMessages={},this.cache=new lt.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,lt.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new lt.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(a){!(a instanceof lt.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Co({loadedContexts:t})),this.dispatchEvent(new Co({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Co({loadedContexts:[t]})),this.dispatchEvent(new Co({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,lt.delay)(0).then(()=>n()).catch(()=>null)))}};od=Lp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Sa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Sa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Oo=window.FluidTopicsI18nService,Ca=window.FluidTopicsCustomI18nService;var nd=v(w()),ds=class{highlightHtml(t,r,n){(0,nd.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new ds;var ad=v(w());var fs=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,r){var n,a,i,s;if(t==null)return"";try{return ad.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:I.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new fs;var id=v(w());var on=class{static get(t,r){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new id.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var us=class{urlToSearchRequest(t){return on.get().parse(t)}searchRequestToUrl(t){return on.get().serialize(t)}};window.FluidTopicsUrlService=new us;var dr=v(w());var Ur=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ur.eventName="change";var ps=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))}},sd=new ps;var Oa=class e extends dr.WithEventBus{static build(){return new e(window.history,sd,()=>window.location,!1)}constructor(t,r,n,a){var i,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,dr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ur(this.currentItem())),0)}installProxies(){let t=r=>(n,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Ur.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ur.eventName,t)}currentItem(){return(0,dr.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,dr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,dr.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Oa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var cd=v(U());var ld=cd.css`
|
|
606
606
|
`;var fd=v(U()),Me=v(K()),Ct=v(w());function dd(e,t){let{authenticationRequired:r,session:n}=I.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var xe=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},ee=class extends Ct.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>$r.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ct.CacheRegistry,this.cleanSessionDebouncer=new Ct.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return fd.html`
|
|
607
607
|
<slot></slot>
|
|
608
608
|
`}connectedCallback(){super.connectedCallback(),I.addEventListener(Dr.eventName,this.reloadConfiguration)}disconnectedCallback(){I.addEventListener(Dr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,a,i,s,l,f;super.update(t),t.has("baseUrl")&&(I.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&I.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&I.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&I.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&I.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&I.actions.noCustom(this.noCustom),t.has("editorMode")&&I.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&I.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&I.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Oo.addContext(u)),t.has("openExternalDocumentInNewTab")&&I.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&I.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&I.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(I.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),I.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),I.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&I.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&I.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},t.idleTimeoutInMillis),t})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>dd(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ee.elementDefinitions={};ee.styles=ld;xe([(0,Me.property)()],ee.prototype,"baseUrl",void 0);xe([(0,Me.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);xe([(0,Me.property)()],ee.prototype,"apiIntegrationAppVersion",void 0);xe([(0,Me.property)()],ee.prototype,"uiLocale",void 0);xe([(0,Ct.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);xe([(0,Ct.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"editorMode",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"noCustom",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);xe([(0,Me.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],ee.prototype,"noCustomComponent",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);xe([(0,Me.property)({type:Object})],ee.prototype,"apiProvider",void 0);xe([(0,Me.property)({type:Boolean})],ee.prototype,"authenticationRequired",void 0);xe([(0,Ct.jsonProperty)([])],ee.prototype,"messageContexts",void 0);xe([(0,Ct.jsonProperty)(void 0)],ee.prototype,"session",void 0);xe([(0,Me.state)()],ee.prototype,"localesConfiguration",void 0);xe([(0,Me.state)()],ee.prototype,"availableContentLocales",void 0);var ud=v(w());(0,ud.customElement)("ft-app-context")(ee);var pd=v(K());var hs=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Eo=new hs;var Ap=function(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},an=Symbol("i18nAttributes"),hd=Symbol("i18nListAttributes"),md=Symbol("i18nProperties"),Ea=Symbol("i18nContexts"),nn=Symbol("i18nUnsubs"),Ao=(0,Lo.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Ca:Oo}i18n(i){let{context:s,key:l,message:f}=i,{custom:u,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=m??(g?g(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Eo.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var u;return((u=f?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,u=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[an])===null||s===void 0||s.forEach((m,g)=>f[g]=u(m,g,f[g])),(l=this[hd])===null||l===void 0||l.forEach((m,g)=>{var y;return f[g]=(y=f[g])===null||y===void 0?void 0:y.map(S=>u(m,g,S))})}updateI18nProperties(i){var s;(s=this[md])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Ea].set(f,{isCustomContext:l}),this[nn].has(f)||this[nn].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[Ea].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ea].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[nn].forEach(i=>i()),this[nn].clear()}}return t=Ea,r=nn,Ap([(0,pd.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),La=class extends Ao(Lo.FtLitElement){},Aa=class extends Ao(Lo.FtLitElementRedux){};var gd=v(w());var ms=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?Eo.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Rp=new ms;var yd=(e,t)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:gd.hasChanged,converter:Eo,...t}),r[an]=(a=r[an])!==null&&a!==void 0?a:new Map,r[an].set(n,e??{})};var Ra=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Ca:Oo}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var bd=v(U());var vd=bd.css`
|