@fluid-topics/ftds-button 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.
@@ -333,7 +333,7 @@
333
333
  position: relative;
334
334
  word-break: break-word;
335
335
  }
336
- `;var ji=["top","right","bottom","left"],Wi=["start","end"],fn=ji.reduce((e,t)=>e.concat(t,t+"-"+Wi[0],t+"-"+Wi[1]),[]),Cr=Math.min,qe=Math.max,Er=Math.round;var Ee=e=>({x:e,y:e}),r4={left:"right",right:"left",bottom:"top",top:"bottom"};function pn(e,t,o){return qe(e,Cr(t,o))}function Qr(e,t){return typeof e=="function"?e(t):e}function jt(e){return e.split("-")[0]}function Ye(e){return e.split("-")[1]}function hn(e){return e==="x"?"y":"x"}function mn(e){return e==="y"?"height":"width"}function Jr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function gn(e){return hn(Jr(e))}function Vi(e,t,o){o===void 0&&(o=!1);let n=Ye(e),a=gn(e),i=mn(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=un(s)),[s,un(s)]}function Ki(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function un(e){let t=jt(e);return r4[t]+e.slice(t.length)}function o4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zi(e){return typeof e!="number"?o4(e):{top:e,right:e,bottom:e,left:e}}function ht(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 qi(e,t,o){let{reference:n,floating:a}=e,i=Jr(t),s=gn(t),l=mn(s),u=jt(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(Ye(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 Yi(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}=Qr(t,e),x=Zi(v),A=l[y?g==="floating"?"reference":"floating":g],L=ht(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(A)))==null||o?A:A.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)),z=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},D=ht(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(L.top-D.top+x.top)/z.y,bottom:(D.bottom-L.bottom+x.bottom)/z.y,left:(L.left-D.left+x.left)/z.x,right:(D.right-L.right+x.right)/z.x}}var n4=50,Xi=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:Yi},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=qi(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let A=i[S];if(!A)continue;let{name:L,fn:N}=A,{x:M,y:z,data:D,reset:G}=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=z??g,x[L]={...x[L],...D},G&&v<n4&&(v++,typeof G=="object"&&(G.placement&&(y=G.placement),G.rects&&(p=G.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):G.rects),{x:m,y:g}=qi(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function a4(e,t,o){return(e?[...o.filter(a=>Ye(a)===e),...o.filter(a=>Ye(a)!==e)]:o.filter(a=>jt(a)===a)).filter(a=>e?Ye(a)===e||(t?Ki(a)!==a:!1):!0)}var Qi=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=fn,autoAlignment:v=!0,...x}=Qr(e,t),S=g!==void 0||y===fn?a4(g||null,v,y):y,A=await u.detectOverflow(t,x),L=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[L];if(N==null)return{};let M=Vi(N,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==N)return{reset:{placement:S[0]}};let z=[A[jt(N)],A[M[0]],A[M[1]]],D=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:z}],G=S[L+1];if(G)return{data:{index:L+1,overflows:D},reset:{placement:G}};let Ne=D.map(ie=>{let fe=Ye(ie.placement);return[ie.placement,fe&&m?ie.overflows.slice(0,2).reduce((se,lt)=>se+lt,0):ie.overflows[0],ie.overflows]}).sort((ie,fe)=>ie[1]-fe[1]),_e=((a=Ne.filter(ie=>ie[2].slice(0,Ye(ie[0])?2:3).every(fe=>fe<=0))[0])==null?void 0:a[0])||Ne[0][0];return _e!==l?{data:{index:L+1,overflows:D},reset:{placement:_e}}:{}}}};var Ji=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:L=>{let{x:N,y:M}=L;return{x:N,y:M}}},...p}=Qr(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=Jr(jt(a)),v=hn(y),x=m[v],S=m[y];if(s){let L=v==="y"?"top":"left",N=v==="y"?"bottom":"right",M=x+g[L],z=x-g[N];x=pn(M,x,z)}if(l){let L=y==="y"?"top":"left",N=y==="y"?"bottom":"right",M=S+g[L],z=S-g[N];S=pn(M,S,z)}let A=u.fn({...t,[v]:x,[y]:S});return{...A,data:{x:A.x-o,y:A.y-n,enabled:{[v]:s,[y]:l}}}}}};function to(){return typeof window<"u"}function gt(e){return ts(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(ts(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ts(e){return to()?e instanceof Node||e instanceof ae(e).Node:!1}function he(e){return to()?e instanceof Element||e instanceof ae(e).Element:!1}function ke(e){return to()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function es(e){return!to()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function Vt(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function rs(e){return/^(table|td|th)$/.test(gt(e))}function Lr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var i4=/transform|translate|scale|rotate|perspective|filter/,s4=/paint|layout|strict|content/,mt=e=>!!e&&e!=="none",yn;function Kt(e){let t=he(e)?me(e):e;return mt(t.transform)||mt(t.translate)||mt(t.scale)||mt(t.rotate)||mt(t.perspective)||!ro()&&(mt(t.backdropFilter)||mt(t.filter))||i4.test(t.willChange||"")||s4.test(t.contain||"")}function os(e){let t=Ue(e);for(;ke(t)&&!yt(t);){if(Kt(t))return t;if(Lr(t))return null;t=Ue(t)}return null}function ro(){return yn==null&&(yn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yn}function yt(e){return/^(html|body|#document)$/.test(gt(e))}function me(e){return ae(e).getComputedStyle(e)}function Ar(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ue(e){if(gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||es(e)&&e.host||Me(e);return es(t)?t.host:t}function ns(e){let t=Ue(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ke(t)&&Vt(t)?t:ns(t)}function eo(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=ns(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=ae(a);if(i){let l=oo(s);return t.concat(s,s.visualViewport||[],Vt(a)?a:[],l&&o?eo(l):[])}else return t.concat(a,eo(a,[],o))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){let t=me(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=ke(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=Er(o)!==i||Er(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function ls(e){return he(e)?e:e.contextElement}function Zt(e){let t=ls(e);if(!ke(t))return Ee(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=cs(t),s=(i?Er(o.width):o.width)/n,l=(i?Er(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var c4=Ee(0);function ds(e){let t=ae(e);return!ro()||!t.visualViewport?c4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function l4(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ae(e)?!1:t}function Or(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=ls(e),s=Ee(1);t&&(n?he(n)&&(s=Zt(n)):s=Zt(e));let l=l4(i,o,n)?ds(i):Ee(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=ae(i),v=n&&he(n)?ae(n):n,x=y,S=oo(x);for(;S&&n&&v!==x;){let A=Zt(S),L=S.getBoundingClientRect(),N=me(S),M=L.left+(S.clientLeft+parseFloat(N.paddingLeft))*A.x,z=L.top+(S.clientTop+parseFloat(N.paddingTop))*A.y;u*=A.x,p*=A.y,m*=A.x,g*=A.y,u+=M,p+=z,x=ae(S),S=oo(x)}}return ht({width:m,height:g,x:u,y:p})}function no(e,t){let o=Ar(e).scrollLeft;return t?t.left+o:Or(Me(e)).left+o}function us(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-no(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function d4(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Me(n),l=t?Lr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Ee(1),m=Ee(0),g=ke(n);if((g||!g&&!i)&&((gt(n)!=="body"||Vt(s))&&(u=Ar(n)),g)){let v=Or(n);p=Zt(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?us(s,u):Ee(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 u4(e){return Array.from(e.getClientRects())}function f4(e){let t=Me(e),o=Ar(e),n=e.ownerDocument.body,a=qe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=qe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+no(e),l=-o.scrollTop;return me(n).direction==="rtl"&&(s+=qe(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var as=25;function p4(e,t){let o=ae(e),n=Me(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=ro();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=no(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<=as&&(i-=x)}else p<=as&&(i+=p);return{width:i,height:s,x:l,y:u}}function h4(e,t){let o=Or(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=ke(e)?Zt(e):Ee(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 is(e,t,o){let n;if(t==="viewport")n=p4(e,o);else if(t==="document")n=f4(Me(e));else if(he(t))n=h4(t,o);else{let a=ds(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ht(n)}function fs(e,t){let o=Ue(e);return o===t||!he(o)||yt(o)?!1:me(o).position==="fixed"||fs(o,t)}function m4(e,t){let o=t.get(e);if(o)return o;let n=eo(e,[],!1).filter(l=>he(l)&&gt(l)!=="body"),a=null,i=me(e).position==="fixed",s=i?Ue(e):e;for(;he(s)&&!yt(s);){let l=me(s),u=Kt(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Vt(s)&&!u&&fs(e,s))?n=n.filter(m=>m!==s):a=l,s=Ue(s)}return t.set(e,n),n}function g4(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Lr(t)?[]:m4(t,this._c):[].concat(o),n],l=is(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=is(t,s[y],a);u=qe(v.top,u),p=Cr(v.right,p),m=Cr(v.bottom,m),g=qe(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function y4(e){let{width:t,height:o}=cs(e);return{width:t,height:o}}function b4(e,t,o){let n=ke(t),a=Me(t),i=o==="fixed",s=Or(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Ee(0);function p(){u.x=no(a)}if(n||!n&&!i)if((gt(t)!=="body"||Vt(a))&&(l=Ar(t)),n){let v=Or(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?us(a,l):Ee(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 bn(e){return me(e).position==="static"}function ss(e,t){if(!ke(e)||me(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Me(e)===o&&(o=o.ownerDocument.body),o}function ps(e,t){let o=ae(e);if(Lr(e))return o;if(!ke(e)){let a=Ue(e);for(;a&&!yt(a);){if(he(a)&&!bn(a))return a;a=Ue(a)}return o}let n=ss(e,t);for(;n&&rs(n)&&bn(n);)n=ss(n,t);return n&&yt(n)&&bn(n)&&!Kt(n)?o:n||os(e)||o}var v4=async function(e){let t=this.getOffsetParent||ps,o=this.getDimensions,n=await o(e.floating);return{reference:b4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function x4(e){return me(e).direction==="rtl"}var ao={convertOffsetParentRelativeRectToViewportRelativeRect:d4,getDocumentElement:Me,getClippingRect:g4,getOffsetParent:ps,getElementRects:v4,getClientRects:u4,getDimensions:y4,getScale:Zt,isElement:he,isRTL:x4};var hs=Qi,ms=Ji;var gs=(e,t,o)=>{let n=new Map,a={platform:ao,...o},i={...a.platform,_c:n};return Xi(e,t,{...a,platform:i})};function ys(e){return S4(e)}function vn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function S4(e){for(let t=e;t;t=vn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=vn(e);t;t=vn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Kt(o)||t.tagName==="BODY"))return t}return null}async function bs(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},gs(e,t,{strategy:n.strategy,platform:{...ao,getOffsetParent:a=>ao.getOffsetParent(a,ys)},middleware:[ms({crossAxis:!0}),hs({allowedPlacements:[n.placement]})]})}var ir=R(P());var jn=R(oe());var vs=R(oe(),1);var xn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function xs(e,t){return(0,vs.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Rr(e);try{return JSON.parse(o)}catch{return Rr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:wr,...t??{}})}function C4(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(!io(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(!io(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(!io(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function io(e,t){try{return C4(e,t)}catch{return!1}}function wr(e,t){return!io(e,t)}function Rr(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 Ss=R(oe(),1);var Sn=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:wr,attribute:!1,...t};(0,Ss.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 bt=R(oe(),1);var lo=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 Es=R(Y(),1);var uo=globalThis,E4=uo.ShadowRoot&&(uo.ShadyCSS===void 0||uo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Cs=(e,t)=>{if(E4)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=uo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var fo=class extends Es.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 Cs(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){xn(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 Ls(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 Yt=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},ws,As=Symbol("constructorPrototype"),Os=Symbol("constructorName"),Ns=Symbol("exportpartsDebouncer"),Rs=Symbol("dynamicDependenciesLoaded"),qt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};qt.eventName="exportparts-updated";var ze=class extends fo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ws]=new lo(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[Ns].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[Os]=this.constructor.name,this[As]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Os]&&Object.setPrototypeOf(this,this[As])}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[Rs]||(o[Rs]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(qt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(qt.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 qt)})}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=Ls(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(A=>A.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(A=>A.trim());for(let A of S)m.add(A)}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(", ")}};ws=Ns;Yt([(0,bt.property)()],ze.prototype,"exportpartsPrefix",void 0);Yt([xs([])],ze.prototype,"exportpartsPrefixes",void 0);Yt([(0,bt.property)({reflect:!0})],ze.prototype,"exportparts",void 0);Yt([(0,bt.property)()],ze.prototype,"customStylesheet",void 0);Yt([(0,bt.property)()],ze.prototype,"elementToFocus",void 0);Yt([(0,bt.state)()],ze.prototype,"useAdoptedStyleSheets",void 0);function po(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Nr=Symbol("internalReduxEventsUnsubscribers"),Xe=Symbol("internalStoresUnsubscribers"),vt=Symbol("internalStores"),L4=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[vt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[vt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[vt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[vt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[vt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[vt].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[Xe].has(s.store):this[Xe].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[Xe].set(s,l.subscribe(()=>this.updateFromStores())),this[Nr].set(s,[]),po(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[Nr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Xe].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Xe].has(s)&&this[Xe].get(s)(),this[Xe].delete(s),(l=this[Nr].get(s))===null||l===void 0||l.forEach(u=>u()),this[Nr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Xe,o=vt,n=Nr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),_s=class extends L4(ze){};function ge(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 Be(e){return!!e&&!!e[H]}function Le(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)===k4})(e)||Array.isArray(e)||!!e[Ds]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ds])||_n(e)||Mn(e))}function xt(e,t,o){o===void 0&&(o=!1),Jt(e)===0?(o?Object.keys:Qt)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function Jt(e){var t=e[H];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_n(e)?2:Mn(e)?3:0}function Xt(e,t){return Jt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A4(e,t){return Jt(e)===2?e.get(t):e[t]}function Us(e,t,o){var n=Jt(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Bs(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _n(e){return _4&&e instanceof Map}function Mn(e){return M4&&e instanceof Set}function Qe(e){return e.o||e.t}function kn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Hs(e);delete t[H];for(var o=Qt(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 zn(e,t){return t===void 0&&(t=!1),Tn(e)||Be(e)||!Le(e)||(Jt(e)>1&&(e.set=e.add=e.clear=e.delete=O4),Object.freeze(e),t&&xt(e,(function(o,n){return zn(n,!0)}),!0)),e}function O4(){ge(2)}function Tn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Te(e){var t=Nn[e];return t||ge(18,e),t}function R4(e,t){Nn[e]||(Nn[e]=t)}function On(){return Mr}function Cn(e,t){t&&(Te("Patches"),e.u=[],e.s=[],e.v=t)}function ho(e){Rn(e),e.p.forEach(w4),e.p=null}function Rn(e){e===Mr&&(Mr=e.l)}function Ms(e){return Mr={p:[],l:Mr,h:e,m:!0,_:0}}function w4(e){var t=e[H];t.i===0||t.i===1?t.j():t.g=!0}function En(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Te("ES5").S(t,e,n),n?(o[H].P&&(ho(t),ge(4)),Le(e)&&(e=mo(t,e),t.l||go(t,e)),t.u&&Te("Patches").M(o[H].t,e,t.u,t.s)):e=mo(t,o,[]),ho(t),t.u&&t.v(t.u,t.s),e!==Gs?e:void 0}function mo(e,t,o){if(Tn(t))return t;var n=t[H];if(!n)return xt(t,(function(l,u){return ks(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return go(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=kn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),xt(i,(function(l,u){return ks(e,n,a,l,u,o,s)})),go(e,a,!1),o&&e.u&&Te("Patches").N(n,o,e.u,e.s)}return n.o}function ks(e,t,o,n,a,i,s){if(Be(a)){var l=mo(e,a,i&&t&&t.i!==3&&!Xt(t.R,n)?i.concat(n):void 0);if(Us(o,n,l),!Be(l))return;e.m=!1}else s&&o.add(a);if(Le(a)&&!Tn(a)){if(!e.h.D&&e._<1)return;mo(e,a),t&&t.A.l||go(e,a)}}function go(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&zn(t,o)}function Ln(e,t){var o=e[H];return(o?Qe(o):e)[t]}function zs(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 Je(e){e.P||(e.P=!0,e.l&&Je(e.l))}function An(e){e.o||(e.o=kn(e.t))}function wn(e,t,o){var n=_n(t)?Te("MapSet").F(t,o):Mn(t)?Te("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:On(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=kr;s&&(u=[l],p=_r);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):Te("ES5").J(t,o);return(o?o.A:On()).p.push(n),n}function N4(e){return Be(e)||ge(22,e),(function t(o){if(!Le(o))return o;var n,a=o[H],i=Jt(o);if(a){if(!a.P&&(a.i<4||!Te("ES5").K(a)))return a.t;a.I=!0,n=Ts(o,i),a.I=!1}else n=Ts(o,i);return xt(n,(function(s,l){a&&A4(a.t,s)===l||Us(n,s,t(l))})),i===3?new Set(n):n})(e)}function Ts(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return kn(e)}function Fs(){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[H];return kr.get(p,s)},set:function(p){var m=this[H];kr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][H];if(!u.P)switch(u.i){case 5:n(u)&&Je(u);break;case 4:o(u)&&Je(u)}}}function o(s){for(var l=s.t,u=s.k,p=Qt(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==H){var y=l[g];if(y===void 0&&!Xt(l,g))return!0;var v=u[g],x=v&&v[H];if(x?x.t!==y:!Bs(v,y))return!0}}var S=!!l[H];return p.length!==Qt(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&&ge(3,JSON.stringify(Qe(s)))}var i={};R4("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=Hs(y);delete S[H];for(var A=Qt(S),L=0;L<A.length;L++){var N=A[L];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:On(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,H,{value:m,writable:!0}),p},S:function(s,l,u){u?Be(l)&&l[H].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[H];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)xt(v,(function(z){z!==H&&(y[z]!==void 0||Xt(y,z)?x[z]||p(v[z]):(x[z]=!0,Je(g)))})),xt(y,(function(z){v[z]!==void 0||Xt(v,z)||(x[z]=!1,Je(g))}));else if(S===5){if(n(g)&&(Je(g),x.length=!0),v.length<y.length)for(var A=v.length;A<y.length;A++)x[A]=!1;else for(var L=y.length;L<v.length;L++)x[L]=!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 Is,Mr,In=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",_4=typeof Map<"u",M4=typeof Set<"u",Ps=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Gs=In?Symbol.for("immer-nothing"):((Is={})["immer-nothing"]=!0,Is),Ds=In?Symbol.for("immer-draftable"):"__$immer_draftable",H=In?Symbol.for("immer-state"):"__$immer_state";var k4=""+Object.prototype.constructor,Qt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Hs=Object.getOwnPropertyDescriptors||function(e){var t={};return Qt(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Nn={},kr={get:function(e,t){if(t===H)return e;var o=Qe(e);if(!Xt(o,t))return(function(a,i,s){var l,u=zs(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||!Le(n)?n:n===Ln(e.t,t)?(An(e),e.o[t]=wn(e.A.h,n,e)):n},has:function(e,t){return t in Qe(e)},ownKeys:function(e){return Reflect.ownKeys(Qe(e))},set:function(e,t,o){var n=zs(Qe(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Ln(Qe(e),t),i=a?.[H];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Bs(o,a)&&(o!==void 0||Xt(e.t,t)))return!0;An(e),Je(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 Ln(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,An(e),Je(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=Qe(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){ge(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ge(12)}},_r={};xt(kr,(function(e,t){_r[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),_r.deleteProperty=function(e,t){return _r.set.call(this,e,t,void 0)},_r.set=function(e,t,o){return kr.set.call(this,e[0],t,o,e[0])};var z4=(function(){function e(o){var n=this;this.O=Ps,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 A=this;S===void 0&&(S=l);for(var L=arguments.length,N=Array(L>1?L-1:0),M=1;M<L;M++)N[M-1]=arguments[M];return u.produce(S,(function(z){var D;return(D=i).call.apply(D,[A,z].concat(N))}))}}var p;if(typeof i!="function"&&ge(6),s!==void 0&&typeof s!="function"&&ge(7),Le(a)){var m=Ms(n),g=wn(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?ho(m):Rn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Cn(m,s),En(S,m)}),(function(S){throw ho(m),S})):(Cn(m,s),En(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Gs&&(p=void 0),n.D&&zn(p,!0),s){var v=[],x=[];Te("Patches").M(a,p,v,x),s(v,x)}return p}ge(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){Le(o)||ge(8),Be(o)&&(o=N4(o));var n=Ms(this),a=wn(this,o,void 0);return a[H].C=!0,Rn(n),a},t.finishDraft=function(o,n){var a=o&&o[H],i=a.A;return Cn(i,n),En(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Ps&&ge(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=Te("Patches").$;return Be(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),ce=new z4,T4=ce.produce,_6=ce.produceWithPatches.bind(ce),M6=ce.setAutoFreeze.bind(ce),k6=ce.setUseProxies.bind(ce),z6=ce.applyPatches.bind(ce),T6=ce.createDraft.bind(ce),I6=ce.finishDraft.bind(ce),yo=T4;function St(e){"@babel/helpers - typeof";return St=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},St(e)}function $s(e,t){if(St(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(St(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ws(e){var t=$s(e,"string");return St(t)=="symbol"?t:t+""}function js(e,t,o){return(t=Ws(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Vs(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 Pn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Vs(Object(o),!0).forEach(function(n){js(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Vs(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function ee(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 Ks=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Dn=function(){return Math.random().toString(36).substring(7).split("").join(".")},bo={INIT:"@@redux/INIT"+Dn(),REPLACE:"@@redux/REPLACE"+Dn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Dn()}};function I4(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 Un(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ee(1));return o(Un)(e,t)}if(typeof e!="function")throw new Error(ee(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(ee(3));return i}function g(S){if(typeof S!="function")throw new Error(ee(4));if(u)throw new Error(ee(5));var A=!0;return p(),l.push(S),function(){if(A){if(u)throw new Error(ee(6));A=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!I4(S))throw new Error(ee(7));if(typeof S.type>"u")throw new Error(ee(8));if(u)throw new Error(ee(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var A=s=l,L=0;L<A.length;L++){var N=A[L];N()}return S}function v(S){if(typeof S!="function")throw new Error(ee(10));a=S,y({type:bo.REPLACE})}function x(){var S,A=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ee(11));function M(){N.next&&N.next(m())}M();var z=A(M);return{unsubscribe:z}}},S[Ks]=function(){return this},S}return y({type:bo.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[Ks]=x,n}function P4(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:bo.INIT});if(typeof n>"u")throw new Error(ee(12));if(typeof o(void 0,{type:bo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function Zs(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{P4(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],A=o[S],L=p[S],N=A(L,m);if(typeof N>"u"){var M=m&&m.type;throw new Error(ee(14))}v[S]=N,y=y||N!==L}return y=y||i.length!==Object.keys(p).length,y?v:p}}function er(){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 qs(){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(ee(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=er.apply(void 0,l)(a.dispatch),Pn(Pn({},a),{},{dispatch:i})}}}function Ys(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 Xs=Ys();Xs.withExtraArgument=Ys;var Bn=Xs;var rc=(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)}})(),D4=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}}},tr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},U4=Object.defineProperty,B4=Object.defineProperties,F4=Object.getOwnPropertyDescriptors,Qs=Object.getOwnPropertySymbols,G4=Object.prototype.hasOwnProperty,H4=Object.prototype.propertyIsEnumerable,Js=function(e,t,o){return t in e?U4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},et=function(e,t){for(var o in t||(t={}))G4.call(t,o)&&Js(e,o,t[o]);if(Qs)for(var n=0,a=Qs(t);n<a.length;n++){var o=a[n];H4.call(t,o)&&Js(e,o,t[o])}return e},Fn=function(e,t){return B4(e,F4(t))},$4=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 W4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},J6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function j4(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 tt(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 et(et({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 V4=(function(e){rc(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,tr([void 0],o[0].concat(this)))):new(t.bind.apply(t,tr([void 0],o.concat(this))))},t})(Array),K4=(function(e){rc(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,tr([void 0],o[0].concat(this)))):new(t.bind.apply(t,tr([void 0],o.concat(this))))},t})(Array);function $n(e){return Le(e)?yo(e,function(){}):e}function Z4(e){return typeof e=="boolean"}function q4(){return function(t){return Y4(t)}}function Y4(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 V4;if(o&&(Z4(o)?p.push(Bn):p.push(Bn.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var Gn=!0;function oc(e){var t=q4(),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(j4(a))v=Zs(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),!Gn&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gn&&x.some(function(z){return typeof z!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=qs.apply(void 0,x),A=er;u&&(A=W4(et({trace:!Gn},typeof u=="object"&&u)));var L=new K4(S),N=L;Array.isArray(y)?N=tr([S],y):typeof y=="function"&&(N=y(L));var M=A.apply(void 0,N);return Un(v,m,M)}function nc(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 X4(e){return typeof e=="function"}function Q4(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?nc(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(X4(e))u=function(){return $n(e())};else{var p=$n(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=tr([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(Be(x)){var A=x,L=S(A,y);return L===void 0?x:L}else{if(Le(x))return yo(x,function(N){return S(N,y)});var L=S(x,y);if(L===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return x},g)}return m.getInitialState=u,m}function J4(e,t){return e+"/"+t}function ac(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:$n(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=J4(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?tt(y,x):tt(y)});function u(){var m=typeof e.extraReducers=="function"?nc(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],A=S===void 0?void 0:S,L=et(et({},y),s);return Q4(o,function(N){for(var M in L)N.addCase(M,L[M]);for(var z=0,D=x;z<D.length;z++){var G=D[z];N.addMatcher(G.matcher,G.reducer)}A&&N.addDefaultCase(A)})}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 e0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",t0=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=e0[Math.random()*64|0];return t},r0=["name","message","stack","code"],Hn=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),ec=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),o0=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=r0;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},op=(function(){function e(t,o,n){var a=tt(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:Fn(et({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=tt(t+"/pending",function(m,g,y){return{payload:void 0,meta:Fn(et({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=tt(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||o0)(m||"Rejected"),meta:Fn(et({},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):t0(),S=new u,A,L=!1;function N(z){A=z,S.abort()}var M=(function(){return $4(this,null,function(){var z,D,G,Ne,ct,_e,ie;return D4(this,function(fe){switch(fe.label){case 0:return fe.trys.push([0,4,,5]),Ne=(z=n?.condition)==null?void 0:z.call(n,m,{getState:y,extra:v}),a0(Ne)?[4,Ne]:[3,2];case 1:Ne=fe.sent(),fe.label=2;case 2:if(Ne===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,ct=new Promise(function(se,lt){return S.signal.addEventListener("abort",function(){return lt({name:"AbortError",message:A||"Aborted"})})}),g(i(x,m,(D=n?.getPendingMeta)==null?void 0:D.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([ct,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(se,lt){return new Hn(se,lt)},fulfillWithValue:function(se,lt){return new ec(se,lt)}})).then(function(se){if(se instanceof Hn)throw se;return se instanceof ec?a(se.payload,x,m,se.meta):a(se,x,m)})])];case 3:return G=fe.sent(),[3,5];case 4:return _e=fe.sent(),G=_e instanceof Hn?s(null,x,m,_e.payload,_e.meta):s(_e,x,m),[3,5];case 5:return ie=n&&!n.dispatchConditionRejection&&s.match(G)&&G.meta.condition,ie||g(G),[2,G]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:m,unwrap:function(){return M.then(n0)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function n0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function a0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ic="listener",sc="completed",cc="cancelled",np="task-"+cc,ap="task-"+sc,ip=ic+"-"+cc,sp=ic+"-"+sc;var Wn="listenerMiddleware";var cp=tt(Wn+"/add"),lp=tt(Wn+"/removeAll"),dp=tt(Wn+"/remove");var tc,up=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(tc||(tc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},i0=function(e){return function(t){setTimeout(t,e)}},fp=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:i0(10);Fs();var s0=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)}}}),vo=class extends s0(Object){};window.ftReduxStores||(window.ftReduxStores={});var lc=class e extends vo{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(po(i))return i;if(a==null)return;let s=ac({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=oc({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=Rr(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 xo=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 So=R(P()),c0="ft-app-info",rr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};rr.eventName="authentication-change";var zr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};zr.eventName="ui-locale-changed";var l0={session:(e,t)=>{(0,So.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new rr(t.payload)),0))}},I=So.FtReduxStore.get({name:c0,reducers:l0,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 dc=R(P()),Co=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},Fp=(0,dc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>xo.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Co([(0,jn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Co([(0,jn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Co([Sn({store:I.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),Co([Sn({store:I.name})],t.prototype,"uiLocale",void 0),t});var uc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(uc||(uc={}));var fc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(fc||(fc={}));var pc;(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"})(pc||(pc={}));var hc;(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"})(hc||(hc={}));var mc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(mc||(mc={}));var gc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(gc||(gc={}));var yc;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(yc||(yc={}));var bc;(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"})(bc||(bc={}));var vc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(vc||(vc={}));var xc;(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"})(xc||(xc={}));var Sc;(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"})(Sc||(Sc={}));var Cc;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Cc||(Cc={}));var Ec;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ec||(Ec={}));var Lc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Lc||(Lc={}));var Ac;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ac||(Ac={}));var Oc;(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"})(Oc||(Oc={}));var Rc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Rc||(Rc={}));var wc;(function(e){e.ASC="ASC",e.DESC="DESC"})(wc||(wc={}));var Nc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Nc||(Nc={}));var _c;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(_c||(_c={}));var Mc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Mc||(Mc={}));var kc;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(kc||(kc={}));var zc;(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"})(zc||(zc={}));var Tc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Tc||(Tc={}));var Ic;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ic||(Ic={}));var Pc;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pc||(Pc={}));var Dc;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Dc||(Dc={}));var q;(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"})(q||(q={}));var ye;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ye||(ye={}));var Uc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Uc||(Uc={}));var Bc;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Bc||(Bc={}));var Fc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Fc||(Fc={}));var Gc;(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"})(Gc||(Gc={}));var Hc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Hc||(Hc={}));var $c;(function(e){e.JSON="JSON",e.TEXT="TEXT"})($c||($c={}));var Wc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Wc||(Wc={}));var jc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(jc||(jc={}));var Vc;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Vc||(Vc={}));var Kc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Kc||(Kc={}));var Zc;(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"})(Zc||(Zc={}));var qc;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(qc||(qc={}));var d0={[q.PERSONAL_BOOK_SHARE_USER]:[q.PERSONAL_BOOK_USER],[q.HTML_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.PDF_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.KHUB_ADMIN]:[q.CONTENT_PUBLISHER],[q.ADMIN]:[q.KHUB_ADMIN,q.USERS_ADMIN,q.PORTAL_ADMIN,q.BEHAVIOR_DATA_USER],[q.GENERATIVE_AI_EXPORT_USER]:[q.GENERATIVE_AI_USER]};function Yc(e,t){return e===t||(d0[e]??[]).some(o=>Yc(o,t))}function Xc(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=>Yc(n,t))}var Ro=R(P());var Vn=R(P());var Ct=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=I.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=I.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var or=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ct.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ct.await()}};var le=class extends or{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 Vn.CacheRegistry,this.cache=t?a.commonCache:new Vn.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 Eo=class extends le{async listMySearches(){let{session:t}=I.getState();return Xc(t,q.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Lo=class extends le{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Ao=class extends le{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=I.getState().session;return!!t?.sessionAuthenticated}};var Oo=class extends le{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=I.getState().session;return!!t?.sessionAuthenticated}};var u0="ft-user-assets",f0={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(ye).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;Zn(e,o,[...Kn(e,o),a]),Qc(e,o,1,n),Jc(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;Zn(e,o,Kn(e,o).map(a=>a.id===n.id?n:a)),Jc(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;Zn(e,o,Kn(e,o).filter(i=>i.id!==a)),Qc(e,o,-1,n)}},el={[ye.SEARCHES]:"savedSearches",[ye.BOOKMARKS]:"bookmarks",[ye.BOOKS]:void 0,[ye.COLLECTIONS]:void 0},Kn=(e,t)=>{var o;let n=el[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},Zn=(e,t,o)=>{let n=el[t];n&&(e[n]=o)},Qc=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===ye.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Jc=(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)},re=Ro.FtReduxStore.get({name:u0,reducers:f0,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ye).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),qn=class{constructor(t=new Ao,o=new Oo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lo,this.savedSearchesService=new Eo,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=I.getState();(0,Ro.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(),re.actions.clearAssetCount(),re.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),re.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),re.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();re.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();re.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&re.getState().assetCounts.allAsset[t]!==o.count&&re.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&re.getState().assetCounts.bookmarkByMap[t]!==o.count&&re.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(re.getState().assetCounts.bookmarkByMap).length!==0;t===ye.BOOKMARKS&&o&&re.actions.clearBookmarkCountByMap(),re.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;re.actions.bookmarks(o)}}},p0=new qn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=p0);var Yn=class{addCommand(t,o=!1){I.commands.add(t,o)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Yn;var be=R(P());var tl,nr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},h0=Symbol("clearAfterUnitTest"),wo=class extends(0,be.withEventBus)(le){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[tl]=()=>{this.defaultMessages={},this.cache=new be.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let 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,be.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 be.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 be.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 nr({loadedContexts:t})),this.dispatchEvent(new nr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new nr({loadedContexts:[t]})),this.dispatchEvent(new nr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,be.delay)(0).then(()=>n()).catch(()=>null)))}};tl=h0;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Tr=window.FluidTopicsI18nService,Xn=window.FluidTopicsCustomI18nService;var rl=R(P()),Qn=class{highlightHtml(t,o,n){(0,rl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Qn;var ol=R(P());var Jn=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=I.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 ol.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:I.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 Jn;var nl=R(P());var Ir=class{static get(t,o){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new nl.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ea=class{urlToSearchRequest(t){return Ir.get().parse(t)}searchRequestToUrl(t){return Ir.get().serialize(t)}};window.FluidTopicsUrlService=new ea;var Fe=R(P());var Et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Et.eventName="change";var ta=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))}},al=new ta;var No=class e extends Fe.WithEventBus{static build(){return new e(window.history,al,()=>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,Fe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Et(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(Et.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Et.eventName,t)}currentItem(){return(0,Fe.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,Fe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Fe.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,Fe.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=No.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var il=R(Y());var sl=il.css`
336
+ `;var ji=["top","right","bottom","left"],Wi=["start","end"],fn=ji.reduce((e,t)=>e.concat(t,t+"-"+Wi[0],t+"-"+Wi[1]),[]),Cr=Math.min,qe=Math.max,Er=Math.round;var Ee=e=>({x:e,y:e}),r4={left:"right",right:"left",bottom:"top",top:"bottom"};function pn(e,t,o){return qe(e,Cr(t,o))}function Qr(e,t){return typeof e=="function"?e(t):e}function jt(e){return e.split("-")[0]}function Ye(e){return e.split("-")[1]}function hn(e){return e==="x"?"y":"x"}function mn(e){return e==="y"?"height":"width"}function Jr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function gn(e){return hn(Jr(e))}function Vi(e,t,o){o===void 0&&(o=!1);let n=Ye(e),a=gn(e),i=mn(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=un(s)),[s,un(s)]}function Ki(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function un(e){let t=jt(e);return r4[t]+e.slice(t.length)}function o4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zi(e){return typeof e!="number"?o4(e):{top:e,right:e,bottom:e,left:e}}function ht(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 qi(e,t,o){let{reference:n,floating:a}=e,i=Jr(t),s=gn(t),l=mn(s),u=jt(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(Ye(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 Yi(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}=Qr(t,e),x=Zi(v),A=l[y?g==="floating"?"reference":"floating":g],L=ht(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(A)))==null||o?A:A.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)),z=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},D=ht(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(L.top-D.top+x.top)/z.y,bottom:(D.bottom-L.bottom+x.bottom)/z.y,left:(L.left-D.left+x.left)/z.x,right:(D.right-L.right+x.right)/z.x}}var n4=50,Xi=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:Yi},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=qi(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let A=i[S];if(!A)continue;let{name:L,fn:N}=A,{x:M,y:z,data:D,reset:G}=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=z??g,x[L]={...x[L],...D},G&&v<n4&&(v++,typeof G=="object"&&(G.placement&&(y=G.placement),G.rects&&(p=G.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):G.rects),{x:m,y:g}=qi(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function a4(e,t,o){return(e?[...o.filter(a=>Ye(a)===e),...o.filter(a=>Ye(a)!==e)]:o.filter(a=>jt(a)===a)).filter(a=>e?Ye(a)===e||(t?Ki(a)!==a:!1):!0)}var Qi=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=fn,autoAlignment:v=!0,...x}=Qr(e,t),S=g!==void 0||y===fn?a4(g||null,v,y):y,A=await u.detectOverflow(t,x),L=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[L];if(N==null)return{};let M=Vi(N,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==N)return{reset:{placement:S[0]}};let z=[A[jt(N)],A[M[0]],A[M[1]]],D=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:z}],G=S[L+1];if(G)return{data:{index:L+1,overflows:D},reset:{placement:G}};let Ne=D.map(ie=>{let fe=Ye(ie.placement);return[ie.placement,fe&&m?ie.overflows.slice(0,2).reduce((se,lt)=>se+lt,0):ie.overflows[0],ie.overflows]}).sort((ie,fe)=>ie[1]-fe[1]),_e=((a=Ne.filter(ie=>ie[2].slice(0,Ye(ie[0])?2:3).every(fe=>fe<=0))[0])==null?void 0:a[0])||Ne[0][0];return _e!==l?{data:{index:L+1,overflows:D},reset:{placement:_e}}:{}}}};var Ji=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:L=>{let{x:N,y:M}=L;return{x:N,y:M}}},...p}=Qr(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=Jr(jt(a)),v=hn(y),x=m[v],S=m[y];if(s){let L=v==="y"?"top":"left",N=v==="y"?"bottom":"right",M=x+g[L],z=x-g[N];x=pn(M,x,z)}if(l){let L=y==="y"?"top":"left",N=y==="y"?"bottom":"right",M=S+g[L],z=S-g[N];S=pn(M,S,z)}let A=u.fn({...t,[v]:x,[y]:S});return{...A,data:{x:A.x-o,y:A.y-n,enabled:{[v]:s,[y]:l}}}}}};function to(){return typeof window<"u"}function gt(e){return ts(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(ts(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ts(e){return to()?e instanceof Node||e instanceof ae(e).Node:!1}function he(e){return to()?e instanceof Element||e instanceof ae(e).Element:!1}function ke(e){return to()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function es(e){return!to()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function Vt(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=me(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function rs(e){return/^(table|td|th)$/.test(gt(e))}function Lr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var i4=/transform|translate|scale|rotate|perspective|filter/,s4=/paint|layout|strict|content/,mt=e=>!!e&&e!=="none",yn;function Kt(e){let t=he(e)?me(e):e;return mt(t.transform)||mt(t.translate)||mt(t.scale)||mt(t.rotate)||mt(t.perspective)||!ro()&&(mt(t.backdropFilter)||mt(t.filter))||i4.test(t.willChange||"")||s4.test(t.contain||"")}function os(e){let t=Ue(e);for(;ke(t)&&!yt(t);){if(Kt(t))return t;if(Lr(t))return null;t=Ue(t)}return null}function ro(){return yn==null&&(yn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yn}function yt(e){return/^(html|body|#document)$/.test(gt(e))}function me(e){return ae(e).getComputedStyle(e)}function Ar(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ue(e){if(gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||es(e)&&e.host||Me(e);return es(t)?t.host:t}function ns(e){let t=Ue(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ke(t)&&Vt(t)?t:ns(t)}function eo(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=ns(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=ae(a);if(i){let l=oo(s);return t.concat(s,s.visualViewport||[],Vt(a)?a:[],l&&o?eo(l):[])}else return t.concat(a,eo(a,[],o))}function oo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e){let t=me(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=ke(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=Er(o)!==i||Er(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function ls(e){return he(e)?e:e.contextElement}function Zt(e){let t=ls(e);if(!ke(t))return Ee(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=cs(t),s=(i?Er(o.width):o.width)/n,l=(i?Er(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var c4=Ee(0);function ds(e){let t=ae(e);return!ro()||!t.visualViewport?c4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function l4(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ae(e)?!1:t}function Or(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=ls(e),s=Ee(1);t&&(n?he(n)&&(s=Zt(n)):s=Zt(e));let l=l4(i,o,n)?ds(i):Ee(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=ae(i),v=n&&he(n)?ae(n):n,x=y,S=oo(x);for(;S&&n&&v!==x;){let A=Zt(S),L=S.getBoundingClientRect(),N=me(S),M=L.left+(S.clientLeft+parseFloat(N.paddingLeft))*A.x,z=L.top+(S.clientTop+parseFloat(N.paddingTop))*A.y;u*=A.x,p*=A.y,m*=A.x,g*=A.y,u+=M,p+=z,x=ae(S),S=oo(x)}}return ht({width:m,height:g,x:u,y:p})}function no(e,t){let o=Ar(e).scrollLeft;return t?t.left+o:Or(Me(e)).left+o}function us(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-no(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function d4(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Me(n),l=t?Lr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Ee(1),m=Ee(0),g=ke(n);if((g||!g&&!i)&&((gt(n)!=="body"||Vt(s))&&(u=Ar(n)),g)){let v=Or(n);p=Zt(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?us(s,u):Ee(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 u4(e){return Array.from(e.getClientRects())}function f4(e){let t=Me(e),o=Ar(e),n=e.ownerDocument.body,a=qe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=qe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+no(e),l=-o.scrollTop;return me(n).direction==="rtl"&&(s+=qe(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var as=25;function p4(e,t){let o=ae(e),n=Me(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=ro();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=no(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<=as&&(i-=x)}else p<=as&&(i+=p);return{width:i,height:s,x:l,y:u}}function h4(e,t){let o=Or(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=ke(e)?Zt(e):Ee(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 is(e,t,o){let n;if(t==="viewport")n=p4(e,o);else if(t==="document")n=f4(Me(e));else if(he(t))n=h4(t,o);else{let a=ds(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ht(n)}function fs(e,t){let o=Ue(e);return o===t||!he(o)||yt(o)?!1:me(o).position==="fixed"||fs(o,t)}function m4(e,t){let o=t.get(e);if(o)return o;let n=eo(e,[],!1).filter(l=>he(l)&&gt(l)!=="body"),a=null,i=me(e).position==="fixed",s=i?Ue(e):e;for(;he(s)&&!yt(s);){let l=me(s),u=Kt(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Vt(s)&&!u&&fs(e,s))?n=n.filter(m=>m!==s):a=l,s=Ue(s)}return t.set(e,n),n}function g4(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Lr(t)?[]:m4(t,this._c):[].concat(o),n],l=is(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=is(t,s[y],a);u=qe(v.top,u),p=Cr(v.right,p),m=Cr(v.bottom,m),g=qe(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function y4(e){let{width:t,height:o}=cs(e);return{width:t,height:o}}function b4(e,t,o){let n=ke(t),a=Me(t),i=o==="fixed",s=Or(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Ee(0);function p(){u.x=no(a)}if(n||!n&&!i)if((gt(t)!=="body"||Vt(a))&&(l=Ar(t)),n){let v=Or(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?us(a,l):Ee(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 bn(e){return me(e).position==="static"}function ss(e,t){if(!ke(e)||me(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Me(e)===o&&(o=o.ownerDocument.body),o}function ps(e,t){let o=ae(e);if(Lr(e))return o;if(!ke(e)){let a=Ue(e);for(;a&&!yt(a);){if(he(a)&&!bn(a))return a;a=Ue(a)}return o}let n=ss(e,t);for(;n&&rs(n)&&bn(n);)n=ss(n,t);return n&&yt(n)&&bn(n)&&!Kt(n)?o:n||os(e)||o}var v4=async function(e){let t=this.getOffsetParent||ps,o=this.getDimensions,n=await o(e.floating);return{reference:b4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function x4(e){return me(e).direction==="rtl"}var ao={convertOffsetParentRelativeRectToViewportRelativeRect:d4,getDocumentElement:Me,getClippingRect:g4,getOffsetParent:ps,getElementRects:v4,getClientRects:u4,getDimensions:y4,getScale:Zt,isElement:he,isRTL:x4};var hs=Qi,ms=Ji;var gs=(e,t,o)=>{let n=new Map,a={platform:ao,...o},i={...a.platform,_c:n};return Xi(e,t,{...a,platform:i})};function ys(e){return S4(e)}function vn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function S4(e){for(let t=e;t;t=vn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=vn(e);t;t=vn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||Kt(o)||t.tagName==="BODY"))return t}return null}async function bs(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},gs(e,t,{strategy:n.strategy,platform:{...ao,getOffsetParent:a=>ao.getOffsetParent(a,ys)},middleware:[ms({crossAxis:!0}),hs({allowedPlacements:[n.placement]})]})}var ir=R(P());var jn=R(oe());var vs=R(oe(),1);var xn=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function xs(e,t){return(0,vs.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Rr(e);try{return JSON.parse(o)}catch{return Rr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:wr,...t??{}})}function C4(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(!io(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(!io(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(!io(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function io(e,t){try{return C4(e,t)}catch{return!1}}function wr(e,t){return!io(e,t)}function Rr(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 Ss=R(oe(),1);var Sn=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:wr,attribute:!1,...t};(0,Ss.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 bt=R(oe(),1);var lo=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 Es=R(Y(),1);var uo=globalThis,E4=uo.ShadowRoot&&(uo.ShadyCSS===void 0||uo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Cs=(e,t)=>{if(E4)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=uo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var fo=class extends Es.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 Cs(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){xn(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 Ls(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 Yt=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},ws,As=Symbol("constructorPrototype"),Os=Symbol("constructorName"),Ns=Symbol("exportpartsDebouncer"),Rs=Symbol("dynamicDependenciesLoaded"),qt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};qt.eventName="exportparts-updated";var ze=class extends fo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ws]=new lo(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[Ns].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[Os]=this.constructor.name,this[As]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Os]&&Object.setPrototypeOf(this,this[As])}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[Rs]||(o[Rs]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(qt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(qt.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 qt)})}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=Ls(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(A=>A.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(A=>A.trim());for(let A of S)m.add(A)}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(", ")}};ws=Ns;Yt([(0,bt.property)()],ze.prototype,"exportpartsPrefix",void 0);Yt([xs([])],ze.prototype,"exportpartsPrefixes",void 0);Yt([(0,bt.property)({reflect:!0})],ze.prototype,"exportparts",void 0);Yt([(0,bt.property)()],ze.prototype,"customStylesheet",void 0);Yt([(0,bt.property)()],ze.prototype,"elementToFocus",void 0);Yt([(0,bt.state)()],ze.prototype,"useAdoptedStyleSheets",void 0);function po(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Nr=Symbol("internalReduxEventsUnsubscribers"),Xe=Symbol("internalStoresUnsubscribers"),vt=Symbol("internalStores"),L4=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[vt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[vt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[vt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[vt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[vt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[vt].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[Xe].has(s.store):this[Xe].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[Xe].set(s,l.subscribe(()=>this.updateFromStores())),this[Nr].set(s,[]),po(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[Nr].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Xe].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Xe].has(s)&&this[Xe].get(s)(),this[Xe].delete(s),(l=this[Nr].get(s))===null||l===void 0||l.forEach(u=>u()),this[Nr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Xe,o=vt,n=Nr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),_s=class extends L4(ze){};function ge(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 Be(e){return!!e&&!!e[H]}function Le(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)===k4})(e)||Array.isArray(e)||!!e[Ds]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ds])||_n(e)||Mn(e))}function xt(e,t,o){o===void 0&&(o=!1),Jt(e)===0?(o?Object.keys:Qt)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function Jt(e){var t=e[H];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_n(e)?2:Mn(e)?3:0}function Xt(e,t){return Jt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A4(e,t){return Jt(e)===2?e.get(t):e[t]}function Us(e,t,o){var n=Jt(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Bs(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _n(e){return _4&&e instanceof Map}function Mn(e){return M4&&e instanceof Set}function Qe(e){return e.o||e.t}function kn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Hs(e);delete t[H];for(var o=Qt(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 zn(e,t){return t===void 0&&(t=!1),Tn(e)||Be(e)||!Le(e)||(Jt(e)>1&&(e.set=e.add=e.clear=e.delete=O4),Object.freeze(e),t&&xt(e,(function(o,n){return zn(n,!0)}),!0)),e}function O4(){ge(2)}function Tn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Te(e){var t=Nn[e];return t||ge(18,e),t}function R4(e,t){Nn[e]||(Nn[e]=t)}function On(){return Mr}function Cn(e,t){t&&(Te("Patches"),e.u=[],e.s=[],e.v=t)}function ho(e){Rn(e),e.p.forEach(w4),e.p=null}function Rn(e){e===Mr&&(Mr=e.l)}function Ms(e){return Mr={p:[],l:Mr,h:e,m:!0,_:0}}function w4(e){var t=e[H];t.i===0||t.i===1?t.j():t.g=!0}function En(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Te("ES5").S(t,e,n),n?(o[H].P&&(ho(t),ge(4)),Le(e)&&(e=mo(t,e),t.l||go(t,e)),t.u&&Te("Patches").M(o[H].t,e,t.u,t.s)):e=mo(t,o,[]),ho(t),t.u&&t.v(t.u,t.s),e!==Gs?e:void 0}function mo(e,t,o){if(Tn(t))return t;var n=t[H];if(!n)return xt(t,(function(l,u){return ks(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return go(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=kn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),xt(i,(function(l,u){return ks(e,n,a,l,u,o,s)})),go(e,a,!1),o&&e.u&&Te("Patches").N(n,o,e.u,e.s)}return n.o}function ks(e,t,o,n,a,i,s){if(Be(a)){var l=mo(e,a,i&&t&&t.i!==3&&!Xt(t.R,n)?i.concat(n):void 0);if(Us(o,n,l),!Be(l))return;e.m=!1}else s&&o.add(a);if(Le(a)&&!Tn(a)){if(!e.h.D&&e._<1)return;mo(e,a),t&&t.A.l||go(e,a)}}function go(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&zn(t,o)}function Ln(e,t){var o=e[H];return(o?Qe(o):e)[t]}function zs(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 Je(e){e.P||(e.P=!0,e.l&&Je(e.l))}function An(e){e.o||(e.o=kn(e.t))}function wn(e,t,o){var n=_n(t)?Te("MapSet").F(t,o):Mn(t)?Te("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:On(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=kr;s&&(u=[l],p=_r);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):Te("ES5").J(t,o);return(o?o.A:On()).p.push(n),n}function N4(e){return Be(e)||ge(22,e),(function t(o){if(!Le(o))return o;var n,a=o[H],i=Jt(o);if(a){if(!a.P&&(a.i<4||!Te("ES5").K(a)))return a.t;a.I=!0,n=Ts(o,i),a.I=!1}else n=Ts(o,i);return xt(n,(function(s,l){a&&A4(a.t,s)===l||Us(n,s,t(l))})),i===3?new Set(n):n})(e)}function Ts(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return kn(e)}function Fs(){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[H];return kr.get(p,s)},set:function(p){var m=this[H];kr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][H];if(!u.P)switch(u.i){case 5:n(u)&&Je(u);break;case 4:o(u)&&Je(u)}}}function o(s){for(var l=s.t,u=s.k,p=Qt(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==H){var y=l[g];if(y===void 0&&!Xt(l,g))return!0;var v=u[g],x=v&&v[H];if(x?x.t!==y:!Bs(v,y))return!0}}var S=!!l[H];return p.length!==Qt(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&&ge(3,JSON.stringify(Qe(s)))}var i={};R4("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=Hs(y);delete S[H];for(var A=Qt(S),L=0;L<A.length;L++){var N=A[L];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:On(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,H,{value:m,writable:!0}),p},S:function(s,l,u){u?Be(l)&&l[H].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[H];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)xt(v,(function(z){z!==H&&(y[z]!==void 0||Xt(y,z)?x[z]||p(v[z]):(x[z]=!0,Je(g)))})),xt(y,(function(z){v[z]!==void 0||Xt(v,z)||(x[z]=!1,Je(g))}));else if(S===5){if(n(g)&&(Je(g),x.length=!0),v.length<y.length)for(var A=v.length;A<y.length;A++)x[A]=!1;else for(var L=y.length;L<v.length;L++)x[L]=!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 Is,Mr,In=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",_4=typeof Map<"u",M4=typeof Set<"u",Ps=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Gs=In?Symbol.for("immer-nothing"):((Is={})["immer-nothing"]=!0,Is),Ds=In?Symbol.for("immer-draftable"):"__$immer_draftable",H=In?Symbol.for("immer-state"):"__$immer_state";var k4=""+Object.prototype.constructor,Qt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Hs=Object.getOwnPropertyDescriptors||function(e){var t={};return Qt(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Nn={},kr={get:function(e,t){if(t===H)return e;var o=Qe(e);if(!Xt(o,t))return(function(a,i,s){var l,u=zs(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||!Le(n)?n:n===Ln(e.t,t)?(An(e),e.o[t]=wn(e.A.h,n,e)):n},has:function(e,t){return t in Qe(e)},ownKeys:function(e){return Reflect.ownKeys(Qe(e))},set:function(e,t,o){var n=zs(Qe(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Ln(Qe(e),t),i=a?.[H];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Bs(o,a)&&(o!==void 0||Xt(e.t,t)))return!0;An(e),Je(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 Ln(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,An(e),Je(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=Qe(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){ge(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ge(12)}},_r={};xt(kr,(function(e,t){_r[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),_r.deleteProperty=function(e,t){return _r.set.call(this,e,t,void 0)},_r.set=function(e,t,o){return kr.set.call(this,e[0],t,o,e[0])};var z4=(function(){function e(o){var n=this;this.O=Ps,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 A=this;S===void 0&&(S=l);for(var L=arguments.length,N=Array(L>1?L-1:0),M=1;M<L;M++)N[M-1]=arguments[M];return u.produce(S,(function(z){var D;return(D=i).call.apply(D,[A,z].concat(N))}))}}var p;if(typeof i!="function"&&ge(6),s!==void 0&&typeof s!="function"&&ge(7),Le(a)){var m=Ms(n),g=wn(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?ho(m):Rn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Cn(m,s),En(S,m)}),(function(S){throw ho(m),S})):(Cn(m,s),En(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Gs&&(p=void 0),n.D&&zn(p,!0),s){var v=[],x=[];Te("Patches").M(a,p,v,x),s(v,x)}return p}ge(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){Le(o)||ge(8),Be(o)&&(o=N4(o));var n=Ms(this),a=wn(this,o,void 0);return a[H].C=!0,Rn(n),a},t.finishDraft=function(o,n){var a=o&&o[H],i=a.A;return Cn(i,n),En(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!Ps&&ge(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=Te("Patches").$;return Be(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),ce=new z4,T4=ce.produce,_6=ce.produceWithPatches.bind(ce),M6=ce.setAutoFreeze.bind(ce),k6=ce.setUseProxies.bind(ce),z6=ce.applyPatches.bind(ce),T6=ce.createDraft.bind(ce),I6=ce.finishDraft.bind(ce),yo=T4;function St(e){"@babel/helpers - typeof";return St=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},St(e)}function $s(e,t){if(St(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(St(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ws(e){var t=$s(e,"string");return St(t)=="symbol"?t:t+""}function js(e,t,o){return(t=Ws(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Vs(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 Pn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Vs(Object(o),!0).forEach(function(n){js(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Vs(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function ee(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 Ks=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Dn=function(){return Math.random().toString(36).substring(7).split("").join(".")},bo={INIT:"@@redux/INIT"+Dn(),REPLACE:"@@redux/REPLACE"+Dn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Dn()}};function I4(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 Un(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(ee(1));return o(Un)(e,t)}if(typeof e!="function")throw new Error(ee(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(ee(3));return i}function g(S){if(typeof S!="function")throw new Error(ee(4));if(u)throw new Error(ee(5));var A=!0;return p(),l.push(S),function(){if(A){if(u)throw new Error(ee(6));A=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!I4(S))throw new Error(ee(7));if(typeof S.type>"u")throw new Error(ee(8));if(u)throw new Error(ee(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var A=s=l,L=0;L<A.length;L++){var N=A[L];N()}return S}function v(S){if(typeof S!="function")throw new Error(ee(10));a=S,y({type:bo.REPLACE})}function x(){var S,A=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ee(11));function M(){N.next&&N.next(m())}M();var z=A(M);return{unsubscribe:z}}},S[Ks]=function(){return this},S}return y({type:bo.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[Ks]=x,n}function P4(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:bo.INIT});if(typeof n>"u")throw new Error(ee(12));if(typeof o(void 0,{type:bo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function Zs(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{P4(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],A=o[S],L=p[S],N=A(L,m);if(typeof N>"u"){var M=m&&m.type;throw new Error(ee(14))}v[S]=N,y=y||N!==L}return y=y||i.length!==Object.keys(p).length,y?v:p}}function er(){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 qs(){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(ee(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=er.apply(void 0,l)(a.dispatch),Pn(Pn({},a),{},{dispatch:i})}}}function Ys(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 Xs=Ys();Xs.withExtraArgument=Ys;var Bn=Xs;var rc=(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)}})(),D4=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}}},tr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},U4=Object.defineProperty,B4=Object.defineProperties,F4=Object.getOwnPropertyDescriptors,Qs=Object.getOwnPropertySymbols,G4=Object.prototype.hasOwnProperty,H4=Object.prototype.propertyIsEnumerable,Js=function(e,t,o){return t in e?U4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},et=function(e,t){for(var o in t||(t={}))G4.call(t,o)&&Js(e,o,t[o]);if(Qs)for(var n=0,a=Qs(t);n<a.length;n++){var o=a[n];H4.call(t,o)&&Js(e,o,t[o])}return e},Fn=function(e,t){return B4(e,F4(t))},$4=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 W4=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?er:er.apply(null,arguments)},J6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function j4(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 tt(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 et(et({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 V4=(function(e){rc(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,tr([void 0],o[0].concat(this)))):new(t.bind.apply(t,tr([void 0],o.concat(this))))},t})(Array),K4=(function(e){rc(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,tr([void 0],o[0].concat(this)))):new(t.bind.apply(t,tr([void 0],o.concat(this))))},t})(Array);function $n(e){return Le(e)?yo(e,function(){}):e}function Z4(e){return typeof e=="boolean"}function q4(){return function(t){return Y4(t)}}function Y4(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 V4;if(o&&(Z4(o)?p.push(Bn):p.push(Bn.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var Gn=!0;function oc(e){var t=q4(),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(j4(a))v=Zs(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),!Gn&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gn&&x.some(function(z){return typeof z!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=qs.apply(void 0,x),A=er;u&&(A=W4(et({trace:!Gn},typeof u=="object"&&u)));var L=new K4(S),N=L;Array.isArray(y)?N=tr([S],y):typeof y=="function"&&(N=y(L));var M=A.apply(void 0,N);return Un(v,m,M)}function nc(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 X4(e){return typeof e=="function"}function Q4(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?nc(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(X4(e))u=function(){return $n(e())};else{var p=$n(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=tr([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(Be(x)){var A=x,L=S(A,y);return L===void 0?x:L}else{if(Le(x))return yo(x,function(N){return S(N,y)});var L=S(x,y);if(L===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return x},g)}return m.getInitialState=u,m}function J4(e,t){return e+"/"+t}function ac(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:$n(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=J4(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?tt(y,x):tt(y)});function u(){var m=typeof e.extraReducers=="function"?nc(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],A=S===void 0?void 0:S,L=et(et({},y),s);return Q4(o,function(N){for(var M in L)N.addCase(M,L[M]);for(var z=0,D=x;z<D.length;z++){var G=D[z];N.addMatcher(G.matcher,G.reducer)}A&&N.addDefaultCase(A)})}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 e0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",t0=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=e0[Math.random()*64|0];return t},r0=["name","message","stack","code"],Hn=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),ec=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),o0=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=r0;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},op=(function(){function e(t,o,n){var a=tt(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:Fn(et({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=tt(t+"/pending",function(m,g,y){return{payload:void 0,meta:Fn(et({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=tt(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||o0)(m||"Rejected"),meta:Fn(et({},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):t0(),S=new u,A,L=!1;function N(z){A=z,S.abort()}var M=(function(){return $4(this,null,function(){var z,D,G,Ne,ct,_e,ie;return D4(this,function(fe){switch(fe.label){case 0:return fe.trys.push([0,4,,5]),Ne=(z=n?.condition)==null?void 0:z.call(n,m,{getState:y,extra:v}),a0(Ne)?[4,Ne]:[3,2];case 1:Ne=fe.sent(),fe.label=2;case 2:if(Ne===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,ct=new Promise(function(se,lt){return S.signal.addEventListener("abort",function(){return lt({name:"AbortError",message:A||"Aborted"})})}),g(i(x,m,(D=n?.getPendingMeta)==null?void 0:D.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([ct,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(se,lt){return new Hn(se,lt)},fulfillWithValue:function(se,lt){return new ec(se,lt)}})).then(function(se){if(se instanceof Hn)throw se;return se instanceof ec?a(se.payload,x,m,se.meta):a(se,x,m)})])];case 3:return G=fe.sent(),[3,5];case 4:return _e=fe.sent(),G=_e instanceof Hn?s(null,x,m,_e.payload,_e.meta):s(_e,x,m),[3,5];case 5:return ie=n&&!n.dispatchConditionRejection&&s.match(G)&&G.meta.condition,ie||g(G),[2,G]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:m,unwrap:function(){return M.then(n0)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function n0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function a0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var ic="listener",sc="completed",cc="cancelled",np="task-"+cc,ap="task-"+sc,ip=ic+"-"+cc,sp=ic+"-"+sc;var Wn="listenerMiddleware";var cp=tt(Wn+"/add"),lp=tt(Wn+"/removeAll"),dp=tt(Wn+"/remove");var tc,up=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(tc||(tc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},i0=function(e){return function(t){setTimeout(t,e)}},fp=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:i0(10);Fs();var s0=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)}}}),vo=class extends s0(Object){};window.ftReduxStores||(window.ftReduxStores={});var lc=class e extends vo{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(po(i))return i;if(a==null)return;let s=ac({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=oc({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=Rr(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 xo=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 So=R(P()),c0="ft-app-info",rr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};rr.eventName="authentication-change";var zr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};zr.eventName="ui-locale-changed";var l0={session:(e,t)=>{(0,So.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>I.dispatchEvent(new rr(t.payload)),0))}},I=So.FtReduxStore.get({name:c0,reducers:l0,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 dc=R(P()),Co=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},Fp=(0,dc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>xo.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Co([(0,jn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Co([(0,jn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Co([Sn({store:I.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),Co([Sn({store:I.name})],t.prototype,"uiLocale",void 0),t});var uc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(uc||(uc={}));var fc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(fc||(fc={}));var pc;(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"})(pc||(pc={}));var hc;(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"})(hc||(hc={}));var mc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(mc||(mc={}));var gc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(gc||(gc={}));var yc;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(yc||(yc={}));var bc;(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"})(bc||(bc={}));var vc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(vc||(vc={}));var xc;(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"})(xc||(xc={}));var Sc;(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"})(Sc||(Sc={}));var Cc;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Cc||(Cc={}));var Ec;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ec||(Ec={}));var Lc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Lc||(Lc={}));var Ac;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ac||(Ac={}));var Oc;(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"})(Oc||(Oc={}));var Rc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Rc||(Rc={}));var wc;(function(e){e.ASC="ASC",e.DESC="DESC"})(wc||(wc={}));var Nc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Nc||(Nc={}));var _c;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(_c||(_c={}));var Mc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Mc||(Mc={}));var kc;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(kc||(kc={}));var zc;(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"})(zc||(zc={}));var Tc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Tc||(Tc={}));var Ic;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ic||(Ic={}));var Pc;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pc||(Pc={}));var Dc;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Dc||(Dc={}));var q;(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"})(q||(q={}));var ye;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ye||(ye={}));var Uc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Uc||(Uc={}));var Bc;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Bc||(Bc={}));var Fc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Fc||(Fc={}));var Gc;(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"})(Gc||(Gc={}));var Hc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Hc||(Hc={}));var $c;(function(e){e.JSON="JSON",e.TEXT="TEXT"})($c||($c={}));var Wc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Wc||(Wc={}));var jc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(jc||(jc={}));var Vc;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Vc||(Vc={}));var Kc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Kc||(Kc={}));var Zc;(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"})(Zc||(Zc={}));var qc;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(qc||(qc={}));var d0={[q.PERSONAL_BOOK_SHARE_USER]:[q.PERSONAL_BOOK_USER],[q.HTML_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.PDF_EXPORT_USER]:[q.PERSONAL_BOOK_USER],[q.KHUB_ADMIN]:[q.CONTENT_PUBLISHER],[q.ADMIN]:[q.KHUB_ADMIN,q.USERS_ADMIN,q.PORTAL_ADMIN,q.BEHAVIOR_DATA_USER],[q.GENERATIVE_AI_EXPORT_USER]:[q.GENERATIVE_AI_USER]};function Yc(e,t){return e===t||(d0[e]??[]).some(o=>Yc(o,t))}function Xc(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=>Yc(n,t))}var Ro=R(P());var Vn=R(P());var Ct=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=I.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=I.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var or=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Ct.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ct.await()}};var le=class extends or{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 Vn.CacheRegistry,this.cache=t?a.commonCache:new Vn.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 Eo=class extends le{async listMySearches(){let{session:t}=I.getState();return Xc(t,q.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Lo=class extends le{async listMyBookmarks(){let t=I.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Ao=class extends le{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=I.getState().session;return!!t?.sessionAuthenticated}};var Oo=class extends le{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=I.getState().session;return!!t?.sessionAuthenticated}};var u0="ft-user-assets",f0={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(ye).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;Zn(e,o,[...Kn(e,o),a]),Qc(e,o,1,n),Jc(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;Zn(e,o,Kn(e,o).map(a=>a.id===n.id?n:a)),Jc(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;Zn(e,o,Kn(e,o).filter(i=>i.id!==a)),Qc(e,o,-1,n)}},el={[ye.SEARCHES]:"savedSearches",[ye.BOOKMARKS]:"bookmarks",[ye.BOOKS]:void 0,[ye.COLLECTIONS]:void 0},Kn=(e,t)=>{var o;let n=el[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},Zn=(e,t,o)=>{let n=el[t];n&&(e[n]=o)},Qc=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===ye.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Jc=(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)},re=Ro.FtReduxStore.get({name:u0,reducers:f0,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ye).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),qn=class{constructor(t=new Ao,o=new Oo){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Lo,this.savedSearchesService=new Eo,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=I.getState();(0,Ro.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(),re.actions.clearAssetCount(),re.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),re.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),re.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();re.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();re.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&re.getState().assetCounts.allAsset[t]!==o.count&&re.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&re.getState().assetCounts.bookmarkByMap[t]!==o.count&&re.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(re.getState().assetCounts.bookmarkByMap).length!==0;t===ye.BOOKMARKS&&o&&re.actions.clearBookmarkCountByMap(),re.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;re.actions.bookmarks(o)}}},p0=new qn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=p0);var Yn=class{addCommand(t,o=!1){I.commands.add(t,o)}consumeCommand(t){return I.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Yn;var be=R(P());var tl,nr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},h0=Symbol("clearAfterUnitTest"),wo=class extends(0,be.withEventBus)(le){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[tl]=()=>{this.defaultMessages={},this.cache=new be.CacheRegistry,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=I.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let 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,be.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 be.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 be.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 nr({loadedContexts:t})),this.dispatchEvent(new nr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new nr({loadedContexts:[t]})),this.dispatchEvent(new nr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,be.delay)(0).then(()=>n()).catch(()=>null)))}};tl=h0;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends wo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Tr=window.FluidTopicsI18nService,Xn=window.FluidTopicsCustomI18nService;var rl=R(P()),Qn=class{highlightHtml(t,o,n){(0,rl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new Qn;var ol=R(P());var Jn=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=I.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 ol.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:I.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 Jn;var nl=R(P());var Ir=class{static get(t,o){var n,a;let i=I.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new nl.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ea=class{urlToSearchRequest(t){return Ir.get().parse(t)}searchRequestToUrl(t){return Ir.get().serialize(t)}};window.FluidTopicsUrlService=new ea;var Fe=R(P());var Et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Et.eventName="change";var ta=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))}},al=new ta;var No=class e extends Fe.WithEventBus{static build(){return new e(window.history,al,()=>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,Fe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Et(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(Et.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Et.eventName,t)}currentItem(){return(0,Fe.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,Fe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Fe.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,Fe.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=No.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var il=R(Y());var sl=il.css`
337
337
  `;var dl=R(Y()),de=R(oe()),Ot=R(P());var Lt=R(P());function cl(e,t){let{authenticationRequired:o,session:n}=I.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var _o=class extends or{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ra=class e extends Lt.FtStateManager{static build(t){return new e(I,t)}constructor(t,o){super(),this.store=t,this.cache=new Lt.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new _o,this.cleanSessionDebouncer=new Lt.Debouncer,this.reloadDebouncer=new Lt.Debouncer(500),this.apiProvider=o??(()=>Ct.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(rr.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",()=>cl(()=>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 zr(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)}},ll=ra.build();var At=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 Pr=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 At(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 te=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},j=class extends Ot.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=ll,this.contextRoot=new Pr}render(){return dl.html`
338
338
  <slot></slot>
339
339
  `}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=>Tr.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())}};j.elementDefinitions={};j.styles=sl;te([(0,de.property)()],j.prototype,"baseUrl",void 0);te([(0,de.property)()],j.prototype,"apiIntegrationIdentifier",void 0);te([(0,de.property)()],j.prototype,"apiIntegrationAppVersion",void 0);te([(0,de.property)()],j.prototype,"uiLocale",void 0);te([(0,Ot.jsonProperty)(null)],j.prototype,"availableUiLocales",void 0);te([(0,Ot.jsonProperty)(null)],j.prototype,"metadataConfiguration",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"editorMode",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"noCustom",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"openExternalDocumentInNewTab",void 0);te([(0,de.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],j.prototype,"noCustomComponent",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"withManualResources",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"navigatorOnline",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"forcedOffline",void 0);te([(0,de.property)({type:Boolean})],j.prototype,"authenticationRequired",void 0);te([(0,Ot.jsonProperty)([])],j.prototype,"messageContexts",void 0);te([(0,Ot.jsonProperty)(void 0)],j.prototype,"session",void 0);var fl=R(P());var ul={"ft-app-context":j};(0,fl.customElements)(ul);var pl=R(oe());var oa=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-]+$/)}},ar=new oa;var y0=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},Ur=Symbol("i18nAttributes"),hl=Symbol("i18nListAttributes"),ml=Symbol("i18nProperties"),Mo=Symbol("i18nContexts"),Dr=Symbol("i18nUnsubs"),gl=(0,ir.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?Xn:Tr}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(ar.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[Ur])===null||s===void 0||s.forEach((m,g)=>u[g]=p(m,g,u[g])),(l=this[hl])===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[ml])===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[Mo].set(u,{isCustomContext:l}),this[Dr].has(u)||this[Dr].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[Mo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Mo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Dr].forEach(i=>i()),this[Dr].clear()}}return t=Mo,o=Dr,y0([(0,pl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ko=class extends gl(ir.FtLitElement){},zo=class extends gl(ir.FtLitElementRedux){};var yl=R(P());var na=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?ar.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},b0=new na;var bl=(e,t)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:yl.hasChanged,converter:ar,...t}),o[Ur]=(a=o[Ur])!==null&&a!==void 0?a:new Map,o[Ur].set(n,e??{})};var vl=R(Y());var xl=vl.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 fl={};var ui={};G(ui,{ParametrizedLabelResolver:()=>co});var co=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 Pi={};G(Pi,{FtCommandQueue:()=>lo,FtLitElementRedux:()=>Ut,FtReduxStore:()=>$t,FtStateManager:()=>mo,ReduxWatcher:()=>cn,clearAllStores:()=>Zu,isFtReduxStore:()=>ur,redux:()=>dr,reduxEventListener:()=>uu,reduxReactive:()=>du,watch:()=>qu,withRedux:()=>pl});var du=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},dr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Ye,attribute:!1,...e};O(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},uu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var lo=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 ur(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var uo=Symbol("internalReduxEventsUnsubscribers"),pt=Symbol("internalStoresUnsubscribers"),Dt=Symbol("internalStores"),pl=le(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[Dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Dt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Dt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Dt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Dt].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[pt].has(s.store):this[pt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[pt].set(s,c.subscribe(()=>this.updateFromStores())),this[uo].set(s,[]),ur(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[uo].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[pt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[pt].has(s)&&this[pt].get(s)(),this[pt].delete(s),(c=this[uo].get(s))===null||c===void 0||c.forEach(d=>d()),this[uo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=pt,r=Dt,o=uo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ut=class extends pl(Z){};function Ne(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 et(t){return!!t&&!!t[X]}function ze(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===vu})(t)||Array.isArray(t)||!!t[xl]||!!(!((e=t.constructor)===null||e===void 0)&&e[xl])||xi(t)||Si(t))}function Ft(t,e,r){r===void 0&&(r=!1),hr(t)===0?(r?Object.keys:pr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function hr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:xi(t)?2:Si(t)?3:0}function fr(t,e){return hr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function fu(t,e){return hr(t)===2?t.get(e):t[e]}function Sl(t,e,r){var o=hr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Cl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function xi(t){return yu&&t instanceof Map}function Si(t){return bu&&t instanceof Set}function ht(t){return t.o||t.t}function Ci(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ll(t);delete e[X];for(var r=pr(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 Ei(t,e){return e===void 0&&(e=!1),Ai(t)||et(t)||!ze(t)||(hr(t)>1&&(t.set=t.add=t.clear=t.delete=pu),Object.freeze(t),e&&Ft(t,(function(r,o){return Ei(o,!0)}),!0)),t}function pu(){Ne(2)}function Ai(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ke(t){var e=vi[t];return e||Ne(18,t),e}function hu(t,e){vi[t]||(vi[t]=e)}function gi(){return po}function fi(t,e){e&&(Ke("Patches"),t.u=[],t.s=[],t.v=e)}function rn(t){yi(t),t.p.forEach(mu),t.p=null}function yi(t){t===po&&(po=t.l)}function hl(t){return po={p:[],l:po,h:t,m:!0,_:0}}function mu(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function pi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Ke("ES5").S(e,t,o),o?(r[X].P&&(rn(e),Ne(4)),ze(t)&&(t=on(e,t),e.l||nn(e,t)),e.u&&Ke("Patches").M(r[X].t,t,e.u,e.s)):t=on(e,r,[]),rn(e),e.u&&e.v(e.u,e.s),t!==Al?t:void 0}function on(t,e,r){if(Ai(e))return e;var o=e[X];if(!o)return Ft(e,(function(c,d){return ml(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return nn(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ci(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Ft(i,(function(c,d){return ml(t,o,a,c,d,r,s)})),nn(t,a,!1),r&&t.u&&Ke("Patches").N(o,r,t.u,t.s)}return o.o}function ml(t,e,r,o,a,i,s){if(et(a)){var c=on(t,a,i&&e&&e.i!==3&&!fr(e.R,o)?i.concat(o):void 0);if(Sl(r,o,c),!et(c))return;t.m=!1}else s&&r.add(a);if(ze(a)&&!Ai(a)){if(!t.h.D&&t._<1)return;on(t,a),e&&e.A.l||nn(t,a)}}function nn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ei(e,r)}function hi(t,e){var r=t[X];return(r?ht(r):t)[e]}function gl(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function mt(t){t.P||(t.P=!0,t.l&&mt(t.l))}function mi(t){t.o||(t.o=Ci(t.t))}function bi(t,e,r){var o=xi(e)?Ke("MapSet").F(e,r):Si(e)?Ke("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:gi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=ho;s&&(d=[c],u=fo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):Ke("ES5").J(e,r);return(r?r.A:gi()).p.push(o),o}function gu(t){return et(t)||Ne(22,t),(function e(r){if(!ze(r))return r;var o,a=r[X],i=hr(r);if(a){if(!a.P&&(a.i<4||!Ke("ES5").K(a)))return a.t;a.I=!0,o=yl(r,i),a.I=!1}else o=yl(r,i);return Ft(o,(function(s,c){a&&fu(a.t,s)===c||Sl(o,s,e(c))})),i===3?new Set(o):o})(t)}function yl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ci(t)}function El(){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[X];return ho.get(u,s)},set:function(u){var m=this[X];ho.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][X];if(!d.P)switch(d.i){case 5:o(d)&&mt(d);break;case 4:r(d)&&mt(d)}}}function r(s){for(var c=s.t,d=s.k,u=pr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==X){var y=c[h];if(y===void 0&&!fr(c,h))return!0;var b=d[h],x=b&&b[X];if(x?x.t!==y:!Cl(b,y))return!0}}var C=!!c[X];return u.length!==pr(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&&Ne(3,JSON.stringify(ht(s)))}var i={};hu("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=Ll(y);delete C[X];for(var L=pr(C),R=0;R<L.length;R++){var N=L[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:gi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:m,writable:!0}),u},S:function(s,c,d){d?et(c)&&c[X].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[X];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)Ft(b,(function(S){S!==X&&(y[S]!==void 0||fr(y,S)?x[S]||u(b[S]):(x[S]=!0,mt(h)))})),Ft(y,(function(S){b[S]!==void 0||fr(b,S)||(x[S]=!1,mt(h))}));else if(C===5){if(o(h)&&(mt(h),x.length=!0),b.length<y.length)for(var L=b.length;L<y.length;L++)x[L]=!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 bl,po,Li=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yu=typeof Map<"u",bu=typeof Set<"u",vl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Al=Li?Symbol.for("immer-nothing"):((bl={})["immer-nothing"]=!0,bl),xl=Li?Symbol.for("immer-draftable"):"__$immer_draftable",X=Li?Symbol.for("immer-state"):"__$immer_state";var vu=""+Object.prototype.constructor,pr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ll=Object.getOwnPropertyDescriptors||function(t){var e={};return pr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},vi={},ho={get:function(t,e){if(e===X)return t;var r=ht(t);if(!fr(r,e))return(function(a,i,s){var c,d=gl(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!ze(o)?o:o===hi(t.t,e)?(mi(t),t.o[e]=bi(t.A.h,o,t)):o},has:function(t,e){return e in ht(t)},ownKeys:function(t){return Reflect.ownKeys(ht(t))},set:function(t,e,r){var o=gl(ht(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=hi(ht(t),e),i=a?.[X];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Cl(r,a)&&(r!==void 0||fr(t.t,e)))return!0;mi(t),mt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return hi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,mi(t),mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ht(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){Ne(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ne(12)}},fo={};Ft(ho,(function(t,e){fo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),fo.deleteProperty=function(t,e){return fo.set.call(this,t,e,void 0)},fo.set=function(t,e,r){return ho.set.call(this,t[0],e,r,t[0])};var xu=(function(){function t(r){var o=this;this.O=vl,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 L=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 A;return(A=i).call.apply(A,[L,S].concat(N))}))}}var u;if(typeof i!="function"&&Ne(6),s!==void 0&&typeof s!="function"&&Ne(7),ze(a)){var m=hl(o),h=bi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?rn(m):yi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return fi(m,s),pi(C,m)}),(function(C){throw rn(m),C})):(fi(m,s),pi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Al&&(u=void 0),o.D&&Ei(u,!0),s){var b=[],x=[];Ke("Patches").M(a,u,b,x),s(b,x)}return u}Ne(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){ze(r)||Ne(8),et(r)&&(r=gu(r));var o=hl(this),a=bi(this,r,void 0);return a[X].C=!0,yi(o),a},e.finishDraft=function(r,o){var a=r&&r[X],i=a.A;return fi(i,o),pi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!vl&&Ne(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=Ke("Patches").$;return et(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),Ce=new xu,Su=Ce.produce,_g=Ce.produceWithPatches.bind(Ce),Ng=Ce.setAutoFreeze.bind(Ce),Mg=Ce.setUseProxies.bind(Ce),Tg=Ce.applyPatches.bind(Ce),kg=Ce.createDraft.bind(Ce),Ig=Ce.finishDraft.bind(Ce),an=Su;function Bt(t){"@babel/helpers - typeof";return Bt=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},Bt(t)}function Ol(t,e){if(Bt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Bt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rl(t){var e=Ol(t,"string");return Bt(e)=="symbol"?e:e+""}function wl(t,e,r){return(e=Rl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _l(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 Oi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_l(Object(r),!0).forEach(function(o){wl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_l(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function fe(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 Nl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ri=function(){return Math.random().toString(36).substring(7).split("").join(".")},sn={INIT:"@@redux/INIT"+Ri(),REPLACE:"@@redux/REPLACE"+Ri(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ri()}};function Cu(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 wi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(fe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(fe(1));return r(wi)(t,e)}if(typeof t!="function")throw new Error(fe(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(fe(3));return i}function h(C){if(typeof C!="function")throw new Error(fe(4));if(d)throw new Error(fe(5));var L=!0;return u(),c.push(C),function(){if(L){if(d)throw new Error(fe(6));L=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!Cu(C))throw new Error(fe(7));if(typeof C.type>"u")throw new Error(fe(8));if(d)throw new Error(fe(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var L=s=c,R=0;R<L.length;R++){var N=L[R];N()}return C}function b(C){if(typeof C!="function")throw new Error(fe(10));a=C,y({type:sn.REPLACE})}function x(){var C,L=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(fe(11));function E(){N.next&&N.next(m())}E();var S=L(E);return{unsubscribe:S}}},C[Nl]=function(){return this},C}return y({type:sn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Nl]=x,o}function Eu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:sn.INIT});if(typeof o>"u")throw new Error(fe(12));if(typeof r(void 0,{type:sn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fe(13))})}function Ml(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{Eu(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],L=r[C],R=u[C],N=L(R,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(fe(14))}b[C]=N,y=y||N!==R}return y=y||i.length!==Object.keys(u).length,y?b:u}}function mr(){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 Tl(){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(fe(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=mr.apply(void 0,c)(a.dispatch),Oi(Oi({},a),{},{dispatch:i})}}}function kl(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 Il=kl();Il.withExtraArgument=kl;var _i=Il;var Fl=(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)}})(),Au=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}}},gr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Lu=Object.defineProperty,Ou=Object.defineProperties,Ru=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertySymbols,wu=Object.prototype.hasOwnProperty,_u=Object.prototype.propertyIsEnumerable,zl=function(t,e,r){return e in t?Lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},gt=function(t,e){for(var r in e||(e={}))wu.call(e,r)&&zl(t,r,e[r]);if(Pl)for(var o=0,a=Pl(e);o<a.length;o++){var r=a[o];_u.call(e,r)&&zl(t,r,e[r])}return t},Ni=function(t,e){return Ou(t,Ru(e))},Nu=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 Mu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mr:mr.apply(null,arguments)},Jg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Tu(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 yt(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 gt(gt({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 ku=(function(t){Fl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array),Iu=(function(t){Fl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array);function ki(t){return ze(t)?an(t,function(){}):t}function Pu(t){return typeof t=="boolean"}function zu(){return function(e){return Du(e)}}function Du(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 ku;if(r&&(Pu(r)?u.push(_i):u.push(_i.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Mi=!0;function Bl(t){var e=zu(),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(Tu(a))b=Ml(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),!Mi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Mi&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Tl.apply(void 0,x),L=mr;d&&(L=Mu(gt({trace:!Mi},typeof d=="object"&&d)));var R=new Iu(C),N=R;Array.isArray(y)?N=gr([C],y):typeof y=="function"&&(N=y(R));var E=L.apply(void 0,N);return wi(b,m,E)}function $l(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 Uu(t){return typeof t=="function"}function Fu(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?$l(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(Uu(t))d=function(){return ki(t())};else{var u=ki(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=gr([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(et(x)){var L=x,R=C(L,y);return R===void 0?x:R}else{if(ze(x))return an(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 Bu(t,e){return t+"/"+e}function Hl(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:ki(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Bu(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?yt(y,x):yt(y)});function d(){var m=typeof t.extraReducers=="function"?$l(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],L=C===void 0?void 0:C,R=gt(gt({},y),s);return Fu(r,function(N){for(var E in R)N.addCase(E,R[E]);for(var S=0,A=x;S<A.length;S++){var T=A[S];N.addMatcher(T.matcher,T.reducer)}L&&N.addDefaultCase(L)})}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 $u="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=$u[Math.random()*64|0];return e},Gu=["name","message","stack","code"],Ti=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Dl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Wu=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Gu;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},ry=(function(){function t(e,r,o){var a=yt(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Ni(gt({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=yt(e+"/pending",function(m,h,y){return{payload:void 0,meta:Ni(gt({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=yt(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||Wu)(m||"Rejected"),meta:Ni(gt({},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):Hu(),C=new d,L,R=!1;function N(S){L=S,C.abort()}var E=(function(){return Nu(this,null,function(){var S,A,T,F,Y,H,I;return Au(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}),Vu(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,Y=new Promise(function(W,ne){return C.signal.addEventListener("abort",function(){return ne({name:"AbortError",message:L||"Aborted"})})}),h(i(x,m,(A=o?.getPendingMeta)==null?void 0:A.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([Y,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(W,ne){return new Ti(W,ne)},fulfillWithValue:function(W,ne){return new Dl(W,ne)}})).then(function(W){if(W instanceof Ti)throw W;return W instanceof Dl?a(W.payload,x,m,W.meta):a(W,x,m)})])];case 3:return T=D.sent(),[3,5];case 4:return H=D.sent(),T=H instanceof Ti?s(null,x,m,H.payload,H.meta):s(H,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(ju)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function ju(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Vu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Gl="listener",Wl="completed",jl="cancelled",oy="task-"+jl,ny="task-"+Wl,ay=Gl+"-"+jl,iy=Gl+"-"+Wl;var Ii="listenerMiddleware";var sy=yt(Ii+"/add"),cy=yt(Ii+"/removeAll"),ly=yt(Ii+"/remove");var Ul,dy=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ul||(Ul=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Ku=function(t){return function(e){setTimeout(e,t)}},uy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ku(10);El();window.ftReduxStores||(window.ftReduxStores={});var $t=class t extends Xe{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(ur(i))return i;if(a==null)return;let s=Hl({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=Bl({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Ie(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 lo;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 Zu(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ur(e)&&e.clear()}var cn=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);Ye(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 qu(t,e,r){return new cn(t,e,r).watch()}var mo=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 Ui={};G(Ui,{scrollHelper:()=>Yu});var zi,ln=new Map,Di=class{lock(e,r){if(r){let o=ln.get(r);if(o==null||o===e)return ln.set(r,e),r}}release(e,r){r&&ln.get(r)===e&&ln.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of sa(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=wt(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=(zi=window.FluidTopicsScrollHelper)!==null&&zi!==void 0?zi:new Di;var Yu=window.FluidTopicsScrollHelper;var Bi={};G(Bi,{SearchPlaceConverter:()=>vr,SearchPlaceQueryParams:()=>$,isSearchPlaceQueryParams:()=>k1,serializeRequest:()=>Qu});var Vl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Vl||(Vl={}));var Kl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Kl||(Kl={}));var Zl;(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"})(Zl||(Zl={}));var ql;(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"})(ql||(ql={}));var Yl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Yl||(Yl={}));var Xl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Xl||(Xl={}));var Jl;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Jl||(Jl={}));var Ql;(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"})(Ql||(Ql={}));var e1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(e1||(e1={}));var t1;(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"})(t1||(t1={}));var r1;(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"})(r1||(r1={}));var o1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(o1||(o1={}));var n1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(n1||(n1={}));var a1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(a1||(a1={}));var i1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(i1||(i1={}));var s1;(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"})(s1||(s1={}));var yr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(yr||(yr={}));var c1;(function(t){t.ASC="ASC",t.DESC="DESC"})(c1||(c1={}));var l1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(l1||(l1={}));var Fi;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Fi||(Fi={}));var y1=t=>Object.keys(Fi).includes(t);var d1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(d1||(d1={}));var u1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(u1||(u1={}));var f1;(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"})(f1||(f1={}));var br;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(br||(br={}));var b1=t=>Object.keys(br).includes(t);var p1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(p1||(p1={}));var h1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(h1||(h1={}));var m1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(m1||(m1={}));var oe;(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"})(oe||(oe={}));var Me;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Me||(Me={}));var g1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(g1||(g1={}));var v1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(v1||(v1={}));var x1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(x1||(x1={}));var S1;(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"})(S1||(S1={}));var C1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(C1||(C1={}));var E1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(E1||(E1={}));var A1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(A1||(A1={}));var L1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(L1||(L1={}));var O1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(O1||(O1={}));var R1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(R1||(R1={}));var w1;(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"})(w1||(w1={}));var _1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(_1||(_1={}));var Xu={[oe.PERSONAL_BOOK_SHARE_USER]:[oe.PERSONAL_BOOK_USER],[oe.HTML_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.PDF_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.KHUB_ADMIN]:[oe.CONTENT_PUBLISHER],[oe.ADMIN]:[oe.KHUB_ADMIN,oe.USERS_ADMIN,oe.PORTAL_ADMIN,oe.BEHAVIOR_DATA_USER],[oe.GENERATIVE_AI_EXPORT_USER]:[oe.GENERATIVE_AI_USER]};function N1(t,e){return t===e||(Xu[t]??[]).some(r=>N1(r,e))}function M1(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=>N1(o,e))}function Ju(t){return`"${t}"`}function T1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Qu(t,e){return new vr(t).serialize(e)}var $;(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"})($||($={}));var ef=new Set(Object.values($));function k1(t){return ef.has(t)}var vr=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($.LOCALE,e.contentLocale):x.append($.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append($.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(A=>{var T,F;let Y=((F=(T=A.valueFilter)===null||T===void 0?void 0:T.values)!==null&&F!==void 0?F:[]).map(H=>this.escapeFilters(H)).map(H=>Ju(T1(H))).join("_");return`${A.key}~${Y}`}).join("*");x.append($.VALUE_FILTERS,S)}let L=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(L.length>0){let S=L.map(A=>{var T;return`${A.key}~${(T=A.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");x.append($.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(A=>{var T,F;return`${A.key}~${(T=A.rangeFilter)===null||T===void 0?void 0:T.from}_${(F=A.rangeFilter)===null||F===void 0?void 0:F.to}`}).join("*");x.append($.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append($.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append($.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append($.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($.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append($.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,A)=>{E.push(this.encodeQueryString(A)+"="+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($.LOCALE)==="all"?void 0:d.get($.LOCALE),m=((r=d.get($.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get($.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get($.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get($.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get($.KEYWORD_MATCH),C=x?x.toUpperCase()===yr.MANDATORY?yr.MANDATORY:yr.OPTIONAL:void 0,L={};for(let R of d.keys())k1(R)||(L[R]=d.get(R));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get($.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:y1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:wt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:L}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has($.FILTERS)&&(d=this.parseValueFilters((r=e.get($.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has($.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get($.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get($.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get($.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get($.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(T1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:br[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(b1(e))return[{key:"ft:lastEdition",dateFilter:{type:br[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[$.LOCALE,$.FILTERS,$.VALUE_FILTERS,$.DATE_FILTERS,$.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete($.LOCALE),r!==void 0&&o.searchParams.append($.LOCALE,r),o.toString()}};var Gi={};G(Gi,{toFtFormComponent:()=>Hi});var $i=Symbol("elementInternals"),Hi=le(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[$i].form}constructor(...o){super(o),this[$i]=this.attachInternals()}setFormValue(o){this[$i].setFormValue(o)}}return e});var Wi={};G(Wi,{DateFormatter:()=>Ht});var Ht=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 Vi={};G(Vi,{ALL_KEYS_VALUE:()=>ji,SameWindowStorageEvent:()=>xr});var ji="__all__",xr=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 xr(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 xr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new xr(ji))}});var Zi={};G(Zi,{FocusMainContentEvent:()=>Ki});var Ki=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var I1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function tf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function rf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",tf);document.addEventListener("click",rf);var P1=z`
47
+ `;var fl={};var ui={};G(ui,{ParametrizedLabelResolver:()=>co});var co=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 Pi={};G(Pi,{FtCommandQueue:()=>lo,FtLitElementRedux:()=>Ut,FtReduxStore:()=>$t,FtStateManager:()=>mo,ReduxWatcher:()=>cn,clearAllStores:()=>Zu,isFtReduxStore:()=>ur,redux:()=>dr,reduxEventListener:()=>uu,reduxReactive:()=>du,watch:()=>qu,withRedux:()=>pl});var du=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},dr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Ye,attribute:!1,...e};O(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},uu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var lo=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 ur(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var uo=Symbol("internalReduxEventsUnsubscribers"),pt=Symbol("internalStoresUnsubscribers"),Dt=Symbol("internalStores"),pl=le(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[Dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Dt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Dt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Dt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Dt].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[pt].has(s.store):this[pt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[pt].set(s,c.subscribe(()=>this.updateFromStores())),this[uo].set(s,[]),ur(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[uo].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[pt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[pt].has(s)&&this[pt].get(s)(),this[pt].delete(s),(c=this[uo].get(s))===null||c===void 0||c.forEach(d=>d()),this[uo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=pt,r=Dt,o=uo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ut=class extends pl(Z){};function Ne(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 et(t){return!!t&&!!t[X]}function ze(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===vu})(t)||Array.isArray(t)||!!t[xl]||!!(!((e=t.constructor)===null||e===void 0)&&e[xl])||xi(t)||Si(t))}function Ft(t,e,r){r===void 0&&(r=!1),hr(t)===0?(r?Object.keys:pr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function hr(t){var e=t[X];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:xi(t)?2:Si(t)?3:0}function fr(t,e){return hr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function fu(t,e){return hr(t)===2?t.get(e):t[e]}function Sl(t,e,r){var o=hr(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Cl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function xi(t){return yu&&t instanceof Map}function Si(t){return bu&&t instanceof Set}function ht(t){return t.o||t.t}function Ci(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ll(t);delete e[X];for(var r=pr(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 Ei(t,e){return e===void 0&&(e=!1),Ai(t)||et(t)||!ze(t)||(hr(t)>1&&(t.set=t.add=t.clear=t.delete=pu),Object.freeze(t),e&&Ft(t,(function(r,o){return Ei(o,!0)}),!0)),t}function pu(){Ne(2)}function Ai(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ke(t){var e=vi[t];return e||Ne(18,t),e}function hu(t,e){vi[t]||(vi[t]=e)}function gi(){return po}function fi(t,e){e&&(Ke("Patches"),t.u=[],t.s=[],t.v=e)}function rn(t){yi(t),t.p.forEach(mu),t.p=null}function yi(t){t===po&&(po=t.l)}function hl(t){return po={p:[],l:po,h:t,m:!0,_:0}}function mu(t){var e=t[X];e.i===0||e.i===1?e.j():e.g=!0}function pi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Ke("ES5").S(e,t,o),o?(r[X].P&&(rn(e),Ne(4)),ze(t)&&(t=on(e,t),e.l||nn(e,t)),e.u&&Ke("Patches").M(r[X].t,t,e.u,e.s)):t=on(e,r,[]),rn(e),e.u&&e.v(e.u,e.s),t!==Al?t:void 0}function on(t,e,r){if(Ai(e))return e;var o=e[X];if(!o)return Ft(e,(function(c,d){return ml(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return nn(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ci(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Ft(i,(function(c,d){return ml(t,o,a,c,d,r,s)})),nn(t,a,!1),r&&t.u&&Ke("Patches").N(o,r,t.u,t.s)}return o.o}function ml(t,e,r,o,a,i,s){if(et(a)){var c=on(t,a,i&&e&&e.i!==3&&!fr(e.R,o)?i.concat(o):void 0);if(Sl(r,o,c),!et(c))return;t.m=!1}else s&&r.add(a);if(ze(a)&&!Ai(a)){if(!t.h.D&&t._<1)return;on(t,a),e&&e.A.l||nn(t,a)}}function nn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ei(e,r)}function hi(t,e){var r=t[X];return(r?ht(r):t)[e]}function gl(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function mt(t){t.P||(t.P=!0,t.l&&mt(t.l))}function mi(t){t.o||(t.o=Ci(t.t))}function bi(t,e,r){var o=xi(e)?Ke("MapSet").F(e,r):Si(e)?Ke("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:gi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=ho;s&&(d=[c],u=fo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):Ke("ES5").J(e,r);return(r?r.A:gi()).p.push(o),o}function gu(t){return et(t)||Ne(22,t),(function e(r){if(!ze(r))return r;var o,a=r[X],i=hr(r);if(a){if(!a.P&&(a.i<4||!Ke("ES5").K(a)))return a.t;a.I=!0,o=yl(r,i),a.I=!1}else o=yl(r,i);return Ft(o,(function(s,c){a&&fu(a.t,s)===c||Sl(o,s,e(c))})),i===3?new Set(o):o})(t)}function yl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ci(t)}function El(){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[X];return ho.get(u,s)},set:function(u){var m=this[X];ho.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][X];if(!d.P)switch(d.i){case 5:o(d)&&mt(d);break;case 4:r(d)&&mt(d)}}}function r(s){for(var c=s.t,d=s.k,u=pr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==X){var y=c[h];if(y===void 0&&!fr(c,h))return!0;var b=d[h],x=b&&b[X];if(x?x.t!==y:!Cl(b,y))return!0}}var C=!!c[X];return u.length!==pr(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&&Ne(3,JSON.stringify(ht(s)))}var i={};hu("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=Ll(y);delete C[X];for(var L=pr(C),R=0;R<L.length;R++){var N=L[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:gi(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,X,{value:m,writable:!0}),u},S:function(s,c,d){d?et(c)&&c[X].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[X];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)Ft(b,(function(S){S!==X&&(y[S]!==void 0||fr(y,S)?x[S]||u(b[S]):(x[S]=!0,mt(h)))})),Ft(y,(function(S){b[S]!==void 0||fr(b,S)||(x[S]=!1,mt(h))}));else if(C===5){if(o(h)&&(mt(h),x.length=!0),b.length<y.length)for(var L=b.length;L<y.length;L++)x[L]=!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 bl,po,Li=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yu=typeof Map<"u",bu=typeof Set<"u",vl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Al=Li?Symbol.for("immer-nothing"):((bl={})["immer-nothing"]=!0,bl),xl=Li?Symbol.for("immer-draftable"):"__$immer_draftable",X=Li?Symbol.for("immer-state"):"__$immer_state";var vu=""+Object.prototype.constructor,pr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ll=Object.getOwnPropertyDescriptors||function(t){var e={};return pr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},vi={},ho={get:function(t,e){if(e===X)return t;var r=ht(t);if(!fr(r,e))return(function(a,i,s){var c,d=gl(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!ze(o)?o:o===hi(t.t,e)?(mi(t),t.o[e]=bi(t.A.h,o,t)):o},has:function(t,e){return e in ht(t)},ownKeys:function(t){return Reflect.ownKeys(ht(t))},set:function(t,e,r){var o=gl(ht(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=hi(ht(t),e),i=a?.[X];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Cl(r,a)&&(r!==void 0||fr(t.t,e)))return!0;mi(t),mt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return hi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,mi(t),mt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ht(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){Ne(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ne(12)}},fo={};Ft(ho,(function(t,e){fo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),fo.deleteProperty=function(t,e){return fo.set.call(this,t,e,void 0)},fo.set=function(t,e,r){return ho.set.call(this,t[0],e,r,t[0])};var xu=(function(){function t(r){var o=this;this.O=vl,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 L=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 A;return(A=i).call.apply(A,[L,S].concat(N))}))}}var u;if(typeof i!="function"&&Ne(6),s!==void 0&&typeof s!="function"&&Ne(7),ze(a)){var m=hl(o),h=bi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?rn(m):yi(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return fi(m,s),pi(C,m)}),(function(C){throw rn(m),C})):(fi(m,s),pi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Al&&(u=void 0),o.D&&Ei(u,!0),s){var b=[],x=[];Ke("Patches").M(a,u,b,x),s(b,x)}return u}Ne(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){ze(r)||Ne(8),et(r)&&(r=gu(r));var o=hl(this),a=bi(this,r,void 0);return a[X].C=!0,yi(o),a},e.finishDraft=function(r,o){var a=r&&r[X],i=a.A;return fi(i,o),pi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!vl&&Ne(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=Ke("Patches").$;return et(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),Ce=new xu,Su=Ce.produce,_g=Ce.produceWithPatches.bind(Ce),Ng=Ce.setAutoFreeze.bind(Ce),Mg=Ce.setUseProxies.bind(Ce),Tg=Ce.applyPatches.bind(Ce),kg=Ce.createDraft.bind(Ce),Ig=Ce.finishDraft.bind(Ce),an=Su;function Bt(t){"@babel/helpers - typeof";return Bt=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},Bt(t)}function Ol(t,e){if(Bt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Bt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rl(t){var e=Ol(t,"string");return Bt(e)=="symbol"?e:e+""}function wl(t,e,r){return(e=Rl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _l(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 Oi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_l(Object(r),!0).forEach(function(o){wl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_l(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function fe(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 Nl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ri=function(){return Math.random().toString(36).substring(7).split("").join(".")},sn={INIT:"@@redux/INIT"+Ri(),REPLACE:"@@redux/REPLACE"+Ri(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ri()}};function Cu(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 wi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(fe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(fe(1));return r(wi)(t,e)}if(typeof t!="function")throw new Error(fe(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(fe(3));return i}function h(C){if(typeof C!="function")throw new Error(fe(4));if(d)throw new Error(fe(5));var L=!0;return u(),c.push(C),function(){if(L){if(d)throw new Error(fe(6));L=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!Cu(C))throw new Error(fe(7));if(typeof C.type>"u")throw new Error(fe(8));if(d)throw new Error(fe(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var L=s=c,R=0;R<L.length;R++){var N=L[R];N()}return C}function b(C){if(typeof C!="function")throw new Error(fe(10));a=C,y({type:sn.REPLACE})}function x(){var C,L=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(fe(11));function E(){N.next&&N.next(m())}E();var S=L(E);return{unsubscribe:S}}},C[Nl]=function(){return this},C}return y({type:sn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Nl]=x,o}function Eu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:sn.INIT});if(typeof o>"u")throw new Error(fe(12));if(typeof r(void 0,{type:sn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fe(13))})}function Ml(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{Eu(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],L=r[C],R=u[C],N=L(R,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(fe(14))}b[C]=N,y=y||N!==R}return y=y||i.length!==Object.keys(u).length,y?b:u}}function mr(){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 Tl(){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(fe(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=mr.apply(void 0,c)(a.dispatch),Oi(Oi({},a),{},{dispatch:i})}}}function kl(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 Il=kl();Il.withExtraArgument=kl;var _i=Il;var Fl=(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)}})(),Au=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}}},gr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Lu=Object.defineProperty,Ou=Object.defineProperties,Ru=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertySymbols,wu=Object.prototype.hasOwnProperty,_u=Object.prototype.propertyIsEnumerable,zl=function(t,e,r){return e in t?Lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},gt=function(t,e){for(var r in e||(e={}))wu.call(e,r)&&zl(t,r,e[r]);if(Pl)for(var o=0,a=Pl(e);o<a.length;o++){var r=a[o];_u.call(e,r)&&zl(t,r,e[r])}return t},Ni=function(t,e){return Ou(t,Ru(e))},Nu=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 Mu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mr:mr.apply(null,arguments)},Jg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Tu(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 yt(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 gt(gt({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 ku=(function(t){Fl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array),Iu=(function(t){Fl(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,gr([void 0],r[0].concat(this)))):new(e.bind.apply(e,gr([void 0],r.concat(this))))},e})(Array);function ki(t){return ze(t)?an(t,function(){}):t}function Pu(t){return typeof t=="boolean"}function zu(){return function(e){return Du(e)}}function Du(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 ku;if(r&&(Pu(r)?u.push(_i):u.push(_i.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Mi=!0;function Bl(t){var e=zu(),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(Tu(a))b=Ml(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),!Mi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Mi&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Tl.apply(void 0,x),L=mr;d&&(L=Mu(gt({trace:!Mi},typeof d=="object"&&d)));var R=new Iu(C),N=R;Array.isArray(y)?N=gr([C],y):typeof y=="function"&&(N=y(R));var E=L.apply(void 0,N);return wi(b,m,E)}function $l(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 Uu(t){return typeof t=="function"}function Fu(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?$l(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(Uu(t))d=function(){return ki(t())};else{var u=ki(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=gr([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(et(x)){var L=x,R=C(L,y);return R===void 0?x:R}else{if(ze(x))return an(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 Bu(t,e){return t+"/"+e}function Hl(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:ki(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Bu(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?yt(y,x):yt(y)});function d(){var m=typeof t.extraReducers=="function"?$l(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],L=C===void 0?void 0:C,R=gt(gt({},y),s);return Fu(r,function(N){for(var E in R)N.addCase(E,R[E]);for(var S=0,A=x;S<A.length;S++){var T=A[S];N.addMatcher(T.matcher,T.reducer)}L&&N.addDefaultCase(L)})}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 $u="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=$u[Math.random()*64|0];return e},Gu=["name","message","stack","code"],Ti=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Dl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Wu=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Gu;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},ry=(function(){function t(e,r,o){var a=yt(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Ni(gt({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=yt(e+"/pending",function(m,h,y){return{payload:void 0,meta:Ni(gt({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=yt(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||Wu)(m||"Rejected"),meta:Ni(gt({},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):Hu(),C=new d,L,R=!1;function N(S){L=S,C.abort()}var E=(function(){return Nu(this,null,function(){var S,A,T,F,Y,H,I;return Au(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}),Vu(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,Y=new Promise(function(W,ne){return C.signal.addEventListener("abort",function(){return ne({name:"AbortError",message:L||"Aborted"})})}),h(i(x,m,(A=o?.getPendingMeta)==null?void 0:A.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([Y,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(W,ne){return new Ti(W,ne)},fulfillWithValue:function(W,ne){return new Dl(W,ne)}})).then(function(W){if(W instanceof Ti)throw W;return W instanceof Dl?a(W.payload,x,m,W.meta):a(W,x,m)})])];case 3:return T=D.sent(),[3,5];case 4:return H=D.sent(),T=H instanceof Ti?s(null,x,m,H.payload,H.meta):s(H,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(ju)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function ju(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Vu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Gl="listener",Wl="completed",jl="cancelled",oy="task-"+jl,ny="task-"+Wl,ay=Gl+"-"+jl,iy=Gl+"-"+Wl;var Ii="listenerMiddleware";var sy=yt(Ii+"/add"),cy=yt(Ii+"/removeAll"),ly=yt(Ii+"/remove");var Ul,dy=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ul||(Ul=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Ku=function(t){return function(e){setTimeout(e,t)}},uy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ku(10);El();window.ftReduxStores||(window.ftReduxStores={});var $t=class t extends Xe{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(ur(i))return i;if(a==null)return;let s=Hl({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=Bl({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Ie(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 lo;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 Zu(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ur(e)&&e.clear()}var cn=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);Ye(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 qu(t,e,r){return new cn(t,e,r).watch()}var mo=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 Ui={};G(Ui,{scrollHelper:()=>Yu});var zi,ln=new Map,Di=class{lock(e,r){if(r){let o=ln.get(r);if(o==null||o===e)return ln.set(r,e),r}}release(e,r){r&&ln.get(r)===e&&ln.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of sa(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=wt(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=(zi=window.FluidTopicsScrollHelper)!==null&&zi!==void 0?zi:new Di;var Yu=window.FluidTopicsScrollHelper;var Bi={};G(Bi,{SearchPlaceConverter:()=>vr,SearchPlaceQueryParams:()=>$,isSearchPlaceQueryParams:()=>k1,serializeRequest:()=>Qu});var Vl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Vl||(Vl={}));var Kl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Kl||(Kl={}));var Zl;(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"})(Zl||(Zl={}));var ql;(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"})(ql||(ql={}));var Yl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Yl||(Yl={}));var Xl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Xl||(Xl={}));var Jl;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Jl||(Jl={}));var Ql;(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"})(Ql||(Ql={}));var e1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(e1||(e1={}));var t1;(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"})(t1||(t1={}));var r1;(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"})(r1||(r1={}));var o1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(o1||(o1={}));var n1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(n1||(n1={}));var a1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(a1||(a1={}));var i1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(i1||(i1={}));var s1;(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"})(s1||(s1={}));var yr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(yr||(yr={}));var c1;(function(t){t.ASC="ASC",t.DESC="DESC"})(c1||(c1={}));var l1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(l1||(l1={}));var Fi;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Fi||(Fi={}));var y1=t=>Object.keys(Fi).includes(t);var d1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(d1||(d1={}));var u1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(u1||(u1={}));var f1;(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"})(f1||(f1={}));var br;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(br||(br={}));var b1=t=>Object.keys(br).includes(t);var p1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(p1||(p1={}));var h1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(h1||(h1={}));var m1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(m1||(m1={}));var oe;(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"})(oe||(oe={}));var Me;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Me||(Me={}));var g1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(g1||(g1={}));var v1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(v1||(v1={}));var x1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(x1||(x1={}));var S1;(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"})(S1||(S1={}));var C1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(C1||(C1={}));var E1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(E1||(E1={}));var A1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(A1||(A1={}));var L1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(L1||(L1={}));var O1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(O1||(O1={}));var R1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(R1||(R1={}));var w1;(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"})(w1||(w1={}));var _1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(_1||(_1={}));var Xu={[oe.PERSONAL_BOOK_SHARE_USER]:[oe.PERSONAL_BOOK_USER],[oe.HTML_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.PDF_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.KHUB_ADMIN]:[oe.CONTENT_PUBLISHER],[oe.ADMIN]:[oe.KHUB_ADMIN,oe.USERS_ADMIN,oe.PORTAL_ADMIN,oe.BEHAVIOR_DATA_USER],[oe.GENERATIVE_AI_EXPORT_USER]:[oe.GENERATIVE_AI_USER]};function N1(t,e){return t===e||(Xu[t]??[]).some(r=>N1(r,e))}function M1(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=>N1(o,e))}function Ju(t){return`"${t}"`}function T1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Qu(t,e){return new vr(t).serialize(e)}var $;(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"})($||($={}));var ef=new Set(Object.values($));function k1(t){return ef.has(t)}var vr=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($.LOCALE,e.contentLocale):x.append($.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append($.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(A=>{var T,F;let Y=((F=(T=A.valueFilter)===null||T===void 0?void 0:T.values)!==null&&F!==void 0?F:[]).map(H=>this.escapeFilters(H)).map(H=>Ju(T1(H))).join("_");return`${A.key}~${Y}`}).join("*");x.append($.VALUE_FILTERS,S)}let L=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(L.length>0){let S=L.map(A=>{var T;return`${A.key}~${(T=A.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");x.append($.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(A=>{var T,F;return`${A.key}~${(T=A.rangeFilter)===null||T===void 0?void 0:T.from}_${(F=A.rangeFilter)===null||F===void 0?void 0:F.to}`}).join("*");x.append($.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append($.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append($.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append($.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($.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append($.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,A)=>{E.push(this.encodeQueryString(A)+"="+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($.LOCALE)==="all"?void 0:d.get($.LOCALE),m=((r=d.get($.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get($.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get($.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get($.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get($.KEYWORD_MATCH),C=x?x.toUpperCase()===yr.MANDATORY?yr.MANDATORY:yr.OPTIONAL:void 0,L={};for(let R of d.keys())k1(R)||(L[R]=d.get(R));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get($.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:y1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:wt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:L}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has($.FILTERS)&&(d=this.parseValueFilters((r=e.get($.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has($.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get($.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get($.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get($.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get($.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(T1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:br[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(b1(e))return[{key:"ft:lastEdition",dateFilter:{type:br[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[$.LOCALE,$.FILTERS,$.VALUE_FILTERS,$.DATE_FILTERS,$.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete($.LOCALE),r!==void 0&&o.searchParams.append($.LOCALE,r),o.toString()}};var Gi={};G(Gi,{toFtFormComponent:()=>Hi});var $i=Symbol("elementInternals"),Hi=le(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[$i].form}constructor(...o){super(o),this[$i]=this.attachInternals()}setFormValue(o){this[$i].setFormValue(o)}}return e});var Wi={};G(Wi,{DateFormatter:()=>Ht});var Ht=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 Vi={};G(Vi,{ALL_KEYS_VALUE:()=>ji,SameWindowStorageEvent:()=>xr});var ji="__all__",xr=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 xr(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 xr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new xr(ji))}});var Zi={};G(Zi,{FocusMainContentEvent:()=>Ki});var Ki=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var I1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function tf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function rf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",tf);document.addEventListener("click",rf);var P1=z`
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-button",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "The design system button component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,16 +20,16 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fluid-topics/design-system-variables": "3.5.0",
23
- "@fluid-topics/ft-loader": "2.1.5",
24
- "@fluid-topics/ft-ripple": "2.1.5",
25
- "@fluid-topics/ft-tooltip": "2.1.5",
26
- "@fluid-topics/ft-wc-utils": "2.1.5",
27
- "@fluid-topics/ftds-icon": "2.1.5",
28
- "@fluid-topics/ftds-typography": "2.1.5",
23
+ "@fluid-topics/ft-loader": "2.1.6",
24
+ "@fluid-topics/ft-ripple": "2.1.6",
25
+ "@fluid-topics/ft-tooltip": "2.1.6",
26
+ "@fluid-topics/ft-wc-utils": "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
  }