@fluid-topics/ft-tree-list 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.
@@ -1109,7 +1109,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1109
1109
  position: relative;
1110
1110
  word-break: break-word;
1111
1111
  }
1112
- `;var W1=["top","right","bottom","left"],$1=["start","end"],Xa=W1.reduce((e,t)=>e.concat(t,t+"-"+$1[0],t+"-"+$1[1]),[]),io=Math.min,At=Math.max,so=Math.round;var We=e=>({x:e,y:e}),V8={left:"right",right:"left",bottom:"top",top:"bottom"};function Qa(e,t,r){return At(e,io(t,r))}function Vo(e,t){return typeof e=="function"?e(t):e}function Er(e){return e.split("-")[0]}function Ot(e){return e.split("-")[1]}function Ja(e){return e==="x"?"y":"x"}function ei(e){return e==="y"?"height":"width"}function jo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function ti(e){return Ja(jo(e))}function F1(e,t,r){r===void 0&&(r=!1);let n=Ot(e),a=ti(e),i=ei(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ya(s)),[s,Ya(s)]}function V1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ya(e){let t=Er(e);return V8[t]+e.slice(t.length)}function j8(e){return{top:0,right:0,bottom:0,left:0,...e}}function j1(e){return typeof e!="number"?j8(e):{top:e,right:e,bottom:e,left:e}}function Vt(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 K1(e,t,r){let{reference:n,floating:a}=e,i=jo(t),s=ti(t),l=ei(s),f=Er(t),u=i==="y",h=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,v;switch(f){case"top":v={x:h,y:n.y-a.height};break;case"bottom":v={x:h,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}switch(Ot(t)){case"start":v[s]-=y*(r&&u?-1:1);break;case"end":v[s]+=y*(r&&u?-1:1);break}return v}async function Z1(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:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=Vo(t,e),C=j1(v),_=l[y?g==="floating"?"reference":"floating":g],M=Vt(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:h,strategy:f})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,I=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(I))?await(i.getScale==null?void 0:i.getScale(I))||{x:1,y:1}:{x:1,y:1},$=Vt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:I,strategy:f}):N);return{top:(M.top-$.top+C.top)/D.y,bottom:($.bottom-M.bottom+C.bottom)/D.y,left:(M.left-$.left+C.left)/D.x,right:($.right-M.right+C.right)/D.x}}var K8=50,q1=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:Z1},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=K1(u,n,f),y=n,v=0,C={};for(let L=0;L<i.length;L++){let _=i[L];if(!_)continue;let{name:M,fn:N}=_,{x:I,y:D,data:$,reset:q}=await N({x:h,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});h=I??h,g=D??g,C[M]={...C[M],...$},q&&v<K8&&(v++,typeof q=="object"&&(q.placement&&(y=q.placement),q.rects&&(u=q.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):q.rects),{x:h,y:g}=K1(u,y,f)),L=-1)}return{x:h,y:g,placement:y,strategy:a,middlewareData:C}};function Z8(e,t,r){return(e?[...r.filter(a=>Ot(a)===e),...r.filter(a=>Ot(a)!==e)]:r.filter(a=>Er(a)===a)).filter(a=>e?Ot(a)===e||(t?V1(a)!==a:!1):!0)}var Y1=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:h=!1,alignment:g,allowedPlacements:y=Xa,autoAlignment:v=!0,...C}=Vo(e,t),L=g!==void 0||y===Xa?Z8(g||null,v,y):y,_=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[M];if(N==null)return{};let I=F1(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:L[0]}};let D=[_[Er(N)],_[I[0]],_[I[1]]],$=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:D}],q=L[M+1];if(q)return{data:{index:M+1,overflows:$},reset:{placement:q}};let Ee=$.map(me=>{let x=Ot(me.placement);return[me.placement,x&&h?me.overflows.slice(0,2).reduce((S,U)=>S+U,0):me.overflows[0],me.overflows]}).sort((me,x)=>me[1]-x[1]),Ye=((a=Ee.filter(me=>me[2].slice(0,Ot(me[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Ee[0][0];return Ye!==l?{data:{index:M+1,overflows:$},reset:{placement:Ye}}:{}}}};var X1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:N,y:I}=M;return{x:N,y:I}}},...u}=Vo(e,t),h={x:r,y:n},g=await i.detectOverflow(t,u),y=jo(Er(a)),v=Ja(y),C=h[v],L=h[y];if(s){let M=v==="y"?"top":"left",N=v==="y"?"bottom":"right",I=C+g[M],D=C-g[N];C=Qa(I,C,D)}if(l){let M=y==="y"?"top":"left",N=y==="y"?"bottom":"right",I=L+g[M],D=L-g[N];L=Qa(I,L,D)}let _=f.fn({...t,[v]:C,[y]:L});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[v]:s,[y]:l}}}}}};function Zo(){return typeof window<"u"}function Kt(e){return J1(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(J1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function J1(e){return Zo()?e instanceof Node||e instanceof Ae(e).Node:!1}function Me(e){return Zo()?e instanceof Element||e instanceof Ae(e).Element:!1}function at(e){return Zo()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function Q1(e){return!Zo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}function Lr(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function e2(e){return/^(table|td|th)$/.test(Kt(e))}function co(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var q8=/transform|translate|scale|rotate|perspective|filter/,Y8=/paint|layout|strict|content/,jt=e=>!!e&&e!=="none",ri;function qo(e){let t=Me(e)?Pe(e):e;return jt(t.transform)||jt(t.translate)||jt(t.scale)||jt(t.rotate)||jt(t.perspective)||!Yo()&&(jt(t.backdropFilter)||jt(t.filter))||q8.test(t.willChange||"")||Y8.test(t.contain||"")}function t2(e){let t=ht(e);for(;at(t)&&!Zt(t);){if(qo(t))return t;if(co(t))return null;t=ht(t)}return null}function Yo(){return ri==null&&(ri=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ri}function Zt(e){return/^(html|body|#document)$/.test(Kt(e))}function Pe(e){return Ae(e).getComputedStyle(e)}function lo(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(Kt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Q1(e)&&e.host||nt(e);return Q1(t)?t.host:t}function r2(e){let t=ht(e);return Zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&Lr(t)?t:r2(t)}function Ko(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=r2(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=Ae(a);if(i){let l=Xo(s);return t.concat(s,s.visualViewport||[],Lr(a)?a:[],l&&r?Ko(l):[])}else return t.concat(a,Ko(a,[],r))}function Xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function i2(e){let t=Pe(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=at(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=so(r)!==i||so(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function s2(e){return Me(e)?e:e.contextElement}function Ar(e){let t=s2(e);if(!at(t))return We(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=i2(t),s=(i?so(r.width):r.width)/n,l=(i?so(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var X8=We(0);function c2(e){let t=Ae(e);return!Yo()||!t.visualViewport?X8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q8(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ae(e)?!1:t}function fo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=s2(e),s=We(1);t&&(n?Me(n)&&(s=Ar(n)):s=Ar(e));let l=Q8(i,r,n)?c2(i):We(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i){let y=Ae(i),v=n&&Me(n)?Ae(n):n,C=y,L=Xo(C);for(;L&&n&&v!==C;){let _=Ar(L),M=L.getBoundingClientRect(),N=Pe(L),I=M.left+(L.clientLeft+parseFloat(N.paddingLeft))*_.x,D=M.top+(L.clientTop+parseFloat(N.paddingTop))*_.y;f*=_.x,u*=_.y,h*=_.x,g*=_.y,f+=I,u+=D,C=Ae(L),L=Xo(C)}}return Vt({width:h,height:g,x:f,y:u})}function Qo(e,t){let r=lo(e).scrollLeft;return t?t.left+r:fo(nt(e)).left+r}function l2(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Qo(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function J8(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=nt(n),l=t?co(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=We(1),h=We(0),g=at(n);if((g||!g&&!i)&&((Kt(n)!=="body"||Lr(s))&&(f=lo(n)),g)){let v=fo(n);u=Ar(n),h.x=v.x+n.clientLeft,h.y=v.y+n.clientTop}let y=s&&!g&&!i?l2(s,f):We(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+h.x+y.x,y:r.y*u.y-f.scrollTop*u.y+h.y+y.y}}function eh(e){return Array.from(e.getClientRects())}function th(e){let t=nt(e),r=lo(e),n=e.ownerDocument.body,a=At(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=At(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Qo(e),l=-r.scrollTop;return Pe(n).direction==="rtl"&&(s+=At(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var o2=25;function rh(e,t){let r=Ae(e),n=nt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let h=Yo();(!h||h&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=Qo(n);if(u<=0){let h=n.ownerDocument,g=h.body,y=getComputedStyle(g),v=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-v);C<=o2&&(i-=C)}else u<=o2&&(i+=u);return{width:i,height:s,x:l,y:f}}function oh(e,t){let r=fo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=at(e)?Ar(e):We(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 n2(e,t,r){let n;if(t==="viewport")n=rh(e,r);else if(t==="document")n=th(nt(e));else if(Me(t))n=oh(t,r);else{let a=c2(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Vt(n)}function d2(e,t){let r=ht(e);return r===t||!Me(r)||Zt(r)?!1:Pe(r).position==="fixed"||d2(r,t)}function nh(e,t){let r=t.get(e);if(r)return r;let n=Ko(e,[],!1).filter(l=>Me(l)&&Kt(l)!=="body"),a=null,i=Pe(e).position==="fixed",s=i?ht(e):e;for(;Me(s)&&!Zt(s);){let l=Pe(s),f=qo(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Lr(s)&&!f&&d2(e,s))?n=n.filter(h=>h!==s):a=l,s=ht(s)}return t.set(e,n),n}function ah(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?co(t)?[]:nh(t,this._c):[].concat(r),n],l=n2(t,s[0],a),f=l.top,u=l.right,h=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=n2(t,s[y],a);f=At(v.top,f),u=io(v.right,u),h=io(v.bottom,h),g=At(v.left,g)}return{width:u-g,height:h-f,x:g,y:f}}function ih(e){let{width:t,height:r}=i2(e);return{width:t,height:r}}function sh(e,t,r){let n=at(t),a=nt(t),i=r==="fixed",s=fo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=We(0);function u(){f.x=Qo(a)}if(n||!n&&!i)if((Kt(t)!=="body"||Lr(a))&&(l=lo(t)),n){let v=fo(t,!0,i,t);f.x=v.x+t.clientLeft,f.y=v.y+t.clientTop}else a&&u();i&&!n&&a&&u();let h=a&&!n&&!i?l2(a,l):We(0),g=s.left+l.scrollLeft-f.x-h.x,y=s.top+l.scrollTop-f.y-h.y;return{x:g,y,width:s.width,height:s.height}}function oi(e){return Pe(e).position==="static"}function a2(e,t){if(!at(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return nt(e)===r&&(r=r.ownerDocument.body),r}function f2(e,t){let r=Ae(e);if(co(e))return r;if(!at(e)){let a=ht(e);for(;a&&!Zt(a);){if(Me(a)&&!oi(a))return a;a=ht(a)}return r}let n=a2(e,t);for(;n&&e2(n)&&oi(n);)n=a2(n,t);return n&&Zt(n)&&oi(n)&&!qo(n)?r:n||t2(e)||r}var ch=async function(e){let t=this.getOffsetParent||f2,r=this.getDimensions,n=await r(e.floating);return{reference:sh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function lh(e){return Pe(e).direction==="rtl"}var Jo={convertOffsetParentRelativeRectToViewportRelativeRect:J8,getDocumentElement:nt,getClippingRect:ah,getOffsetParent:f2,getElementRects:ch,getClientRects:eh,getDimensions:ih,getScale:Ar,isElement:Me,isRTL:lh};var u2=Y1,p2=X1;var h2=(e,t,r)=>{let n=new Map,a={platform:Jo,...r},i={...a.platform,_c:n};return q1(e,t,{...a,platform:i})};function m2(e){return dh(e)}function ni(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function dh(e){for(let t=e;t;t=ni(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ni(e);t;t=ni(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 g2(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},h2(e,t,{strategy:n.strategy,platform:{...Jo,getOffsetParent:a=>Jo.getOffsetParent(a,m2)},middleware:[p2({crossAxis:!0}),u2({allowedPlacements:[n.placement]})]})}var Ir=E(H());var _i=E(le());function fh(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(!en(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(!en(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(!en(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function en(e,t){try{return fh(e,t)}catch{return!1}}function uo(e,t){return!en(e,t)}function y2(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function tn(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 b2=E(le(),1);var ai=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:uo,attribute:!1,...t};(0,b2.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 rn=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 qt=E(le(),1);var x2=E(le(),1);function v2(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,x2.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:uo,...t??{}})}var on=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let 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 S2=E(j(),1);var nn=globalThis,uh=nn.ShadowRoot&&(nn.ShadyCSS===void 0||nn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wb=Symbol();var C2=(e,t)=>{if(uh)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=nn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var an=class extends S2.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 C2(n,t.elementStyles),n}};function E2(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 Rr=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},R2,L2=Symbol("constructorPrototype"),A2=Symbol("constructorName"),w2=Symbol("exportpartsDebouncer"),O2=Symbol("dynamicDependenciesLoaded"),Or=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Or.eventName="exportparts-updated";var it=class extends an{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[R2]=new on(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[w2].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[A2]=this.constructor.name,this[L2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[A2]&&Object.setPrototypeOf(this,this[L2])}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[O2]||(r[O2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Or.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Or.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 Or)})}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=E2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let h=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...v,...C].filter(f).map(_=>_.trim());for(let _ of L)h.add(_)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>u.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};R2=w2;Rr([(0,qt.property)()],it.prototype,"exportpartsPrefix",void 0);Rr([v2([])],it.prototype,"exportpartsPrefixes",void 0);Rr([(0,qt.property)({reflect:!0})],it.prototype,"exportparts",void 0);Rr([(0,qt.property)()],it.prototype,"customStylesheet",void 0);Rr([(0,qt.property)()],it.prototype,"elementToFocus",void 0);Rr([(0,qt.state)()],it.prototype,"useAdoptedStyleSheets",void 0);function sn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var po=Symbol("internalReduxEventsUnsubscribers"),Rt=Symbol("internalStoresUnsubscribers"),Yt=Symbol("internalStores"),ph=tn(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[Yt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Yt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Yt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Yt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Yt].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[Rt].has(s.store):this[Rt].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[Rt].set(s,l.subscribe(()=>this.updateFromStores())),this[po].set(s,[]),sn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,h)=>{if(typeof this[h]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[h](y);l.addEventListener(u.eventName,g),this[po].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Rt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Rt].has(s)&&this[Rt].get(s)(),this[Rt].delete(s),(l=this[po].get(s))===null||l===void 0||l.forEach(f=>f()),this[po].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Rt,r=Yt,n=po,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),_2=class extends ph(it){};function ke(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 mt(e){return!!e&&!!e[X]}function Fe(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)===Ch}(e)||Array.isArray(e)||!!e[I2]||!!(!((t=e.constructor)===null||t===void 0)&&t[I2])||hi(e)||mi(e))}function Xt(e,t,r){r===void 0&&(r=!1),Nr(e)===0?(r?Object.keys:_r)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function Nr(e){var t=e[X];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:hi(e)?2:mi(e)?3:0}function wr(e,t){return Nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hh(e,t){return Nr(e)===2?e.get(t):e[t]}function D2(e,t,r){var n=Nr(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function B2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function hi(e){return xh&&e instanceof Map}function mi(e){return vh&&e instanceof Set}function wt(e){return e.o||e.t}function gi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=G2(e);delete t[X];for(var r=_r(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 yi(e,t){return t===void 0&&(t=!1),bi(e)||mt(e)||!Fe(e)||(Nr(e)>1&&(e.set=e.add=e.clear=e.delete=mh),Object.freeze(e),t&&Xt(e,function(r,n){return yi(n,!0)},!0)),e}function mh(){ke(2)}function bi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function st(e){var t=pi[e];return t||ke(18,e),t}function gh(e,t){pi[e]||(pi[e]=t)}function di(){return mo}function ii(e,t){t&&(st("Patches"),e.u=[],e.s=[],e.v=t)}function cn(e){fi(e),e.p.forEach(yh),e.p=null}function fi(e){e===mo&&(mo=e.l)}function N2(e){return mo={p:[],l:mo,h:e,m:!0,_:0}}function yh(e){var t=e[X];t.i===0||t.i===1?t.j():t.g=!0}function si(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||st("ES5").S(t,e,n),n?(r[X].P&&(cn(t),ke(4)),Fe(e)&&(e=ln(t,e),t.l||dn(t,e)),t.u&&st("Patches").M(r[X].t,e,t.u,t.s)):e=ln(t,r,[]),cn(t),t.u&&t.v(t.u,t.s),e!==H2?e:void 0}function ln(e,t,r){if(bi(t))return t;var n=t[X];if(!n)return Xt(t,function(l,f){return T2(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return dn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=gi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Xt(i,function(l,f){return T2(e,n,a,l,f,r,s)}),dn(e,a,!1),r&&e.u&&st("Patches").N(n,r,e.u,e.s)}return n.o}function T2(e,t,r,n,a,i,s){if(mt(a)){var l=ln(e,a,i&&t&&t.i!==3&&!wr(t.R,n)?i.concat(n):void 0);if(D2(r,n,l),!mt(l))return;e.m=!1}else s&&r.add(a);if(Fe(a)&&!bi(a)){if(!e.h.D&&e._<1)return;ln(e,a),t&&t.A.l||dn(e,a)}}function dn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&yi(t,r)}function ci(e,t){var r=e[X];return(r?wt(r):e)[t]}function M2(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 _t(e){e.P||(e.P=!0,e.l&&_t(e.l))}function li(e){e.o||(e.o=gi(e.t))}function ui(e,t,r){var n=hi(t)?st("MapSet").F(t,r):mi(t)?st("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:di(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=go;s&&(f=[l],u=ho);var h=Proxy.revocable(f,u),g=h.revoke,y=h.proxy;return l.k=y,l.j=g,y}(t,r):st("ES5").J(t,r);return(r?r.A:di()).p.push(n),n}function bh(e){return mt(e)||ke(22,e),function t(r){if(!Fe(r))return r;var n,a=r[X],i=Nr(r);if(a){if(!a.P&&(a.i<4||!st("ES5").K(a)))return a.t;a.I=!0,n=P2(r,i),a.I=!1}else n=P2(r,i);return Xt(n,function(s,l){a&&hh(a.t,s)===l||D2(n,s,t(l))}),i===3?new Set(n):n}(e)}function P2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gi(e)}function U2(){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[X];return go.get(u,s)},set:function(u){var h=this[X];go.set(h,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][X];if(!f.P)switch(f.i){case 5:n(f)&&_t(f);break;case 4:r(f)&&_t(f)}}}function r(s){for(var l=s.t,f=s.k,u=_r(f),h=u.length-1;h>=0;h--){var g=u[h];if(g!==X){var y=l[g];if(y===void 0&&!wr(l,g))return!0;var v=f[g],C=v&&v[X];if(C?C.t!==y:!B2(v,y))return!0}}var L=!!l[X];return u.length!==_r(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&&ke(3,JSON.stringify(wt(s)))}var i={};gh("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var v=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(v,""+C,e(C,!0));return v}var L=G2(y);delete L[X];for(var _=_r(L),M=0;M<_.length;M++){var N=_[M];L[N]=e(N,g||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),h={i:f?5:4,A:l?l.A:di(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:h,writable:!0}),u},S:function(s,l,f){f?mt(l)&&l[X].A===s&&t(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var g=h[X];if(g){var y=g.t,v=g.k,C=g.R,L=g.i;if(L===4)Xt(v,function(D){D!==X&&(y[D]!==void 0||wr(y,D)?C[D]||u(v[D]):(C[D]=!0,_t(g)))}),Xt(y,function(D){v[D]!==void 0||wr(v,D)||(C[D]=!1,_t(g))});else if(L===5){if(n(g)&&(_t(g),C.length=!0),v.length<y.length)for(var _=v.length;_<y.length;_++)C[_]=!1;else for(var M=y.length;M<v.length;M++)C[M]=!0;for(var N=Math.min(v.length,y.length),I=0;I<N;I++)v.hasOwnProperty(I)||(C[I]=!0),C[I]===void 0&&u(v[I])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var k2,mo,xi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",xh=typeof Map<"u",vh=typeof Set<"u",z2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H2=xi?Symbol.for("immer-nothing"):((k2={})["immer-nothing"]=!0,k2),I2=xi?Symbol.for("immer-draftable"):"__$immer_draftable",X=xi?Symbol.for("immer-state"):"__$immer_state";var Ch=""+Object.prototype.constructor,_r=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,G2=Object.getOwnPropertyDescriptors||function(e){var t={};return _r(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},pi={},go={get:function(e,t){if(t===X)return e;var r=wt(e);if(!wr(r,t))return function(a,i,s){var l,f=M2(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||!Fe(n)?n:n===ci(e.t,t)?(li(e),e.o[t]=ui(e.A.h,n,e)):n},has:function(e,t){return t in wt(e)},ownKeys:function(e){return Reflect.ownKeys(wt(e))},set:function(e,t,r){var n=M2(wt(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=ci(wt(e),t),i=a?.[X];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(B2(r,a)&&(r!==void 0||wr(e.t,t)))return!0;li(e),_t(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 ci(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,li(e),_t(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=wt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ke(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ke(12)}},ho={};Xt(go,function(e,t){ho[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ho.deleteProperty=function(e,t){return ho.set.call(this,e,t,void 0)},ho.set=function(e,t,r){return go.set.call(this,e[0],t,r,e[0])};var Sh=function(){function e(r){var n=this;this.O=z2,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 M=arguments.length,N=Array(M>1?M-1:0),I=1;I<M;I++)N[I-1]=arguments[I];return f.produce(L,function(D){var $;return($=i).call.apply($,[_,D].concat(N))})}}var u;if(typeof i!="function"&&ke(6),s!==void 0&&typeof s!="function"&&ke(7),Fe(a)){var h=N2(n),g=ui(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?cn(h):fi(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return ii(h,s),si(L,h)},function(L){throw cn(h),L}):(ii(h,s),si(u,h))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===H2&&(u=void 0),n.D&&yi(u,!0),s){var v=[],C=[];st("Patches").M(a,u,v,C),s(v,C)}return u}ke(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(v){return a.apply(void 0,[v].concat(g))})};var s,l,f=n.produce(a,i,function(u,h){s=u,l=h});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){Fe(r)||ke(8),mt(r)&&(r=bh(r));var n=N2(this),a=ui(this,r,void 0);return a[X].C=!0,fi(n),a},t.finishDraft=function(r,n){var a=r&&r[X],i=a.A;return ii(i,n),si(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!z2&&ke(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=st("Patches").$;return mt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),we=new Sh,Eh=we.produce,nx=we.produceWithPatches.bind(we),ax=we.setAutoFreeze.bind(we),ix=we.setUseProxies.bind(we),sx=we.applyPatches.bind(we),cx=we.createDraft.bind(we),lx=we.finishDraft.bind(we),fn=Eh;function Qt(e){"@babel/helpers - typeof";return Qt=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},Qt(e)}function $2(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W2(e){var t=$2(e,"string");return Qt(t)=="symbol"?t:t+""}function F2(e,t,r){return(t=W2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V2(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 vi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V2(Object(r),!0).forEach(function(n){F2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ce(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 j2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ci=function(){return Math.random().toString(36).substring(7).split("").join(".")},un={INIT:"@@redux/INIT"+Ci(),REPLACE:"@@redux/REPLACE"+Ci(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ci()}};function Lh(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 Si(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Si)(e,t)}if(typeof e!="function")throw new Error(Ce(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function h(){if(f)throw new Error(Ce(3));return i}function g(L){if(typeof L!="function")throw new Error(Ce(4));if(f)throw new Error(Ce(5));var _=!0;return u(),l.push(L),function(){if(_){if(f)throw new Error(Ce(6));_=!1,u();var N=l.indexOf(L);l.splice(N,1),s=null}}}function y(L){if(!Lh(L))throw new Error(Ce(7));if(typeof L.type>"u")throw new Error(Ce(8));if(f)throw new Error(Ce(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var _=s=l,M=0;M<_.length;M++){var N=_[M];N()}return L}function v(L){if(typeof L!="function")throw new Error(Ce(10));a=L,y({type:un.REPLACE})}function C(){var L,_=g;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ce(11));function I(){N.next&&N.next(h())}I();var D=_(I);return{unsubscribe:D}}},L[j2]=function(){return this},L}return y({type:un.INIT}),n={dispatch:y,subscribe:g,getState:h,replaceReducer:v},n[j2]=C,n}function Ah(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:un.INIT});if(typeof n>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function K2(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{Ah(r)}catch(f){l=f}return function(u,h){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,v={},C=0;C<i.length;C++){var L=i[C],_=r[L],M=u[L],N=_(M,h);if(typeof N>"u"){var I=h&&h.type;throw new Error(Ce(14))}v[L]=N,y=y||N!==M}return y=y||i.length!==Object.keys(u).length,y?v:u}}function Tr(){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 Z2(){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(Ce(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=Tr.apply(void 0,l)(a.dispatch),vi(vi({},a),{},{dispatch:i})}}}function q2(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 Y2=q2();Y2.withExtraArgument=q2;var Ei=Y2;var t0=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)}}(),Oh=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(h){return f([u,h])}}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(h){u=[6,h],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Mr=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Rh=Object.defineProperty,wh=Object.defineProperties,_h=Object.getOwnPropertyDescriptors,X2=Object.getOwnPropertySymbols,Nh=Object.prototype.hasOwnProperty,Th=Object.prototype.propertyIsEnumerable,Q2=function(e,t,r){return t in e?Rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Nt=function(e,t){for(var r in t||(t={}))Nh.call(t,r)&&Q2(e,r,t[r]);if(X2)for(var n=0,a=X2(t);n<a.length;n++){var r=a[n];Th.call(t,r)&&Q2(e,r,t[r])}return e},Li=function(e,t){return wh(e,_h(t))},Mh=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 Ph=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Rx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function kh(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 zh=function(e){t0(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,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array),Ih=function(e){t0(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,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array);function Ri(e){return Fe(e)?fn(e,function(){}):e}function Dh(e){return typeof e=="boolean"}function Bh(){return function(t){return Uh(t)}}function Uh(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 zh;if(r&&(Dh(r)?l.push(Ei):l.push(Ei.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var Ai=!0;function r0(e){var t=Bh(),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,h=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(kh(a))v=K2(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),!Ai&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ai&&C.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=Z2.apply(void 0,C),_=Tr;f&&(_=Ph(Nt({trace:!Ai},typeof f=="object"&&f)));var M=new Ih(L),N=M;Array.isArray(y)?N=Mr([L],y):typeof y=="function"&&(N=y(M));var I=_.apply(void 0,N);return Si(v,h,I)}function Tt(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 Nt(Nt({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 o0(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 Hh(e){return typeof e=="function"}function Gh(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?o0(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(Hh(e))f=function(){return Ri(e())};else{var u=Ri(e);f=function(){return u}}function h(g,y){g===void 0&&(g=f());var v=Mr([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return v.filter(function(C){return!!C}).length===0&&(v=[l]),v.reduce(function(C,L){if(L)if(mt(C)){var _=C,M=L(_,y);return M===void 0?C:M}else{if(Fe(C))return fn(C,function(N){return L(N,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return h.getInitialState=f,h}function $h(e,t){return e+"/"+t}function n0(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:Ri(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var g=n[h],y=$h(t,h),v,C;"reducer"in g?(v=g.reducer,C=g.prepare):v=g,i[h]=v,s[y]=v,l[h]=C?Tt(y,C):Tt(y)});function f(){var h=typeof e.extraReducers=="function"?o0(e.extraReducers):[e.extraReducers],g=h[0],y=g===void 0?{}:g,v=h[1],C=v===void 0?[]:v,L=h[2],_=L===void 0?void 0:L,M=Nt(Nt({},y),s);return Gh(r,function(N){for(var I in M)N.addCase(I,M[I]);for(var D=0,$=C;D<$.length;D++){var q=$[D];N.addMatcher(q.matcher,q.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:t,reducer:function(h,g){return u||(u=f()),u(h,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Wh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fh=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Wh[Math.random()*64|0];return t},Vh=["name","message","stack","code"],Oi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),J2=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),jh=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Vh;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Tx=function(){function e(t,r,n){var a=Tt(t+"/fulfilled",function(h,g,y,v){return{payload:h,meta:Li(Nt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=Tt(t+"/pending",function(h,g,y){return{payload:void 0,meta:Li(Nt({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Tt(t+"/rejected",function(h,g,y,v,C){return{payload:v,error:(n&&n.serializeError||jh)(h||"Rejected"),meta:Li(Nt({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,f=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 u(h){return function(g,y,v){var C=n?.idGenerator?n.idGenerator(h):Fh(),L=new f,_,M=!1;function N(D){_=D,L.abort()}var I=function(){return Mh(this,null,function(){var D,$,q,Ee,he,Ye,me;return Oh(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Ee=(D=n?.condition)==null?void 0:D.call(n,h,{getState:y,extra:v}),Zh(Ee)?[4,Ee]:[3,2];case 1:Ee=x.sent(),x.label=2;case 2:if(Ee===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,he=new Promise(function(S,U){return L.signal.addEventListener("abort",function(){return U({name:"AbortError",message:_||"Aborted"})})}),g(i(C,h,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:C,arg:h},{getState:y,extra:v}))),[4,Promise.race([he,Promise.resolve(r(h,{dispatch:g,getState:y,extra:v,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(S,U){return new Oi(S,U)},fulfillWithValue:function(S,U){return new J2(S,U)}})).then(function(S){if(S instanceof Oi)throw S;return S instanceof J2?a(S.payload,C,h,S.meta):a(S,C,h)})])];case 3:return q=x.sent(),[3,5];case 4:return Ye=x.sent(),q=Ye instanceof Oi?s(null,C,h,Ye.payload,Ye.meta):s(Ye,C,h),[3,5];case 5:return me=n&&!n.dispatchConditionRejection&&s.match(q)&&q.meta.condition,me||g(q),[2,q]}})})}();return Object.assign(I,{abort:N,requestId:C,arg:h,unwrap:function(){return I.then(Kh)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Kh(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Zh(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var a0="listener",i0="completed",s0="cancelled",Mx="task-"+s0,Px="task-"+i0,kx=a0+"-"+s0,zx=a0+"-"+i0;var wi="listenerMiddleware";var Ix=Tt(wi+"/add"),Dx=Tt(wi+"/removeAll"),Bx=Tt(wi+"/remove");var e0,Ux=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(e0||(e0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},qh=function(e){return function(t){setTimeout(t,e)}},Hx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qh(10);U2();var Yh=tn(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)}}}),pn=class extends Yh(Object){};window.ftReduxStores||(window.ftReduxStores={});var c0=class e extends pn{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(sn(i))return i;if(a==null)return;let s=n0({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=r0({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let h=y2(s.getInitialState());for(let g of u.keeping)h[g]=(f??h)[g];return h}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 rn;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?(...h)=>{let g=u(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[f]:a(h)})}}}),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 hn=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 mn=E(H()),Xh="ft-app-info",Jt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Jt.eventName="authentication-change";var Qh={session:(e,t)=>{(0,mn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new Jt(t.payload)),0))}},z=mn.FtReduxStore.get({name:Xh,reducers:Qh,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 l0=E(H()),gn=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},hv=(0,l0.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(z)}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=>hn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return gn([(0,_i.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),gn([(0,_i.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),gn([ai({store:z.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),gn([ai({store:z.name})],t.prototype,"uiLocale",void 0),t});var e5=E(f0(),1);var u0;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(u0||(u0={}));var p0;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(p0||(p0={}));var h0;(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"})(h0||(h0={}));var m0;(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"})(m0||(m0={}));var g0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(g0||(g0={}));var y0;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(y0||(y0={}));var b0;(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"})(b0||(b0={}));var x0;(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"})(x0||(x0={}));var v0;(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"})(v0||(v0={}));var C0;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(C0||(C0={}));var S0;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(S0||(S0={}));var E0;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(E0||(E0={}));var L0;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(L0||(L0={}));var A0;(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"})(A0||(A0={}));var O0;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(O0||(O0={}));var R0;(function(e){e.ASC="ASC",e.DESC="DESC"})(R0||(R0={}));var w0;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(w0||(w0={}));var _0;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(_0||(_0={}));var N0;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(N0||(N0={}));var T0;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(T0||(T0={}));var M0;(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"})(M0||(M0={}));var P0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(P0||(P0={}));var k0;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(k0||(k0={}));var z0;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(z0||(z0={}));var I0;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(I0||(I0={}));var ae;(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"})(ae||(ae={}));var ze;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ze||(ze={}));var D0;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(D0||(D0={}));var B0;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(B0||(B0={}));var U0;(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"})(U0||(U0={}));var H0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(H0||(H0={}));var G0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(G0||(G0={}));var $0;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})($0||($0={}));var W0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(W0||(W0={}));var F0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(F0||(F0={}));var V0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(V0||(V0={}));var Jh={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN,ae.BEHAVIOR_DATA_USER],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function j0(e,t){return e===t||(Jh[e]??[]).some(r=>j0(r,t))}function K0(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=>j0(n,t))}var Ln=E(H());var Ni=E(H());var er=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=z.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=z.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var xn=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:er.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):er.await()}};var _e=class extends xn{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 Ni.CacheRegistry,this.cache=t?a.commonCache:new Ni.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 vn=class extends _e{async listMySearches(){let{session:t}=z.getState();return K0(t,ae.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Cn=class extends _e{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Sn=class extends _e{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=z.getState().session;return!!t?.sessionAuthenticated}};var En=class extends _e{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=z.getState().session;return!!t?.sessionAuthenticated}};var t5="ft-user-assets",r5={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(ze).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;Mi(e,r,[...Ti(e,r),a]),Z0(e,r,1,n),q0(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Mi(e,r,Ti(e,r).map(a=>a.id===n.id?n:a)),q0(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Mi(e,r,Ti(e,r).filter(i=>i.id!==a)),Z0(e,r,-1,n)}},Y0={[ze.SEARCHES]:"savedSearches",[ze.BOOKMARKS]:"bookmarks",[ze.BOOKS]:void 0,[ze.COLLECTIONS]:void 0},Ti=(e,t)=>{var r;let n=Y0[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Mi=(e,t,r)=>{let n=Y0[t];n&&(e[n]=r)},Z0=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===ze.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},q0=(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)},Ne=Ln.FtReduxStore.get({name:t5,reducers:r5,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ze).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Pi=class{constructor(t=new Sn,r=new En){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Cn,this.savedSearchesService=new vn,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=z.getState();(0,Ln.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(),Ne.actions.clearAssetCount(),Ne.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ne.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ne.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ne.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ne.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ne.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ne.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ne.getState().assetCounts.bookmarkByMap).length!==0;t===ze.BOOKMARKS&&r&&Ne.actions.clearBookmarkCountByMap(),Ne.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;Ne.actions.bookmarks(r)}}},o5=new Pi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=o5);var ki=class{addCommand(t,r=!1){z.commands.add(t,r)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ki;var Ie=E(H());var X0,kr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},n5=Symbol("clearAfterUnitTest"),An=class extends(0,Ie.withEventBus)(_e){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[X0]=()=>{this.defaultMessages={},this.cache=new Ie.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.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,Ie.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 Ie.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 Ie.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 kr({loadedContexts:t})),this.dispatchEvent(new kr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new kr({loadedContexts:[t]})),this.dispatchEvent(new kr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ie.delay)(0).then(()=>n()).catch(()=>null)))}};X0=n5;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends An{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends An{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var yo=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var Q0=E(H()),Ii=class{highlightHtml(t,r,n){(0,Q0.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ii;var J0=E(H());var Di=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=z.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 J0.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:z.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 Di;var e4=E(H());var bo=class{static get(t,r){var n,a;let i=z.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 e4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Bi=class{urlToSearchRequest(t){return bo.get().parse(t)}searchRequestToUrl(t){return bo.get().serialize(t)}};window.FluidTopicsUrlService=new Bi;var Pt=E(H());var tr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};tr.eventName="change";var Ui=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))}},t4=new Ui;var On=class e extends Pt.WithEventBus{static build(){return new e(window.history,t4,()=>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,Pt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new tr(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(tr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(tr.eventName,t)}currentItem(){return(0,Pt.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,Pt.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,Pt.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=On.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 r4=E(j());var o4=r4.css`
1112
+ `;var W1=["top","right","bottom","left"],$1=["start","end"],Xa=W1.reduce((e,t)=>e.concat(t,t+"-"+$1[0],t+"-"+$1[1]),[]),io=Math.min,At=Math.max,so=Math.round;var We=e=>({x:e,y:e}),V8={left:"right",right:"left",bottom:"top",top:"bottom"};function Qa(e,t,r){return At(e,io(t,r))}function Vo(e,t){return typeof e=="function"?e(t):e}function Er(e){return e.split("-")[0]}function Ot(e){return e.split("-")[1]}function Ja(e){return e==="x"?"y":"x"}function ei(e){return e==="y"?"height":"width"}function jo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function ti(e){return Ja(jo(e))}function F1(e,t,r){r===void 0&&(r=!1);let n=Ot(e),a=ti(e),i=ei(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ya(s)),[s,Ya(s)]}function V1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ya(e){let t=Er(e);return V8[t]+e.slice(t.length)}function j8(e){return{top:0,right:0,bottom:0,left:0,...e}}function j1(e){return typeof e!="number"?j8(e):{top:e,right:e,bottom:e,left:e}}function Vt(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 K1(e,t,r){let{reference:n,floating:a}=e,i=jo(t),s=ti(t),l=ei(s),f=Er(t),u=i==="y",h=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,v;switch(f){case"top":v={x:h,y:n.y-a.height};break;case"bottom":v={x:h,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}switch(Ot(t)){case"start":v[s]-=y*(r&&u?-1:1);break;case"end":v[s]+=y*(r&&u?-1:1);break}return v}async function Z1(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:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=Vo(t,e),C=j1(v),_=l[y?g==="floating"?"reference":"floating":g],M=Vt(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:h,strategy:f})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,I=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(I))?await(i.getScale==null?void 0:i.getScale(I))||{x:1,y:1}:{x:1,y:1},$=Vt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:I,strategy:f}):N);return{top:(M.top-$.top+C.top)/D.y,bottom:($.bottom-M.bottom+C.bottom)/D.y,left:(M.left-$.left+C.left)/D.x,right:($.right-M.right+C.right)/D.x}}var K8=50,q1=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:Z1},f=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=K1(u,n,f),y=n,v=0,C={};for(let L=0;L<i.length;L++){let _=i[L];if(!_)continue;let{name:M,fn:N}=_,{x:I,y:D,data:$,reset:q}=await N({x:h,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:C,rects:u,platform:l,elements:{reference:e,floating:t}});h=I??h,g=D??g,C[M]={...C[M],...$},q&&v<K8&&(v++,typeof q=="object"&&(q.placement&&(y=q.placement),q.rects&&(u=q.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):q.rects),{x:h,y:g}=K1(u,y,f)),L=-1)}return{x:h,y:g,placement:y,strategy:a,middlewareData:C}};function Z8(e,t,r){return(e?[...r.filter(a=>Ot(a)===e),...r.filter(a=>Ot(a)!==e)]:r.filter(a=>Er(a)===a)).filter(a=>e?Ot(a)===e||(t?V1(a)!==a:!1):!0)}var Y1=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:h=!1,alignment:g,allowedPlacements:y=Xa,autoAlignment:v=!0,...C}=Vo(e,t),L=g!==void 0||y===Xa?Z8(g||null,v,y):y,_=await f.detectOverflow(t,C),M=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[M];if(N==null)return{};let I=F1(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:L[0]}};let D=[_[Er(N)],_[I[0]],_[I[1]]],$=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:D}],q=L[M+1];if(q)return{data:{index:M+1,overflows:$},reset:{placement:q}};let Ee=$.map(me=>{let x=Ot(me.placement);return[me.placement,x&&h?me.overflows.slice(0,2).reduce((S,U)=>S+U,0):me.overflows[0],me.overflows]}).sort((me,x)=>me[1]-x[1]),Ye=((a=Ee.filter(me=>me[2].slice(0,Ot(me[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Ee[0][0];return Ye!==l?{data:{index:M+1,overflows:$},reset:{placement:Ye}}:{}}}};var X1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:M=>{let{x:N,y:I}=M;return{x:N,y:I}}},...u}=Vo(e,t),h={x:r,y:n},g=await i.detectOverflow(t,u),y=jo(Er(a)),v=Ja(y),C=h[v],L=h[y];if(s){let M=v==="y"?"top":"left",N=v==="y"?"bottom":"right",I=C+g[M],D=C-g[N];C=Qa(I,C,D)}if(l){let M=y==="y"?"top":"left",N=y==="y"?"bottom":"right",I=L+g[M],D=L-g[N];L=Qa(I,L,D)}let _=f.fn({...t,[v]:C,[y]:L});return{..._,data:{x:_.x-r,y:_.y-n,enabled:{[v]:s,[y]:l}}}}}};function Zo(){return typeof window<"u"}function Kt(e){return J1(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(J1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function J1(e){return Zo()?e instanceof Node||e instanceof Ae(e).Node:!1}function Me(e){return Zo()?e instanceof Element||e instanceof Ae(e).Element:!1}function at(e){return Zo()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function Q1(e){return!Zo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}function Lr(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&a!=="inline"&&a!=="contents"}function e2(e){return/^(table|td|th)$/.test(Kt(e))}function co(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var q8=/transform|translate|scale|rotate|perspective|filter/,Y8=/paint|layout|strict|content/,jt=e=>!!e&&e!=="none",ri;function qo(e){let t=Me(e)?Pe(e):e;return jt(t.transform)||jt(t.translate)||jt(t.scale)||jt(t.rotate)||jt(t.perspective)||!Yo()&&(jt(t.backdropFilter)||jt(t.filter))||q8.test(t.willChange||"")||Y8.test(t.contain||"")}function t2(e){let t=ht(e);for(;at(t)&&!Zt(t);){if(qo(t))return t;if(co(t))return null;t=ht(t)}return null}function Yo(){return ri==null&&(ri=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ri}function Zt(e){return/^(html|body|#document)$/.test(Kt(e))}function Pe(e){return Ae(e).getComputedStyle(e)}function lo(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(Kt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Q1(e)&&e.host||nt(e);return Q1(t)?t.host:t}function r2(e){let t=ht(e);return Zt(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&Lr(t)?t:r2(t)}function Ko(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=r2(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=Ae(a);if(i){let l=Xo(s);return t.concat(s,s.visualViewport||[],Lr(a)?a:[],l&&r?Ko(l):[])}else return t.concat(a,Ko(a,[],r))}function Xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function i2(e){let t=Pe(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=at(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,l=so(r)!==i||so(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function s2(e){return Me(e)?e:e.contextElement}function Ar(e){let t=s2(e);if(!at(t))return We(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=i2(t),s=(i?so(r.width):r.width)/n,l=(i?so(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var X8=We(0);function c2(e){let t=Ae(e);return!Yo()||!t.visualViewport?X8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Q8(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ae(e)?!1:t}function fo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=s2(e),s=We(1);t&&(n?Me(n)&&(s=Ar(n)):s=Ar(e));let l=Q8(i,r,n)?c2(i):We(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i){let y=Ae(i),v=n&&Me(n)?Ae(n):n,C=y,L=Xo(C);for(;L&&n&&v!==C;){let _=Ar(L),M=L.getBoundingClientRect(),N=Pe(L),I=M.left+(L.clientLeft+parseFloat(N.paddingLeft))*_.x,D=M.top+(L.clientTop+parseFloat(N.paddingTop))*_.y;f*=_.x,u*=_.y,h*=_.x,g*=_.y,f+=I,u+=D,C=Ae(L),L=Xo(C)}}return Vt({width:h,height:g,x:f,y:u})}function Qo(e,t){let r=lo(e).scrollLeft;return t?t.left+r:fo(nt(e)).left+r}function l2(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Qo(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function J8(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=nt(n),l=t?co(t.floating):!1;if(n===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=We(1),h=We(0),g=at(n);if((g||!g&&!i)&&((Kt(n)!=="body"||Lr(s))&&(f=lo(n)),g)){let v=fo(n);u=Ar(n),h.x=v.x+n.clientLeft,h.y=v.y+n.clientTop}let y=s&&!g&&!i?l2(s,f):We(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+h.x+y.x,y:r.y*u.y-f.scrollTop*u.y+h.y+y.y}}function eh(e){return Array.from(e.getClientRects())}function th(e){let t=nt(e),r=lo(e),n=e.ownerDocument.body,a=At(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=At(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Qo(e),l=-r.scrollTop;return Pe(n).direction==="rtl"&&(s+=At(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var o2=25;function rh(e,t){let r=Ae(e),n=nt(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let h=Yo();(!h||h&&t==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=Qo(n);if(u<=0){let h=n.ownerDocument,g=h.body,y=getComputedStyle(g),v=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(n.clientWidth-g.clientWidth-v);C<=o2&&(i-=C)}else u<=o2&&(i+=u);return{width:i,height:s,x:l,y:f}}function oh(e,t){let r=fo(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=at(e)?Ar(e):We(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 n2(e,t,r){let n;if(t==="viewport")n=rh(e,r);else if(t==="document")n=th(nt(e));else if(Me(t))n=oh(t,r);else{let a=c2(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Vt(n)}function d2(e,t){let r=ht(e);return r===t||!Me(r)||Zt(r)?!1:Pe(r).position==="fixed"||d2(r,t)}function nh(e,t){let r=t.get(e);if(r)return r;let n=Ko(e,[],!1).filter(l=>Me(l)&&Kt(l)!=="body"),a=null,i=Pe(e).position==="fixed",s=i?ht(e):e;for(;Me(s)&&!Zt(s);){let l=Pe(s),f=qo(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Lr(s)&&!f&&d2(e,s))?n=n.filter(h=>h!==s):a=l,s=ht(s)}return t.set(e,n),n}function ah(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?co(t)?[]:nh(t,this._c):[].concat(r),n],l=n2(t,s[0],a),f=l.top,u=l.right,h=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=n2(t,s[y],a);f=At(v.top,f),u=io(v.right,u),h=io(v.bottom,h),g=At(v.left,g)}return{width:u-g,height:h-f,x:g,y:f}}function ih(e){let{width:t,height:r}=i2(e);return{width:t,height:r}}function sh(e,t,r){let n=at(t),a=nt(t),i=r==="fixed",s=fo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=We(0);function u(){f.x=Qo(a)}if(n||!n&&!i)if((Kt(t)!=="body"||Lr(a))&&(l=lo(t)),n){let v=fo(t,!0,i,t);f.x=v.x+t.clientLeft,f.y=v.y+t.clientTop}else a&&u();i&&!n&&a&&u();let h=a&&!n&&!i?l2(a,l):We(0),g=s.left+l.scrollLeft-f.x-h.x,y=s.top+l.scrollTop-f.y-h.y;return{x:g,y,width:s.width,height:s.height}}function oi(e){return Pe(e).position==="static"}function a2(e,t){if(!at(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return nt(e)===r&&(r=r.ownerDocument.body),r}function f2(e,t){let r=Ae(e);if(co(e))return r;if(!at(e)){let a=ht(e);for(;a&&!Zt(a);){if(Me(a)&&!oi(a))return a;a=ht(a)}return r}let n=a2(e,t);for(;n&&e2(n)&&oi(n);)n=a2(n,t);return n&&Zt(n)&&oi(n)&&!qo(n)?r:n||t2(e)||r}var ch=async function(e){let t=this.getOffsetParent||f2,r=this.getDimensions,n=await r(e.floating);return{reference:sh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function lh(e){return Pe(e).direction==="rtl"}var Jo={convertOffsetParentRelativeRectToViewportRelativeRect:J8,getDocumentElement:nt,getClippingRect:ah,getOffsetParent:f2,getElementRects:ch,getClientRects:eh,getDimensions:ih,getScale:Ar,isElement:Me,isRTL:lh};var u2=Y1,p2=X1;var h2=(e,t,r)=>{let n=new Map,a={platform:Jo,...r},i={...a.platform,_c:n};return q1(e,t,{...a,platform:i})};function m2(e){return dh(e)}function ni(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function dh(e){for(let t=e;t;t=ni(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ni(e);t;t=ni(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 g2(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},h2(e,t,{strategy:n.strategy,platform:{...Jo,getOffsetParent:a=>Jo.getOffsetParent(a,m2)},middleware:[p2({crossAxis:!0}),u2({allowedPlacements:[n.placement]})]})}var Ir=E(H());var _i=E(le());function fh(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(!en(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(!en(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(!en(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function en(e,t){try{return fh(e,t)}catch{return!1}}function uo(e,t){return!en(e,t)}function y2(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function tn(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 b2=E(le(),1);var ai=e=>{let t=e??{};return(r,n)=>{var a;let i={hasChanged:uo,attribute:!1,...t};(0,b2.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 rn=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 qt=E(le(),1);var x2=E(le(),1);function v2(e,t){let r=()=>JSON.parse(JSON.stringify(e));return(0,x2.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:uo,...t??{}})}var on=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let 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 S2=E(j(),1);var nn=globalThis,uh=nn.ShadowRoot&&(nn.ShadyCSS===void 0||nn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wb=Symbol();var C2=(e,t)=>{if(uh)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),a=nn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,e.appendChild(n)}};var an=class extends S2.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 C2(n,t.elementStyles),n}};function E2(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 Rr=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},R2,L2=Symbol("constructorPrototype"),A2=Symbol("constructorName"),w2=Symbol("exportpartsDebouncer"),O2=Symbol("dynamicDependenciesLoaded"),Or=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Or.eventName="exportparts-updated";var it=class extends an{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[R2]=new on(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[w2].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[A2]=this.constructor.name,this[L2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[A2]&&Object.setPrototypeOf(this,this[L2])}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[O2]||(r[O2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Or.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Or.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 Or)})}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=E2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,a,i,s,l;let f=y=>y!=null&&y.trim().length>0,u=t.filter(f).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let h=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],L=[...v,...C].filter(f).map(_=>_.trim());for(let _ of L)h.add(_)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>u.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};R2=w2;Rr([(0,qt.property)()],it.prototype,"exportpartsPrefix",void 0);Rr([v2([])],it.prototype,"exportpartsPrefixes",void 0);Rr([(0,qt.property)({reflect:!0})],it.prototype,"exportparts",void 0);Rr([(0,qt.property)()],it.prototype,"customStylesheet",void 0);Rr([(0,qt.property)()],it.prototype,"elementToFocus",void 0);Rr([(0,qt.state)()],it.prototype,"useAdoptedStyleSheets",void 0);function sn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var po=Symbol("internalReduxEventsUnsubscribers"),Rt=Symbol("internalStoresUnsubscribers"),Yt=Symbol("internalStores"),ph=tn(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[Yt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Yt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Yt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Yt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Yt].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[Rt].has(s.store):this[Rt].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[Rt].set(s,l.subscribe(()=>this.updateFromStores())),this[po].set(s,[]),sn(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,h)=>{if(typeof this[h]=="function"&&(!u.store||l.name===u.store)){let g=y=>this[h](y);l.addEventListener(u.eventName,g),this[po].get(s).push(()=>l.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Rt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Rt].has(s)&&this[Rt].get(s)(),this[Rt].delete(s),(l=this[po].get(s))===null||l===void 0||l.forEach(f=>f()),this[po].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Rt,r=Yt,n=po,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),_2=class extends ph(it){};function ke(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 mt(e){return!!e&&!!e[X]}function Fe(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)===Ch}(e)||Array.isArray(e)||!!e[I2]||!!(!((t=e.constructor)===null||t===void 0)&&t[I2])||hi(e)||mi(e))}function Xt(e,t,r){r===void 0&&(r=!1),Nr(e)===0?(r?Object.keys:_r)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,a){return t(a,n,e)})}function Nr(e){var t=e[X];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:hi(e)?2:mi(e)?3:0}function wr(e,t){return Nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hh(e,t){return Nr(e)===2?e.get(t):e[t]}function D2(e,t,r){var n=Nr(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function B2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function hi(e){return xh&&e instanceof Map}function mi(e){return vh&&e instanceof Set}function wt(e){return e.o||e.t}function gi(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=G2(e);delete t[X];for(var r=_r(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 yi(e,t){return t===void 0&&(t=!1),bi(e)||mt(e)||!Fe(e)||(Nr(e)>1&&(e.set=e.add=e.clear=e.delete=mh),Object.freeze(e),t&&Xt(e,function(r,n){return yi(n,!0)},!0)),e}function mh(){ke(2)}function bi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function st(e){var t=pi[e];return t||ke(18,e),t}function gh(e,t){pi[e]||(pi[e]=t)}function di(){return mo}function ii(e,t){t&&(st("Patches"),e.u=[],e.s=[],e.v=t)}function cn(e){fi(e),e.p.forEach(yh),e.p=null}function fi(e){e===mo&&(mo=e.l)}function N2(e){return mo={p:[],l:mo,h:e,m:!0,_:0}}function yh(e){var t=e[X];t.i===0||t.i===1?t.j():t.g=!0}function si(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||st("ES5").S(t,e,n),n?(r[X].P&&(cn(t),ke(4)),Fe(e)&&(e=ln(t,e),t.l||dn(t,e)),t.u&&st("Patches").M(r[X].t,e,t.u,t.s)):e=ln(t,r,[]),cn(t),t.u&&t.v(t.u,t.s),e!==H2?e:void 0}function ln(e,t,r){if(bi(t))return t;var n=t[X];if(!n)return Xt(t,function(l,f){return T2(e,n,t,l,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return dn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=gi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Xt(i,function(l,f){return T2(e,n,a,l,f,r,s)}),dn(e,a,!1),r&&e.u&&st("Patches").N(n,r,e.u,e.s)}return n.o}function T2(e,t,r,n,a,i,s){if(mt(a)){var l=ln(e,a,i&&t&&t.i!==3&&!wr(t.R,n)?i.concat(n):void 0);if(D2(r,n,l),!mt(l))return;e.m=!1}else s&&r.add(a);if(Fe(a)&&!bi(a)){if(!e.h.D&&e._<1)return;ln(e,a),t&&t.A.l||dn(e,a)}}function dn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&yi(t,r)}function ci(e,t){var r=e[X];return(r?wt(r):e)[t]}function M2(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 _t(e){e.P||(e.P=!0,e.l&&_t(e.l))}function li(e){e.o||(e.o=gi(e.t))}function ui(e,t,r){var n=hi(t)?st("MapSet").F(t,r):mi(t)?st("MapSet").T(t,r):e.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:di(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=go;s&&(f=[l],u=ho);var h=Proxy.revocable(f,u),g=h.revoke,y=h.proxy;return l.k=y,l.j=g,y}(t,r):st("ES5").J(t,r);return(r?r.A:di()).p.push(n),n}function bh(e){return mt(e)||ke(22,e),function t(r){if(!Fe(r))return r;var n,a=r[X],i=Nr(r);if(a){if(!a.P&&(a.i<4||!st("ES5").K(a)))return a.t;a.I=!0,n=P2(r,i),a.I=!1}else n=P2(r,i);return Xt(n,function(s,l){a&&hh(a.t,s)===l||D2(n,s,t(l))}),i===3?new Set(n):n}(e)}function P2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gi(e)}function U2(){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[X];return go.get(u,s)},set:function(u){var h=this[X];go.set(h,s,u)}},f}function t(s){for(var l=s.length-1;l>=0;l--){var f=s[l][X];if(!f.P)switch(f.i){case 5:n(f)&&_t(f);break;case 4:r(f)&&_t(f)}}}function r(s){for(var l=s.t,f=s.k,u=_r(f),h=u.length-1;h>=0;h--){var g=u[h];if(g!==X){var y=l[g];if(y===void 0&&!wr(l,g))return!0;var v=f[g],C=v&&v[X];if(C?C.t!==y:!B2(v,y))return!0}}var L=!!l[X];return u.length!==_r(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&&ke(3,JSON.stringify(wt(s)))}var i={};gh("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(g,y){if(g){for(var v=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(v,""+C,e(C,!0));return v}var L=G2(y);delete L[X];for(var _=_r(L),M=0;M<_.length;M++){var N=_[M];L[N]=e(N,g||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(f,s),h={i:f?5:4,A:l?l.A:di(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:h,writable:!0}),u},S:function(s,l,f){f?mt(l)&&l[X].A===s&&t(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var g=h[X];if(g){var y=g.t,v=g.k,C=g.R,L=g.i;if(L===4)Xt(v,function(D){D!==X&&(y[D]!==void 0||wr(y,D)?C[D]||u(v[D]):(C[D]=!0,_t(g)))}),Xt(y,function(D){v[D]!==void 0||wr(v,D)||(C[D]=!1,_t(g))});else if(L===5){if(n(g)&&(_t(g),C.length=!0),v.length<y.length)for(var _=v.length;_<y.length;_++)C[_]=!1;else for(var M=y.length;M<v.length;M++)C[M]=!0;for(var N=Math.min(v.length,y.length),I=0;I<N;I++)v.hasOwnProperty(I)||(C[I]=!0),C[I]===void 0&&u(v[I])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var k2,mo,xi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",xh=typeof Map<"u",vh=typeof Set<"u",z2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H2=xi?Symbol.for("immer-nothing"):((k2={})["immer-nothing"]=!0,k2),I2=xi?Symbol.for("immer-draftable"):"__$immer_draftable",X=xi?Symbol.for("immer-state"):"__$immer_state";var Ch=""+Object.prototype.constructor,_r=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,G2=Object.getOwnPropertyDescriptors||function(e){var t={};return _r(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},pi={},go={get:function(e,t){if(t===X)return e;var r=wt(e);if(!wr(r,t))return function(a,i,s){var l,f=M2(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||!Fe(n)?n:n===ci(e.t,t)?(li(e),e.o[t]=ui(e.A.h,n,e)):n},has:function(e,t){return t in wt(e)},ownKeys:function(e){return Reflect.ownKeys(wt(e))},set:function(e,t,r){var n=M2(wt(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var a=ci(wt(e),t),i=a?.[X];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(B2(r,a)&&(r!==void 0||wr(e.t,t)))return!0;li(e),_t(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 ci(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,li(e),_t(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=wt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){ke(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ke(12)}},ho={};Xt(go,function(e,t){ho[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ho.deleteProperty=function(e,t){return ho.set.call(this,e,t,void 0)},ho.set=function(e,t,r){return go.set.call(this,e[0],t,r,e[0])};var Sh=function(){function e(r){var n=this;this.O=z2,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 M=arguments.length,N=Array(M>1?M-1:0),I=1;I<M;I++)N[I-1]=arguments[I];return f.produce(L,function(D){var $;return($=i).call.apply($,[_,D].concat(N))})}}var u;if(typeof i!="function"&&ke(6),s!==void 0&&typeof s!="function"&&ke(7),Fe(a)){var h=N2(n),g=ui(n,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?cn(h):fi(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return ii(h,s),si(L,h)},function(L){throw cn(h),L}):(ii(h,s),si(u,h))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===H2&&(u=void 0),n.D&&yi(u,!0),s){var v=[],C=[];st("Patches").M(a,u,v,C),s(v,C)}return u}ke(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return n.produceWithPatches(u,function(v){return a.apply(void 0,[v].concat(g))})};var s,l,f=n.produce(a,i,function(u,h){s=u,l=h});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){Fe(r)||ke(8),mt(r)&&(r=bh(r));var n=N2(this),a=ui(this,r,void 0);return a[X].C=!0,fi(n),a},t.finishDraft=function(r,n){var a=r&&r[X],i=a.A;return ii(i,n),si(void 0,i)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!z2&&ke(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=st("Patches").$;return mt(r)?s(r,n):this.produce(r,function(l){return s(l,n)})},e}(),we=new Sh,Eh=we.produce,nx=we.produceWithPatches.bind(we),ax=we.setAutoFreeze.bind(we),ix=we.setUseProxies.bind(we),sx=we.applyPatches.bind(we),cx=we.createDraft.bind(we),lx=we.finishDraft.bind(we),fn=Eh;function Qt(e){"@babel/helpers - typeof";return Qt=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},Qt(e)}function $2(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W2(e){var t=$2(e,"string");return Qt(t)=="symbol"?t:t+""}function F2(e,t,r){return(t=W2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V2(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 vi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V2(Object(r),!0).forEach(function(n){F2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ce(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 j2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ci=function(){return Math.random().toString(36).substring(7).split("").join(".")},un={INIT:"@@redux/INIT"+Ci(),REPLACE:"@@redux/REPLACE"+Ci(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ci()}};function Lh(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 Si(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Si)(e,t)}if(typeof e!="function")throw new Error(Ce(2));var a=e,i=t,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function h(){if(f)throw new Error(Ce(3));return i}function g(L){if(typeof L!="function")throw new Error(Ce(4));if(f)throw new Error(Ce(5));var _=!0;return u(),l.push(L),function(){if(_){if(f)throw new Error(Ce(6));_=!1,u();var N=l.indexOf(L);l.splice(N,1),s=null}}}function y(L){if(!Lh(L))throw new Error(Ce(7));if(typeof L.type>"u")throw new Error(Ce(8));if(f)throw new Error(Ce(9));try{f=!0,i=a(i,L)}finally{f=!1}for(var _=s=l,M=0;M<_.length;M++){var N=_[M];N()}return L}function v(L){if(typeof L!="function")throw new Error(Ce(10));a=L,y({type:un.REPLACE})}function C(){var L,_=g;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ce(11));function I(){N.next&&N.next(h())}I();var D=_(I);return{unsubscribe:D}}},L[j2]=function(){return this},L}return y({type:un.INIT}),n={dispatch:y,subscribe:g,getState:h,replaceReducer:v},n[j2]=C,n}function Ah(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:un.INIT});if(typeof n>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function K2(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{Ah(r)}catch(f){l=f}return function(u,h){if(u===void 0&&(u={}),l)throw l;if(0)var g;for(var y=!1,v={},C=0;C<i.length;C++){var L=i[C],_=r[L],M=u[L],N=_(M,h);if(typeof N>"u"){var I=h&&h.type;throw new Error(Ce(14))}v[L]=N,y=y||N!==M}return y=y||i.length!==Object.keys(u).length,y?v:u}}function Tr(){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 Z2(){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(Ce(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(f){return f(s)});return i=Tr.apply(void 0,l)(a.dispatch),vi(vi({},a),{},{dispatch:i})}}}function q2(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 Y2=q2();Y2.withExtraArgument=q2;var Ei=Y2;var t0=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)}}(),Oh=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(h){return f([u,h])}}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(h){u=[6,h],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Mr=function(e,t){for(var r=0,n=t.length,a=e.length;r<n;r++,a++)e[a]=t[r];return e},Rh=Object.defineProperty,wh=Object.defineProperties,_h=Object.getOwnPropertyDescriptors,X2=Object.getOwnPropertySymbols,Nh=Object.prototype.hasOwnProperty,Th=Object.prototype.propertyIsEnumerable,Q2=function(e,t,r){return t in e?Rh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Nt=function(e,t){for(var r in t||(t={}))Nh.call(t,r)&&Q2(e,r,t[r]);if(X2)for(var n=0,a=X2(t);n<a.length;n++){var r=a[n];Th.call(t,r)&&Q2(e,r,t[r])}return e},Li=function(e,t){return wh(e,_h(t))},Mh=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 Ph=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Rx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function kh(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 zh=function(e){t0(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,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array),Ih=function(e){t0(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,Mr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Mr([void 0],r.concat(this))))},t}(Array);function Ri(e){return Fe(e)?fn(e,function(){}):e}function Dh(e){return typeof e=="boolean"}function Bh(){return function(t){return Uh(t)}}function Uh(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 zh;if(r&&(Dh(r)?l.push(Ei):l.push(Ei.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var Ai=!0;function r0(e){var t=Bh(),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,h=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(kh(a))v=K2(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),!Ai&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ai&&C.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=Z2.apply(void 0,C),_=Tr;f&&(_=Ph(Nt({trace:!Ai},typeof f=="object"&&f)));var M=new Ih(L),N=M;Array.isArray(y)?N=Mr([L],y):typeof y=="function"&&(N=y(M));var I=_.apply(void 0,N);return Si(v,h,I)}function Tt(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 Nt(Nt({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 o0(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 Hh(e){return typeof e=="function"}function Gh(e,t,r,n){r===void 0&&(r=[]);var a=typeof t=="function"?o0(t):[t,r,n],i=a[0],s=a[1],l=a[2],f;if(Hh(e))f=function(){return Ri(e())};else{var u=Ri(e);f=function(){return u}}function h(g,y){g===void 0&&(g=f());var v=Mr([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return v.filter(function(C){return!!C}).length===0&&(v=[l]),v.reduce(function(C,L){if(L)if(mt(C)){var _=C,M=L(_,y);return M===void 0?C:M}else{if(Fe(C))return fn(C,function(N){return L(N,y)});var M=L(C,y);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},g)}return h.getInitialState=f,h}function $h(e,t){return e+"/"+t}function n0(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:Ri(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var g=n[h],y=$h(t,h),v,C;"reducer"in g?(v=g.reducer,C=g.prepare):v=g,i[h]=v,s[y]=v,l[h]=C?Tt(y,C):Tt(y)});function f(){var h=typeof e.extraReducers=="function"?o0(e.extraReducers):[e.extraReducers],g=h[0],y=g===void 0?{}:g,v=h[1],C=v===void 0?[]:v,L=h[2],_=L===void 0?void 0:L,M=Nt(Nt({},y),s);return Gh(r,function(N){for(var I in M)N.addCase(I,M[I]);for(var D=0,$=C;D<$.length;D++){var q=$[D];N.addMatcher(q.matcher,q.reducer)}_&&N.addDefaultCase(_)})}var u;return{name:t,reducer:function(h,g){return u||(u=f()),u(h,g)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var Wh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fh=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Wh[Math.random()*64|0];return t},Vh=["name","message","stack","code"],Oi=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),J2=function(){function e(t,r){this.payload=t,this.meta=r}return e}(),jh=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=Vh;r<n.length;r++){var a=n[r];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Tx=function(){function e(t,r,n){var a=Tt(t+"/fulfilled",function(h,g,y,v){return{payload:h,meta:Li(Nt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=Tt(t+"/pending",function(h,g,y){return{payload:void 0,meta:Li(Nt({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Tt(t+"/rejected",function(h,g,y,v,C){return{payload:v,error:(n&&n.serializeError||jh)(h||"Rejected"),meta:Li(Nt({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,f=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 u(h){return function(g,y,v){var C=n?.idGenerator?n.idGenerator(h):Fh(),L=new f,_,M=!1;function N(D){_=D,L.abort()}var I=function(){return Mh(this,null,function(){var D,$,q,Ee,he,Ye,me;return Oh(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Ee=(D=n?.condition)==null?void 0:D.call(n,h,{getState:y,extra:v}),Zh(Ee)?[4,Ee]:[3,2];case 1:Ee=x.sent(),x.label=2;case 2:if(Ee===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,he=new Promise(function(S,U){return L.signal.addEventListener("abort",function(){return U({name:"AbortError",message:_||"Aborted"})})}),g(i(C,h,($=n?.getPendingMeta)==null?void 0:$.call(n,{requestId:C,arg:h},{getState:y,extra:v}))),[4,Promise.race([he,Promise.resolve(r(h,{dispatch:g,getState:y,extra:v,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(S,U){return new Oi(S,U)},fulfillWithValue:function(S,U){return new J2(S,U)}})).then(function(S){if(S instanceof Oi)throw S;return S instanceof J2?a(S.payload,C,h,S.meta):a(S,C,h)})])];case 3:return q=x.sent(),[3,5];case 4:return Ye=x.sent(),q=Ye instanceof Oi?s(null,C,h,Ye.payload,Ye.meta):s(Ye,C,h),[3,5];case 5:return me=n&&!n.dispatchConditionRejection&&s.match(q)&&q.meta.condition,me||g(q),[2,q]}})})}();return Object.assign(I,{abort:N,requestId:C,arg:h,unwrap:function(){return I.then(Kh)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e}();function Kh(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Zh(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var a0="listener",i0="completed",s0="cancelled",Mx="task-"+s0,Px="task-"+i0,kx=a0+"-"+s0,zx=a0+"-"+i0;var wi="listenerMiddleware";var Ix=Tt(wi+"/add"),Dx=Tt(wi+"/removeAll"),Bx=Tt(wi+"/remove");var e0,Ux=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(e0||(e0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},qh=function(e){return function(t){setTimeout(t,e)}},Hx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qh(10);U2();var Yh=tn(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)}}}),pn=class extends Yh(Object){};window.ftReduxStores||(window.ftReduxStores={});var c0=class e extends pn{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(sn(i))return i;if(a==null)return;let s=n0({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=r0({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let h=y2(s.getInitialState());for(let g of u.keeping)h[g]=(f??h)[g];return h}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 rn;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?(...h)=>{let g=u(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[f]:a(h)})}}}),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 hn=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 mn=E(H()),Xh="ft-app-info",Jt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Jt.eventName="authentication-change";var Qh={session:(e,t)=>{(0,mn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>z.dispatchEvent(new Jt(t.payload)),0))}},z=mn.FtReduxStore.get({name:Xh,reducers:Qh,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 l0=E(H()),gn=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},hv=(0,l0.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(z)}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=>hn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return gn([(0,_i.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),gn([(0,_i.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),gn([ai({store:z.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),gn([ai({store:z.name})],t.prototype,"uiLocale",void 0),t});var e5=E(f0(),1);var u0;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(u0||(u0={}));var p0;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(p0||(p0={}));var h0;(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"})(h0||(h0={}));var m0;(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"})(m0||(m0={}));var g0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(g0||(g0={}));var y0;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(y0||(y0={}));var b0;(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"})(b0||(b0={}));var x0;(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"})(x0||(x0={}));var v0;(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"})(v0||(v0={}));var C0;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(C0||(C0={}));var S0;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(S0||(S0={}));var E0;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(E0||(E0={}));var L0;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(L0||(L0={}));var A0;(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"})(A0||(A0={}));var O0;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(O0||(O0={}));var R0;(function(e){e.ASC="ASC",e.DESC="DESC"})(R0||(R0={}));var w0;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(w0||(w0={}));var _0;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(_0||(_0={}));var N0;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(N0||(N0={}));var T0;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(T0||(T0={}));var M0;(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"})(M0||(M0={}));var P0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(P0||(P0={}));var k0;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(k0||(k0={}));var z0;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(z0||(z0={}));var I0;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(I0||(I0={}));var ae;(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"})(ae||(ae={}));var ze;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ze||(ze={}));var D0;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(D0||(D0={}));var B0;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(B0||(B0={}));var U0;(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"})(U0||(U0={}));var H0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(H0||(H0={}));var G0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(G0||(G0={}));var $0;(function(e){e.USER="USER",e.ASSISTANT="ASSISTANT"})($0||($0={}));var W0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(W0||(W0={}));var F0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(F0||(F0={}));var V0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(V0||(V0={}));var Jh={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN,ae.BEHAVIOR_DATA_USER],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function j0(e,t){return e===t||(Jh[e]??[]).some(r=>j0(r,t))}function K0(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=>j0(n,t))}var Ln=E(H());var Ni=E(H());var er=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=z.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=z.subscribe(()=>{n=e.get(t),n&&(a(),r(n))})}})}};var xn=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:er.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):er.await()}};var _e=class extends xn{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 Ni.CacheRegistry,this.cache=t?a.commonCache:new Ni.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 vn=class extends _e{async listMySearches(){let{session:t}=z.getState();return K0(t,ae.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),5*60*1e3):[]}};var Cn=class extends _e{async listMyBookmarks(){let t=z.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),5*60*1e3):[]}};var Sn=class extends _e{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=z.getState().session;return!!t?.sessionAuthenticated}};var En=class extends _e{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=z.getState().session;return!!t?.sessionAuthenticated}};var t5="ft-user-assets",r5={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(ze).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;Mi(e,r,[...Ti(e,r),a]),Z0(e,r,1,n),q0(e,a)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Mi(e,r,Ti(e,r).map(a=>a.id===n.id?n:a)),q0(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:a}=t.payload;Mi(e,r,Ti(e,r).filter(i=>i.id!==a)),Z0(e,r,-1,n)}},Y0={[ze.SEARCHES]:"savedSearches",[ze.BOOKMARKS]:"bookmarks",[ze.BOOKS]:void 0,[ze.COLLECTIONS]:void 0},Ti=(e,t)=>{var r;let n=Y0[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Mi=(e,t,r)=>{let n=Y0[t];n&&(e[n]=r)},Z0=(e,t,r,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+r),t===ze.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},q0=(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)},Ne=Ln.FtReduxStore.get({name:t5,reducers:r5,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ze).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Pi=class{constructor(t=new Sn,r=new En){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Cn,this.savedSearchesService=new vn,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=z.getState();(0,Ln.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(),Ne.actions.clearAssetCount(),Ne.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ne.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ne.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ne.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ne.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ne.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ne.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ne.getState().assetCounts.bookmarkByMap).length!==0;t===ze.BOOKMARKS&&r&&Ne.actions.clearBookmarkCountByMap(),Ne.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;Ne.actions.bookmarks(r)}}},o5=new Pi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=o5);var ki=class{addCommand(t,r=!1){z.commands.add(t,r)}consumeCommand(t){return z.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ki;var Ie=E(H());var X0,kr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},n5=Symbol("clearAfterUnitTest"),An=class extends(0,Ie.withEventBus)(_e){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[X0]=()=>{this.defaultMessages={},this.cache=new Ie.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=z.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,Ie.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 Ie.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 Ie.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 kr({loadedContexts:t})),this.dispatchEvent(new kr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new kr({loadedContexts:[t]})),this.dispatchEvent(new kr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ie.delay)(0).then(()=>n()).catch(()=>null)))}};X0=n5;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends An{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends An{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var yo=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var Q0=E(H()),Ii=class{highlightHtml(t,r,n){(0,Q0.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Ii;var J0=E(H());var Di=class{isDate(t){var r,n,a,i;return(i=(a=((n=(r=z.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 J0.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:z.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 Di;var e4=E(H());var bo=class{static get(t,r){var n,a;let i=z.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 e4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Bi=class{urlToSearchRequest(t){return bo.get().parse(t)}searchRequestToUrl(t){return bo.get().serialize(t)}};window.FluidTopicsUrlService=new Bi;var Pt=E(H());var tr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};tr.eventName="change";var Ui=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))}},t4=new Ui;var On=class e extends Pt.WithEventBus{static build(){return new e(window.history,t4,()=>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,Pt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new tr(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(tr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(tr.eventName,t)}currentItem(){return(0,Pt.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,Pt.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,Pt.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=On.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 r4=E(j());var o4=r4.css`
1113
1113
  `;var a4=E(j()),xe=E(le()),Ve=E(H());function n4(e,t){let{authenticationRequired:r,session:n}=z.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var ie=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},Z=class extends Ve.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=()=>er.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ve.CacheRegistry,this.cleanSessionDebouncer=new Ve.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return a4.html`
1114
1114
  <slot></slot>
1115
1115
  `}connectedCallback(){super.connectedCallback(),z.addEventListener(Jt.eventName,this.reloadConfiguration)}disconnectedCallback(){z.addEventListener(Jt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(t){var r,n,a,i,s,l,f;super.update(t),t.has("baseUrl")&&(z.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&z.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&z.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&z.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&z.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&z.actions.noCustom(this.noCustom),t.has("editorMode")&&z.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&z.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&z.actions.session(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>yo.addContext(u)),t.has("openExternalDocumentInNewTab")&&z.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&z.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&z.actions.forcedOffline(this.forcedOffline),t.has("localesConfiguration")&&(z.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),z.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),z.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),t.has("authenticationRequired")&&z.actions.authenticationRequired(this.authenticationRequired),t.has("availableContentLocales")&&z.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",()=>n4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Z.elementDefinitions={};Z.styles=o4;ie([(0,xe.property)()],Z.prototype,"baseUrl",void 0);ie([(0,xe.property)()],Z.prototype,"apiIntegrationIdentifier",void 0);ie([(0,xe.property)()],Z.prototype,"apiIntegrationAppVersion",void 0);ie([(0,xe.property)()],Z.prototype,"uiLocale",void 0);ie([(0,Ve.jsonProperty)(null)],Z.prototype,"availableUiLocales",void 0);ie([(0,Ve.jsonProperty)(null)],Z.prototype,"metadataConfiguration",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"editorMode",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"noCustom",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"openExternalDocumentInNewTab",void 0);ie([(0,xe.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Z.prototype,"noCustomComponent",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"withManualResources",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"navigatorOnline",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"forcedOffline",void 0);ie([(0,xe.property)({type:Object})],Z.prototype,"apiProvider",void 0);ie([(0,xe.property)({type:Boolean})],Z.prototype,"authenticationRequired",void 0);ie([(0,Ve.jsonProperty)([])],Z.prototype,"messageContexts",void 0);ie([(0,Ve.jsonProperty)(void 0)],Z.prototype,"session",void 0);ie([(0,xe.state)()],Z.prototype,"localesConfiguration",void 0);ie([(0,xe.state)()],Z.prototype,"availableContentLocales",void 0);var i4=E(H());(0,i4.customElement)("ft-app-context")(Z);var s4=E(le());var Hi=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-]+$/)}},zr=new Hi;var a5=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},vo=Symbol("i18nAttributes"),c4=Symbol("i18nListAttributes"),l4=Symbol("i18nProperties"),Rn=Symbol("i18nContexts"),xo=Symbol("i18nUnsubs"),d4=(0,Ir.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?zi:yo}i18n(i){let{context:s,key:l,message:f}=i,{custom:u,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=h??(g?g(this):[]);return this.getI18nService(u).resolveMessage(s,l,...y)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(zr.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=(h,g,y)=>y?.context&&y.key&&i(h,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...h})}:y;(s=this[vo])===null||s===void 0||s.forEach((h,g)=>f[g]=u(h,g,f[g])),(l=this[c4])===null||l===void 0||l.forEach((h,g)=>{var y;return f[g]=(y=f[g])===null||y===void 0?void 0:y.map(v=>u(h,g,v))})}updateI18nProperties(i){var s;(s=this[l4])===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[Rn].set(f,{isCustomContext:l}),this[xo].has(f)||this[xo].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[Rn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Rn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[xo].forEach(i=>i()),this[xo].clear()}}return t=Rn,r=xo,a5([(0,s4.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),wn=class extends d4(Ir.FtLitElement){},_n=class extends d4(Ir.FtLitElementRedux){};var f4=E(H());var Gi=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?zr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},i5=new Gi;var u4=(e,t)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:f4.hasChanged,converter:zr,...t}),r[vo]=(a=r[vo])!==null&&a!==void 0?a:new Map,r[vo].set(n,e??{})};var p4=E(j());var h4=p4.css`
@@ -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 Yl={};var zi={};V(zi,{ParametrizedLabelResolver:()=>Ro});var Ro=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 ss={};V(ss,{FtCommandQueue:()=>wo,FtLitElementRedux:()=>No,FtReduxStore:()=>lr,FtStateManager:()=>is,ReduxWatcher:()=>Nn,clearAllStores:()=>cp,isFtReduxStore:()=>Pr,redux:()=>Mr,reduxEventListener:()=>Lu,reduxReactive:()=>Au,watch:()=>lp,withRedux:()=>ql});var Au=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Mr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Ue,attribute:!1,...e};O(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})}},Lu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var wo=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 Pr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _o=Symbol("internalReduxEventsUnsubscribers"),Nt=Symbol("internalStoresUnsubscribers"),ir=Symbol("internalStores"),ql=be(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[ir].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ir].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ir].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[ir].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ir].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ir].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[Nt].has(s.store):this[Nt].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[Nt].set(s,c.subscribe(()=>this.updateFromStores())),this[_o].set(s,[]),Pr(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[_o].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Nt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Nt].has(s)&&this[Nt].get(s)(),this[Nt].delete(s),(c=this[_o].get(s))===null||c===void 0||c.forEach(d=>d()),this[_o].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Nt,r=ir,o=_o,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),No=class extends ql(Z){};function He(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 St(t){return!!t&&!!t[ie]}function Ze(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)===Pu}(t)||Array.isArray(t)||!!t[o1]||!!(!((e=t.constructor)===null||e===void 0)&&e[o1])||Vi(t)||ji(t))}function sr(t,e,r){r===void 0&&(r=!1),zr(t)===0?(r?Object.keys:Ir)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function zr(t){var e=t[ie];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Vi(t)?2:ji(t)?3:0}function kr(t,e){return zr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ou(t,e){return zr(t)===2?t.get(e):t[e]}function n1(t,e,r){var o=zr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function a1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Vi(t){return Tu&&t instanceof Map}function ji(t){return Mu&&t instanceof Set}function Tt(t){return t.o||t.t}function Ki(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=c1(t);delete e[ie];for(var r=Ir(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 Zi(t,e){return e===void 0&&(e=!1),Yi(t)||St(t)||!Ze(t)||(zr(t)>1&&(t.set=t.add=t.clear=t.delete=Ru),Object.freeze(t),e&&sr(t,function(r,o){return Zi(o,!0)},!0)),t}function Ru(){He(2)}function Yi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function at(t){var e=Wi[t];return e||He(18,t),e}function wu(t,e){Wi[t]||(Wi[t]=e)}function Hi(){return Mo}function Di(t,e){e&&(at("Patches"),t.u=[],t.s=[],t.v=e)}function Ln(t){Fi(t),t.p.forEach(_u),t.p=null}function Fi(t){t===Mo&&(Mo=t.l)}function Xl(t){return Mo={p:[],l:Mo,h:t,m:!0,_:0}}function _u(t){var e=t[ie];e.i===0||e.i===1?e.j():e.g=!0}function Ui(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||at("ES5").S(e,t,o),o?(r[ie].P&&(Ln(e),He(4)),Ze(t)&&(t=On(e,t),e.l||Rn(e,t)),e.u&&at("Patches").M(r[ie].t,t,e.u,e.s)):t=On(e,r,[]),Ln(e),e.u&&e.v(e.u,e.s),t!==s1?t:void 0}function On(t,e,r){if(Yi(e))return e;var o=e[ie];if(!o)return sr(e,function(c,d){return Ql(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return Rn(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ki(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),sr(i,function(c,d){return Ql(t,o,a,c,d,r,s)}),Rn(t,a,!1),r&&t.u&&at("Patches").N(o,r,t.u,t.s)}return o.o}function Ql(t,e,r,o,a,i,s){if(St(a)){var c=On(t,a,i&&e&&e.i!==3&&!kr(e.R,o)?i.concat(o):void 0);if(n1(r,o,c),!St(c))return;t.m=!1}else s&&r.add(a);if(Ze(a)&&!Yi(a)){if(!t.h.D&&t._<1)return;On(t,a),e&&e.A.l||Rn(t,a)}}function Rn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Zi(e,r)}function Bi(t,e){var r=t[ie];return(r?Tt(r):t)[e]}function Jl(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 Mt(t){t.P||(t.P=!0,t.l&&Mt(t.l))}function $i(t){t.o||(t.o=Ki(t.t))}function Gi(t,e,r){var o=Vi(e)?at("MapSet").F(e,r):ji(e)?at("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Hi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=Po;s&&(d=[c],f=To);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):at("ES5").J(e,r);return(r?r.A:Hi()).p.push(o),o}function Nu(t){return St(t)||He(22,t),function e(r){if(!Ze(r))return r;var o,a=r[ie],i=zr(r);if(a){if(!a.P&&(a.i<4||!at("ES5").K(a)))return a.t;a.I=!0,o=e1(r,i),a.I=!1}else o=e1(r,i);return sr(o,function(s,c){a&&Ou(a.t,s)===c||n1(o,s,e(c))}),i===3?new Set(o):o}(t)}function e1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ki(t)}function i1(){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[ie];return Po.get(f,s)},set:function(f){var h=this[ie];Po.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ie];if(!d.P)switch(d.i){case 5:o(d)&&Mt(d);break;case 4:r(d)&&Mt(d)}}}function r(s){for(var c=s.t,d=s.k,f=Ir(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==ie){var g=c[p];if(g===void 0&&!kr(c,p))return!0;var x=d[p],S=x&&x[ie];if(S?S.t!==g:!a1(x,g))return!0}}var L=!!c[ie];return f.length!==Ir(c).length+(L?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&&He(3,JSON.stringify(Tt(s)))}var i={};wu("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var x=Array(g.length),S=0;S<g.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var L=c1(g);delete L[ie];for(var _=Ir(L),T=0;T<_.length;T++){var M=_[T];L[M]=t(M,p||!!L[M].enumerable)}return Object.create(Object.getPrototypeOf(g),L)}(d,s),h={i:d?5:4,A:c?c.A:Hi(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,ie,{value:h,writable:!0}),f},S:function(s,c,d){d?St(c)&&c[ie].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[ie];if(p){var g=p.t,x=p.k,S=p.R,L=p.i;if(L===4)sr(x,function(C){C!==ie&&(g[C]!==void 0||kr(g,C)?S[C]||f(x[C]):(S[C]=!0,Mt(p)))}),sr(g,function(C){x[C]!==void 0||kr(x,C)||(S[C]=!1,Mt(p))});else if(L===5){if(o(p)&&(Mt(p),S.length=!0),x.length<g.length)for(var _=x.length;_<g.length;_++)S[_]=!1;else for(var T=g.length;T<x.length;T++)S[T]=!0;for(var M=Math.min(x.length,g.length),E=0;E<M;E++)x.hasOwnProperty(E)||(S[E]=!0),S[E]===void 0&&f(x[E])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var t1,Mo,qi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Tu=typeof Map<"u",Mu=typeof Set<"u",r1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",s1=qi?Symbol.for("immer-nothing"):((t1={})["immer-nothing"]=!0,t1),o1=qi?Symbol.for("immer-draftable"):"__$immer_draftable",ie=qi?Symbol.for("immer-state"):"__$immer_state";var Pu=""+Object.prototype.constructor,Ir=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,c1=Object.getOwnPropertyDescriptors||function(t){var e={};return Ir(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Wi={},Po={get:function(t,e){if(e===ie)return t;var r=Tt(t);if(!kr(r,e))return function(a,i,s){var c,d=Jl(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||!Ze(o)?o:o===Bi(t.t,e)?($i(t),t.o[e]=Gi(t.A.h,o,t)):o},has:function(t,e){return e in Tt(t)},ownKeys:function(t){return Reflect.ownKeys(Tt(t))},set:function(t,e,r){var o=Jl(Tt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Bi(Tt(t),e),i=a?.[ie];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(a1(r,a)&&(r!==void 0||kr(t.t,e)))return!0;$i(t),Mt(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 Bi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,$i(t),Mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Tt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){He(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){He(12)}},To={};sr(Po,function(t,e){To[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),To.deleteProperty=function(t,e){return To.set.call(this,t,e,void 0)},To.set=function(t,e,r){return Po.set.call(this,t[0],e,r,t[0])};var ku=function(){function t(r){var o=this;this.O=r1,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(L){var _=this;L===void 0&&(L=c);for(var T=arguments.length,M=Array(T>1?T-1:0),E=1;E<T;E++)M[E-1]=arguments[E];return d.produce(L,function(C){var R;return(R=i).call.apply(R,[_,C].concat(M))})}}var f;if(typeof i!="function"&&He(6),s!==void 0&&typeof s!="function"&&He(7),Ze(a)){var h=Xl(o),p=Gi(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?Ln(h):Fi(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(L){return Di(h,s),Ui(L,h)},function(L){throw Ln(h),L}):(Di(h,s),Ui(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===s1&&(f=void 0),o.D&&Zi(f,!0),s){var x=[],S=[];at("Patches").M(a,f,x,S),s(x,S)}return f}He(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(x){return a.apply(void 0,[x].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){Ze(r)||He(8),St(r)&&(r=Nu(r));var o=Xl(this),a=Gi(this,r,void 0);return a[ie].C=!0,Fi(o),a},e.finishDraft=function(r,o){var a=r&&r[ie],i=a.A;return Di(i,o),Ui(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!r1&&He(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=at("Patches").$;return St(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),Pe=new ku,Iu=Pe.produce,px=Pe.produceWithPatches.bind(Pe),hx=Pe.setAutoFreeze.bind(Pe),mx=Pe.setUseProxies.bind(Pe),gx=Pe.applyPatches.bind(Pe),yx=Pe.createDraft.bind(Pe),bx=Pe.finishDraft.bind(Pe),wn=Iu;function cr(t){"@babel/helpers - typeof";return cr=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},cr(t)}function l1(t,e){if(cr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(cr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function d1(t){var e=l1(t,"string");return cr(e)=="symbol"?e:e+""}function f1(t,e,r){return(e=d1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u1(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 Xi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?u1(Object(r),!0).forEach(function(o){f1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Ce(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 p1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Qi=function(){return Math.random().toString(36).substring(7).split("").join(".")},_n={INIT:"@@redux/INIT"+Qi(),REPLACE:"@@redux/REPLACE"+Qi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Qi()}};function zu(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 Ji(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Ji)(t,e)}if(typeof t!="function")throw new Error(Ce(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(Ce(3));return i}function p(L){if(typeof L!="function")throw new Error(Ce(4));if(d)throw new Error(Ce(5));var _=!0;return f(),c.push(L),function(){if(_){if(d)throw new Error(Ce(6));_=!1,f();var M=c.indexOf(L);c.splice(M,1),s=null}}}function g(L){if(!zu(L))throw new Error(Ce(7));if(typeof L.type>"u")throw new Error(Ce(8));if(d)throw new Error(Ce(9));try{d=!0,i=a(i,L)}finally{d=!1}for(var _=s=c,T=0;T<_.length;T++){var M=_[T];M()}return L}function x(L){if(typeof L!="function")throw new Error(Ce(10));a=L,g({type:_n.REPLACE})}function S(){var L,_=p;return L={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(Ce(11));function E(){M.next&&M.next(h())}E();var C=_(E);return{unsubscribe:C}}},L[p1]=function(){return this},L}return g({type:_n.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:x},o[p1]=S,o}function Du(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:_n.INIT});if(typeof o>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:_n.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function h1(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{Du(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,x={},S=0;S<i.length;S++){var L=i[S],_=r[L],T=f[L],M=_(T,h);if(typeof M>"u"){var E=h&&h.type;throw new Error(Ce(14))}x[L]=M,g=g||M!==T}return g=g||i.length!==Object.keys(f).length,g?x:f}}function Dr(){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 m1(){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(Ce(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=Dr.apply(void 0,c)(a.dispatch),Xi(Xi({},a),{},{dispatch:i})}}}function g1(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 y1=g1();y1.withExtraArgument=g1;var es=y1;var C1=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)}}(),Uu=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}}},Ur=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Bu=Object.defineProperty,$u=Object.defineProperties,Hu=Object.getOwnPropertyDescriptors,b1=Object.getOwnPropertySymbols,Fu=Object.prototype.hasOwnProperty,Gu=Object.prototype.propertyIsEnumerable,v1=function(t,e,r){return e in t?Bu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Pt=function(t,e){for(var r in e||(e={}))Fu.call(e,r)&&v1(t,r,e[r]);if(b1)for(var o=0,a=b1(e);o<a.length;o++){var r=a[o];Gu.call(e,r)&&v1(t,r,e[r])}return t},ts=function(t,e){return $u(t,Hu(e))},Wu=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 Vu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Dr:Dr.apply(null,arguments)},zx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ju(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 Ku=function(t){C1(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,Ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],r.concat(this))))},e}(Array),Zu=function(t){C1(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,Ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],r.concat(this))))},e}(Array);function ns(t){return Ze(t)?wn(t,function(){}):t}function Yu(t){return typeof t=="boolean"}function qu(){return function(e){return Xu(e)}}function Xu(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 Ku;if(r&&(Yu(r)?c.push(es):c.push(es.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var rs=!0;function E1(t){var e=qu(),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,x;if(typeof a=="function")x=a;else if(ju(a))x=h1(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 S=s;if(typeof S=="function"&&(S=S(e),!rs&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!rs&&S.some(function(C){return typeof C!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=m1.apply(void 0,S),_=Dr;d&&(_=Vu(Pt({trace:!rs},typeof d=="object"&&d)));var T=new Zu(L),M=T;Array.isArray(g)?M=Ur([L],g):typeof g=="function"&&(M=g(T));var E=_.apply(void 0,M);return Ji(x,h,E)}function kt(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 Pt(Pt({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 A1(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 Qu(t){return typeof t=="function"}function Ju(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?A1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(Qu(t))d=function(){return ns(t())};else{var f=ns(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var x=Ur([i[g.type]],s.filter(function(S){var L=S.matcher;return L(g)}).map(function(S){var L=S.reducer;return L}));return x.filter(function(S){return!!S}).length===0&&(x=[c]),x.reduce(function(S,L){if(L)if(St(S)){var _=S,T=L(_,g);return T===void 0?S:T}else{if(Ze(S))return wn(S,function(M){return L(M,g)});var T=L(S,g);if(T===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return S},p)}return h.getInitialState=d,h}function ep(t,e){return t+"/"+e}function L1(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:ns(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=ep(e,h),x,S;"reducer"in p?(x=p.reducer,S=p.prepare):x=p,i[h]=x,s[g]=x,c[h]=S?kt(g,S):kt(g)});function d(){var h=typeof t.extraReducers=="function"?A1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,x=h[1],S=x===void 0?[]:x,L=h[2],_=L===void 0?void 0:L,T=Pt(Pt({},g),s);return Ju(r,function(M){for(var E in T)M.addCase(E,T[E]);for(var C=0,R=S;C<R.length;C++){var I=R[C];M.addMatcher(I.matcher,I.reducer)}_&&M.addDefaultCase(_)})}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 tp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",rp=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=tp[Math.random()*64|0];return e},op=["name","message","stack","code"],os=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),x1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),np=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=op;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},$x=function(){function t(e,r,o){var a=kt(e+"/fulfilled",function(h,p,g,x){return{payload:h,meta:ts(Pt({},x||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=kt(e+"/pending",function(h,p,g){return{payload:void 0,meta:ts(Pt({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=kt(e+"/rejected",function(h,p,g,x,S){return{payload:x,error:(o&&o.serializeError||np)(h||"Rejected"),meta:ts(Pt({},S||{}),{arg:g,requestId:p,rejectedWithValue:!!x,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,x){var S=o?.idGenerator?o.idGenerator(h):rp(),L=new d,_,T=!1;function M(C){_=C,L.abort()}var E=function(){return Wu(this,null,function(){var C,R,I,W,Y,K,$;return Uu(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),W=(C=o?.condition)==null?void 0:C.call(o,h,{getState:g,extra:x}),ip(W)?[4,W]:[3,2];case 1:W=b.sent(),b.label=2;case 2:if(W===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,Y=new Promise(function(A,D){return L.signal.addEventListener("abort",function(){return D({name:"AbortError",message:_||"Aborted"})})}),p(i(S,h,(R=o?.getPendingMeta)==null?void 0:R.call(o,{requestId:S,arg:h},{getState:g,extra:x}))),[4,Promise.race([Y,Promise.resolve(r(h,{dispatch:p,getState:g,extra:x,requestId:S,signal:L.signal,abort:M,rejectWithValue:function(A,D){return new os(A,D)},fulfillWithValue:function(A,D){return new x1(A,D)}})).then(function(A){if(A instanceof os)throw A;return A instanceof x1?a(A.payload,S,h,A.meta):a(A,S,h)})])];case 3:return I=b.sent(),[3,5];case 4:return K=b.sent(),I=K instanceof os?s(null,S,h,K.payload,K.meta):s(K,S,h),[3,5];case 5:return $=o&&!o.dispatchConditionRejection&&s.match(I)&&I.meta.condition,$||p(I),[2,I]}})})}();return Object.assign(E,{abort:M,requestId:S,arg:h,unwrap:function(){return E.then(ap)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function ap(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ip(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var O1="listener",R1="completed",w1="cancelled",Hx="task-"+w1,Fx="task-"+R1,Gx=O1+"-"+w1,Wx=O1+"-"+R1;var as="listenerMiddleware";var Vx=kt(as+"/add"),jx=kt(as+"/removeAll"),Kx=kt(as+"/remove");var S1,Zx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(S1||(S1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},sp=function(t){return function(e){setTimeout(e,t)}},Yx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sp(10);i1();window.ftReduxStores||(window.ftReduxStores={});var lr=class t extends gt{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(Pr(i))return i;if(a==null)return;let s=L1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=E1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=Qt(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 wo;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 cp(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Pr(e)&&e.clear()}var Nn=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);Ue(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 lp(t,e,r){return new Nn(t,e,r).watch()}var is=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 ds={};V(ds,{scrollHelper:()=>dp});var cs,Tn=new Map,ls=class{lock(e,r){if(r){let o=Tn.get(r);if(o==null||o===e)return Tn.set(r,e),r}}release(e,r){r&&Tn.get(r)===e&&Tn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of Pa(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=Xt(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=(cs=window.FluidTopicsScrollHelper)!==null&&cs!==void 0?cs:new ls;var dp=window.FluidTopicsScrollHelper;var us={};V(us,{SearchPlaceConverter:()=>Fr,SearchPlaceQueryParams:()=>J,isSearchPlaceQueryParams:()=>p2,serializeRequest:()=>hp});var up=k4(N1(),1);var T1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(T1||(T1={}));var M1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(M1||(M1={}));var P1;(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"})(P1||(P1={}));var k1;(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"})(k1||(k1={}));var I1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(I1||(I1={}));var z1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(z1||(z1={}));var D1;(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"})(D1||(D1={}));var U1;(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"})(U1||(U1={}));var B1;(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"})(B1||(B1={}));var $1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($1||($1={}));var H1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(H1||(H1={}));var F1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(F1||(F1={}));var G1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(G1||(G1={}));var W1;(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"})(W1||(W1={}));var $r;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})($r||($r={}));var V1;(function(t){t.ASC="ASC",t.DESC="DESC"})(V1||(V1={}));var j1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(j1||(j1={}));var fs;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fs||(fs={}));var e2=t=>Object.keys(fs).includes(t);var K1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(K1||(K1={}));var Z1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Z1||(Z1={}));var Y1;(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"})(Y1||(Y1={}));var Hr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Hr||(Hr={}));var t2=t=>Object.keys(Hr).includes(t);var q1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(q1||(q1={}));var X1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(X1||(X1={}));var Q1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Q1||(Q1={}));var de;(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"})(de||(de={}));var Fe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Fe||(Fe={}));var J1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(J1||(J1={}));var r2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(r2||(r2={}));var o2;(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"})(o2||(o2={}));var n2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(n2||(n2={}));var a2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(a2||(a2={}));var i2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(i2||(i2={}));var s2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(s2||(s2={}));var c2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(c2||(c2={}));var l2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(l2||(l2={}));var fp={[de.PERSONAL_BOOK_SHARE_USER]:[de.PERSONAL_BOOK_USER],[de.HTML_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.PDF_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.KHUB_ADMIN]:[de.CONTENT_PUBLISHER],[de.ADMIN]:[de.KHUB_ADMIN,de.USERS_ADMIN,de.PORTAL_ADMIN,de.BEHAVIOR_DATA_USER],[de.GENERATIVE_AI_EXPORT_USER]:[de.GENERATIVE_AI_USER]};function d2(t,e){return t===e||(fp[t]??[]).some(r=>d2(r,e))}function f2(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=>d2(o,e))}function pp(t){return`"${t}"`}function u2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function hp(t,e){return new Fr(t).serialize(e)}var J;(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"})(J||(J={}));var mp=new Set(Object.values(J));function p2(t){return mp.has(t)}var Fr=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,x;let S=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&S.append(J.LOCALE,e.contentLocale):S.append(J.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&S.append(J.QUERY,e.query);let L=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(C=>C.valueFilter&&!C.valueFilter.negative))!==null&&i!==void 0?i:[];if(L.length>0){let C=L.map(R=>{var I,W;let Y=((W=(I=R.valueFilter)===null||I===void 0?void 0:I.values)!==null&&W!==void 0?W:[]).map(K=>this.escapeFilters(K)).map(K=>pp(u2(K))).join("_");return`${R.key}~${Y}`}).join("*");S.append(J.VALUE_FILTERS,C)}let _=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(C=>C.dateFilter))!==null&&c!==void 0?c:[];if(_.length>0){let C=_.map(R=>{var I;return`${R.key}~${(I=R.dateFilter)===null||I===void 0?void 0:I.type.toLowerCase()}`}).join("*");S.append(J.DATE_FILTERS,C)}let T=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(C=>C.rangeFilter))!==null&&f!==void 0?f:[];if(T.length>0){let C=T.map(R=>{var I,W;return`${R.key}~${(I=R.rangeFilter)===null||I===void 0?void 0:I.from}_${(W=R.rangeFilter)===null||W===void 0?void 0:W.to}`}).join("*");S.append(J.RANGE_FILTERS,C)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&S.append(J.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&S.append(J.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&S.append(J.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&&S.append(J.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&S.append(J.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let M=(x=e.otherQueryParams)!==null&&x!==void 0?x:{};for(let C in M)S.append(C,M[C]);let E=new Array;return S.forEach((C,R)=>{E.push(this.encodeQueryString(R)+"="+this.encodeQueryString(C))}),encodeURI(E.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(T){console.warn("Could not decode search request query params, fallback on raw value",T)}let d=new URLSearchParams(e),f=d.get(J.LOCALE)==="all"?void 0:d.get(J.LOCALE),h=((r=d.get(J.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(J.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(J.SCOPE))!==null&&a!==void 0?a:"default",x=+((i=d.get(J.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),S=d.get(J.KEYWORD_MATCH),L=S?S.toUpperCase()===$r.MANDATORY?$r.MANDATORY:$r.OPTIONAL:void 0,_={};for(let T of d.keys())p2(T)||(_[T]=d.get(T));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(J.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:e2(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Xt(1,isNaN(x)?this.defaultPerPage:x,1e3)},keywordMatch:L,otherQueryParams:_}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(J.FILTERS)&&(d=this.parseValueFilters((r=e.get(J.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(J.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(J.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(J.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(J.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(J.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(u2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Hr[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(t2(e))return[{key:"ft:lastEdition",dateFilter:{type:Hr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var ms={};V(ms,{toFtFormComponent:()=>hs});var ps=Symbol("elementInternals"),hs=be(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[ps].form}constructor(...o){super(o),this[ps]=this.attachInternals()}setFormValue(o){this[ps].setFormValue(o)}}return e});var gs={};V(gs,{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 bs={};V(bs,{ALL_KEYS_VALUE:()=>ys,SameWindowStorageEvent:()=>Gr});var ys="__all__",Gr=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==ys}};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 Gr(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 Gr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Gr(ys))}});var xs={};V(xs,{FocusMainContentEvent:()=>vs});var vs=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var h2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function gp(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function yp(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",gp);document.addEventListener("click",yp);var m2=H`
48
+ `;var Yl={};var zi={};V(zi,{ParametrizedLabelResolver:()=>Ro});var Ro=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 ss={};V(ss,{FtCommandQueue:()=>wo,FtLitElementRedux:()=>No,FtReduxStore:()=>lr,FtStateManager:()=>is,ReduxWatcher:()=>Nn,clearAllStores:()=>cp,isFtReduxStore:()=>Pr,redux:()=>Mr,reduxEventListener:()=>Lu,reduxReactive:()=>Au,watch:()=>lp,withRedux:()=>ql});var Au=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Mr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Ue,attribute:!1,...e};O(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})}},Lu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var wo=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 Pr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _o=Symbol("internalReduxEventsUnsubscribers"),Nt=Symbol("internalStoresUnsubscribers"),ir=Symbol("internalStores"),ql=be(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[ir].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ir].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ir].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[ir].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ir].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ir].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[Nt].has(s.store):this[Nt].size>0)&&(this[c]=s.selector(f.getState(),this))}})}subscribeToStore(s,c){var d;this[Nt].set(s,c.subscribe(()=>this.updateFromStores())),this[_o].set(s,[]),Pr(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[_o].get(s).push(()=>c.removeEventListener(f.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Nt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Nt].has(s)&&this[Nt].get(s)(),this[Nt].delete(s),(c=this[_o].get(s))===null||c===void 0||c.forEach(d=>d()),this[_o].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Nt,r=ir,o=_o,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),No=class extends ql(Z){};function He(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 St(t){return!!t&&!!t[ie]}function Ze(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)===Pu}(t)||Array.isArray(t)||!!t[o1]||!!(!((e=t.constructor)===null||e===void 0)&&e[o1])||Vi(t)||ji(t))}function sr(t,e,r){r===void 0&&(r=!1),zr(t)===0?(r?Object.keys:Ir)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function zr(t){var e=t[ie];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Vi(t)?2:ji(t)?3:0}function kr(t,e){return zr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ou(t,e){return zr(t)===2?t.get(e):t[e]}function n1(t,e,r){var o=zr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function a1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Vi(t){return Tu&&t instanceof Map}function ji(t){return Mu&&t instanceof Set}function Tt(t){return t.o||t.t}function Ki(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=c1(t);delete e[ie];for(var r=Ir(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 Zi(t,e){return e===void 0&&(e=!1),Yi(t)||St(t)||!Ze(t)||(zr(t)>1&&(t.set=t.add=t.clear=t.delete=Ru),Object.freeze(t),e&&sr(t,function(r,o){return Zi(o,!0)},!0)),t}function Ru(){He(2)}function Yi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function at(t){var e=Wi[t];return e||He(18,t),e}function wu(t,e){Wi[t]||(Wi[t]=e)}function Hi(){return Mo}function Di(t,e){e&&(at("Patches"),t.u=[],t.s=[],t.v=e)}function Ln(t){Fi(t),t.p.forEach(_u),t.p=null}function Fi(t){t===Mo&&(Mo=t.l)}function Xl(t){return Mo={p:[],l:Mo,h:t,m:!0,_:0}}function _u(t){var e=t[ie];e.i===0||e.i===1?e.j():e.g=!0}function Ui(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||at("ES5").S(e,t,o),o?(r[ie].P&&(Ln(e),He(4)),Ze(t)&&(t=On(e,t),e.l||Rn(e,t)),e.u&&at("Patches").M(r[ie].t,t,e.u,e.s)):t=On(e,r,[]),Ln(e),e.u&&e.v(e.u,e.s),t!==s1?t:void 0}function On(t,e,r){if(Yi(e))return e;var o=e[ie];if(!o)return sr(e,function(c,d){return Ql(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return Rn(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ki(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),sr(i,function(c,d){return Ql(t,o,a,c,d,r,s)}),Rn(t,a,!1),r&&t.u&&at("Patches").N(o,r,t.u,t.s)}return o.o}function Ql(t,e,r,o,a,i,s){if(St(a)){var c=On(t,a,i&&e&&e.i!==3&&!kr(e.R,o)?i.concat(o):void 0);if(n1(r,o,c),!St(c))return;t.m=!1}else s&&r.add(a);if(Ze(a)&&!Yi(a)){if(!t.h.D&&t._<1)return;On(t,a),e&&e.A.l||Rn(t,a)}}function Rn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Zi(e,r)}function Bi(t,e){var r=t[ie];return(r?Tt(r):t)[e]}function Jl(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 Mt(t){t.P||(t.P=!0,t.l&&Mt(t.l))}function $i(t){t.o||(t.o=Ki(t.t))}function Gi(t,e,r){var o=Vi(e)?at("MapSet").F(e,r):ji(e)?at("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Hi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,f=Po;s&&(d=[c],f=To);var h=Proxy.revocable(d,f),p=h.revoke,g=h.proxy;return c.k=g,c.j=p,g}(e,r):at("ES5").J(e,r);return(r?r.A:Hi()).p.push(o),o}function Nu(t){return St(t)||He(22,t),function e(r){if(!Ze(r))return r;var o,a=r[ie],i=zr(r);if(a){if(!a.P&&(a.i<4||!at("ES5").K(a)))return a.t;a.I=!0,o=e1(r,i),a.I=!1}else o=e1(r,i);return sr(o,function(s,c){a&&Ou(a.t,s)===c||n1(o,s,e(c))}),i===3?new Set(o):o}(t)}function e1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ki(t)}function i1(){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[ie];return Po.get(f,s)},set:function(f){var h=this[ie];Po.set(h,s,f)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ie];if(!d.P)switch(d.i){case 5:o(d)&&Mt(d);break;case 4:r(d)&&Mt(d)}}}function r(s){for(var c=s.t,d=s.k,f=Ir(d),h=f.length-1;h>=0;h--){var p=f[h];if(p!==ie){var g=c[p];if(g===void 0&&!kr(c,p))return!0;var x=d[p],S=x&&x[ie];if(S?S.t!==g:!a1(x,g))return!0}}var L=!!c[ie];return f.length!==Ir(c).length+(L?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&&He(3,JSON.stringify(Tt(s)))}var i={};wu("ES5",{J:function(s,c){var d=Array.isArray(s),f=function(p,g){if(p){for(var x=Array(g.length),S=0;S<g.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var L=c1(g);delete L[ie];for(var _=Ir(L),T=0;T<_.length;T++){var M=_[T];L[M]=t(M,p||!!L[M].enumerable)}return Object.create(Object.getPrototypeOf(g),L)}(d,s),h={i:d?5:4,A:c?c.A:Hi(),P:!1,I:!1,R:{},l:c,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,ie,{value:h,writable:!0}),f},S:function(s,c,d){d?St(c)&&c[ie].A===s&&e(s.p):(s.u&&function f(h){if(h&&typeof h=="object"){var p=h[ie];if(p){var g=p.t,x=p.k,S=p.R,L=p.i;if(L===4)sr(x,function(C){C!==ie&&(g[C]!==void 0||kr(g,C)?S[C]||f(x[C]):(S[C]=!0,Mt(p)))}),sr(g,function(C){x[C]!==void 0||kr(x,C)||(S[C]=!1,Mt(p))});else if(L===5){if(o(p)&&(Mt(p),S.length=!0),x.length<g.length)for(var _=x.length;_<g.length;_++)S[_]=!1;else for(var T=g.length;T<x.length;T++)S[T]=!0;for(var M=Math.min(x.length,g.length),E=0;E<M;E++)x.hasOwnProperty(E)||(S[E]=!0),S[E]===void 0&&f(x[E])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var t1,Mo,qi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Tu=typeof Map<"u",Mu=typeof Set<"u",r1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",s1=qi?Symbol.for("immer-nothing"):((t1={})["immer-nothing"]=!0,t1),o1=qi?Symbol.for("immer-draftable"):"__$immer_draftable",ie=qi?Symbol.for("immer-state"):"__$immer_state";var Pu=""+Object.prototype.constructor,Ir=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,c1=Object.getOwnPropertyDescriptors||function(t){var e={};return Ir(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Wi={},Po={get:function(t,e){if(e===ie)return t;var r=Tt(t);if(!kr(r,e))return function(a,i,s){var c,d=Jl(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||!Ze(o)?o:o===Bi(t.t,e)?($i(t),t.o[e]=Gi(t.A.h,o,t)):o},has:function(t,e){return e in Tt(t)},ownKeys:function(t){return Reflect.ownKeys(Tt(t))},set:function(t,e,r){var o=Jl(Tt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Bi(Tt(t),e),i=a?.[ie];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(a1(r,a)&&(r!==void 0||kr(t.t,e)))return!0;$i(t),Mt(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 Bi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,$i(t),Mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Tt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){He(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){He(12)}},To={};sr(Po,function(t,e){To[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),To.deleteProperty=function(t,e){return To.set.call(this,t,e,void 0)},To.set=function(t,e,r){return Po.set.call(this,t[0],e,r,t[0])};var ku=function(){function t(r){var o=this;this.O=r1,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(L){var _=this;L===void 0&&(L=c);for(var T=arguments.length,M=Array(T>1?T-1:0),E=1;E<T;E++)M[E-1]=arguments[E];return d.produce(L,function(C){var R;return(R=i).call.apply(R,[_,C].concat(M))})}}var f;if(typeof i!="function"&&He(6),s!==void 0&&typeof s!="function"&&He(7),Ze(a)){var h=Xl(o),p=Gi(o,a,void 0),g=!0;try{f=i(p),g=!1}finally{g?Ln(h):Fi(h)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(L){return Di(h,s),Ui(L,h)},function(L){throw Ln(h),L}):(Di(h,s),Ui(f,h))}if(!a||typeof a!="object"){if((f=i(a))===void 0&&(f=a),f===s1&&(f=void 0),o.D&&Zi(f,!0),s){var x=[],S=[];at("Patches").M(a,f,x,S),s(x,S)}return f}He(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(x){return a.apply(void 0,[x].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){Ze(r)||He(8),St(r)&&(r=Nu(r));var o=Xl(this),a=Gi(this,r,void 0);return a[ie].C=!0,Fi(o),a},e.finishDraft=function(r,o){var a=r&&r[ie],i=a.A;return Di(i,o),Ui(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!r1&&He(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=at("Patches").$;return St(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),Pe=new ku,Iu=Pe.produce,px=Pe.produceWithPatches.bind(Pe),hx=Pe.setAutoFreeze.bind(Pe),mx=Pe.setUseProxies.bind(Pe),gx=Pe.applyPatches.bind(Pe),yx=Pe.createDraft.bind(Pe),bx=Pe.finishDraft.bind(Pe),wn=Iu;function cr(t){"@babel/helpers - typeof";return cr=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},cr(t)}function l1(t,e){if(cr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(cr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function d1(t){var e=l1(t,"string");return cr(e)=="symbol"?e:e+""}function f1(t,e,r){return(e=d1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u1(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 Xi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?u1(Object(r),!0).forEach(function(o){f1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Ce(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 p1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Qi=function(){return Math.random().toString(36).substring(7).split("").join(".")},_n={INIT:"@@redux/INIT"+Qi(),REPLACE:"@@redux/REPLACE"+Qi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Qi()}};function zu(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 Ji(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Ji)(t,e)}if(typeof t!="function")throw new Error(Ce(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(Ce(3));return i}function p(L){if(typeof L!="function")throw new Error(Ce(4));if(d)throw new Error(Ce(5));var _=!0;return f(),c.push(L),function(){if(_){if(d)throw new Error(Ce(6));_=!1,f();var M=c.indexOf(L);c.splice(M,1),s=null}}}function g(L){if(!zu(L))throw new Error(Ce(7));if(typeof L.type>"u")throw new Error(Ce(8));if(d)throw new Error(Ce(9));try{d=!0,i=a(i,L)}finally{d=!1}for(var _=s=c,T=0;T<_.length;T++){var M=_[T];M()}return L}function x(L){if(typeof L!="function")throw new Error(Ce(10));a=L,g({type:_n.REPLACE})}function S(){var L,_=p;return L={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(Ce(11));function E(){M.next&&M.next(h())}E();var C=_(E);return{unsubscribe:C}}},L[p1]=function(){return this},L}return g({type:_n.INIT}),o={dispatch:g,subscribe:p,getState:h,replaceReducer:x},o[p1]=S,o}function Du(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:_n.INIT});if(typeof o>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:_n.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function h1(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{Du(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,x={},S=0;S<i.length;S++){var L=i[S],_=r[L],T=f[L],M=_(T,h);if(typeof M>"u"){var E=h&&h.type;throw new Error(Ce(14))}x[L]=M,g=g||M!==T}return g=g||i.length!==Object.keys(f).length,g?x:f}}function Dr(){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 m1(){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(Ce(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=Dr.apply(void 0,c)(a.dispatch),Xi(Xi({},a),{},{dispatch:i})}}}function g1(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 y1=g1();y1.withExtraArgument=g1;var es=y1;var C1=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)}}(),Uu=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}}},Ur=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Bu=Object.defineProperty,$u=Object.defineProperties,Hu=Object.getOwnPropertyDescriptors,b1=Object.getOwnPropertySymbols,Fu=Object.prototype.hasOwnProperty,Gu=Object.prototype.propertyIsEnumerable,v1=function(t,e,r){return e in t?Bu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Pt=function(t,e){for(var r in e||(e={}))Fu.call(e,r)&&v1(t,r,e[r]);if(b1)for(var o=0,a=b1(e);o<a.length;o++){var r=a[o];Gu.call(e,r)&&v1(t,r,e[r])}return t},ts=function(t,e){return $u(t,Hu(e))},Wu=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 Vu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Dr:Dr.apply(null,arguments)},zx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function ju(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 Ku=function(t){C1(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,Ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],r.concat(this))))},e}(Array),Zu=function(t){C1(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,Ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],r.concat(this))))},e}(Array);function ns(t){return Ze(t)?wn(t,function(){}):t}function Yu(t){return typeof t=="boolean"}function qu(){return function(e){return Xu(e)}}function Xu(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 Ku;if(r&&(Yu(r)?c.push(es):c.push(es.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var f}return c}var rs=!0;function E1(t){var e=qu(),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,x;if(typeof a=="function")x=a;else if(ju(a))x=h1(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 S=s;if(typeof S=="function"&&(S=S(e),!rs&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!rs&&S.some(function(C){return typeof C!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=m1.apply(void 0,S),_=Dr;d&&(_=Vu(Pt({trace:!rs},typeof d=="object"&&d)));var T=new Zu(L),M=T;Array.isArray(g)?M=Ur([L],g):typeof g=="function"&&(M=g(T));var E=_.apply(void 0,M);return Ji(x,h,E)}function kt(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 Pt(Pt({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 A1(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 Qu(t){return typeof t=="function"}function Ju(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?A1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(Qu(t))d=function(){return ns(t())};else{var f=ns(t);d=function(){return f}}function h(p,g){p===void 0&&(p=d());var x=Ur([i[g.type]],s.filter(function(S){var L=S.matcher;return L(g)}).map(function(S){var L=S.reducer;return L}));return x.filter(function(S){return!!S}).length===0&&(x=[c]),x.reduce(function(S,L){if(L)if(St(S)){var _=S,T=L(_,g);return T===void 0?S:T}else{if(Ze(S))return wn(S,function(M){return L(M,g)});var T=L(S,g);if(T===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}return S},p)}return h.getInitialState=d,h}function ep(t,e){return t+"/"+e}function L1(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:ns(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var p=o[h],g=ep(e,h),x,S;"reducer"in p?(x=p.reducer,S=p.prepare):x=p,i[h]=x,s[g]=x,c[h]=S?kt(g,S):kt(g)});function d(){var h=typeof t.extraReducers=="function"?A1(t.extraReducers):[t.extraReducers],p=h[0],g=p===void 0?{}:p,x=h[1],S=x===void 0?[]:x,L=h[2],_=L===void 0?void 0:L,T=Pt(Pt({},g),s);return Ju(r,function(M){for(var E in T)M.addCase(E,T[E]);for(var C=0,R=S;C<R.length;C++){var I=R[C];M.addMatcher(I.matcher,I.reducer)}_&&M.addDefaultCase(_)})}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 tp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",rp=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=tp[Math.random()*64|0];return e},op=["name","message","stack","code"],os=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),x1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),np=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=op;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},$x=function(){function t(e,r,o){var a=kt(e+"/fulfilled",function(h,p,g,x){return{payload:h,meta:ts(Pt({},x||{}),{arg:g,requestId:p,requestStatus:"fulfilled"})}}),i=kt(e+"/pending",function(h,p,g){return{payload:void 0,meta:ts(Pt({},g||{}),{arg:p,requestId:h,requestStatus:"pending"})}}),s=kt(e+"/rejected",function(h,p,g,x,S){return{payload:x,error:(o&&o.serializeError||np)(h||"Rejected"),meta:ts(Pt({},S||{}),{arg:g,requestId:p,rejectedWithValue:!!x,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,x){var S=o?.idGenerator?o.idGenerator(h):rp(),L=new d,_,T=!1;function M(C){_=C,L.abort()}var E=function(){return Wu(this,null,function(){var C,R,I,W,Y,K,$;return Uu(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),W=(C=o?.condition)==null?void 0:C.call(o,h,{getState:g,extra:x}),ip(W)?[4,W]:[3,2];case 1:W=b.sent(),b.label=2;case 2:if(W===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=!0,Y=new Promise(function(A,D){return L.signal.addEventListener("abort",function(){return D({name:"AbortError",message:_||"Aborted"})})}),p(i(S,h,(R=o?.getPendingMeta)==null?void 0:R.call(o,{requestId:S,arg:h},{getState:g,extra:x}))),[4,Promise.race([Y,Promise.resolve(r(h,{dispatch:p,getState:g,extra:x,requestId:S,signal:L.signal,abort:M,rejectWithValue:function(A,D){return new os(A,D)},fulfillWithValue:function(A,D){return new x1(A,D)}})).then(function(A){if(A instanceof os)throw A;return A instanceof x1?a(A.payload,S,h,A.meta):a(A,S,h)})])];case 3:return I=b.sent(),[3,5];case 4:return K=b.sent(),I=K instanceof os?s(null,S,h,K.payload,K.meta):s(K,S,h),[3,5];case 5:return $=o&&!o.dispatchConditionRejection&&s.match(I)&&I.meta.condition,$||p(I),[2,I]}})})}();return Object.assign(E,{abort:M,requestId:S,arg:h,unwrap:function(){return E.then(ap)}})}}return Object.assign(f,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function ap(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ip(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var O1="listener",R1="completed",w1="cancelled",Hx="task-"+w1,Fx="task-"+R1,Gx=O1+"-"+w1,Wx=O1+"-"+R1;var as="listenerMiddleware";var Vx=kt(as+"/add"),jx=kt(as+"/removeAll"),Kx=kt(as+"/remove");var S1,Zx=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(S1||(S1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},sp=function(t){return function(e){setTimeout(e,t)}},Yx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:sp(10);i1();window.ftReduxStores||(window.ftReduxStores={});var lr=class t extends gt{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(Pr(i))return i;if(a==null)return;let s=L1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=E1({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let h=Qt(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 wo;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 cp(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Pr(e)&&e.clear()}var Nn=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);Ue(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 lp(t,e,r){return new Nn(t,e,r).watch()}var is=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 ds={};V(ds,{scrollHelper:()=>dp});var cs,Tn=new Map,ls=class{lock(e,r){if(r){let o=Tn.get(r);if(o==null||o===e)return Tn.set(r,e),r}}release(e,r){r&&Tn.get(r)===e&&Tn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of Pa(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=Xt(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=(cs=window.FluidTopicsScrollHelper)!==null&&cs!==void 0?cs:new ls;var dp=window.FluidTopicsScrollHelper;var us={};V(us,{SearchPlaceConverter:()=>Fr,SearchPlaceQueryParams:()=>J,isSearchPlaceQueryParams:()=>p2,serializeRequest:()=>hp});var up=k4(N1(),1);var T1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(T1||(T1={}));var M1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(M1||(M1={}));var P1;(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"})(P1||(P1={}));var k1;(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"})(k1||(k1={}));var I1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(I1||(I1={}));var z1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(z1||(z1={}));var D1;(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"})(D1||(D1={}));var U1;(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"})(U1||(U1={}));var B1;(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"})(B1||(B1={}));var $1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($1||($1={}));var H1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(H1||(H1={}));var F1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(F1||(F1={}));var G1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(G1||(G1={}));var W1;(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"})(W1||(W1={}));var $r;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})($r||($r={}));var V1;(function(t){t.ASC="ASC",t.DESC="DESC"})(V1||(V1={}));var j1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(j1||(j1={}));var fs;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fs||(fs={}));var e2=t=>Object.keys(fs).includes(t);var K1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(K1||(K1={}));var Z1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Z1||(Z1={}));var Y1;(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"})(Y1||(Y1={}));var Hr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Hr||(Hr={}));var t2=t=>Object.keys(Hr).includes(t);var q1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(q1||(q1={}));var X1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(X1||(X1={}));var Q1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Q1||(Q1={}));var de;(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"})(de||(de={}));var Fe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Fe||(Fe={}));var J1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(J1||(J1={}));var r2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(r2||(r2={}));var o2;(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"})(o2||(o2={}));var n2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(n2||(n2={}));var a2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(a2||(a2={}));var i2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(i2||(i2={}));var s2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(s2||(s2={}));var c2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(c2||(c2={}));var l2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(l2||(l2={}));var fp={[de.PERSONAL_BOOK_SHARE_USER]:[de.PERSONAL_BOOK_USER],[de.HTML_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.PDF_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.KHUB_ADMIN]:[de.CONTENT_PUBLISHER],[de.ADMIN]:[de.KHUB_ADMIN,de.USERS_ADMIN,de.PORTAL_ADMIN,de.BEHAVIOR_DATA_USER],[de.GENERATIVE_AI_EXPORT_USER]:[de.GENERATIVE_AI_USER]};function d2(t,e){return t===e||(fp[t]??[]).some(r=>d2(r,e))}function f2(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=>d2(o,e))}function pp(t){return`"${t}"`}function u2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function hp(t,e){return new Fr(t).serialize(e)}var J;(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"})(J||(J={}));var mp=new Set(Object.values(J));function p2(t){return mp.has(t)}var Fr=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,x;let S=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&S.append(J.LOCALE,e.contentLocale):S.append(J.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&S.append(J.QUERY,e.query);let L=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(C=>C.valueFilter&&!C.valueFilter.negative))!==null&&i!==void 0?i:[];if(L.length>0){let C=L.map(R=>{var I,W;let Y=((W=(I=R.valueFilter)===null||I===void 0?void 0:I.values)!==null&&W!==void 0?W:[]).map(K=>this.escapeFilters(K)).map(K=>pp(u2(K))).join("_");return`${R.key}~${Y}`}).join("*");S.append(J.VALUE_FILTERS,C)}let _=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(C=>C.dateFilter))!==null&&c!==void 0?c:[];if(_.length>0){let C=_.map(R=>{var I;return`${R.key}~${(I=R.dateFilter)===null||I===void 0?void 0:I.type.toLowerCase()}`}).join("*");S.append(J.DATE_FILTERS,C)}let T=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(C=>C.rangeFilter))!==null&&f!==void 0?f:[];if(T.length>0){let C=T.map(R=>{var I,W;return`${R.key}~${(I=R.rangeFilter)===null||I===void 0?void 0:I.from}_${(W=R.rangeFilter)===null||W===void 0?void 0:W.to}`}).join("*");S.append(J.RANGE_FILTERS,C)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&S.append(J.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&S.append(J.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&S.append(J.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&&S.append(J.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&S.append(J.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let M=(x=e.otherQueryParams)!==null&&x!==void 0?x:{};for(let C in M)S.append(C,M[C]);let E=new Array;return S.forEach((C,R)=>{E.push(this.encodeQueryString(R)+"="+this.encodeQueryString(C))}),encodeURI(E.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(T){console.warn("Could not decode search request query params, fallback on raw value",T)}let d=new URLSearchParams(e),f=d.get(J.LOCALE)==="all"?void 0:d.get(J.LOCALE),h=((r=d.get(J.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),p=(o=d.get(J.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(a=d.get(J.SCOPE))!==null&&a!==void 0?a:"default",x=+((i=d.get(J.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),S=d.get(J.KEYWORD_MATCH),L=S?S.toUpperCase()===$r.MANDATORY?$r.MANDATORY:$r.OPTIONAL:void 0,_={};for(let T of d.keys())p2(T)||(_[T]=d.get(T));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(J.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:e2(h)?h:"EVERYWHERE",sortId:p,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Xt(1,isNaN(x)?this.defaultPerPage:x,1e3)},keywordMatch:L,otherQueryParams:_}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(J.FILTERS)&&(d=this.parseValueFilters((r=e.get(J.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(J.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(J.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(J.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(J.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(J.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(u2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Hr[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(t2(e))return[{key:"ft:lastEdition",dateFilter:{type:Hr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}};var ms={};V(ms,{toFtFormComponent:()=>hs});var ps=Symbol("elementInternals"),hs=be(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[ps].form}constructor(...o){super(o),this[ps]=this.attachInternals()}setFormValue(o){this[ps].setFormValue(o)}}return e});var gs={};V(gs,{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 bs={};V(bs,{ALL_KEYS_VALUE:()=>ys,SameWindowStorageEvent:()=>Gr});var ys="__all__",Gr=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==ys}};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 Gr(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 Gr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Gr(ys))}});var xs={};V(xs,{FocusMainContentEvent:()=>vs});var vs=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var h2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function gp(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function yp(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",gp);document.addEventListener("click",yp);var m2=H`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -1189,7 +1189,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1189
1189
  position: relative;
1190
1190
  word-break: break-word;
1191
1191
  }
1192
- `;var Lg="ft-app-info",gr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};gr.eventName="authentication-change";var Og={session:(t,e)=>{Te(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>B.dispatchEvent(new gr(e.payload)),0))}},B=lr.get({name:Lg,reducers:Og,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 Yn=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},UL=be(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(B)}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 Yn([O({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Yn([O({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Yn([Mr({store:B.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),Yn([Mr({store:B.name})],e.prototype,"uiLocale",void 0),e});var yr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=B.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=B.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var qn=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:yr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):yr.await()}};var Ie=class extends qn{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 tt,this.cache=e?a.commonCache:new tt}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 Xn=class extends Ie{async listMySearches(){let{session:e}=B.getState();return f2(e,de.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Qn=class extends Ie{async listMyBookmarks(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Jn=class extends Ie{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=B.getState().session;return!!e?.sessionAuthenticated}};var ea=class extends Ie{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=B.getState().session;return!!e?.sessionAuthenticated}};var Rg="ft-user-assets",wg={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(Fe).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;Lc(t,r,[...Ac(t,r),a]),f4(t,r,1,o),u4(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Lc(t,r,Ac(t,r).map(a=>a.id===o.id?o:a)),u4(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Lc(t,r,Ac(t,r).filter(i=>i.id!==a)),f4(t,r,-1,o)}},p4={[Fe.SEARCHES]:"savedSearches",[Fe.BOOKMARKS]:"bookmarks",[Fe.BOOKS]:void 0,[Fe.COLLECTIONS]:void 0},Ac=(t,e)=>{var r;let o=p4[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Lc=(t,e,r)=>{let o=p4[e];o&&(t[o]=r)},f4=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===Fe.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},u4=(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)},ze=lr.get({name:Rg,reducers:wg,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Fe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Oc=class{constructor(e=new Jn,r=new ea){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Qn,this.savedSearchesService=new Xn,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=B.getState();Te((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(),ze.actions.clearAssetCount(),ze.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ze.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ze.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ze.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ze.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ze.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ze.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ze.getState().assetCounts.bookmarkByMap).length!==0;e===Fe.BOOKMARKS&&r&&ze.actions.clearBookmarkCountByMap(),ze.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;ze.actions.bookmarks(r)}}},_g=new Oc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=_g);var Rc=class{addCommand(e,r=!1){B.commands.add(e,r)}consumeCommand(e){return B.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Rc;var h4,ao=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ng=Symbol("clearAfterUnitTest"),ta=class extends mn(Ie){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[h4]=()=>{this.defaultMessages={},this.cache=new tt,this.listeners={}},this.currentUiLocale=B.getState().uiLocale,B.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=B.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};Te(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 Ro((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 qt)&&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 ao({loadedContexts:e})),this.dispatchEvent(new ao({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ao({loadedContexts:[e]})),this.dispatchEvent(new ao({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>pn(0).then(()=>o()).catch(()=>null)))}};h4=Ng;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ta{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ta{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Zo=window.FluidTopicsI18nService,wc=window.FluidTopicsCustomI18nService;var _c=class{highlightHtml(e,r,o){Pi(e,r,o)}};window.FluidTopicsHighlightHtmlService=new _c;var Nc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=B.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:B.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 Nc;var Yo=class{static get(e,r){var o,a;let i=B.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 Fr(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Tc=class{urlToSearchRequest(e){return Yo.get().parse(e)}searchRequestToUrl(e){return Yo.get().serialize(e)}};window.FluidTopicsUrlService=new Tc;var br=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};br.eventName="change";var Mc=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))}},m4=new Mc;var ra=class t extends gt{static build(){return new t(window.history,m4,()=>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),Te(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 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(br.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(br.eventName,e)}currentItem(){return Qt(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 Qt(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 Qt(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=ra.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 g4=H`
1192
+ `;var Lg="ft-app-info",gr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};gr.eventName="authentication-change";var Og={session:(t,e)=>{Te(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>B.dispatchEvent(new gr(e.payload)),0))}},B=lr.get({name:Lg,reducers:Og,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 Yn=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},UL=be(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(B)}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 Yn([O({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Yn([O({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Yn([Mr({store:B.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),Yn([Mr({store:B.name})],e.prototype,"uiLocale",void 0),e});var yr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=B.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=B.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var qn=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:yr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):yr.await()}};var Ie=class extends qn{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 tt,this.cache=e?a.commonCache:new tt}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 Xn=class extends Ie{async listMySearches(){let{session:e}=B.getState();return f2(e,de.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Qn=class extends Ie{async listMyBookmarks(){let e=B.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Jn=class extends Ie{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=B.getState().session;return!!e?.sessionAuthenticated}};var ea=class extends Ie{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=B.getState().session;return!!e?.sessionAuthenticated}};var Rg="ft-user-assets",wg={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(Fe).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;Lc(t,r,[...Ac(t,r),a]),f4(t,r,1,o),u4(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Lc(t,r,Ac(t,r).map(a=>a.id===o.id?o:a)),u4(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Lc(t,r,Ac(t,r).filter(i=>i.id!==a)),f4(t,r,-1,o)}},p4={[Fe.SEARCHES]:"savedSearches",[Fe.BOOKMARKS]:"bookmarks",[Fe.BOOKS]:void 0,[Fe.COLLECTIONS]:void 0},Ac=(t,e)=>{var r;let o=p4[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Lc=(t,e,r)=>{let o=p4[e];o&&(t[o]=r)},f4=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===Fe.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},u4=(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)},ze=lr.get({name:Rg,reducers:wg,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Fe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Oc=class{constructor(e=new Jn,r=new ea){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Qn,this.savedSearchesService=new Xn,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=B.getState();Te((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(),ze.actions.clearAssetCount(),ze.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ze.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ze.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ze.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ze.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ze.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ze.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ze.getState().assetCounts.bookmarkByMap).length!==0;e===Fe.BOOKMARKS&&r&&ze.actions.clearBookmarkCountByMap(),ze.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;ze.actions.bookmarks(r)}}},_g=new Oc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=_g);var Rc=class{addCommand(e,r=!1){B.commands.add(e,r)}consumeCommand(e){return B.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Rc;var h4,ao=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Ng=Symbol("clearAfterUnitTest"),ta=class extends mn(Ie){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[h4]=()=>{this.defaultMessages={},this.cache=new tt,this.listeners={}},this.currentUiLocale=B.getState().uiLocale,B.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=B.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};Te(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 Ro((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 qt)&&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 ao({loadedContexts:e})),this.dispatchEvent(new ao({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ao({loadedContexts:[e]})),this.dispatchEvent(new ao({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>pn(0).then(()=>o()).catch(()=>null)))}};h4=Ng;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ta{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ta{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Zo=window.FluidTopicsI18nService,wc=window.FluidTopicsCustomI18nService;var _c=class{highlightHtml(e,r,o){Pi(e,r,o)}};window.FluidTopicsHighlightHtmlService=new _c;var Nc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=B.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:B.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 Nc;var Yo=class{static get(e,r){var o,a;let i=B.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 Fr(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Tc=class{urlToSearchRequest(e){return Yo.get().parse(e)}searchRequestToUrl(e){return Yo.get().serialize(e)}};window.FluidTopicsUrlService=new Tc;var br=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};br.eventName="change";var Mc=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))}},m4=new Mc;var ra=class t extends gt{static build(){return new t(window.history,m4,()=>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),Te(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 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(br.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(br.eventName,e)}currentItem(){return Qt(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 Qt(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 Qt(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=ra.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 g4=H`
1193
1193
  `;function y4(t,e){let{authenticationRequired:r,session:o}=B.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var fe=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},ne=class extends Z{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=()=>yr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new tt,this.cleanSessionDebouncer=new Me,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return F`
1194
1194
  <slot></slot>
1195
1195
  `}connectedCallback(){super.connectedCallback(),B.addEventListener(gr.eventName,this.reloadConfiguration)}disconnectedCallback(){B.addEventListener(gr.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,a,i,s,c,d;super.update(e),e.has("baseUrl")&&(B.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&B.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&B.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&B.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&B.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&B.actions.noCustom(this.noCustom),e.has("editorMode")&&B.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&B.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&B.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>Zo.addContext(f)),e.has("openExternalDocumentInNewTab")&&B.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&B.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&B.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(B.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),B.actions.availableUiLocales((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),B.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&B.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&B.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",()=>y4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ne.elementDefinitions={};ne.styles=g4;fe([O()],ne.prototype,"baseUrl",void 0);fe([O()],ne.prototype,"apiIntegrationIdentifier",void 0);fe([O()],ne.prototype,"apiIntegrationAppVersion",void 0);fe([O()],ne.prototype,"uiLocale",void 0);fe([Oe(null)],ne.prototype,"availableUiLocales",void 0);fe([Oe(null)],ne.prototype,"metadataConfiguration",void 0);fe([O({type:Boolean})],ne.prototype,"editorMode",void 0);fe([O({type:Boolean})],ne.prototype,"noCustom",void 0);fe([O({type:Boolean})],ne.prototype,"openExternalDocumentInNewTab",void 0);fe([O({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ne.prototype,"noCustomComponent",void 0);fe([O({type:Boolean})],ne.prototype,"withManualResources",void 0);fe([O({type:Boolean})],ne.prototype,"navigatorOnline",void 0);fe([O({type:Boolean})],ne.prototype,"forcedOffline",void 0);fe([O({type:Object})],ne.prototype,"apiProvider",void 0);fe([O({type:Boolean})],ne.prototype,"authenticationRequired",void 0);fe([Oe([])],ne.prototype,"messageContexts",void 0);fe([Oe(void 0)],ne.prototype,"session",void 0);fe([Q()],ne.prototype,"localesConfiguration",void 0);fe([Q()],ne.prototype,"availableContentLocales",void 0);ae("ft-app-context")(ne);var Pc=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-]+$/)}},io=new Pc;var Tg=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},Xo=Symbol("i18nAttributes"),b4=Symbol("i18nListAttributes"),v4=Symbol("i18nProperties"),oa=Symbol("i18nContexts"),qo=Symbol("i18nUnsubs"),x4=be(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?wc:Zo}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(io.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[Xo])===null||s===void 0||s.forEach((h,p)=>d[p]=f(h,p,d[p])),(c=this[b4])===null||c===void 0||c.forEach((h,p)=>{var g;return d[p]=(g=d[p])===null||g===void 0?void 0:g.map(x=>f(h,p,x))})}updateI18nProperties(i){var s;(s=this[v4])===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[qo].has(d)||this[qo].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[qo].forEach(i=>i()),this[qo].clear()}}return e=oa,r=qo,Tg([O({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),na=class extends x4(Z){},aa=class extends x4(No){};var kc=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?io.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Mg=new kc;var S4=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:Ue,converter:io,...e}),r[Xo]=(a=r[Xo])!==null&&a!==void 0?a:new Map,r[Xo].set(o,t??{})};var C4=H`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-tree-list",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "A tree list component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,16 +20,16 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fluid-topics/design-system-variables": "3.1.0",
23
- "@fluid-topics/ft-assets": "2.0.11",
24
- "@fluid-topics/ft-button": "2.0.11",
25
- "@fluid-topics/ft-icon": "2.0.11",
26
- "@fluid-topics/ft-skeleton": "2.0.11",
27
- "@fluid-topics/ft-typography": "2.0.11",
28
- "@fluid-topics/ft-wc-utils": "2.0.11",
23
+ "@fluid-topics/ft-assets": "2.0.12",
24
+ "@fluid-topics/ft-button": "2.0.12",
25
+ "@fluid-topics/ft-icon": "2.0.12",
26
+ "@fluid-topics/ft-skeleton": "2.0.12",
27
+ "@fluid-topics/ft-typography": "2.0.12",
28
+ "@fluid-topics/ft-wc-utils": "2.0.12",
29
29
  "lit": "3.1.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@fluid-topics/ft-wc-test-utils": "2.0.11"
32
+ "@fluid-topics/ft-wc-test-utils": "2.0.12"
33
33
  },
34
- "gitHead": "aedc97fb65c7bafd16b7adef8218a58f59fea690"
34
+ "gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
35
35
  }