@fluid-topics/ft-reader-search-in-document 2.2.51 → 2.2.52

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.
@@ -269,7 +269,7 @@
269
269
  position: relative;
270
270
  word-break: break-word;
271
271
  }
272
- `});function Gd(t,e,r){return Ur(t,Fs(e,r))}function Bn(t,e){return typeof t=="function"?t(e):t}function Us(t){return t.split("-")[0]}function zr(t){return t.split("-")[1]}function rl(t){return t==="x"?"y":"x"}function il(t){return t==="y"?"height":"width"}function Un(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function sl(t){return rl(Un(t))}function Qd(t,e,r){r===void 0&&(r=!1);let i=zr(t),s=sl(t),n=il(s),o=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[n]>e.floating[n]&&(o=el(o)),[o,el(o)]}function Xd(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function el(t){let e=Us(t);return Vx[e]+t.slice(e.length)}function Hx(t){var e,r,i,s;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(s=t.left)!=null?s:0}}function Yd(t){return typeof t!="number"?Hx(t):{top:t,right:t,bottom:t,left:t}}function mi(t){let{x:e,y:r,width:i,height:s}=t;return{width:i,height:s,top:r,left:e,right:e+i,bottom:r+s,x:e,y:r}}var Wd,Kd,tl,Fs,Ur,Bs,or,Vx,zn=l(()=>{Wd=["top","right","bottom","left"],Kd=["start","end"],tl=Wd.reduce((t,e)=>t.concat(e,e+"-"+Kd[0],e+"-"+Kd[1]),[]),Fs=Math.min,Ur=Math.max,Bs=Math.round,or=t=>({x:t,y:t}),Vx={left:"right",right:"left",bottom:"top",top:"bottom"}});function Zd(t,e,r){let{reference:i,floating:s}=t,n=Un(e),o=sl(e),a=il(o),u=Us(e),d=n==="y",h=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,m=i[a]/2-s[a]/2,S;switch(u){case"top":S={x:h,y:i.y-s.height};break;case"bottom":S={x:h,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:p};break;case"left":S={x:i.x-s.width,y:p};break;default:S={x:i.x,y:i.y}}let w=zr(e);return w&&(S[o]+=m*(w==="end"?1:-1)*(r&&d?-1:1)),S}async function Jd(t,e){var r;e===void 0&&(e={});let{x:i,y:s,platform:n,rects:o,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:S=0}=Bn(e,t),w=Yd(S),E=a[m?p==="floating"?"reference":"floating":p],H=mi(await n.getClippingRect({element:(r=await(n.isElement==null?void 0:n.isElement(E)))==null||r?E:E.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:u})),Z=p==="floating"?{x:i,y:s,width:o.floating.width,height:o.floating.height}:o.reference,_=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),N=await(n.isElement==null?void 0:n.isElement(_))&&await(n.getScale==null?void 0:n.getScale(_))||{x:1,y:1},re=mi(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:Z,offsetParent:_,strategy:u}):Z);return{top:(H.top-re.top+w.top)/N.y,bottom:(re.bottom-H.bottom+w.bottom)/N.y,left:(H.left-re.left+w.left)/N.x,right:(re.right-H.right+w.right)/N.x}}function qx(t,e,r){return(t?[...r.filter(s=>zr(s)===t),...r.filter(s=>zr(s)!==t)]:r.filter(s=>Us(s)===s)).filter(s=>t?zr(s)===t||(e?Xd(s)!==s:!1):!0)}var jx,ep,tp,rp,ip=l(()=>{zn();zn();jx=50,ep=async(t,e,r)=>{let{placement:i="bottom",strategy:s="absolute",middleware:n=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Jd},u=await(o.isRTL==null?void 0:o.isRTL(e)),d=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:p}=Zd(d,i,u),m=i,S=0,w={};for(let B=0;B<n.length;B++){let E=n[B];if(!E)continue;let{name:H,fn:Z}=E,{x:_,y:N,data:re,reset:_e}=await Z({x:h,y:p,initialPlacement:i,placement:m,strategy:s,middlewareData:w,rects:d,platform:a,elements:{reference:t,floating:e}});h=_??h,p=N??p,w[H]={...w[H],...re},_e&&S<jx&&(S++,typeof _e=="object"&&(_e.placement&&(m=_e.placement),_e.rects&&(d=_e.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):_e.rects),{x:h,y:p}=Zd(d,m,u)),B=-1)}return{x:h,y:p,placement:m,strategy:s,middlewareData:w}};tp=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,s;let{rects:n,middlewareData:o,placement:a,platform:u,elements:d}=e,{crossAxis:h=!1,alignment:p,allowedPlacements:m=tl,autoAlignment:S=!0,...w}=Bn(t,e),B=p!==void 0||m===tl?qx(p||null,S,m):m,E=((r=o.autoPlacement)==null?void 0:r.index)||0,H=B[E];if(H==null)return{};if(a!==H)return{reset:{placement:B[0]}};let Z=await u.detectOverflow(e,w),_=Qd(H,n,await(u.isRTL==null?void 0:u.isRTL(d.floating))),N=[Z[Us(H)],Z[_[0]],Z[_[1]]],re=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:H,overflows:N}],_e=B[E+1];if(_e)return{data:{index:E+1,overflows:re},reset:{placement:_e}};let mt=re.map(Tt=>{let Ls=zr(Tt.placement);return[Tt.placement,Ls&&h?Tt.overflows.slice(0,2).reduce((Tx,kx)=>Tx+kx,0):Tt.overflows[0],Tt.overflows]}).sort((Tt,Ls)=>Tt[1]-Ls[1]),Dn=((s=mt.filter(Tt=>Tt[2].slice(0,zr(Tt[0])?2:3).every(Ls=>Ls<=0))[0])==null?void 0:s[0])||mt[0][0];return Dn!==a?{data:{index:E+1,overflows:re},reset:{placement:Dn}}:{}}}},rp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:s,platform:n}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:Z=>{let{x:_,y:N}=Z;return{x:_,y:N}}},...d}=Bn(t,e),h={x:r,y:i},p=await n.detectOverflow(e,d),m=Un(s),S=rl(m),w=h[S],B=h[m],E=(Z,_)=>Gd(_+p[Z==="y"?"top":"left"],_,_-p[Z==="y"?"bottom":"right"]);o&&(w=E(S,w)),a&&(B=E(m,B));let H=u.fn({...e,[S]:w,[m]:B});return{...H,data:{x:H.x-r,y:H.y-i,enabled:{[S]:o,[m]:a}}}}}}});function Hn(){return typeof window<"u"}function yi(t){return np(t)?(t.nodeName||"").toLowerCase():"#document"}function lt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ar(t){var e;return(e=(np(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function np(t){return Hn()?t instanceof Node||t instanceof lt(t).Node:!1}function qt(t){return Hn()?t instanceof Element||t instanceof lt(t).Element:!1}function wr(t){return Hn()?t instanceof HTMLElement||t instanceof lt(t).HTMLElement:!1}function sp(t){return!Hn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof lt(t).ShadowRoot}function zs(t){let{overflow:e,overflowX:r,overflowY:i,display:s}=Kt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&s!=="inline"&&s!=="contents"}function op(t){return/^(table|td|th)$/.test(yi(t))}function Vs(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}function Xi(t){let e=qt(t)?Kt(t):t;return gi(e.transform)||gi(e.translate)||gi(e.scale)||gi(e.rotate)||gi(e.perspective)||!jn()&&(gi(e.backdropFilter)||gi(e.filter))||Kx.test(e.willChange||"")||Wx.test(e.contain||"")}function ap(t){let e=Vr(t);for(;wr(e)&&!Yi(e);){if(Xi(e))return e;if(Vs(e))return null;e=Vr(e)}return null}function jn(){return nl==null&&(nl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nl}function Yi(t){return/^(html|body|#document)$/.test(yi(t))}function Kt(t){return lt(t).getComputedStyle(t)}function Hs(t){return qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Vr(t){if(yi(t)==="html")return t;let e=t.assignedSlot||t.parentNode||sp(t)&&t.host||Ar(t);return sp(e)?e.host:e}function lp(t){let e=Vr(t);return Yi(e)?(t.ownerDocument||t).body:wr(e)&&zs(e)?e:lp(e)}function Vn(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let s=lp(t),n=s===((i=t.ownerDocument)==null?void 0:i.body),o=lt(s);if(n){let a=qn(o);return e.concat(o,o.visualViewport||[],zs(s)?s:[],a&&r?Vn(a):[])}else return e.concat(s,Vn(s,[],r))}function qn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}var Kx,Wx,gi,nl,ol=l(()=>{Kx=/transform|translate|scale|rotate|perspective|filter/,Wx=/paint|layout|strict|content/,gi=t=>!!t&&t!=="none"});function dp(t){let e=Kt(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,s=wr(t),n=s?t.offsetWidth:r,o=s?t.offsetHeight:i,a=Bs(r)!==n||Bs(i)!==o;return a&&(r=n,i=o),{width:r,height:i,$:a}}function pp(t){return qt(t)?t:t.contextElement}function Zi(t){let e=pp(t);if(!wr(e))return or(1);let r=e.getBoundingClientRect(),{width:i,height:s,$:n}=dp(e),o=(n?Bs(r.width):r.width)/i,a=(n?Bs(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}function hp(t){let e=lt(t);return!jn()||!e.visualViewport?Gx:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Qx(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===lt(t)}function js(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let s=t.getBoundingClientRect(),n=pp(t),o=or(1);e&&(i?qt(i)&&(o=Zi(i)):o=Zi(t));let a=Qx(n,r,i)?hp(n):or(0),u=(s.left+a.x)/o.x,d=(s.top+a.y)/o.y,h=s.width/o.x,p=s.height/o.y;if(n&&i){let m=lt(n),S=qt(i)?lt(i):i,w=m,B=qn(w);for(;B&&S!==w;){let E=Zi(B),H=B.getBoundingClientRect(),Z=Kt(B),_=H.left+(B.clientLeft+parseFloat(Z.paddingLeft))*E.x,N=H.top+(B.clientTop+parseFloat(Z.paddingTop))*E.y;u*=E.x,d*=E.y,h*=E.x,p*=E.y,u+=_,d+=N,w=lt(B),B=qn(w)}}return mi({width:h,height:p,x:u,y:d})}function Kn(t,e){let r=Hs(t).scrollLeft;return e?e.left+r:js(Ar(t)).left+r}function fp(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Kn(t,r),s=r.top+e.scrollTop;return{x:i,y:s}}function Xx(t){let{elements:e,rect:r,offsetParent:i,strategy:s}=t,n=s==="fixed",o=Ar(i),a=e?Vs(e.floating):!1;if(i===o||a&&n)return r;let u={scrollLeft:0,scrollTop:0},d=or(1),h=or(0),p=wr(i);if((p||!n)&&((yi(i)!=="body"||zs(o))&&(u=Hs(i)),p)){let S=js(i);d=Zi(i),h.x=S.x+i.clientLeft,h.y=S.y+i.clientTop}let m=o&&!p&&!n?fp(o,u):or(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+h.x+m.x,y:r.y*d.y-u.scrollTop*d.y+h.y+m.y}}function Yx(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Zx(t){let e=Hs(t),r=t.ownerDocument.body,i=Ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),n=-e.scrollLeft+Kn(t),o=-e.scrollTop;return Kt(r).direction==="rtl"&&(n+=Ur(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:n,y:o}}function eS(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",s=lt(t),n=Ar(t),o=s.visualViewport,a=n.clientWidth,u=n.clientHeight,d=0,h=0;if(o){let m=!jn()||e==="fixed";i?m||(d=-o.offsetLeft,h=-o.offsetTop):(a=o.width,u=o.height,m&&(d=o.offsetLeft,h=o.offsetTop))}if(Kn(n)<=0){let m=n.ownerDocument,S=m.body,w=getComputedStyle(S),B=m.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(n.clientWidth-S.clientWidth-B),H=getComputedStyle(n).scrollbarGutter==="stable both-edges"?E/2:E;H<=Jx&&(a-=H)}return{width:a,height:u,x:d,y:h}}function tS(t,e){let r=js(t,!0,e==="fixed"),i=r.top+t.clientTop,s=r.left+t.clientLeft,n=Zi(t),o=t.clientWidth*n.x,a=t.clientHeight*n.y,u=s*n.x,d=i*n.y;return{width:o,height:a,x:u,y:d}}function cp(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=eS(t,r,e);else if(e==="document")i=Zx(Ar(t));else if(qt(e))i=tS(e,r);else{let s=hp(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return mi(i)}function rS(t,e){let r=e.get(t);if(r)return r;let i=Vn(t,[],!1).filter(a=>qt(a)&&yi(a)!=="body"),s=null,n=Kt(t).position==="fixed",o=n?Vr(t):t;for(;qt(o)&&!Yi(o);){let a=Kt(o),u=Xi(o),d=s?s.position:n?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&a.position==="static")?i=i.filter(p=>p!==o):s=a,o=Vr(o)}return e.set(t,i),i}function iS(t){let{element:e,boundary:r,rootBoundary:i,strategy:s}=t,o=[...r==="clippingAncestors"?Vs(e)?[]:rS(e,this._c):[].concat(r),i],a=cp(e,o[0],s),u=a.top,d=a.right,h=a.bottom,p=a.left;for(let m=1;m<o.length;m++){let S=cp(e,o[m],s);u=Ur(S.top,u),d=Fs(S.right,d),h=Fs(S.bottom,h),p=Ur(S.left,p)}return{width:d-p,height:h-u,x:p,y:u}}function sS(t){let{width:e,height:r}=dp(t);return{width:e,height:r}}function nS(t,e,r){let i=wr(e),s=Ar(e),n=r==="fixed",o=js(t,!0,n,e),a={scrollLeft:0,scrollTop:0},u=or(0);if((i||!n)&&((yi(e)!=="body"||zs(s))&&(a=Hs(e)),i)){let m=js(e,!0,n,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}!i&&s&&(u.x=Kn(s));let d=s&&!i&&!n?fp(s,a):or(0),h=o.left+a.scrollLeft-u.x-d.x,p=o.top+a.scrollTop-u.y-d.y;return{x:h,y:p,width:o.width,height:o.height}}function al(t){return Kt(t).position==="static"}function up(t,e){if(!wr(t)||Kt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ar(t)===r&&(r=r.ownerDocument.body),r}function mp(t,e){let r=lt(t);if(Vs(t))return r;if(!wr(t)){let s=Vr(t);for(;s&&!Yi(s);){if(qt(s)&&!al(s))return s;s=Vr(s)}return r}let i=up(t,e);for(;i&&op(i)&&al(i);)i=up(i,e);return i&&Yi(i)&&al(i)&&!Xi(i)?r:i||ap(t)||r}function aS(t){return Kt(t).direction==="rtl"}var Gx,Jx,oS,Wn,gp,yp,bp,vp=l(()=>{ip();zn();ol();Gx=or(0);Jx=25;oS=async function(t){let e=this.getOffsetParent||mp,r=this.getDimensions,i=await r(t.floating);return{reference:nS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};Wn={convertOffsetParentRelativeRectToViewportRelativeRect:Xx,getDocumentElement:Ar,getClippingRect:iS,getOffsetParent:mp,getElementRects:oS,getClientRects:Yx,getDimensions:sS,getScale:Zi,isElement:qt,isRTL:aS},gp=tp,yp=rp,bp=(t,e,r)=>{let i=new Map,s=r??{},n={...Wn,...s.platform,_c:i};return ep(t,e,{...s,platform:n})}});function xp(t){return lS(t)}function ll(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function lS(t){for(let e=t;e;e=ll(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ll(t);e;e=ll(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Xi(r)||e.tagName==="BODY"))return e}return null}var Sp=l(()=>{ol()});async function Ep(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},bp(t,e,{strategy:i.strategy,platform:{...Wn,getOffsetParent:s=>Wn.getOffsetParent(s,xp)},middleware:[yp({crossAxis:!0}),gp({allowedPlacements:[i.placement]})]})}var Cp=l(()=>{"use strict";vp();Sp()});function wp(t,e){return(0,Ap.property)({type:Object,converter:cS(t),hasChanged:Ks,...e??{}})}var Ap,cl,cS,Gn=l(()=>{"use strict";Ap=c(P(),1);bi();cl=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},cS=t=>({fromAttribute:e=>{if(e==null)return qs(t);try{return JSON.parse(e)}catch{return qs(t)}},toAttribute:e=>JSON.stringify(e)})});function uS(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ji(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ji(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),n=s(t);if(r=n.length,r!==s(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let o=n[i];if(!Ji(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ji(t,e){try{return uS(t,e)}catch{return!1}}function Ks(t,e){return!Ji(t,e)}function qs(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Qn(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let s=e(i);return s[t]=!0,s}}var bi=l(()=>{"use strict";Gn()});var Op,ul,_p=l(()=>{"use strict";bi();Op=c(P(),1),ul=t=>{let e=t??{};return(r,i)=>{var s;let n={hasChanged:Ks,attribute:!1,...e};(0,Op.property)(n)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[i]),store:e.store})}}});var Xn,dl=l(()=>{"use strict";Xn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==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))}}});var Yn,Rp=l(()=>{"use strict";Yn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){s(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}});var Jn,Zn,Tp=l(()=>{"use strict";Jn=c(y(),1);Gn();Zn=class extends Jn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return(0,Jn.adoptStyles)(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){cl(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}}});function kp(t,e,...r){var i;let s=t.querySelector(e);for(let n of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return s}var Lp=l(()=>{"use strict"});var vi,ts,Pp,Ip,$p,Mp,Dp,es,ar,Np=l(()=>{"use strict";vi=c(P(),1);Gn();Rp();Tp();Lp();ts=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},Ip=Symbol("constructorPrototype"),$p=Symbol("constructorName"),Mp=Symbol("exportpartsDebouncer"),Dp=Symbol("dynamicDependenciesLoaded"),es=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};es.eventName="exportparts-updated";ar=class extends Zn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Pp]=new Yn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Mp].run(()=>{var s,n;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[$p]=this.constructor.name,this[Ip]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[$p]&&Object.setPrototypeOf(this,this[Ip])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Dp]||(r[Dp]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(es.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(es.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new es)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let n=[...s??[],i];r=kp(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(e){var r,i,s,n,o,a;let u=m=>m!=null&&m.trim().length>0,d=e.filter(u).map(m=>m.trim());if(d.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(o=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],w=(a=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],B=[...S,...w].filter(u).map(E=>E.trim());for(let E of B)h.add(E)}if(h.size===0){this.exportparts=void 0;return}let p=[...h.values()].flatMap(m=>d.map(S=>`${m}:${S}--${m}`));this.exportparts=[...this.part,...p].join(", ")}};Pp=Mp;ts([(0,vi.property)()],ar.prototype,"exportpartsPrefix",void 0);ts([wp([])],ar.prototype,"exportpartsPrefixes",void 0);ts([(0,vi.property)({reflect:!0})],ar.prototype,"exportparts",void 0);ts([(0,vi.property)()],ar.prototype,"customStylesheet",void 0);ts([(0,vi.property)()],ar.prototype,"elementToFocus",void 0);ts([(0,vi.state)()],ar.prototype,"useAdoptedStyleSheets",void 0)});function eo(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var to=l(()=>{"use strict"});var Ws,Hr,xi,dS,Fp,Bp=l(()=>{"use strict";Np();to();bi();Ws=Symbol("internalReduxEventsUnsubscribers"),Hr=Symbol("internalStoresUnsubscribers"),xi=Symbol("internalStores"),dS=Qn(Symbol("withRedux"),function(t){var e,r,i;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xi].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[xi].get(o)}addStore(o,a){var u;a=(u=a??o.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(a),this[xi].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[xi].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xi].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let u=this.constructor.getPropertyOptions(a);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:a)){let d=this.getStore(o.store);d&&(o.store?this[Hr].has(o.store):this[Hr].size>0)&&(this[a]=o.selector(d.getState(),this))}})}subscribeToStore(o,a){var u,d;this[Hr].set(o,a.subscribe(()=>this.updateFromStores())),this[Ws].set(o,[]),eo(a)&&(!((u=a.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((h,p)=>{this.getStore(h.store)===a&&a.deprecatedKeys.includes(p)&&console.warn("Element",this,"is subscribed to deprecated key",p,"in store",a.name)}),a.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((h,p)=>{if(typeof this[p]=="function"&&(!h.store||a.name===h.store)){let m=S=>this[p](S);a.addEventListener(h.eventName,m),this[Ws].get(o).push(()=>a.removeEventListener(h.eventName,m))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Hr].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Hr].has(o)&&this[Hr].get(o)(),this[Hr].delete(o),(a=this[Ws].get(o))===null||a===void 0||a.forEach(u=>u()),this[Ws].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Hr,r=xi,i=Ws,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Fp=class extends dS(ar){}});function Me(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. `}function io(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function hl(t,e,r){if(typeof t!="function")throw new Error(Me(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Me(1));return r(hl)(t,e)}let i=t,s=e,n=new Map,o=n,a=0,u=!1;function d(){o===n&&(o=new Map,n.forEach((E,H)=>{o.set(H,E)}))}function h(){if(u)throw new Error(Me(3));return s}function p(E){if(typeof E!="function")throw new Error(Me(4));if(u)throw new Error(Me(5));let H=!0;d();let Z=a++;return o.set(Z,E),function(){if(H){if(u)throw new Error(Me(6));H=!1,d(),o.delete(Z),n=null}}}function m(E){if(!io(E))throw new Error(Me(7));if(typeof E.type>"u")throw new Error(Me(8));if(typeof E.type!="string")throw new Error(Me(17));if(u)throw new Error(Me(9));try{u=!0,s=i(s,E)}finally{u=!1}return(n=o).forEach(Z=>{Z()}),E}function S(E){if(typeof E!="function")throw new Error(Me(10));i=E,m({type:ro.REPLACE})}function w(){let E=p;return{subscribe(H){if(typeof H!="object"||H===null)throw new Error(Me(11));function Z(){let N=H;N.next&&N.next(h())}return Z(),{unsubscribe:E(Z)}},[Up](){return this}}}return m({type:ro.INIT}),{dispatch:m,subscribe:p,getState:h,replaceReducer:S,[Up]:w}}function fS(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:ro.INIT})>"u")throw new Error(Me(12));if(typeof r(void 0,{type:ro.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function fl(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),s,n;try{fS(r)}catch(o){n=o}return function(a={},u){if(n)throw n;let d=!1,h={};for(let p=0;p<i.length;p++){let m=i[p],S=r[m],w=a[m],B=S(w,u);if(typeof B>"u"){let E=u&&u.type;throw new Error(Me(14))}h[m]=B,d=d||B!==w}return d=d||i.length!==Object.keys(a).length,d?h:a}}function Gs(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function zp(...t){return e=>(r,i)=>{let s=e(r,i),n=()=>{throw new Error(Me(15))},o={getState:s.getState,dispatch:(u,...d)=>n(u,...d)},a=t.map(u=>u(o));return n=Gs(...a)(s.dispatch),{...s,dispatch:n}}}function Vp(t){return io(t)&&"type"in t&&typeof t.type=="string"}var pS,Up,pl,hS,ro,ml=l(()=>{pS=typeof Symbol=="function"&&Symbol.observable||"@@observable",Up=pS,pl=()=>Math.random().toString(36).substring(7).split("").join("."),hS={INIT:`@@redux/INIT${pl()}`,REPLACE:`@@redux/REPLACE${pl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pl()}`},ro=hS});function Wt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}function yt(t){return t?Zp(t)||go(t)||!!t[Hp]||!!t[ao]?.[Hp]||yo(t)||Js(t):!1}function Zp(t){if(!t||!_l(t))return!1;let e=is(t);if(e===null||e===gt[fo])return!0;let r=gt.hasOwnProperty.call(e,ao)&&e[ao];if(r===Object)return!0;if(!rs(r))return!1;let i=jp.get(r);return i===void 0&&(i=Function.toString.call(r),jp.set(r,i)),i===mS}function mo(t,e,r=!0){Zs(t)===0?(r?Reflect.ownKeys(t):gt.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((i,s)=>e(s,i,t))}function Zs(t){let e=t[He];return e?e.type_:go(t)?1:yo(t)?2:Js(t)?3:0}function gS(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function yS(t){let e=+t;return Number.isInteger(e)&&String(e)===t}function Sl(t,e){if(yo(t))return new Map(t);if(Js(t))return new Set(t);if(go(t))return Array[fo].slice.call(t);let r=Zp(t);if(e===!0||e==="class_only"&&!r){let i=gt.getOwnPropertyDescriptors(t);delete i[He];let s=Reflect.ownKeys(i);for(let n=0;n<s.length;n++){let o=s[n],a=i[o];a[no]===!1&&(a[no]=!0,a[vl]=!0),(a.get||a.set)&&(i[o]={[vl]:!0,[no]:!0,[lo]:a[lo],[Qs]:t[o]})}return gt.create(is(t),i)}else{let i=is(t);if(i!==null&&r)return{...t};let s=gt.create(i);return gt.assign(s,t)}}function bo(t,e=!1){return vo(t)||lr(t)||!yt(t)||(Zs(t)>1&&gt.defineProperties(t,{set:so,add:so,clear:so,delete:so}),gt.freeze(t),e&&mo(t,(r,i)=>{bo(i,!0)},!1)),t}function bS(){Wt(2)}function vo(t){return t===null||!_l(t)?!0:gt.isFrozen(t)}function Si(t){let e=Jp[t];return e||Wt(0,t),e}function Wp(t,e){e&&(t.patchPlugin_=Si(El),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Cl(t){Al(t),t.drafts_.forEach(xS),t.drafts_=null}function Al(t){t===Xs&&(Xs=t.parent_)}function xS(t){let e=t[He];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Qp(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[He].modified_&&(Cl(e),Wt(4)),yt(t)&&(t=Xp(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[He].base_,t,e)}else t=Xp(e,r);return SS(e,t,!0),Cl(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Yp?t:void 0}function Xp(t,e){if(vo(e))return e;let r=e[He];if(!r)return po(e,t.handledSet_,t);if(!xo(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);ih(r,t)}return r.copy_}function SS(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&bo(e,r)}function th(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}function rh(t,e,r,i){let s=Or(t),n=t.type_;if(i!==void 0&&xl(s,i,n)===e){co(s,i,r,n);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;mo(s,(u,d)=>{if(lr(d)){let h=a.get(d)||[];h.push(u),a.set(d,h)}})}let o=t.draftLocations_.get(e)??ES;for(let a of o)co(s,a,r,n)}function CS(t,e,r){t.callbacks_.push(function(s){let n=e;if(!n||!xo(n,s))return;s.mapSetPlugin_?.fixSetContents(n);let o=Rl(n);rh(t,n.draft_??n,o,r),ih(n,s)})}function ih(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let s=i.getPath(t);s&&i.generatePatches_(t,s,e)}th(t)}}function AS(t,e,r){let{scope_:i}=t;if(lr(r)){let s=r[He];xo(s,i)&&s.callbacks_.push(function(){oo(t);let o=Rl(s);rh(t,r,o,e)})}else yt(r)&&t.callbacks_.push(function(){let n=Or(t);t.type_===3?n.has(r)&&po(r,i.handledSet_,i):xl(n,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&po(xl(t.copy_,e,t.type_),i.handledSet_,i)})}function po(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||lr(t)||e.has(t)||!yt(t)||vo(t)||(e.add(t),mo(t,(i,s)=>{if(lr(s)){let n=s[He];if(xo(n,r)){let o=Rl(n);co(t,i,o,t.type_),th(n)}}else yt(s)&&po(s,e,r)})),t}function wS(t,e){let r=go(t),i={type_:r?1:0,scope_:e?e.scope_:eh(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,n=ho;r&&(s=[i],n=Ys);let{revoke:o,proxy:a}=Proxy.revocable(s,n);return i.draft_=a,i.revoke_=o,[a,i]}function bl(t,e){let r=t[He];return(r?Or(r):t)[e]}function OS(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||!yt(r)||r[He]?!1:t.baseRefs_.has(r)}function _S(t,e,r){let i=sh(e,r);return i?Qs in i?i[Qs]:i.get?.call(t.draft_):void 0}function sh(t,e){if(!(e in t))return;let r=is(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=is(r)}}function wl(t){t.modified_||(t.modified_=!0,t.parent_&&wl(t.parent_))}function oo(t){t.copy_||(t.assigned_=new Map,t.copy_=Sl(t.base_,t.scope_.immer_.useStrictShallowCopy_))}function Ol(t,e,r,i){let[s,n]=yo(e)?Si(uo).proxyMap_(e,r):Js(e)?Si(uo).proxySet_(e,r):wS(e,r);return(r?.scope_??eh()).drafts_.push(s),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?CS(r,n,i):n.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:d}=u;n.modified_&&d&&d.generatePatches_(n,[],u)}),s}function nh(t){return lr(t)||Wt(10,t),oh(t)}function oh(t){if(!yt(t)||vo(t))return t;let e=t[He],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Sl(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Sl(t,!0);let s=r;return Js(r)&&(r=new Set),mo(s,(n,o)=>{co(r,n,oh(o))},i),e&&(e.finalized_=!1),r}var Yp,Hp,He,gt,is,ao,fo,vl,lo,no,Qs,lr,mS,jp,gl,xl,co,go,yo,Js,_l,rs,yl,Or,Rl,so,uo,El,qp,Jp,Kp,Xs,eh,vS,Gp,xo,ES,ho,Ys,RS,TS,a0,kS,Tl,ah=l(()=>{Yp=Symbol.for("immer-nothing"),Hp=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");gt=Object,is=gt.getPrototypeOf,ao="constructor",fo="prototype",vl="configurable",lo="enumerable",no="writable",Qs="value",lr=t=>!!t&&!!t[He];mS=gt[fo][ao].toString(),jp=new WeakMap;gl=(t,e,r=Zs(t))=>r===2?t.has(e):gt[fo].hasOwnProperty.call(t,e),xl=(t,e,r=Zs(t))=>r===2?t.get(e):t[e],co=(t,e,r,i=Zs(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};go=Array.isArray,yo=t=>t instanceof Map,Js=t=>t instanceof Set,_l=t=>typeof t=="object",rs=t=>typeof t=="function",yl=t=>typeof t=="boolean";Or=t=>t.copy_||t.base_,Rl=t=>t.modified_?t.copy_:t.base_;so={[Qs]:bS};uo="MapSet",El="Patches",qp="ArrayMethods",Jp={};Kp=t=>!!Jp[t],eh=()=>Xs,vS=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Kp(uo)?Si(uo):void 0,arrayMethodsPlugin_:Kp(qp)?Si(qp):void 0});Gp=t=>Xs=vS(Xs,t);xo=(t,e)=>t.scope_===e,ES=[];ho={get(t,e){if(e===He)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=Or(t);if(!gl(s,e,t.type_))return _S(t,s,e);let n=s[e];if(t.finalized_||!yt(n)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&yS(e))return n;if(n===bl(t.base_,e)||OS(t,e,n)){oo(t);let o=t.type_===1?+e:e,a=Ol(t.scope_,n,t,o);return t.copy_[o]=a}return n},has(t,e){return e in Or(t)},ownKeys(t){return Reflect.ownKeys(Or(t))},set(t,e,r){let i=sh(Or(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let s=bl(Or(t),e),n=s?.[He];if(n&&n.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(gS(r,s)&&(r!==void 0||gl(t.base_,e,t.type_)))return!0;oo(t),wl(t)}return t.copy_[e]===r&&(r!==void 0||gl(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),AS(t,e,r)),!0},deleteProperty(t,e){return oo(t),bl(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),wl(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Or(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[no]:!0,[vl]:t.type_!==1||e!=="length",[lo]:i[lo],[Qs]:r[e]}},defineProperty(){Wt(11)},getPrototypeOf(t){return is(t.base_)},setPrototypeOf(){Wt(12)}},Ys={};for(let t in ho){let e=ho[t];Ys[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Ys.deleteProperty=function(t,e){return Ys.set.call(this,t,e,void 0)};Ys.set=function(t,e,r){return ho.set.call(this,t[0],e,r,t[0])};RS=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(rs(e)&&!rs(r)){let n=r;r=e;let o=this;return function(u=n,...d){return o.produce(u,h=>r.call(this,h,...d))}}rs(r)||Wt(6),i!==void 0&&!rs(i)&&Wt(7);let s;if(yt(e)){let n=Gp(this),o=Ol(n,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?Cl(n):Al(n)}return Wp(n,i),Qp(s,n)}else if(!e||!_l(e)){if(s=r(e),s===void 0&&(s=e),s===Yp&&(s=void 0),this.autoFreeze_&&bo(s,!0),i){let n=[],o=[];Si(El).generateReplacementPatches_(e,s,{patches_:n,inversePatches_:o}),i(n,o)}return s}else Wt(1,e)},this.produceWithPatches=(e,r)=>{if(rs(e))return(o,...a)=>this.produceWithPatches(o,u=>e(u,...a));let i,s;return[this.produce(e,r,(o,a)=>{i=o,s=a}),i,s]},yl(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),yl(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),yl(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yt(t)||Wt(8),lr(t)&&(t=nh(t));let e=Gp(this),r=Ol(e,t,void 0);return r[He].isManual_=!0,Al(e),r}finishDraft(t,e){let r=t&&t[He];(!r||!r.isManual_)&&Wt(9);let{scope_:i}=r;return Wp(i,e),Qp(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let i=Si(El).applyPatches_;return lr(t)?i(t,e):this.produce(t,s=>i(s,e))}};TS=globalThis.Iterator,a0=typeof TS?.from=="function",kS=new RS,Tl=kS.produce});function lh(t){return({dispatch:r,getState:i})=>s=>n=>typeof n=="function"?n(r,i,t):s(n)}var ch,uh,dh=l(()=>{ch=lh(),uh=lh});function tn(t,e){function r(...i){if(e){let s=e(...i);if(!s)throw new Error(cr(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>i!=null&&i.type===t&&Vp(i),r}function ph(t){return yt(t)?Tl(t,()=>{}):t}function So(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function IS(t){return typeof t=="boolean"}function mh(t){let e=$S(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:n=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},u;if(typeof r=="function")u=r;else if(io(r))u=fl(r);else throw new Error(cr(1));let d;typeof i=="function"?d=i(e):d=e();let h=Gs;s&&(h=LS({trace:!1,...typeof s=="object"&&s}));let p=zp(...d),m=NS(p),S=typeof a=="function"?a(m):m(),w=h(...S);return hl(u,o,w)}function gh(t){let e={},r=[],i,s={addCase(n,o){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(cr(28));if(a in e)throw new Error(cr(29));return e[a]=o,s},addAsyncThunk(n,o){return o.pending&&(e[n.pending.type]=o.pending),o.rejected&&(e[n.rejected.type]=o.rejected),o.fulfilled&&(e[n.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:n.settled,reducer:o.settled}),s},addMatcher(n,o){return r.push({matcher:n,reducer:o}),s},addDefaultCase(n){return i=n,s}};return t(s),[e,r,i]}function FS(t){return typeof t=="function"}function BS(t,e){let[r,i,s]=gh(e),n;if(FS(t))n=()=>ph(t());else{let u=ph(t);n=()=>u}function o(u,d,h){if(lr(u)){let p=d(u,h);return p===void 0?u:p}else{if(yt(u))return Tl(u,p=>d(p,h));{let p=d(u,h);if(p===void 0){if(u===null)return u;throw new Error(cr(9))}return p}}}function a(u=n(),d){let h=r[d.type],p;for(let{matcher:m,reducer:S}of i)m(d)&&S&&(p??=[]).push(S);if(!h&&!p)return s?o(u,s,d):u;if(h&&(u=o(u,h,d)),p)for(let m of p)u=o(u,m,d);return u}return a.getInitialState=n,a}function zS(t,e){return`${t}/${e}`}function VS({creators:t}={}){let e=t?.asyncThunk?.[US];return function(i){let{name:s,reducerPath:n=s}=i;if(!s)throw new Error(cr(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(jS()):i.reducers)||{},a=Object.keys(o),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(_,N){let re=typeof _=="string"?_:_.type;if(!re)throw new Error(cr(12));if(re in u.sliceCaseReducersByType)throw new Error(cr(13));return u.sliceCaseReducersByType[re]=N,d},addMatcher(_,N){return u.sliceMatchers.push({matcher:_,reducer:N}),d},exposeAction(_,N){return u.actionCreators[_]=N,d},exposeCaseReducer(_,N){return u.sliceCaseReducersByName[_]=N,d}};a.forEach(_=>{let N=o[_],re={reducerName:_,type:zS(s,_),createNotation:typeof i.reducers=="function"};KS(N)?GS(re,N,d,e):qS(re,N,d)});function h(){let[_={},N=[],re=void 0]=typeof i.extraReducers=="function"?gh(i.extraReducers):[i.extraReducers],_e={..._,...u.sliceCaseReducersByType};return BS(i.initialState,mt=>{for(let Ve in _e)mt.addCase(Ve,_e[Ve]);for(let Ve of u.sliceMatchers)mt.addMatcher(Ve.matcher,Ve.reducer);for(let Ve of N)mt.addMatcher(Ve.matcher,Ve.reducer);re&&mt.addDefaultCase(re)})}let p=_=>_,m=new Map,S=new WeakMap,w;function B(_,N){return w||(w=h()),w(_,N)}function E(){return w||(w=h()),w.getInitialState()}function H(_,N=!1){function re(mt){let Ve=mt[_];return typeof Ve>"u"&&N&&(Ve=So(S,re,E)),Ve}function _e(mt=p){return So(So(m,N,()=>new WeakMap),mt,()=>{let Ve={};for(let[Dn,Tt]of Object.entries(i.selectors??{}))Ve[Dn]=HS(Tt,mt,()=>So(S,mt,E),N);return Ve})}return{reducerPath:_,getSelectors:_e,get selectors(){return _e(re)},selectSlice:re}}let Z={name:s,reducer:B,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:E,...H(n),injectInto(_,{reducerPath:N,...re}={}){let _e=N??n;return _.inject({reducerPath:_e,reducer:B},re),{...Z,...H(_e,!0)}}};return Z}}function HS(t,e,r,i){function s(n,...o){let a=e(n);return typeof a>"u"&&i&&(a=r()),t(a,...o)}return s.unwrapped=t,s}function jS(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function qS({type:t,reducerName:e,createNotation:r},i,s){let n,o;if("reducer"in i){if(r&&!WS(i))throw new Error(cr(17));n=i.reducer,o=i.prepare}else n=i;s.addCase(t,n).exposeCaseReducer(e,n).exposeAction(e,o?tn(t,o):tn(t))}function KS(t){return t._reducerDefinitionType==="asyncThunk"}function WS(t){return t._reducerDefinitionType==="reducerWithPrepare"}function GS({type:t,reducerName:e},r,i,s){if(!s)throw new Error(cr(18));let{payloadCreator:n,fulfilled:o,pending:a,rejected:u,settled:d,options:h}=r,p=s(t,n,h);i.exposeAction(e,p),o&&i.addCase(p.fulfilled,o),a&&i.addCase(p.pending,a),u&&i.addCase(p.rejected,u),d&&i.addMatcher(p.settled,d),i.exposeCaseReducer(e,{fulfilled:o||Eo,pending:a||Eo,rejected:u||Eo,settled:d||Eo})}function Eo(){}function cr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var LS,fh,$S,DS,hh,PS,MS,NS,US,yh,bh,vh,xh,m0,g0,y0,b0,Sh,kl,QS,v0,XS,Eh=l(()=>{ml();ah();dh();ml();LS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gs:Gs.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;fh=class en extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,en.prototype)}static get[Symbol.species](){return en}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new en(...e[0].concat(this)):new en(...e.concat(this))}};$S=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:n=!0}=e??{},o=new fh;return r&&(IS(r)?o.push(ch):o.push(uh(r.extraArgument))),o},DS="RTK_autoBatch",hh=t=>e=>{setTimeout(e,t)},PS=(t,e,r)=>i=>{let s=!1,n,o,a=()=>{s||(s=!0,e?.(n),clearTimeout(o),i())};n=t(a),o=setTimeout(a,r)},MS=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),s=!0,n=!1,o=!1,a=new Set,u=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?PS(window.requestAnimationFrame,window.cancelAnimationFrame,100):hh(10):t.type==="callback"?t.queueNotification:hh(t.timeout),d=()=>{o=!1,n&&(n=!1,a.forEach(h=>h()))};return Object.assign({},i,{subscribe(h){let p=()=>s&&h(),m=i.subscribe(p);return a.add(h),()=>{m(),a.delete(h)}},dispatch(h){try{return s=!h?.meta?.[DS],n=!s,n&&(o||(o=!0,u(d))),i.dispatch(h)}finally{s=!0}}})},NS=t=>function(r){let{autoBatch:i=!0}=r??{},s=new fh(t);return i&&s.push(MS(typeof i=="object"?i:void 0)),s};US=Symbol.for("rtk-slice-createasyncthunk");yh=VS();bh="listener",vh="completed",xh="cancelled",m0=`task-${xh}`,g0=`task-${vh}`,y0=`${bh}-${xh}`,b0=`${bh}-${vh}`,{assign:Sh}=Object,kl="listenerMiddleware",QS=Sh(tn(`${kl}/add`),{withTypes:()=>QS}),v0=tn(`${kl}/removeAll`),XS=Sh(tn(`${kl}/remove`),{withTypes:()=>XS})});var YS,Co,Ch=l(()=>{"use strict";bi();YS=Qn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Co=class extends YS(Object){}});var Ah,wh=l(()=>{"use strict";Eh();to();dl();Ch();bi();window.ftReduxStores||(window.ftReduxStores={});Ah=class t extends Co{static get(e){var r;let i=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,n=window.ftReduxStores[i];if(eo(n))return n;if(s==null)return;let o=yh({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=mh({reducer:(u,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let h=qs(o.getInitialState());for(let p of d.keeping)h[p]=(u??h)[p];return h}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...d.overwrites};return o.reducer(u,d)}});return window.ftReduxStores[s.name]=new t(o,a,s.eventBus,s.deprecatedKeys)}constructor(e,r,i,s){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new Xn,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,u)=>{let d=a,h=o[d];return h?(...p)=>{let m=h(...p.map(n));return this.reduxStore.dispatch(m),m}:p=>{let m=d,S=this.getState()[m];Ji(S,p)||this.setState({[m]:n(p)})}}}),this.eventBus=i??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}}});var Oh=l(()=>{"use strict";bi()});var _h=l(()=>{"use strict"});var Rh=l(()=>{"use strict";_p();dl();Bp();wh();to();Oh();_h()});var Ao,Th=l(()=>{"use strict";Ao=class{static format(e,r,i,s,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,s,!!n)):this.getIntlDateTime(e,r,i,s,!!n)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,s,n){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return n?u:s?`${a} ${u}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var wo,ZS,ur,rn,JS,x,je=l(()=>{"use strict";wo=c(f()),ZS="ft-app-info",ur=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ur.eventName="authentication-change";rn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};rn.eventName="ui-locale-changed";JS={session:(t,e)=>{(0,wo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>x.dispatchEvent(new ur(e.payload)),0))}},x=wo.FtReduxStore.get({name:ZS,reducers:JS,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}})});var Ll,kh,Oo,W0,Lh=l(()=>{"use strict";Ll=c(P());Rh();Th();je();kh=c(f()),Oo=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},W0=(0,kh.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(x)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,n;return((n=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1)?a=>Ao.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Oo([(0,Ll.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Oo([(0,Ll.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Oo([ul({store:x.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),Oo([ul({store:x.name})],e.prototype,"uiLocale",void 0),e})});var Il=l(()=>{});var Ih,$h,Dh,jr,Ph,Mh,Nh,Ei,Fh,Bh,Uh,zh,Vh,Hh,jh,qh,Kh,_o,Wh,Gh,ss,Qh,Ro,Xh,Yh,dr,ns,Zh,pe,Lt,Jh,$l=l(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ih||(Ih={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})($h||($h={}));(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"})(Dh||(Dh={}));(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"})(jr||(jr={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ph||(Ph={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Mh||(Mh={}));(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Nh||(Nh={}));(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"})(Ei||(Ei={}));(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Fh||(Fh={}));(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Bh||(Bh={}));(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",t.DOC_DIFF="DOC_DIFF"})(Uh||(Uh={}));(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"})(zh||(zh={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Vh||(Vh={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Hh||(Hh={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(jh||(jh={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(qh||(qh={}));(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"})(Kh||(Kh={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_o||(_o={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Wh||(Wh={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Gh||(Gh={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ss||(ss={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Qh||(Qh={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ro||(Ro={}));(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"})(Xh||(Xh={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Yh||(Yh={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(dr||(dr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ns||(ns={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Zh||(Zh={}));(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"})(pe||(pe={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Lt||(Lt={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Jh||(Jh={}))});var ef,tf,rf,sf,nf,of,af,lf,cf,uf,df,pf,hf=l(()=>{(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(ef||(ef={}));(function(t){t.VALID="VALID",t.INVALID="INVALID"})(tf||(tf={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(rf||(rf={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(sf||(sf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(nf||(nf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(of||(of={}));(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(af||(af={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(lf||(lf={}));(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(cf||(cf={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(uf||(uf={}));(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(df||(df={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(pf||(pf={}))});var ff=l(()=>{$l();hf()});function mf(t,e){return t===e||(eE[t]??[]).some(r=>mf(r,e))}function sn(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(i=>mf(i,e))}function gf(t,...e){return t==null?!1:e.some(r=>sn(t,r))}var eE,yf=l(()=>{$l();eE={[pe.PERSONAL_BOOK_SHARE_USER]:[pe.PERSONAL_BOOK_USER],[pe.HTML_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.PDF_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.KHUB_ADMIN]:[pe.CONTENT_PUBLISHER],[pe.ADMIN]:[pe.KHUB_ADMIN,pe.USERS_ADMIN,pe.PORTAL_ADMIN,pe.BEHAVIOR_DATA_USER],[pe.GENERATIVE_AI_EXPORT_USER]:[pe.GENERATIVE_AI_USER]}});var bf=l(()=>{});var qr=l(()=>{Il();ff();yf();bf();Il()});var Ci,Dl=l(()=>{"use strict";je();Ci=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=x.getState(),s=e??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let s=x.subscribe(()=>{i=t.get(e),i&&(s(),r(i))})}})}}});var os,Pl=l(()=>{"use strict";Dl();os=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ci.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ci.await()}}});var Ml,qe,Kr=l(()=>{"use strict";Ml=c(f());Pl();qe=class extends os{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(n,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[u])=>a.localeCompare(u)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new Ml.CacheRegistry,this.cache=e?s.commonCache:new Ml.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}}});var To,Nl=l(()=>{"use strict";je();qr();Kr();To=class extends qe{async listMySearches(){let{session:e}=x.getState();return sn(e,pe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}}});var ko,Fl=l(()=>{"use strict";je();Kr();ko=class extends qe{async listMyBookmarks(){let e=x.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}}});var Lo,vf=l(()=>{"use strict";je();Kr();Lo=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/api/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(`/api/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}}});var Io,xf=l(()=>{"use strict";Kr();je();Io=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await(await this.awaitApi).get("/api/user/assets/labels")).labels,this.CACHE_DURATION):[]}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}}});var $o,tE,rE,Cf,Bl,Ul,Sf,Ef,Xe,zl,iE,Vl=l(()=>{"use strict";qr();$o=c(f());Nl();Fl();je();vf();xf();tE="ft-user-assets",rE={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Lt).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:i,asset:s}=e.payload;Ul(t,r,[...Bl(t,r),s]),Sf(t,r,1,i),Ef(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Ul(t,r,Bl(t,r).map(s=>s.id===i.id?i:s)),Ef(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:s}=e.payload;Ul(t,r,Bl(t,r).filter(n=>n.id!==s)),Sf(t,r,-1,i)}},Cf={[Lt.SEARCHES]:"savedSearches",[Lt.BOOKMARKS]:"bookmarks",[Lt.BOOKS]:void 0,[Lt.COLLECTIONS]:void 0},Bl=(t,e)=>{var r;let i=Cf[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Ul=(t,e,r)=>{let i=Cf[e];i&&(t[i]=r)},Sf=(t,e,r,i)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===Lt.BOOKMARKS&&i)){let n=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},Ef=(t,e)=>{let r=t.assetLabels.map(s=>s.title),i=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...i)},Xe=$o.FtReduxStore.get({name:tE,reducers:rE,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),zl=class{constructor(e=new Lo,r=new Io){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=x.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ko,this.savedSearchesService=new To,x.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=x.getState();(0,$o.deepEqual)((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(),Xe.actions.clearAssetCount(),Xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Xe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Xe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Xe.getState().assetCounts.allAsset[e]!==r.count&&Xe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Xe.getState().assetCounts.bookmarkByMap[e]!==r.count&&Xe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Xe.getState().assetCounts.bookmarkByMap).length!==0;e===Lt.BOOKMARKS&&r&&Xe.actions.clearBookmarkCountByMap(),Xe.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;Xe.actions.bookmarks(r)}}},iE=new zl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=iE)});var Af=l(()=>{"use strict";qr();Vl()});var Hl,wf=l(()=>{"use strict";je();Hl=class{addCommand(e,r=!1){x.commands.add(e,r)}consumeCommand(e){return x.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Hl});var It,Of,as,sE,Do,ls,Po,_f=l(()=>{"use strict";je();It=c(f());Kr();as=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},sE=Symbol("clearAfterUnitTest"),Do=class extends(0,It.withEventBus)(qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Of]=()=>{this.defaultMessages={},this.cache=new It.CacheRegistry,this.listeners={}},this.currentUiLocale=x.getState().uiLocale,x.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=x.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 i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,It.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var s;let n=e.toLowerCase(),o=this.resolveContext(n);return new It.ParametrizedLabelResolver((s=this.defaultMessages[n])!==null&&s!==void 0?s:{},o).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof It.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new as({loadedContexts:e})),this.dispatchEvent(new as({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new as({loadedContexts:[e]})),this.dispatchEvent(new as({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,It.delay)(0).then(()=>i()).catch(()=>null)))}};Of=sE;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Do{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Do{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});ls=window.FluidTopicsI18nService,Po=window.FluidTopicsCustomI18nService});var Rf,jl,Tf=l(()=>{"use strict";Rf=c(f()),jl=class{highlightHtml(e,r,i){(0,Rf.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new jl});var kf,ql,Lf=l(()=>{"use strict";kf=c(f());je();ql=class{isDate(e){var r,i,s,n;return(n=(i=((s=(r=x.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&n!==void 0?n:!1}format(e,r){var i,s,n,o;if(e==null)return"";try{return kf.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:x.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new ql});var If,_r,Kl=l(()=>{"use strict";If=c(f());je();_r=class{static get(e,r,{baseUrl:i,localesConfiguration:s,availableContentLocales:n}=x.getState()){var o;if(r==="all"&&s?.allLanguagesAllowed)r=void 0;else if(!r||n.length>0&&!n.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=n[0])===null||o===void 0?void 0:o.lang}return new If.SearchPlaceConverter(i,e??20,s?.allLanguagesAllowed,r,n)}}});var Mo,$f=l(()=>{"use strict";Kr();Mo=class extends qe{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,s])=>Array.isArray(s)?[i,s.map(n=>typeof n=="object"&&n!=null&&!Array.isArray(n)?this.sortEventArrays(n):n).sort((n,o)=>typeof n=="object"&&n!==null&&"key"in n?n.key.localeCompare(o.key):typeof n=="string"&&typeof o=="string"?n.localeCompare(o):String(n).localeCompare(String(o)))]:typeof s=="object"&&s!==null?[i,this.sortEventArrays(s)]:[i,s]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return document.dispatchEvent(new CustomEvent("ft:analytics:userevents",{detail:e})),this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(s=>(console.info(r),console.debug(s),i)),1e3)}}});var Wl,Df=l(()=>{"use strict";Kl();Wl=class{urlToSearchRequest(e){return _r.get().parse(e)}searchRequestToUrl(e){return _r.get().serialize(e)}};window.FluidTopicsUrlService=new Wl});var Ai,wi,Pf=l(()=>{"use strict";Ai=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Ai.eventName="before-location-change";wi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};wi.eventName="change"});var Gl,Mf,Nf=l(()=>{"use strict";Gl=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))}},Mf=new Gl});var Rr,No,Ff=l(()=>{"use strict";Rr=c(f());Pf();Nf();No=class t extends Rr.WithEventBus{static build(){return new t(window.history,Mf,()=>window.location,!1)}constructor(e,r,i,s){var n,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(n=e.state)===null||n===void 0?void 0:n.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Rr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new wi(this.currentItem())),0)}installProxies(){let e=r=>(i,s,[n,o,a])=>{let u=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),d=new Ai(u);this.dispatchEvent(d);let h=r(),p={...h===this.currentIndex?this.currentState:void 0,...n,index:h,href:d.detail.nextLocation.href};i.apply(s,[p,o,p.href]),this.setCurrentState(p,!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 i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(Ai.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Ai.eventName,e)}addHistoryChangeListener(e){this.addEventListener(wi.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(wi.eventName,e)}currentItem(){return(0,Rr.deepCopy)(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(0,Rr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Rr.deepCopy)(r.find(i=>e(i)))}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(0,Rr.deepCopy)(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 i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let s=e,n=e+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(s=n),n++;return s}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 i;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,n=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=s}}});var Bf=l(()=>{"use strict";Ff();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=No.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)})});var Uf=l(()=>{"use strict";je()});var Fo=l(()=>{"use strict";Fl();Dl();wf();_f();Kr();Tf();Nl();Lf();Kl();$f();Df();Bf();Uf()});var zf,Vf,Ql=l(()=>{"use strict";zf=c(y()),Vf=zf.css`
272
+ `});function Gd(t,e,r){return Ur(t,Fs(e,r))}function Bn(t,e){return typeof t=="function"?t(e):t}function Us(t){return t.split("-")[0]}function zr(t){return t.split("-")[1]}function rl(t){return t==="x"?"y":"x"}function il(t){return t==="y"?"height":"width"}function Un(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function sl(t){return rl(Un(t))}function Qd(t,e,r){r===void 0&&(r=!1);let i=zr(t),s=sl(t),n=il(s),o=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[n]>e.floating[n]&&(o=el(o)),[o,el(o)]}function Xd(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function el(t){let e=Us(t);return Vx[e]+t.slice(e.length)}function Hx(t){var e,r,i,s;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(s=t.left)!=null?s:0}}function Yd(t){return typeof t!="number"?Hx(t):{top:t,right:t,bottom:t,left:t}}function mi(t){let{x:e,y:r,width:i,height:s}=t;return{width:i,height:s,top:r,left:e,right:e+i,bottom:r+s,x:e,y:r}}var Wd,Kd,tl,Fs,Ur,Bs,or,Vx,zn=l(()=>{Wd=["top","right","bottom","left"],Kd=["start","end"],tl=Wd.reduce((t,e)=>t.concat(e,e+"-"+Kd[0],e+"-"+Kd[1]),[]),Fs=Math.min,Ur=Math.max,Bs=Math.round,or=t=>({x:t,y:t}),Vx={left:"right",right:"left",bottom:"top",top:"bottom"}});function Zd(t,e,r){let{reference:i,floating:s}=t,n=Un(e),o=sl(e),a=il(o),u=Us(e),d=n==="y",h=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,m=i[a]/2-s[a]/2,S;switch(u){case"top":S={x:h,y:i.y-s.height};break;case"bottom":S={x:h,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:p};break;case"left":S={x:i.x-s.width,y:p};break;default:S={x:i.x,y:i.y}}let w=zr(e);return w&&(S[o]+=m*(w==="end"?1:-1)*(r&&d?-1:1)),S}async function Jd(t,e){var r;e===void 0&&(e={});let{x:i,y:s,platform:n,rects:o,elements:a,strategy:u}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:S=0}=Bn(e,t),w=Yd(S),E=a[m?p==="floating"?"reference":"floating":p],H=mi(await n.getClippingRect({element:(r=await(n.isElement==null?void 0:n.isElement(E)))==null||r?E:E.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:d,rootBoundary:h,strategy:u})),Z=p==="floating"?{x:i,y:s,width:o.floating.width,height:o.floating.height}:o.reference,_=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),N=await(n.isElement==null?void 0:n.isElement(_))&&await(n.getScale==null?void 0:n.getScale(_))||{x:1,y:1},re=mi(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:Z,offsetParent:_,strategy:u}):Z);return{top:(H.top-re.top+w.top)/N.y,bottom:(re.bottom-H.bottom+w.bottom)/N.y,left:(H.left-re.left+w.left)/N.x,right:(re.right-H.right+w.right)/N.x}}function qx(t,e,r){return(t?[...r.filter(s=>zr(s)===t),...r.filter(s=>zr(s)!==t)]:r.filter(s=>Us(s)===s)).filter(s=>t?zr(s)===t||(e?Xd(s)!==s:!1):!0)}var jx,ep,tp,rp,ip=l(()=>{zn();zn();jx=50,ep=async(t,e,r)=>{let{placement:i="bottom",strategy:s="absolute",middleware:n=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:Jd},u=await(o.isRTL==null?void 0:o.isRTL(e)),d=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:p}=Zd(d,i,u),m=i,S=0,w={};for(let B=0;B<n.length;B++){let E=n[B];if(!E)continue;let{name:H,fn:Z}=E,{x:_,y:N,data:re,reset:_e}=await Z({x:h,y:p,initialPlacement:i,placement:m,strategy:s,middlewareData:w,rects:d,platform:a,elements:{reference:t,floating:e}});h=_??h,p=N??p,w[H]={...w[H],...re},_e&&S<jx&&(S++,typeof _e=="object"&&(_e.placement&&(m=_e.placement),_e.rects&&(d=_e.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):_e.rects),{x:h,y:p}=Zd(d,m,u)),B=-1)}return{x:h,y:p,placement:m,strategy:s,middlewareData:w}};tp=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,s;let{rects:n,middlewareData:o,placement:a,platform:u,elements:d}=e,{crossAxis:h=!1,alignment:p,allowedPlacements:m=tl,autoAlignment:S=!0,...w}=Bn(t,e),B=p!==void 0||m===tl?qx(p||null,S,m):m,E=((r=o.autoPlacement)==null?void 0:r.index)||0,H=B[E];if(H==null)return{};if(a!==H)return{reset:{placement:B[0]}};let Z=await u.detectOverflow(e,w),_=Qd(H,n,await(u.isRTL==null?void 0:u.isRTL(d.floating))),N=[Z[Us(H)],Z[_[0]],Z[_[1]]],re=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:H,overflows:N}],_e=B[E+1];if(_e)return{data:{index:E+1,overflows:re},reset:{placement:_e}};let mt=re.map(Tt=>{let Ls=zr(Tt.placement);return[Tt.placement,Ls&&h?Tt.overflows.slice(0,2).reduce((Tx,kx)=>Tx+kx,0):Tt.overflows[0],Tt.overflows]}).sort((Tt,Ls)=>Tt[1]-Ls[1]),Dn=((s=mt.filter(Tt=>Tt[2].slice(0,zr(Tt[0])?2:3).every(Ls=>Ls<=0))[0])==null?void 0:s[0])||mt[0][0];return Dn!==a?{data:{index:E+1,overflows:re},reset:{placement:Dn}}:{}}}},rp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:s,platform:n}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:Z=>{let{x:_,y:N}=Z;return{x:_,y:N}}},...d}=Bn(t,e),h={x:r,y:i},p=await n.detectOverflow(e,d),m=Un(s),S=rl(m),w=h[S],B=h[m],E=(Z,_)=>Gd(_+p[Z==="y"?"top":"left"],_,_-p[Z==="y"?"bottom":"right"]);o&&(w=E(S,w)),a&&(B=E(m,B));let H=u.fn({...e,[S]:w,[m]:B});return{...H,data:{x:H.x-r,y:H.y-i,enabled:{[S]:o,[m]:a}}}}}}});function Hn(){return typeof window<"u"}function yi(t){return np(t)?(t.nodeName||"").toLowerCase():"#document"}function lt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ar(t){var e;return(e=(np(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function np(t){return Hn()?t instanceof Node||t instanceof lt(t).Node:!1}function qt(t){return Hn()?t instanceof Element||t instanceof lt(t).Element:!1}function wr(t){return Hn()?t instanceof HTMLElement||t instanceof lt(t).HTMLElement:!1}function sp(t){return!Hn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof lt(t).ShadowRoot}function zs(t){let{overflow:e,overflowX:r,overflowY:i,display:s}=Kt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&s!=="inline"&&s!=="contents"}function op(t){return/^(table|td|th)$/.test(yi(t))}function Vs(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}function Xi(t){let e=qt(t)?Kt(t):t;return gi(e.transform)||gi(e.translate)||gi(e.scale)||gi(e.rotate)||gi(e.perspective)||!jn()&&(gi(e.backdropFilter)||gi(e.filter))||Kx.test(e.willChange||"")||Wx.test(e.contain||"")}function ap(t){let e=Vr(t);for(;wr(e)&&!Yi(e);){if(Xi(e))return e;if(Vs(e))return null;e=Vr(e)}return null}function jn(){return nl==null&&(nl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nl}function Yi(t){return/^(html|body|#document)$/.test(yi(t))}function Kt(t){return lt(t).getComputedStyle(t)}function Hs(t){return qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Vr(t){if(yi(t)==="html")return t;let e=t.assignedSlot||t.parentNode||sp(t)&&t.host||Ar(t);return sp(e)?e.host:e}function lp(t){let e=Vr(t);return Yi(e)?(t.ownerDocument||t).body:wr(e)&&zs(e)?e:lp(e)}function Vn(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let s=lp(t),n=s===((i=t.ownerDocument)==null?void 0:i.body),o=lt(s);if(n){let a=qn(o);return e.concat(o,o.visualViewport||[],zs(s)?s:[],a&&r?Vn(a):[])}else return e.concat(s,Vn(s,[],r))}function qn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}var Kx,Wx,gi,nl,ol=l(()=>{Kx=/transform|translate|scale|rotate|perspective|filter/,Wx=/paint|layout|strict|content/,gi=t=>!!t&&t!=="none"});function dp(t){let e=Kt(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,s=wr(t),n=s?t.offsetWidth:r,o=s?t.offsetHeight:i,a=Bs(r)!==n||Bs(i)!==o;return a&&(r=n,i=o),{width:r,height:i,$:a}}function pp(t){return qt(t)?t:t.contextElement}function Zi(t){let e=pp(t);if(!wr(e))return or(1);let r=e.getBoundingClientRect(),{width:i,height:s,$:n}=dp(e),o=(n?Bs(r.width):r.width)/i,a=(n?Bs(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}function hp(t){let e=lt(t);return!jn()||!e.visualViewport?Gx:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Qx(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===lt(t)}function js(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let s=t.getBoundingClientRect(),n=pp(t),o=or(1);e&&(i?qt(i)&&(o=Zi(i)):o=Zi(t));let a=Qx(n,r,i)?hp(n):or(0),u=(s.left+a.x)/o.x,d=(s.top+a.y)/o.y,h=s.width/o.x,p=s.height/o.y;if(n&&i){let m=lt(n),S=qt(i)?lt(i):i,w=m,B=qn(w);for(;B&&S!==w;){let E=Zi(B),H=B.getBoundingClientRect(),Z=Kt(B),_=H.left+(B.clientLeft+parseFloat(Z.paddingLeft))*E.x,N=H.top+(B.clientTop+parseFloat(Z.paddingTop))*E.y;u*=E.x,d*=E.y,h*=E.x,p*=E.y,u+=_,d+=N,w=lt(B),B=qn(w)}}return mi({width:h,height:p,x:u,y:d})}function Kn(t,e){let r=Hs(t).scrollLeft;return e?e.left+r:js(Ar(t)).left+r}function fp(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Kn(t,r),s=r.top+e.scrollTop;return{x:i,y:s}}function Xx(t){let{elements:e,rect:r,offsetParent:i,strategy:s}=t,n=s==="fixed",o=Ar(i),a=e?Vs(e.floating):!1;if(i===o||a&&n)return r;let u={scrollLeft:0,scrollTop:0},d=or(1),h=or(0),p=wr(i);if((p||!n)&&((yi(i)!=="body"||zs(o))&&(u=Hs(i)),p)){let S=js(i);d=Zi(i),h.x=S.x+i.clientLeft,h.y=S.y+i.clientTop}let m=o&&!p&&!n?fp(o,u):or(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-u.scrollLeft*d.x+h.x+m.x,y:r.y*d.y-u.scrollTop*d.y+h.y+m.y}}function Yx(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Zx(t){let e=Hs(t),r=t.ownerDocument.body,i=Ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),n=-e.scrollLeft+Kn(t),o=-e.scrollTop;return Kt(r).direction==="rtl"&&(n+=Ur(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:n,y:o}}function eS(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",s=lt(t),n=Ar(t),o=s.visualViewport,a=n.clientWidth,u=n.clientHeight,d=0,h=0;if(o){let m=!jn()||e==="fixed";i?m||(d=-o.offsetLeft,h=-o.offsetTop):(a=o.width,u=o.height,m&&(d=o.offsetLeft,h=o.offsetTop))}if(Kn(n)<=0){let m=n.ownerDocument,S=m.body,w=getComputedStyle(S),B=m.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,E=Math.abs(n.clientWidth-S.clientWidth-B),H=getComputedStyle(n).scrollbarGutter==="stable both-edges"?E/2:E;H<=Jx&&(a-=H)}return{width:a,height:u,x:d,y:h}}function tS(t,e){let r=js(t,!0,e==="fixed"),i=r.top+t.clientTop,s=r.left+t.clientLeft,n=Zi(t),o=t.clientWidth*n.x,a=t.clientHeight*n.y,u=s*n.x,d=i*n.y;return{width:o,height:a,x:u,y:d}}function cp(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=eS(t,r,e);else if(e==="document")i=Zx(Ar(t));else if(qt(e))i=tS(e,r);else{let s=hp(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return mi(i)}function rS(t,e){let r=e.get(t);if(r)return r;let i=Vn(t,[],!1).filter(a=>qt(a)&&yi(a)!=="body"),s=null,n=Kt(t).position==="fixed",o=n?Vr(t):t;for(;qt(o)&&!Yi(o);){let a=Kt(o),u=Xi(o),d=s?s.position:n?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&a.position==="static")?i=i.filter(p=>p!==o):s=a,o=Vr(o)}return e.set(t,i),i}function iS(t){let{element:e,boundary:r,rootBoundary:i,strategy:s}=t,o=[...r==="clippingAncestors"?Vs(e)?[]:rS(e,this._c):[].concat(r),i],a=cp(e,o[0],s),u=a.top,d=a.right,h=a.bottom,p=a.left;for(let m=1;m<o.length;m++){let S=cp(e,o[m],s);u=Ur(S.top,u),d=Fs(S.right,d),h=Fs(S.bottom,h),p=Ur(S.left,p)}return{width:d-p,height:h-u,x:p,y:u}}function sS(t){let{width:e,height:r}=dp(t);return{width:e,height:r}}function nS(t,e,r){let i=wr(e),s=Ar(e),n=r==="fixed",o=js(t,!0,n,e),a={scrollLeft:0,scrollTop:0},u=or(0);if((i||!n)&&((yi(e)!=="body"||zs(s))&&(a=Hs(e)),i)){let m=js(e,!0,n,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}!i&&s&&(u.x=Kn(s));let d=s&&!i&&!n?fp(s,a):or(0),h=o.left+a.scrollLeft-u.x-d.x,p=o.top+a.scrollTop-u.y-d.y;return{x:h,y:p,width:o.width,height:o.height}}function al(t){return Kt(t).position==="static"}function up(t,e){if(!wr(t)||Kt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ar(t)===r&&(r=r.ownerDocument.body),r}function mp(t,e){let r=lt(t);if(Vs(t))return r;if(!wr(t)){let s=Vr(t);for(;s&&!Yi(s);){if(qt(s)&&!al(s))return s;s=Vr(s)}return r}let i=up(t,e);for(;i&&op(i)&&al(i);)i=up(i,e);return i&&Yi(i)&&al(i)&&!Xi(i)?r:i||ap(t)||r}function aS(t){return Kt(t).direction==="rtl"}var Gx,Jx,oS,Wn,gp,yp,bp,vp=l(()=>{ip();zn();ol();Gx=or(0);Jx=25;oS=async function(t){let e=this.getOffsetParent||mp,r=this.getDimensions,i=await r(t.floating);return{reference:nS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};Wn={convertOffsetParentRelativeRectToViewportRelativeRect:Xx,getDocumentElement:Ar,getClippingRect:iS,getOffsetParent:mp,getElementRects:oS,getClientRects:Yx,getDimensions:sS,getScale:Zi,isElement:qt,isRTL:aS},gp=tp,yp=rp,bp=(t,e,r)=>{let i=new Map,s=r??{},n={...Wn,...s.platform,_c:i};return ep(t,e,{...s,platform:n})}});function xp(t){return lS(t)}function ll(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function lS(t){for(let e=t;e;e=ll(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ll(t);e;e=ll(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Xi(r)||e.tagName==="BODY"))return e}return null}var Sp=l(()=>{ol()});async function Ep(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},bp(t,e,{strategy:i.strategy,platform:{...Wn,getOffsetParent:s=>i.strategy==="fixed"?window:Wn.getOffsetParent(s,xp)},middleware:[yp({crossAxis:!0,boundary:i.strategy==="fixed"?[]:"clippingAncestors"}),gp({allowedPlacements:[i.placement]})]})}var Cp=l(()=>{"use strict";vp();Sp()});function wp(t,e){return(0,Ap.property)({type:Object,converter:cS(t),hasChanged:Ks,...e??{}})}var Ap,cl,cS,Gn=l(()=>{"use strict";Ap=c(P(),1);bi();cl=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},cS=t=>({fromAttribute:e=>{if(e==null)return qs(t);try{return JSON.parse(e)}catch{return qs(t)}},toAttribute:e=>JSON.stringify(e)})});function uS(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Ji(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Ji(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),n=s(t);if(r=n.length,r!==s(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let o=n[i];if(!Ji(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Ji(t,e){try{return uS(t,e)}catch{return!1}}function Ks(t,e){return!Ji(t,e)}function qs(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Qn(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let s=e(i);return s[t]=!0,s}}var bi=l(()=>{"use strict";Gn()});var Op,ul,_p=l(()=>{"use strict";bi();Op=c(P(),1),ul=t=>{let e=t??{};return(r,i)=>{var s;let n={hasChanged:Ks,attribute:!1,...e};(0,Op.property)(n)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(s=e.selector)!==null&&s!==void 0?s:(a=>a[i]),store:e.store})}}});var Xn,dl=l(()=>{"use strict";Xn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==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))}}});var Yn,Rp=l(()=>{"use strict";Yn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let s=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){s(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}});var Jn,Zn,Tp=l(()=>{"use strict";Jn=c(y(),1);Gn();Zn=class extends Jn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return(0,Jn.adoptStyles)(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){cl(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}}});function kp(t,e,...r){var i;let s=t.querySelector(e);for(let n of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return s}var Lp=l(()=>{"use strict"});var vi,ts,Pp,Ip,$p,Mp,Dp,es,ar,Np=l(()=>{"use strict";vi=c(P(),1);Gn();Rp();Tp();Lp();ts=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},Ip=Symbol("constructorPrototype"),$p=Symbol("constructorName"),Mp=Symbol("exportpartsDebouncer"),Dp=Symbol("dynamicDependenciesLoaded"),es=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};es.eventName="exportparts-updated";ar=class extends Zn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Pp]=new Yn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Mp].run(()=>{var s,n;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[$p]=this.constructor.name,this[Ip]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[$p]&&Object.setPrototypeOf(this,this[Ip])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Dp]||(r[Dp]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(es.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(es.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new es)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let n=[...s??[],i];r=kp(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(e){var r,i,s,n,o,a;let u=m=>m!=null&&m.trim().length>0,d=e.filter(u).map(m=>m.trim());if(d.length===0){this.exportparts=void 0;return}let h=new Set;for(let m of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(o=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],w=(a=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],B=[...S,...w].filter(u).map(E=>E.trim());for(let E of B)h.add(E)}if(h.size===0){this.exportparts=void 0;return}let p=[...h.values()].flatMap(m=>d.map(S=>`${m}:${S}--${m}`));this.exportparts=[...this.part,...p].join(", ")}};Pp=Mp;ts([(0,vi.property)()],ar.prototype,"exportpartsPrefix",void 0);ts([wp([])],ar.prototype,"exportpartsPrefixes",void 0);ts([(0,vi.property)({reflect:!0})],ar.prototype,"exportparts",void 0);ts([(0,vi.property)()],ar.prototype,"customStylesheet",void 0);ts([(0,vi.property)()],ar.prototype,"elementToFocus",void 0);ts([(0,vi.state)()],ar.prototype,"useAdoptedStyleSheets",void 0)});function eo(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var to=l(()=>{"use strict"});var Ws,Hr,xi,dS,Fp,Bp=l(()=>{"use strict";Np();to();bi();Ws=Symbol("internalReduxEventsUnsubscribers"),Hr=Symbol("internalStoresUnsubscribers"),xi=Symbol("internalStores"),dS=Qn(Symbol("withRedux"),function(t){var e,r,i;class s extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xi].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[xi].get(o)}addStore(o,a){var u;a=(u=a??o.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(a),this[xi].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[xi].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xi].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let u=this.constructor.getPropertyOptions(a);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:a)){let d=this.getStore(o.store);d&&(o.store?this[Hr].has(o.store):this[Hr].size>0)&&(this[a]=o.selector(d.getState(),this))}})}subscribeToStore(o,a){var u,d;this[Hr].set(o,a.subscribe(()=>this.updateFromStores())),this[Ws].set(o,[]),eo(a)&&(!((u=a.deprecatedKeys)===null||u===void 0)&&u.length&&this.reduxConstructor.reduxProperties.forEach((h,p)=>{this.getStore(h.store)===a&&a.deprecatedKeys.includes(p)&&console.warn("Element",this,"is subscribed to deprecated key",p,"in store",a.name)}),a.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((h,p)=>{if(typeof this[p]=="function"&&(!h.store||a.name===h.store)){let m=S=>this[p](S);a.addEventListener(h.eventName,m),this[Ws].get(o).push(()=>a.removeEventListener(h.eventName,m))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[Hr].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[Hr].has(o)&&this[Hr].get(o)(),this[Hr].delete(o),(a=this[Ws].get(o))===null||a===void 0||a.forEach(u=>u()),this[Ws].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Hr,r=xi,i=Ws,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Fp=class extends dS(ar){}});function Me(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. `}function io(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function hl(t,e,r){if(typeof t!="function")throw new Error(Me(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Me(1));return r(hl)(t,e)}let i=t,s=e,n=new Map,o=n,a=0,u=!1;function d(){o===n&&(o=new Map,n.forEach((E,H)=>{o.set(H,E)}))}function h(){if(u)throw new Error(Me(3));return s}function p(E){if(typeof E!="function")throw new Error(Me(4));if(u)throw new Error(Me(5));let H=!0;d();let Z=a++;return o.set(Z,E),function(){if(H){if(u)throw new Error(Me(6));H=!1,d(),o.delete(Z),n=null}}}function m(E){if(!io(E))throw new Error(Me(7));if(typeof E.type>"u")throw new Error(Me(8));if(typeof E.type!="string")throw new Error(Me(17));if(u)throw new Error(Me(9));try{u=!0,s=i(s,E)}finally{u=!1}return(n=o).forEach(Z=>{Z()}),E}function S(E){if(typeof E!="function")throw new Error(Me(10));i=E,m({type:ro.REPLACE})}function w(){let E=p;return{subscribe(H){if(typeof H!="object"||H===null)throw new Error(Me(11));function Z(){let N=H;N.next&&N.next(h())}return Z(),{unsubscribe:E(Z)}},[Up](){return this}}}return m({type:ro.INIT}),{dispatch:m,subscribe:p,getState:h,replaceReducer:S,[Up]:w}}function fS(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:ro.INIT})>"u")throw new Error(Me(12));if(typeof r(void 0,{type:ro.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function fl(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),s,n;try{fS(r)}catch(o){n=o}return function(a={},u){if(n)throw n;let d=!1,h={};for(let p=0;p<i.length;p++){let m=i[p],S=r[m],w=a[m],B=S(w,u);if(typeof B>"u"){let E=u&&u.type;throw new Error(Me(14))}h[m]=B,d=d||B!==w}return d=d||i.length!==Object.keys(a).length,d?h:a}}function Gs(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function zp(...t){return e=>(r,i)=>{let s=e(r,i),n=()=>{throw new Error(Me(15))},o={getState:s.getState,dispatch:(u,...d)=>n(u,...d)},a=t.map(u=>u(o));return n=Gs(...a)(s.dispatch),{...s,dispatch:n}}}function Vp(t){return io(t)&&"type"in t&&typeof t.type=="string"}var pS,Up,pl,hS,ro,ml=l(()=>{pS=typeof Symbol=="function"&&Symbol.observable||"@@observable",Up=pS,pl=()=>Math.random().toString(36).substring(7).split("").join("."),hS={INIT:`@@redux/INIT${pl()}`,REPLACE:`@@redux/REPLACE${pl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pl()}`},ro=hS});function Wt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}function yt(t){return t?Zp(t)||go(t)||!!t[Hp]||!!t[ao]?.[Hp]||yo(t)||Js(t):!1}function Zp(t){if(!t||!_l(t))return!1;let e=is(t);if(e===null||e===gt[fo])return!0;let r=gt.hasOwnProperty.call(e,ao)&&e[ao];if(r===Object)return!0;if(!rs(r))return!1;let i=jp.get(r);return i===void 0&&(i=Function.toString.call(r),jp.set(r,i)),i===mS}function mo(t,e,r=!0){Zs(t)===0?(r?Reflect.ownKeys(t):gt.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((i,s)=>e(s,i,t))}function Zs(t){let e=t[He];return e?e.type_:go(t)?1:yo(t)?2:Js(t)?3:0}function gS(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function yS(t){let e=+t;return Number.isInteger(e)&&String(e)===t}function Sl(t,e){if(yo(t))return new Map(t);if(Js(t))return new Set(t);if(go(t))return Array[fo].slice.call(t);let r=Zp(t);if(e===!0||e==="class_only"&&!r){let i=gt.getOwnPropertyDescriptors(t);delete i[He];let s=Reflect.ownKeys(i);for(let n=0;n<s.length;n++){let o=s[n],a=i[o];a[no]===!1&&(a[no]=!0,a[vl]=!0),(a.get||a.set)&&(i[o]={[vl]:!0,[no]:!0,[lo]:a[lo],[Qs]:t[o]})}return gt.create(is(t),i)}else{let i=is(t);if(i!==null&&r)return{...t};let s=gt.create(i);return gt.assign(s,t)}}function bo(t,e=!1){return vo(t)||lr(t)||!yt(t)||(Zs(t)>1&&gt.defineProperties(t,{set:so,add:so,clear:so,delete:so}),gt.freeze(t),e&&mo(t,(r,i)=>{bo(i,!0)},!1)),t}function bS(){Wt(2)}function vo(t){return t===null||!_l(t)?!0:gt.isFrozen(t)}function Si(t){let e=Jp[t];return e||Wt(0,t),e}function Wp(t,e){e&&(t.patchPlugin_=Si(El),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Cl(t){Al(t),t.drafts_.forEach(xS),t.drafts_=null}function Al(t){t===Xs&&(Xs=t.parent_)}function xS(t){let e=t[He];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Qp(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[He].modified_&&(Cl(e),Wt(4)),yt(t)&&(t=Xp(e,t));let{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(r[He].base_,t,e)}else t=Xp(e,r);return SS(e,t,!0),Cl(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Yp?t:void 0}function Xp(t,e){if(vo(e))return e;let r=e[He];if(!r)return po(e,t.handledSet_,t);if(!xo(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);ih(r,t)}return r.copy_}function SS(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&bo(e,r)}function th(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}function rh(t,e,r,i){let s=Or(t),n=t.type_;if(i!==void 0&&xl(s,i,n)===e){co(s,i,r,n);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;mo(s,(u,d)=>{if(lr(d)){let h=a.get(d)||[];h.push(u),a.set(d,h)}})}let o=t.draftLocations_.get(e)??ES;for(let a of o)co(s,a,r,n)}function CS(t,e,r){t.callbacks_.push(function(s){let n=e;if(!n||!xo(n,s))return;s.mapSetPlugin_?.fixSetContents(n);let o=Rl(n);rh(t,n.draft_??n,o,r),ih(n,s)})}function ih(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let s=i.getPath(t);s&&i.generatePatches_(t,s,e)}th(t)}}function AS(t,e,r){let{scope_:i}=t;if(lr(r)){let s=r[He];xo(s,i)&&s.callbacks_.push(function(){oo(t);let o=Rl(s);rh(t,r,o,e)})}else yt(r)&&t.callbacks_.push(function(){let n=Or(t);t.type_===3?n.has(r)&&po(r,i.handledSet_,i):xl(n,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&po(xl(t.copy_,e,t.type_),i.handledSet_,i)})}function po(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||lr(t)||e.has(t)||!yt(t)||vo(t)||(e.add(t),mo(t,(i,s)=>{if(lr(s)){let n=s[He];if(xo(n,r)){let o=Rl(n);co(t,i,o,t.type_),th(n)}}else yt(s)&&po(s,e,r)})),t}function wS(t,e){let r=go(t),i={type_:r?1:0,scope_:e?e.scope_:eh(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,n=ho;r&&(s=[i],n=Ys);let{revoke:o,proxy:a}=Proxy.revocable(s,n);return i.draft_=a,i.revoke_=o,[a,i]}function bl(t,e){let r=t[He];return(r?Or(r):t)[e]}function OS(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||!yt(r)||r[He]?!1:t.baseRefs_.has(r)}function _S(t,e,r){let i=sh(e,r);return i?Qs in i?i[Qs]:i.get?.call(t.draft_):void 0}function sh(t,e){if(!(e in t))return;let r=is(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=is(r)}}function wl(t){t.modified_||(t.modified_=!0,t.parent_&&wl(t.parent_))}function oo(t){t.copy_||(t.assigned_=new Map,t.copy_=Sl(t.base_,t.scope_.immer_.useStrictShallowCopy_))}function Ol(t,e,r,i){let[s,n]=yo(e)?Si(uo).proxyMap_(e,r):Js(e)?Si(uo).proxySet_(e,r):wS(e,r);return(r?.scope_??eh()).drafts_.push(s),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?CS(r,n,i):n.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:d}=u;n.modified_&&d&&d.generatePatches_(n,[],u)}),s}function nh(t){return lr(t)||Wt(10,t),oh(t)}function oh(t){if(!yt(t)||vo(t))return t;let e=t[He],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Sl(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Sl(t,!0);let s=r;return Js(r)&&(r=new Set),mo(s,(n,o)=>{co(r,n,oh(o))},i),e&&(e.finalized_=!1),r}var Yp,Hp,He,gt,is,ao,fo,vl,lo,no,Qs,lr,mS,jp,gl,xl,co,go,yo,Js,_l,rs,yl,Or,Rl,so,uo,El,qp,Jp,Kp,Xs,eh,vS,Gp,xo,ES,ho,Ys,RS,TS,a0,kS,Tl,ah=l(()=>{Yp=Symbol.for("immer-nothing"),Hp=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");gt=Object,is=gt.getPrototypeOf,ao="constructor",fo="prototype",vl="configurable",lo="enumerable",no="writable",Qs="value",lr=t=>!!t&&!!t[He];mS=gt[fo][ao].toString(),jp=new WeakMap;gl=(t,e,r=Zs(t))=>r===2?t.has(e):gt[fo].hasOwnProperty.call(t,e),xl=(t,e,r=Zs(t))=>r===2?t.get(e):t[e],co=(t,e,r,i=Zs(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};go=Array.isArray,yo=t=>t instanceof Map,Js=t=>t instanceof Set,_l=t=>typeof t=="object",rs=t=>typeof t=="function",yl=t=>typeof t=="boolean";Or=t=>t.copy_||t.base_,Rl=t=>t.modified_?t.copy_:t.base_;so={[Qs]:bS};uo="MapSet",El="Patches",qp="ArrayMethods",Jp={};Kp=t=>!!Jp[t],eh=()=>Xs,vS=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Kp(uo)?Si(uo):void 0,arrayMethodsPlugin_:Kp(qp)?Si(qp):void 0});Gp=t=>Xs=vS(Xs,t);xo=(t,e)=>t.scope_===e,ES=[];ho={get(t,e){if(e===He)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let s=Or(t);if(!gl(s,e,t.type_))return _S(t,s,e);let n=s[e];if(t.finalized_||!yt(n)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&yS(e))return n;if(n===bl(t.base_,e)||OS(t,e,n)){oo(t);let o=t.type_===1?+e:e,a=Ol(t.scope_,n,t,o);return t.copy_[o]=a}return n},has(t,e){return e in Or(t)},ownKeys(t){return Reflect.ownKeys(Or(t))},set(t,e,r){let i=sh(Or(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let s=bl(Or(t),e),n=s?.[He];if(n&&n.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(gS(r,s)&&(r!==void 0||gl(t.base_,e,t.type_)))return!0;oo(t),wl(t)}return t.copy_[e]===r&&(r!==void 0||gl(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),AS(t,e,r)),!0},deleteProperty(t,e){return oo(t),bl(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),wl(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Or(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[no]:!0,[vl]:t.type_!==1||e!=="length",[lo]:i[lo],[Qs]:r[e]}},defineProperty(){Wt(11)},getPrototypeOf(t){return is(t.base_)},setPrototypeOf(){Wt(12)}},Ys={};for(let t in ho){let e=ho[t];Ys[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Ys.deleteProperty=function(t,e){return Ys.set.call(this,t,e,void 0)};Ys.set=function(t,e,r){return ho.set.call(this,t[0],e,r,t[0])};RS=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(rs(e)&&!rs(r)){let n=r;r=e;let o=this;return function(u=n,...d){return o.produce(u,h=>r.call(this,h,...d))}}rs(r)||Wt(6),i!==void 0&&!rs(i)&&Wt(7);let s;if(yt(e)){let n=Gp(this),o=Ol(n,e,void 0),a=!0;try{s=r(o),a=!1}finally{a?Cl(n):Al(n)}return Wp(n,i),Qp(s,n)}else if(!e||!_l(e)){if(s=r(e),s===void 0&&(s=e),s===Yp&&(s=void 0),this.autoFreeze_&&bo(s,!0),i){let n=[],o=[];Si(El).generateReplacementPatches_(e,s,{patches_:n,inversePatches_:o}),i(n,o)}return s}else Wt(1,e)},this.produceWithPatches=(e,r)=>{if(rs(e))return(o,...a)=>this.produceWithPatches(o,u=>e(u,...a));let i,s;return[this.produce(e,r,(o,a)=>{i=o,s=a}),i,s]},yl(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),yl(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),yl(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){yt(t)||Wt(8),lr(t)&&(t=nh(t));let e=Gp(this),r=Ol(e,t,void 0);return r[He].isManual_=!0,Al(e),r}finishDraft(t,e){let r=t&&t[He];(!r||!r.isManual_)&&Wt(9);let{scope_:i}=r;return Wp(i,e),Qp(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let s=e[r];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}r>-1&&(e=e.slice(r+1));let i=Si(El).applyPatches_;return lr(t)?i(t,e):this.produce(t,s=>i(s,e))}};TS=globalThis.Iterator,a0=typeof TS?.from=="function",kS=new RS,Tl=kS.produce});function lh(t){return({dispatch:r,getState:i})=>s=>n=>typeof n=="function"?n(r,i,t):s(n)}var ch,uh,dh=l(()=>{ch=lh(),uh=lh});function tn(t,e){function r(...i){if(e){let s=e(...i);if(!s)throw new Error(cr(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>i!=null&&i.type===t&&Vp(i),r}function ph(t){return yt(t)?Tl(t,()=>{}):t}function So(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function IS(t){return typeof t=="boolean"}function mh(t){let e=$S(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:n=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},u;if(typeof r=="function")u=r;else if(io(r))u=fl(r);else throw new Error(cr(1));let d;typeof i=="function"?d=i(e):d=e();let h=Gs;s&&(h=LS({trace:!1,...typeof s=="object"&&s}));let p=zp(...d),m=NS(p),S=typeof a=="function"?a(m):m(),w=h(...S);return hl(u,o,w)}function gh(t){let e={},r=[],i,s={addCase(n,o){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(cr(28));if(a in e)throw new Error(cr(29));return e[a]=o,s},addAsyncThunk(n,o){return o.pending&&(e[n.pending.type]=o.pending),o.rejected&&(e[n.rejected.type]=o.rejected),o.fulfilled&&(e[n.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:n.settled,reducer:o.settled}),s},addMatcher(n,o){return r.push({matcher:n,reducer:o}),s},addDefaultCase(n){return i=n,s}};return t(s),[e,r,i]}function FS(t){return typeof t=="function"}function BS(t,e){let[r,i,s]=gh(e),n;if(FS(t))n=()=>ph(t());else{let u=ph(t);n=()=>u}function o(u,d,h){if(lr(u)){let p=d(u,h);return p===void 0?u:p}else{if(yt(u))return Tl(u,p=>d(p,h));{let p=d(u,h);if(p===void 0){if(u===null)return u;throw new Error(cr(9))}return p}}}function a(u=n(),d){let h=r[d.type],p;for(let{matcher:m,reducer:S}of i)m(d)&&S&&(p??=[]).push(S);if(!h&&!p)return s?o(u,s,d):u;if(h&&(u=o(u,h,d)),p)for(let m of p)u=o(u,m,d);return u}return a.getInitialState=n,a}function zS(t,e){return`${t}/${e}`}function VS({creators:t}={}){let e=t?.asyncThunk?.[US];return function(i){let{name:s,reducerPath:n=s}=i;if(!s)throw new Error(cr(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(jS()):i.reducers)||{},a=Object.keys(o),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(_,N){let re=typeof _=="string"?_:_.type;if(!re)throw new Error(cr(12));if(re in u.sliceCaseReducersByType)throw new Error(cr(13));return u.sliceCaseReducersByType[re]=N,d},addMatcher(_,N){return u.sliceMatchers.push({matcher:_,reducer:N}),d},exposeAction(_,N){return u.actionCreators[_]=N,d},exposeCaseReducer(_,N){return u.sliceCaseReducersByName[_]=N,d}};a.forEach(_=>{let N=o[_],re={reducerName:_,type:zS(s,_),createNotation:typeof i.reducers=="function"};KS(N)?GS(re,N,d,e):qS(re,N,d)});function h(){let[_={},N=[],re=void 0]=typeof i.extraReducers=="function"?gh(i.extraReducers):[i.extraReducers],_e={..._,...u.sliceCaseReducersByType};return BS(i.initialState,mt=>{for(let Ve in _e)mt.addCase(Ve,_e[Ve]);for(let Ve of u.sliceMatchers)mt.addMatcher(Ve.matcher,Ve.reducer);for(let Ve of N)mt.addMatcher(Ve.matcher,Ve.reducer);re&&mt.addDefaultCase(re)})}let p=_=>_,m=new Map,S=new WeakMap,w;function B(_,N){return w||(w=h()),w(_,N)}function E(){return w||(w=h()),w.getInitialState()}function H(_,N=!1){function re(mt){let Ve=mt[_];return typeof Ve>"u"&&N&&(Ve=So(S,re,E)),Ve}function _e(mt=p){return So(So(m,N,()=>new WeakMap),mt,()=>{let Ve={};for(let[Dn,Tt]of Object.entries(i.selectors??{}))Ve[Dn]=HS(Tt,mt,()=>So(S,mt,E),N);return Ve})}return{reducerPath:_,getSelectors:_e,get selectors(){return _e(re)},selectSlice:re}}let Z={name:s,reducer:B,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:E,...H(n),injectInto(_,{reducerPath:N,...re}={}){let _e=N??n;return _.inject({reducerPath:_e,reducer:B},re),{...Z,...H(_e,!0)}}};return Z}}function HS(t,e,r,i){function s(n,...o){let a=e(n);return typeof a>"u"&&i&&(a=r()),t(a,...o)}return s.unwrapped=t,s}function jS(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function qS({type:t,reducerName:e,createNotation:r},i,s){let n,o;if("reducer"in i){if(r&&!WS(i))throw new Error(cr(17));n=i.reducer,o=i.prepare}else n=i;s.addCase(t,n).exposeCaseReducer(e,n).exposeAction(e,o?tn(t,o):tn(t))}function KS(t){return t._reducerDefinitionType==="asyncThunk"}function WS(t){return t._reducerDefinitionType==="reducerWithPrepare"}function GS({type:t,reducerName:e},r,i,s){if(!s)throw new Error(cr(18));let{payloadCreator:n,fulfilled:o,pending:a,rejected:u,settled:d,options:h}=r,p=s(t,n,h);i.exposeAction(e,p),o&&i.addCase(p.fulfilled,o),a&&i.addCase(p.pending,a),u&&i.addCase(p.rejected,u),d&&i.addMatcher(p.settled,d),i.exposeCaseReducer(e,{fulfilled:o||Eo,pending:a||Eo,rejected:u||Eo,settled:d||Eo})}function Eo(){}function cr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var LS,fh,$S,DS,hh,PS,MS,NS,US,yh,bh,vh,xh,m0,g0,y0,b0,Sh,kl,QS,v0,XS,Eh=l(()=>{ml();ah();dh();ml();LS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gs:Gs.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;fh=class en extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,en.prototype)}static get[Symbol.species](){return en}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new en(...e[0].concat(this)):new en(...e.concat(this))}};$S=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:n=!0}=e??{},o=new fh;return r&&(IS(r)?o.push(ch):o.push(uh(r.extraArgument))),o},DS="RTK_autoBatch",hh=t=>e=>{setTimeout(e,t)},PS=(t,e,r)=>i=>{let s=!1,n,o,a=()=>{s||(s=!0,e?.(n),clearTimeout(o),i())};n=t(a),o=setTimeout(a,r)},MS=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),s=!0,n=!1,o=!1,a=new Set,u=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?PS(window.requestAnimationFrame,window.cancelAnimationFrame,100):hh(10):t.type==="callback"?t.queueNotification:hh(t.timeout),d=()=>{o=!1,n&&(n=!1,a.forEach(h=>h()))};return Object.assign({},i,{subscribe(h){let p=()=>s&&h(),m=i.subscribe(p);return a.add(h),()=>{m(),a.delete(h)}},dispatch(h){try{return s=!h?.meta?.[DS],n=!s,n&&(o||(o=!0,u(d))),i.dispatch(h)}finally{s=!0}}})},NS=t=>function(r){let{autoBatch:i=!0}=r??{},s=new fh(t);return i&&s.push(MS(typeof i=="object"?i:void 0)),s};US=Symbol.for("rtk-slice-createasyncthunk");yh=VS();bh="listener",vh="completed",xh="cancelled",m0=`task-${xh}`,g0=`task-${vh}`,y0=`${bh}-${xh}`,b0=`${bh}-${vh}`,{assign:Sh}=Object,kl="listenerMiddleware",QS=Sh(tn(`${kl}/add`),{withTypes:()=>QS}),v0=tn(`${kl}/removeAll`),XS=Sh(tn(`${kl}/remove`),{withTypes:()=>XS})});var YS,Co,Ch=l(()=>{"use strict";bi();YS=Qn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Co=class extends YS(Object){}});var Ah,wh=l(()=>{"use strict";Eh();to();dl();Ch();bi();window.ftReduxStores||(window.ftReduxStores={});Ah=class t extends Co{static get(e){var r;let i=typeof e=="string"?e:e.name,s=typeof e=="string"?void 0:e,n=window.ftReduxStores[i];if(eo(n))return n;if(s==null)return;let o=yh({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=mh({reducer:(u,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let h=qs(o.getInitialState());for(let p of d.keeping)h[p]=(u??h)[p];return h}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...d.overwrites};return o.reducer(u,d)}});return window.ftReduxStores[s.name]=new t(o,a,s.eventBus,s.deprecatedKeys)}constructor(e,r,i,s){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=s,this.isFtReduxStore=!0,this.commands=new Xn,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,u)=>{let d=a,h=o[d];return h?(...p)=>{let m=h(...p.map(n));return this.reduxStore.dispatch(m),m}:p=>{let m=d,S=this.getState()[m];Ji(S,p)||this.setState({[m]:n(p)})}}}),this.eventBus=i??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}}});var Oh=l(()=>{"use strict";bi()});var _h=l(()=>{"use strict"});var Rh=l(()=>{"use strict";_p();dl();Bp();wh();to();Oh();_h()});var Ao,Th=l(()=>{"use strict";Ao=class{static format(e,r,i,s,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,s,!!n)):this.getIntlDateTime(e,r,i,s,!!n)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,s,n){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return n?u:s?`${a} ${u}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var wo,ZS,ur,rn,JS,x,je=l(()=>{"use strict";wo=c(f()),ZS="ft-app-info",ur=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ur.eventName="authentication-change";rn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};rn.eventName="ui-locale-changed";JS={session:(t,e)=>{(0,wo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>x.dispatchEvent(new ur(e.payload)),0))}},x=wo.FtReduxStore.get({name:ZS,reducers:JS,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}})});var Ll,kh,Oo,W0,Lh=l(()=>{"use strict";Ll=c(P());Rh();Th();je();kh=c(f()),Oo=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},W0=(0,kh.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(x)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,n;return((n=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1)?a=>Ao.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Oo([(0,Ll.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Oo([(0,Ll.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Oo([ul({store:x.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],e.prototype,"metadataDescriptors",void 0),Oo([ul({store:x.name})],e.prototype,"uiLocale",void 0),e})});var Il=l(()=>{});var Ih,$h,Dh,jr,Ph,Mh,Nh,Ei,Fh,Bh,Uh,zh,Vh,Hh,jh,qh,Kh,_o,Wh,Gh,ss,Qh,Ro,Xh,Yh,dr,ns,Zh,pe,Lt,Jh,$l=l(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ih||(Ih={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})($h||($h={}));(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"})(Dh||(Dh={}));(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"})(jr||(jr={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ph||(Ph={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Mh||(Mh={}));(function(t){t.PUBLISHED="PUBLISHED",t.AI="AI"})(Nh||(Nh={}));(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"})(Ei||(Ei={}));(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Fh||(Fh={}));(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Bh||(Bh={}));(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",t.DOC_DIFF="DOC_DIFF"})(Uh||(Uh={}));(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"})(zh||(zh={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Vh||(Vh={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Hh||(Hh={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(jh||(jh={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(qh||(qh={}));(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"})(Kh||(Kh={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_o||(_o={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Wh||(Wh={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Gh||(Gh={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ss||(ss={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Qh||(Qh={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ro||(Ro={}));(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"})(Xh||(Xh={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Yh||(Yh={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(dr||(dr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ns||(ns={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Zh||(Zh={}));(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"})(pe||(pe={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Lt||(Lt={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Jh||(Jh={}))});var ef,tf,rf,sf,nf,of,af,lf,cf,uf,df,pf,hf=l(()=>{(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(ef||(ef={}));(function(t){t.VALID="VALID",t.INVALID="INVALID"})(tf||(tf={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(rf||(rf={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(sf||(sf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(nf||(nf={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(of||(of={}));(function(t){t.CHAT="CHAT",t.COMPLETION="COMPLETION",t.RAG="RAG",t.AGENT="AGENT"})(af||(af={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(lf||(lf={}));(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(cf||(cf={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(uf||(uf={}));(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(df||(df={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(pf||(pf={}))});var ff=l(()=>{$l();hf()});function mf(t,e){return t===e||(eE[t]??[]).some(r=>mf(r,e))}function sn(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(i=>mf(i,e))}function gf(t,...e){return t==null?!1:e.some(r=>sn(t,r))}var eE,yf=l(()=>{$l();eE={[pe.PERSONAL_BOOK_SHARE_USER]:[pe.PERSONAL_BOOK_USER],[pe.HTML_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.PDF_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.KHUB_ADMIN]:[pe.CONTENT_PUBLISHER],[pe.ADMIN]:[pe.KHUB_ADMIN,pe.USERS_ADMIN,pe.PORTAL_ADMIN,pe.BEHAVIOR_DATA_USER],[pe.GENERATIVE_AI_EXPORT_USER]:[pe.GENERATIVE_AI_USER]}});var bf=l(()=>{});var qr=l(()=>{Il();ff();yf();bf();Il()});var Ci,Dl=l(()=>{"use strict";je();Ci=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=x.getState(),s=e??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let s=x.subscribe(()=>{i=t.get(e),i&&(s(),r(i))})}})}}});var os,Pl=l(()=>{"use strict";Dl();os=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ci.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ci.await()}}});var Ml,qe,Kr=l(()=>{"use strict";Ml=c(f());Pl();qe=class extends os{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(n,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[u])=>a.localeCompare(u)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new Ml.CacheRegistry,this.cache=e?s.commonCache:new Ml.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}}});var To,Nl=l(()=>{"use strict";je();qr();Kr();To=class extends qe{async listMySearches(){let{session:e}=x.getState();return sn(e,pe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}}});var ko,Fl=l(()=>{"use strict";je();Kr();ko=class extends qe{async listMyBookmarks(){let e=x.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}}});var Lo,vf=l(()=>{"use strict";je();Kr();Lo=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/api/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(`/api/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}}});var Io,xf=l(()=>{"use strict";Kr();je();Io=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await(await this.awaitApi).get("/api/user/assets/labels")).labels,this.CACHE_DURATION):[]}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}}});var $o,tE,rE,Cf,Bl,Ul,Sf,Ef,Xe,zl,iE,Vl=l(()=>{"use strict";qr();$o=c(f());Nl();Fl();je();vf();xf();tE="ft-user-assets",rE={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Lt).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:i,asset:s}=e.payload;Ul(t,r,[...Bl(t,r),s]),Sf(t,r,1,i),Ef(t,s)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Ul(t,r,Bl(t,r).map(s=>s.id===i.id?i:s)),Ef(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:s}=e.payload;Ul(t,r,Bl(t,r).filter(n=>n.id!==s)),Sf(t,r,-1,i)}},Cf={[Lt.SEARCHES]:"savedSearches",[Lt.BOOKMARKS]:"bookmarks",[Lt.BOOKS]:void 0,[Lt.COLLECTIONS]:void 0},Bl=(t,e)=>{var r;let i=Cf[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Ul=(t,e,r)=>{let i=Cf[e];i&&(t[i]=r)},Sf=(t,e,r,i)=>{let s=t.assetCounts.allAsset[e];if(s!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,s+r),e===Lt.BOOKMARKS&&i)){let n=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},Ef=(t,e)=>{let r=t.assetLabels.map(s=>s.title),i=e.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));t.assetLabels.push(...i)},Xe=$o.FtReduxStore.get({name:tE,reducers:rE,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),zl=class{constructor(e=new Lo,r=new Io){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=x.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ko,this.savedSearchesService=new To,x.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=x.getState();(0,$o.deepEqual)((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(),Xe.actions.clearAssetCount(),Xe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Xe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Xe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Xe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Xe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Xe.getState().assetCounts.allAsset[e]!==r.count&&Xe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Xe.getState().assetCounts.bookmarkByMap[e]!==r.count&&Xe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Xe.getState().assetCounts.bookmarkByMap).length!==0;e===Lt.BOOKMARKS&&r&&Xe.actions.clearBookmarkCountByMap(),Xe.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;Xe.actions.bookmarks(r)}}},iE=new zl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=iE)});var Af=l(()=>{"use strict";qr();Vl()});var Hl,wf=l(()=>{"use strict";je();Hl=class{addCommand(e,r=!1){x.commands.add(e,r)}consumeCommand(e){return x.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Hl});var It,Of,as,sE,Do,ls,Po,_f=l(()=>{"use strict";je();It=c(f());Kr();as=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},sE=Symbol("clearAfterUnitTest"),Do=class extends(0,It.withEventBus)(qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Of]=()=>{this.defaultMessages={},this.cache=new It.CacheRegistry,this.listeners={}},this.currentUiLocale=x.getState().uiLocale,x.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=x.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 i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,It.deepEqual)(this.defaultMessages[e],s)||(this.defaultMessages[e]=s,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var s;let n=e.toLowerCase(),o=this.resolveContext(n);return new It.ParametrizedLabelResolver((s=this.defaultMessages[n])!==null&&s!==void 0?s:{},o).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(s){!(s instanceof It.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var s;return(s=this.listeners[e])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new as({loadedContexts:e})),this.dispatchEvent(new as({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new as({loadedContexts:[e]})),this.dispatchEvent(new as({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,It.delay)(0).then(()=>i()).catch(()=>null)))}};Of=sE;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Do{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Do{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});ls=window.FluidTopicsI18nService,Po=window.FluidTopicsCustomI18nService});var Rf,jl,Tf=l(()=>{"use strict";Rf=c(f()),jl=class{highlightHtml(e,r,i){(0,Rf.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new jl});var kf,ql,Lf=l(()=>{"use strict";kf=c(f());je();ql=class{isDate(e){var r,i,s,n;return(n=(i=((s=(r=x.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&n!==void 0?n:!1}format(e,r){var i,s,n,o;if(e==null)return"";try{return kf.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:x.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new ql});var If,_r,Kl=l(()=>{"use strict";If=c(f());je();_r=class{static get(e,r,{baseUrl:i,localesConfiguration:s,availableContentLocales:n}=x.getState()){var o;if(r==="all"&&s?.allLanguagesAllowed)r=void 0;else if(!r||n.length>0&&!n.some(a=>a.lang===r)){let a=s?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=n[0])===null||o===void 0?void 0:o.lang}return new If.SearchPlaceConverter(i,e??20,s?.allLanguagesAllowed,r,n)}}});var Mo,$f=l(()=>{"use strict";Kr();Mo=class extends qe{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([i,s])=>Array.isArray(s)?[i,s.map(n=>typeof n=="object"&&n!=null&&!Array.isArray(n)?this.sortEventArrays(n):n).sort((n,o)=>typeof n=="object"&&n!==null&&"key"in n?n.key.localeCompare(o.key):typeof n=="string"&&typeof o=="string"?n.localeCompare(o):String(n).localeCompare(String(o)))]:typeof s=="object"&&s!==null?[i,this.sortEventArrays(s)]:[i,s]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return document.dispatchEvent(new CustomEvent("ft:analytics:userevents",{detail:e})),this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(s=>(console.info(r),console.debug(s),i)),1e3)}}});var Wl,Df=l(()=>{"use strict";Kl();Wl=class{urlToSearchRequest(e){return _r.get().parse(e)}searchRequestToUrl(e){return _r.get().serialize(e)}};window.FluidTopicsUrlService=new Wl});var Ai,wi,Pf=l(()=>{"use strict";Ai=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Ai.eventName="before-location-change";wi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};wi.eventName="change"});var Gl,Mf,Nf=l(()=>{"use strict";Gl=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))}},Mf=new Gl});var Rr,No,Ff=l(()=>{"use strict";Rr=c(f());Pf();Nf();No=class t extends Rr.WithEventBus{static build(){return new t(window.history,Mf,()=>window.location,!1)}constructor(e,r,i,s){var n,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(n=e.state)===null||n===void 0?void 0:n.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Rr.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new wi(this.currentItem())),0)}installProxies(){let e=r=>(i,s,[n,o,a])=>{let u=new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),d=new Ai(u);this.dispatchEvent(d);let h=r(),p={...h===this.currentIndex?this.currentState:void 0,...n,index:h,href:d.detail.nextLocation.href};i.apply(s,[p,o,p.href]),this.setCurrentState(p,!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 i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(Ai.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Ai.eventName,e)}addHistoryChangeListener(e){this.addEventListener(wi.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(wi.eventName,e)}currentItem(){return(0,Rr.deepCopy)(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(0,Rr.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Rr.deepCopy)(r.find(i=>e(i)))}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(0,Rr.deepCopy)(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 i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let s=e,n=e+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(s=n),n++;return s}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 i;if(!this.hasState(e))return!1;let s=r??this.currentState.majorStateId,n=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=s}}});var Bf=l(()=>{"use strict";Ff();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=No.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)})});var Uf=l(()=>{"use strict";je()});var Fo=l(()=>{"use strict";Fl();Dl();wf();_f();Kr();Tf();Nl();Lf();Kl();$f();Df();Bf();Uf()});var zf,Vf,Ql=l(()=>{"use strict";zf=c(y()),Vf=zf.css`
273
273
  `});var Hf=l(()=>{"use strict"});function jf(t,e){let{authenticationRequired:r,session:i}=x.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var qf=l(()=>{"use strict";je()});var Bo,Kf=l(()=>{"use strict";Pl();Bo=class extends os{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}}});var pr,Xl,Oi,Yl=l(()=>{"use strict";pr=c(f());je();qf();Fo();qr();Kf();Xl=class t extends pr.FtStateManager{static build(e){return new t(x,e)}constructor(e,r){super(),this.store=e,this.cache=new pr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Bo,this.knownContexts=new pr.AbstractRegistry,this.knownCustomComponents=new pr.AbstractRegistry,this.cleanSessionDebouncer=new pr.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new pr.Debouncer(500),this.apiProvider=r??(()=>Ci.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(ur.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(ur.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>jf(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new rn(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return gf(x.getState().session,...e)}},Oi=Xl.build()});var _i,nn=l(()=>{_i=class extends Event{constructor(e,r,i,s){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=s??!1}}});var Wf=l(()=>{});var Zl=l(()=>{nn();});var Gf=l(()=>{});var Jl=l(()=>{nn();Gf();});var on,Qf=l(()=>{nn();on=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:s,callbackRef:n}of i){let o=s.deref(),a=n.deref();o===void 0||a===void 0||o.dispatchEvent(new _i(e.context,o,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,s=this.pendingContextRequests.get(e.context);s===void 0&&this.pendingContextRequests.set(e.context,s={callbacks:new WeakMap,requests:[]});let n=s.callbacks.get(r);n===void 0&&s.callbacks.set(r,n=new WeakSet),n.has(i)||(n.add(i),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}}});var Xf=l(()=>{Jl();});var Yf=l(()=>{Zl();});var Zf=l(()=>{nn();Wf();Zl();Jl();Qf();Xf();Yf()});var Jf,Ye,Ri,Re,ue,ec=l(()=>{"use strict";Jf=c(y()),Ye=c(P()),Ri=c(f());Ql();Fo();Yl();Zf();Re=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},ue=class extends Ri.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Oi,this.contextRoot=new on}render(){return Jf.html`
274
274
  <slot></slot>
275
275
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>ls.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};ue.elementDefinitions={};ue.styles=Vf;Re([(0,Ye.property)()],ue.prototype,"baseUrl",void 0);Re([(0,Ye.property)()],ue.prototype,"tenantId",void 0);Re([(0,Ye.property)()],ue.prototype,"apiIntegrationIdentifier",void 0);Re([(0,Ye.property)()],ue.prototype,"apiIntegrationAppVersion",void 0);Re([(0,Ye.property)()],ue.prototype,"uiLocale",void 0);Re([(0,Ri.jsonProperty)(null)],ue.prototype,"availableUiLocales",void 0);Re([(0,Ri.jsonProperty)(null)],ue.prototype,"metadataConfiguration",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"editorMode",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"noCustom",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"openExternalDocumentInNewTab",void 0);Re([(0,Ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ue.prototype,"noCustomComponent",void 0);Re([(0,Ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ue.prototype,"noCustomCode",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"withManualResources",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"navigatorOnline",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"forcedOffline",void 0);Re([(0,Ye.property)({type:Boolean})],ue.prototype,"authenticationRequired",void 0);Re([(0,Ri.jsonProperty)([])],ue.prototype,"messageContexts",void 0);Re([(0,Ri.jsonProperty)(void 0)],ue.prototype,"session",void 0)});var em,tm=l(()=>{"use strict";ec();em={"ft-app-context":ue}});var rm,im=l(()=>{"use strict";rm=c(f());tm();(0,rm.customElements)(em)});var Gt=l(()=>{"use strict";Lh();je();Vl();Af();Fo();Ql();Hf();ec();Yl();im()});var tc,cs,Uo=l(()=>{"use strict";tc=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,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},cs=new tc});var us,sm,aE,ln,nm,om,zo,an,ct,Vo,Ho,cn=l(()=>{"use strict";us=c(f());Gt();sm=c(P());Uo();aE=function(t,e,r,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(s<3?o(n):s>3?o(e,r,n):o(e,r))||n);return s>3&&n&&Object.defineProperty(e,r,n),n},ln=Symbol("i18nAttributes"),nm=Symbol("i18nListAttributes"),om=Symbol("i18nProperties"),zo=Symbol("i18nContexts"),an=Symbol("i18nUnsubs"),ct=(0,us.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(n){return n??this.useCustomMessageContexts?Po:ls}i18n(n){let{context:o,key:a,message:u}=n,{custom:d,args:h,argsProvider:p}=n;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,d);let m=h??(p?p(this):[]);return this.getI18nService(d).resolveMessage(o,a,...m)}return u}async awaitI18n(n){let{context:o,custom:a}=n;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(n)}customI18n(n,o){if(cs.isI18nKey(n)){let[a,u]=n.split(".");return this.i18n({custom:!0,context:a,key:u,...o})||n}return n}firstUpdated(n){super.firstUpdated(n),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(n){super.update(n),this.updateI18nAttributes((o,a,u)=>n.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(n){this.updateI18nAttributes((o,a,u)=>{var d;return((d=u?.context)===null||d===void 0?void 0:d.toLowerCase())===n}),this.updateI18nProperties(o=>o.context.toLowerCase()===n),this.requestUpdate()}updateI18nAttributes(n){var o,a;let u=this,d=(h,p,m)=>m?.context&&m.key&&n(h,p,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(o=this[ln])===null||o===void 0||o.forEach((h,p)=>u[p]=d(h,p,u[p])),(a=this[nm])===null||a===void 0||a.forEach((h,p)=>{var m;return u[p]=(m=u[p])===null||m===void 0?void 0:m.map(S=>d(h,p,S))})}updateI18nProperties(n){var o;(o=this[om])===null||o===void 0||o.forEach((a,u)=>{n(a,u)&&(this[u]=this.i18n(a))})}addI18nMessages(n,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(n,o,a)}addI18nContext(n,o,a){let u=(typeof n=="string"?n:n.name).toLowerCase();a=typeof n=="string"?a:n.custom,this[zo].set(u,{isCustomContext:a}),this[an].has(u)||this[an].set(u,this.getI18nService(a).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(a).prepareContext(u,o)}hasI18nContext(n){return this[zo].has(n.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zo].forEach((n,o)=>this.addI18nContext(o,void 0,n.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[an].forEach(n=>n()),this[an].clear()}}return e=zo,r=an,aE([(0,sm.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Vo=class extends ct(us.FtLitElement){},Ho=class extends ct(us.FtLitElementRedux){}});var rc,lE,am=l(()=>{"use strict";Uo();rc=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?cs.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},lE=new rc});var lm,Ti,jo=l(()=>{"use strict";cn();lm=c(f());Uo();am();Ti=(t,e)=>(r,i)=>{var s;r.constructor.createProperty(i,{type:Object,hasChanged:lm.hasChanged,converter:cs,...e}),r[ln]=(s=r[ln])!==null&&s!==void 0?s:new Map,r[ln].set(i,t??{})}});var $t,cm=l(()=>{"use strict";Gt();$t=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Po:ls}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,s)=>{let n=s;return o=>({context:this.name,key:n,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(i,s)=>(...n)=>this.service.resolveMessage(this.name,s,...n)}),this.rawMessages=new Proxy({},{get:(i,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(i,s)=>()=>s}),this.attributes=new Proxy({},{get:(i,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}}});var um=l(()=>{"use strict";cn()});var dm,pm,ic=l(()=>{"use strict";dm=c(y()),pm=dm.css`