@fluid-topics/ft-filter 2.0.11 → 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-filter.light.js +1 -1
- package/build/ft-filter.min.js +2 -2
- package/package.json +10 -10
package/build/ft-filter.light.js
CHANGED
|
@@ -531,7 +531,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
531
531
|
position: relative;
|
|
532
532
|
word-break: break-word;
|
|
533
533
|
}
|
|
534
|
-
`;var Tl=["top","right","bottom","left"],Nl=["start","end"],pi=Tl.reduce((e,t)=>e.concat(t,t+"-"+Nl[0],t+"-"+Nl[1]),[]),Uo=Math.min,tr=Math.max,Ho=Math.round;var xt=e=>({x:e,y:e}),Gf={left:"right",right:"left",bottom:"top",top:"bottom"};function hi(e,t,r){return tr(e,Uo(t,r))}function kn(e,t){return typeof e=="function"?e(t):e}function so(e){return e.split("-")[0]}function rr(e){return e.split("-")[1]}function mi(e){return e==="x"?"y":"x"}function yi(e){return e==="y"?"height":"width"}function Mn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function gi(e){return mi(Mn(e))}function kl(e,t,r){r===void 0&&(r=!1);let n=rr(e),a=gi(e),i=yi(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ui(s)),[s,ui(s)]}function Ml(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function ui(e){let t=so(e);return Gf[t]+e.slice(t.length)}function Ff(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pl(e){return typeof e!="number"?Ff(e):{top:e,right:e,bottom:e,left:e}}function wr(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 zl(e,t,r){let{reference:n,floating:a}=e,i=Mn(t),s=gi(t),l=yi(s),f=so(t),u=i==="y",m=n.x+n.width/2-a.width/2,y=n.y+n.height/2-a.height/2,g=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};break;case"left":S={x:n.x-a.width,y};break;default:S={x:n.x,y:n.y}}switch(rr(t)){case"start":S[s]-=g*(r&&u?-1:1);break;case"end":S[s]+=g*(r&&u?-1:1);break}return S}async function Il(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:y="floating",altBoundary:g=!1,padding:S=0}=kn(t,e),C=Pl(S),_=l[g?y==="floating"?"reference":"floating":y],k=wr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(_)))==null||r?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),N=y==="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=wr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:D,strategy:f}):N);return{top:(k.top-W.top+C.top)/$.y,bottom:(W.bottom-k.bottom+C.bottom)/$.y,left:(k.left-W.left+C.left)/$.x,right:(W.right-k.right+C.right)/$.x}}var Wf=50,Dl=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:Il},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y}=zl(u,n,f),g=n,S=0,C={};for(let L=0;L<i.length;L++){let _=i[L];if(!_)continue;let{name:k,fn:N}=_,{x:D,y:$,data:W,reset:ne}=await N({x:m,y,initialPlacement:n,placement:g,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=D??m,y=$??y,C[k]={...C[k],...W},ne&&S<Wf&&(S++,typeof ne=="object"&&(ne.placement&&(g=ne.placement),ne.rects&&(u=ne.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):ne.rects),{x:m,y}=zl(u,g,f)),L=-1)}return{x:m,y,placement:g,strategy:a,middlewareData:C}};function Vf(e,t,r){return(e?[...r.filter(a=>rr(a)===e),...r.filter(a=>rr(a)!==e)]:r.filter(a=>so(a)===a)).filter(a=>e?rr(a)===e||(t?Ml(a)!==a:!1):!0)}var Bl=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:y,allowedPlacements:g=pi,autoAlignment:S=!0,...C}=kn(e,t),L=y!==void 0||g===pi?Vf(y||null,S,g):g,_=await f.detectOverflow(t,C),k=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[k];if(N==null)return{};let D=kl(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:L[0]}};let $=[_[so(N)],_[D[0]],_[D[1]]],W=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:$}],ne=L[k+1];if(ne)return{data:{index:k+1,overflows:W},reset:{placement:ne}};let Ge=W.map(_e=>{let x=rr(_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]),wt=((a=Ge.filter(_e=>_e[2].slice(0,rr(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Ge[0][0];return wt!==l?{data:{index:k+1,overflows:W},reset:{placement:wt}}:{}}}};var $l=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:k=>{let{x:N,y:D}=k;return{x:N,y:D}}},...u}=kn(e,t),m={x:r,y:n},y=await i.detectOverflow(t,u),g=Mn(so(a)),S=mi(g),C=m[S],L=m[g];if(s){let k=S==="y"?"top":"left",N=S==="y"?"bottom":"right",D=C+y[k],$=C-y[N];C=hi(D,C,$)}if(l){let k=g==="y"?"top":"left",N=g==="y"?"bottom":"right",D=L+y[k],$=L-y[N];L=hi(D,L,$)}let _=f.fn({...t,[S]:C,[g]:L});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[S]:s,[g]:l}}}}}};function zn(){return typeof window<"u"}function Nr(e){return Hl(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){var t;return(t=(Hl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hl(e){return zn()?e instanceof Node||e instanceof We(e).Node:!1}function at(e){return zn()?e instanceof Element||e instanceof We(e).Element:!1}function Mt(e){return zn()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function Ul(e){return!zn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function co(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 Gl(e){return/^(table|td|th)$/.test(Nr(e))}function Go(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var jf=/transform|translate|scale|rotate|perspective|filter/,Kf=/paint|layout|strict|content/,_r=e=>!!e&&e!=="none",bi;function In(e){let t=at(e)?it(e):e;return _r(t.transform)||_r(t.translate)||_r(t.scale)||_r(t.rotate)||_r(t.perspective)||!Dn()&&(_r(t.backdropFilter)||_r(t.filter))||jf.test(t.willChange||"")||Kf.test(t.contain||"")}function Fl(e){let t=Ft(e);for(;Mt(t)&&!Tr(t);){if(In(t))return t;if(Go(t))return null;t=Ft(t)}return null}function Dn(){return bi==null&&(bi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bi}function Tr(e){return/^(html|body|#document)$/.test(Nr(e))}function it(e){return We(e).getComputedStyle(e)}function Fo(e){return at(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ft(e){if(Nr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ul(e)&&e.host||kt(e);return Ul(t)?t.host:t}function Wl(e){let t=Ft(e);return Tr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mt(t)&&co(t)?t:Wl(t)}function Pn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=Wl(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=We(a);if(i){let l=Bn(s);return t.concat(s,s.visualViewport||[],co(a)?a:[],l&&r?Pn(l):[])}else return t.concat(a,Pn(a,[],r))}function Bn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zl(e){let t=it(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Mt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=Ho(r)!==i||Ho(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function ql(e){return at(e)?e:e.contextElement}function lo(e){let t=ql(e);if(!Mt(t))return xt(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=Zl(t),s=(i?Ho(r.width):r.width)/n,l=(i?Ho(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Zf=xt(0);function Yl(e){let t=We(e);return!Dn()||!t.visualViewport?Zf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==We(e)?!1:t}function Wo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=ql(e),s=xt(1);t&&(n?at(n)&&(s=lo(n)):s=lo(e));let l=qf(i,r,n)?Yl(i):xt(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,y=a.height/s.y;if(i){let g=We(i),S=n&&at(n)?We(n):n,C=g,L=Bn(C);for(;L&&n&&S!==C;){let _=lo(L),k=L.getBoundingClientRect(),N=it(L),D=k.left+(L.clientLeft+parseFloat(N.paddingLeft))*_.x,$=k.top+(L.clientTop+parseFloat(N.paddingTop))*_.y;f*=_.x,u*=_.y,m*=_.x,y*=_.y,f+=D,u+=$,C=We(L),L=Bn(C)}}return wr({width:m,height:y,x:f,y:u})}function $n(e,t){let r=Fo(e).scrollLeft;return t?t.left+r:Wo(kt(e)).left+r}function Xl(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-$n(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function Yf(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=kt(n),l=t?Go(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=xt(1),m=xt(0),y=Mt(n);if((y||!y&&!i)&&((Nr(n)!=="body"||co(s))&&(f=Fo(n)),y)){let S=Wo(n);u=lo(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let g=s&&!y&&!i?Xl(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+g.x,y:r.y*u.y-f.scrollTop*u.y+m.y+g.y}}function Xf(e){return Array.from(e.getClientRects())}function Qf(e){let t=kt(e),r=Fo(e),n=e.ownerDocument.body,a=tr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=tr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+$n(e),l=-r.scrollTop;return it(n).direction==="rtl"&&(s+=tr(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var Vl=25;function Jf(e,t){let r=We(e),n=kt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Dn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=$n(n);if(u<=0){let m=n.ownerDocument,y=m.body,g=getComputedStyle(y),S=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,C=Math.abs(n.clientWidth-y.clientWidth-S);C<=Vl&&(i-=C)}else u<=Vl&&(i+=u);return{width:i,height:s,x:l,y:f}}function eu(e,t){let r=Wo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Mt(e)?lo(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 jl(e,t,r){let n;if(t==="viewport")n=Jf(e,r);else if(t==="document")n=Qf(kt(e));else if(at(t))n=eu(t,r);else{let a=Yl(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return wr(n)}function Ql(e,t){let r=Ft(e);return r===t||!at(r)||Tr(r)?!1:it(r).position==="fixed"||Ql(r,t)}function tu(e,t){let r=t.get(e);if(r)return r;let n=Pn(e,[],!1).filter(l=>at(l)&&Nr(l)!=="body"),a=null,i=it(e).position==="fixed",s=i?Ft(e):e;for(;at(s)&&!Tr(s);){let l=it(s),f=In(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||co(s)&&!f&&Ql(e,s))?n=n.filter(m=>m!==s):a=l,s=Ft(s)}return t.set(e,n),n}function ru(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?Go(t)?[]:tu(t,this._c):[].concat(r),n],l=jl(t,s[0],a),f=l.top,u=l.right,m=l.bottom,y=l.left;for(let g=1;g<s.length;g++){let S=jl(t,s[g],a);f=tr(S.top,f),u=Uo(S.right,u),m=Uo(S.bottom,m),y=tr(S.left,y)}return{width:u-y,height:m-f,x:y,y:f}}function ou(e){let{width:t,height:r}=Zl(e);return{width:t,height:r}}function nu(e,t,r){let n=Mt(t),a=kt(t),i=r==="fixed",s=Wo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=xt(0);function u(){f.x=$n(a)}if(n||!n&&!i)if((Nr(t)!=="body"||co(a))&&(l=Fo(t)),n){let S=Wo(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?Xl(a,l):xt(0),y=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:y,y:g,width:s.width,height:s.height}}function vi(e){return it(e).position==="static"}function Kl(e,t){if(!Mt(e)||it(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return kt(e)===r&&(r=r.ownerDocument.body),r}function Jl(e,t){let r=We(e);if(Go(e))return r;if(!Mt(e)){let a=Ft(e);for(;a&&!Tr(a);){if(at(a)&&!vi(a))return a;a=Ft(a)}return r}let n=Kl(e,t);for(;n&&Gl(n)&&vi(n);)n=Kl(n,t);return n&&Tr(n)&&vi(n)&&!In(n)?r:n||Fl(e)||r}var au=async function(e){let t=this.getOffsetParent||Jl,r=this.getDimensions,n=await r(e.floating);return{reference:nu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function iu(e){return it(e).direction==="rtl"}var Un={convertOffsetParentRelativeRectToViewportRelativeRect:Yf,getDocumentElement:kt,getClippingRect:ru,getOffsetParent:Jl,getElementRects:au,getClientRects:Xf,getDimensions:ou,getScale:lo,isElement:at,isRTL:iu};var e1=Bl,t1=$l;var r1=(e,t,r)=>{let n=new Map,a={platform:Un,...r},i={...a.platform,_c:n};return Dl(e,t,{...a,platform:i})};function o1(e){return su(e)}function xi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function su(e){for(let t=e;t;t=xi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=xi(e);t;t=xi(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 n1(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},r1(e,t,{strategy:n.strategy,platform:{...Un,getOffsetParent:a=>Un.getOffsetParent(a,o1)},middleware:[t1({crossAxis:!0}),e1({allowedPlacements:[n.placement]})]})}var So=v(M());var Vi=v(K());function cu(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(!Hn(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(!Hn(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(!Hn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Hn(e,t){try{return cu(e,t)}catch{return!1}}function Vo(e,t){return!Hn(e,t)}function a1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Gn(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 i1=v(K(),1);var Si=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Vo,attribute:!1,...t};(0,i1.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 Fn=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 kr=v(K(),1);var s1=v(K(),1);function c1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,s1.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:Vo,...t??{}})}var Wn=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 d1=v(U(),1);var Vn=globalThis,lu=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$v=Symbol();var l1=(e,t)=>{if(lu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Vn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var jn=class extends d1.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 l1(n,t.elementStyles),n}};function f1(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 uo=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},m1,u1=Symbol("constructorPrototype"),p1=Symbol("constructorName"),y1=Symbol("exportpartsDebouncer"),h1=Symbol("dynamicDependenciesLoaded"),fo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};fo.eventName="exportparts-updated";var Pt=class extends jn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[m1]=new Wn(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[y1].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[u1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[p1]&&Object.setPrototypeOf(this,this[u1])}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[h1]||(r[h1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(fo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(fo.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 fo)})}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=f1(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=g=>g!=null&&g.trim().length>0,u=t.filter(f).map(g=>g.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let g of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(_=>_.trim());for(let _ of L)m.add(_)}if(m.size===0){this.exportparts=void 0;return}let y=[...m.values()].flatMap(g=>u.map(S=>`${g}:${S}--${g}`));this.exportparts=[...this.part,...y].join(", ")}};m1=y1;uo([(0,kr.property)()],Pt.prototype,"exportpartsPrefix",void 0);uo([c1([])],Pt.prototype,"exportpartsPrefixes",void 0);uo([(0,kr.property)({reflect:!0})],Pt.prototype,"exportparts",void 0);uo([(0,kr.property)()],Pt.prototype,"customStylesheet",void 0);uo([(0,kr.property)()],Pt.prototype,"elementToFocus",void 0);uo([(0,kr.state)()],Pt.prototype,"useAdoptedStyleSheets",void 0);function Kn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var jo=Symbol("internalReduxEventsUnsubscribers"),or=Symbol("internalStoresUnsubscribers"),Mr=Symbol("internalStores"),du=Gn(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[Mr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Mr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Mr].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Mr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Mr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Mr].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[or].has(s.store):this[or].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[or].set(s,l.subscribe(()=>this.updateFromStores())),this[jo].set(s,[]),Kn(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 y=g=>this[m](g);l.addEventListener(u.eventName,y),this[jo].get(s).push(()=>l.removeEventListener(u.eventName,y))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[or].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[or].has(s)&&this[or].get(s)(),this[or].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=or,r=Mr,n=jo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),g1=class extends du(Pt){};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 Wt(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)===bu}(e)||Array.isArray(e)||!!e[E1]||!!(!((t=e.constructor)===null||t===void 0)&&t[E1])||Ni(e)||Ti(e))}function Pr(e,t,r){r===void 0&&(r=!1),mo(e)===0?(r?Object.keys:ho)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function mo(e){var t=e[ie];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ni(e)?2:Ti(e)?3:0}function po(e,t){return mo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fu(e,t){return mo(e)===2?e.get(t):e[t]}function L1(e,t,r){var n=mo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function A1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ni(e){return yu&&e instanceof Map}function Ti(e){return gu&&e instanceof Set}function nr(e){return e.o||e.t}function ki(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=_1(e);delete t[ie];for(var r=ho(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 Mi(e,t){return t===void 0&&(t=!1),Pi(e)||Wt(e)||!St(e)||(mo(e)>1&&(e.set=e.add=e.clear=e.delete=uu),Object.freeze(e),t&&Pr(e,function(r,n){return Mi(n,!0)},!0)),e}function uu(){st(2)}function Pi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function zt(e){var t=_i[e];return t||st(18,e),t}function pu(e,t){_i[e]||(_i[e]=t)}function Ai(){return Zo}function Ci(e,t){t&&(zt("Patches"),e.u=[],e.s=[],e.v=t)}function Zn(e){Ri(e),e.p.forEach(hu),e.p=null}function Ri(e){e===Zo&&(Zo=e.l)}function b1(e){return Zo={p:[],l:Zo,h:e,m:!0,_:0}}function hu(e){var t=e[ie];t.i===0||t.i===1?t.j():t.g=!0}function Oi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||zt("ES5").S(t,e,n),n?(r[ie].P&&(Zn(t),st(4)),St(e)&&(e=qn(t,e),t.l||Yn(t,e)),t.u&&zt("Patches").M(r[ie].t,e,t.u,t.s)):e=qn(t,r,[]),Zn(t),t.u&&t.v(t.u,t.s),e!==w1?e:void 0}function qn(e,t,r){if(Pi(t))return t;var n=t[ie];if(!n)return Pr(t,function(l,f){return v1(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Yn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ki(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Pr(i,function(l,f){return v1(e,n,a,l,f,r,s)}),Yn(e,a,!1),r&&e.u&&zt("Patches").N(n,r,e.u,e.s)}return n.o}function v1(e,t,r,n,a,i,s){if(Wt(a)){var l=qn(e,a,i&&t&&t.i!==3&&!po(t.R,n)?i.concat(n):void 0);if(L1(r,n,l),!Wt(l))return;e.m=!1}else s&&r.add(a);if(St(a)&&!Pi(a)){if(!e.h.D&&e._<1)return;qn(e,a),t&&t.A.l||Yn(e,a)}}function Yn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Mi(t,r)}function Ei(e,t){var r=e[ie];return(r?nr(r):e)[t]}function x1(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 ar(e){e.P||(e.P=!0,e.l&&ar(e.l))}function Li(e){e.o||(e.o=ki(e.t))}function wi(e,t,r){var n=Ni(t)?zt("MapSet").F(t,r):Ti(t)?zt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Ai(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=qo;s&&(f=[l],u=Ko);var m=Proxy.revocable(f,u),y=m.revoke,g=m.proxy;return l.k=g,l.j=y,g}(t,r):zt("ES5").J(t,r);return(r?r.A:Ai()).p.push(n),n}function mu(e){return Wt(e)||st(22,e),function t(r){if(!St(r))return r;var n,a=r[ie],i=mo(r);if(a){if(!a.P&&(a.i<4||!zt("ES5").K(a)))return a.t;a.I=!0,n=S1(r,i),a.I=!1}else n=S1(r,i);return Pr(n,function(s,l){a&&fu(a.t,s)===l||L1(n,s,t(l))}),i===3?new Set(n):n}(e)}function S1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ki(e)}function R1(){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 qo.get(u,s)},set:function(u){var m=this[ie];qo.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)&&ar(f);break;case 4:r(f)&&ar(f)}}}function r(s){for(var l=s.t,f=s.k,u=ho(f),m=u.length-1;m>=0;m--){var y=u[m];if(y!==ie){var g=l[y];if(g===void 0&&!po(l,y))return!0;var S=f[y],C=S&&S[ie];if(C?C.t!==g:!A1(S,g))return!0}}var L=!!l[ie];return u.length!==ho(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(nr(s)))}var i={};pu("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(y,g){if(y){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=_1(g);delete L[ie];for(var _=ho(L),k=0;k<_.length;k++){var N=_[k];L[N]=e(N,y||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(g),L)}(f,s),m={i:f?5:4,A:l?l.A:Ai(),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?Wt(l)&&l[ie].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var y=m[ie];if(y){var g=y.t,S=y.k,C=y.R,L=y.i;if(L===4)Pr(S,function($){$!==ie&&(g[$]!==void 0||po(g,$)?C[$]||u(S[$]):(C[$]=!0,ar(y)))}),Pr(g,function($){S[$]!==void 0||po(S,$)||(C[$]=!1,ar(y))});else if(L===5){if(n(y)&&(ar(y),C.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)C[_]=!1;else for(var k=g.length;k<S.length;k++)C[k]=!0;for(var N=Math.min(S.length,g.length),D=0;D<N;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 C1,Zo,zi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yu=typeof Map<"u",gu=typeof Set<"u",O1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",w1=zi?Symbol.for("immer-nothing"):((C1={})["immer-nothing"]=!0,C1),E1=zi?Symbol.for("immer-draftable"):"__$immer_draftable",ie=zi?Symbol.for("immer-state"):"__$immer_state";var bu=""+Object.prototype.constructor,ho=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,_1=Object.getOwnPropertyDescriptors||function(e){var t={};return ho(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},_i={},qo={get:function(e,t){if(t===ie)return e;var r=nr(e);if(!po(r,t))return function(a,i,s){var l,f=x1(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===Ei(e.t,t)?(Li(e),e.o[t]=wi(e.A.h,n,e)):n},has:function(e,t){return t in nr(e)},ownKeys:function(e){return Reflect.ownKeys(nr(e))},set:function(e,t,r){var n=x1(nr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Ei(nr(e),t),i=a?.[ie];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(A1(r,a)&&(r!==void 0||po(e.t,t)))return!0;Li(e),ar(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 Ei(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Li(e),ar(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=nr(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)}},Ko={};Pr(qo,function(e,t){Ko[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ko.deleteProperty=function(e,t){return Ko.set.call(this,e,t,void 0)},Ko.set=function(e,t,r){return qo.set.call(this,e[0],t,r,e[0])};var vu=function(){function e(r){var n=this;this.O=O1,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 _=this;L===void 0&&(L=l);for(var k=arguments.length,N=Array(k>1?k-1:0),D=1;D<k;D++)N[D-1]=arguments[D];return f.produce(L,function($){var W;return(W=i).call.apply(W,[_,$].concat(N))})}}var u;if(typeof i!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),St(a)){var m=b1(n),y=wi(n,a,void 0),g=!0;try{u=i(y),g=!1}finally{g?Zn(m):Ri(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return Ci(m,s),Oi(L,m)},function(L){throw Zn(m),L}):(Ci(m,s),Oi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===w1&&(u=void 0),n.D&&Mi(u,!0),s){var S=[],C=[];zt("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,y=Array(m>1?m-1:0),g=1;g<m;g++)y[g-1]=arguments[g];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};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),Wt(r)&&(r=mu(r));var n=b1(this),a=wi(this,r,void 0);return a[ie].C=!0,Ri(n),a},t.finishDraft=function(r,n){var a=r&&r[ie],i=a.A;return Ci(i,n),Oi(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!O1&&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=zt("Patches").$;return Wt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ze=new vu,xu=Ze.produce,ex=Ze.produceWithPatches.bind(Ze),tx=Ze.setAutoFreeze.bind(Ze),rx=Ze.setUseProxies.bind(Ze),ox=Ze.applyPatches.bind(Ze),nx=Ze.createDraft.bind(Ze),ax=Ze.finishDraft.bind(Ze),Xn=xu;function zr(e){"@babel/helpers - typeof";return zr=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},zr(e)}function N1(e,t){if(zr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T1(e){var t=N1(e,"string");return zr(t)=="symbol"?t:t+""}function k1(e,t,r){return(t=T1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M1(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 Ii(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M1(Object(r),!0).forEach(function(n){k1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M1(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 P1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Di=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qn={INIT:"@@redux/INIT"+Di(),REPLACE:"@@redux/REPLACE"+Di(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Di()}};function Su(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 Bi(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(Bi)(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 y(L){if(typeof L!="function")throw new Error(Be(4));if(f)throw new Error(Be(5));var _=!0;return u(),l.push(L),function(){if(_){if(f)throw new Error(Be(6));_=!1,u();var N=l.indexOf(L);l.splice(N,1),s=null}}}function g(L){if(!Su(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 _=s=l,k=0;k<_.length;k++){var N=_[k];N()}return L}function S(L){if(typeof L!="function")throw new Error(Be(10));a=L,g({type:Qn.REPLACE})}function C(){var L,_=y;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Be(11));function D(){N.next&&N.next(m())}D();var $=_(D);return{unsubscribe:$}}},L[P1]=function(){return this},L}return g({type:Qn.INIT}),n={dispatch:g,subscribe:y,getState:m,replaceReducer:S},n[P1]=C,n}function Cu(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Qn.INIT});if(typeof n>"u")throw new Error(Be(12));if(typeof r(void 0,{type:Qn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function z1(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{Cu(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var y;for(var g=!1,S={},C=0;C<i.length;C++){var L=i[C],_=r[L],k=u[L],N=_(k,m);if(typeof N>"u"){var D=m&&m.type;throw new Error(Be(14))}S[L]=N,g=g||N!==k}return g=g||i.length!==Object.keys(u).length,g?S:u}}function yo(){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 I1(){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=yo.apply(void 0,l)(a.dispatch),Ii(Ii({},a),{},{dispatch:i})}}}function D1(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 B1=D1();B1.withExtraArgument=D1;var $i=B1;var F1=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)}}(),Ou=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}}},go=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Eu=Object.defineProperty,Lu=Object.defineProperties,Au=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,Ru=Object.prototype.hasOwnProperty,wu=Object.prototype.propertyIsEnumerable,U1=function(e,t,r){return t in e?Eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},ir=function(e,t){for(var r in t||(t={}))Ru.call(t,r)&&U1(e,r,t[r]);if($1)for(var n=0,a=$1(t);n<a.length;n++){var r=a[n];wu.call(t,r)&&U1(e,r,t[r])}return e},Ui=function(e,t){return Lu(e,Au(t))},_u=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 Nu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yo:yo.apply(null,arguments)},Ox=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Tu(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 ku=function(e){F1(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,go([void 0],r[0].concat(this)))):new(t.bind.apply(t,go([void 0],r.concat(this))))},t}(Array),Mu=function(e){F1(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,go([void 0],r[0].concat(this)))):new(t.bind.apply(t,go([void 0],r.concat(this))))},t}(Array);function Fi(e){return St(e)?Xn(e,function(){}):e}function Pu(e){return typeof e=="boolean"}function zu(){return function(t){return Iu(t)}}function Iu(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 ku;if(r&&(Pu(r)?l.push($i):l.push($i.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var Hi=!0;function W1(e){var t=zu(),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,y=r.enhancers,g=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(Tu(a))S=z1(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),!Hi&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hi&&C.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=I1.apply(void 0,C),_=yo;f&&(_=Nu(ir({trace:!Hi},typeof f=="object"&&f)));var k=new Mu(L),N=k;Array.isArray(g)?N=go([L],g):typeof g=="function"&&(N=g(k));var D=_.apply(void 0,N);return Bi(S,m,D)}function sr(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 ir(ir({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 V1(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 Du(e){return typeof e=="function"}function Bu(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?V1(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(Du(e))f=function(){return Fi(e())};else{var u=Fi(e);f=function(){return u}}function m(y,g){y===void 0&&(y=f());var S=go([i[g.type]],s.filter(function(C){var L=C.matcher;return L(g)}).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(Wt(C)){var _=C,k=L(_,g);return k===void 0?C:k}else{if(St(C))return Xn(C,function(N){return L(N,g)});var k=L(C,g);if(k===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return C},y)}return m.getInitialState=f,m}function $u(e,t){return e+"/"+t}function j1(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:Fi(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var y=n[m],g=$u(t,m),S,C;"reducer"in y?(S=y.reducer,C=y.prepare):S=y,i[m]=S,s[g]=S,l[m]=C?sr(g,C):sr(g)});function f(){var m=typeof e.extraReducers=="function"?V1(e.extraReducers):[e.extraReducers],y=m[0],g=y===void 0?{}:y,S=m[1],C=S===void 0?[]:S,L=m[2],_=L===void 0?void 0:L,k=ir(ir({},g),s);return Bu(r,function(N){for(var D in k)N.addCase(D,k[D]);for(var $=0,W=C;$<W.length;$++){var ne=W[$];N.addMatcher(ne.matcher,ne.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:t,reducer:function(m,y){return u||(u=f()),u(m,y)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Uu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hu=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Uu[Math.random()*64|0];return t},Gu=["name","message","stack","code"],Gi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),H1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Fu=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Gu;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Rx=function(){function e(t,r,n){var a=sr(t+"/fulfilled",function(m,y,g,S){return{payload:m,meta:Ui(ir({},S||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=sr(t+"/pending",function(m,y,g){return{payload:void 0,meta:Ui(ir({},g||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),s=sr(t+"/rejected",function(m,y,g,S,C){return{payload:S,error:(n&&n.serializeError||Fu)(m||"Rejected"),meta:Ui(ir({},C||{}),{arg:g,requestId:y,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(y,g,S){var C=n?.idGenerator?n.idGenerator(m):Hu(),L=new f,_,k=!1;function N($){_=$,L.abort()}var D=function(){return _u(this,null,function(){var $,W,ne,Ge,we,wt,_e;return Ou(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Ge=($=n?.condition)==null?void 0:$.call(n,m,{getState:g,extra:S}),Vu(Ge)?[4,Ge]:[3,2];case 1:Ge=x.sent(),x.label=2;case 2:if(Ge===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,we=new Promise(function(E,H){return L.signal.addEventListener("abort",function(){return H({name:"AbortError",message:_||"Aborted"})})}),y(i(C,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:C,arg:m},{getState:g,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:y,getState:g,extra:S,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(E,H){return new Gi(E,H)},fulfillWithValue:function(E,H){return new H1(E,H)}})).then(function(E){if(E instanceof Gi)throw E;return E instanceof H1?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return ne=x.sent(),[3,5];case 4:return wt=x.sent(),ne=wt instanceof Gi?s(null,C,m,wt.payload,wt.meta):s(wt,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(ne)&&ne.meta.condition,_e||y(ne),[2,ne]}})})}();return Object.assign(D,{abort:N,requestId:C,arg:m,unwrap:function(){return D.then(Wu)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Wu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Vu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var K1="listener",Z1="completed",q1="cancelled",wx="task-"+q1,_x="task-"+Z1,Nx=K1+"-"+q1,Tx=K1+"-"+Z1;var Wi="listenerMiddleware";var kx=sr(Wi+"/add"),Mx=sr(Wi+"/removeAll"),Px=sr(Wi+"/remove");var G1,zx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(G1||(G1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},ju=function(e){return function(t){setTimeout(t,e)}},Ix=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ju(10);R1();var Ku=Gn(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)}}}),Jn=class extends Ku(Object){};window.ftReduxStores||(window.ftReduxStores={});var Y1=class e extends Jn{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(Kn(i))return i;if(a==null)return;let s=j1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=W1({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=a1(s.getInitialState());for(let y of u.keeping)m[y]=(f??m)[y];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 Fn;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 y=u(...m.map(a));return this.reduxStore.dispatch(y),y}: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 ea=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 ta=v(M()),Zu="ft-app-info",Ir=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ir.eventName="authentication-change";var qu={session:(e,t)=>{(0,ta.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new Ir(t.payload)),0))}},I=ta.FtReduxStore.get({name:Zu,reducers:qu,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 X1=v(M()),ra=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},dS=(0,X1.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=>ea.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ra([(0,Vi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ra([(0,Vi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ra([Si({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),ra([Si({store:I.name})],t.prototype,"uiLocale",void 0),t});var Xu=v(J1(),1);var e2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(e2||(e2={}));var t2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(t2||(t2={}));var r2;(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"})(r2||(r2={}));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 n2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(n2||(n2={}));var a2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(a2||(a2={}));var i2;(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"})(i2||(i2={}));var s2;(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"})(s2||(s2={}));var c2;(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"})(c2||(c2={}));var l2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(l2||(l2={}));var d2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(d2||(d2={}));var f2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(f2||(f2={}));var u2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(u2||(u2={}));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 h2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(h2||(h2={}));var m2;(function(e){e.ASC="ASC",e.DESC="DESC"})(m2||(m2={}));var y2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(y2||(y2={}));var g2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(g2||(g2={}));var b2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(b2||(b2={}));var v2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(v2||(v2={}));var x2;(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"})(x2||(x2={}));var S2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(S2||(S2={}));var C2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(C2||(C2={}));var O2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(O2||(O2={}));var E2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(E2||(E2={}));var ye;(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"})(ye||(ye={}));var ct;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ct||(ct={}));var L2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(L2||(L2={}));var A2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(A2||(A2={}));var R2;(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"})(R2||(R2={}));var w2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(w2||(w2={}));var _2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_2||(_2={}));var N2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(N2||(N2={}));var T2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(T2||(T2={}));var k2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(k2||(k2={}));var M2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(M2||(M2={}));var Yu={[ye.PERSONAL_BOOK_SHARE_USER]:[ye.PERSONAL_BOOK_USER],[ye.HTML_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.PDF_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.KHUB_ADMIN]:[ye.CONTENT_PUBLISHER],[ye.ADMIN]:[ye.KHUB_ADMIN,ye.USERS_ADMIN,ye.PORTAL_ADMIN,ye.BEHAVIOR_DATA_USER],[ye.GENERATIVE_AI_EXPORT_USER]:[ye.GENERATIVE_AI_USER]};function P2(e,t){return e===t||(Yu[e]??[]).some(r=>P2(r,t))}function z2(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=>P2(n,t))}var da=v(M());var ji=v(M());var Dr=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 aa=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Dr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dr.await()}};var qe=class extends aa{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 ji.CacheRegistry,this.cache=t?a.commonCache:new ji.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 ia=class extends qe{async listMySearches(){let{session:t}=I.getState();return z2(t,ye.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var sa=class extends qe{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 ca=class extends qe{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 la=class extends qe{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 Qu="ft-user-assets",Ju={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;Zi(e,r,[...Ki(e,r),a]),I2(e,r,1,n),D2(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Zi(e,r,Ki(e,r).map(a=>a.id===n.id?n:a)),D2(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Zi(e,r,Ki(e,r).filter(i=>i.id!==a)),I2(e,r,-1,n)}},B2={[ct.SEARCHES]:"savedSearches",[ct.BOOKMARKS]:"bookmarks",[ct.BOOKS]:void 0,[ct.COLLECTIONS]:void 0},Ki=(e,t)=>{var r;let n=B2[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Zi=(e,t,r)=>{let n=B2[t];n&&(e[n]=r)},I2=(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)}},D2=(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=da.FtReduxStore.get({name:Qu,reducers:Ju,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ct).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),qi=class{constructor(t=new ca,r=new la){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sa,this.savedSearchesService=new ia,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,da.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 qi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ep);var Yi=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Yi;var lt=v(M());var $2,vo=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},tp=Symbol("clearAfterUnitTest"),fa=class extends(0,lt.withEventBus)(qe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$2]=()=>{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 vo({loadedContexts:t})),this.dispatchEvent(new vo({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new vo({loadedContexts:[t]})),this.dispatchEvent(new vo({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,lt.delay)(0).then(()=>n()).catch(()=>null)))}};$2=tp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Yo=window.FluidTopicsI18nService,Xi=window.FluidTopicsCustomI18nService;var U2=v(M()),Qi=class{highlightHtml(t,r,n){(0,U2.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Qi;var H2=v(M());var Ji=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 H2.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 Ji;var G2=v(M());var Xo=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 G2.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var es=class{urlToSearchRequest(t){return Xo.get().parse(t)}searchRequestToUrl(t){return Xo.get().serialize(t)}};window.FluidTopicsUrlService=new es;var lr=v(M());var Br=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Br.eventName="change";var ts=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))}},F2=new ts;var ua=class e extends lr.WithEventBus{static build(){return new e(window.history,F2,()=>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,lr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Br(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(Br.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Br.eventName,t)}currentItem(){return(0,lr.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,lr.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,lr.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=ua.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 W2=v(U());var V2=W2.css`
|
|
534
|
+
`;var Tl=["top","right","bottom","left"],Nl=["start","end"],pi=Tl.reduce((e,t)=>e.concat(t,t+"-"+Nl[0],t+"-"+Nl[1]),[]),Uo=Math.min,tr=Math.max,Ho=Math.round;var xt=e=>({x:e,y:e}),Gf={left:"right",right:"left",bottom:"top",top:"bottom"};function hi(e,t,r){return tr(e,Uo(t,r))}function kn(e,t){return typeof e=="function"?e(t):e}function so(e){return e.split("-")[0]}function rr(e){return e.split("-")[1]}function mi(e){return e==="x"?"y":"x"}function yi(e){return e==="y"?"height":"width"}function Mn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function gi(e){return mi(Mn(e))}function kl(e,t,r){r===void 0&&(r=!1);let n=rr(e),a=gi(e),i=yi(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ui(s)),[s,ui(s)]}function Ml(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function ui(e){let t=so(e);return Gf[t]+e.slice(t.length)}function Ff(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pl(e){return typeof e!="number"?Ff(e):{top:e,right:e,bottom:e,left:e}}function wr(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 zl(e,t,r){let{reference:n,floating:a}=e,i=Mn(t),s=gi(t),l=yi(s),f=so(t),u=i==="y",m=n.x+n.width/2-a.width/2,y=n.y+n.height/2-a.height/2,g=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};break;case"left":S={x:n.x-a.width,y};break;default:S={x:n.x,y:n.y}}switch(rr(t)){case"start":S[s]-=g*(r&&u?-1:1);break;case"end":S[s]+=g*(r&&u?-1:1);break}return S}async function Il(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:y="floating",altBoundary:g=!1,padding:S=0}=kn(t,e),C=Pl(S),_=l[g?y==="floating"?"reference":"floating":y],k=wr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(_)))==null||r?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:f})),N=y==="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=wr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:D,strategy:f}):N);return{top:(k.top-W.top+C.top)/$.y,bottom:(W.bottom-k.bottom+C.bottom)/$.y,left:(k.left-W.left+C.left)/$.x,right:(W.right-k.right+C.right)/$.x}}var Wf=50,Dl=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:Il},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y}=zl(u,n,f),g=n,S=0,C={};for(let L=0;L<i.length;L++){let _=i[L];if(!_)continue;let{name:k,fn:N}=_,{x:D,y:$,data:W,reset:ne}=await N({x:m,y,initialPlacement:n,placement:g,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});m=D??m,y=$??y,C[k]={...C[k],...W},ne&&S<Wf&&(S++,typeof ne=="object"&&(ne.placement&&(g=ne.placement),ne.rects&&(u=ne.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):ne.rects),{x:m,y}=zl(u,g,f)),L=-1)}return{x:m,y,placement:g,strategy:a,middlewareData:C}};function Vf(e,t,r){return(e?[...r.filter(a=>rr(a)===e),...r.filter(a=>rr(a)!==e)]:r.filter(a=>so(a)===a)).filter(a=>e?rr(a)===e||(t?Ml(a)!==a:!1):!0)}var Bl=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:y,allowedPlacements:g=pi,autoAlignment:S=!0,...C}=kn(e,t),L=y!==void 0||g===pi?Vf(y||null,S,g):g,_=await f.detectOverflow(t,C),k=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[k];if(N==null)return{};let D=kl(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:L[0]}};let $=[_[so(N)],_[D[0]],_[D[1]]],W=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:$}],ne=L[k+1];if(ne)return{data:{index:k+1,overflows:W},reset:{placement:ne}};let Ge=W.map(_e=>{let x=rr(_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]),wt=((a=Ge.filter(_e=>_e[2].slice(0,rr(_e[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Ge[0][0];return wt!==l?{data:{index:k+1,overflows:W},reset:{placement:wt}}:{}}}};var $l=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:k=>{let{x:N,y:D}=k;return{x:N,y:D}}},...u}=kn(e,t),m={x:r,y:n},y=await i.detectOverflow(t,u),g=Mn(so(a)),S=mi(g),C=m[S],L=m[g];if(s){let k=S==="y"?"top":"left",N=S==="y"?"bottom":"right",D=C+y[k],$=C-y[N];C=hi(D,C,$)}if(l){let k=g==="y"?"top":"left",N=g==="y"?"bottom":"right",D=L+y[k],$=L-y[N];L=hi(D,L,$)}let _=f.fn({...t,[S]:C,[g]:L});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[S]:s,[g]:l}}}}}};function zn(){return typeof window<"u"}function Nr(e){return Hl(e)?(e.nodeName||"").toLowerCase():"#document"}function We(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kt(e){var t;return(t=(Hl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hl(e){return zn()?e instanceof Node||e instanceof We(e).Node:!1}function at(e){return zn()?e instanceof Element||e instanceof We(e).Element:!1}function Mt(e){return zn()?e instanceof HTMLElement||e instanceof We(e).HTMLElement:!1}function Ul(e){return!zn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof We(e).ShadowRoot}function co(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 Gl(e){return/^(table|td|th)$/.test(Nr(e))}function Go(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var jf=/transform|translate|scale|rotate|perspective|filter/,Kf=/paint|layout|strict|content/,_r=e=>!!e&&e!=="none",bi;function In(e){let t=at(e)?it(e):e;return _r(t.transform)||_r(t.translate)||_r(t.scale)||_r(t.rotate)||_r(t.perspective)||!Dn()&&(_r(t.backdropFilter)||_r(t.filter))||jf.test(t.willChange||"")||Kf.test(t.contain||"")}function Fl(e){let t=Ft(e);for(;Mt(t)&&!Tr(t);){if(In(t))return t;if(Go(t))return null;t=Ft(t)}return null}function Dn(){return bi==null&&(bi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bi}function Tr(e){return/^(html|body|#document)$/.test(Nr(e))}function it(e){return We(e).getComputedStyle(e)}function Fo(e){return at(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ft(e){if(Nr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ul(e)&&e.host||kt(e);return Ul(t)?t.host:t}function Wl(e){let t=Ft(e);return Tr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mt(t)&&co(t)?t:Wl(t)}function Pn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=Wl(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=We(a);if(i){let l=Bn(s);return t.concat(s,s.visualViewport||[],co(a)?a:[],l&&r?Pn(l):[])}else return t.concat(a,Pn(a,[],r))}function Bn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zl(e){let t=it(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Mt(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=Ho(r)!==i||Ho(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function ql(e){return at(e)?e:e.contextElement}function lo(e){let t=ql(e);if(!Mt(t))return xt(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=Zl(t),s=(i?Ho(r.width):r.width)/n,l=(i?Ho(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Zf=xt(0);function Yl(e){let t=We(e);return!Dn()||!t.visualViewport?Zf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==We(e)?!1:t}function Wo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=ql(e),s=xt(1);t&&(n?at(n)&&(s=lo(n)):s=lo(e));let l=qf(i,r,n)?Yl(i):xt(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,m=a.width/s.x,y=a.height/s.y;if(i){let g=We(i),S=n&&at(n)?We(n):n,C=g,L=Bn(C);for(;L&&n&&S!==C;){let _=lo(L),k=L.getBoundingClientRect(),N=it(L),D=k.left+(L.clientLeft+parseFloat(N.paddingLeft))*_.x,$=k.top+(L.clientTop+parseFloat(N.paddingTop))*_.y;f*=_.x,u*=_.y,m*=_.x,y*=_.y,f+=D,u+=$,C=We(L),L=Bn(C)}}return wr({width:m,height:y,x:f,y:u})}function $n(e,t){let r=Fo(e).scrollLeft;return t?t.left+r:Wo(kt(e)).left+r}function Xl(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-$n(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function Yf(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=kt(n),l=t?Go(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=xt(1),m=xt(0),y=Mt(n);if((y||!y&&!i)&&((Nr(n)!=="body"||co(s))&&(f=Fo(n)),y)){let S=Wo(n);u=lo(n),m.x=S.x+n.clientLeft,m.y=S.y+n.clientTop}let g=s&&!y&&!i?Xl(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+g.x,y:r.y*u.y-f.scrollTop*u.y+m.y+g.y}}function Xf(e){return Array.from(e.getClientRects())}function Qf(e){let t=kt(e),r=Fo(e),n=e.ownerDocument.body,a=tr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=tr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+$n(e),l=-r.scrollTop;return it(n).direction==="rtl"&&(s+=tr(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var Vl=25;function Jf(e,t){let r=We(e),n=kt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let m=Dn();(!m||m&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=$n(n);if(u<=0){let m=n.ownerDocument,y=m.body,g=getComputedStyle(y),S=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,C=Math.abs(n.clientWidth-y.clientWidth-S);C<=Vl&&(i-=C)}else u<=Vl&&(i+=u);return{width:i,height:s,x:l,y:f}}function eu(e,t){let r=Wo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Mt(e)?lo(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 jl(e,t,r){let n;if(t==="viewport")n=Jf(e,r);else if(t==="document")n=Qf(kt(e));else if(at(t))n=eu(t,r);else{let a=Yl(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return wr(n)}function Ql(e,t){let r=Ft(e);return r===t||!at(r)||Tr(r)?!1:it(r).position==="fixed"||Ql(r,t)}function tu(e,t){let r=t.get(e);if(r)return r;let n=Pn(e,[],!1).filter(l=>at(l)&&Nr(l)!=="body"),a=null,i=it(e).position==="fixed",s=i?Ft(e):e;for(;at(s)&&!Tr(s);){let l=it(s),f=In(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||co(s)&&!f&&Ql(e,s))?n=n.filter(m=>m!==s):a=l,s=Ft(s)}return t.set(e,n),n}function ru(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?Go(t)?[]:tu(t,this._c):[].concat(r),n],l=jl(t,s[0],a),f=l.top,u=l.right,m=l.bottom,y=l.left;for(let g=1;g<s.length;g++){let S=jl(t,s[g],a);f=tr(S.top,f),u=Uo(S.right,u),m=Uo(S.bottom,m),y=tr(S.left,y)}return{width:u-y,height:m-f,x:y,y:f}}function ou(e){let{width:t,height:r}=Zl(e);return{width:t,height:r}}function nu(e,t,r){let n=Mt(t),a=kt(t),i=r==="fixed",s=Wo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=xt(0);function u(){f.x=$n(a)}if(n||!n&&!i)if((Nr(t)!=="body"||co(a))&&(l=Fo(t)),n){let S=Wo(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?Xl(a,l):xt(0),y=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:y,y:g,width:s.width,height:s.height}}function vi(e){return it(e).position==="static"}function Kl(e,t){if(!Mt(e)||it(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return kt(e)===r&&(r=r.ownerDocument.body),r}function Jl(e,t){let r=We(e);if(Go(e))return r;if(!Mt(e)){let a=Ft(e);for(;a&&!Tr(a);){if(at(a)&&!vi(a))return a;a=Ft(a)}return r}let n=Kl(e,t);for(;n&&Gl(n)&&vi(n);)n=Kl(n,t);return n&&Tr(n)&&vi(n)&&!In(n)?r:n||Fl(e)||r}var au=async function(e){let t=this.getOffsetParent||Jl,r=this.getDimensions,n=await r(e.floating);return{reference:nu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function iu(e){return it(e).direction==="rtl"}var Un={convertOffsetParentRelativeRectToViewportRelativeRect:Yf,getDocumentElement:kt,getClippingRect:ru,getOffsetParent:Jl,getElementRects:au,getClientRects:Xf,getDimensions:ou,getScale:lo,isElement:at,isRTL:iu};var e1=Bl,t1=$l;var r1=(e,t,r)=>{let n=new Map,a={platform:Un,...r},i={...a.platform,_c:n};return Dl(e,t,{...a,platform:i})};function o1(e){return su(e)}function xi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function su(e){for(let t=e;t;t=xi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=xi(e);t;t=xi(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 n1(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},r1(e,t,{strategy:n.strategy,platform:{...Un,getOffsetParent:a=>Un.getOffsetParent(a,o1)},middleware:[t1({crossAxis:!0}),e1({allowedPlacements:[n.placement]})]})}var So=v(M());var Vi=v(K());function cu(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(!Hn(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(!Hn(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(!Hn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Hn(e,t){try{return cu(e,t)}catch{return!1}}function Vo(e,t){return!Hn(e,t)}function a1(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Gn(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 i1=v(K(),1);var Si=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:Vo,attribute:!1,...t};(0,i1.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 Fn=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 kr=v(K(),1);var s1=v(K(),1);function c1(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,s1.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:Vo,...t??{}})}var Wn=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 d1=v(U(),1);var Vn=globalThis,lu=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$v=Symbol();var l1=(e,t)=>{if(lu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=Vn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var jn=class extends d1.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 l1(n,t.elementStyles),n}};function f1(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 uo=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},m1,u1=Symbol("constructorPrototype"),p1=Symbol("constructorName"),y1=Symbol("exportpartsDebouncer"),h1=Symbol("dynamicDependenciesLoaded"),fo=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};fo.eventName="exportparts-updated";var Pt=class extends jn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[m1]=new Wn(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[y1].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[u1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[p1]&&Object.setPrototypeOf(this,this[u1])}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[h1]||(r[h1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(fo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(fo.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 fo)})}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=f1(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=g=>g!=null&&g.trim().length>0,u=t.filter(f).map(g=>g.trim());if(u.length===0){this.exportparts=void 0;return}let m=new Set;for(let g of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=g.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...S,...C].filter(f).map(_=>_.trim());for(let _ of L)m.add(_)}if(m.size===0){this.exportparts=void 0;return}let y=[...m.values()].flatMap(g=>u.map(S=>`${g}:${S}--${g}`));this.exportparts=[...this.part,...y].join(", ")}};m1=y1;uo([(0,kr.property)()],Pt.prototype,"exportpartsPrefix",void 0);uo([c1([])],Pt.prototype,"exportpartsPrefixes",void 0);uo([(0,kr.property)({reflect:!0})],Pt.prototype,"exportparts",void 0);uo([(0,kr.property)()],Pt.prototype,"customStylesheet",void 0);uo([(0,kr.property)()],Pt.prototype,"elementToFocus",void 0);uo([(0,kr.state)()],Pt.prototype,"useAdoptedStyleSheets",void 0);function Kn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var jo=Symbol("internalReduxEventsUnsubscribers"),or=Symbol("internalStoresUnsubscribers"),Mr=Symbol("internalStores"),du=Gn(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[Mr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Mr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Mr].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Mr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Mr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Mr].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[or].has(s.store):this[or].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[or].set(s,l.subscribe(()=>this.updateFromStores())),this[jo].set(s,[]),Kn(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 y=g=>this[m](g);l.addEventListener(u.eventName,y),this[jo].get(s).push(()=>l.removeEventListener(u.eventName,y))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[or].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[or].has(s)&&this[or].get(s)(),this[or].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=or,r=Mr,n=jo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),g1=class extends du(Pt){};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 Wt(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)===bu}(e)||Array.isArray(e)||!!e[E1]||!!(!((t=e.constructor)===null||t===void 0)&&t[E1])||Ni(e)||Ti(e))}function Pr(e,t,r){r===void 0&&(r=!1),mo(e)===0?(r?Object.keys:ho)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function mo(e){var t=e[ie];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Ni(e)?2:Ti(e)?3:0}function po(e,t){return mo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fu(e,t){return mo(e)===2?e.get(t):e[t]}function L1(e,t,r){var n=mo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function A1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Ni(e){return yu&&e instanceof Map}function Ti(e){return gu&&e instanceof Set}function nr(e){return e.o||e.t}function ki(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=_1(e);delete t[ie];for(var r=ho(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 Mi(e,t){return t===void 0&&(t=!1),Pi(e)||Wt(e)||!St(e)||(mo(e)>1&&(e.set=e.add=e.clear=e.delete=uu),Object.freeze(e),t&&Pr(e,function(r,n){return Mi(n,!0)},!0)),e}function uu(){st(2)}function Pi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function zt(e){var t=_i[e];return t||st(18,e),t}function pu(e,t){_i[e]||(_i[e]=t)}function Ai(){return Zo}function Ci(e,t){t&&(zt("Patches"),e.u=[],e.s=[],e.v=t)}function Zn(e){Ri(e),e.p.forEach(hu),e.p=null}function Ri(e){e===Zo&&(Zo=e.l)}function b1(e){return Zo={p:[],l:Zo,h:e,m:!0,_:0}}function hu(e){var t=e[ie];t.i===0||t.i===1?t.j():t.g=!0}function Oi(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||zt("ES5").S(t,e,n),n?(r[ie].P&&(Zn(t),st(4)),St(e)&&(e=qn(t,e),t.l||Yn(t,e)),t.u&&zt("Patches").M(r[ie].t,e,t.u,t.s)):e=qn(t,r,[]),Zn(t),t.u&&t.v(t.u,t.s),e!==w1?e:void 0}function qn(e,t,r){if(Pi(t))return t;var n=t[ie];if(!n)return Pr(t,function(l,f){return v1(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Yn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ki(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Pr(i,function(l,f){return v1(e,n,a,l,f,r,s)}),Yn(e,a,!1),r&&e.u&&zt("Patches").N(n,r,e.u,e.s)}return n.o}function v1(e,t,r,n,a,i,s){if(Wt(a)){var l=qn(e,a,i&&t&&t.i!==3&&!po(t.R,n)?i.concat(n):void 0);if(L1(r,n,l),!Wt(l))return;e.m=!1}else s&&r.add(a);if(St(a)&&!Pi(a)){if(!e.h.D&&e._<1)return;qn(e,a),t&&t.A.l||Yn(e,a)}}function Yn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Mi(t,r)}function Ei(e,t){var r=e[ie];return(r?nr(r):e)[t]}function x1(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 ar(e){e.P||(e.P=!0,e.l&&ar(e.l))}function Li(e){e.o||(e.o=ki(e.t))}function wi(e,t,r){var n=Ni(t)?zt("MapSet").F(t,r):Ti(t)?zt("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Ai(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=qo;s&&(f=[l],u=Ko);var m=Proxy.revocable(f,u),y=m.revoke,g=m.proxy;return l.k=g,l.j=y,g}(t,r):zt("ES5").J(t,r);return(r?r.A:Ai()).p.push(n),n}function mu(e){return Wt(e)||st(22,e),function t(r){if(!St(r))return r;var n,a=r[ie],i=mo(r);if(a){if(!a.P&&(a.i<4||!zt("ES5").K(a)))return a.t;a.I=!0,n=S1(r,i),a.I=!1}else n=S1(r,i);return Pr(n,function(s,l){a&&fu(a.t,s)===l||L1(n,s,t(l))}),i===3?new Set(n):n}(e)}function S1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ki(e)}function R1(){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 qo.get(u,s)},set:function(u){var m=this[ie];qo.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)&&ar(f);break;case 4:r(f)&&ar(f)}}}function r(s){for(var l=s.t,f=s.k,u=ho(f),m=u.length-1;m>=0;m--){var y=u[m];if(y!==ie){var g=l[y];if(g===void 0&&!po(l,y))return!0;var S=f[y],C=S&&S[ie];if(C?C.t!==g:!A1(S,g))return!0}}var L=!!l[ie];return u.length!==ho(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(nr(s)))}var i={};pu("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(y,g){if(y){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,e(C,!0));return S}var L=_1(g);delete L[ie];for(var _=ho(L),k=0;k<_.length;k++){var N=_[k];L[N]=e(N,y||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(g),L)}(f,s),m={i:f?5:4,A:l?l.A:Ai(),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?Wt(l)&&l[ie].A===s&&t(s.p):(s.u&&function u(m){if(m&&typeof m=="object"){var y=m[ie];if(y){var g=y.t,S=y.k,C=y.R,L=y.i;if(L===4)Pr(S,function($){$!==ie&&(g[$]!==void 0||po(g,$)?C[$]||u(S[$]):(C[$]=!0,ar(y)))}),Pr(g,function($){S[$]!==void 0||po(S,$)||(C[$]=!1,ar(y))});else if(L===5){if(n(y)&&(ar(y),C.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)C[_]=!1;else for(var k=g.length;k<S.length;k++)C[k]=!0;for(var N=Math.min(S.length,g.length),D=0;D<N;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 C1,Zo,zi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yu=typeof Map<"u",gu=typeof Set<"u",O1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",w1=zi?Symbol.for("immer-nothing"):((C1={})["immer-nothing"]=!0,C1),E1=zi?Symbol.for("immer-draftable"):"__$immer_draftable",ie=zi?Symbol.for("immer-state"):"__$immer_state";var bu=""+Object.prototype.constructor,ho=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,_1=Object.getOwnPropertyDescriptors||function(e){var t={};return ho(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},_i={},qo={get:function(e,t){if(t===ie)return e;var r=nr(e);if(!po(r,t))return function(a,i,s){var l,f=x1(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===Ei(e.t,t)?(Li(e),e.o[t]=wi(e.A.h,n,e)):n},has:function(e,t){return t in nr(e)},ownKeys:function(e){return Reflect.ownKeys(nr(e))},set:function(e,t,r){var n=x1(nr(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=Ei(nr(e),t),i=a?.[ie];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(A1(r,a)&&(r!==void 0||po(e.t,t)))return!0;Li(e),ar(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 Ei(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Li(e),ar(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=nr(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)}},Ko={};Pr(qo,function(e,t){Ko[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ko.deleteProperty=function(e,t){return Ko.set.call(this,e,t,void 0)},Ko.set=function(e,t,r){return qo.set.call(this,e[0],t,r,e[0])};var vu=function(){function e(r){var n=this;this.O=O1,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 _=this;L===void 0&&(L=l);for(var k=arguments.length,N=Array(k>1?k-1:0),D=1;D<k;D++)N[D-1]=arguments[D];return f.produce(L,function($){var W;return(W=i).call.apply(W,[_,$].concat(N))})}}var u;if(typeof i!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),St(a)){var m=b1(n),y=wi(n,a,void 0),g=!0;try{u=i(y),g=!1}finally{g?Zn(m):Ri(m)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return Ci(m,s),Oi(L,m)},function(L){throw Zn(m),L}):(Ci(m,s),Oi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===w1&&(u=void 0),n.D&&Mi(u,!0),s){var S=[],C=[];zt("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,y=Array(m>1?m-1:0),g=1;g<m;g++)y[g-1]=arguments[g];return n.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};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),Wt(r)&&(r=mu(r));var n=b1(this),a=wi(this,r,void 0);return a[ie].C=!0,Ri(n),a},t.finishDraft=function(r,n){var a=r&&r[ie],i=a.A;return Ci(i,n),Oi(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!O1&&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=zt("Patches").$;return Wt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),Ze=new vu,xu=Ze.produce,ex=Ze.produceWithPatches.bind(Ze),tx=Ze.setAutoFreeze.bind(Ze),rx=Ze.setUseProxies.bind(Ze),ox=Ze.applyPatches.bind(Ze),nx=Ze.createDraft.bind(Ze),ax=Ze.finishDraft.bind(Ze),Xn=xu;function zr(e){"@babel/helpers - typeof";return zr=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},zr(e)}function N1(e,t){if(zr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T1(e){var t=N1(e,"string");return zr(t)=="symbol"?t:t+""}function k1(e,t,r){return(t=T1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M1(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 Ii(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M1(Object(r),!0).forEach(function(n){k1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M1(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 P1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Di=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qn={INIT:"@@redux/INIT"+Di(),REPLACE:"@@redux/REPLACE"+Di(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Di()}};function Su(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 Bi(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(Bi)(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 y(L){if(typeof L!="function")throw new Error(Be(4));if(f)throw new Error(Be(5));var _=!0;return u(),l.push(L),function(){if(_){if(f)throw new Error(Be(6));_=!1,u();var N=l.indexOf(L);l.splice(N,1),s=null}}}function g(L){if(!Su(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 _=s=l,k=0;k<_.length;k++){var N=_[k];N()}return L}function S(L){if(typeof L!="function")throw new Error(Be(10));a=L,g({type:Qn.REPLACE})}function C(){var L,_=y;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Be(11));function D(){N.next&&N.next(m())}D();var $=_(D);return{unsubscribe:$}}},L[P1]=function(){return this},L}return g({type:Qn.INIT}),n={dispatch:g,subscribe:y,getState:m,replaceReducer:S},n[P1]=C,n}function Cu(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:Qn.INIT});if(typeof n>"u")throw new Error(Be(12));if(typeof r(void 0,{type:Qn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Be(13))})}function z1(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{Cu(r)}catch(f){l=f}return function(u,m){if(u===void 0&&(u={}),l)throw l;if(0)var y;for(var g=!1,S={},C=0;C<i.length;C++){var L=i[C],_=r[L],k=u[L],N=_(k,m);if(typeof N>"u"){var D=m&&m.type;throw new Error(Be(14))}S[L]=N,g=g||N!==k}return g=g||i.length!==Object.keys(u).length,g?S:u}}function yo(){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 I1(){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=yo.apply(void 0,l)(a.dispatch),Ii(Ii({},a),{},{dispatch:i})}}}function D1(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 B1=D1();B1.withExtraArgument=D1;var $i=B1;var F1=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)}}(),Ou=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}}},go=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Eu=Object.defineProperty,Lu=Object.defineProperties,Au=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,Ru=Object.prototype.hasOwnProperty,wu=Object.prototype.propertyIsEnumerable,U1=function(e,t,r){return t in e?Eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},ir=function(e,t){for(var r in t||(t={}))Ru.call(t,r)&&U1(e,r,t[r]);if($1)for(var n=0,a=$1(t);n<a.length;n++){var r=a[n];wu.call(t,r)&&U1(e,r,t[r])}return e},Ui=function(e,t){return Lu(e,Au(t))},_u=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 Nu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yo:yo.apply(null,arguments)},Ox=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Tu(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 ku=function(e){F1(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,go([void 0],r[0].concat(this)))):new(t.bind.apply(t,go([void 0],r.concat(this))))},t}(Array),Mu=function(e){F1(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,go([void 0],r[0].concat(this)))):new(t.bind.apply(t,go([void 0],r.concat(this))))},t}(Array);function Fi(e){return St(e)?Xn(e,function(){}):e}function Pu(e){return typeof e=="boolean"}function zu(){return function(t){return Iu(t)}}function Iu(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 ku;if(r&&(Pu(r)?l.push($i):l.push($i.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var Hi=!0;function W1(e){var t=zu(),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,y=r.enhancers,g=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(Tu(a))S=z1(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),!Hi&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hi&&C.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=I1.apply(void 0,C),_=yo;f&&(_=Nu(ir({trace:!Hi},typeof f=="object"&&f)));var k=new Mu(L),N=k;Array.isArray(g)?N=go([L],g):typeof g=="function"&&(N=g(k));var D=_.apply(void 0,N);return Bi(S,m,D)}function sr(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 ir(ir({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 V1(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 Du(e){return typeof e=="function"}function Bu(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?V1(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(Du(e))f=function(){return Fi(e())};else{var u=Fi(e);f=function(){return u}}function m(y,g){y===void 0&&(y=f());var S=go([i[g.type]],s.filter(function(C){var L=C.matcher;return L(g)}).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(Wt(C)){var _=C,k=L(_,g);return k===void 0?C:k}else{if(St(C))return Xn(C,function(N){return L(N,g)});var k=L(C,g);if(k===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return C},y)}return m.getInitialState=f,m}function $u(e,t){return e+"/"+t}function j1(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:Fi(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var y=n[m],g=$u(t,m),S,C;"reducer"in y?(S=y.reducer,C=y.prepare):S=y,i[m]=S,s[g]=S,l[m]=C?sr(g,C):sr(g)});function f(){var m=typeof e.extraReducers=="function"?V1(e.extraReducers):[e.extraReducers],y=m[0],g=y===void 0?{}:y,S=m[1],C=S===void 0?[]:S,L=m[2],_=L===void 0?void 0:L,k=ir(ir({},g),s);return Bu(r,function(N){for(var D in k)N.addCase(D,k[D]);for(var $=0,W=C;$<W.length;$++){var ne=W[$];N.addMatcher(ne.matcher,ne.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:t,reducer:function(m,y){return u||(u=f()),u(m,y)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Uu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hu=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Uu[Math.random()*64|0];return t},Gu=["name","message","stack","code"],Gi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),H1=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),Fu=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Gu;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Rx=function(){function e(t,r,n){var a=sr(t+"/fulfilled",function(m,y,g,S){return{payload:m,meta:Ui(ir({},S||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),i=sr(t+"/pending",function(m,y,g){return{payload:void 0,meta:Ui(ir({},g||{}),{arg:y,requestId:m,requestStatus:"pending"})}}),s=sr(t+"/rejected",function(m,y,g,S,C){return{payload:S,error:(n&&n.serializeError||Fu)(m||"Rejected"),meta:Ui(ir({},C||{}),{arg:g,requestId:y,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(y,g,S){var C=n?.idGenerator?n.idGenerator(m):Hu(),L=new f,_,k=!1;function N($){_=$,L.abort()}var D=function(){return _u(this,null,function(){var $,W,ne,Ge,we,wt,_e;return Ou(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Ge=($=n?.condition)==null?void 0:$.call(n,m,{getState:g,extra:S}),Vu(Ge)?[4,Ge]:[3,2];case 1:Ge=x.sent(),x.label=2;case 2:if(Ge===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,we=new Promise(function(E,H){return L.signal.addEventListener("abort",function(){return H({name:"AbortError",message:_||"Aborted"})})}),y(i(C,m,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:C,arg:m},{getState:g,extra:S}))),[4,Promise.race([we,Promise.resolve(r(m,{dispatch:y,getState:g,extra:S,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(E,H){return new Gi(E,H)},fulfillWithValue:function(E,H){return new H1(E,H)}})).then(function(E){if(E instanceof Gi)throw E;return E instanceof H1?a(E.payload,C,m,E.meta):a(E,C,m)})])];case 3:return ne=x.sent(),[3,5];case 4:return wt=x.sent(),ne=wt instanceof Gi?s(null,C,m,wt.payload,wt.meta):s(wt,C,m),[3,5];case 5:return _e=n&&!n.dispatchConditionRejection&&s.match(ne)&&ne.meta.condition,_e||y(ne),[2,ne]}})})}();return Object.assign(D,{abort:N,requestId:C,arg:m,unwrap:function(){return D.then(Wu)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Wu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Vu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var K1="listener",Z1="completed",q1="cancelled",wx="task-"+q1,_x="task-"+Z1,Nx=K1+"-"+q1,Tx=K1+"-"+Z1;var Wi="listenerMiddleware";var kx=sr(Wi+"/add"),Mx=sr(Wi+"/removeAll"),Px=sr(Wi+"/remove");var G1,zx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(G1||(G1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},ju=function(e){return function(t){setTimeout(t,e)}},Ix=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ju(10);R1();var Ku=Gn(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)}}}),Jn=class extends Ku(Object){};window.ftReduxStores||(window.ftReduxStores={});var Y1=class e extends Jn{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(Kn(i))return i;if(a==null)return;let s=j1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=W1({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=a1(s.getInitialState());for(let y of u.keeping)m[y]=(f??m)[y];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 Fn;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 y=u(...m.map(a));return this.reduxStore.dispatch(y),y}: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 ea=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 ta=v(M()),Zu="ft-app-info",Ir=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ir.eventName="authentication-change";var qu={session:(e,t)=>{(0,ta.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new Ir(t.payload)),0))}},I=ta.FtReduxStore.get({name:Zu,reducers:qu,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 X1=v(M()),ra=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},dS=(0,X1.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=>ea.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ra([(0,Vi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ra([(0,Vi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ra([Si({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),ra([Si({store:I.name})],t.prototype,"uiLocale",void 0),t});var Xu=v(J1(),1);var e2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(e2||(e2={}));var t2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(t2||(t2={}));var r2;(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"})(r2||(r2={}));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 n2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(n2||(n2={}));var a2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(a2||(a2={}));var i2;(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"})(i2||(i2={}));var s2;(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"})(s2||(s2={}));var c2;(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"})(c2||(c2={}));var l2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(l2||(l2={}));var d2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(d2||(d2={}));var f2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(f2||(f2={}));var u2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(u2||(u2={}));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 h2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(h2||(h2={}));var m2;(function(e){e.ASC="ASC",e.DESC="DESC"})(m2||(m2={}));var y2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(y2||(y2={}));var g2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(g2||(g2={}));var b2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(b2||(b2={}));var v2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(v2||(v2={}));var x2;(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"})(x2||(x2={}));var S2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(S2||(S2={}));var C2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(C2||(C2={}));var O2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(O2||(O2={}));var E2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(E2||(E2={}));var ye;(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"})(ye||(ye={}));var ct;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ct||(ct={}));var L2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(L2||(L2={}));var A2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(A2||(A2={}));var R2;(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"})(R2||(R2={}));var w2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(w2||(w2={}));var _2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(_2||(_2={}));var N2;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})(N2||(N2={}));var T2;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(T2||(T2={}));var k2;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(k2||(k2={}));var M2;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(M2||(M2={}));var Yu={[ye.PERSONAL_BOOK_SHARE_USER]:[ye.PERSONAL_BOOK_USER],[ye.HTML_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.PDF_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.KHUB_ADMIN]:[ye.CONTENT_PUBLISHER],[ye.ADMIN]:[ye.KHUB_ADMIN,ye.USERS_ADMIN,ye.PORTAL_ADMIN,ye.BEHAVIOR_DATA_USER],[ye.GENERATIVE_AI_EXPORT_USER]:[ye.GENERATIVE_AI_USER]};function P2(e,t){return e===t||(Yu[e]??[]).some(r=>P2(r,t))}function z2(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=>P2(n,t))}var da=v(M());var ji=v(M());var Dr=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 aa=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Dr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Dr.await()}};var qe=class extends aa{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 ji.CacheRegistry,this.cache=t?a.commonCache:new ji.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 ia=class extends qe{async listMySearches(){let{session:t}=I.getState();return z2(t,ye.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var sa=class extends qe{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 ca=class extends qe{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 la=class extends qe{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 Qu="ft-user-assets",Ju={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;Zi(e,r,[...Ki(e,r),a]),I2(e,r,1,n),D2(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Zi(e,r,Ki(e,r).map(a=>a.id===n.id?n:a)),D2(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Zi(e,r,Ki(e,r).filter(i=>i.id!==a)),I2(e,r,-1,n)}},B2={[ct.SEARCHES]:"savedSearches",[ct.BOOKMARKS]:"bookmarks",[ct.BOOKS]:void 0,[ct.COLLECTIONS]:void 0},Ki=(e,t)=>{var r;let n=B2[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Zi=(e,t,r)=>{let n=B2[t];n&&(e[n]=r)},I2=(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)}},D2=(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=da.FtReduxStore.get({name:Qu,reducers:Ju,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ct).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),qi=class{constructor(t=new ca,r=new la){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sa,this.savedSearchesService=new ia,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=I.getState();(0,da.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 qi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ep);var Yi=class{addCommand(t,r=!1){I.commands.add(t,r)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Yi;var lt=v(M());var $2,vo=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},tp=Symbol("clearAfterUnitTest"),fa=class extends(0,lt.withEventBus)(qe){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$2]=()=>{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 vo({loadedContexts:t})),this.dispatchEvent(new vo({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new vo({loadedContexts:[t]})),this.dispatchEvent(new vo({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,lt.delay)(0).then(()=>n()).catch(()=>null)))}};$2=tp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fa{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fa{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Yo=window.FluidTopicsI18nService,Xi=window.FluidTopicsCustomI18nService;var U2=v(M()),Qi=class{highlightHtml(t,r,n){(0,U2.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Qi;var H2=v(M());var Ji=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 H2.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 Ji;var G2=v(M());var Xo=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 G2.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var es=class{urlToSearchRequest(t){return Xo.get().parse(t)}searchRequestToUrl(t){return Xo.get().serialize(t)}};window.FluidTopicsUrlService=new es;var lr=v(M());var Br=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Br.eventName="change";var ts=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))}},F2=new ts;var ua=class e extends lr.WithEventBus{static build(){return new e(window.history,F2,()=>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,lr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Br(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(Br.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Br.eventName,t)}currentItem(){return(0,lr.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,lr.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,lr.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=ua.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 W2=v(U());var V2=W2.css`
|
|
535
535
|
`;var K2=v(U()),Me=v(K()),Ct=v(M());function j2(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=()=>Dr.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 K2.html`
|
|
536
536
|
<slot></slot>
|
|
537
537
|
`}connectedCallback(){super.connectedCallback(),I.addEventListener(Ir.eventName,this.reloadConfiguration)}disconnectedCallback(){I.addEventListener(Ir.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=>Yo.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",()=>j2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ee.elementDefinitions={};ee.styles=V2;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 Z2=v(M());(0,Z2.customElement)("ft-app-context")(ee);var q2=v(K());var rs=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-]+$/)}},xo=new rs;var rp=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},Jo=Symbol("i18nAttributes"),Y2=Symbol("i18nListAttributes"),X2=Symbol("i18nProperties"),pa=Symbol("i18nContexts"),Qo=Symbol("i18nUnsubs"),ya=(0,So.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?Xi:Yo}i18n(i){let{context:s,key:l,message:f}=i,{custom:u,args:m,argsProvider:y}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let g=m??(y?y(this):[]);return this.getI18nService(u).resolveMessage(s,l,...g)}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(xo.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,y,g)=>g?.context&&g.key&&i(m,y,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...m})}:g;(s=this[Jo])===null||s===void 0||s.forEach((m,y)=>f[y]=u(m,y,f[y])),(l=this[Y2])===null||l===void 0||l.forEach((m,y)=>{var g;return f[y]=(g=f[y])===null||g===void 0?void 0:g.map(S=>u(m,y,S))})}updateI18nProperties(i){var s;(s=this[X2])===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[pa].set(f,{isCustomContext:l}),this[Qo].has(f)||this[Qo].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[pa].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[pa].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Qo].forEach(i=>i()),this[Qo].clear()}}return t=pa,r=Qo,rp([(0,q2.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ha=class extends ya(So.FtLitElement){},ma=class extends ya(So.FtLitElementRedux){};var Q2=v(M());var os=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?xo.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},op=new os;var J2=(e,t)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:Q2.hasChanged,converter:xo,...t}),r[Jo]=(a=r[Jo])!==null&&a!==void 0?a:new Map,r[Jo].set(n,e??{})};var ed=v(U());var td=ed.css`
|
package/build/ft-filter.min.js
CHANGED
|
@@ -45,7 +45,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
45
45
|
input::-webkit-search-results-decoration {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
`;var zd={};var Cs={};X(Cs,{ParametrizedLabelResolver:()=>nn});var nn=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Ks={};X(Ks,{FtCommandQueue:()=>an,FtLitElementRedux:()=>cn,FtReduxStore:()=>zr,FtStateManager:()=>js,ReduxWatcher:()=>la,clearAllStores:()=>X4,isFtReduxStore:()=>co,redux:()=>so,reduxEventListener:()=>h4,reduxReactive:()=>p4,watch:()=>Q4,withRedux:()=>Dd});var p4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},so=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:gt,attribute:!1,...e};v(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:c=>c[o],store:e.store})}},h4=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var an=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function co(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var sn=Symbol("internalReduxEventsUnsubscribers"),tr=Symbol("internalStoresUnsubscribers"),Mr=Symbol("internalStores"),Dd=Me(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Mr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Mr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Mr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Mr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Mr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Mr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let f=this.getStore(s.store);f&&(s.store?this[tr].has(s.store):this[tr].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[tr].set(s,c.subscribe(()=>this.updateFromStores())),this[sn].set(s,[]),co(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||c.name===f.store)){let p=g=>this[h](g);c.addEventListener(f.eventName,p),this[sn].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[tr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[tr].has(s)&&this[tr].get(s)(),this[tr].delete(s),(c=this[sn].get(s))===null||c===void 0||c.forEach(d=>d()),this[sn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=tr,r=Mr,o=sn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),cn=class extends Dd(j){};function st(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ht(t){return!!t&&!!t[ue]}function bt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===C4}(t)||Array.isArray(t)||!!t[Wd]||!!(!((e=t.constructor)===null||e===void 0)&&e[Wd])||Ns(t)||ks(t))}function Pr(t,e,r){r===void 0&&(r=!1),uo(t)===0?(r?Object.keys:fo)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function uo(t){var e=t[ue];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ns(t)?2:ks(t)?3:0}function lo(t,e){return uo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function m4(t,e){return uo(t)===2?t.get(e):t[e]}function Vd(t,e,r){var o=uo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function jd(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ns(t){return x4&&t instanceof Map}function ks(t){return S4&&t instanceof Set}function rr(t){return t.o||t.t}function Ms(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qd(t);delete e[ue];for(var r=fo(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Ps(t,e){return e===void 0&&(e=!1),Is(t)||Ht(t)||!bt(t)||(uo(t)>1&&(t.set=t.add=t.clear=t.delete=g4),Object.freeze(t),e&&Pr(t,function(r,o){return Ps(o,!0)},!0)),t}function g4(){st(2)}function Is(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _t(t){var e=Ts[t];return e||st(18,t),e}function y4(t,e){Ts[t]||(Ts[t]=e)}function Rs(){return dn}function Es(t,e){e&&(_t("Patches"),t.u=[],t.s=[],t.v=e)}function na(t){ws(t),t.p.forEach(b4),t.p=null}function ws(t){t===dn&&(dn=t.l)}function $d(t){return dn={p:[],l:dn,h:t,m:!0,_:0}}function b4(t){var e=t[ue];e.i===0||e.i===1?e.j():e.g=!0}function Os(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||_t("ES5").S(e,t,o),o?(r[ue].P&&(na(e),st(4)),bt(t)&&(t=aa(e,t),e.l||ia(e,t)),e.u&&_t("Patches").M(r[ue].t,t,e.u,e.s)):t=aa(e,r,[]),na(e),e.u&&e.v(e.u,e.s),t!==Zd?t:void 0}function aa(t,e,r){if(Is(e))return e;var o=e[ue];if(!o)return Pr(e,function(c,d){return Bd(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return ia(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ms(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Pr(i,function(c,d){return Bd(t,o,a,c,d,r,s)}),ia(t,a,!1),r&&t.u&&_t("Patches").N(o,r,t.u,t.s)}return o.o}function Bd(t,e,r,o,a,i,s){if(Ht(a)){var c=aa(t,a,i&&e&&e.i!==3&&!lo(e.R,o)?i.concat(o):void 0);if(Vd(r,o,c),!Ht(c))return;t.m=!1}else s&&r.add(a);if(bt(a)&&!Is(a)){if(!t.h.D&&t._<1)return;aa(t,a),e&&e.A.l||ia(t,a)}}function ia(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ps(e,r)}function Ls(t,e){var r=t[ue];return(r?rr(r):t)[e]}function Ud(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function or(t){t.P||(t.P=!0,t.l&&or(t.l))}function As(t){t.o||(t.o=Ms(t.t))}function _s(t,e,r){var o=Ns(e)?_t("MapSet").F(e,r):ks(e)?_t("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Rs(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=fn;s&&(d=[c],f=ln);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):_t("ES5").J(e,r);return(r?r.A:Rs()).p.push(o),o}function v4(t){return Ht(t)||st(22,t),function e(r){if(!bt(r))return r;var o,a=r[ue],i=uo(r);if(a){if(!a.P&&(a.i<4||!_t("ES5").K(a)))return a.t;a.I=!0,o=Hd(r,i),a.I=!1}else o=Hd(r,i);return Pr(o,function(s,c){a&&m4(a.t,s)===c||Vd(o,s,e(c))}),i===3?new Set(o):o}(t)}function Hd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ms(t)}function Kd(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[ue];return fn.get(f,s)},set:function(f){var h=this[ue];fn.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ue];if(!d.P)switch(d.i){case 5:o(d)&&or(d);break;case 4:r(d)&&or(d)}}}function r(s){for(var c=s.t,d=s.k,f=fo(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==ue){var g=c[p];if(g===void 0&&!lo(c,p))return!0;var S=d[p],C=S&&S[ue];if(C?C.t!==g:!jd(S,g))return!0}}var R=!!c[ue];return f.length!==fo(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function a(s){s.g&&st(3,JSON.stringify(rr(s)))}var i={};y4("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=qd(g);delete R[ue];for(var T=fo(R),k=0;k<T.length;k++){var P=T[k];R[P]=t(P,p||!!R[P].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),h={i:d?5:4,A:c?c.A:Rs(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,ue,{value:h,writable:!0}),f},S:function(s,c,d){d?Ht(c)&&c[ue].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[ue];if(p){var g=p.t,S=p.k,C=p.R,R=p.i;if(R===4)Pr(S,function(E){E!==ue&&(g[E]!==void 0||lo(g,E)?C[E]||f(S[E]):(C[E]=!0,or(p)))}),Pr(g,function(E){S[E]!==void 0||lo(S,E)||(C[E]=!1,or(p))});else if(R===5){if(o(p)&&(or(p),C.length=!0),S.length<g.length)for(var T=S.length;T<g.length;T++)C[T]=!1;else for(var k=g.length;k<S.length;k++)C[k]=!0;for(var P=Math.min(S.length,g.length),O=0;O<P;O++)S.hasOwnProperty(O)||(C[O]=!0),C[O]===void 0&&f(S[O])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Fd,dn,zs=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",x4=typeof Map<"u",S4=typeof Set<"u",Gd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zd=zs?Symbol.for("immer-nothing"):((Fd={})["immer-nothing"]=!0,Fd),Wd=zs?Symbol.for("immer-draftable"):"__$immer_draftable",ue=zs?Symbol.for("immer-state"):"__$immer_state";var C4=""+Object.prototype.constructor,fo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qd=Object.getOwnPropertyDescriptors||function(t){var e={};return fo(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Ts={},fn={get:function(t,e){if(e===ue)return t;var r=rr(t);if(!lo(r,e))return function(a,i,s){var c,d=Ud(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!bt(o)?o:o===Ls(t.t,e)?(As(t),t.o[e]=_s(t.A.h,o,t)):o},has:function(t,e){return e in rr(t)},ownKeys:function(t){return Reflect.ownKeys(rr(t))},set:function(t,e,r){var o=Ud(rr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ls(rr(t),e),i=a?.[ue];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(jd(r,a)&&(r!==void 0||lo(t.t,e)))return!0;As(t),or(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ls(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,As(t),or(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=rr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){st(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){st(12)}},ln={};Pr(fn,function(t,e){ln[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ln.deleteProperty=function(t,e){return ln.set.call(this,t,e,void 0)},ln.set=function(t,e,r){return fn.set.call(this,t[0],e,r,t[0])};var E4=function(){function t(r){var o=this;this.O=Gd,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(R){var T=this;R===void 0&&(R=c);for(var k=arguments.length,P=Array(k>1?k-1:0),O=1;O<k;O++)P[O-1]=arguments[O];return d.produce(R,function(E){var w;return(w=i).call.apply(w,[T,E].concat(P))})}}var f;if(typeof i!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),bt(a)){var h=$d(o),p=_s(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?na(h):ws(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(R){return Es(h,s),Os(R,h)},function(R){throw na(h),R}):(Es(h,s),Os(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Zd&&(f=void 0),o.D&&Ps(f,!0),s){var S=[],C=[];_t("Patches").M(a,f,S,C),s(S,C)}return f}st(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return o.produceWithPatches(f,function(S){return a.apply(void 0,[S].concat(p))})};var s,c,d=o.produce(a,i,function(f,h){s=f,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,c]}):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){bt(r)||st(8),Ht(r)&&(r=v4(r));var o=$d(this),a=_s(this,r,void 0);return a[ue].C=!0,ws(o),a},e.finishDraft=function(r,o){var a=r&&r[ue],i=a.A;return Es(i,o),Os(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Gd&&st(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=_t("Patches").$;return Ht(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),Ye=new E4,O4=Ye.produce,tS=Ye.produceWithPatches.bind(Ye),rS=Ye.setAutoFreeze.bind(Ye),oS=Ye.setUseProxies.bind(Ye),nS=Ye.applyPatches.bind(Ye),aS=Ye.createDraft.bind(Ye),iS=Ye.finishDraft.bind(Ye),sa=O4;function Ir(t){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(t)}function Yd(t,e){if(Ir(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ir(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Xd(t){var e=Yd(t,"string");return Ir(e)=="symbol"?e:e+""}function Qd(t,e,r){return(e=Xd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Ds(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jd(Object(r),!0).forEach(function(o){Qd(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function He(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var e1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),$s=function(){return Math.random().toString(36).substring(7).split("").join(".")},ca={INIT:"@@redux/INIT"+$s(),REPLACE:"@@redux/REPLACE"+$s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+$s()}};function L4(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Bs(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(He(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(He(1));return r(Bs)(t,e)}if(typeof t!="function")throw new Error(He(2));var a=t,i=e,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(He(3));return i}function p(R){if(typeof R!="function")throw new Error(He(4));if(d)throw new Error(He(5));var T=!0;return f(),c.push(R),function(){if(T){if(d)throw new Error(He(6));T=!1,f();var P=c.indexOf(R);c.splice(P,1),s=null}}}function g(R){if(!L4(R))throw new Error(He(7));if(typeof R.type>"u")throw new Error(He(8));if(d)throw new Error(He(9));try{d=!0,i=a(i,R)}finally{d=!1}for(var T=s=c,k=0;k<T.length;k++){var P=T[k];P()}return R}function S(R){if(typeof R!="function")throw new Error(He(10));a=R,g({type:ca.REPLACE})}function C(){var R,T=p;return R={subscribe:function(P){if(typeof P!="object"||P===null)throw new Error(He(11));function O(){P.next&&P.next(h())}O();var E=T(O);return{unsubscribe:E}}},R[e1]=function(){return this},R}return g({type:ca.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:S},o[e1]=C,o}function A4(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:ca.INIT});if(typeof o>"u")throw new Error(He(12));if(typeof r(void 0,{type:ca.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(He(13))})}function t1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{A4(r)}catch(d){c=d}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var p;for(var g=!1,S={},C=0;C<i.length;C++){var R=i[C],T=r[R],k=f[R],P=T(k,h);if(typeof P>"u"){var O=h&&h.type;throw new Error(He(14))}S[R]=P,g=g||P!==k}return g=g||i.length!==Object.keys(f).length,g?S:f}}function po(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function r1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(He(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=po.apply(void 0,c)(a.dispatch),Ds(Ds({},a),{},{dispatch:i})}}}function o1(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var n1=o1();n1.withExtraArgument=o1;var Us=n1;var l1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),R4=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(h){return d([f,h])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(h){f=[6,h],a=0}finally{o=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ho=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},w4=Object.defineProperty,_4=Object.defineProperties,T4=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,N4=Object.prototype.hasOwnProperty,k4=Object.prototype.propertyIsEnumerable,i1=function(t,e,r){return e in t?w4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},nr=function(t,e){for(var r in e||(e={}))N4.call(e,r)&&i1(t,r,e[r]);if(a1)for(var o=0,a=a1(e);o<a.length;o++){var r=a[o];k4.call(e,r)&&i1(t,r,e[r])}return t},Hs=function(t,e){return _4(t,T4(e))},M4=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(f){a(f)}},s=function(d){try{c(r.throw(d))}catch(f){a(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var P4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?po:po.apply(null,arguments)},OS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function I4(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var z4=function(t){l1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ho([void 0],r[0].concat(this)))):new(e.bind.apply(e,ho([void 0],r.concat(this))))},e}(Array),D4=function(t){l1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ho([void 0],r[0].concat(this)))):new(e.bind.apply(e,ho([void 0],r.concat(this))))},e}(Array);function Ws(t){return bt(t)?sa(t,function(){}):t}function $4(t){return typeof t=="boolean"}function B4(){return function(e){return U4(e)}}function U4(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=new z4;if(r&&($4(r)?c.push(Us):c.push(Us.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var Fs=!0;function d1(t){var e=B4(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,f=r.preloadedState,h=f===void 0?void 0:f,p=r.enhancers,g=p===void 0?void 0:p,S;if(typeof a=="function")S=a;else if(I4(a))S=t1(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(e),!Fs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Fs&&C.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=r1.apply(void 0,C),T=po;d&&(T=P4(nr({trace:!Fs},typeof d=="object"&&d)));var k=new D4(R),P=k;Array.isArray(g)?P=ho([R],g):typeof g=="function"&&(P=g(k));var O=T.apply(void 0,P);return Bs(S,h,O)}function ar(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return nr(nr({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function f1(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function H4(t){return typeof t=="function"}function F4(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?f1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(H4(t))d=function(){return Ws(t())};else{var f=Ws(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var S=ho([i[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(Ht(C)){var T=C,k=R(T,g);return k===void 0?C:k}else{if(bt(C))return sa(C,function(P){return R(P,g)});var k=R(C,g);if(k===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return C},p)}return h.getInitialState=d,h}function G4(t,e){return t+"/"+e}function u1(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Ws(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=G4(e,h),S,C;"reducer"in p?(S=p.reducer,C=p.prepare):S=p,i[h]=S,s[g]=S,c[h]=C?ar(g,C):ar(g)});function d(){var h=typeof t.extraReducers=="function"?f1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,S=h[1],C=S===void 0?[]:S,R=h[2],T=R===void 0?void 0:R,k=nr(nr({},g),s);return F4(r,function(P){for(var O in k)P.addCase(O,k[O]);for(var E=0,w=C;E<w.length;E++){var D=w[E];P.addMatcher(D.matcher,D.reducer)}T&&P.addDefaultCase(T)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var W4="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",V4=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=W4[Math.random()*64|0];return e},j4=["name","message","stack","code"],Gs=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),s1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),K4=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=j4;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},wS=function(){function t(e,r,o){var a=ar(e+"/fulfilled",function(h,p,g,S){return{payload:h,meta:Hs(nr({},S||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=ar(e+"/pending",function(h,p,g){return{payload:void 0,meta:Hs(nr({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=ar(e+"/rejected",function(h,p,g,S,C){return{payload:S,error:(o&&o.serializeError||K4)(h||"Rejected"),meta:Hs(nr({},C||{}),{arg:g,requestId:p,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(p,g,S){var C=o?.idGenerator?o.idGenerator(h):V4(),R=new d,T,k=!1;function P(E){T=E,R.abort()}var O=function(){return M4(this,null,function(){var E,w,D,Z,J,Q,G;return R4(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),Z=(E=o?.condition)==null?void 0:E.call(o,h,{getState:g,extra:S}),q4(Z)?[4,Z]:[3,2];case 1:Z=b.sent(),b.label=2;case 2:if(Z===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,J=new Promise(function(A,B){return R.signal.addEventListener("abort",function(){return B({name:"AbortError",message:T||"Aborted"})})}),p(i(C,h,(w=o?.getPendingMeta)==null?void 0:w.call(o,{requestId:C,arg:h},{getState:g,extra:S}))),[4,Promise.race([J,Promise.resolve(r(h,{dispatch:p,getState:g,extra:S,requestId:C,signal:R.signal,abort:P,rejectWithValue:function(A,B){return new Gs(A,B)},fulfillWithValue:function(A,B){return new s1(A,B)}})).then(function(A){if(A instanceof Gs)throw A;return A instanceof s1?a(A.payload,C,h,A.meta):a(A,C,h)})])];case 3:return D=b.sent(),[3,5];case 4:return Q=b.sent(),D=Q instanceof Gs?s(null,C,h,Q.payload,Q.meta):s(Q,C,h),[3,5];case 5:return G=o&&!o.dispatchConditionRejection&&s.match(D)&&D.meta.condition,G||p(D),[2,D]}})})}();return Object.assign(O,{abort:P,requestId:C,arg:h,unwrap:function(){return O.then(Z4)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Z4(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function q4(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var p1="listener",h1="completed",m1="cancelled",_S="task-"+m1,TS="task-"+h1,NS=p1+"-"+m1,kS=p1+"-"+h1;var Vs="listenerMiddleware";var MS=ar(Vs+"/add"),PS=ar(Vs+"/removeAll"),IS=ar(Vs+"/remove");var c1,zS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(c1||(c1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Y4=function(t){return function(e){setTimeout(e,t)}},DS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Y4(10);Kd();window.ftReduxStores||(window.ftReduxStores={});var zr=class t extends $t{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(co(i))return i;if(a==null)return;let s=u1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=d1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=Lr(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new an;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function X4(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))co(e)&&e.clear()}var la=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);gt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Q4(t,e,r){return new la(t,e,r).watch()}var js=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Ys={};X(Ys,{scrollHelper:()=>J4});var Zs,da=new Map,qs=class{lock(e,r){if(r){let o=da.get(r);if(o==null||o===e)return da.set(r,e),r}}release(e,r){r&&da.get(r)===e&&da.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of yi(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=Or(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Zs=window.FluidTopicsScrollHelper)!==null&&Zs!==void 0?Zs:new qs;var J4=window.FluidTopicsScrollHelper;var Qs={};X(Qs,{SearchPlaceConverter:()=>bo,SearchPlaceQueryParams:()=>ne,isSearchPlaceQueryParams:()=>e2,serializeRequest:()=>o3});var t3=ku(y1(),1);var b1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(b1||(b1={}));var v1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(v1||(v1={}));var x1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(x1||(x1={}));var S1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(S1||(S1={}));var C1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(C1||(C1={}));var E1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(E1||(E1={}));var O1;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(O1||(O1={}));var L1;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(L1||(L1={}));var A1;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(A1||(A1={}));var R1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(R1||(R1={}));var w1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(w1||(w1={}));var _1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(_1||(_1={}));var T1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(T1||(T1={}));var N1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(N1||(N1={}));var go;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(go||(go={}));var k1;(function(t){t.ASC="ASC",t.DESC="DESC"})(k1||(k1={}));var M1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(M1||(M1={}));var Xs;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Xs||(Xs={}));var H1=t=>Object.keys(Xs).includes(t);var P1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(P1||(P1={}));var I1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(I1||(I1={}));var z1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(z1||(z1={}));var yo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(yo||(yo={}));var F1=t=>Object.keys(yo).includes(t);var D1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(D1||(D1={}));var $1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($1||($1={}));var B1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(B1||(B1={}));var Ee;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Ee||(Ee={}));var ct;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ct||(ct={}));var U1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(U1||(U1={}));var G1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(G1||(G1={}));var W1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(W1||(W1={}));var V1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(V1||(V1={}));var j1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(j1||(j1={}));var K1;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(K1||(K1={}));var Z1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Z1||(Z1={}));var q1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(q1||(q1={}));var Y1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Y1||(Y1={}));var e3={[Ee.PERSONAL_BOOK_SHARE_USER]:[Ee.PERSONAL_BOOK_USER],[Ee.HTML_EXPORT_USER]:[Ee.PERSONAL_BOOK_USER],[Ee.PDF_EXPORT_USER]:[Ee.PERSONAL_BOOK_USER],[Ee.KHUB_ADMIN]:[Ee.CONTENT_PUBLISHER],[Ee.ADMIN]:[Ee.KHUB_ADMIN,Ee.USERS_ADMIN,Ee.PORTAL_ADMIN,Ee.BEHAVIOR_DATA_USER],[Ee.GENERATIVE_AI_EXPORT_USER]:[Ee.GENERATIVE_AI_USER]};function X1(t,e){return t===e||(e3[t]??[]).some(r=>X1(r,e))}function Q1(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>X1(o,e))}function r3(t){return`"${t}"`}function J1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function o3(t,e){return new bo(t).serialize(e)}var ne;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(ne||(ne={}));var n3=new Set(Object.values(ne));function e2(t){return n3.has(t)}var bo=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,f,h,p,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ne.LOCALE,e.contentLocale):C.append(ne.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ne.QUERY,e.query);let R=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(E=>E.valueFilter&&!E.valueFilter.negative))!==null&&i!==void 0?i:[];if(R.length>0){let E=R.map(w=>{var D,Z;let J=((Z=(D=w.valueFilter)===null||D===void 0?void 0:D.values)!==null&&Z!==void 0?Z:[]).map(Q=>this.escapeFilters(Q)).map(Q=>r3(J1(Q))).join("_");return`${w.key}~${J}`}).join("*");C.append(ne.VALUE_FILTERS,E)}let T=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(E=>E.dateFilter))!==null&&c!==void 0?c:[];if(T.length>0){let E=T.map(w=>{var D;return`${w.key}~${(D=w.dateFilter)===null||D===void 0?void 0:D.type.toLowerCase()}`}).join("*");C.append(ne.DATE_FILTERS,E)}let k=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(E=>E.rangeFilter))!==null&&f!==void 0?f:[];if(k.length>0){let E=k.map(w=>{var D,Z;return`${w.key}~${(D=w.rangeFilter)===null||D===void 0?void 0:D.from}_${(Z=w.rangeFilter)===null||Z===void 0?void 0:Z.to}`}).join("*");C.append(ne.RANGE_FILTERS,E)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ne.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ne.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ne.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((g=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ne.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ne.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let P=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let E in P)C.append(E,P[E]);let O=new Array;return C.forEach((E,w)=>{O.push(this.encodeQueryString(w)+"="+this.encodeQueryString(E))}),encodeURI(O.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(k){console.warn("Could not decode search request query params, fallback on raw value",k)}let d=new URLSearchParams(e),f=d.get(ne.LOCALE)==="all"?void 0:d.get(ne.LOCALE),h=((r=d.get(ne.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(ne.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(ne.SCOPE))!==null&&a!==void 0?a:"default",S=+((i=d.get(ne.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),C=d.get(ne.KEYWORD_MATCH),R=C?C.toUpperCase()===go.MANDATORY?go.MANDATORY:go.OPTIONAL:void 0,T={};for(let k of d.keys())e2(k)||(T[k]=d.get(k));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ne.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:H1(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Or(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:T}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(ne.FILTERS)&&(d=this.parseValueFilters((r=e.get(ne.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ne.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(ne.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(ne.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(ne.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ne.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(J1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:yo[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replace(a,r);return e}parseLegacyPeriodFilter(e){if(F1(e))return[{key:"ft:lastEdition",dateFilter:{type:yo[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var tc={};X(tc,{toFtFormComponent:()=>ec});var Js=Symbol("elementInternals"),ec=Me(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Js].form}constructor(...o){super(o),this[Js]=this.attachInternals()}setFormValue(o){this[Js].setFormValue(o)}}return e});var rc={};X(rc,{DateFormatter:()=>Dr});var Dr=class{static format(e,r,o,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a)):this.getIntlDateTime(e,r,o,a)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(i);if(!a)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${c}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var nc={};X(nc,{ALL_KEYS_VALUE:()=>oc,SameWindowStorageEvent:()=>vo});var oc="__all__",vo=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==oc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new vo(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new vo(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new vo(oc))}});var ic={};X(ic,{FocusMainContentEvent:()=>ac});var ac=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var t2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function a3(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function i3(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",a3);document.addEventListener("click",i3);var r2=I`
|
|
48
|
+
`;var zd={};var Cs={};X(Cs,{ParametrizedLabelResolver:()=>nn});var nn=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Ks={};X(Ks,{FtCommandQueue:()=>an,FtLitElementRedux:()=>cn,FtReduxStore:()=>zr,FtStateManager:()=>js,ReduxWatcher:()=>la,clearAllStores:()=>X4,isFtReduxStore:()=>co,redux:()=>so,reduxEventListener:()=>h4,reduxReactive:()=>p4,watch:()=>Q4,withRedux:()=>Dd});var p4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},so=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:gt,attribute:!1,...e};v(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:c=>c[o],store:e.store})}},h4=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var an=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function co(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var sn=Symbol("internalReduxEventsUnsubscribers"),tr=Symbol("internalStoresUnsubscribers"),Mr=Symbol("internalStores"),Dd=Me(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Mr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Mr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Mr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Mr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Mr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Mr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let f=this.getStore(s.store);f&&(s.store?this[tr].has(s.store):this[tr].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[tr].set(s,c.subscribe(()=>this.updateFromStores())),this[sn].set(s,[]),co(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,h)=>{if(typeof this[h]=="function"&&(!f.store||c.name===f.store)){let p=g=>this[h](g);c.addEventListener(f.eventName,p),this[sn].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[tr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[tr].has(s)&&this[tr].get(s)(),this[tr].delete(s),(c=this[sn].get(s))===null||c===void 0||c.forEach(d=>d()),this[sn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=tr,r=Mr,o=sn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),cn=class extends Dd(j){};function st(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ht(t){return!!t&&!!t[ue]}function bt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===C4}(t)||Array.isArray(t)||!!t[Wd]||!!(!((e=t.constructor)===null||e===void 0)&&e[Wd])||Ns(t)||ks(t))}function Pr(t,e,r){r===void 0&&(r=!1),uo(t)===0?(r?Object.keys:fo)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function uo(t){var e=t[ue];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ns(t)?2:ks(t)?3:0}function lo(t,e){return uo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function m4(t,e){return uo(t)===2?t.get(e):t[e]}function Vd(t,e,r){var o=uo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function jd(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ns(t){return x4&&t instanceof Map}function ks(t){return S4&&t instanceof Set}function rr(t){return t.o||t.t}function Ms(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=qd(t);delete e[ue];for(var r=fo(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Ps(t,e){return e===void 0&&(e=!1),Is(t)||Ht(t)||!bt(t)||(uo(t)>1&&(t.set=t.add=t.clear=t.delete=g4),Object.freeze(t),e&&Pr(t,function(r,o){return Ps(o,!0)},!0)),t}function g4(){st(2)}function Is(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function _t(t){var e=Ts[t];return e||st(18,t),e}function y4(t,e){Ts[t]||(Ts[t]=e)}function Rs(){return dn}function Es(t,e){e&&(_t("Patches"),t.u=[],t.s=[],t.v=e)}function na(t){ws(t),t.p.forEach(b4),t.p=null}function ws(t){t===dn&&(dn=t.l)}function $d(t){return dn={p:[],l:dn,h:t,m:!0,_:0}}function b4(t){var e=t[ue];e.i===0||e.i===1?e.j():e.g=!0}function Os(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||_t("ES5").S(e,t,o),o?(r[ue].P&&(na(e),st(4)),bt(t)&&(t=aa(e,t),e.l||ia(e,t)),e.u&&_t("Patches").M(r[ue].t,t,e.u,e.s)):t=aa(e,r,[]),na(e),e.u&&e.v(e.u,e.s),t!==Zd?t:void 0}function aa(t,e,r){if(Is(e))return e;var o=e[ue];if(!o)return Pr(e,function(c,d){return Bd(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return ia(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ms(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Pr(i,function(c,d){return Bd(t,o,a,c,d,r,s)}),ia(t,a,!1),r&&t.u&&_t("Patches").N(o,r,t.u,t.s)}return o.o}function Bd(t,e,r,o,a,i,s){if(Ht(a)){var c=aa(t,a,i&&e&&e.i!==3&&!lo(e.R,o)?i.concat(o):void 0);if(Vd(r,o,c),!Ht(c))return;t.m=!1}else s&&r.add(a);if(bt(a)&&!Is(a)){if(!t.h.D&&t._<1)return;aa(t,a),e&&e.A.l||ia(t,a)}}function ia(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ps(e,r)}function Ls(t,e){var r=t[ue];return(r?rr(r):t)[e]}function Ud(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function or(t){t.P||(t.P=!0,t.l&&or(t.l))}function As(t){t.o||(t.o=Ms(t.t))}function _s(t,e,r){var o=Ns(e)?_t("MapSet").F(e,r):ks(e)?_t("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Rs(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=fn;s&&(d=[c],f=ln);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):_t("ES5").J(e,r);return(r?r.A:Rs()).p.push(o),o}function v4(t){return Ht(t)||st(22,t),function e(r){if(!bt(r))return r;var o,a=r[ue],i=uo(r);if(a){if(!a.P&&(a.i<4||!_t("ES5").K(a)))return a.t;a.I=!0,o=Hd(r,i),a.I=!1}else o=Hd(r,i);return Pr(o,function(s,c){a&&m4(a.t,s)===c||Vd(o,s,e(c))}),i===3?new Set(o):o}(t)}function Hd(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ms(t)}function Kd(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var f=this[ue];return fn.get(f,s)},set:function(f){var h=this[ue];fn.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ue];if(!d.P)switch(d.i){case 5:o(d)&&or(d);break;case 4:r(d)&&or(d)}}}function r(s){for(var c=s.t,d=s.k,f=fo(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==ue){var g=c[p];if(g===void 0&&!lo(c,p))return!0;var S=d[p],C=S&&S[ue];if(C?C.t!==g:!jd(S,g))return!0}}var R=!!c[ue];return f.length!==fo(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var f=0;f<c.length;f++)if(!c.hasOwnProperty(f))return!0;return!1}function a(s){s.g&&st(3,JSON.stringify(rr(s)))}var i={};y4("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=qd(g);delete R[ue];for(var T=fo(R),k=0;k<T.length;k++){var P=T[k];R[P]=t(P,p||!!R[P].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),h={i:d?5:4,A:c?c.A:Rs(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,ue,{value:h,writable:!0}),f},S:function(s,c,d){d?Ht(c)&&c[ue].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[ue];if(p){var g=p.t,S=p.k,C=p.R,R=p.i;if(R===4)Pr(S,function(E){E!==ue&&(g[E]!==void 0||lo(g,E)?C[E]||f(S[E]):(C[E]=!0,or(p)))}),Pr(g,function(E){S[E]!==void 0||lo(S,E)||(C[E]=!1,or(p))});else if(R===5){if(o(p)&&(or(p),C.length=!0),S.length<g.length)for(var T=S.length;T<g.length;T++)C[T]=!1;else for(var k=g.length;k<S.length;k++)C[k]=!0;for(var P=Math.min(S.length,g.length),O=0;O<P;O++)S.hasOwnProperty(O)||(C[O]=!0),C[O]===void 0&&f(S[O])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Fd,dn,zs=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",x4=typeof Map<"u",S4=typeof Set<"u",Gd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Zd=zs?Symbol.for("immer-nothing"):((Fd={})["immer-nothing"]=!0,Fd),Wd=zs?Symbol.for("immer-draftable"):"__$immer_draftable",ue=zs?Symbol.for("immer-state"):"__$immer_state";var C4=""+Object.prototype.constructor,fo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,qd=Object.getOwnPropertyDescriptors||function(t){var e={};return fo(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Ts={},fn={get:function(t,e){if(e===ue)return t;var r=rr(t);if(!lo(r,e))return function(a,i,s){var c,d=Ud(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!bt(o)?o:o===Ls(t.t,e)?(As(t),t.o[e]=_s(t.A.h,o,t)):o},has:function(t,e){return e in rr(t)},ownKeys:function(t){return Reflect.ownKeys(rr(t))},set:function(t,e,r){var o=Ud(rr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ls(rr(t),e),i=a?.[ue];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(jd(r,a)&&(r!==void 0||lo(t.t,e)))return!0;As(t),or(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ls(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,As(t),or(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=rr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){st(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){st(12)}},ln={};Pr(fn,function(t,e){ln[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ln.deleteProperty=function(t,e){return ln.set.call(this,t,e,void 0)},ln.set=function(t,e,r){return fn.set.call(this,t[0],e,r,t[0])};var E4=function(){function t(r){var o=this;this.O=Gd,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(R){var T=this;R===void 0&&(R=c);for(var k=arguments.length,P=Array(k>1?k-1:0),O=1;O<k;O++)P[O-1]=arguments[O];return d.produce(R,function(E){var w;return(w=i).call.apply(w,[T,E].concat(P))})}}var f;if(typeof i!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),bt(a)){var h=$d(o),p=_s(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?na(h):ws(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(R){return Es(h,s),Os(R,h)},function(R){throw na(h),R}):(Es(h,s),Os(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===Zd&&(f=void 0),o.D&&Ps(f,!0),s){var S=[],C=[];_t("Patches").M(a,f,S,C),s(S,C)}return f}st(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(f){for(var h=arguments.length,p=Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return o.produceWithPatches(f,function(S){return a.apply(void 0,[S].concat(p))})};var s,c,d=o.produce(a,i,function(f,h){s=f,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,c]}):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){bt(r)||st(8),Ht(r)&&(r=v4(r));var o=$d(this),a=_s(this,r,void 0);return a[ue].C=!0,ws(o),a},e.finishDraft=function(r,o){var a=r&&r[ue],i=a.A;return Es(i,o),Os(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Gd&&st(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=_t("Patches").$;return Ht(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),Ye=new E4,O4=Ye.produce,tS=Ye.produceWithPatches.bind(Ye),rS=Ye.setAutoFreeze.bind(Ye),oS=Ye.setUseProxies.bind(Ye),nS=Ye.applyPatches.bind(Ye),aS=Ye.createDraft.bind(Ye),iS=Ye.finishDraft.bind(Ye),sa=O4;function Ir(t){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ir(t)}function Yd(t,e){if(Ir(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ir(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Xd(t){var e=Yd(t,"string");return Ir(e)=="symbol"?e:e+""}function Qd(t,e,r){return(e=Xd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Ds(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Jd(Object(r),!0).forEach(function(o){Qd(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function He(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var e1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),$s=function(){return Math.random().toString(36).substring(7).split("").join(".")},ca={INIT:"@@redux/INIT"+$s(),REPLACE:"@@redux/REPLACE"+$s(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+$s()}};function L4(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Bs(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(He(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(He(1));return r(Bs)(t,e)}if(typeof t!="function")throw new Error(He(2));var a=t,i=e,s=[],c=s,d=!1;function f(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(He(3));return i}function p(R){if(typeof R!="function")throw new Error(He(4));if(d)throw new Error(He(5));var T=!0;return f(),c.push(R),function(){if(T){if(d)throw new Error(He(6));T=!1,f();var P=c.indexOf(R);c.splice(P,1),s=null}}}function g(R){if(!L4(R))throw new Error(He(7));if(typeof R.type>"u")throw new Error(He(8));if(d)throw new Error(He(9));try{d=!0,i=a(i,R)}finally{d=!1}for(var T=s=c,k=0;k<T.length;k++){var P=T[k];P()}return R}function S(R){if(typeof R!="function")throw new Error(He(10));a=R,g({type:ca.REPLACE})}function C(){var R,T=p;return R={subscribe:function(P){if(typeof P!="object"||P===null)throw new Error(He(11));function O(){P.next&&P.next(h())}O();var E=T(O);return{unsubscribe:E}}},R[e1]=function(){return this},R}return g({type:ca.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:S},o[e1]=C,o}function A4(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:ca.INIT});if(typeof o>"u")throw new Error(He(12));if(typeof r(void 0,{type:ca.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(He(13))})}function t1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{A4(r)}catch(d){c=d}return function(f,h){if(f===void 0&&(f={}),c)throw c;if(0)var p;for(var g=!1,S={},C=0;C<i.length;C++){var R=i[C],T=r[R],k=f[R],P=T(k,h);if(typeof P>"u"){var O=h&&h.type;throw new Error(He(14))}S[R]=P,g=g||P!==k}return g=g||i.length!==Object.keys(f).length,g?S:f}}function po(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function r1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(He(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=po.apply(void 0,c)(a.dispatch),Ds(Ds({},a),{},{dispatch:i})}}}function o1(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var n1=o1();n1.withExtraArgument=o1;var Us=n1;var l1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),R4=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(f){return function(h){return d([f,h])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=f[0]&2?a.return:f[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,f[1])).done)return i;switch(a=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,a=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){r.label=f[1];break}if(f[0]===6&&r.label<i[1]){r.label=i[1],i=f;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(f);break}i[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(h){f=[6,h],a=0}finally{o=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ho=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},w4=Object.defineProperty,_4=Object.defineProperties,T4=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,N4=Object.prototype.hasOwnProperty,k4=Object.prototype.propertyIsEnumerable,i1=function(t,e,r){return e in t?w4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},nr=function(t,e){for(var r in e||(e={}))N4.call(e,r)&&i1(t,r,e[r]);if(a1)for(var o=0,a=a1(e);o<a.length;o++){var r=a[o];k4.call(e,r)&&i1(t,r,e[r])}return t},Hs=function(t,e){return _4(t,T4(e))},M4=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(f){a(f)}},s=function(d){try{c(r.throw(d))}catch(f){a(f)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var P4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?po:po.apply(null,arguments)},OS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function I4(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var z4=function(t){l1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ho([void 0],r[0].concat(this)))):new(e.bind.apply(e,ho([void 0],r.concat(this))))},e}(Array),D4=function(t){l1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ho([void 0],r[0].concat(this)))):new(e.bind.apply(e,ho([void 0],r.concat(this))))},e}(Array);function Ws(t){return bt(t)?sa(t,function(){}):t}function $4(t){return typeof t=="boolean"}function B4(){return function(e){return U4(e)}}function U4(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=new z4;if(r&&($4(r)?c.push(Us):c.push(Us.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var Fs=!0;function d1(t){var e=B4(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,f=r.preloadedState,h=f===void 0?void 0:f,p=r.enhancers,g=p===void 0?void 0:p,S;if(typeof a=="function")S=a;else if(I4(a))S=t1(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(e),!Fs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Fs&&C.some(function(E){return typeof E!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=r1.apply(void 0,C),T=po;d&&(T=P4(nr({trace:!Fs},typeof d=="object"&&d)));var k=new D4(R),P=k;Array.isArray(g)?P=ho([R],g):typeof g=="function"&&(P=g(k));var O=T.apply(void 0,P);return Bs(S,h,O)}function ar(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return nr(nr({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function f1(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function H4(t){return typeof t=="function"}function F4(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?f1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(H4(t))d=function(){return Ws(t())};else{var f=Ws(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var S=ho([i[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(Ht(C)){var T=C,k=R(T,g);return k===void 0?C:k}else{if(bt(C))return sa(C,function(P){return R(P,g)});var k=R(C,g);if(k===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return C},p)}return h.getInitialState=d,h}function G4(t,e){return t+"/"+e}function u1(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Ws(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=G4(e,h),S,C;"reducer"in p?(S=p.reducer,C=p.prepare):S=p,i[h]=S,s[g]=S,c[h]=C?ar(g,C):ar(g)});function d(){var h=typeof t.extraReducers=="function"?f1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,S=h[1],C=S===void 0?[]:S,R=h[2],T=R===void 0?void 0:R,k=nr(nr({},g),s);return F4(r,function(P){for(var O in k)P.addCase(O,k[O]);for(var E=0,w=C;E<w.length;E++){var D=w[E];P.addMatcher(D.matcher,D.reducer)}T&&P.addDefaultCase(T)})}var f;return{name:e,reducer:function(h,p){return f||(f=d()),f(h,p)},actions:c,caseReducers:i,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var W4="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",V4=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=W4[Math.random()*64|0];return e},j4=["name","message","stack","code"],Gs=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),s1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),K4=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=j4;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},wS=function(){function t(e,r,o){var a=ar(e+"/fulfilled",function(h,p,g,S){return{payload:h,meta:Hs(nr({},S||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=ar(e+"/pending",function(h,p,g){return{payload:void 0,meta:Hs(nr({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=ar(e+"/rejected",function(h,p,g,S,C){return{payload:S,error:(o&&o.serializeError||K4)(h||"Rejected"),meta:Hs(nr({},C||{}),{arg:g,requestId:p,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function f(h){return function(p,g,S){var C=o?.idGenerator?o.idGenerator(h):V4(),R=new d,T,k=!1;function P(E){T=E,R.abort()}var O=function(){return M4(this,null,function(){var E,w,D,Z,J,Q,G;return R4(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),Z=(E=o?.condition)==null?void 0:E.call(o,h,{getState:g,extra:S}),q4(Z)?[4,Z]:[3,2];case 1:Z=b.sent(),b.label=2;case 2:if(Z===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,J=new Promise(function(A,B){return R.signal.addEventListener("abort",function(){return B({name:"AbortError",message:T||"Aborted"})})}),p(i(C,h,(w=o?.getPendingMeta)==null?void 0:w.call(o,{requestId:C,arg:h},{getState:g,extra:S}))),[4,Promise.race([J,Promise.resolve(r(h,{dispatch:p,getState:g,extra:S,requestId:C,signal:R.signal,abort:P,rejectWithValue:function(A,B){return new Gs(A,B)},fulfillWithValue:function(A,B){return new s1(A,B)}})).then(function(A){if(A instanceof Gs)throw A;return A instanceof s1?a(A.payload,C,h,A.meta):a(A,C,h)})])];case 3:return D=b.sent(),[3,5];case 4:return Q=b.sent(),D=Q instanceof Gs?s(null,C,h,Q.payload,Q.meta):s(Q,C,h),[3,5];case 5:return G=o&&!o.dispatchConditionRejection&&s.match(D)&&D.meta.condition,G||p(D),[2,D]}})})}();return Object.assign(O,{abort:P,requestId:C,arg:h,unwrap:function(){return O.then(Z4)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Z4(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function q4(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var p1="listener",h1="completed",m1="cancelled",_S="task-"+m1,TS="task-"+h1,NS=p1+"-"+m1,kS=p1+"-"+h1;var Vs="listenerMiddleware";var MS=ar(Vs+"/add"),PS=ar(Vs+"/removeAll"),IS=ar(Vs+"/remove");var c1,zS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(c1||(c1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Y4=function(t){return function(e){setTimeout(e,t)}},DS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Y4(10);Kd();window.ftReduxStores||(window.ftReduxStores={});var zr=class t extends $t{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(co(i))return i;if(a==null)return;let s=u1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=d1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=Lr(s.getInitialState());for(let p of f.keeping)h[p]=(d??h)[p];return h}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new an;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,f=i[d];return f?(...h)=>{let p=f(...h.map(a));return this.reduxStore.dispatch(p),p}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function X4(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))co(e)&&e.clear()}var la=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);gt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Q4(t,e,r){return new la(t,e,r).watch()}var js=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Ys={};X(Ys,{scrollHelper:()=>J4});var Zs,da=new Map,qs=class{lock(e,r){if(r){let o=da.get(r);if(o==null||o===e)return da.set(r,e),r}}release(e,r){r&&da.get(r)===e&&da.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of yi(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=Or(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Zs=window.FluidTopicsScrollHelper)!==null&&Zs!==void 0?Zs:new qs;var J4=window.FluidTopicsScrollHelper;var Qs={};X(Qs,{SearchPlaceConverter:()=>bo,SearchPlaceQueryParams:()=>ne,isSearchPlaceQueryParams:()=>e2,serializeRequest:()=>o3});var t3=ku(y1(),1);var b1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(b1||(b1={}));var v1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(v1||(v1={}));var x1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(x1||(x1={}));var S1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(S1||(S1={}));var C1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(C1||(C1={}));var E1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(E1||(E1={}));var O1;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(O1||(O1={}));var L1;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(L1||(L1={}));var A1;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(A1||(A1={}));var R1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(R1||(R1={}));var w1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(w1||(w1={}));var _1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(_1||(_1={}));var T1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(T1||(T1={}));var N1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(N1||(N1={}));var go;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(go||(go={}));var k1;(function(t){t.ASC="ASC",t.DESC="DESC"})(k1||(k1={}));var M1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(M1||(M1={}));var Xs;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Xs||(Xs={}));var H1=t=>Object.keys(Xs).includes(t);var P1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(P1||(P1={}));var I1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(I1||(I1={}));var z1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(z1||(z1={}));var yo;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(yo||(yo={}));var F1=t=>Object.keys(yo).includes(t);var D1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(D1||(D1={}));var $1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($1||($1={}));var B1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(B1||(B1={}));var Ee;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Ee||(Ee={}));var ct;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ct||(ct={}));var U1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(U1||(U1={}));var G1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(G1||(G1={}));var W1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(W1||(W1={}));var V1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(V1||(V1={}));var j1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(j1||(j1={}));var K1;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(K1||(K1={}));var Z1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Z1||(Z1={}));var q1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(q1||(q1={}));var Y1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Y1||(Y1={}));var e3={[Ee.PERSONAL_BOOK_SHARE_USER]:[Ee.PERSONAL_BOOK_USER],[Ee.HTML_EXPORT_USER]:[Ee.PERSONAL_BOOK_USER],[Ee.PDF_EXPORT_USER]:[Ee.PERSONAL_BOOK_USER],[Ee.KHUB_ADMIN]:[Ee.CONTENT_PUBLISHER],[Ee.ADMIN]:[Ee.KHUB_ADMIN,Ee.USERS_ADMIN,Ee.PORTAL_ADMIN,Ee.BEHAVIOR_DATA_USER],[Ee.GENERATIVE_AI_EXPORT_USER]:[Ee.GENERATIVE_AI_USER]};function X1(t,e){return t===e||(e3[t]??[]).some(r=>X1(r,e))}function Q1(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>X1(o,e))}function r3(t){return`"${t}"`}function J1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function o3(t,e){return new bo(t).serialize(e)}var ne;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(ne||(ne={}));var n3=new Set(Object.values(ne));function e2(t){return n3.has(t)}var bo=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,f,h,p,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ne.LOCALE,e.contentLocale):C.append(ne.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ne.QUERY,e.query);let R=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(E=>E.valueFilter&&!E.valueFilter.negative))!==null&&i!==void 0?i:[];if(R.length>0){let E=R.map(w=>{var D,Z;let J=((Z=(D=w.valueFilter)===null||D===void 0?void 0:D.values)!==null&&Z!==void 0?Z:[]).map(Q=>this.escapeFilters(Q)).map(Q=>r3(J1(Q))).join("_");return`${w.key}~${J}`}).join("*");C.append(ne.VALUE_FILTERS,E)}let T=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(E=>E.dateFilter))!==null&&c!==void 0?c:[];if(T.length>0){let E=T.map(w=>{var D;return`${w.key}~${(D=w.dateFilter)===null||D===void 0?void 0:D.type.toLowerCase()}`}).join("*");C.append(ne.DATE_FILTERS,E)}let k=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(E=>E.rangeFilter))!==null&&f!==void 0?f:[];if(k.length>0){let E=k.map(w=>{var D,Z;return`${w.key}~${(D=w.rangeFilter)===null||D===void 0?void 0:D.from}_${(Z=w.rangeFilter)===null||Z===void 0?void 0:Z.to}`}).join("*");C.append(ne.RANGE_FILTERS,E)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ne.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ne.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ne.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((g=(p=e.paging)===null||p===void 0?void 0:p.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ne.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ne.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let P=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let E in P)C.append(E,P[E]);let O=new Array;return C.forEach((E,w)=>{O.push(this.encodeQueryString(w)+"="+this.encodeQueryString(E))}),encodeURI(O.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(k){console.warn("Could not decode search request query params, fallback on raw value",k)}let d=new URLSearchParams(e),f=d.get(ne.LOCALE)==="all"?void 0:d.get(ne.LOCALE),h=((r=d.get(ne.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(ne.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(ne.SCOPE))!==null&&a!==void 0?a:"default",S=+((i=d.get(ne.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),C=d.get(ne.KEYWORD_MATCH),R=C?C.toUpperCase()===go.MANDATORY?go.MANDATORY:go.OPTIONAL:void 0,T={};for(let k of d.keys())e2(k)||(T[k]=d.get(k));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ne.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:H1(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Or(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:T}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(ne.FILTERS)&&(d=this.parseValueFilters((r=e.get(ne.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ne.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(ne.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(ne.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(ne.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ne.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(J1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:yo[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replace(a,r);return e}parseLegacyPeriodFilter(e){if(F1(e))return[{key:"ft:lastEdition",dateFilter:{type:yo[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var tc={};X(tc,{toFtFormComponent:()=>ec});var Js=Symbol("elementInternals"),ec=Me(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Js].form}constructor(...o){super(o),this[Js]=this.attachInternals()}setFormValue(o){this[Js].setFormValue(o)}}return e});var rc={};X(rc,{DateFormatter:()=>Dr});var Dr=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var nc={};X(nc,{ALL_KEYS_VALUE:()=>oc,SameWindowStorageEvent:()=>vo});var oc="__all__",vo=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==oc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new vo(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new vo(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new vo(oc))}});var ic={};X(ic,{FocusMainContentEvent:()=>ac});var ac=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var t2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function a3(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function i3(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",a3);document.addEventListener("click",i3);var r2=I`
|
|
49
49
|
.sr-only {
|
|
50
50
|
position:absolute;
|
|
51
51
|
left:-10000px;
|
|
@@ -611,7 +611,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
611
611
|
position: relative;
|
|
612
612
|
word-break: break-word;
|
|
613
613
|
}
|
|
614
|
-
`;var m3="ft-app-info",Hr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Hr.eventName="authentication-change";var g3={session:(t,e)=>{Ge(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new Hr(e.payload)),0))}},F=zr.get({name:m3,reducers:g3,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 ga=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},xL=Me(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(F)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Dr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ga([v({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ga([v({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ga([so({store:F.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),ga([so({store:F.name})],e.prototype,"uiLocale",void 0),e});var Fr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=F.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=F.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var ya=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Fr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Fr.await()}};var Qe=class extends ya{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ot,this.cache=e?a.commonCache:new Ot}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ba=class extends Qe{async listMySearches(){let{session:e}=F.getState();return Q1(e,Ee.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var va=class extends Qe{async listMyBookmarks(){let e=F.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var xa=class extends Qe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var Sa=class extends Qe{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 e=F.getState().session;return!!e?.sessionAuthenticated}};var y3="ft-user-assets",b3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ct).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;bc(t,r,[...yc(t,r),a]),P2(t,r,1,o),I2(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;bc(t,r,yc(t,r).map(a=>a.id===o.id?o:a)),I2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;bc(t,r,yc(t,r).filter(i=>i.id!==a)),P2(t,r,-1,o)}},z2={[ct.SEARCHES]:"savedSearches",[ct.BOOKMARKS]:"bookmarks",[ct.BOOKS]:void 0,[ct.COLLECTIONS]:void 0},yc=(t,e)=>{var r;let o=z2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},bc=(t,e,r)=>{let o=z2[e];o&&(t[o]=r)},P2=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===ct.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},I2=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Je=zr.get({name:y3,reducers:b3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ct).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vc=class{constructor(e=new xa,r=new Sa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new va,this.savedSearchesService=new ba,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();Ge((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Je.actions.clearAssetCount(),Je.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Je.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Je.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Je.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Je.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Je.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Je.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Je.getState().assetCounts.bookmarkByMap).length!==0;e===ct.BOOKMARKS&&r&&Je.actions.clearBookmarkCountByMap(),Je.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Je.actions.bookmarks(r)}}},v3=new vc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=v3);var xc=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xc;var D2,To=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},x3=Symbol("clearAfterUnitTest"),Ca=class extends qn(Qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[D2]=()=>{this.defaultMessages={},this.cache=new Ot,this.listeners={}},this.currentUiLocale=F.getState().uiLocale,F.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=F.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ge(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new nn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof Cr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new To({loadedContexts:e})),this.dispatchEvent(new To({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new To({loadedContexts:[e]})),this.dispatchEvent(new To({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Zn(0).then(()=>o()).catch(()=>null)))}};D2=x3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var hn=window.FluidTopicsI18nService,Sc=window.FluidTopicsCustomI18nService;var Cc=class{highlightHtml(e,r,o){bs(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Cc;var Ec=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=F.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i;if(e==null)return"";try{return Dr.format(e,(o=r?.locale)!==null&&o!==void 0?o:F.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(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new Ec;var mn=class{static get(e,r){var o,a;let i=F.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new bo(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Oc=class{urlToSearchRequest(e){return mn.get().parse(e)}searchRequestToUrl(e){return mn.get().serialize(e)}};window.FluidTopicsUrlService=new Oc;var Gr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Gr.eventName="change";var Lc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},$2=new Lc;var Ea=class t extends $t{static build(){return new t(window.history,$2,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ge(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Gr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[f,s,c]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Gr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Gr.eventName,e)}currentItem(){return Lr(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Lr(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return Lr(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ea.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var B2=I`
|
|
614
|
+
`;var m3="ft-app-info",Hr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Hr.eventName="authentication-change";var g3={session:(t,e)=>{Ge(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new Hr(e.payload)),0))}},F=zr.get({name:m3,reducers:g3,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 ga=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},xL=Me(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(F)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>Dr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ga([v({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ga([v({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ga([so({store:F.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),ga([so({store:F.name})],e.prototype,"uiLocale",void 0),e});var Fr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=F.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=F.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var ya=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Fr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Fr.await()}};var Qe=class extends ya{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ot,this.cache=e?a.commonCache:new Ot}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ba=class extends Qe{async listMySearches(){let{session:e}=F.getState();return Q1(e,Ee.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var va=class extends Qe{async listMyBookmarks(){let e=F.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var xa=class extends Qe{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var Sa=class extends Qe{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 e=F.getState().session;return!!e?.sessionAuthenticated}};var y3="ft-user-assets",b3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ct).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;bc(t,r,[...yc(t,r),a]),P2(t,r,1,o),I2(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;bc(t,r,yc(t,r).map(a=>a.id===o.id?o:a)),I2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;bc(t,r,yc(t,r).filter(i=>i.id!==a)),P2(t,r,-1,o)}},z2={[ct.SEARCHES]:"savedSearches",[ct.BOOKMARKS]:"bookmarks",[ct.BOOKS]:void 0,[ct.COLLECTIONS]:void 0},yc=(t,e)=>{var r;let o=z2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},bc=(t,e,r)=>{let o=z2[e];o&&(t[o]=r)},P2=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===ct.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},I2=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Je=zr.get({name:y3,reducers:b3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ct).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vc=class{constructor(e=new xa,r=new Sa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new va,this.savedSearchesService=new ba,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();Ge((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Je.actions.clearAssetCount(),Je.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Je.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Je.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Je.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Je.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Je.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Je.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Je.getState().assetCounts.bookmarkByMap).length!==0;e===ct.BOOKMARKS&&r&&Je.actions.clearBookmarkCountByMap(),Je.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Je.actions.bookmarks(r)}}},v3=new vc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=v3);var xc=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xc;var D2,To=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},x3=Symbol("clearAfterUnitTest"),Ca=class extends qn(Qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[D2]=()=>{this.defaultMessages={},this.cache=new Ot,this.listeners={}},this.currentUiLocale=F.getState().uiLocale,F.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=F.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ge(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new nn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof Cr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new To({loadedContexts:e})),this.dispatchEvent(new To({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new To({loadedContexts:[e]})),this.dispatchEvent(new To({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Zn(0).then(()=>o()).catch(()=>null)))}};D2=x3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var hn=window.FluidTopicsI18nService,Sc=window.FluidTopicsCustomI18nService;var Cc=class{highlightHtml(e,r,o){bs(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Cc;var Ec=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=F.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return Dr.format(e,(o=r?.locale)!==null&&o!==void 0?o:F.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(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Ec;var mn=class{static get(e,r){var o,a;let i=F.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new bo(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Oc=class{urlToSearchRequest(e){return mn.get().parse(e)}searchRequestToUrl(e){return mn.get().serialize(e)}};window.FluidTopicsUrlService=new Oc;var Gr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Gr.eventName="change";var Lc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},$2=new Lc;var Ea=class t extends $t{static build(){return new t(window.history,$2,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ge(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Gr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[f,s,c]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Gr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Gr.eventName,e)}currentItem(){return Lr(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return Lr(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return Lr(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ea.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var B2=I`
|
|
615
615
|
`;function U2(t,e){let{authenticationRequired:r,session:o}=F.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Le=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},le=class extends j{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=()=>Fr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ot,this.cleanSessionDebouncer=new be,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return M`
|
|
616
616
|
<slot></slot>
|
|
617
617
|
`}connectedCallback(){super.connectedCallback(),F.addEventListener(Hr.eventName,this.reloadConfiguration)}disconnectedCallback(){F.addEventListener(Hr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,a,i,s,c,d;super.update(e),e.has("baseUrl")&&(F.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&F.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&F.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&F.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&F.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&F.actions.noCustom(this.noCustom),e.has("editorMode")&&F.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&F.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&F.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>hn.addContext(f)),e.has("openExternalDocumentInNewTab")&&F.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&F.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&F.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(F.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),F.actions.availableUiLocales((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),F.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&F.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&F.actions.availableContentLocales((d=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&d!==void 0?d:[]),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 e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}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",()=>U2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};le.elementDefinitions={};le.styles=B2;Le([v()],le.prototype,"baseUrl",void 0);Le([v()],le.prototype,"apiIntegrationIdentifier",void 0);Le([v()],le.prototype,"apiIntegrationAppVersion",void 0);Le([v()],le.prototype,"uiLocale",void 0);Le([Pe(null)],le.prototype,"availableUiLocales",void 0);Le([Pe(null)],le.prototype,"metadataConfiguration",void 0);Le([v({type:Boolean})],le.prototype,"editorMode",void 0);Le([v({type:Boolean})],le.prototype,"noCustom",void 0);Le([v({type:Boolean})],le.prototype,"openExternalDocumentInNewTab",void 0);Le([v({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],le.prototype,"noCustomComponent",void 0);Le([v({type:Boolean})],le.prototype,"withManualResources",void 0);Le([v({type:Boolean})],le.prototype,"navigatorOnline",void 0);Le([v({type:Boolean})],le.prototype,"forcedOffline",void 0);Le([v({type:Object})],le.prototype,"apiProvider",void 0);Le([v({type:Boolean})],le.prototype,"authenticationRequired",void 0);Le([Pe([])],le.prototype,"messageContexts",void 0);Le([Pe(void 0)],le.prototype,"session",void 0);Le([q()],le.prototype,"localesConfiguration",void 0);Le([q()],le.prototype,"availableContentLocales",void 0);Y("ft-app-context")(le);var Ac=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},No=new Ac;var S3=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},yn=Symbol("i18nAttributes"),H2=Symbol("i18nListAttributes"),F2=Symbol("i18nProperties"),Oa=Symbol("i18nContexts"),gn=Symbol("i18nUnsubs"),Ra=Me(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Sc:hn}i18n(i){let{context:s,key:c,message:d}=i,{custom:f,args:h,argsProvider:p}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let g=h??(p?p(this):[]);return this.getI18nService(f).resolveMessage(s,c,...g)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(No.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,f=(h,p,g)=>g?.context&&g.key&&i(h,p,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(s=this[yn])===null||s===void 0||s.forEach((h,p)=>d[p]=f(h,p,d[p])),(c=this[H2])===null||c===void 0||c.forEach((h,p)=>{var g;return d[p]=(g=d[p])===null||g===void 0?void 0:g.map(S=>f(h,p,S))})}updateI18nProperties(i){var s;(s=this[F2])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Oa].set(d,{isCustomContext:c}),this[gn].has(d)||this[gn].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[Oa].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Oa].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[gn].forEach(i=>i()),this[gn].clear()}}return e=Oa,r=gn,S3([v({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),La=class extends Ra(j){},Aa=class extends Ra(cn){};var Rc=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?No.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},C3=new Rc;var G2=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:gt,converter:No,...e}),r[yn]=(a=r[yn])!==null&&a!==void 0?a:new Map,r[yn].set(o,t??{})};var W2=I`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filter",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "Flat selector for multivalued or monovalued filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "2.0.
|
|
23
|
-
"@fluid-topics/ft-checkbox": "2.0.
|
|
24
|
-
"@fluid-topics/ft-icon": "2.0.
|
|
25
|
-
"@fluid-topics/ft-radio": "2.0.
|
|
26
|
-
"@fluid-topics/ft-ripple": "2.0.
|
|
27
|
-
"@fluid-topics/ft-snap-scroll": "2.0.
|
|
28
|
-
"@fluid-topics/ft-typography": "2.0.
|
|
29
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-button": "2.0.12",
|
|
23
|
+
"@fluid-topics/ft-checkbox": "2.0.12",
|
|
24
|
+
"@fluid-topics/ft-icon": "2.0.12",
|
|
25
|
+
"@fluid-topics/ft-radio": "2.0.12",
|
|
26
|
+
"@fluid-topics/ft-ripple": "2.0.12",
|
|
27
|
+
"@fluid-topics/ft-snap-scroll": "2.0.12",
|
|
28
|
+
"@fluid-topics/ft-typography": "2.0.12",
|
|
29
|
+
"@fluid-topics/ft-wc-utils": "2.0.12",
|
|
30
30
|
"lit": "3.1.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
|
|
33
33
|
}
|