@fluid-topics/ftds-popover 2.1.5 → 2.1.6

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.
@@ -838,7 +838,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
838
838
  position: relative;
839
839
  word-break: break-word;
840
840
  }
841
- `;var Ns=["top","right","bottom","left"],ws=["start","end"],On=Ns.reduce((e,t)=>e.concat(t,t+"-"+ws[0],t+"-"+ws[1]),[]),Mr=Math.min,nt=Math.max,kr=Math.round;var _e=e=>({x:e,y:e}),L4={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(e,t,o){return nt(e,Mr(t,o))}function fo(e,t){return typeof e=="function"?e(t):e}function tr(e){return e.split("-")[0]}function at(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function Nn(e){return e==="y"?"height":"width"}function po(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function _n(e){return wn(po(e))}function _s(e,t,o){o===void 0&&(o=!1);let n=at(e),a=_n(e),i=Nn(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=An(s)),[s,An(s)]}function Ms(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function An(e){let t=tr(e);return L4[t]+e.slice(t.length)}function A4(e){return{top:0,right:0,bottom:0,left:0,...e}}function ks(e){return typeof e!="number"?A4(e):{top:e,right:e,bottom:e,left:e}}function Ct(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function Ts(e,t,o){let{reference:n,floating:a}=e,i=po(t),s=_n(t),l=Nn(s),u=tr(t),p=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,v;switch(u){case"top":v={x:m,y:n.y-a.height};break;case"bottom":v={x:m,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}switch(at(t)){case"start":v[s]-=y*(o&&p?-1:1);break;case"end":v[s]+=y*(o&&p?-1:1);break}return v}async function zs(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=fo(t,e),x=ks(v),O=l[y?g==="floating"?"reference":"floating":g],A=Ct(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(O)))==null||o?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),T=await(i.isElement==null?void 0:i.isElement(M))?await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1}:{x:1,y:1},U=Ct(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(A.top-U.top+x.top)/T.y,bottom:(U.bottom-A.bottom+x.bottom)/T.y,left:(A.left-U.left+x.left)/T.x,right:(U.right-A.right+x.right)/T.x}}var O4=50,Is=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:zs},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=Ts(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let O=i[S];if(!O)continue;let{name:A,fn:N}=O,{x:M,y:T,data:U,reset:W}=await N({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});m=M??m,g=T??g,x[A]={...x[A],...U},W&&v<O4&&(v++,typeof W=="object"&&(W.placement&&(y=W.placement),W.rects&&(p=W.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):W.rects),{x:m,y:g}=Ts(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function R4(e,t,o){return(e?[...o.filter(a=>at(a)===e),...o.filter(a=>at(a)!==e)]:o.filter(a=>tr(a)===a)).filter(a=>e?at(a)===e||(t?Ms(a)!==a:!1):!0)}var Ps=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=On,autoAlignment:v=!0,...x}=fo(e,t),S=g!==void 0||y===On?R4(g||null,v,y):y,O=await u.detectOverflow(t,x),A=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[A];if(N==null)return{};let M=_s(N,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==N)return{reset:{placement:S[0]}};let T=[O[tr(N)],O[M[0]],O[M[1]]],U=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:T}],W=S[A+1];if(W)return{data:{index:A+1,overflows:U},reset:{placement:W}};let Pe=U.map(ue=>{let be=at(ue.placement);return[ue.placement,be&&m?ue.overflows.slice(0,2).reduce((fe,yt)=>fe+yt,0):ue.overflows[0],ue.overflows]}).sort((ue,be)=>ue[1]-be[1]),De=((a=Pe.filter(ue=>ue[2].slice(0,at(ue[0])?2:3).every(be=>be<=0))[0])==null?void 0:a[0])||Pe[0][0];return De!==l?{data:{index:A+1,overflows:U},reset:{placement:De}}:{}}}};var Ds=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:N,y:M}=A;return{x:N,y:M}}},...p}=fo(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=po(tr(a)),v=wn(y),x=m[v],S=m[y];if(s){let A=v==="y"?"top":"left",N=v==="y"?"bottom":"right",M=x+g[A],T=x-g[N];x=Rn(M,x,T)}if(l){let A=y==="y"?"top":"left",N=y==="y"?"bottom":"right",M=S+g[A],T=S-g[N];S=Rn(M,S,T)}let O=u.fn({...t,[v]:x,[y]:S});return{...O,data:{x:O.x-o,y:O.y-n,enabled:{[v]:s,[y]:l}}}}}};function mo(){return typeof window<"u"}function Lt(e){return Bs(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(Bs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bs(e){return mo()?e instanceof Node||e instanceof de(e).Node:!1}function xe(e){return mo()?e instanceof Element||e instanceof de(e).Element:!1}function Fe(e){return mo()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function Us(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function rr(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=Se(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function Fs(e){return/^(table|td|th)$/.test(Lt(e))}function Tr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var w4=/transform|translate|scale|rotate|perspective|filter/,N4=/paint|layout|strict|content/,Et=e=>!!e&&e!=="none",Mn;function or(e){let t=xe(e)?Se(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!go()&&(Et(t.backdropFilter)||Et(t.filter))||w4.test(t.willChange||"")||N4.test(t.contain||"")}function Hs(e){let t=Ke(e);for(;Fe(t)&&!At(t);){if(or(t))return t;if(Tr(t))return null;t=Ke(t)}return null}function go(){return Mn==null&&(Mn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mn}function At(e){return/^(html|body|#document)$/.test(Lt(e))}function Se(e){return de(e).getComputedStyle(e)}function zr(e){return xe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(Lt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Us(e)&&e.host||Be(e);return Us(t)?t.host:t}function $s(e){let t=Ke(e);return At(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&rr(t)?t:$s(t)}function ho(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=$s(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=de(a);if(i){let l=yo(s);return t.concat(s,s.visualViewport||[],rr(a)?a:[],l&&o?ho(l):[])}else return t.concat(a,ho(a,[],o))}function yo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vs(e){let t=Se(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Fe(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=kr(o)!==i||kr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Ks(e){return xe(e)?e:e.contextElement}function nr(e){let t=Ks(e);if(!Fe(t))return _e(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=Vs(t),s=(i?kr(o.width):o.width)/n,l=(i?kr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var _4=_e(0);function Zs(e){let t=de(e);return!go()||!t.visualViewport?_4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function M4(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==de(e)?!1:t}function Ir(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=Ks(e),s=_e(1);t&&(n?xe(n)&&(s=nr(n)):s=nr(e));let l=M4(i,o,n)?Zs(i):_e(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=de(i),v=n&&xe(n)?de(n):n,x=y,S=yo(x);for(;S&&n&&v!==x;){let O=nr(S),A=S.getBoundingClientRect(),N=Se(S),M=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*O.x,T=A.top+(S.clientTop+parseFloat(N.paddingTop))*O.y;u*=O.x,p*=O.y,m*=O.x,g*=O.y,u+=M,p+=T,x=de(S),S=yo(x)}}return Ct({width:m,height:g,x:u,y:p})}function bo(e,t){let o=zr(e).scrollLeft;return t?t.left+o:Ir(Be(e)).left+o}function qs(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-bo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function k4(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Be(n),l=t?Tr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=_e(1),m=_e(0),g=Fe(n);if((g||!g&&!i)&&((Lt(n)!=="body"||rr(s))&&(u=zr(n)),g)){let v=Ir(n);p=nr(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?qs(s,u):_e(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function T4(e){return Array.from(e.getClientRects())}function z4(e){let t=Be(e),o=zr(e),n=e.ownerDocument.body,a=nt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=nt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+bo(e),l=-o.scrollTop;return Se(n).direction==="rtl"&&(s+=nt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var Gs=25;function I4(e,t){let o=de(e),n=Be(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=go();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=bo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(n.clientWidth-g.clientWidth-v);x<=Gs&&(i-=x)}else p<=Gs&&(i+=p);return{width:i,height:s,x:l,y:u}}function P4(e,t){let o=Ir(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Fe(e)?nr(e):_e(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function Ws(e,t,o){let n;if(t==="viewport")n=I4(e,o);else if(t==="document")n=z4(Be(e));else if(xe(t))n=P4(t,o);else{let a=Zs(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ct(n)}function Ys(e,t){let o=Ke(e);return o===t||!xe(o)||At(o)?!1:Se(o).position==="fixed"||Ys(o,t)}function D4(e,t){let o=t.get(e);if(o)return o;let n=ho(e,[],!1).filter(l=>xe(l)&&Lt(l)!=="body"),a=null,i=Se(e).position==="fixed",s=i?Ke(e):e;for(;xe(s)&&!At(s);){let l=Se(s),u=or(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||rr(s)&&!u&&Ys(e,s))?n=n.filter(m=>m!==s):a=l,s=Ke(s)}return t.set(e,n),n}function U4(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Tr(t)?[]:D4(t,this._c):[].concat(o),n],l=Ws(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=Ws(t,s[y],a);u=nt(v.top,u),p=Mr(v.right,p),m=Mr(v.bottom,m),g=nt(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function B4(e){let{width:t,height:o}=Vs(e);return{width:t,height:o}}function F4(e,t,o){let n=Fe(t),a=Be(t),i=o==="fixed",s=Ir(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=_e(0);function p(){u.x=bo(a)}if(n||!n&&!i)if((Lt(t)!=="body"||rr(a))&&(l=zr(t)),n){let v=Ir(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?qs(a,l):_e(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function kn(e){return Se(e).position==="static"}function js(e,t){if(!Fe(e)||Se(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Be(e)===o&&(o=o.ownerDocument.body),o}function Xs(e,t){let o=de(e);if(Tr(e))return o;if(!Fe(e)){let a=Ke(e);for(;a&&!At(a);){if(xe(a)&&!kn(a))return a;a=Ke(a)}return o}let n=js(e,t);for(;n&&Fs(n)&&kn(n);)n=js(n,t);return n&&At(n)&&kn(n)&&!or(n)?o:n||Hs(e)||o}var H4=async function(e){let t=this.getOffsetParent||Xs,o=this.getDimensions,n=await o(e.floating);return{reference:F4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $4(e){return Se(e).direction==="rtl"}var vo={convertOffsetParentRelativeRectToViewportRelativeRect:k4,getDocumentElement:Be,getClippingRect:U4,getOffsetParent:Xs,getElementRects:H4,getClientRects:T4,getDimensions:B4,getScale:nr,isElement:xe,isRTL:$4};var Qs=Ps,Js=Ds;var ec=(e,t,o)=>{let n=new Map,a={platform:vo,...o},i={...a.platform,_c:n};return Is(e,t,{...a,platform:i})};function tc(e){return G4(e)}function Tn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function G4(e){for(let t=e;t;t=Tn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Tn(e);t;t=Tn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||or(o)||t.tagName==="BODY"))return t}return null}async function rc(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},ec(e,t,{strategy:n.strategy,platform:{...vo,getOffsetParent:a=>vo.getOffsetParent(a,tc)},middleware:[Js({crossAxis:!0}),Qs({allowedPlacements:[n.placement]})]})}var gr=L(I());var aa=L(ae());var oc=L(ae(),1);var zn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function nc(e,t){return(0,oc.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Pr(e);try{return JSON.parse(o)}catch{return Pr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Dr,...t??{}})}function W4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!xo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!xo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!xo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function xo(e,t){try{return W4(e,t)}catch{return!1}}function Dr(e,t){return!xo(e,t)}function Pr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function So(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var ac=L(ae(),1);var In=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:Dr,attribute:!1,...t};(0,ac.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var Co=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Ot=L(ae(),1);var Eo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var sc=L(V(),1);var Lo=globalThis,j4=Lo.ShadowRoot&&(Lo.ShadyCSS===void 0||Lo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ic=(e,t)=>{if(j4)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=Lo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Ao=class extends sc.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ic(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){zn(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function cc(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var ir=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},fc,lc=Symbol("constructorPrototype"),dc=Symbol("constructorName"),pc=Symbol("exportpartsDebouncer"),uc=Symbol("dynamicDependenciesLoaded"),ar=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ar.eventName="exportparts-updated";var He=class extends Ao{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[fc]=new Eo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[pc].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[dc]=this.constructor.name,this[lc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[dc]&&Object.setPrototypeOf(this,this[lc])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[uc]||(o[uc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ar.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ar.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ar)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=cc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(O=>O.trim());for(let O of S)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};fc=pc;ir([(0,Ot.property)()],He.prototype,"exportpartsPrefix",void 0);ir([nc([])],He.prototype,"exportpartsPrefixes",void 0);ir([(0,Ot.property)({reflect:!0})],He.prototype,"exportparts",void 0);ir([(0,Ot.property)()],He.prototype,"customStylesheet",void 0);ir([(0,Ot.property)()],He.prototype,"elementToFocus",void 0);ir([(0,Ot.state)()],He.prototype,"useAdoptedStyleSheets",void 0);function Oo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ur=Symbol("internalReduxEventsUnsubscribers"),it=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),V4=So(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Rt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Rt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[it].has(s.store):this[it].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[it].set(s,l.subscribe(()=>this.updateFromStores())),this[Ur].set(s,[]),Oo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[Ur].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[it].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[it].has(s)&&this[it].get(s)(),this[it].delete(s),(l=this[Ur].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ur].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=it,o=Rt,n=Ur,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),hc=class extends V4(He){};function Ce(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ze(e){return!!e&&!!e[j]}function Me(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===e0})(e)||Array.isArray(e)||!!e[Sc]||!!(!((t=e.constructor)===null||t===void 0)&&t[Sc])||Wn(e)||jn(e))}function wt(e,t,o){o===void 0&&(o=!1),lr(e)===0?(o?Object.keys:cr)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function lr(e){var t=e[j];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Wn(e)?2:jn(e)?3:0}function sr(e,t){return lr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function K4(e,t){return lr(e)===2?e.get(t):e[t]}function Cc(e,t,o){var n=lr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Ec(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Wn(e){return Q4&&e instanceof Map}function jn(e){return J4&&e instanceof Set}function st(e){return e.o||e.t}function Vn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Oc(e);delete t[j];for(var o=cr(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Kn(e,t){return t===void 0&&(t=!1),Zn(e)||Ze(e)||!Me(e)||(lr(e)>1&&(e.set=e.add=e.clear=e.delete=Z4),Object.freeze(e),t&&wt(e,(function(o,n){return Kn(n,!0)}),!0)),e}function Z4(){Ce(2)}function Zn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function $e(e){var t=Gn[e];return t||Ce(18,e),t}function q4(e,t){Gn[e]||(Gn[e]=t)}function Fn(){return Fr}function Pn(e,t){t&&($e("Patches"),e.u=[],e.s=[],e.v=t)}function Ro(e){Hn(e),e.p.forEach(Y4),e.p=null}function Hn(e){e===Fr&&(Fr=e.l)}function mc(e){return Fr={p:[],l:Fr,h:e,m:!0,_:0}}function Y4(e){var t=e[j];t.i===0||t.i===1?t.j():t.g=!0}function Dn(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||$e("ES5").S(t,e,n),n?(o[j].P&&(Ro(t),Ce(4)),Me(e)&&(e=wo(t,e),t.l||No(t,e)),t.u&&$e("Patches").M(o[j].t,e,t.u,t.s)):e=wo(t,o,[]),Ro(t),t.u&&t.v(t.u,t.s),e!==Ac?e:void 0}function wo(e,t,o){if(Zn(t))return t;var n=t[j];if(!n)return wt(t,(function(l,u){return gc(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return No(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),wt(i,(function(l,u){return gc(e,n,a,l,u,o,s)})),No(e,a,!1),o&&e.u&&$e("Patches").N(n,o,e.u,e.s)}return n.o}function gc(e,t,o,n,a,i,s){if(Ze(a)){var l=wo(e,a,i&&t&&t.i!==3&&!sr(t.R,n)?i.concat(n):void 0);if(Cc(o,n,l),!Ze(l))return;e.m=!1}else s&&o.add(a);if(Me(a)&&!Zn(a)){if(!e.h.D&&e._<1)return;wo(e,a),t&&t.A.l||No(e,a)}}function No(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Kn(t,o)}function Un(e,t){var o=e[j];return(o?st(o):e)[t]}function yc(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ct(e){e.P||(e.P=!0,e.l&&ct(e.l))}function Bn(e){e.o||(e.o=Vn(e.t))}function $n(e,t,o){var n=Wn(t)?$e("MapSet").F(t,o):jn(t)?$e("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Fn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=Hr;s&&(u=[l],p=Br);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):$e("ES5").J(t,o);return(o?o.A:Fn()).p.push(n),n}function X4(e){return Ze(e)||Ce(22,e),(function t(o){if(!Me(o))return o;var n,a=o[j],i=lr(o);if(a){if(!a.P&&(a.i<4||!$e("ES5").K(a)))return a.t;a.I=!0,n=bc(o,i),a.I=!1}else n=bc(o,i);return wt(n,(function(s,l){a&&K4(a.t,s)===l||Cc(n,s,t(l))})),i===3?new Set(n):n})(e)}function bc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Vn(e)}function Lc(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[j];return Hr.get(p,s)},set:function(p){var m=this[j];Hr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][j];if(!u.P)switch(u.i){case 5:n(u)&&ct(u);break;case 4:o(u)&&ct(u)}}}function o(s){for(var l=s.t,u=s.k,p=cr(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==j){var y=l[g];if(y===void 0&&!sr(l,g))return!0;var v=u[g],x=v&&v[j];if(x?x.t!==y:!Ec(v,y))return!0}}var S=!!l[j];return p.length!==cr(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Ce(3,JSON.stringify(st(s)))}var i={};q4("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var v=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(v,""+x,e(x,!0));return v}var S=Oc(y);delete S[j];for(var O=cr(S),A=0;A<O.length;A++){var N=O[A];S[N]=e(N,g||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),m={i:u?5:4,A:l?l.A:Fn(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,j,{value:m,writable:!0}),p},S:function(s,l,u){u?Ze(l)&&l[j].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[j];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)wt(v,(function(T){T!==j&&(y[T]!==void 0||sr(y,T)?x[T]||p(v[T]):(x[T]=!0,ct(g)))})),wt(y,(function(T){v[T]!==void 0||sr(v,T)||(x[T]=!1,ct(g))}));else if(S===5){if(n(g)&&(ct(g),x.length=!0),v.length<y.length)for(var O=v.length;O<y.length;O++)x[O]=!1;else for(var A=y.length;A<v.length;A++)x[A]=!0;for(var N=Math.min(v.length,y.length),M=0;M<N;M++)v.hasOwnProperty(M)||(x[M]=!0),x[M]===void 0&&p(v[M])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var vc,Fr,qn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Q4=typeof Map<"u",J4=typeof Set<"u",xc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ac=qn?Symbol.for("immer-nothing"):((vc={})["immer-nothing"]=!0,vc),Sc=qn?Symbol.for("immer-draftable"):"__$immer_draftable",j=qn?Symbol.for("immer-state"):"__$immer_state";var e0=""+Object.prototype.constructor,cr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Oc=Object.getOwnPropertyDescriptors||function(e){var t={};return cr(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Gn={},Hr={get:function(e,t){if(t===j)return e;var o=st(e);if(!sr(o,t))return(function(a,i,s){var l,u=yc(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!Me(n)?n:n===Un(e.t,t)?(Bn(e),e.o[t]=$n(e.A.h,n,e)):n},has:function(e,t){return t in st(e)},ownKeys:function(e){return Reflect.ownKeys(st(e))},set:function(e,t,o){var n=yc(st(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Un(st(e),t),i=a?.[j];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Ec(o,a)&&(o!==void 0||sr(e.t,t)))return!0;Bn(e),ct(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Un(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bn(e),ct(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=st(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Ce(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ce(12)}},Br={};wt(Hr,(function(e,t){Br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Br.deleteProperty=function(e,t){return Br.set.call(this,e,t,void 0)},Br.set=function(e,t,o){return Hr.set.call(this,e[0],t,o,e[0])};var t0=(function(){function e(o){var n=this;this.O=xc,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(S){var O=this;S===void 0&&(S=l);for(var A=arguments.length,N=Array(A>1?A-1:0),M=1;M<A;M++)N[M-1]=arguments[M];return u.produce(S,(function(T){var U;return(U=i).call.apply(U,[O,T].concat(N))}))}}var p;if(typeof i!="function"&&Ce(6),s!==void 0&&typeof s!="function"&&Ce(7),Me(a)){var m=mc(n),g=$n(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?Ro(m):Hn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Pn(m,s),Dn(S,m)}),(function(S){throw Ro(m),S})):(Pn(m,s),Dn(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Ac&&(p=void 0),n.D&&Kn(p,!0),s){var v=[],x=[];$e("Patches").M(a,p,v,x),s(v,x)}return p}Ce(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Me(o)||Ce(8),Ze(o)&&(o=X4(o));var n=mc(this),a=$n(this,o,void 0);return a[j].C=!0,Hn(n),a},t.finishDraft=function(o,n){var a=o&&o[j],i=a.A;return Pn(i,n),Dn(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!xc&&Ce(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=$e("Patches").$;return Ze(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),he=new t0,r0=he.produce,R7=he.produceWithPatches.bind(he),w7=he.setAutoFreeze.bind(he),N7=he.setUseProxies.bind(he),_7=he.applyPatches.bind(he),M7=he.createDraft.bind(he),k7=he.finishDraft.bind(he),_o=r0;function Nt(e){"@babel/helpers - typeof";return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}function Rc(e,t){if(Nt(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Nt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wc(e){var t=Rc(e,"string");return Nt(t)=="symbol"?t:t+""}function Nc(e,t,o){return(t=wc(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _c(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Yn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?_c(Object(o),!0).forEach(function(n){Nc(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_c(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function ie(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Mc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Xn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mo={INIT:"@@redux/INIT"+Xn(),REPLACE:"@@redux/REPLACE"+Xn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Xn()}};function o0(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Qn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ie(1));return o(Qn)(e,t)}if(typeof e!="function")throw new Error(ie(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(ie(3));return i}function g(S){if(typeof S!="function")throw new Error(ie(4));if(u)throw new Error(ie(5));var O=!0;return p(),l.push(S),function(){if(O){if(u)throw new Error(ie(6));O=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!o0(S))throw new Error(ie(7));if(typeof S.type>"u")throw new Error(ie(8));if(u)throw new Error(ie(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var O=s=l,A=0;A<O.length;A++){var N=O[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(ie(10));a=S,y({type:Mo.REPLACE})}function x(){var S,O=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ie(11));function M(){N.next&&N.next(m())}M();var T=O(M);return{unsubscribe:T}}},S[Mc]=function(){return this},S}return y({type:Mo.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[Mc]=x,n}function n0(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:Mo.INIT});if(typeof n>"u")throw new Error(ie(12));if(typeof o(void 0,{type:Mo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function kc(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{n0(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],O=o[S],A=p[S],N=O(A,m);if(typeof N>"u"){var M=m&&m.type;throw new Error(ie(14))}v[S]=N,y=y||N!==A}return y=y||i.length!==Object.keys(p).length,y?v:p}}function dr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Tc(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(ie(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=dr.apply(void 0,l)(a.dispatch),Yn(Yn({},a),{},{dispatch:i})}}}function zc(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var Ic=zc();Ic.withExtraArgument=zc;var Jn=Ic;var Fc=(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),a0=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},ur=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},i0=Object.defineProperty,s0=Object.defineProperties,c0=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,l0=Object.prototype.hasOwnProperty,d0=Object.prototype.propertyIsEnumerable,Dc=function(e,t,o){return t in e?i0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},lt=function(e,t){for(var o in t||(t={}))l0.call(t,o)&&Dc(e,o,t[o]);if(Pc)for(var n=0,a=Pc(t);n<a.length;n++){var o=a[n];d0.call(t,o)&&Dc(e,o,t[o])}return e},ea=function(e,t){return s0(e,c0(t))},u0=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var f0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dr:dr.apply(null,arguments)},Y7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function p0(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function dt(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return lt(lt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var h0=(function(e){Fc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ur([void 0],o[0].concat(this)))):new(t.bind.apply(t,ur([void 0],o.concat(this))))},t})(Array),m0=(function(e){Fc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ur([void 0],o[0].concat(this)))):new(t.bind.apply(t,ur([void 0],o.concat(this))))},t})(Array);function oa(e){return Me(e)?_o(e,function(){}):e}function g0(e){return typeof e=="boolean"}function y0(){return function(t){return b0(t)}}function b0(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new h0;if(o&&(g0(o)?p.push(Jn):p.push(Jn.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var ta=!0;function Hc(e){var t=y0(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(p0(a))v=kc(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(t),!ta&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ta&&x.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Tc.apply(void 0,x),O=dr;u&&(O=f0(lt({trace:!ta},typeof u=="object"&&u)));var A=new m0(S),N=A;Array.isArray(y)?N=ur([S],y):typeof y=="function"&&(N=y(A));var M=O.apply(void 0,N);return Qn(v,m,M)}function $c(e){var t={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function v0(e){return typeof e=="function"}function x0(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?$c(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(v0(e))u=function(){return oa(e())};else{var p=oa(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=ur([i[y.type]],s.filter(function(x){var S=x.matcher;return S(y)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[l]),v.reduce(function(x,S){if(S)if(Ze(x)){var O=x,A=S(O,y);return A===void 0?x:A}else{if(Me(x))return _o(x,function(N){return S(N,y)});var A=S(x,y);if(A===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return x},g)}return m.getInitialState=u,m}function S0(e,t){return e+"/"+t}function Gc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:oa(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=S0(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?dt(y,x):dt(y)});function u(){var m=typeof e.extraReducers=="function"?$c(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],O=S===void 0?void 0:S,A=lt(lt({},y),s);return x0(o,function(N){for(var M in A)N.addCase(M,A[M]);for(var T=0,U=x;T<U.length;T++){var W=U[T];N.addMatcher(W.matcher,W.reducer)}O&&N.addDefaultCase(O)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var C0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",E0=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=C0[Math.random()*64|0];return t},L0=["name","message","stack","code"],ra=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),Uc=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),A0=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=L0;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},em=(function(){function e(t,o,n){var a=dt(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:ea(lt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=dt(t+"/pending",function(m,g,y){return{payload:void 0,meta:ea(lt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=dt(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||A0)(m||"Rejected"),meta:ea(lt({},x||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function p(m){return function(g,y,v){var x=n?.idGenerator?n.idGenerator(m):E0(),S=new u,O,A=!1;function N(T){O=T,S.abort()}var M=(function(){return u0(this,null,function(){var T,U,W,Pe,gt,De,ue;return a0(this,function(be){switch(be.label){case 0:return be.trys.push([0,4,,5]),Pe=(T=n?.condition)==null?void 0:T.call(n,m,{getState:y,extra:v}),R0(Pe)?[4,Pe]:[3,2];case 1:Pe=be.sent(),be.label=2;case 2:if(Pe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,gt=new Promise(function(fe,yt){return S.signal.addEventListener("abort",function(){return yt({name:"AbortError",message:O||"Aborted"})})}),g(i(x,m,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([gt,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(fe,yt){return new ra(fe,yt)},fulfillWithValue:function(fe,yt){return new Uc(fe,yt)}})).then(function(fe){if(fe instanceof ra)throw fe;return fe instanceof Uc?a(fe.payload,x,m,fe.meta):a(fe,x,m)})])];case 3:return W=be.sent(),[3,5];case 4:return De=be.sent(),W=De instanceof ra?s(null,x,m,De.payload,De.meta):s(De,x,m),[3,5];case 5:return ue=n&&!n.dispatchConditionRejection&&s.match(W)&&W.meta.condition,ue||g(W),[2,W]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:m,unwrap:function(){return M.then(O0)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function O0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function R0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wc="listener",jc="completed",Vc="cancelled",tm="task-"+Vc,rm="task-"+jc,om=Wc+"-"+Vc,nm=Wc+"-"+jc;var na="listenerMiddleware";var am=dt(na+"/add"),im=dt(na+"/removeAll"),sm=dt(na+"/remove");var Bc,cm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Bc||(Bc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},w0=function(e){return function(t){setTimeout(t,e)}},lm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:w0(10);Lc();var N0=So(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),ko=class extends N0(Object){};window.ftReduxStores||(window.ftReduxStores={});var Kc=class e extends ko{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Oo(i))return i;if(a==null)return;let s=Gc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Hc({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=Pr(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Co;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,p=i[u];return p?(...m)=>{let g=p(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var To=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var zo=L(I()),_0="ft-app-info",fr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};fr.eventName="authentication-change";var $r=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};$r.eventName="ui-locale-changed";var M0={session:(e,t)=>{(0,zo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>P.dispatchEvent(new fr(t.payload)),0))}},P=zo.FtReduxStore.get({name:_0,reducers:M0,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Zc=L(I()),Io=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Dm=(0,Zc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>To.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Io([(0,aa.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Io([(0,aa.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Io([In({store:P.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Io([In({store:P.name})],t.prototype,"uiLocale",void 0),t});var qc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(qc||(qc={}));var Yc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Yc||(Yc={}));var Xc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Xc||(Xc={}));var Qc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Qc||(Qc={}));var Jc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Jc||(Jc={}));var el;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(el||(el={}));var tl;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(tl||(tl={}));var rl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(rl||(rl={}));var ol;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(ol||(ol={}));var nl;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(nl||(nl={}));var al;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(al||(al={}));var il;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(il||(il={}));var sl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(sl||(sl={}));var cl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(cl||(cl={}));var ll;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ll||(ll={}));var dl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(dl||(dl={}));var ul;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ul||(ul={}));var fl;(function(e){e.ASC="ASC",e.DESC="DESC"})(fl||(fl={}));var pl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(pl||(pl={}));var hl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(hl||(hl={}));var ml;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ml||(ml={}));var gl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(gl||(gl={}));var yl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(yl||(yl={}));var bl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(bl||(bl={}));var vl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(vl||(vl={}));var xl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(xl||(xl={}));var Sl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Sl||(Sl={}));var ee;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(ee||(ee={}));var Ee;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ee||(Ee={}));var Cl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Cl||(Cl={}));var El;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(El||(El={}));var Ll;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ll||(Ll={}));var Al;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Al||(Al={}));var Ol;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Ol||(Ol={}));var Rl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rl||(Rl={}));var wl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(wl||(wl={}));var Nl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Nl||(Nl={}));var _l;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(_l||(_l={}));var Ml;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ml||(Ml={}));var kl;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(kl||(kl={}));var Tl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Tl||(Tl={}));var k0={[ee.PERSONAL_BOOK_SHARE_USER]:[ee.PERSONAL_BOOK_USER],[ee.HTML_EXPORT_USER]:[ee.PERSONAL_BOOK_USER],[ee.PDF_EXPORT_USER]:[ee.PERSONAL_BOOK_USER],[ee.KHUB_ADMIN]:[ee.CONTENT_PUBLISHER],[ee.ADMIN]:[ee.KHUB_ADMIN,ee.USERS_ADMIN,ee.PORTAL_ADMIN,ee.BEHAVIOR_DATA_USER],[ee.GENERATIVE_AI_EXPORT_USER]:[ee.GENERATIVE_AI_USER]};function zl(e,t){return e===t||(k0[e]??[]).some(o=>zl(o,t))}function Il(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>zl(n,t))}var Fo=L(I());var ia=L(I());var _t=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=P.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var pr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:_t.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):_t.await()}};var me=class extends pr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ia.CacheRegistry,this.cache=t?a.commonCache:new ia.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Po=class extends me{async listMySearches(){let{session:t}=P.getState();return Il(t,ee.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Do=class extends me{async listMyBookmarks(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Uo=class extends me{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var Bo=class extends me{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var T0="ft-user-assets",z0={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Ee).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ca(e,o,[...sa(e,o),a]),Pl(e,o,1,n),Dl(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ca(e,o,sa(e,o).map(a=>a.id===n.id?n:a)),Dl(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ca(e,o,sa(e,o).filter(i=>i.id!==a)),Pl(e,o,-1,n)}},Ul={[Ee.SEARCHES]:"savedSearches",[Ee.BOOKMARKS]:"bookmarks",[Ee.BOOKS]:void 0,[Ee.COLLECTIONS]:void 0},sa=(e,t)=>{var o;let n=Ul[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ca=(e,t,o)=>{let n=Ul[t];n&&(e[n]=o)},Pl=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Ee.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Dl=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ce=Fo.FtReduxStore.get({name:T0,reducers:z0,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ee).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),la=class{constructor(t=new Uo,o=new Bo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Do,this.savedSearchesService=new Po,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=P.getState();(0,Fo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ce.actions.clearAssetCount(),ce.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ce.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ce.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ce.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ce.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ce.getState().assetCounts.allAsset[t]!==o.count&&ce.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ce.getState().assetCounts.bookmarkByMap[t]!==o.count&&ce.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ce.getState().assetCounts.bookmarkByMap).length!==0;t===Ee.BOOKMARKS&&o&&ce.actions.clearBookmarkCountByMap(),ce.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ce.actions.bookmarks(o)}}},I0=new la;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=I0);var da=class{addCommand(t,o=!1){P.commands.add(t,o)}consumeCommand(t){return P.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new da;var Le=L(I());var Bl,hr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},P0=Symbol("clearAfterUnitTest"),Ho=class extends(0,Le.withEventBus)(me){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Bl]=()=>{this.defaultMessages={},this.cache=new Le.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=P.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Le.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Le.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Le.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new hr({loadedContexts:t})),this.dispatchEvent(new hr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new hr({loadedContexts:[t]})),this.dispatchEvent(new hr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Le.delay)(0).then(()=>n()).catch(()=>null)))}};Bl=P0;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ho{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ho{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Gr=window.FluidTopicsI18nService,ua=window.FluidTopicsCustomI18nService;var Fl=L(I()),fa=class{highlightHtml(t,o,n){(0,Fl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new fa;var Hl=L(I());var pa=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return Hl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new pa;var $l=L(I());var Wr=class{static get(t,o){var n,a;let i=P.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new $l.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ha=class{urlToSearchRequest(t){return Wr.get().parse(t)}searchRequestToUrl(t){return Wr.get().serialize(t)}};window.FluidTopicsUrlService=new ha;var qe=L(I());var Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Mt.eventName="change";var ma=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Gl=new ma;var $o=class e extends qe.WithEventBus{static build(){return new e(window.history,Gl,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,qe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Mt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Mt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Mt.eventName,t)}currentItem(){return(0,qe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,qe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,qe.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,qe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=$o.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wl=L(V());var jl=Wl.css`
841
+ `;var Ns=["top","right","bottom","left"],ws=["start","end"],On=Ns.reduce((e,t)=>e.concat(t,t+"-"+ws[0],t+"-"+ws[1]),[]),Mr=Math.min,nt=Math.max,kr=Math.round;var _e=e=>({x:e,y:e}),L4={left:"right",right:"left",bottom:"top",top:"bottom"};function Rn(e,t,o){return nt(e,Mr(t,o))}function fo(e,t){return typeof e=="function"?e(t):e}function tr(e){return e.split("-")[0]}function at(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function Nn(e){return e==="y"?"height":"width"}function po(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function _n(e){return wn(po(e))}function _s(e,t,o){o===void 0&&(o=!1);let n=at(e),a=_n(e),i=Nn(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=An(s)),[s,An(s)]}function Ms(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function An(e){let t=tr(e);return L4[t]+e.slice(t.length)}function A4(e){return{top:0,right:0,bottom:0,left:0,...e}}function ks(e){return typeof e!="number"?A4(e):{top:e,right:e,bottom:e,left:e}}function Ct(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function Ts(e,t,o){let{reference:n,floating:a}=e,i=po(t),s=_n(t),l=Nn(s),u=tr(t),p=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,v;switch(u){case"top":v={x:m,y:n.y-a.height};break;case"bottom":v={x:m,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}switch(at(t)){case"start":v[s]-=y*(o&&p?-1:1);break;case"end":v[s]+=y*(o&&p?-1:1);break}return v}async function zs(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=fo(t,e),x=ks(v),O=l[y?g==="floating"?"reference":"floating":g],A=Ct(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(O)))==null||o?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),T=await(i.isElement==null?void 0:i.isElement(M))?await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1}:{x:1,y:1},U=Ct(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(A.top-U.top+x.top)/T.y,bottom:(U.bottom-A.bottom+x.bottom)/T.y,left:(A.left-U.left+x.left)/T.x,right:(U.right-A.right+x.right)/T.x}}var O4=50,Is=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:zs},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=Ts(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let O=i[S];if(!O)continue;let{name:A,fn:N}=O,{x:M,y:T,data:U,reset:W}=await N({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});m=M??m,g=T??g,x[A]={...x[A],...U},W&&v<O4&&(v++,typeof W=="object"&&(W.placement&&(y=W.placement),W.rects&&(p=W.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):W.rects),{x:m,y:g}=Ts(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function R4(e,t,o){return(e?[...o.filter(a=>at(a)===e),...o.filter(a=>at(a)!==e)]:o.filter(a=>tr(a)===a)).filter(a=>e?at(a)===e||(t?Ms(a)!==a:!1):!0)}var Ps=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=On,autoAlignment:v=!0,...x}=fo(e,t),S=g!==void 0||y===On?R4(g||null,v,y):y,O=await u.detectOverflow(t,x),A=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[A];if(N==null)return{};let M=_s(N,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==N)return{reset:{placement:S[0]}};let T=[O[tr(N)],O[M[0]],O[M[1]]],U=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:T}],W=S[A+1];if(W)return{data:{index:A+1,overflows:U},reset:{placement:W}};let Pe=U.map(ue=>{let be=at(ue.placement);return[ue.placement,be&&m?ue.overflows.slice(0,2).reduce((fe,yt)=>fe+yt,0):ue.overflows[0],ue.overflows]}).sort((ue,be)=>ue[1]-be[1]),De=((a=Pe.filter(ue=>ue[2].slice(0,at(ue[0])?2:3).every(be=>be<=0))[0])==null?void 0:a[0])||Pe[0][0];return De!==l?{data:{index:A+1,overflows:U},reset:{placement:De}}:{}}}};var Ds=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:N,y:M}=A;return{x:N,y:M}}},...p}=fo(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=po(tr(a)),v=wn(y),x=m[v],S=m[y];if(s){let A=v==="y"?"top":"left",N=v==="y"?"bottom":"right",M=x+g[A],T=x-g[N];x=Rn(M,x,T)}if(l){let A=y==="y"?"top":"left",N=y==="y"?"bottom":"right",M=S+g[A],T=S-g[N];S=Rn(M,S,T)}let O=u.fn({...t,[v]:x,[y]:S});return{...O,data:{x:O.x-o,y:O.y-n,enabled:{[v]:s,[y]:l}}}}}};function mo(){return typeof window<"u"}function Lt(e){return Bs(e)?(e.nodeName||"").toLowerCase():"#document"}function de(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(Bs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Bs(e){return mo()?e instanceof Node||e instanceof de(e).Node:!1}function xe(e){return mo()?e instanceof Element||e instanceof de(e).Element:!1}function Fe(e){return mo()?e instanceof HTMLElement||e instanceof de(e).HTMLElement:!1}function Us(e){return!mo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof de(e).ShadowRoot}function rr(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=Se(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function Fs(e){return/^(table|td|th)$/.test(Lt(e))}function Tr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var w4=/transform|translate|scale|rotate|perspective|filter/,N4=/paint|layout|strict|content/,Et=e=>!!e&&e!=="none",Mn;function or(e){let t=xe(e)?Se(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!go()&&(Et(t.backdropFilter)||Et(t.filter))||w4.test(t.willChange||"")||N4.test(t.contain||"")}function Hs(e){let t=Ke(e);for(;Fe(t)&&!At(t);){if(or(t))return t;if(Tr(t))return null;t=Ke(t)}return null}function go(){return Mn==null&&(Mn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mn}function At(e){return/^(html|body|#document)$/.test(Lt(e))}function Se(e){return de(e).getComputedStyle(e)}function zr(e){return xe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ke(e){if(Lt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Us(e)&&e.host||Be(e);return Us(t)?t.host:t}function $s(e){let t=Ke(e);return At(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&rr(t)?t:$s(t)}function ho(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=$s(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=de(a);if(i){let l=yo(s);return t.concat(s,s.visualViewport||[],rr(a)?a:[],l&&o?ho(l):[])}else return t.concat(a,ho(a,[],o))}function yo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vs(e){let t=Se(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Fe(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=kr(o)!==i||kr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Ks(e){return xe(e)?e:e.contextElement}function nr(e){let t=Ks(e);if(!Fe(t))return _e(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=Vs(t),s=(i?kr(o.width):o.width)/n,l=(i?kr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var _4=_e(0);function Zs(e){let t=de(e);return!go()||!t.visualViewport?_4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function M4(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==de(e)?!1:t}function Ir(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=Ks(e),s=_e(1);t&&(n?xe(n)&&(s=nr(n)):s=nr(e));let l=M4(i,o,n)?Zs(i):_e(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=de(i),v=n&&xe(n)?de(n):n,x=y,S=yo(x);for(;S&&n&&v!==x;){let O=nr(S),A=S.getBoundingClientRect(),N=Se(S),M=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*O.x,T=A.top+(S.clientTop+parseFloat(N.paddingTop))*O.y;u*=O.x,p*=O.y,m*=O.x,g*=O.y,u+=M,p+=T,x=de(S),S=yo(x)}}return Ct({width:m,height:g,x:u,y:p})}function bo(e,t){let o=zr(e).scrollLeft;return t?t.left+o:Ir(Be(e)).left+o}function qs(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-bo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function k4(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Be(n),l=t?Tr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=_e(1),m=_e(0),g=Fe(n);if((g||!g&&!i)&&((Lt(n)!=="body"||rr(s))&&(u=zr(n)),g)){let v=Ir(n);p=nr(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?qs(s,u):_e(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function T4(e){return Array.from(e.getClientRects())}function z4(e){let t=Be(e),o=zr(e),n=e.ownerDocument.body,a=nt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=nt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+bo(e),l=-o.scrollTop;return Se(n).direction==="rtl"&&(s+=nt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var Gs=25;function I4(e,t){let o=de(e),n=Be(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=go();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=bo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(n.clientWidth-g.clientWidth-v);x<=Gs&&(i-=x)}else p<=Gs&&(i+=p);return{width:i,height:s,x:l,y:u}}function P4(e,t){let o=Ir(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Fe(e)?nr(e):_e(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function Ws(e,t,o){let n;if(t==="viewport")n=I4(e,o);else if(t==="document")n=z4(Be(e));else if(xe(t))n=P4(t,o);else{let a=Zs(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ct(n)}function Ys(e,t){let o=Ke(e);return o===t||!xe(o)||At(o)?!1:Se(o).position==="fixed"||Ys(o,t)}function D4(e,t){let o=t.get(e);if(o)return o;let n=ho(e,[],!1).filter(l=>xe(l)&&Lt(l)!=="body"),a=null,i=Se(e).position==="fixed",s=i?Ke(e):e;for(;xe(s)&&!At(s);){let l=Se(s),u=or(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||rr(s)&&!u&&Ys(e,s))?n=n.filter(m=>m!==s):a=l,s=Ke(s)}return t.set(e,n),n}function U4(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Tr(t)?[]:D4(t,this._c):[].concat(o),n],l=Ws(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=Ws(t,s[y],a);u=nt(v.top,u),p=Mr(v.right,p),m=Mr(v.bottom,m),g=nt(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function B4(e){let{width:t,height:o}=Vs(e);return{width:t,height:o}}function F4(e,t,o){let n=Fe(t),a=Be(t),i=o==="fixed",s=Ir(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=_e(0);function p(){u.x=bo(a)}if(n||!n&&!i)if((Lt(t)!=="body"||rr(a))&&(l=zr(t)),n){let v=Ir(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?qs(a,l):_e(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function kn(e){return Se(e).position==="static"}function js(e,t){if(!Fe(e)||Se(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Be(e)===o&&(o=o.ownerDocument.body),o}function Xs(e,t){let o=de(e);if(Tr(e))return o;if(!Fe(e)){let a=Ke(e);for(;a&&!At(a);){if(xe(a)&&!kn(a))return a;a=Ke(a)}return o}let n=js(e,t);for(;n&&Fs(n)&&kn(n);)n=js(n,t);return n&&At(n)&&kn(n)&&!or(n)?o:n||Hs(e)||o}var H4=async function(e){let t=this.getOffsetParent||Xs,o=this.getDimensions,n=await o(e.floating);return{reference:F4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $4(e){return Se(e).direction==="rtl"}var vo={convertOffsetParentRelativeRectToViewportRelativeRect:k4,getDocumentElement:Be,getClippingRect:U4,getOffsetParent:Xs,getElementRects:H4,getClientRects:T4,getDimensions:B4,getScale:nr,isElement:xe,isRTL:$4};var Qs=Ps,Js=Ds;var ec=(e,t,o)=>{let n=new Map,a={platform:vo,...o},i={...a.platform,_c:n};return Is(e,t,{...a,platform:i})};function tc(e){return G4(e)}function Tn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function G4(e){for(let t=e;t;t=Tn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Tn(e);t;t=Tn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||or(o)||t.tagName==="BODY"))return t}return null}async function rc(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},ec(e,t,{strategy:n.strategy,platform:{...vo,getOffsetParent:a=>vo.getOffsetParent(a,tc)},middleware:[Js({crossAxis:!0}),Qs({allowedPlacements:[n.placement]})]})}var gr=L(I());var aa=L(ae());var oc=L(ae(),1);var zn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function nc(e,t){return(0,oc.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Pr(e);try{return JSON.parse(o)}catch{return Pr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Dr,...t??{}})}function W4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!xo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!xo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!xo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function xo(e,t){try{return W4(e,t)}catch{return!1}}function Dr(e,t){return!xo(e,t)}function Pr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function So(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var ac=L(ae(),1);var In=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:Dr,attribute:!1,...t};(0,ac.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var Co=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Ot=L(ae(),1);var Eo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var sc=L(V(),1);var Lo=globalThis,j4=Lo.ShadowRoot&&(Lo.ShadyCSS===void 0||Lo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ic=(e,t)=>{if(j4)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=Lo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Ao=class extends sc.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ic(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){zn(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function cc(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var ir=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},fc,lc=Symbol("constructorPrototype"),dc=Symbol("constructorName"),pc=Symbol("exportpartsDebouncer"),uc=Symbol("dynamicDependenciesLoaded"),ar=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ar.eventName="exportparts-updated";var He=class extends Ao{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[fc]=new Eo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[pc].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[dc]=this.constructor.name,this[lc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[dc]&&Object.setPrototypeOf(this,this[lc])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[uc]||(o[uc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ar.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ar.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ar)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=cc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(O=>O.trim());for(let O of S)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};fc=pc;ir([(0,Ot.property)()],He.prototype,"exportpartsPrefix",void 0);ir([nc([])],He.prototype,"exportpartsPrefixes",void 0);ir([(0,Ot.property)({reflect:!0})],He.prototype,"exportparts",void 0);ir([(0,Ot.property)()],He.prototype,"customStylesheet",void 0);ir([(0,Ot.property)()],He.prototype,"elementToFocus",void 0);ir([(0,Ot.state)()],He.prototype,"useAdoptedStyleSheets",void 0);function Oo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ur=Symbol("internalReduxEventsUnsubscribers"),it=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),V4=So(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Rt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Rt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[it].has(s.store):this[it].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[it].set(s,l.subscribe(()=>this.updateFromStores())),this[Ur].set(s,[]),Oo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[Ur].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[it].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[it].has(s)&&this[it].get(s)(),this[it].delete(s),(l=this[Ur].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ur].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=it,o=Rt,n=Ur,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),hc=class extends V4(He){};function Ce(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ze(e){return!!e&&!!e[j]}function Me(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===e0})(e)||Array.isArray(e)||!!e[Sc]||!!(!((t=e.constructor)===null||t===void 0)&&t[Sc])||Wn(e)||jn(e))}function wt(e,t,o){o===void 0&&(o=!1),lr(e)===0?(o?Object.keys:cr)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function lr(e){var t=e[j];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Wn(e)?2:jn(e)?3:0}function sr(e,t){return lr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function K4(e,t){return lr(e)===2?e.get(t):e[t]}function Cc(e,t,o){var n=lr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Ec(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Wn(e){return Q4&&e instanceof Map}function jn(e){return J4&&e instanceof Set}function st(e){return e.o||e.t}function Vn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Oc(e);delete t[j];for(var o=cr(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Kn(e,t){return t===void 0&&(t=!1),Zn(e)||Ze(e)||!Me(e)||(lr(e)>1&&(e.set=e.add=e.clear=e.delete=Z4),Object.freeze(e),t&&wt(e,(function(o,n){return Kn(n,!0)}),!0)),e}function Z4(){Ce(2)}function Zn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function $e(e){var t=Gn[e];return t||Ce(18,e),t}function q4(e,t){Gn[e]||(Gn[e]=t)}function Fn(){return Fr}function Pn(e,t){t&&($e("Patches"),e.u=[],e.s=[],e.v=t)}function Ro(e){Hn(e),e.p.forEach(Y4),e.p=null}function Hn(e){e===Fr&&(Fr=e.l)}function mc(e){return Fr={p:[],l:Fr,h:e,m:!0,_:0}}function Y4(e){var t=e[j];t.i===0||t.i===1?t.j():t.g=!0}function Dn(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||$e("ES5").S(t,e,n),n?(o[j].P&&(Ro(t),Ce(4)),Me(e)&&(e=wo(t,e),t.l||No(t,e)),t.u&&$e("Patches").M(o[j].t,e,t.u,t.s)):e=wo(t,o,[]),Ro(t),t.u&&t.v(t.u,t.s),e!==Ac?e:void 0}function wo(e,t,o){if(Zn(t))return t;var n=t[j];if(!n)return wt(t,(function(l,u){return gc(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return No(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Vn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),wt(i,(function(l,u){return gc(e,n,a,l,u,o,s)})),No(e,a,!1),o&&e.u&&$e("Patches").N(n,o,e.u,e.s)}return n.o}function gc(e,t,o,n,a,i,s){if(Ze(a)){var l=wo(e,a,i&&t&&t.i!==3&&!sr(t.R,n)?i.concat(n):void 0);if(Cc(o,n,l),!Ze(l))return;e.m=!1}else s&&o.add(a);if(Me(a)&&!Zn(a)){if(!e.h.D&&e._<1)return;wo(e,a),t&&t.A.l||No(e,a)}}function No(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Kn(t,o)}function Un(e,t){var o=e[j];return(o?st(o):e)[t]}function yc(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function ct(e){e.P||(e.P=!0,e.l&&ct(e.l))}function Bn(e){e.o||(e.o=Vn(e.t))}function $n(e,t,o){var n=Wn(t)?$e("MapSet").F(t,o):jn(t)?$e("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Fn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=Hr;s&&(u=[l],p=Br);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):$e("ES5").J(t,o);return(o?o.A:Fn()).p.push(n),n}function X4(e){return Ze(e)||Ce(22,e),(function t(o){if(!Me(o))return o;var n,a=o[j],i=lr(o);if(a){if(!a.P&&(a.i<4||!$e("ES5").K(a)))return a.t;a.I=!0,n=bc(o,i),a.I=!1}else n=bc(o,i);return wt(n,(function(s,l){a&&K4(a.t,s)===l||Cc(n,s,t(l))})),i===3?new Set(n):n})(e)}function bc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Vn(e)}function Lc(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[j];return Hr.get(p,s)},set:function(p){var m=this[j];Hr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][j];if(!u.P)switch(u.i){case 5:n(u)&&ct(u);break;case 4:o(u)&&ct(u)}}}function o(s){for(var l=s.t,u=s.k,p=cr(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==j){var y=l[g];if(y===void 0&&!sr(l,g))return!0;var v=u[g],x=v&&v[j];if(x?x.t!==y:!Ec(v,y))return!0}}var S=!!l[j];return p.length!==cr(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Ce(3,JSON.stringify(st(s)))}var i={};q4("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var v=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(v,""+x,e(x,!0));return v}var S=Oc(y);delete S[j];for(var O=cr(S),A=0;A<O.length;A++){var N=O[A];S[N]=e(N,g||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),m={i:u?5:4,A:l?l.A:Fn(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,j,{value:m,writable:!0}),p},S:function(s,l,u){u?Ze(l)&&l[j].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[j];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)wt(v,(function(T){T!==j&&(y[T]!==void 0||sr(y,T)?x[T]||p(v[T]):(x[T]=!0,ct(g)))})),wt(y,(function(T){v[T]!==void 0||sr(v,T)||(x[T]=!1,ct(g))}));else if(S===5){if(n(g)&&(ct(g),x.length=!0),v.length<y.length)for(var O=v.length;O<y.length;O++)x[O]=!1;else for(var A=y.length;A<v.length;A++)x[A]=!0;for(var N=Math.min(v.length,y.length),M=0;M<N;M++)v.hasOwnProperty(M)||(x[M]=!0),x[M]===void 0&&p(v[M])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var vc,Fr,qn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Q4=typeof Map<"u",J4=typeof Set<"u",xc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ac=qn?Symbol.for("immer-nothing"):((vc={})["immer-nothing"]=!0,vc),Sc=qn?Symbol.for("immer-draftable"):"__$immer_draftable",j=qn?Symbol.for("immer-state"):"__$immer_state";var e0=""+Object.prototype.constructor,cr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Oc=Object.getOwnPropertyDescriptors||function(e){var t={};return cr(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Gn={},Hr={get:function(e,t){if(t===j)return e;var o=st(e);if(!sr(o,t))return(function(a,i,s){var l,u=yc(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!Me(n)?n:n===Un(e.t,t)?(Bn(e),e.o[t]=$n(e.A.h,n,e)):n},has:function(e,t){return t in st(e)},ownKeys:function(e){return Reflect.ownKeys(st(e))},set:function(e,t,o){var n=yc(st(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Un(st(e),t),i=a?.[j];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Ec(o,a)&&(o!==void 0||sr(e.t,t)))return!0;Bn(e),ct(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Un(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bn(e),ct(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=st(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Ce(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ce(12)}},Br={};wt(Hr,(function(e,t){Br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Br.deleteProperty=function(e,t){return Br.set.call(this,e,t,void 0)},Br.set=function(e,t,o){return Hr.set.call(this,e[0],t,o,e[0])};var t0=(function(){function e(o){var n=this;this.O=xc,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(S){var O=this;S===void 0&&(S=l);for(var A=arguments.length,N=Array(A>1?A-1:0),M=1;M<A;M++)N[M-1]=arguments[M];return u.produce(S,(function(T){var U;return(U=i).call.apply(U,[O,T].concat(N))}))}}var p;if(typeof i!="function"&&Ce(6),s!==void 0&&typeof s!="function"&&Ce(7),Me(a)){var m=mc(n),g=$n(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?Ro(m):Hn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Pn(m,s),Dn(S,m)}),(function(S){throw Ro(m),S})):(Pn(m,s),Dn(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Ac&&(p=void 0),n.D&&Kn(p,!0),s){var v=[],x=[];$e("Patches").M(a,p,v,x),s(v,x)}return p}Ce(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Me(o)||Ce(8),Ze(o)&&(o=X4(o));var n=mc(this),a=$n(this,o,void 0);return a[j].C=!0,Hn(n),a},t.finishDraft=function(o,n){var a=o&&o[j],i=a.A;return Pn(i,n),Dn(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!xc&&Ce(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=$e("Patches").$;return Ze(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),he=new t0,r0=he.produce,R7=he.produceWithPatches.bind(he),w7=he.setAutoFreeze.bind(he),N7=he.setUseProxies.bind(he),_7=he.applyPatches.bind(he),M7=he.createDraft.bind(he),k7=he.finishDraft.bind(he),_o=r0;function Nt(e){"@babel/helpers - typeof";return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(e)}function Rc(e,t){if(Nt(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(Nt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wc(e){var t=Rc(e,"string");return Nt(t)=="symbol"?t:t+""}function Nc(e,t,o){return(t=wc(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _c(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Yn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?_c(Object(o),!0).forEach(function(n){Nc(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_c(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function ie(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Mc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Xn=function(){return Math.random().toString(36).substring(7).split("").join(".")},Mo={INIT:"@@redux/INIT"+Xn(),REPLACE:"@@redux/REPLACE"+Xn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Xn()}};function o0(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Qn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ie(1));return o(Qn)(e,t)}if(typeof e!="function")throw new Error(ie(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(ie(3));return i}function g(S){if(typeof S!="function")throw new Error(ie(4));if(u)throw new Error(ie(5));var O=!0;return p(),l.push(S),function(){if(O){if(u)throw new Error(ie(6));O=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!o0(S))throw new Error(ie(7));if(typeof S.type>"u")throw new Error(ie(8));if(u)throw new Error(ie(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var O=s=l,A=0;A<O.length;A++){var N=O[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(ie(10));a=S,y({type:Mo.REPLACE})}function x(){var S,O=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ie(11));function M(){N.next&&N.next(m())}M();var T=O(M);return{unsubscribe:T}}},S[Mc]=function(){return this},S}return y({type:Mo.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[Mc]=x,n}function n0(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:Mo.INIT});if(typeof n>"u")throw new Error(ie(12));if(typeof o(void 0,{type:Mo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function kc(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{n0(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],O=o[S],A=p[S],N=O(A,m);if(typeof N>"u"){var M=m&&m.type;throw new Error(ie(14))}v[S]=N,y=y||N!==A}return y=y||i.length!==Object.keys(p).length,y?v:p}}function dr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Tc(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(ie(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=dr.apply(void 0,l)(a.dispatch),Yn(Yn({},a),{},{dispatch:i})}}}function zc(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var Ic=zc();Ic.withExtraArgument=zc;var Jn=Ic;var Fc=(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),a0=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},ur=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},i0=Object.defineProperty,s0=Object.defineProperties,c0=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,l0=Object.prototype.hasOwnProperty,d0=Object.prototype.propertyIsEnumerable,Dc=function(e,t,o){return t in e?i0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},lt=function(e,t){for(var o in t||(t={}))l0.call(t,o)&&Dc(e,o,t[o]);if(Pc)for(var n=0,a=Pc(t);n<a.length;n++){var o=a[n];d0.call(t,o)&&Dc(e,o,t[o])}return e},ea=function(e,t){return s0(e,c0(t))},u0=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var f0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dr:dr.apply(null,arguments)},Y7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function p0(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function dt(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return lt(lt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var h0=(function(e){Fc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ur([void 0],o[0].concat(this)))):new(t.bind.apply(t,ur([void 0],o.concat(this))))},t})(Array),m0=(function(e){Fc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,ur([void 0],o[0].concat(this)))):new(t.bind.apply(t,ur([void 0],o.concat(this))))},t})(Array);function oa(e){return Me(e)?_o(e,function(){}):e}function g0(e){return typeof e=="boolean"}function y0(){return function(t){return b0(t)}}function b0(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new h0;if(o&&(g0(o)?p.push(Jn):p.push(Jn.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var ta=!0;function Hc(e){var t=y0(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(p0(a))v=kc(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(t),!ta&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ta&&x.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Tc.apply(void 0,x),O=dr;u&&(O=f0(lt({trace:!ta},typeof u=="object"&&u)));var A=new m0(S),N=A;Array.isArray(y)?N=ur([S],y):typeof y=="function"&&(N=y(A));var M=O.apply(void 0,N);return Qn(v,m,M)}function $c(e){var t={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function v0(e){return typeof e=="function"}function x0(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?$c(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(v0(e))u=function(){return oa(e())};else{var p=oa(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=ur([i[y.type]],s.filter(function(x){var S=x.matcher;return S(y)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[l]),v.reduce(function(x,S){if(S)if(Ze(x)){var O=x,A=S(O,y);return A===void 0?x:A}else{if(Me(x))return _o(x,function(N){return S(N,y)});var A=S(x,y);if(A===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return x},g)}return m.getInitialState=u,m}function S0(e,t){return e+"/"+t}function Gc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:oa(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=S0(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?dt(y,x):dt(y)});function u(){var m=typeof e.extraReducers=="function"?$c(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],O=S===void 0?void 0:S,A=lt(lt({},y),s);return x0(o,function(N){for(var M in A)N.addCase(M,A[M]);for(var T=0,U=x;T<U.length;T++){var W=U[T];N.addMatcher(W.matcher,W.reducer)}O&&N.addDefaultCase(O)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var C0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",E0=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=C0[Math.random()*64|0];return t},L0=["name","message","stack","code"],ra=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),Uc=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),A0=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=L0;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},em=(function(){function e(t,o,n){var a=dt(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:ea(lt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=dt(t+"/pending",function(m,g,y){return{payload:void 0,meta:ea(lt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=dt(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||A0)(m||"Rejected"),meta:ea(lt({},x||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function p(m){return function(g,y,v){var x=n?.idGenerator?n.idGenerator(m):E0(),S=new u,O,A=!1;function N(T){O=T,S.abort()}var M=(function(){return u0(this,null,function(){var T,U,W,Pe,gt,De,ue;return a0(this,function(be){switch(be.label){case 0:return be.trys.push([0,4,,5]),Pe=(T=n?.condition)==null?void 0:T.call(n,m,{getState:y,extra:v}),R0(Pe)?[4,Pe]:[3,2];case 1:Pe=be.sent(),be.label=2;case 2:if(Pe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,gt=new Promise(function(fe,yt){return S.signal.addEventListener("abort",function(){return yt({name:"AbortError",message:O||"Aborted"})})}),g(i(x,m,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([gt,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(fe,yt){return new ra(fe,yt)},fulfillWithValue:function(fe,yt){return new Uc(fe,yt)}})).then(function(fe){if(fe instanceof ra)throw fe;return fe instanceof Uc?a(fe.payload,x,m,fe.meta):a(fe,x,m)})])];case 3:return W=be.sent(),[3,5];case 4:return De=be.sent(),W=De instanceof ra?s(null,x,m,De.payload,De.meta):s(De,x,m),[3,5];case 5:return ue=n&&!n.dispatchConditionRejection&&s.match(W)&&W.meta.condition,ue||g(W),[2,W]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:m,unwrap:function(){return M.then(O0)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function O0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function R0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wc="listener",jc="completed",Vc="cancelled",tm="task-"+Vc,rm="task-"+jc,om=Wc+"-"+Vc,nm=Wc+"-"+jc;var na="listenerMiddleware";var am=dt(na+"/add"),im=dt(na+"/removeAll"),sm=dt(na+"/remove");var Bc,cm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Bc||(Bc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},w0=function(e){return function(t){setTimeout(t,e)}},lm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:w0(10);Lc();var N0=So(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),ko=class extends N0(Object){};window.ftReduxStores||(window.ftReduxStores={});var Kc=class e extends ko{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Oo(i))return i;if(a==null)return;let s=Gc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Hc({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=Pr(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Co;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,p=i[u];return p?(...m)=>{let g=p(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var To=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var zo=L(I()),_0="ft-app-info",fr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};fr.eventName="authentication-change";var $r=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};$r.eventName="ui-locale-changed";var M0={session:(e,t)=>{(0,zo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>P.dispatchEvent(new fr(t.payload)),0))}},P=zo.FtReduxStore.get({name:_0,reducers:M0,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Zc=L(I()),Io=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Dm=(0,Zc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>To.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Io([(0,aa.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Io([(0,aa.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Io([In({store:P.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Io([In({store:P.name})],t.prototype,"uiLocale",void 0),t});var qc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(qc||(qc={}));var Yc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Yc||(Yc={}));var Xc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Xc||(Xc={}));var Qc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Qc||(Qc={}));var Jc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Jc||(Jc={}));var el;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(el||(el={}));var tl;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(tl||(tl={}));var rl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(rl||(rl={}));var ol;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(ol||(ol={}));var nl;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(nl||(nl={}));var al;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(al||(al={}));var il;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(il||(il={}));var sl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(sl||(sl={}));var cl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(cl||(cl={}));var ll;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ll||(ll={}));var dl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(dl||(dl={}));var ul;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ul||(ul={}));var fl;(function(e){e.ASC="ASC",e.DESC="DESC"})(fl||(fl={}));var pl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(pl||(pl={}));var hl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(hl||(hl={}));var ml;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ml||(ml={}));var gl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(gl||(gl={}));var yl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(yl||(yl={}));var bl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(bl||(bl={}));var vl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(vl||(vl={}));var xl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(xl||(xl={}));var Sl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Sl||(Sl={}));var ee;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(ee||(ee={}));var Ee;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Ee||(Ee={}));var Cl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Cl||(Cl={}));var El;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(El||(El={}));var Ll;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ll||(Ll={}));var Al;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Al||(Al={}));var Ol;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Ol||(Ol={}));var Rl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rl||(Rl={}));var wl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(wl||(wl={}));var Nl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Nl||(Nl={}));var _l;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(_l||(_l={}));var Ml;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ml||(Ml={}));var kl;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(kl||(kl={}));var Tl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Tl||(Tl={}));var k0={[ee.PERSONAL_BOOK_SHARE_USER]:[ee.PERSONAL_BOOK_USER],[ee.HTML_EXPORT_USER]:[ee.PERSONAL_BOOK_USER],[ee.PDF_EXPORT_USER]:[ee.PERSONAL_BOOK_USER],[ee.KHUB_ADMIN]:[ee.CONTENT_PUBLISHER],[ee.ADMIN]:[ee.KHUB_ADMIN,ee.USERS_ADMIN,ee.PORTAL_ADMIN,ee.BEHAVIOR_DATA_USER],[ee.GENERATIVE_AI_EXPORT_USER]:[ee.GENERATIVE_AI_USER]};function zl(e,t){return e===t||(k0[e]??[]).some(o=>zl(o,t))}function Il(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>zl(n,t))}var Fo=L(I());var ia=L(I());var _t=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=P.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var pr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:_t.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):_t.await()}};var me=class extends pr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ia.CacheRegistry,this.cache=t?a.commonCache:new ia.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var Po=class extends me{async listMySearches(){let{session:t}=P.getState();return Il(t,ee.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Do=class extends me{async listMyBookmarks(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Uo=class extends me{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var Bo=class extends me{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var T0="ft-user-assets",z0={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Ee).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ca(e,o,[...sa(e,o),a]),Pl(e,o,1,n),Dl(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ca(e,o,sa(e,o).map(a=>a.id===n.id?n:a)),Dl(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ca(e,o,sa(e,o).filter(i=>i.id!==a)),Pl(e,o,-1,n)}},Ul={[Ee.SEARCHES]:"savedSearches",[Ee.BOOKMARKS]:"bookmarks",[Ee.BOOKS]:void 0,[Ee.COLLECTIONS]:void 0},sa=(e,t)=>{var o;let n=Ul[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ca=(e,t,o)=>{let n=Ul[t];n&&(e[n]=o)},Pl=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Ee.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Dl=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ce=Fo.FtReduxStore.get({name:T0,reducers:z0,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ee).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),la=class{constructor(t=new Uo,o=new Bo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Do,this.savedSearchesService=new Po,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=P.getState();(0,Fo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ce.actions.clearAssetCount(),ce.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ce.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ce.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ce.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ce.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ce.getState().assetCounts.allAsset[t]!==o.count&&ce.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ce.getState().assetCounts.bookmarkByMap[t]!==o.count&&ce.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ce.getState().assetCounts.bookmarkByMap).length!==0;t===Ee.BOOKMARKS&&o&&ce.actions.clearBookmarkCountByMap(),ce.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ce.actions.bookmarks(o)}}},I0=new la;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=I0);var da=class{addCommand(t,o=!1){P.commands.add(t,o)}consumeCommand(t){return P.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new da;var Le=L(I());var Bl,hr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},P0=Symbol("clearAfterUnitTest"),Ho=class extends(0,Le.withEventBus)(me){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Bl]=()=>{this.defaultMessages={},this.cache=new Le.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=P.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Le.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Le.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Le.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new hr({loadedContexts:t})),this.dispatchEvent(new hr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new hr({loadedContexts:[t]})),this.dispatchEvent(new hr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Le.delay)(0).then(()=>n()).catch(()=>null)))}};Bl=P0;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ho{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ho{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Gr=window.FluidTopicsI18nService,ua=window.FluidTopicsCustomI18nService;var Fl=L(I()),fa=class{highlightHtml(t,o,n){(0,Fl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new fa;var Hl=L(I());var pa=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return Hl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new pa;var $l=L(I());var Wr=class{static get(t,o){var n,a;let i=P.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new $l.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ha=class{urlToSearchRequest(t){return Wr.get().parse(t)}searchRequestToUrl(t){return Wr.get().serialize(t)}};window.FluidTopicsUrlService=new ha;var qe=L(I());var Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Mt.eventName="change";var ma=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Gl=new ma;var $o=class e extends qe.WithEventBus{static build(){return new e(window.history,Gl,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,qe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Mt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Mt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Mt.eventName,t)}currentItem(){return(0,qe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,qe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,qe.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,qe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=$o.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wl=L(V());var jl=Wl.css`
842
842
  `;var Zl=L(V()),ge=L(ae()),zt=L(I());var kt=L(I());function Vl(e,t){let{authenticationRequired:o,session:n}=P.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Go=class extends pr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ga=class e extends kt.FtStateManager{static build(t){return new e(P,t)}constructor(t,o){super(),this.store=t,this.cache=new kt.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Go,this.cleanSessionDebouncer=new kt.Debouncer,this.reloadDebouncer=new kt.Debouncer(500),this.apiProvider=o??(()=>_t.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(fr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>Vl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var o,n,a,i,s;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((o=this.localesConfiguration.availableUiLocales)!==null&&o!==void 0?o:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((a=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&a!==void 0?a:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new $r(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Kl=ga.build();var Tt=class extends Event{constructor(t,o,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=a??!1}};var jr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Tt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(o);i===void 0&&a.callbacks.set(o,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var se=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},q=class extends zt.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.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Kl,this.contextRoot=new jr}render(){return Zl.html`
843
843
  <slot></slot>
844
844
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Gr.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};q.elementDefinitions={};q.styles=jl;se([(0,ge.property)()],q.prototype,"baseUrl",void 0);se([(0,ge.property)()],q.prototype,"apiIntegrationIdentifier",void 0);se([(0,ge.property)()],q.prototype,"apiIntegrationAppVersion",void 0);se([(0,ge.property)()],q.prototype,"uiLocale",void 0);se([(0,zt.jsonProperty)(null)],q.prototype,"availableUiLocales",void 0);se([(0,zt.jsonProperty)(null)],q.prototype,"metadataConfiguration",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"editorMode",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"noCustom",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"openExternalDocumentInNewTab",void 0);se([(0,ge.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],q.prototype,"noCustomComponent",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"withManualResources",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"navigatorOnline",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"forcedOffline",void 0);se([(0,ge.property)({type:Boolean})],q.prototype,"authenticationRequired",void 0);se([(0,zt.jsonProperty)([])],q.prototype,"messageContexts",void 0);se([(0,zt.jsonProperty)(void 0)],q.prototype,"session",void 0);var Yl=L(I());var ql={"ft-app-context":q};(0,Yl.customElements)(ql);var Xl=L(ae());var ya=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},mr=new ya;var B0=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Kr=Symbol("i18nAttributes"),Ql=Symbol("i18nListAttributes"),Jl=Symbol("i18nProperties"),Wo=Symbol("i18nContexts"),Vr=Symbol("i18nUnsubs"),e2=(0,gr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ua:Gr}i18n(i){let{context:s,key:l,message:u}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let y=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...y)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(mr.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,p=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[Kr])===null||s===void 0||s.forEach((m,g)=>u[g]=p(m,g,u[g])),(l=this[Ql])===null||l===void 0||l.forEach((m,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(v=>p(m,g,v))})}updateI18nProperties(i){var s;(s=this[Jl])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Wo].set(u,{isCustomContext:l}),this[Vr].has(u)||this[Vr].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[Wo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Vr].forEach(i=>i()),this[Vr].clear()}}return t=Wo,o=Vr,B0([(0,Xl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),jo=class extends e2(gr.FtLitElement){},Vo=class extends e2(gr.FtLitElementRedux){};var t2=L(I());var ba=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?mr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},F0=new ba;var r2=(e,t)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:t2.hasChanged,converter:mr,...t}),o[Kr]=(a=o[Kr])!==null&&a!==void 0?a:new Map,o[Kr].set(n,e??{})};var o2=L(V());var n2=o2.css`
@@ -44,7 +44,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
44
44
  input::-webkit-search-results-decoration {
45
45
  display: none;
46
46
  }
47
- `;var vl={};var bi={};W(bi,{ParametrizedLabelResolver:()=>ho});var ho=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Hi={};W(Hi,{FtCommandQueue:()=>mo,FtLitElementRedux:()=>Gt,FtReduxStore:()=>Vt,FtStateManager:()=>xo,ReduxWatcher:()=>hn,clearAllStores:()=>rf,isFtReduxStore:()=>gr,redux:()=>mr,reduxEventListener:()=>vu,reduxReactive:()=>bu,watch:()=>of,withRedux:()=>xl});var bu=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},mr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:nt,attribute:!1,...e};A(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},vu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var mo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function gr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var go=Symbol("internalReduxEventsUnsubscribers"),vt=Symbol("internalStoresUnsubscribers"),Ht=Symbol("internalStores"),xl=pe(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Ht].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ht].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ht].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Ht].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Ht].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Ht].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[vt].has(s.store):this[vt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[vt].set(s,c.subscribe(()=>this.updateFromStores())),this[go].set(s,[]),gr(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[go].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[vt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[vt].has(s)&&this[vt].get(s)(),this[vt].delete(s),(c=this[go].get(s))===null||c===void 0||c.forEach(d=>d()),this[go].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=vt,r=Ht,o=go,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Gt=class extends xl(Z){};function ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function st(t){return!!t&&!!t[ee]}function We(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ru})(t)||Array.isArray(t)||!!t[Rl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Rl])||Ri(t)||wi(t))}function Wt(t,e,r){r===void 0&&(r=!1),vr(t)===0?(r?Object.keys:br)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function vr(t){var e=t[ee];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ri(t)?2:wi(t)?3:0}function yr(t,e){return vr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function xu(t,e){return vr(t)===2?t.get(e):t[e]}function wl(t,e,r){var o=vr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function _l(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ri(t){return Lu&&t instanceof Map}function wi(t){return Ou&&t instanceof Set}function xt(t){return t.o||t.t}function _i(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Tl(t);delete e[ee];for(var r=br(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Ni(t,e){return e===void 0&&(e=!1),Mi(t)||st(t)||!We(t)||(vr(t)>1&&(t.set=t.add=t.clear=t.delete=Su),Object.freeze(t),e&&Wt(t,(function(r,o){return Ni(o,!0)}),!0)),t}function Su(){ze(2)}function Mi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function tt(t){var e=Oi[t];return e||ze(18,t),e}function Cu(t,e){Oi[t]||(Oi[t]=e)}function Ei(){return bo}function vi(t,e){e&&(tt("Patches"),t.u=[],t.s=[],t.v=e)}function ln(t){Ai(t),t.p.forEach(Eu),t.p=null}function Ai(t){t===bo&&(bo=t.l)}function Sl(t){return bo={p:[],l:bo,h:t,m:!0,_:0}}function Eu(t){var e=t[ee];e.i===0||e.i===1?e.j():e.g=!0}function xi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||tt("ES5").S(e,t,o),o?(r[ee].P&&(ln(e),ze(4)),We(t)&&(t=dn(e,t),e.l||un(e,t)),e.u&&tt("Patches").M(r[ee].t,t,e.u,e.s)):t=dn(e,r,[]),ln(e),e.u&&e.v(e.u,e.s),t!==Ml?t:void 0}function dn(t,e,r){if(Mi(e))return e;var o=e[ee];if(!o)return Wt(e,(function(c,d){return Cl(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return un(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=_i(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Wt(i,(function(c,d){return Cl(t,o,a,c,d,r,s)})),un(t,a,!1),r&&t.u&&tt("Patches").N(o,r,t.u,t.s)}return o.o}function Cl(t,e,r,o,a,i,s){if(st(a)){var c=dn(t,a,i&&e&&e.i!==3&&!yr(e.R,o)?i.concat(o):void 0);if(wl(r,o,c),!st(c))return;t.m=!1}else s&&r.add(a);if(We(a)&&!Mi(a)){if(!t.h.D&&t._<1)return;dn(t,a),e&&e.A.l||un(t,a)}}function un(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ni(e,r)}function Si(t,e){var r=t[ee];return(r?xt(r):t)[e]}function El(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function St(t){t.P||(t.P=!0,t.l&&St(t.l))}function Ci(t){t.o||(t.o=_i(t.t))}function Li(t,e,r){var o=Ri(e)?tt("MapSet").F(e,r):wi(e)?tt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Ei(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=vo;s&&(d=[c],u=yo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):tt("ES5").J(e,r);return(r?r.A:Ei()).p.push(o),o}function Au(t){return st(t)||ze(22,t),(function e(r){if(!We(r))return r;var o,a=r[ee],i=vr(r);if(a){if(!a.P&&(a.i<4||!tt("ES5").K(a)))return a.t;a.I=!0,o=Al(r,i),a.I=!1}else o=Al(r,i);return Wt(o,(function(s,c){a&&xu(a.t,s)===c||wl(o,s,e(c))})),i===3?new Set(o):o})(t)}function Al(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _i(t)}function Nl(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[ee];return vo.get(u,s)},set:function(u){var m=this[ee];vo.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ee];if(!d.P)switch(d.i){case 5:o(d)&&St(d);break;case 4:r(d)&&St(d)}}}function r(s){for(var c=s.t,d=s.k,u=br(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==ee){var y=c[h];if(y===void 0&&!yr(c,h))return!0;var b=d[h],x=b&&b[ee];if(x?x.t!==y:!_l(b,y))return!0}}var C=!!c[ee];return u.length!==br(c).length+(C?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&ze(3,JSON.stringify(xt(s)))}var i={};Cu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(b,""+x,t(x,!0));return b}var C=Tl(y);delete C[ee];for(var O=br(C),R=0;R<O.length;R++){var N=O[R];C[N]=t(N,h||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(d,s),m={i:d?5:4,A:c?c.A:Ei(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ee,{value:m,writable:!0}),u},S:function(s,c,d){d?st(c)&&c[ee].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[ee];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)Wt(b,(function(S){S!==ee&&(y[S]!==void 0||yr(y,S)?x[S]||u(b[S]):(x[S]=!0,St(h)))})),Wt(y,(function(S){b[S]!==void 0||yr(b,S)||(x[S]=!1,St(h))}));else if(C===5){if(o(h)&&(St(h),x.length=!0),b.length<y.length)for(var O=b.length;O<y.length;O++)x[O]=!1;else for(var R=y.length;R<b.length;R++)x[R]=!0;for(var N=Math.min(b.length,y.length),E=0;E<N;E++)b.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Ll,bo,Ti=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Lu=typeof Map<"u",Ou=typeof Set<"u",Ol=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ml=Ti?Symbol.for("immer-nothing"):((Ll={})["immer-nothing"]=!0,Ll),Rl=Ti?Symbol.for("immer-draftable"):"__$immer_draftable",ee=Ti?Symbol.for("immer-state"):"__$immer_state";var Ru=""+Object.prototype.constructor,br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Tl=Object.getOwnPropertyDescriptors||function(t){var e={};return br(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Oi={},vo={get:function(t,e){if(e===ee)return t;var r=xt(t);if(!yr(r,e))return(function(a,i,s){var c,d=El(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!We(o)?o:o===Si(t.t,e)?(Ci(t),t.o[e]=Li(t.A.h,o,t)):o},has:function(t,e){return e in xt(t)},ownKeys:function(t){return Reflect.ownKeys(xt(t))},set:function(t,e,r){var o=El(xt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Si(xt(t),e),i=a?.[ee];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(_l(r,a)&&(r!==void 0||yr(t.t,e)))return!0;Ci(t),St(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Si(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ci(t),St(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=xt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ze(12)}},yo={};Wt(vo,(function(t,e){yo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),yo.deleteProperty=function(t,e){return yo.set.call(this,t,e,void 0)},yo.set=function(t,e,r){return vo.set.call(this,t[0],e,r,t[0])};var wu=(function(){function t(r){var o=this;this.O=Ol,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(C){var O=this;C===void 0&&(C=c);for(var R=arguments.length,N=Array(R>1?R-1:0),E=1;E<R;E++)N[E-1]=arguments[E];return d.produce(C,(function(S){var L;return(L=i).call.apply(L,[O,S].concat(N))}))}}var u;if(typeof i!="function"&&ze(6),s!==void 0&&typeof s!="function"&&ze(7),We(a)){var m=Sl(o),h=Li(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?ln(m):Ai(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return vi(m,s),xi(C,m)}),(function(C){throw ln(m),C})):(vi(m,s),xi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Ml&&(u=void 0),o.D&&Ni(u,!0),s){var b=[],x=[];tt("Patches").M(a,u,b,x),s(b,x)}return u}ze(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,s,c]})):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){We(r)||ze(8),st(r)&&(r=Au(r));var o=Sl(this),a=Li(this,r,void 0);return a[ee].C=!0,Ai(o),a},e.finishDraft=function(r,o){var a=r&&r[ee],i=a.A;return vi(i,o),xi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ol&&ze(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=tt("Patches").$;return st(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),we=new wu,_u=we.produce,Dg=we.produceWithPatches.bind(we),Ug=we.setAutoFreeze.bind(we),Fg=we.setUseProxies.bind(we),$g=we.applyPatches.bind(we),Bg=we.createDraft.bind(we),Hg=we.finishDraft.bind(we),fn=_u;function jt(t){"@babel/helpers - typeof";return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(t)}function kl(t,e){if(jt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(jt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Il(t){var e=kl(t,"string");return jt(e)=="symbol"?e:e+""}function Pl(t,e,r){return(e=Il(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function ki(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zl(Object(r),!0).forEach(function(o){Pl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zl(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ye(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ii=function(){return Math.random().toString(36).substring(7).split("").join(".")},pn={INIT:"@@redux/INIT"+Ii(),REPLACE:"@@redux/REPLACE"+Ii(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ii()}};function Nu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Pi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ye(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ye(1));return r(Pi)(t,e)}if(typeof t!="function")throw new Error(ye(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(ye(3));return i}function h(C){if(typeof C!="function")throw new Error(ye(4));if(d)throw new Error(ye(5));var O=!0;return u(),c.push(C),function(){if(O){if(d)throw new Error(ye(6));O=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!Nu(C))throw new Error(ye(7));if(typeof C.type>"u")throw new Error(ye(8));if(d)throw new Error(ye(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var O=s=c,R=0;R<O.length;R++){var N=O[R];N()}return C}function b(C){if(typeof C!="function")throw new Error(ye(10));a=C,y({type:pn.REPLACE})}function x(){var C,O=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ye(11));function E(){N.next&&N.next(m())}E();var S=O(E);return{unsubscribe:S}}},C[Dl]=function(){return this},C}return y({type:pn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Dl]=x,o}function Mu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:pn.INIT});if(typeof o>"u")throw new Error(ye(12));if(typeof r(void 0,{type:pn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function Ul(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{Mu(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},x=0;x<i.length;x++){var C=i[x],O=r[C],R=u[C],N=O(R,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(ye(14))}b[C]=N,y=y||N!==R}return y=y||i.length!==Object.keys(u).length,y?b:u}}function xr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function Fl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ye(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=xr.apply(void 0,c)(a.dispatch),ki(ki({},a),{},{dispatch:i})}}}function $l(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var Bl=$l();Bl.withExtraArgument=$l;var zi=Bl;var Vl=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Tu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Sr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},ku=Object.defineProperty,Iu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,Hl=Object.getOwnPropertySymbols,zu=Object.prototype.hasOwnProperty,Du=Object.prototype.propertyIsEnumerable,Gl=function(t,e,r){return e in t?ku(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Ct=function(t,e){for(var r in e||(e={}))zu.call(e,r)&&Gl(t,r,e[r]);if(Hl)for(var o=0,a=Hl(e);o<a.length;o++){var r=a[o];Du.call(e,r)&&Gl(t,r,e[r])}return t},Di=function(t,e){return Iu(t,Pu(e))},Uu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Fu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xr:xr.apply(null,arguments)},iy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function $u(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Et(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Ct(Ct({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}var Bu=(function(t){Vl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Sr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],r.concat(this))))},e})(Array),Hu=(function(t){Vl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Sr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],r.concat(this))))},e})(Array);function $i(t){return We(t)?fn(t,function(){}):t}function Gu(t){return typeof t=="boolean"}function Wu(){return function(e){return ju(e)}}function ju(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Bu;if(r&&(Gu(r)?u.push(zi):u.push(zi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Ui=!0;function Kl(t){var e=Wu(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if($u(a))b=Ul(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(e),!Ui&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ui&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Fl.apply(void 0,x),O=xr;d&&(O=Fu(Ct({trace:!Ui},typeof d=="object"&&d)));var R=new Hu(C),N=R;Array.isArray(y)?N=Sr([C],y):typeof y=="function"&&(N=y(R));var E=O.apply(void 0,N);return Pi(b,m,E)}function Zl(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function Vu(t){return typeof t=="function"}function Ku(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?Zl(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(Vu(t))d=function(){return $i(t())};else{var u=$i(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=Sr([i[y.type]],s.filter(function(x){var C=x.matcher;return C(y)}).map(function(x){var C=x.reducer;return C}));return b.filter(function(x){return!!x}).length===0&&(b=[c]),b.reduce(function(x,C){if(C)if(st(x)){var O=x,R=C(O,y);return R===void 0?x:R}else{if(We(x))return fn(x,function(N){return C(N,y)});var R=C(x,y);if(R===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return x},h)}return m.getInitialState=d,m}function Zu(t,e){return t+"/"+e}function ql(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:$i(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Zu(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?Et(y,x):Et(y)});function d(){var m=typeof t.extraReducers=="function"?Zl(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],O=C===void 0?void 0:C,R=Ct(Ct({},y),s);return Ku(r,function(N){for(var E in R)N.addCase(E,R[E]);for(var S=0,L=x;S<L.length;S++){var T=L[S];N.addMatcher(T.matcher,T.reducer)}O&&N.addDefaultCase(O)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var qu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Yu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=qu[Math.random()*64|0];return e},Xu=["name","message","stack","code"],Fi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Wl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ju=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Xu;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},dy=(function(){function t(e,r,o){var a=Et(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Di(Ct({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=Et(e+"/pending",function(m,h,y){return{payload:void 0,meta:Di(Ct({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Et(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||Ju)(m||"Rejected"),meta:Di(Ct({},x||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function u(m){return function(h,y,b){var x=o?.idGenerator?o.idGenerator(m):Yu(),C=new d,O,R=!1;function N(S){O=S,C.abort()}var E=(function(){return Uu(this,null,function(){var S,L,T,F,Q,G,I;return Tu(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),F=(S=o?.condition)==null?void 0:S.call(o,m,{getState:y,extra:b}),ef(F)?[4,F]:[3,2];case 1:F=D.sent(),D.label=2;case 2:if(F===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Q=new Promise(function(V,le){return C.signal.addEventListener("abort",function(){return le({name:"AbortError",message:O||"Aborted"})})}),h(i(x,m,(L=o?.getPendingMeta)==null?void 0:L.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([Q,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(V,le){return new Fi(V,le)},fulfillWithValue:function(V,le){return new Wl(V,le)}})).then(function(V){if(V instanceof Fi)throw V;return V instanceof Wl?a(V.payload,x,m,V.meta):a(V,x,m)})])];case 3:return T=D.sent(),[3,5];case 4:return G=D.sent(),T=G instanceof Fi?s(null,x,m,G.payload,G.meta):s(G,x,m),[3,5];case 5:return I=o&&!o.dispatchConditionRejection&&s.match(T)&&T.meta.condition,I||h(T),[2,T]}})})})();return Object.assign(E,{abort:N,requestId:x,arg:m,unwrap:function(){return E.then(Qu)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function Qu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ef(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Yl="listener",Xl="completed",Jl="cancelled",uy="task-"+Jl,fy="task-"+Xl,py=Yl+"-"+Jl,hy=Yl+"-"+Xl;var Bi="listenerMiddleware";var my=Et(Bi+"/add"),gy=Et(Bi+"/removeAll"),yy=Et(Bi+"/remove");var jl,by=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(jl||(jl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},tf=function(t){return function(e){setTimeout(e,t)}},vy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tf(10);Nl();window.ftReduxStores||(window.ftReduxStores={});var Vt=class t extends at{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(gr(i))return i;if(a==null)return;let s=ql({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=Kl({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Be(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new mo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function rf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))gr(e)&&e.clear()}var hn=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);nt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function of(t,e,r){return new hn(t,e,r).watch()}var xo=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var ji={};W(ji,{scrollHelper:()=>nf});var Gi,mn=new Map,Wi=class{lock(e,r){if(r){let o=mn.get(r);if(o==null||o===e)return mn.set(r,e),r}}release(e,r){r&&mn.get(r)===e&&mn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of pa(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=It(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Gi=window.FluidTopicsScrollHelper)!==null&&Gi!==void 0?Gi:new Wi;var nf=window.FluidTopicsScrollHelper;var Ki={};W(Ki,{SearchPlaceConverter:()=>Ar,SearchPlaceQueryParams:()=>H,isSearchPlaceQueryParams:()=>$1,serializeRequest:()=>cf});var Ql;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ql||(Ql={}));var e1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(e1||(e1={}));var t1;(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"})(t1||(t1={}));var r1;(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"})(r1||(r1={}));var o1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(o1||(o1={}));var n1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(n1||(n1={}));var a1;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(a1||(a1={}));var i1;(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"})(i1||(i1={}));var s1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(s1||(s1={}));var c1;(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"})(c1||(c1={}));var l1;(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"})(l1||(l1={}));var d1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(d1||(d1={}));var u1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(u1||(u1={}));var f1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(f1||(f1={}));var p1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(p1||(p1={}));var h1;(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"})(h1||(h1={}));var Cr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Cr||(Cr={}));var m1;(function(t){t.ASC="ASC",t.DESC="DESC"})(m1||(m1={}));var g1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(g1||(g1={}));var Vi;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Vi||(Vi={}));var A1=t=>Object.keys(Vi).includes(t);var y1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(y1||(y1={}));var b1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(b1||(b1={}));var v1;(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"})(v1||(v1={}));var Er;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Er||(Er={}));var L1=t=>Object.keys(Er).includes(t);var x1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(x1||(x1={}));var S1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(S1||(S1={}));var C1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(C1||(C1={}));var ce;(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"})(ce||(ce={}));var De;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(De||(De={}));var E1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(E1||(E1={}));var O1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(O1||(O1={}));var R1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(R1||(R1={}));var w1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(w1||(w1={}));var _1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(_1||(_1={}));var N1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(N1||(N1={}));var M1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(M1||(M1={}));var T1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(T1||(T1={}));var k1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(k1||(k1={}));var I1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(I1||(I1={}));var P1;(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"})(P1||(P1={}));var z1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(z1||(z1={}));var af={[ce.PERSONAL_BOOK_SHARE_USER]:[ce.PERSONAL_BOOK_USER],[ce.HTML_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.PDF_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.KHUB_ADMIN]:[ce.CONTENT_PUBLISHER],[ce.ADMIN]:[ce.KHUB_ADMIN,ce.USERS_ADMIN,ce.PORTAL_ADMIN,ce.BEHAVIOR_DATA_USER],[ce.GENERATIVE_AI_EXPORT_USER]:[ce.GENERATIVE_AI_USER]};function D1(t,e){return t===e||(af[t]??[]).some(r=>D1(r,e))}function U1(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>D1(o,e))}function sf(t){return`"${t}"`}function F1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function cf(t,e){return new Ar(t).serialize(e)}var H;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(H||(H={}));var lf=new Set(Object.values(H));function $1(t){return lf.has(t)}var Ar=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,u,m,h,y,b;let x=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&x.append(H.LOCALE,e.contentLocale):x.append(H.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append(H.QUERY,e.query);let C=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(C.length>0){let S=C.map(L=>{var T,F;let Q=((F=(T=L.valueFilter)===null||T===void 0?void 0:T.values)!==null&&F!==void 0?F:[]).map(G=>this.escapeFilters(G)).map(G=>sf(F1(G))).join("_");return`${L.key}~${Q}`}).join("*");x.append(H.VALUE_FILTERS,S)}let O=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(O.length>0){let S=O.map(L=>{var T;return`${L.key}~${(T=L.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");x.append(H.DATE_FILTERS,S)}let R=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&u!==void 0?u:[];if(R.length>0){let S=R.map(L=>{var T,F;return`${L.key}~${(T=L.rangeFilter)===null||T===void 0?void 0:T.from}_${(F=L.rangeFilter)===null||F===void 0?void 0:F.to}`}).join("*");x.append(H.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append(H.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append(H.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append(H.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&x.append(H.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append(H.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let N=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let S in N)x.append(S,N[S]);let E=new Array;return x.forEach((S,L)=>{E.push(this.encodeQueryString(L)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(R){console.warn("Could not decode search request query params, fallback on raw value",R)}let d=new URLSearchParams(e),u=d.get(H.LOCALE)==="all"?void 0:d.get(H.LOCALE),m=((r=d.get(H.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(H.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(H.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(H.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get(H.KEYWORD_MATCH),C=x?x.toUpperCase()===Cr.MANDATORY?Cr.MANDATORY:Cr.OPTIONAL:void 0,O={};for(let R of d.keys())$1(R)||(O[R]=d.get(R));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(H.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:A1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:It(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:O}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(H.FILTERS)&&(d=this.parseValueFilters((r=e.get(H.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(H.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(H.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(H.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(H.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(H.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(F1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Er[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(L1(e))return[{key:"ft:lastEdition",dateFilter:{type:Er[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[H.LOCALE,H.FILTERS,H.VALUE_FILTERS,H.DATE_FILTERS,H.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(H.LOCALE),r!==void 0&&o.searchParams.append(H.LOCALE,r),o.toString()}};var Yi={};W(Yi,{toFtFormComponent:()=>qi});var Zi=Symbol("elementInternals"),qi=pe(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Zi].form}constructor(...o){super(o),this[Zi]=this.attachInternals()}setFormValue(o){this[Zi].setFormValue(o)}}return e});var Xi={};W(Xi,{DateFormatter:()=>Kt});var Kt=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Qi={};W(Qi,{ALL_KEYS_VALUE:()=>Ji,SameWindowStorageEvent:()=>Lr});var Ji="__all__",Lr=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ji}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Lr(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Lr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Lr(Ji))}});var ts={};W(ts,{FocusMainContentEvent:()=>es});var es=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var B1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function df(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function uf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",df);document.addEventListener("click",uf);var H1=P`
47
+ `;var vl={};var bi={};W(bi,{ParametrizedLabelResolver:()=>ho});var ho=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Hi={};W(Hi,{FtCommandQueue:()=>mo,FtLitElementRedux:()=>Gt,FtReduxStore:()=>Vt,FtStateManager:()=>xo,ReduxWatcher:()=>hn,clearAllStores:()=>rf,isFtReduxStore:()=>gr,redux:()=>mr,reduxEventListener:()=>vu,reduxReactive:()=>bu,watch:()=>of,withRedux:()=>xl});var bu=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},mr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:nt,attribute:!1,...e};A(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},vu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var mo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function gr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var go=Symbol("internalReduxEventsUnsubscribers"),vt=Symbol("internalStoresUnsubscribers"),Ht=Symbol("internalStores"),xl=pe(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Ht].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ht].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ht].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Ht].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Ht].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Ht].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[vt].has(s.store):this[vt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[vt].set(s,c.subscribe(()=>this.updateFromStores())),this[go].set(s,[]),gr(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[go].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[vt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[vt].has(s)&&this[vt].get(s)(),this[vt].delete(s),(c=this[go].get(s))===null||c===void 0||c.forEach(d=>d()),this[go].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=vt,r=Ht,o=go,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Gt=class extends xl(Z){};function ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function st(t){return!!t&&!!t[ee]}function We(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Ru})(t)||Array.isArray(t)||!!t[Rl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Rl])||Ri(t)||wi(t))}function Wt(t,e,r){r===void 0&&(r=!1),vr(t)===0?(r?Object.keys:br)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function vr(t){var e=t[ee];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ri(t)?2:wi(t)?3:0}function yr(t,e){return vr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function xu(t,e){return vr(t)===2?t.get(e):t[e]}function wl(t,e,r){var o=vr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function _l(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ri(t){return Lu&&t instanceof Map}function wi(t){return Ou&&t instanceof Set}function xt(t){return t.o||t.t}function _i(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Tl(t);delete e[ee];for(var r=br(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Ni(t,e){return e===void 0&&(e=!1),Mi(t)||st(t)||!We(t)||(vr(t)>1&&(t.set=t.add=t.clear=t.delete=Su),Object.freeze(t),e&&Wt(t,(function(r,o){return Ni(o,!0)}),!0)),t}function Su(){ze(2)}function Mi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function tt(t){var e=Oi[t];return e||ze(18,t),e}function Cu(t,e){Oi[t]||(Oi[t]=e)}function Ei(){return bo}function vi(t,e){e&&(tt("Patches"),t.u=[],t.s=[],t.v=e)}function ln(t){Ai(t),t.p.forEach(Eu),t.p=null}function Ai(t){t===bo&&(bo=t.l)}function Sl(t){return bo={p:[],l:bo,h:t,m:!0,_:0}}function Eu(t){var e=t[ee];e.i===0||e.i===1?e.j():e.g=!0}function xi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||tt("ES5").S(e,t,o),o?(r[ee].P&&(ln(e),ze(4)),We(t)&&(t=dn(e,t),e.l||un(e,t)),e.u&&tt("Patches").M(r[ee].t,t,e.u,e.s)):t=dn(e,r,[]),ln(e),e.u&&e.v(e.u,e.s),t!==Ml?t:void 0}function dn(t,e,r){if(Mi(e))return e;var o=e[ee];if(!o)return Wt(e,(function(c,d){return Cl(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return un(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=_i(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Wt(i,(function(c,d){return Cl(t,o,a,c,d,r,s)})),un(t,a,!1),r&&t.u&&tt("Patches").N(o,r,t.u,t.s)}return o.o}function Cl(t,e,r,o,a,i,s){if(st(a)){var c=dn(t,a,i&&e&&e.i!==3&&!yr(e.R,o)?i.concat(o):void 0);if(wl(r,o,c),!st(c))return;t.m=!1}else s&&r.add(a);if(We(a)&&!Mi(a)){if(!t.h.D&&t._<1)return;dn(t,a),e&&e.A.l||un(t,a)}}function un(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ni(e,r)}function Si(t,e){var r=t[ee];return(r?xt(r):t)[e]}function El(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function St(t){t.P||(t.P=!0,t.l&&St(t.l))}function Ci(t){t.o||(t.o=_i(t.t))}function Li(t,e,r){var o=Ri(e)?tt("MapSet").F(e,r):wi(e)?tt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Ei(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=vo;s&&(d=[c],u=yo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):tt("ES5").J(e,r);return(r?r.A:Ei()).p.push(o),o}function Au(t){return st(t)||ze(22,t),(function e(r){if(!We(r))return r;var o,a=r[ee],i=vr(r);if(a){if(!a.P&&(a.i<4||!tt("ES5").K(a)))return a.t;a.I=!0,o=Al(r,i),a.I=!1}else o=Al(r,i);return Wt(o,(function(s,c){a&&xu(a.t,s)===c||wl(o,s,e(c))})),i===3?new Set(o):o})(t)}function Al(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _i(t)}function Nl(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[ee];return vo.get(u,s)},set:function(u){var m=this[ee];vo.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ee];if(!d.P)switch(d.i){case 5:o(d)&&St(d);break;case 4:r(d)&&St(d)}}}function r(s){for(var c=s.t,d=s.k,u=br(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==ee){var y=c[h];if(y===void 0&&!yr(c,h))return!0;var b=d[h],x=b&&b[ee];if(x?x.t!==y:!_l(b,y))return!0}}var C=!!c[ee];return u.length!==br(c).length+(C?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&ze(3,JSON.stringify(xt(s)))}var i={};Cu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(b,""+x,t(x,!0));return b}var C=Tl(y);delete C[ee];for(var O=br(C),R=0;R<O.length;R++){var N=O[R];C[N]=t(N,h||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(d,s),m={i:d?5:4,A:c?c.A:Ei(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ee,{value:m,writable:!0}),u},S:function(s,c,d){d?st(c)&&c[ee].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[ee];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)Wt(b,(function(S){S!==ee&&(y[S]!==void 0||yr(y,S)?x[S]||u(b[S]):(x[S]=!0,St(h)))})),Wt(y,(function(S){b[S]!==void 0||yr(b,S)||(x[S]=!1,St(h))}));else if(C===5){if(o(h)&&(St(h),x.length=!0),b.length<y.length)for(var O=b.length;O<y.length;O++)x[O]=!1;else for(var R=y.length;R<b.length;R++)x[R]=!0;for(var N=Math.min(b.length,y.length),E=0;E<N;E++)b.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Ll,bo,Ti=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Lu=typeof Map<"u",Ou=typeof Set<"u",Ol=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ml=Ti?Symbol.for("immer-nothing"):((Ll={})["immer-nothing"]=!0,Ll),Rl=Ti?Symbol.for("immer-draftable"):"__$immer_draftable",ee=Ti?Symbol.for("immer-state"):"__$immer_state";var Ru=""+Object.prototype.constructor,br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Tl=Object.getOwnPropertyDescriptors||function(t){var e={};return br(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Oi={},vo={get:function(t,e){if(e===ee)return t;var r=xt(t);if(!yr(r,e))return(function(a,i,s){var c,d=El(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!We(o)?o:o===Si(t.t,e)?(Ci(t),t.o[e]=Li(t.A.h,o,t)):o},has:function(t,e){return e in xt(t)},ownKeys:function(t){return Reflect.ownKeys(xt(t))},set:function(t,e,r){var o=El(xt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Si(xt(t),e),i=a?.[ee];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(_l(r,a)&&(r!==void 0||yr(t.t,e)))return!0;Ci(t),St(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Si(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ci(t),St(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=xt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ze(12)}},yo={};Wt(vo,(function(t,e){yo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),yo.deleteProperty=function(t,e){return yo.set.call(this,t,e,void 0)},yo.set=function(t,e,r){return vo.set.call(this,t[0],e,r,t[0])};var wu=(function(){function t(r){var o=this;this.O=Ol,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(C){var O=this;C===void 0&&(C=c);for(var R=arguments.length,N=Array(R>1?R-1:0),E=1;E<R;E++)N[E-1]=arguments[E];return d.produce(C,(function(S){var L;return(L=i).call.apply(L,[O,S].concat(N))}))}}var u;if(typeof i!="function"&&ze(6),s!==void 0&&typeof s!="function"&&ze(7),We(a)){var m=Sl(o),h=Li(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?ln(m):Ai(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return vi(m,s),xi(C,m)}),(function(C){throw ln(m),C})):(vi(m,s),xi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Ml&&(u=void 0),o.D&&Ni(u,!0),s){var b=[],x=[];tt("Patches").M(a,u,b,x),s(b,x)}return u}ze(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,s,c]})):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){We(r)||ze(8),st(r)&&(r=Au(r));var o=Sl(this),a=Li(this,r,void 0);return a[ee].C=!0,Ai(o),a},e.finishDraft=function(r,o){var a=r&&r[ee],i=a.A;return vi(i,o),xi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Ol&&ze(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=tt("Patches").$;return st(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),we=new wu,_u=we.produce,Dg=we.produceWithPatches.bind(we),Ug=we.setAutoFreeze.bind(we),Fg=we.setUseProxies.bind(we),$g=we.applyPatches.bind(we),Bg=we.createDraft.bind(we),Hg=we.finishDraft.bind(we),fn=_u;function jt(t){"@babel/helpers - typeof";return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(t)}function kl(t,e){if(jt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(jt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Il(t){var e=kl(t,"string");return jt(e)=="symbol"?e:e+""}function Pl(t,e,r){return(e=Il(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function ki(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zl(Object(r),!0).forEach(function(o){Pl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zl(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ye(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ii=function(){return Math.random().toString(36).substring(7).split("").join(".")},pn={INIT:"@@redux/INIT"+Ii(),REPLACE:"@@redux/REPLACE"+Ii(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ii()}};function Nu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Pi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ye(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ye(1));return r(Pi)(t,e)}if(typeof t!="function")throw new Error(ye(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(ye(3));return i}function h(C){if(typeof C!="function")throw new Error(ye(4));if(d)throw new Error(ye(5));var O=!0;return u(),c.push(C),function(){if(O){if(d)throw new Error(ye(6));O=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!Nu(C))throw new Error(ye(7));if(typeof C.type>"u")throw new Error(ye(8));if(d)throw new Error(ye(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var O=s=c,R=0;R<O.length;R++){var N=O[R];N()}return C}function b(C){if(typeof C!="function")throw new Error(ye(10));a=C,y({type:pn.REPLACE})}function x(){var C,O=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ye(11));function E(){N.next&&N.next(m())}E();var S=O(E);return{unsubscribe:S}}},C[Dl]=function(){return this},C}return y({type:pn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Dl]=x,o}function Mu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:pn.INIT});if(typeof o>"u")throw new Error(ye(12));if(typeof r(void 0,{type:pn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function Ul(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{Mu(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},x=0;x<i.length;x++){var C=i[x],O=r[C],R=u[C],N=O(R,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(ye(14))}b[C]=N,y=y||N!==R}return y=y||i.length!==Object.keys(u).length,y?b:u}}function xr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function Fl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ye(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=xr.apply(void 0,c)(a.dispatch),ki(ki({},a),{},{dispatch:i})}}}function $l(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var Bl=$l();Bl.withExtraArgument=$l;var zi=Bl;var Vl=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Tu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Sr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},ku=Object.defineProperty,Iu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,Hl=Object.getOwnPropertySymbols,zu=Object.prototype.hasOwnProperty,Du=Object.prototype.propertyIsEnumerable,Gl=function(t,e,r){return e in t?ku(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Ct=function(t,e){for(var r in e||(e={}))zu.call(e,r)&&Gl(t,r,e[r]);if(Hl)for(var o=0,a=Hl(e);o<a.length;o++){var r=a[o];Du.call(e,r)&&Gl(t,r,e[r])}return t},Di=function(t,e){return Iu(t,Pu(e))},Uu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Fu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xr:xr.apply(null,arguments)},iy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function $u(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Et(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Ct(Ct({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}var Bu=(function(t){Vl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Sr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],r.concat(this))))},e})(Array),Hu=(function(t){Vl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Sr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],r.concat(this))))},e})(Array);function $i(t){return We(t)?fn(t,function(){}):t}function Gu(t){return typeof t=="boolean"}function Wu(){return function(e){return ju(e)}}function ju(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Bu;if(r&&(Gu(r)?u.push(zi):u.push(zi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Ui=!0;function Kl(t){var e=Wu(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if($u(a))b=Ul(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(e),!Ui&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ui&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Fl.apply(void 0,x),O=xr;d&&(O=Fu(Ct({trace:!Ui},typeof d=="object"&&d)));var R=new Hu(C),N=R;Array.isArray(y)?N=Sr([C],y):typeof y=="function"&&(N=y(R));var E=O.apply(void 0,N);return Pi(b,m,E)}function Zl(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function Vu(t){return typeof t=="function"}function Ku(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?Zl(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(Vu(t))d=function(){return $i(t())};else{var u=$i(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=Sr([i[y.type]],s.filter(function(x){var C=x.matcher;return C(y)}).map(function(x){var C=x.reducer;return C}));return b.filter(function(x){return!!x}).length===0&&(b=[c]),b.reduce(function(x,C){if(C)if(st(x)){var O=x,R=C(O,y);return R===void 0?x:R}else{if(We(x))return fn(x,function(N){return C(N,y)});var R=C(x,y);if(R===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return x},h)}return m.getInitialState=d,m}function Zu(t,e){return t+"/"+e}function ql(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:$i(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Zu(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?Et(y,x):Et(y)});function d(){var m=typeof t.extraReducers=="function"?Zl(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],O=C===void 0?void 0:C,R=Ct(Ct({},y),s);return Ku(r,function(N){for(var E in R)N.addCase(E,R[E]);for(var S=0,L=x;S<L.length;S++){var T=L[S];N.addMatcher(T.matcher,T.reducer)}O&&N.addDefaultCase(O)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var qu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Yu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=qu[Math.random()*64|0];return e},Xu=["name","message","stack","code"],Fi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Wl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ju=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Xu;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},dy=(function(){function t(e,r,o){var a=Et(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Di(Ct({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=Et(e+"/pending",function(m,h,y){return{payload:void 0,meta:Di(Ct({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Et(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||Ju)(m||"Rejected"),meta:Di(Ct({},x||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function u(m){return function(h,y,b){var x=o?.idGenerator?o.idGenerator(m):Yu(),C=new d,O,R=!1;function N(S){O=S,C.abort()}var E=(function(){return Uu(this,null,function(){var S,L,T,F,Q,G,I;return Tu(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),F=(S=o?.condition)==null?void 0:S.call(o,m,{getState:y,extra:b}),ef(F)?[4,F]:[3,2];case 1:F=D.sent(),D.label=2;case 2:if(F===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Q=new Promise(function(V,le){return C.signal.addEventListener("abort",function(){return le({name:"AbortError",message:O||"Aborted"})})}),h(i(x,m,(L=o?.getPendingMeta)==null?void 0:L.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([Q,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(V,le){return new Fi(V,le)},fulfillWithValue:function(V,le){return new Wl(V,le)}})).then(function(V){if(V instanceof Fi)throw V;return V instanceof Wl?a(V.payload,x,m,V.meta):a(V,x,m)})])];case 3:return T=D.sent(),[3,5];case 4:return G=D.sent(),T=G instanceof Fi?s(null,x,m,G.payload,G.meta):s(G,x,m),[3,5];case 5:return I=o&&!o.dispatchConditionRejection&&s.match(T)&&T.meta.condition,I||h(T),[2,T]}})})})();return Object.assign(E,{abort:N,requestId:x,arg:m,unwrap:function(){return E.then(Qu)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function Qu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ef(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Yl="listener",Xl="completed",Jl="cancelled",uy="task-"+Jl,fy="task-"+Xl,py=Yl+"-"+Jl,hy=Yl+"-"+Xl;var Bi="listenerMiddleware";var my=Et(Bi+"/add"),gy=Et(Bi+"/removeAll"),yy=Et(Bi+"/remove");var jl,by=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(jl||(jl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},tf=function(t){return function(e){setTimeout(e,t)}},vy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tf(10);Nl();window.ftReduxStores||(window.ftReduxStores={});var Vt=class t extends at{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(gr(i))return i;if(a==null)return;let s=ql({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=Kl({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Be(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new mo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function rf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))gr(e)&&e.clear()}var hn=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);nt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function of(t,e,r){return new hn(t,e,r).watch()}var xo=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var ji={};W(ji,{scrollHelper:()=>nf});var Gi,mn=new Map,Wi=class{lock(e,r){if(r){let o=mn.get(r);if(o==null||o===e)return mn.set(r,e),r}}release(e,r){r&&mn.get(r)===e&&mn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of pa(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=It(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Gi=window.FluidTopicsScrollHelper)!==null&&Gi!==void 0?Gi:new Wi;var nf=window.FluidTopicsScrollHelper;var Ki={};W(Ki,{SearchPlaceConverter:()=>Ar,SearchPlaceQueryParams:()=>H,isSearchPlaceQueryParams:()=>$1,serializeRequest:()=>cf});var Ql;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ql||(Ql={}));var e1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(e1||(e1={}));var t1;(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"})(t1||(t1={}));var r1;(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"})(r1||(r1={}));var o1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(o1||(o1={}));var n1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(n1||(n1={}));var a1;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(a1||(a1={}));var i1;(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"})(i1||(i1={}));var s1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(s1||(s1={}));var c1;(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"})(c1||(c1={}));var l1;(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"})(l1||(l1={}));var d1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(d1||(d1={}));var u1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(u1||(u1={}));var f1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(f1||(f1={}));var p1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(p1||(p1={}));var h1;(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"})(h1||(h1={}));var Cr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Cr||(Cr={}));var m1;(function(t){t.ASC="ASC",t.DESC="DESC"})(m1||(m1={}));var g1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(g1||(g1={}));var Vi;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Vi||(Vi={}));var A1=t=>Object.keys(Vi).includes(t);var y1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(y1||(y1={}));var b1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(b1||(b1={}));var v1;(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"})(v1||(v1={}));var Er;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Er||(Er={}));var L1=t=>Object.keys(Er).includes(t);var x1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(x1||(x1={}));var S1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(S1||(S1={}));var C1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(C1||(C1={}));var ce;(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"})(ce||(ce={}));var De;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(De||(De={}));var E1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(E1||(E1={}));var O1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(O1||(O1={}));var R1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(R1||(R1={}));var w1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(w1||(w1={}));var _1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(_1||(_1={}));var N1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(N1||(N1={}));var M1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(M1||(M1={}));var T1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(T1||(T1={}));var k1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(k1||(k1={}));var I1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(I1||(I1={}));var P1;(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"})(P1||(P1={}));var z1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(z1||(z1={}));var af={[ce.PERSONAL_BOOK_SHARE_USER]:[ce.PERSONAL_BOOK_USER],[ce.HTML_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.PDF_EXPORT_USER]:[ce.PERSONAL_BOOK_USER],[ce.KHUB_ADMIN]:[ce.CONTENT_PUBLISHER],[ce.ADMIN]:[ce.KHUB_ADMIN,ce.USERS_ADMIN,ce.PORTAL_ADMIN,ce.BEHAVIOR_DATA_USER],[ce.GENERATIVE_AI_EXPORT_USER]:[ce.GENERATIVE_AI_USER]};function D1(t,e){return t===e||(af[t]??[]).some(r=>D1(r,e))}function U1(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>D1(o,e))}function sf(t){return`"${t}"`}function F1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function cf(t,e){return new Ar(t).serialize(e)}var H;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(H||(H={}));var lf=new Set(Object.values(H));function $1(t){return lf.has(t)}var Ar=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,u,m,h,y,b;let x=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&x.append(H.LOCALE,e.contentLocale):x.append(H.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append(H.QUERY,e.query);let C=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(C.length>0){let S=C.map(L=>{var T,F;let Q=((F=(T=L.valueFilter)===null||T===void 0?void 0:T.values)!==null&&F!==void 0?F:[]).map(G=>this.escapeFilters(G)).map(G=>sf(F1(G))).join("_");return`${L.key}~${Q}`}).join("*");x.append(H.VALUE_FILTERS,S)}let O=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(O.length>0){let S=O.map(L=>{var T;return`${L.key}~${(T=L.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");x.append(H.DATE_FILTERS,S)}let R=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&u!==void 0?u:[];if(R.length>0){let S=R.map(L=>{var T,F;return`${L.key}~${(T=L.rangeFilter)===null||T===void 0?void 0:T.from}_${(F=L.rangeFilter)===null||F===void 0?void 0:F.to}`}).join("*");x.append(H.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append(H.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append(H.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append(H.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&x.append(H.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append(H.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let N=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let S in N)x.append(S,N[S]);let E=new Array;return x.forEach((S,L)=>{E.push(this.encodeQueryString(L)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(R){console.warn("Could not decode search request query params, fallback on raw value",R)}let d=new URLSearchParams(e),u=d.get(H.LOCALE)==="all"?void 0:d.get(H.LOCALE),m=((r=d.get(H.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(H.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(H.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(H.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get(H.KEYWORD_MATCH),C=x?x.toUpperCase()===Cr.MANDATORY?Cr.MANDATORY:Cr.OPTIONAL:void 0,O={};for(let R of d.keys())$1(R)||(O[R]=d.get(R));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(H.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:A1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:It(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:O}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(H.FILTERS)&&(d=this.parseValueFilters((r=e.get(H.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(H.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(H.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(H.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(H.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(H.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(F1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Er[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(L1(e))return[{key:"ft:lastEdition",dateFilter:{type:Er[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[H.LOCALE,H.FILTERS,H.VALUE_FILTERS,H.DATE_FILTERS,H.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(H.LOCALE),r!==void 0&&o.searchParams.append(H.LOCALE,r),o.toString()}};var Yi={};W(Yi,{toFtFormComponent:()=>qi});var Zi=Symbol("elementInternals"),qi=pe(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Zi].form}constructor(...o){super(o),this[Zi]=this.attachInternals()}setFormValue(o){this[Zi].setFormValue(o)}}return e});var Xi={};W(Xi,{DateFormatter:()=>Kt});var Kt=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Qi={};W(Qi,{ALL_KEYS_VALUE:()=>Ji,SameWindowStorageEvent:()=>Lr});var Ji="__all__",Lr=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ji}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Lr(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Lr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Lr(Ji))}});var ts={};W(ts,{FocusMainContentEvent:()=>es});var es=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var B1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function df(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function uf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",df);document.addEventListener("click",uf);var H1=P`
48
48
  .sr-only {
49
49
  position:absolute;
50
50
  left:-10000px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ftds-popover",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "The design system popover component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -21,15 +21,15 @@
21
21
  "dependencies": {
22
22
  "@floating-ui/dom": "1.7.6",
23
23
  "@fluid-topics/design-system-variables": "3.5.0",
24
- "@fluid-topics/ft-tooltip": "2.1.5",
25
- "@fluid-topics/ft-wc-utils": "2.1.5",
26
- "@fluid-topics/ftds-button": "2.1.5",
27
- "@fluid-topics/ftds-icon": "2.1.5",
28
- "@fluid-topics/ftds-typography": "2.1.5",
24
+ "@fluid-topics/ft-tooltip": "2.1.6",
25
+ "@fluid-topics/ft-wc-utils": "2.1.6",
26
+ "@fluid-topics/ftds-button": "2.1.6",
27
+ "@fluid-topics/ftds-icon": "2.1.6",
28
+ "@fluid-topics/ftds-typography": "2.1.6",
29
29
  "lit": "3.1.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@fluid-topics/ft-wc-test-utils": "2.1.5"
32
+ "@fluid-topics/ft-wc-test-utils": "2.1.6"
33
33
  },
34
- "gitHead": "cea42544a196f1f784982f8a666a27c534578779"
34
+ "gitHead": "70ba8e6b58f0f1c74a92965f3b7dbf3db605698e"
35
35
  }