@fluid-topics/ftds-base-input 2.1.15 → 2.1.16
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.
|
@@ -2058,8 +2058,8 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2058
2058
|
position: relative;
|
|
2059
2059
|
word-break: break-word;
|
|
2060
2060
|
}
|
|
2061
|
-
`;var Jl=["top","right","bottom","left"],Ql=["start","end"],Ca=Jl.reduce((e,t)=>e.concat(t,t+"-"+Ql[0],t+"-"+Ql[1]),[]),qr=Math.min,ht=Math.max,Yr=Math.round;var Fe=e=>({x:e,y:e}),Mf={left:"right",right:"left",bottom:"top",top:"bottom"};function e1(e,t,n){return ht(e,qr(t,n))}function $n(e,t){return typeof e=="function"?e(t):e}function Xr(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function Ea(e){return e==="x"?"y":"x"}function La(e){return e==="y"?"height":"width"}function Hn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Aa(e){return Ea(Hn(e))}function t1(e,t,n){n===void 0&&(n=!1);let o=gt(e),a=Aa(e),i=La(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sa(s)),[s,Sa(s)]}function r1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Sa(e){let t=Xr(e);return Mf[t]+e.slice(t.length)}function If(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function n1(e){return typeof e!="number"?If(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function o1(e,t,n){let{reference:o,floating:a}=e,i=Hn(t),s=Aa(t),l=La(s),u=Xr(t),p=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,y=o[l]/2-a[l]/2,v;switch(u){case"top":v={x:h,y:o.y-a.height};break;case"bottom":v={x:h,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:g};break;case"left":v={x:o.x-a.width,y:g};break;default:v={x:o.x,y:o.y}}let x=gt(t);return x&&(v[s]+=y*(x==="end"?1:-1)*(n&&p?-1:1)),v}async function a1(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=$n(t,e),x=n1(v),O=l[y?g==="floating"?"reference":"floating":g],R=Tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(O)))==null||n?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:h,strategy:u})),N=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),P=await(i.isElement==null?void 0:i.isElement(M))&&await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1},B=Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(R.top-B.top+x.top)/P.y,bottom:(B.bottom-R.bottom+x.bottom)/P.y,left:(R.left-B.left+x.left)/P.x,right:(B.right-R.right+x.right)/P.x}}var kf=50,i1=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:a1},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=o1(p,o,u),y=o,v=0,x={};for(let S=0;S<i.length;S++){let O=i[S];if(!O)continue;let{name:R,fn:N}=O,{x:M,y:P,data:B,reset:j}=await N({x:h,y:g,initialPlacement:o,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});h=M??h,g=P??g,x[R]={...x[R],...B},j&&v<kf&&(v++,typeof j=="object"&&(j.placement&&(y=j.placement),j.rects&&(p=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):j.rects),{x:h,y:g}=o1(p,y,u)),S=-1)}return{x:h,y:g,placement:y,strategy:a,middlewareData:x}};function Tf(e,t,n){return(e?[...n.filter(a=>gt(a)===e),...n.filter(a=>gt(a)!==e)]:n.filter(a=>Xr(a)===a)).filter(a=>e?gt(a)===e||(t?r1(a)!==a:!1):!0)}var s1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:y=Ca,autoAlignment:v=!0,...x}=$n(e,t),S=g!==void 0||y===Ca?Tf(g||null,v,y):y,O=((n=s.autoPlacement)==null?void 0:n.index)||0,R=S[O];if(R==null)return{};if(l!==R)return{reset:{placement:S[0]}};let N=await u.detectOverflow(t,x),M=t1(R,i,await(u.isRTL==null?void 0:u.isRTL(p.floating))),P=[N[Xr(R)],N[M[0]],N[M[1]]],B=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:R,overflows:P}],j=S[O+1];if(j)return{data:{index:O+1,overflows:B},reset:{placement:j}};let Ge=B.map(me=>{let xe=gt(me.placement);return[me.placement,xe&&h?me.overflows.slice(0,2).reduce((he,Lt)=>he+Lt,0):me.overflows[0],me.overflows]}).sort((me,xe)=>me[1]-xe[1]),We=((a=Ge.filter(me=>me[2].slice(0,gt(me[0])?2:3).every(xe=>xe<=0))[0])==null?void 0:a[0])||Ge[0][0];return We!==l?{data:{index:O+1,overflows:B},reset:{placement:We}}:{}}}};var c1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:N=>{let{x:M,y:P}=N;return{x:M,y:P}}},...p}=$n(e,t),h={x:n,y:o},g=await i.detectOverflow(t,p),y=Hn(a),v=Ea(y),x=h[v],S=h[y],O=(N,M)=>e1(M+g[N==="y"?"top":"left"],M,M-g[N==="y"?"bottom":"right"]);s&&(x=O(v,x)),l&&(S=O(y,S));let R=u.fn({...t,[v]:x,[y]:S});return{...R,data:{x:R.x-n,y:R.y-o,enabled:{[v]:s,[y]:l}}}}}};function Wn(){return typeof window<"u"}function Dt(e){return d1(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(d1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function d1(e){return Wn()?e instanceof Node||e instanceof pe(e).Node:!1}function Ee(e){return Wn()?e instanceof Element||e instanceof pe(e).Element:!1}function Ze(e){return Wn()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function l1(e){return!Wn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function yr(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function u1(e){return/^(table|td|th)$/.test(Dt(e))}function Qr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pf=/transform|translate|scale|rotate|perspective|filter/,Df=/paint|layout|strict|content/,Pt=e=>!!e&&e!=="none",Oa;function br(e){let t=Ee(e)?Le(e):e;return Pt(t.transform)||Pt(t.translate)||Pt(t.scale)||Pt(t.rotate)||Pt(t.perspective)||!jn()&&(Pt(t.backdropFilter)||Pt(t.filter))||Pf.test(t.willChange||"")||Df.test(t.contain||"")}function f1(e){let t=ot(e);for(;Ze(t)&&!Ut(t);){if(br(t))return t;if(Qr(t))return null;t=ot(t)}return null}function jn(){return Oa==null&&(Oa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Oa}function Ut(e){return/^(html|body|#document)$/.test(Dt(e))}function Le(e){return pe(e).getComputedStyle(e)}function Jr(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ot(e){if(Dt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||l1(e)&&e.host||Ke(e);return l1(t)?t.host:t}function p1(e){let t=ot(e);return Ut(t)?(e.ownerDocument||e).body:Ze(t)&&yr(t)?t:p1(t)}function Gn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=p1(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=pe(a);if(i){let l=Vn(s);return t.concat(s,s.visualViewport||[],yr(a)?a:[],l&&n?Gn(l):[])}else return t.concat(a,Gn(a,[],n))}function Vn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y1(e){let t=Le(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Ze(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=Yr(n)!==i||Yr(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function b1(e){return Ee(e)?e:e.contextElement}function vr(e){let t=b1(e);if(!Ze(t))return Fe(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=y1(t),s=(i?Yr(n.width):n.width)/o,l=(i?Yr(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Uf=Fe(0);function v1(e){let t=pe(e);return!jn()||!t.visualViewport?Uf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ff(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pe(e)?!1:t}function en(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=b1(e),s=Fe(1);t&&(o?Ee(o)&&(s=vr(o)):s=vr(e));let l=Ff(i,n,o)?v1(i):Fe(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i){let y=pe(i),v=o&&Ee(o)?pe(o):o,x=y,S=Vn(x);for(;S&&o&&v!==x;){let O=vr(S),R=S.getBoundingClientRect(),N=Le(S),M=R.left+(S.clientLeft+parseFloat(N.paddingLeft))*O.x,P=R.top+(S.clientTop+parseFloat(N.paddingTop))*O.y;u*=O.x,p*=O.y,h*=O.x,g*=O.y,u+=M,p+=P,x=pe(S),S=Vn(x)}}return Tt({width:h,height:g,x:u,y:p})}function Kn(e,t){let n=Jr(e).scrollLeft;return t?t.left+n:en(Ke(e)).left+n}function x1(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Kn(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function Bf(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=Ke(o),l=t?Qr(t.floating):!1;if(o===s||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=Fe(1),h=Fe(0),g=Ze(o);if((g||!g&&!i)&&((Dt(o)!=="body"||yr(s))&&(u=Jr(o)),g)){let v=en(o);p=vr(o),h.x=v.x+o.clientLeft,h.y=v.y+o.clientTop}let y=s&&!g&&!i?x1(s,u):Fe(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+h.x+y.x,y:n.y*p.y-u.scrollTop*p.y+h.y+y.y}}function $f(e){return Array.from(e.getClientRects())}function Hf(e){let t=Ke(e),n=Jr(e),o=e.ownerDocument.body,a=ht(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ht(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+Kn(e),l=-n.scrollTop;return Le(o).direction==="rtl"&&(s+=ht(t.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:l}}var m1=25;function Gf(e,t){let n=pe(e),o=Ke(e),a=n.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let h=jn();(!h||h&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=Kn(o);if(p<=0){let h=o.ownerDocument,g=h.body,y=getComputedStyle(g),v=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(o.clientWidth-g.clientWidth-v);x<=m1&&(i-=x)}else p<=m1&&(i+=p);return{width:i,height:s,x:l,y:u}}function Wf(e,t){let n=en(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=Ze(e)?vr(e):Fe(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=o*i.y;return{width:s,height:l,x:u,y:p}}function h1(e,t,n){let o;if(t==="viewport")o=Gf(e,n);else if(t==="document")o=Hf(Ke(e));else if(Ee(t))o=Wf(t,n);else{let a=v1(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Tt(o)}function S1(e,t){let n=ot(e);return n===t||!Ee(n)||Ut(n)?!1:Le(n).position==="fixed"||S1(n,t)}function jf(e,t){let n=t.get(e);if(n)return n;let o=Gn(e,[],!1).filter(l=>Ee(l)&&Dt(l)!=="body"),a=null,i=Le(e).position==="fixed",s=i?ot(e):e;for(;Ee(s)&&!Ut(s);){let l=Le(s),u=br(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||yr(s)&&!u&&S1(e,s))?o=o.filter(h=>h!==s):a=l,s=ot(s)}return t.set(e,o),o}function Vf(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?Qr(t)?[]:jf(t,this._c):[].concat(n),o],l=h1(t,s[0],a),u=l.top,p=l.right,h=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=h1(t,s[y],a);u=ht(v.top,u),p=qr(v.right,p),h=qr(v.bottom,h),g=ht(v.left,g)}return{width:p-g,height:h-u,x:g,y:u}}function Kf(e){let{width:t,height:n}=y1(e);return{width:t,height:n}}function Zf(e,t,n){let o=Ze(t),a=Ke(t),i=n==="fixed",s=en(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Fe(0);function p(){u.x=Kn(a)}if(o||!o&&!i)if((Dt(t)!=="body"||yr(a))&&(l=Jr(t)),o){let v=en(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!o&&a&&p();let h=a&&!o&&!i?x1(a,l):Fe(0),g=s.left+l.scrollLeft-u.x-h.x,y=s.top+l.scrollTop-u.y-h.y;return{x:g,y,width:s.width,height:s.height}}function Ra(e){return Le(e).position==="static"}function g1(e,t){if(!Ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ke(e)===n&&(n=n.ownerDocument.body),n}function C1(e,t){let n=pe(e);if(Qr(e))return n;if(!Ze(e)){let a=ot(e);for(;a&&!Ut(a);){if(Ee(a)&&!Ra(a))return a;a=ot(a)}return n}let o=g1(e,t);for(;o&&u1(o)&&Ra(o);)o=g1(o,t);return o&&Ut(o)&&Ra(o)&&!br(o)?n:o||f1(e)||n}var qf=async function(e){let t=this.getOffsetParent||C1,n=this.getDimensions,o=await n(e.floating);return{reference:Zf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Yf(e){return Le(e).direction==="rtl"}var Zn={convertOffsetParentRelativeRectToViewportRelativeRect:Bf,getDocumentElement:Ke,getClippingRect:Vf,getOffsetParent:C1,getElementRects:qf,getClientRects:$f,getDimensions:Kf,getScale:vr,isElement:Ee,isRTL:Yf};var E1=s1,L1=c1;var A1=(e,t,n)=>{let o=new Map,a={platform:Zn,...n},i={...a.platform,_c:o};return i1(e,t,{...a,platform:i})};function O1(e){return Xf(e)}function wa(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Xf(e){for(let t=e;t;t=wa(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=wa(e);t;t=wa(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||br(n)||t.tagName==="BODY"))return t}return null}async function R1(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},A1(e,t,{strategy:o.strategy,platform:{...Zn,getOffsetParent:a=>Zn.getOffsetParent(a,O1)},middleware:[L1({crossAxis:!0}),E1({allowedPlacements:[o.placement]})]})}var _r=C(D());var ei=C(ae());var w1=C(ae(),1);var za=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function z1(e,t){return(0,w1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return tn(e);try{return JSON.parse(n)}catch{return tn(e)}},toAttribute:n=>JSON.stringify(n)},hasChanged:rn,...t??{}})}function Qf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!qn(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!qn(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[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(n=i.length,n!==a(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){let s=i[o];if(!qn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function qn(e,t){try{return Qf(e,t)}catch{return!1}}function rn(e,t){return!qn(e,t)}function tn(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Yn(e,t){let n=o=>o[e]===!0;return o=>{if(n(o))return o;let a=t(o);return a[e]=!0,a}}var N1=C(ae(),1);var Na=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:rn,attribute:!1,...t};(0,N1.property)(i)(n,o);let s=n.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[o]),store:t.store})}};var Xn=class{constructor(){this.queue=[]}add(t,n=!1){n&&this.clear(t.type),this.queue.push(t)}consume(t){let n=this.queue.find(o=>o.type===t);return n&&(this.queue=this.queue.filter(o=>o!==n)),n}clear(t){typeof t=="string"?this.queue=this.queue.filter(n=>n.type!==t):this.queue=this.queue.filter(n=>!t.test(n.type))}};var Ft=C(ae(),1);var Qn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,n){return this.callbacks=[t],this.debounce(n)}queue(t,n){return this.callbacks.push(t),this.debounce(n)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((n,o)=>{this.resolvePromise=n,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,n;let o=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(n=this.resolvePromise)!==null&&n!==void 0?n:(()=>null);this.clearPromise();for(let s of o)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 M1=C($(),1);var Jn=globalThis,Jf=Jn.ShadowRoot&&(Jn.ShadyCSS===void 0||Jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var _1=(e,t)=>{if(Jf)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let o=document.createElement("style"),a=Jn.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=n.cssText,e.appendChild(o)}};var eo=class extends M1.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let n={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(n);return _1(o,t.elementStyles),o}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([n,o])=>this.defineScopedElement(n,o))}static defineScopedElement(t,n){za(t)(n),this.canDefineScopedElement(t)&&this.registry.define(t,n)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,n){this.scopedRegistryConstructor.defineScopedElement(t,n)}};function I1(e,t,...n){var o;let a=e.querySelector(t);for(let i of n)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var Sr=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},D1,k1=Symbol("constructorPrototype"),T1=Symbol("constructorName"),U1=Symbol("exportpartsDebouncer"),P1=Symbol("dynamicDependenciesLoaded"),xr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};xr.eventName="exportparts-updated";var qe=class extends eo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[D1]=new Qn(5),this.scheduleExportpartsUpdate=()=>{var t,n,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)!==null&&o!==void 0&&o)&&this[U1].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[T1]=this.constructor.name,this[k1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[T1]&&Object.setPrototypeOf(this,this[k1])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let n=this.constructor;n[P1]||(n[P1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(xr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(xr.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 xr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:n,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];n=I1(this.shadowRoot,...i)}n?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||n?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var n,o,a;if(((o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).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 n,o,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 h=new Set;for(let y of(o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(O=>O.trim());for(let O of S)h.add(O)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};D1=U1;Sr([(0,Ft.property)()],qe.prototype,"exportpartsPrefix",void 0);Sr([z1([])],qe.prototype,"exportpartsPrefixes",void 0);Sr([(0,Ft.property)({reflect:!0})],qe.prototype,"exportparts",void 0);Sr([(0,Ft.property)()],qe.prototype,"customStylesheet",void 0);Sr([(0,Ft.property)()],qe.prototype,"elementToFocus",void 0);Sr([(0,Ft.state)()],qe.prototype,"useAdoptedStyleSheets",void 0);function to(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var nn=Symbol("internalReduxEventsUnsubscribers"),yt=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),e3=Yn(Symbol("withRedux"),function(e){var t,n,o;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[n]=new Map,this[o]=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[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Bt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Bt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Bt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Bt].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[yt].has(s.store):this[yt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[yt].set(s,l.subscribe(()=>this.updateFromStores())),this[nn].set(s,[]),to(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[h](y);l.addEventListener(p.eventName,g),this[nn].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[yt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[yt].has(s)&&this[yt].get(s)(),this[yt].delete(s),(l=this[nn].get(s))===null||l===void 0||l.forEach(u=>u()),this[nn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=yt,n=Bt,o=nn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),F1=class extends e3(qe){};function Ae(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function at(e){return!!e&&!!e[V]}function Be(e){var t;return!!e&&((function(n){if(!n||typeof n!="object")return!1;var o=Object.getPrototypeOf(n);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===c3})(e)||Array.isArray(e)||!!e[V1]||!!(!((t=e.constructor)===null||t===void 0)&&t[V1])||Fa(e)||Ba(e))}function $t(e,t,n){n===void 0&&(n=!1),Lr(e)===0?(n?Object.keys:Er)(e).forEach((function(o){n&&typeof o=="symbol"||t(o,e[o],e)})):e.forEach((function(o,a){return t(a,o,e)}))}function Lr(e){var t=e[V];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Fa(e)?2:Ba(e)?3:0}function Cr(e,t){return Lr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function t3(e,t){return Lr(e)===2?e.get(t):e[t]}function K1(e,t,n){var o=Lr(e);o===2?e.set(t,n):o===3?e.add(n):e[t]=n}function Z1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Fa(e){return i3&&e instanceof Map}function Ba(e){return s3&&e instanceof Set}function bt(e){return e.o||e.t}function $a(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X1(e);delete t[V];for(var n=Er(t),o=0;o<n.length;o++){var a=n[o],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 Ha(e,t){return t===void 0&&(t=!1),Ga(e)||at(e)||!Be(e)||(Lr(e)>1&&(e.set=e.add=e.clear=e.delete=r3),Object.freeze(e),t&&$t(e,(function(n,o){return Ha(o,!0)}),!0)),e}function r3(){Ae(2)}function Ga(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ye(e){var t=Ua[e];return t||Ae(18,e),t}function n3(e,t){Ua[e]||(Ua[e]=t)}function Ta(){return an}function _a(e,t){t&&(Ye("Patches"),e.u=[],e.s=[],e.v=t)}function ro(e){Pa(e),e.p.forEach(o3),e.p=null}function Pa(e){e===an&&(an=e.l)}function B1(e){return an={p:[],l:an,h:e,m:!0,_:0}}function o3(e){var t=e[V];t.i===0||t.i===1?t.j():t.g=!0}function Ma(e,t){t._=t.p.length;var n=t.p[0],o=e!==void 0&&e!==n;return t.h.O||Ye("ES5").S(t,e,o),o?(n[V].P&&(ro(t),Ae(4)),Be(e)&&(e=no(t,e),t.l||oo(t,e)),t.u&&Ye("Patches").M(n[V].t,e,t.u,t.s)):e=no(t,n,[]),ro(t),t.u&&t.v(t.u,t.s),e!==Y1?e:void 0}function no(e,t,n){if(Ga(t))return t;var o=t[V];if(!o)return $t(t,(function(l,u){return $1(e,o,t,l,u,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return oo(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=$a(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),$t(i,(function(l,u){return $1(e,o,a,l,u,n,s)})),oo(e,a,!1),n&&e.u&&Ye("Patches").N(o,n,e.u,e.s)}return o.o}function $1(e,t,n,o,a,i,s){if(at(a)){var l=no(e,a,i&&t&&t.i!==3&&!Cr(t.R,o)?i.concat(o):void 0);if(K1(n,o,l),!at(l))return;e.m=!1}else s&&n.add(a);if(Be(a)&&!Ga(a)){if(!e.h.D&&e._<1)return;no(e,a),t&&t.A.l||oo(e,a)}}function oo(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Ha(t,n)}function Ia(e,t){var n=e[V];return(n?bt(n):e)[t]}function H1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Object.getPrototypeOf(n)}}function vt(e){e.P||(e.P=!0,e.l&&vt(e.l))}function ka(e){e.o||(e.o=$a(e.t))}function Da(e,t,n){var o=Fa(t)?Ye("MapSet").F(t,n):Ba(t)?Ye("MapSet").T(t,n):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Ta(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=sn;s&&(u=[l],p=on);var h=Proxy.revocable(u,p),g=h.revoke,y=h.proxy;return l.k=y,l.j=g,y})(t,n):Ye("ES5").J(t,n);return(n?n.A:Ta()).p.push(o),o}function a3(e){return at(e)||Ae(22,e),(function t(n){if(!Be(n))return n;var o,a=n[V],i=Lr(n);if(a){if(!a.P&&(a.i<4||!Ye("ES5").K(a)))return a.t;a.I=!0,o=G1(n,i),a.I=!1}else o=G1(n,i);return $t(o,(function(s,l){a&&t3(a.t,s)===l||K1(o,s,t(l))})),i===3?new Set(o):o})(e)}function G1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return $a(e)}function q1(){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[V];return sn.get(p,s)},set:function(p){var h=this[V];sn.set(h,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][V];if(!u.P)switch(u.i){case 5:o(u)&&vt(u);break;case 4:n(u)&&vt(u)}}}function n(s){for(var l=s.t,u=s.k,p=Er(u),h=p.length-1;h>=0;h--){var g=p[h];if(g!==V){var y=l[g];if(y===void 0&&!Cr(l,g))return!0;var v=u[g],x=v&&v[V];if(x?x.t!==y:!Z1(v,y))return!0}}var S=!!l[V];return p.length!==Er(l).length+(S?0:1)}function o(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&&Ae(3,JSON.stringify(bt(s)))}var i={};n3("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=X1(y);delete S[V];for(var O=Er(S),R=0;R<O.length;R++){var N=O[R];S[N]=e(N,g||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),h={i:u?5:4,A:l?l.A:Ta(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,V,{value:h,writable:!0}),p},S:function(s,l,u){u?at(l)&&l[V].A===s&&t(s.p):(s.u&&(function p(h){if(h&&typeof h=="object"){var g=h[V];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)$t(v,(function(P){P!==V&&(y[P]!==void 0||Cr(y,P)?x[P]||p(v[P]):(x[P]=!0,vt(g)))})),$t(y,(function(P){v[P]!==void 0||Cr(v,P)||(x[P]=!1,vt(g))}));else if(S===5){if(o(g)&&(vt(g),x.length=!0),v.length<y.length)for(var O=v.length;O<y.length;O++)x[O]=!1;else for(var R=y.length;R<v.length;R++)x[R]=!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?n(s):o(s)}})}var W1,an,Wa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",i3=typeof Map<"u",s3=typeof Set<"u",j1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Y1=Wa?Symbol.for("immer-nothing"):((W1={})["immer-nothing"]=!0,W1),V1=Wa?Symbol.for("immer-draftable"):"__$immer_draftable",V=Wa?Symbol.for("immer-state"):"__$immer_state";var c3=""+Object.prototype.constructor,Er=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X1=Object.getOwnPropertyDescriptors||function(e){var t={};return Er(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Ua={},sn={get:function(e,t){if(t===V)return e;var n=bt(e);if(!Cr(n,t))return(function(a,i,s){var l,u=H1(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,n,t);var o=n[t];return e.I||!Be(o)?o:o===Ia(e.t,t)?(ka(e),e.o[t]=Da(e.A.h,o,e)):o},has:function(e,t){return t in bt(e)},ownKeys:function(e){return Reflect.ownKeys(bt(e))},set:function(e,t,n){var o=H1(bt(e),t);if(o?.set)return o.set.call(e.k,n),!0;if(!e.P){var a=Ia(bt(e),t),i=a?.[V];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Z1(n,a)&&(n!==void 0||Cr(e.t,t)))return!0;ka(e),vt(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ia(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ka(e),vt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=bt(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:n[t]}},defineProperty:function(){Ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ae(12)}},on={};$t(sn,(function(e,t){on[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),on.deleteProperty=function(e,t){return on.set.call(this,e,t,void 0)},on.set=function(e,t,n){return sn.set.call(this,e[0],t,n,e[0])};var l3=(function(){function e(n){var o=this;this.O=j1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=o;return function(S){var O=this;S===void 0&&(S=l);for(var R=arguments.length,N=Array(R>1?R-1:0),M=1;M<R;M++)N[M-1]=arguments[M];return u.produce(S,(function(P){var B;return(B=i).call.apply(B,[O,P].concat(N))}))}}var p;if(typeof i!="function"&&Ae(6),s!==void 0&&typeof s!="function"&&Ae(7),Be(a)){var h=B1(o),g=Da(o,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?ro(h):Pa(h)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return _a(h,s),Ma(S,h)}),(function(S){throw ro(h),S})):(_a(h,s),Ma(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Y1&&(p=void 0),o.D&&Ha(p,!0),s){var v=[],x=[];Ye("Patches").M(a,p,v,x),s(v,x)}return p}Ae(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return o.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=o.produce(a,i,(function(p,h){s=p,l=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof n?.useProxies=="boolean"&&this.setUseProxies(n.useProxies),typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Be(n)||Ae(8),at(n)&&(n=a3(n));var o=B1(this),a=Da(this,n,void 0);return a[V].C=!0,Pa(o),a},t.finishDraft=function(n,o){var a=n&&n[V],i=a.A;return _a(i,o),Ma(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!j1&&Ae(20),this.O=n},t.applyPatches=function(n,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}a>-1&&(o=o.slice(a+1));var s=Ye("Patches").$;return at(n)?s(n,o):this.produce(n,(function(l){return s(l,o)}))},e})(),ye=new l3,d3=ye.produce,$g=ye.produceWithPatches.bind(ye),Hg=ye.setAutoFreeze.bind(ye),Gg=ye.setUseProxies.bind(ye),Wg=ye.applyPatches.bind(ye),jg=ye.createDraft.bind(ye),Vg=ye.finishDraft.bind(ye),ao=d3;function Ht(e){"@babel/helpers - typeof";return Ht=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},Ht(e)}function Q1(e,t){if(Ht(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ht(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J1(e){var t=Q1(e,"string");return Ht(t)=="symbol"?t:t+""}function e2(e,t,n){return(t=J1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(n),!0).forEach(function(o){e2(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t2(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function le(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 r2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Va=function(){return Math.random().toString(36).substring(7).split("").join(".")},io={INIT:"@@redux/INIT"+Va(),REPLACE:"@@redux/REPLACE"+Va(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Va()}};function u3(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 Ka(e,t,n){var o;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(le(1));return n(Ka)(e,t)}if(typeof e!="function")throw new Error(le(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function h(){if(u)throw new Error(le(3));return i}function g(S){if(typeof S!="function")throw new Error(le(4));if(u)throw new Error(le(5));var O=!0;return p(),l.push(S),function(){if(O){if(u)throw new Error(le(6));O=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!u3(S))throw new Error(le(7));if(typeof S.type>"u")throw new Error(le(8));if(u)throw new Error(le(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var O=s=l,R=0;R<O.length;R++){var N=O[R];N()}return S}function v(S){if(typeof S!="function")throw new Error(le(10));a=S,y({type:io.REPLACE})}function x(){var S,O=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(le(11));function M(){N.next&&N.next(h())}M();var P=O(M);return{unsubscribe:P}}},S[r2]=function(){return this},S}return y({type:io.INIT}),o={dispatch:y,subscribe:g,getState:h,replaceReducer:v},o[r2]=x,o}function f3(e){Object.keys(e).forEach(function(t){var n=e[t],o=n(void 0,{type:io.INIT});if(typeof o>"u")throw new Error(le(12));if(typeof n(void 0,{type:io.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(le(13))})}function n2(e){for(var t=Object.keys(e),n={},o=0;o<t.length;o++){var a=t[o];typeof e[a]=="function"&&(n[a]=e[a])}var i=Object.keys(n),s,l;try{f3(n)}catch(u){l=u}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],O=n[S],R=p[S],N=O(R,h);if(typeof N>"u"){var M=h&&h.type;throw new Error(le(14))}v[S]=N,y=y||N!==R}return y=y||i.length!==Object.keys(p).length,y?v:p}}function Ar(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function o2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(le(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=Ar.apply(void 0,l)(a.dispatch),ja(ja({},a),{},{dispatch:i})}}}function a2(e){var t=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var i2=a2();i2.withExtraArgument=a2;var Za=i2;var u2=(function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),p3=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,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(h){return u([p,h])}}function u(p){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=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 n.label++,{value:p[1],done:!1};case 5:n.label++,a=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){n.label=p[1];break}if(p[0]===6&&n.label<i[1]){n.label=i[1],i=p;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(p);break}i[2]&&n.ops.pop(),n.trys.pop();continue}p=t.call(e,n)}catch(h){p=[6,h],a=0}finally{o=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Or=function(e,t){for(var n=0,o=t.length,a=e.length;n<o;n++,a++)e[a]=t[n];return e},m3=Object.defineProperty,h3=Object.defineProperties,g3=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,y3=Object.prototype.hasOwnProperty,b3=Object.prototype.propertyIsEnumerable,c2=function(e,t,n){return t in e?m3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},xt=function(e,t){for(var n in t||(t={}))y3.call(t,n)&&c2(e,n,t[n]);if(s2)for(var o=0,a=s2(t);o<a.length;o++){var n=a[o];b3.call(t,n)&&c2(e,n,t[n])}return e},qa=function(e,t){return h3(e,g3(t))},v3=function(e,t,n){return new Promise(function(o,a){var i=function(u){try{l(n.next(u))}catch(p){a(p)}},s=function(u){try{l(n.throw(u))}catch(p){a(p)}},l=function(u){return u.done?o(u.value):Promise.resolve(u.value).then(i,s)};l((n=n.apply(e,t)).next())})};var x3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ar:Ar.apply(null,arguments)},d9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function S3(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function St(e,t){function n(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return xt(xt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(o){return o.type===e},n}var C3=(function(e){u2(t,e);function t(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=e.apply(this,n)||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 n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Or([void 0],n[0].concat(this)))):new(t.bind.apply(t,Or([void 0],n.concat(this))))},t})(Array),E3=(function(e){u2(t,e);function t(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=e.apply(this,n)||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 n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Or([void 0],n[0].concat(this)))):new(t.bind.apply(t,Or([void 0],n.concat(this))))},t})(Array);function Qa(e){return Be(e)?ao(e,function(){}):e}function L3(e){return typeof e=="boolean"}function A3(){return function(t){return O3(t)}}function O3(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,o=e.immutableCheck,a=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new C3;if(n&&(L3(n)?p.push(Za):p.push(Za.withExtraArgument(n.extraArgument))),0){if(a)var h;if(s)var g;if(u)var y}return p}var Ya=!0;function f2(e){var t=A3(),n=e||{},o=n.reducer,a=o===void 0?void 0:o,i=n.middleware,s=i===void 0?t():i,l=n.devTools,u=l===void 0?!0:l,p=n.preloadedState,h=p===void 0?void 0:p,g=n.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(S3(a))v=n2(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),!Ya&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ya&&x.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=o2.apply(void 0,x),O=Ar;u&&(O=x3(xt({trace:!Ya},typeof u=="object"&&u)));var R=new E3(S),N=R;Array.isArray(y)?N=Or([S],y):typeof y=="function"&&(N=y(R));var M=O.apply(void 0,N);return Ka(v,h,M)}function p2(e){var t={},n=[],o,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 n.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return e(a),[t,n,o]}function R3(e){return typeof e=="function"}function w3(e,t,n,o){n===void 0&&(n=[]);var a=typeof t=="function"?p2(t):[t,n,o],i=a[0],s=a[1],l=a[2],u;if(R3(e))u=function(){return Qa(e())};else{var p=Qa(e);u=function(){return p}}function h(g,y){g===void 0&&(g=u());var v=Or([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(at(x)){var O=x,R=S(O,y);return R===void 0?x:R}else{if(Be(x))return ao(x,function(N){return S(N,y)});var R=S(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},g)}return h.getInitialState=u,h}function z3(e,t){return e+"/"+t}function m2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:Qa(e.initialState),o=e.reducers||{},a=Object.keys(o),i={},s={},l={};a.forEach(function(h){var g=o[h],y=z3(t,h),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[h]=v,s[y]=v,l[h]=x?St(y,x):St(y)});function u(){var h=typeof e.extraReducers=="function"?p2(e.extraReducers):[e.extraReducers],g=h[0],y=g===void 0?{}:g,v=h[1],x=v===void 0?[]:v,S=h[2],O=S===void 0?void 0:S,R=xt(xt({},y),s);return w3(n,function(N){for(var M in R)N.addCase(M,R[M]);for(var P=0,B=x;P<B.length;P++){var j=B[P];N.addMatcher(j.matcher,j.reducer)}O&&N.addDefaultCase(O)})}var p;return{name:t,reducer:function(h,g){return p||(p=u()),p(h,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var N3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_3=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=N3[Math.random()*64|0];return t},M3=["name","message","stack","code"],Xa=(function(){function e(t,n){this.payload=t,this.meta=n}return e})(),l2=(function(){function e(t,n){this.payload=t,this.meta=n}return e})(),I3=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,o=M3;n<o.length;n++){var a=o[n];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},m9=(function(){function e(t,n,o){var a=St(t+"/fulfilled",function(h,g,y,v){return{payload:h,meta:qa(xt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=St(t+"/pending",function(h,g,y){return{payload:void 0,meta:qa(xt({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=St(t+"/rejected",function(h,g,y,v,x){return{payload:v,error:(o&&o.serializeError||I3)(h||"Rejected"),meta:qa(xt({},x||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function p(h){return function(g,y,v){var x=o?.idGenerator?o.idGenerator(h):_3(),S=new u,O,R=!1;function N(P){O=P,S.abort()}var M=(function(){return v3(this,null,function(){var P,B,j,Ge,Et,We,me;return p3(this,function(xe){switch(xe.label){case 0:return xe.trys.push([0,4,,5]),Ge=(P=o?.condition)==null?void 0:P.call(o,h,{getState:y,extra:v}),T3(Ge)?[4,Ge]:[3,2];case 1:Ge=xe.sent(),xe.label=2;case 2:if(Ge===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Et=new Promise(function(he,Lt){return S.signal.addEventListener("abort",function(){return Lt({name:"AbortError",message:O||"Aborted"})})}),g(i(x,h,(B=o?.getPendingMeta)==null?void 0:B.call(o,{requestId:x,arg:h},{getState:y,extra:v}))),[4,Promise.race([Et,Promise.resolve(n(h,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(he,Lt){return new Xa(he,Lt)},fulfillWithValue:function(he,Lt){return new l2(he,Lt)}})).then(function(he){if(he instanceof Xa)throw he;return he instanceof l2?a(he.payload,x,h,he.meta):a(he,x,h)})])];case 3:return j=xe.sent(),[3,5];case 4:return We=xe.sent(),j=We instanceof Xa?s(null,x,h,We.payload,We.meta):s(We,x,h),[3,5];case 5:return me=o&&!o.dispatchConditionRejection&&s.match(j)&&j.meta.condition,me||g(j),[2,j]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:h,unwrap:function(){return M.then(k3)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function k3(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function T3(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var h2="listener",g2="completed",y2="cancelled",h9="task-"+y2,g9="task-"+g2,y9=h2+"-"+y2,b9=h2+"-"+g2;var Ja="listenerMiddleware";var v9=St(Ja+"/add"),x9=St(Ja+"/removeAll"),S9=St(Ja+"/remove");var d2,C9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(d2||(d2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},P3=function(e){return function(t){setTimeout(t,e)}},E9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:P3(10);q1();var D3=Yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(n,o,a){this.eventBus.addEventListener(n,o,a)}dispatchEvent(n){return this.eventBus.dispatchEvent(n)}removeEventListener(n,o,a){this.eventBus.removeEventListener(n,o,a)}}}),so=class extends D3(Object){};window.ftReduxStores||(window.ftReduxStores={});var b2=class e extends so{static get(t){var n;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(to(i))return i;if(a==null)return;let s=m2({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=f2({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=tn(s.getInitialState());for(let g of p.keeping)h[g]=(u??h)[g];return h}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,n,o){super(),this.reduxSlice=t,this.reduxStore=n,this.isFtReduxStore=!0,this.commands=new Xn;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?(...h)=>{let g=p(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=o??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 co=class{static format(t,n,o,a,i){return window.moment?window.moment(t).locale(n).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,n,o,a,!!i)}static getMomentDateFormat(t,n,o){return o?"LT":t?n?"lll":"ll":n?"L LT":"L"}static getIntlDateTime(t,n,o,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(n,{dateStyle:o?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),n=new Date().getTimezoneOffset();return`${n<0?"+":"-"}${t(Math.abs(n)/60)}:${t(Math.abs(n)%60)}`}};var lo=C(D()),U3="ft-app-info",Rr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Rr.eventName="authentication-change";var cn=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};cn.eventName="ui-locale-changed";var F3={session:(e,t)=>{(0,lo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new Rr(t.payload)),0))}},U=lo.FtReduxStore.get({name:U3,reducers:F3,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 v2=C(D()),uo=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},X9=(0,v2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>co.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return uo([(0,ei.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),uo([(0,ei.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),uo([Na({store:U.name,selector:n=>{var o,a;return(a=(o=n.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),uo([Na({store:U.name})],t.prototype,"uiLocale",void 0),t});var x2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(x2||(x2={}));var S2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(S2||(S2={}));var C2;(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"})(C2||(C2={}));var E2;(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"})(E2||(E2={}));var L2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(L2||(L2={}));var A2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(A2||(A2={}));var O2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(O2||(O2={}));var R2;(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"})(R2||(R2={}));var w2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(w2||(w2={}));var z2;(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"})(z2||(z2={}));var N2;(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"})(N2||(N2={}));var _2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(_2||(_2={}));var M2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(M2||(M2={}));var I2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(I2||(I2={}));var k2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(k2||(k2={}));var T2;(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"})(T2||(T2={}));var P2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(P2||(P2={}));var D2;(function(e){e.ASC="ASC",e.DESC="DESC"})(D2||(D2={}));var U2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(U2||(U2={}));var F2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(F2||(F2={}));var B2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B2||(B2={}));var $2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})($2||($2={}));var H2;(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"})(H2||(H2={}));var G2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(G2||(G2={}));var W2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(W2||(W2={}));var j2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(j2||(j2={}));var V2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(V2||(V2={}));var ne;(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"})(ne||(ne={}));var Oe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Oe||(Oe={}));var K2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(K2||(K2={}));var Z2;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Z2||(Z2={}));var q2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(q2||(q2={}));var Y2;(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"})(Y2||(Y2={}));var X2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(X2||(X2={}));var Q2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Q2||(Q2={}));var J2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(J2||(J2={}));var e0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(e0||(e0={}));var t0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(t0||(t0={}));var r0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(r0||(r0={}));var n0;(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"})(n0||(n0={}));var o0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(o0||(o0={}));var B3={[ne.PERSONAL_BOOK_SHARE_USER]:[ne.PERSONAL_BOOK_USER],[ne.HTML_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.PDF_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.KHUB_ADMIN]:[ne.CONTENT_PUBLISHER],[ne.ADMIN]:[ne.KHUB_ADMIN,ne.USERS_ADMIN,ne.PORTAL_ADMIN,ne.BEHAVIOR_DATA_USER],[ne.GENERATIVE_AI_EXPORT_USER]:[ne.GENERATIVE_AI_USER]};function a0(e,t){return e===t||(B3[e]??[]).some(n=>a0(n,t))}function i0(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(o=>a0(o,t))}var go=C(D());var ti=C(D());var Gt=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=U.getState(),a=t??o;if(n&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(n,a,!0)}static await(t){return new Promise(n=>{let o=e.get(t);if(o)n(o);else{let a=U.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var wr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Gt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Gt.await()}};var be=class extends wr{constructor(t=!0,n){var o;super(n),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=(o=a.commonCache)!==null&&o!==void 0?o:new ti.CacheRegistry,this.cache=t?a.commonCache:new ti.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((n,o)=>0|31*n+o.charCodeAt(0),0))}};var fo=class extends be{async listMySearches(){let{session:t}=U.getState();return i0(t,ne.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var po=class extends be{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var mo=class extends be{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=U.getState().session;return!!t?.sessionAuthenticated}};var ho=class extends be{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=U.getState().session;return!!t?.sessionAuthenticated}};var $3="ft-user-assets",H3={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(Oe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let n=t.payload.mapId;e.assetCounts.bookmarkByMap[n]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:n,mapId:o,asset:a}=t.payload;ni(e,n,[...ri(e,n),a]),s0(e,n,1,o),c0(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;ni(e,n,ri(e,n).map(a=>a.id===o.id?o:a)),c0(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;ni(e,n,ri(e,n).filter(i=>i.id!==a)),s0(e,n,-1,o)}},l0={[Oe.SEARCHES]:"savedSearches",[Oe.BOOKMARKS]:"bookmarks",[Oe.BOOKS]:void 0,[Oe.COLLECTIONS]:void 0},ri=(e,t)=>{var n;let o=l0[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},ni=(e,t,n)=>{let o=l0[t];o&&(e[o]=n)},s0=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===Oe.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},c0=(e,t)=>{let n=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!n.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},ue=go.FtReduxStore.get({name:$3,reducers:H3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Oe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),oi=class{constructor(t=new mo,n=new ho){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new po,this.savedSearchesService=new fo,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=U.getState();(0,go.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,n?.profile)||(this.currentSession=n,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ue.actions.clearAssetCount(),ue.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ue.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ue.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ue.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ue.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&ue.getState().assetCounts.allAsset[t]!==n.count&&ue.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&ue.getState().assetCounts.bookmarkByMap[t]!==n.count&&ue.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(ue.getState().assetCounts.bookmarkByMap).length!==0;t===Oe.BOOKMARKS&&n&&ue.actions.clearBookmarkCountByMap(),ue.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 n=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ue.actions.bookmarks(n)}}},G3=new oi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=G3);var ai=class{addCommand(t,n=!1){U.commands.add(t,n)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ai;var Re=C(D());var d0,zr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},W3=Symbol("clearAfterUnitTest"),yo=class extends(0,Re.withEventBus)(be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[d0]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let n=t.name.toLowerCase();this.cache.setFinal(n,t),this.notify(n)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,n){var o;if(t=t.toLowerCase(),n&&Object.keys(n).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...n};(0,Re.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var n,o;return this.fetchContext(t),(o=(n=this.cache.getNow(t))===null||n===void 0?void 0:n.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,n){let o=t.toLowerCase();return this.resolveContext(o)[n]}resolveMessage(t,n,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Re.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(n,...o)}async fetchContext(t){let n=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),n&&await this.notify(t)}catch(a){!(a instanceof Re.CanceledPromiseError)&&n&&console.error(a)}return o}subscribe(t,n){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(n),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(n)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new zr({loadedContexts:t})),this.dispatchEvent(new zr({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new zr({loadedContexts:[t]})),this.dispatchEvent(new zr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Re.delay)(0).then(()=>o()).catch(()=>null)))}};d0=W3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var ln=window.FluidTopicsI18nService,ii=window.FluidTopicsCustomI18nService;var u0=C(D()),si=class{highlightHtml(t,n,o){(0,u0.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new si;var f0=C(D());var ci=class{isDate(t){var n,o,a,i;return(i=(a=((o=(n=U.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return f0.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:U.getState().uiLocale,(a=n?.longFormat)!==null&&a!==void 0?a:!1,(i=n?.withTime)!==null&&i!==void 0?i:!1,(s=n?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new ci;var p0=C(D());var dn=class{static get(t,n){var o,a;let i=U.getState(),{lang:s,region:l}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new p0.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,n??`${s}-${l}`)}};var li=class{urlToSearchRequest(t){return dn.get().parse(t)}searchRequestToUrl(t){return dn.get().serialize(t)}};window.FluidTopicsUrlService=new li;var it=C(D());var Wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Wt.eventName="change";var di=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let n=sessionStorage.getItem(this.itemName(t));return n?JSON.parse(n):void 0}set(t,n){sessionStorage.setItem(this.itemName(t),JSON.stringify(n))}},m0=new di;var bo=class e extends it.WithEventBus{static build(){return new e(window.history,m0,()=>window.location,!1)}constructor(t,n,o,a){var i,s;super(),this.history=t,this.historyStorage=n,this.windowLocation=o,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,n=!1){let o=n&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,it.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Wt(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let u=n(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.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 n=this.history.length-1;n>=0;n--)t?this.states[n]=this.historyStorage.get(n):setTimeout(()=>this.states[n]=this.historyStorage.get(n),this.history.length-n)}updateCurrentState(t){var n;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(t){this.addEventListener(Wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Wt.eventName,t)}currentItem(){return(0,it.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,it.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,it.deepCopy)(n.find(o=>t(o)))}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,it.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 n;let o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,n;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(n=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,n){var o;if(!this.hasState(t))return!1;let a=n??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=bo.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 h0=C($());var g0=h0.css`
|
|
2062
|
-
`;var v0=C($()),ve=C(ae()),Kt=C(D());var jt=C(D());function y0(e,t){let{authenticationRequired:n,session:o}=U.getState();return n&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var vo=class extends wr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ui=class e extends jt.FtStateManager{static build(t){return new e(U,t)}constructor(t,n){super(),this.store=t,this.cache=new jt.CacheRegistry,this.withManualResources=!0,this.
|
|
2061
|
+
`;var Jl=["top","right","bottom","left"],Ql=["start","end"],Ca=Jl.reduce((e,t)=>e.concat(t,t+"-"+Ql[0],t+"-"+Ql[1]),[]),qr=Math.min,ht=Math.max,Yr=Math.round;var Fe=e=>({x:e,y:e}),Mf={left:"right",right:"left",bottom:"top",top:"bottom"};function e1(e,t,n){return ht(e,qr(t,n))}function $n(e,t){return typeof e=="function"?e(t):e}function Xr(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function Ea(e){return e==="x"?"y":"x"}function La(e){return e==="y"?"height":"width"}function Hn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Aa(e){return Ea(Hn(e))}function t1(e,t,n){n===void 0&&(n=!1);let o=gt(e),a=Aa(e),i=La(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sa(s)),[s,Sa(s)]}function r1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Sa(e){let t=Xr(e);return Mf[t]+e.slice(t.length)}function If(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function n1(e){return typeof e!="number"?If(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function o1(e,t,n){let{reference:o,floating:a}=e,i=Hn(t),s=Aa(t),l=La(s),u=Xr(t),p=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,y=o[l]/2-a[l]/2,v;switch(u){case"top":v={x:h,y:o.y-a.height};break;case"bottom":v={x:h,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:g};break;case"left":v={x:o.x-a.width,y:g};break;default:v={x:o.x,y:o.y}}let x=gt(t);return x&&(v[s]+=y*(x==="end"?1:-1)*(n&&p?-1:1)),v}async function a1(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=$n(t,e),x=n1(v),O=l[y?g==="floating"?"reference":"floating":g],R=Tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(O)))==null||n?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:h,strategy:u})),N=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),P=await(i.isElement==null?void 0:i.isElement(M))&&await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1},B=Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(R.top-B.top+x.top)/P.y,bottom:(B.bottom-R.bottom+x.bottom)/P.y,left:(R.left-B.left+x.left)/P.x,right:(B.right-R.right+x.right)/P.x}}var kf=50,i1=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:a1},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=o1(p,o,u),y=o,v=0,x={};for(let S=0;S<i.length;S++){let O=i[S];if(!O)continue;let{name:R,fn:N}=O,{x:M,y:P,data:B,reset:j}=await N({x:h,y:g,initialPlacement:o,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});h=M??h,g=P??g,x[R]={...x[R],...B},j&&v<kf&&(v++,typeof j=="object"&&(j.placement&&(y=j.placement),j.rects&&(p=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):j.rects),{x:h,y:g}=o1(p,y,u)),S=-1)}return{x:h,y:g,placement:y,strategy:a,middlewareData:x}};function Tf(e,t,n){return(e?[...n.filter(a=>gt(a)===e),...n.filter(a=>gt(a)!==e)]:n.filter(a=>Xr(a)===a)).filter(a=>e?gt(a)===e||(t?r1(a)!==a:!1):!0)}var s1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:y=Ca,autoAlignment:v=!0,...x}=$n(e,t),S=g!==void 0||y===Ca?Tf(g||null,v,y):y,O=((n=s.autoPlacement)==null?void 0:n.index)||0,R=S[O];if(R==null)return{};if(l!==R)return{reset:{placement:S[0]}};let N=await u.detectOverflow(t,x),M=t1(R,i,await(u.isRTL==null?void 0:u.isRTL(p.floating))),P=[N[Xr(R)],N[M[0]],N[M[1]]],B=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:R,overflows:P}],j=S[O+1];if(j)return{data:{index:O+1,overflows:B},reset:{placement:j}};let Ge=B.map(me=>{let xe=gt(me.placement);return[me.placement,xe&&h?me.overflows.slice(0,2).reduce((he,Lt)=>he+Lt,0):me.overflows[0],me.overflows]}).sort((me,xe)=>me[1]-xe[1]),We=((a=Ge.filter(me=>me[2].slice(0,gt(me[0])?2:3).every(xe=>xe<=0))[0])==null?void 0:a[0])||Ge[0][0];return We!==l?{data:{index:O+1,overflows:B},reset:{placement:We}}:{}}}};var c1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:N=>{let{x:M,y:P}=N;return{x:M,y:P}}},...p}=$n(e,t),h={x:n,y:o},g=await i.detectOverflow(t,p),y=Hn(a),v=Ea(y),x=h[v],S=h[y],O=(N,M)=>e1(M+g[N==="y"?"top":"left"],M,M-g[N==="y"?"bottom":"right"]);s&&(x=O(v,x)),l&&(S=O(y,S));let R=u.fn({...t,[v]:x,[y]:S});return{...R,data:{x:R.x-n,y:R.y-o,enabled:{[v]:s,[y]:l}}}}}};function Wn(){return typeof window<"u"}function Dt(e){return d1(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(d1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function d1(e){return Wn()?e instanceof Node||e instanceof pe(e).Node:!1}function Ee(e){return Wn()?e instanceof Element||e instanceof pe(e).Element:!1}function Ze(e){return Wn()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function l1(e){return!Wn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function yr(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function u1(e){return/^(table|td|th)$/.test(Dt(e))}function Qr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pf=/transform|translate|scale|rotate|perspective|filter/,Df=/paint|layout|strict|content/,Pt=e=>!!e&&e!=="none",Oa;function br(e){let t=Ee(e)?Le(e):e;return Pt(t.transform)||Pt(t.translate)||Pt(t.scale)||Pt(t.rotate)||Pt(t.perspective)||!jn()&&(Pt(t.backdropFilter)||Pt(t.filter))||Pf.test(t.willChange||"")||Df.test(t.contain||"")}function f1(e){let t=ot(e);for(;Ze(t)&&!Ut(t);){if(br(t))return t;if(Qr(t))return null;t=ot(t)}return null}function jn(){return Oa==null&&(Oa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Oa}function Ut(e){return/^(html|body|#document)$/.test(Dt(e))}function Le(e){return pe(e).getComputedStyle(e)}function Jr(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ot(e){if(Dt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||l1(e)&&e.host||Ke(e);return l1(t)?t.host:t}function p1(e){let t=ot(e);return Ut(t)?(e.ownerDocument||e).body:Ze(t)&&yr(t)?t:p1(t)}function Gn(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=p1(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=pe(a);if(i){let l=Vn(s);return t.concat(s,s.visualViewport||[],yr(a)?a:[],l&&n?Gn(l):[])}else return t.concat(a,Gn(a,[],n))}function Vn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y1(e){let t=Le(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Ze(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=Yr(n)!==i||Yr(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function b1(e){return Ee(e)?e:e.contextElement}function vr(e){let t=b1(e);if(!Ze(t))return Fe(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=y1(t),s=(i?Yr(n.width):n.width)/o,l=(i?Yr(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var Uf=Fe(0);function v1(e){let t=pe(e);return!jn()||!t.visualViewport?Uf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ff(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pe(e)?!1:t}function en(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=b1(e),s=Fe(1);t&&(o?Ee(o)&&(s=vr(o)):s=vr(e));let l=Ff(i,n,o)?v1(i):Fe(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i){let y=pe(i),v=o&&Ee(o)?pe(o):o,x=y,S=Vn(x);for(;S&&o&&v!==x;){let O=vr(S),R=S.getBoundingClientRect(),N=Le(S),M=R.left+(S.clientLeft+parseFloat(N.paddingLeft))*O.x,P=R.top+(S.clientTop+parseFloat(N.paddingTop))*O.y;u*=O.x,p*=O.y,h*=O.x,g*=O.y,u+=M,p+=P,x=pe(S),S=Vn(x)}}return Tt({width:h,height:g,x:u,y:p})}function Kn(e,t){let n=Jr(e).scrollLeft;return t?t.left+n:en(Ke(e)).left+n}function x1(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Kn(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function Bf(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=Ke(o),l=t?Qr(t.floating):!1;if(o===s||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=Fe(1),h=Fe(0),g=Ze(o);if((g||!g&&!i)&&((Dt(o)!=="body"||yr(s))&&(u=Jr(o)),g)){let v=en(o);p=vr(o),h.x=v.x+o.clientLeft,h.y=v.y+o.clientTop}let y=s&&!g&&!i?x1(s,u):Fe(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+h.x+y.x,y:n.y*p.y-u.scrollTop*p.y+h.y+y.y}}function $f(e){return Array.from(e.getClientRects())}function Hf(e){let t=Ke(e),n=Jr(e),o=e.ownerDocument.body,a=ht(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ht(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+Kn(e),l=-n.scrollTop;return Le(o).direction==="rtl"&&(s+=ht(t.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:l}}var m1=25;function Gf(e,t){let n=pe(e),o=Ke(e),a=n.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let h=jn();(!h||h&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=Kn(o);if(p<=0){let h=o.ownerDocument,g=h.body,y=getComputedStyle(g),v=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(o.clientWidth-g.clientWidth-v);x<=m1&&(i-=x)}else p<=m1&&(i+=p);return{width:i,height:s,x:l,y:u}}function Wf(e,t){let n=en(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=Ze(e)?vr(e):Fe(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=o*i.y;return{width:s,height:l,x:u,y:p}}function h1(e,t,n){let o;if(t==="viewport")o=Gf(e,n);else if(t==="document")o=Hf(Ke(e));else if(Ee(t))o=Wf(t,n);else{let a=v1(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Tt(o)}function S1(e,t){let n=ot(e);return n===t||!Ee(n)||Ut(n)?!1:Le(n).position==="fixed"||S1(n,t)}function jf(e,t){let n=t.get(e);if(n)return n;let o=Gn(e,[],!1).filter(l=>Ee(l)&&Dt(l)!=="body"),a=null,i=Le(e).position==="fixed",s=i?ot(e):e;for(;Ee(s)&&!Ut(s);){let l=Le(s),u=br(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||yr(s)&&!u&&S1(e,s))?o=o.filter(h=>h!==s):a=l,s=ot(s)}return t.set(e,o),o}function Vf(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?Qr(t)?[]:jf(t,this._c):[].concat(n),o],l=h1(t,s[0],a),u=l.top,p=l.right,h=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=h1(t,s[y],a);u=ht(v.top,u),p=qr(v.right,p),h=qr(v.bottom,h),g=ht(v.left,g)}return{width:p-g,height:h-u,x:g,y:u}}function Kf(e){let{width:t,height:n}=y1(e);return{width:t,height:n}}function Zf(e,t,n){let o=Ze(t),a=Ke(t),i=n==="fixed",s=en(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Fe(0);function p(){u.x=Kn(a)}if(o||!o&&!i)if((Dt(t)!=="body"||yr(a))&&(l=Jr(t)),o){let v=en(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!o&&a&&p();let h=a&&!o&&!i?x1(a,l):Fe(0),g=s.left+l.scrollLeft-u.x-h.x,y=s.top+l.scrollTop-u.y-h.y;return{x:g,y,width:s.width,height:s.height}}function Ra(e){return Le(e).position==="static"}function g1(e,t){if(!Ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ke(e)===n&&(n=n.ownerDocument.body),n}function C1(e,t){let n=pe(e);if(Qr(e))return n;if(!Ze(e)){let a=ot(e);for(;a&&!Ut(a);){if(Ee(a)&&!Ra(a))return a;a=ot(a)}return n}let o=g1(e,t);for(;o&&u1(o)&&Ra(o);)o=g1(o,t);return o&&Ut(o)&&Ra(o)&&!br(o)?n:o||f1(e)||n}var qf=async function(e){let t=this.getOffsetParent||C1,n=this.getDimensions,o=await n(e.floating);return{reference:Zf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Yf(e){return Le(e).direction==="rtl"}var Zn={convertOffsetParentRelativeRectToViewportRelativeRect:Bf,getDocumentElement:Ke,getClippingRect:Vf,getOffsetParent:C1,getElementRects:qf,getClientRects:$f,getDimensions:Kf,getScale:vr,isElement:Ee,isRTL:Yf};var E1=s1,L1=c1;var A1=(e,t,n)=>{let o=new Map,a={platform:Zn,...n},i={...a.platform,_c:o};return i1(e,t,{...a,platform:i})};function O1(e){return Xf(e)}function wa(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Xf(e){for(let t=e;t;t=wa(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=wa(e);t;t=wa(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||br(n)||t.tagName==="BODY"))return t}return null}async function R1(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},A1(e,t,{strategy:o.strategy,platform:{...Zn,getOffsetParent:a=>Zn.getOffsetParent(a,O1)},middleware:[L1({crossAxis:!0}),E1({allowedPlacements:[o.placement]})]})}var _r=C(D());var ei=C(ae());var w1=C(ae(),1);var za=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function z1(e,t){return(0,w1.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return tn(e);try{return JSON.parse(n)}catch{return tn(e)}},toAttribute:n=>JSON.stringify(n)},hasChanged:rn,...t??{}})}function Qf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!qn(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!qn(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[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(n=i.length,n!==a(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){let s=i[o];if(!qn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function qn(e,t){try{return Qf(e,t)}catch{return!1}}function rn(e,t){return!qn(e,t)}function tn(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Yn(e,t){let n=o=>o[e]===!0;return o=>{if(n(o))return o;let a=t(o);return a[e]=!0,a}}var N1=C(ae(),1);var Na=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:rn,attribute:!1,...t};(0,N1.property)(i)(n,o);let s=n.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[o]),store:t.store})}};var Xn=class{constructor(){this.queue=[]}add(t,n=!1){n&&this.clear(t.type),this.queue.push(t)}consume(t){let n=this.queue.find(o=>o.type===t);return n&&(this.queue=this.queue.filter(o=>o!==n)),n}clear(t){typeof t=="string"?this.queue=this.queue.filter(n=>n.type!==t):this.queue=this.queue.filter(n=>!t.test(n.type))}};var Ft=C(ae(),1);var Qn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,n){return this.callbacks=[t],this.debounce(n)}queue(t,n){return this.callbacks.push(t),this.debounce(n)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((n,o)=>{this.resolvePromise=n,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,n;let o=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(n=this.resolvePromise)!==null&&n!==void 0?n:(()=>null);this.clearPromise();for(let s of o)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 M1=C($(),1);var Jn=globalThis,Jf=Jn.ShadowRoot&&(Jn.ShadyCSS===void 0||Jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var _1=(e,t)=>{if(Jf)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(let n of t){let o=document.createElement("style"),a=Jn.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=n.cssText,e.appendChild(o)}};var eo=class extends M1.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let n={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(n);return _1(o,t.elementStyles),o}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([n,o])=>this.defineScopedElement(n,o))}static defineScopedElement(t,n){za(t)(n),this.canDefineScopedElement(t)&&this.registry.define(t,n)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,n){this.scopedRegistryConstructor.defineScopedElement(t,n)}};function I1(e,t,...n){var o;let a=e.querySelector(t);for(let i of n)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var Sr=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},D1,k1=Symbol("constructorPrototype"),T1=Symbol("constructorName"),U1=Symbol("exportpartsDebouncer"),P1=Symbol("dynamicDependenciesLoaded"),xr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};xr.eventName="exportparts-updated";var qe=class extends eo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[D1]=new Qn(5),this.scheduleExportpartsUpdate=()=>{var t,n,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)!==null&&o!==void 0&&o)&&this[U1].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[T1]=this.constructor.name,this[k1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[T1]&&Object.setPrototypeOf(this,this[k1])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let n=this.constructor;n[P1]||(n[P1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(xr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(xr.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 xr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:n,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];n=I1(this.shadowRoot,...i)}n?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||n?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var n,o,a;if(((o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).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 n,o,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 h=new Set;for(let y of(o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(O=>O.trim());for(let O of S)h.add(O)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};D1=U1;Sr([(0,Ft.property)()],qe.prototype,"exportpartsPrefix",void 0);Sr([z1([])],qe.prototype,"exportpartsPrefixes",void 0);Sr([(0,Ft.property)({reflect:!0})],qe.prototype,"exportparts",void 0);Sr([(0,Ft.property)()],qe.prototype,"customStylesheet",void 0);Sr([(0,Ft.property)()],qe.prototype,"elementToFocus",void 0);Sr([(0,Ft.state)()],qe.prototype,"useAdoptedStyleSheets",void 0);function to(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var nn=Symbol("internalReduxEventsUnsubscribers"),yt=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),e3=Yn(Symbol("withRedux"),function(e){var t,n,o;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[n]=new Map,this[o]=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[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Bt].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Bt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Bt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Bt].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[yt].has(s.store):this[yt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[yt].set(s,l.subscribe(()=>this.updateFromStores())),this[nn].set(s,[]),to(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[h](y);l.addEventListener(p.eventName,g),this[nn].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[yt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[yt].has(s)&&this[yt].get(s)(),this[yt].delete(s),(l=this[nn].get(s))===null||l===void 0||l.forEach(u=>u()),this[nn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=yt,n=Bt,o=nn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),F1=class extends e3(qe){};function Ae(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function at(e){return!!e&&!!e[V]}function Be(e){var t;return!!e&&((function(n){if(!n||typeof n!="object")return!1;var o=Object.getPrototypeOf(n);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===c3})(e)||Array.isArray(e)||!!e[V1]||!!(!((t=e.constructor)===null||t===void 0)&&t[V1])||Fa(e)||Ba(e))}function $t(e,t,n){n===void 0&&(n=!1),Lr(e)===0?(n?Object.keys:Er)(e).forEach((function(o){n&&typeof o=="symbol"||t(o,e[o],e)})):e.forEach((function(o,a){return t(a,o,e)}))}function Lr(e){var t=e[V];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Fa(e)?2:Ba(e)?3:0}function Cr(e,t){return Lr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function t3(e,t){return Lr(e)===2?e.get(t):e[t]}function K1(e,t,n){var o=Lr(e);o===2?e.set(t,n):o===3?e.add(n):e[t]=n}function Z1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Fa(e){return i3&&e instanceof Map}function Ba(e){return s3&&e instanceof Set}function bt(e){return e.o||e.t}function $a(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X1(e);delete t[V];for(var n=Er(t),o=0;o<n.length;o++){var a=n[o],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 Ha(e,t){return t===void 0&&(t=!1),Ga(e)||at(e)||!Be(e)||(Lr(e)>1&&(e.set=e.add=e.clear=e.delete=r3),Object.freeze(e),t&&$t(e,(function(n,o){return Ha(o,!0)}),!0)),e}function r3(){Ae(2)}function Ga(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ye(e){var t=Ua[e];return t||Ae(18,e),t}function n3(e,t){Ua[e]||(Ua[e]=t)}function Ta(){return an}function _a(e,t){t&&(Ye("Patches"),e.u=[],e.s=[],e.v=t)}function ro(e){Pa(e),e.p.forEach(o3),e.p=null}function Pa(e){e===an&&(an=e.l)}function B1(e){return an={p:[],l:an,h:e,m:!0,_:0}}function o3(e){var t=e[V];t.i===0||t.i===1?t.j():t.g=!0}function Ma(e,t){t._=t.p.length;var n=t.p[0],o=e!==void 0&&e!==n;return t.h.O||Ye("ES5").S(t,e,o),o?(n[V].P&&(ro(t),Ae(4)),Be(e)&&(e=no(t,e),t.l||oo(t,e)),t.u&&Ye("Patches").M(n[V].t,e,t.u,t.s)):e=no(t,n,[]),ro(t),t.u&&t.v(t.u,t.s),e!==Y1?e:void 0}function no(e,t,n){if(Ga(t))return t;var o=t[V];if(!o)return $t(t,(function(l,u){return $1(e,o,t,l,u,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return oo(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=$a(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),$t(i,(function(l,u){return $1(e,o,a,l,u,n,s)})),oo(e,a,!1),n&&e.u&&Ye("Patches").N(o,n,e.u,e.s)}return o.o}function $1(e,t,n,o,a,i,s){if(at(a)){var l=no(e,a,i&&t&&t.i!==3&&!Cr(t.R,o)?i.concat(o):void 0);if(K1(n,o,l),!at(l))return;e.m=!1}else s&&n.add(a);if(Be(a)&&!Ga(a)){if(!e.h.D&&e._<1)return;no(e,a),t&&t.A.l||oo(e,a)}}function oo(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Ha(t,n)}function Ia(e,t){var n=e[V];return(n?bt(n):e)[t]}function H1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Object.getPrototypeOf(n)}}function vt(e){e.P||(e.P=!0,e.l&&vt(e.l))}function ka(e){e.o||(e.o=$a(e.t))}function Da(e,t,n){var o=Fa(t)?Ye("MapSet").F(t,n):Ba(t)?Ye("MapSet").T(t,n):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Ta(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=sn;s&&(u=[l],p=on);var h=Proxy.revocable(u,p),g=h.revoke,y=h.proxy;return l.k=y,l.j=g,y})(t,n):Ye("ES5").J(t,n);return(n?n.A:Ta()).p.push(o),o}function a3(e){return at(e)||Ae(22,e),(function t(n){if(!Be(n))return n;var o,a=n[V],i=Lr(n);if(a){if(!a.P&&(a.i<4||!Ye("ES5").K(a)))return a.t;a.I=!0,o=G1(n,i),a.I=!1}else o=G1(n,i);return $t(o,(function(s,l){a&&t3(a.t,s)===l||K1(o,s,t(l))})),i===3?new Set(o):o})(e)}function G1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return $a(e)}function q1(){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[V];return sn.get(p,s)},set:function(p){var h=this[V];sn.set(h,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][V];if(!u.P)switch(u.i){case 5:o(u)&&vt(u);break;case 4:n(u)&&vt(u)}}}function n(s){for(var l=s.t,u=s.k,p=Er(u),h=p.length-1;h>=0;h--){var g=p[h];if(g!==V){var y=l[g];if(y===void 0&&!Cr(l,g))return!0;var v=u[g],x=v&&v[V];if(x?x.t!==y:!Z1(v,y))return!0}}var S=!!l[V];return p.length!==Er(l).length+(S?0:1)}function o(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&&Ae(3,JSON.stringify(bt(s)))}var i={};n3("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=X1(y);delete S[V];for(var O=Er(S),R=0;R<O.length;R++){var N=O[R];S[N]=e(N,g||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),h={i:u?5:4,A:l?l.A:Ta(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,V,{value:h,writable:!0}),p},S:function(s,l,u){u?at(l)&&l[V].A===s&&t(s.p):(s.u&&(function p(h){if(h&&typeof h=="object"){var g=h[V];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)$t(v,(function(P){P!==V&&(y[P]!==void 0||Cr(y,P)?x[P]||p(v[P]):(x[P]=!0,vt(g)))})),$t(y,(function(P){v[P]!==void 0||Cr(v,P)||(x[P]=!1,vt(g))}));else if(S===5){if(o(g)&&(vt(g),x.length=!0),v.length<y.length)for(var O=v.length;O<y.length;O++)x[O]=!1;else for(var R=y.length;R<v.length;R++)x[R]=!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?n(s):o(s)}})}var W1,an,Wa=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",i3=typeof Map<"u",s3=typeof Set<"u",j1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Y1=Wa?Symbol.for("immer-nothing"):((W1={})["immer-nothing"]=!0,W1),V1=Wa?Symbol.for("immer-draftable"):"__$immer_draftable",V=Wa?Symbol.for("immer-state"):"__$immer_state";var c3=""+Object.prototype.constructor,Er=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X1=Object.getOwnPropertyDescriptors||function(e){var t={};return Er(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Ua={},sn={get:function(e,t){if(t===V)return e;var n=bt(e);if(!Cr(n,t))return(function(a,i,s){var l,u=H1(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,n,t);var o=n[t];return e.I||!Be(o)?o:o===Ia(e.t,t)?(ka(e),e.o[t]=Da(e.A.h,o,e)):o},has:function(e,t){return t in bt(e)},ownKeys:function(e){return Reflect.ownKeys(bt(e))},set:function(e,t,n){var o=H1(bt(e),t);if(o?.set)return o.set.call(e.k,n),!0;if(!e.P){var a=Ia(bt(e),t),i=a?.[V];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Z1(n,a)&&(n!==void 0||Cr(e.t,t)))return!0;ka(e),vt(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ia(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ka(e),vt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=bt(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:o.enumerable,value:n[t]}},defineProperty:function(){Ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ae(12)}},on={};$t(sn,(function(e,t){on[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),on.deleteProperty=function(e,t){return on.set.call(this,e,t,void 0)},on.set=function(e,t,n){return sn.set.call(this,e[0],t,n,e[0])};var l3=(function(){function e(n){var o=this;this.O=j1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=o;return function(S){var O=this;S===void 0&&(S=l);for(var R=arguments.length,N=Array(R>1?R-1:0),M=1;M<R;M++)N[M-1]=arguments[M];return u.produce(S,(function(P){var B;return(B=i).call.apply(B,[O,P].concat(N))}))}}var p;if(typeof i!="function"&&Ae(6),s!==void 0&&typeof s!="function"&&Ae(7),Be(a)){var h=B1(o),g=Da(o,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?ro(h):Pa(h)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return _a(h,s),Ma(S,h)}),(function(S){throw ro(h),S})):(_a(h,s),Ma(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Y1&&(p=void 0),o.D&&Ha(p,!0),s){var v=[],x=[];Ye("Patches").M(a,p,v,x),s(v,x)}return p}Ae(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return o.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=o.produce(a,i,(function(p,h){s=p,l=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof n?.useProxies=="boolean"&&this.setUseProxies(n.useProxies),typeof n?.autoFreeze=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Be(n)||Ae(8),at(n)&&(n=a3(n));var o=B1(this),a=Da(this,n,void 0);return a[V].C=!0,Pa(o),a},t.finishDraft=function(n,o){var a=n&&n[V],i=a.A;return _a(i,o),Ma(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!j1&&Ae(20),this.O=n},t.applyPatches=function(n,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}a>-1&&(o=o.slice(a+1));var s=Ye("Patches").$;return at(n)?s(n,o):this.produce(n,(function(l){return s(l,o)}))},e})(),ye=new l3,d3=ye.produce,$g=ye.produceWithPatches.bind(ye),Hg=ye.setAutoFreeze.bind(ye),Gg=ye.setUseProxies.bind(ye),Wg=ye.applyPatches.bind(ye),jg=ye.createDraft.bind(ye),Vg=ye.finishDraft.bind(ye),ao=d3;function Ht(e){"@babel/helpers - typeof";return Ht=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},Ht(e)}function Q1(e,t){if(Ht(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ht(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J1(e){var t=Q1(e,"string");return Ht(t)=="symbol"?t:t+""}function e2(e,t,n){return(t=J1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(n),!0).forEach(function(o){e2(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t2(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function le(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 r2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Va=function(){return Math.random().toString(36).substring(7).split("").join(".")},io={INIT:"@@redux/INIT"+Va(),REPLACE:"@@redux/REPLACE"+Va(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Va()}};function u3(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 Ka(e,t,n){var o;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(le(1));return n(Ka)(e,t)}if(typeof e!="function")throw new Error(le(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function h(){if(u)throw new Error(le(3));return i}function g(S){if(typeof S!="function")throw new Error(le(4));if(u)throw new Error(le(5));var O=!0;return p(),l.push(S),function(){if(O){if(u)throw new Error(le(6));O=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!u3(S))throw new Error(le(7));if(typeof S.type>"u")throw new Error(le(8));if(u)throw new Error(le(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var O=s=l,R=0;R<O.length;R++){var N=O[R];N()}return S}function v(S){if(typeof S!="function")throw new Error(le(10));a=S,y({type:io.REPLACE})}function x(){var S,O=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(le(11));function M(){N.next&&N.next(h())}M();var P=O(M);return{unsubscribe:P}}},S[r2]=function(){return this},S}return y({type:io.INIT}),o={dispatch:y,subscribe:g,getState:h,replaceReducer:v},o[r2]=x,o}function f3(e){Object.keys(e).forEach(function(t){var n=e[t],o=n(void 0,{type:io.INIT});if(typeof o>"u")throw new Error(le(12));if(typeof n(void 0,{type:io.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(le(13))})}function n2(e){for(var t=Object.keys(e),n={},o=0;o<t.length;o++){var a=t[o];typeof e[a]=="function"&&(n[a]=e[a])}var i=Object.keys(n),s,l;try{f3(n)}catch(u){l=u}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],O=n[S],R=p[S],N=O(R,h);if(typeof N>"u"){var M=h&&h.type;throw new Error(le(14))}v[S]=N,y=y||N!==R}return y=y||i.length!==Object.keys(p).length,y?v:p}}function Ar(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(o){return o}:t.length===1?t[0]:t.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function o2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(le(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=Ar.apply(void 0,l)(a.dispatch),ja(ja({},a),{},{dispatch:i})}}}function a2(e){var t=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var i2=a2();i2.withExtraArgument=a2;var Za=i2;var u2=(function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function o(){this.constructor=t}t.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),p3=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,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(h){return u([p,h])}}function u(p){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=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 n.label++,{value:p[1],done:!1};case 5:n.label++,a=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){n.label=p[1];break}if(p[0]===6&&n.label<i[1]){n.label=i[1],i=p;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(p);break}i[2]&&n.ops.pop(),n.trys.pop();continue}p=t.call(e,n)}catch(h){p=[6,h],a=0}finally{o=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Or=function(e,t){for(var n=0,o=t.length,a=e.length;n<o;n++,a++)e[a]=t[n];return e},m3=Object.defineProperty,h3=Object.defineProperties,g3=Object.getOwnPropertyDescriptors,s2=Object.getOwnPropertySymbols,y3=Object.prototype.hasOwnProperty,b3=Object.prototype.propertyIsEnumerable,c2=function(e,t,n){return t in e?m3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},xt=function(e,t){for(var n in t||(t={}))y3.call(t,n)&&c2(e,n,t[n]);if(s2)for(var o=0,a=s2(t);o<a.length;o++){var n=a[o];b3.call(t,n)&&c2(e,n,t[n])}return e},qa=function(e,t){return h3(e,g3(t))},v3=function(e,t,n){return new Promise(function(o,a){var i=function(u){try{l(n.next(u))}catch(p){a(p)}},s=function(u){try{l(n.throw(u))}catch(p){a(p)}},l=function(u){return u.done?o(u.value):Promise.resolve(u.value).then(i,s)};l((n=n.apply(e,t)).next())})};var x3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ar:Ar.apply(null,arguments)},d9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function S3(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function St(e,t){function n(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(t){var i=t.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return xt(xt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:o[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(o){return o.type===e},n}var C3=(function(e){u2(t,e);function t(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=e.apply(this,n)||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 n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Or([void 0],n[0].concat(this)))):new(t.bind.apply(t,Or([void 0],n.concat(this))))},t})(Array),E3=(function(e){u2(t,e);function t(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=e.apply(this,n)||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 n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Or([void 0],n[0].concat(this)))):new(t.bind.apply(t,Or([void 0],n.concat(this))))},t})(Array);function Qa(e){return Be(e)?ao(e,function(){}):e}function L3(e){return typeof e=="boolean"}function A3(){return function(t){return O3(t)}}function O3(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,o=e.immutableCheck,a=o===void 0?!0:o,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new C3;if(n&&(L3(n)?p.push(Za):p.push(Za.withExtraArgument(n.extraArgument))),0){if(a)var h;if(s)var g;if(u)var y}return p}var Ya=!0;function f2(e){var t=A3(),n=e||{},o=n.reducer,a=o===void 0?void 0:o,i=n.middleware,s=i===void 0?t():i,l=n.devTools,u=l===void 0?!0:l,p=n.preloadedState,h=p===void 0?void 0:p,g=n.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(S3(a))v=n2(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),!Ya&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ya&&x.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=o2.apply(void 0,x),O=Ar;u&&(O=x3(xt({trace:!Ya},typeof u=="object"&&u)));var R=new E3(S),N=R;Array.isArray(y)?N=Or([S],y):typeof y=="function"&&(N=y(R));var M=O.apply(void 0,N);return Ka(v,h,M)}function p2(e){var t={},n=[],o,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 n.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return e(a),[t,n,o]}function R3(e){return typeof e=="function"}function w3(e,t,n,o){n===void 0&&(n=[]);var a=typeof t=="function"?p2(t):[t,n,o],i=a[0],s=a[1],l=a[2],u;if(R3(e))u=function(){return Qa(e())};else{var p=Qa(e);u=function(){return p}}function h(g,y){g===void 0&&(g=u());var v=Or([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(at(x)){var O=x,R=S(O,y);return R===void 0?x:R}else{if(Be(x))return ao(x,function(N){return S(N,y)});var R=S(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},g)}return h.getInitialState=u,h}function z3(e,t){return e+"/"+t}function m2(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:Qa(e.initialState),o=e.reducers||{},a=Object.keys(o),i={},s={},l={};a.forEach(function(h){var g=o[h],y=z3(t,h),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[h]=v,s[y]=v,l[h]=x?St(y,x):St(y)});function u(){var h=typeof e.extraReducers=="function"?p2(e.extraReducers):[e.extraReducers],g=h[0],y=g===void 0?{}:g,v=h[1],x=v===void 0?[]:v,S=h[2],O=S===void 0?void 0:S,R=xt(xt({},y),s);return w3(n,function(N){for(var M in R)N.addCase(M,R[M]);for(var P=0,B=x;P<B.length;P++){var j=B[P];N.addMatcher(j.matcher,j.reducer)}O&&N.addDefaultCase(O)})}var p;return{name:t,reducer:function(h,g){return p||(p=u()),p(h,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var N3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_3=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=N3[Math.random()*64|0];return t},M3=["name","message","stack","code"],Xa=(function(){function e(t,n){this.payload=t,this.meta=n}return e})(),l2=(function(){function e(t,n){this.payload=t,this.meta=n}return e})(),I3=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,o=M3;n<o.length;n++){var a=o[n];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},m9=(function(){function e(t,n,o){var a=St(t+"/fulfilled",function(h,g,y,v){return{payload:h,meta:qa(xt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=St(t+"/pending",function(h,g,y){return{payload:void 0,meta:qa(xt({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=St(t+"/rejected",function(h,g,y,v,x){return{payload:v,error:(o&&o.serializeError||I3)(h||"Rejected"),meta:qa(xt({},x||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function p(h){return function(g,y,v){var x=o?.idGenerator?o.idGenerator(h):_3(),S=new u,O,R=!1;function N(P){O=P,S.abort()}var M=(function(){return v3(this,null,function(){var P,B,j,Ge,Et,We,me;return p3(this,function(xe){switch(xe.label){case 0:return xe.trys.push([0,4,,5]),Ge=(P=o?.condition)==null?void 0:P.call(o,h,{getState:y,extra:v}),T3(Ge)?[4,Ge]:[3,2];case 1:Ge=xe.sent(),xe.label=2;case 2:if(Ge===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Et=new Promise(function(he,Lt){return S.signal.addEventListener("abort",function(){return Lt({name:"AbortError",message:O||"Aborted"})})}),g(i(x,h,(B=o?.getPendingMeta)==null?void 0:B.call(o,{requestId:x,arg:h},{getState:y,extra:v}))),[4,Promise.race([Et,Promise.resolve(n(h,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(he,Lt){return new Xa(he,Lt)},fulfillWithValue:function(he,Lt){return new l2(he,Lt)}})).then(function(he){if(he instanceof Xa)throw he;return he instanceof l2?a(he.payload,x,h,he.meta):a(he,x,h)})])];case 3:return j=xe.sent(),[3,5];case 4:return We=xe.sent(),j=We instanceof Xa?s(null,x,h,We.payload,We.meta):s(We,x,h),[3,5];case 5:return me=o&&!o.dispatchConditionRejection&&s.match(j)&&j.meta.condition,me||g(j),[2,j]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:h,unwrap:function(){return M.then(k3)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function k3(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function T3(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var h2="listener",g2="completed",y2="cancelled",h9="task-"+y2,g9="task-"+g2,y9=h2+"-"+y2,b9=h2+"-"+g2;var Ja="listenerMiddleware";var v9=St(Ja+"/add"),x9=St(Ja+"/removeAll"),S9=St(Ja+"/remove");var d2,C9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(d2||(d2=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},P3=function(e){return function(t){setTimeout(t,e)}},E9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:P3(10);q1();var D3=Yn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(n,o,a){this.eventBus.addEventListener(n,o,a)}dispatchEvent(n){return this.eventBus.dispatchEvent(n)}removeEventListener(n,o,a){this.eventBus.removeEventListener(n,o,a)}}}),so=class extends D3(Object){};window.ftReduxStores||(window.ftReduxStores={});var b2=class e extends so{static get(t){var n;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(to(i))return i;if(a==null)return;let s=m2({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=f2({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=tn(s.getInitialState());for(let g of p.keeping)h[g]=(u??h)[g];return h}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,n,o){super(),this.reduxSlice=t,this.reduxStore=n,this.isFtReduxStore=!0,this.commands=new Xn;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?(...h)=>{let g=p(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=o??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 co=class{static format(t,n,o,a,i){return window.moment?window.moment(t).locale(n).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,n,o,a,!!i)}static getMomentDateFormat(t,n,o){return o?"LT":t?n?"lll":"ll":n?"L LT":"L"}static getIntlDateTime(t,n,o,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(n,{dateStyle:o?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),n=new Date().getTimezoneOffset();return`${n<0?"+":"-"}${t(Math.abs(n)/60)}:${t(Math.abs(n)%60)}`}};var lo=C(D()),U3="ft-app-info",Rr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Rr.eventName="authentication-change";var cn=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};cn.eventName="ui-locale-changed";var F3={session:(e,t)=>{(0,lo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new Rr(t.payload)),0))}},U=lo.FtReduxStore.get({name:U3,reducers:F3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var v2=C(D()),uo=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},X9=(0,v2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>co.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return uo([(0,ei.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),uo([(0,ei.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),uo([Na({store:U.name,selector:n=>{var o,a;return(a=(o=n.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),uo([Na({store:U.name})],t.prototype,"uiLocale",void 0),t});var x2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(x2||(x2={}));var S2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(S2||(S2={}));var C2;(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"})(C2||(C2={}));var E2;(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"})(E2||(E2={}));var L2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(L2||(L2={}));var A2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(A2||(A2={}));var O2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(O2||(O2={}));var R2;(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"})(R2||(R2={}));var w2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(w2||(w2={}));var z2;(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"})(z2||(z2={}));var N2;(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"})(N2||(N2={}));var _2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(_2||(_2={}));var M2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(M2||(M2={}));var I2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(I2||(I2={}));var k2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(k2||(k2={}));var T2;(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"})(T2||(T2={}));var P2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(P2||(P2={}));var D2;(function(e){e.ASC="ASC",e.DESC="DESC"})(D2||(D2={}));var U2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(U2||(U2={}));var F2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(F2||(F2={}));var B2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(B2||(B2={}));var $2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})($2||($2={}));var H2;(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"})(H2||(H2={}));var G2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(G2||(G2={}));var W2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(W2||(W2={}));var j2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(j2||(j2={}));var V2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(V2||(V2={}));var ne;(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"})(ne||(ne={}));var Oe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Oe||(Oe={}));var K2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(K2||(K2={}));var Z2;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Z2||(Z2={}));var q2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(q2||(q2={}));var Y2;(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"})(Y2||(Y2={}));var X2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(X2||(X2={}));var Q2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Q2||(Q2={}));var J2;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(J2||(J2={}));var e0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(e0||(e0={}));var t0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(t0||(t0={}));var r0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(r0||(r0={}));var n0;(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"})(n0||(n0={}));var o0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(o0||(o0={}));var B3={[ne.PERSONAL_BOOK_SHARE_USER]:[ne.PERSONAL_BOOK_USER],[ne.HTML_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.PDF_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.KHUB_ADMIN]:[ne.CONTENT_PUBLISHER],[ne.ADMIN]:[ne.KHUB_ADMIN,ne.USERS_ADMIN,ne.PORTAL_ADMIN,ne.BEHAVIOR_DATA_USER],[ne.GENERATIVE_AI_EXPORT_USER]:[ne.GENERATIVE_AI_USER]};function a0(e,t){return e===t||(B3[e]??[]).some(n=>a0(n,t))}function i0(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(o=>a0(o,t))}var go=C(D());var ti=C(D());var Gt=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=U.getState(),a=t??o;if(n&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(n,a,!0)}static await(t){return new Promise(n=>{let o=e.get(t);if(o)n(o);else{let a=U.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var wr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Gt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Gt.await()}};var be=class extends wr{constructor(t=!0,n){var o;super(n),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=(o=a.commonCache)!==null&&o!==void 0?o:new ti.CacheRegistry,this.cache=t?a.commonCache:new ti.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((n,o)=>0|31*n+o.charCodeAt(0),0))}};var fo=class extends be{async listMySearches(){let{session:t}=U.getState();return i0(t,ne.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var po=class extends be{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var mo=class extends be{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=U.getState().session;return!!t?.sessionAuthenticated}};var ho=class extends be{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=U.getState().session;return!!t?.sessionAuthenticated}};var $3="ft-user-assets",H3={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(Oe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let n=t.payload.mapId;e.assetCounts.bookmarkByMap[n]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:n,mapId:o,asset:a}=t.payload;ni(e,n,[...ri(e,n),a]),s0(e,n,1,o),c0(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;ni(e,n,ri(e,n).map(a=>a.id===o.id?o:a)),c0(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;ni(e,n,ri(e,n).filter(i=>i.id!==a)),s0(e,n,-1,o)}},l0={[Oe.SEARCHES]:"savedSearches",[Oe.BOOKMARKS]:"bookmarks",[Oe.BOOKS]:void 0,[Oe.COLLECTIONS]:void 0},ri=(e,t)=>{var n;let o=l0[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},ni=(e,t,n)=>{let o=l0[t];o&&(e[o]=n)},s0=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===Oe.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},c0=(e,t)=>{let n=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!n.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},ue=go.FtReduxStore.get({name:$3,reducers:H3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Oe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),oi=class{constructor(t=new mo,n=new ho){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new po,this.savedSearchesService=new fo,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=U.getState();(0,go.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,n?.profile)||(this.currentSession=n,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ue.actions.clearAssetCount(),ue.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ue.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ue.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ue.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ue.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&ue.getState().assetCounts.allAsset[t]!==n.count&&ue.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&ue.getState().assetCounts.bookmarkByMap[t]!==n.count&&ue.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(ue.getState().assetCounts.bookmarkByMap).length!==0;t===Oe.BOOKMARKS&&n&&ue.actions.clearBookmarkCountByMap(),ue.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 n=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ue.actions.bookmarks(n)}}},G3=new oi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=G3);var ai=class{addCommand(t,n=!1){U.commands.add(t,n)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ai;var Re=C(D());var d0,zr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},W3=Symbol("clearAfterUnitTest"),yo=class extends(0,Re.withEventBus)(be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[d0]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let n=t.name.toLowerCase();this.cache.setFinal(n,t),this.notify(n)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,n){var o;if(t=t.toLowerCase(),n&&Object.keys(n).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...n};(0,Re.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var n,o;return this.fetchContext(t),(o=(n=this.cache.getNow(t))===null||n===void 0?void 0:n.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,n){let o=t.toLowerCase();return this.resolveContext(o)[n]}resolveMessage(t,n,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Re.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(n,...o)}async fetchContext(t){let n=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),n&&await this.notify(t)}catch(a){!(a instanceof Re.CanceledPromiseError)&&n&&console.error(a)}return o}subscribe(t,n){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(n),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(n)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new zr({loadedContexts:t})),this.dispatchEvent(new zr({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new zr({loadedContexts:[t]})),this.dispatchEvent(new zr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Re.delay)(0).then(()=>o()).catch(()=>null)))}};d0=W3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends yo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends yo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var ln=window.FluidTopicsI18nService,ii=window.FluidTopicsCustomI18nService;var u0=C(D()),si=class{highlightHtml(t,n,o){(0,u0.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new si;var f0=C(D());var ci=class{isDate(t){var n,o,a,i;return(i=(a=((o=(n=U.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return f0.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:U.getState().uiLocale,(a=n?.longFormat)!==null&&a!==void 0?a:!1,(i=n?.withTime)!==null&&i!==void 0?i:!1,(s=n?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new ci;var p0=C(D());var dn=class{static get(t,n){var o,a,i,s;let l=U.getState(),{lang:u,region:p}=(i=(a=(o=l.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new p0.SearchPlaceConverter(l.baseUrl,t??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,n??`${u}-${p}`)}};var li=class{urlToSearchRequest(t){return dn.get().parse(t)}searchRequestToUrl(t){return dn.get().serialize(t)}};window.FluidTopicsUrlService=new li;var it=C(D());var Wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Wt.eventName="change";var di=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let n=sessionStorage.getItem(this.itemName(t));return n?JSON.parse(n):void 0}set(t,n){sessionStorage.setItem(this.itemName(t),JSON.stringify(n))}},m0=new di;var bo=class e extends it.WithEventBus{static build(){return new e(window.history,m0,()=>window.location,!1)}constructor(t,n,o,a){var i,s;super(),this.history=t,this.historyStorage=n,this.windowLocation=o,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,n=!1){let o=n&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,it.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Wt(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let u=n(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.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 n=this.history.length-1;n>=0;n--)t?this.states[n]=this.historyStorage.get(n):setTimeout(()=>this.states[n]=this.historyStorage.get(n),this.history.length-n)}updateCurrentState(t){var n;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(t){this.addEventListener(Wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Wt.eventName,t)}currentItem(){return(0,it.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,it.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,it.deepCopy)(n.find(o=>t(o)))}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,it.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 n;let o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,n;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(n=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,n){var o;if(!this.hasState(t))return!1;let a=n??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=bo.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 h0=C($());var g0=h0.css`
|
|
2062
|
+
`;var v0=C($()),ve=C(ae()),Kt=C(D());var jt=C(D());function y0(e,t){let{authenticationRequired:n,session:o}=U.getState();return n&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var vo=class extends wr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ui=class e extends jt.FtStateManager{static build(t){return new e(U,t)}constructor(t,n){super(),this.store=t,this.cache=new jt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vo,this.cleanSessionDebouncer=new jt.Debouncer,this.reloadDebouncer=new jt.Debouncer(500),this.apiProvider=n??(()=>Gt.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.store.getState().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 n=await this.apiProvider().getCurrentSession();return n.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},n.idleTimeoutInMillis),n});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 n=await this.cache.get("availableContentLocales",()=>y0(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=n.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){this.store.actions.localesConfiguration(t),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(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new cn(n)))}).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)}},b0=ui.build();var Vt=class extends Event{constructor(t,n,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=n,this.callback=o,this.subscribe=a??!1}};var un=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let n=this.pendingContextRequests.get(t.context);if(n===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:o}=n;for(let{elementRef:a,callbackRef:i}of o){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Vt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let n=t.contextTarget??t.composedPath()[0],o=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(n);i===void 0&&a.callbacks.set(n,i=new WeakSet),i.has(o)||(i.add(o),a.requests.push({elementRef:new WeakRef(n),callbackRef:new WeakRef(o)}))}}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 de=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},X=class extends Kt.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=b0,this.contextRoot=new un}render(){return v0.html`
|
|
2063
2063
|
<slot></slot>
|
|
2064
2064
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var n;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(o=>ln.addContext(o)),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")&&((n=this.stateManager)===null||n===void 0||n.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};X.elementDefinitions={};X.styles=g0;de([(0,ve.property)()],X.prototype,"baseUrl",void 0);de([(0,ve.property)()],X.prototype,"apiIntegrationIdentifier",void 0);de([(0,ve.property)()],X.prototype,"apiIntegrationAppVersion",void 0);de([(0,ve.property)()],X.prototype,"uiLocale",void 0);de([(0,Kt.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);de([(0,Kt.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"editorMode",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"noCustom",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);de([(0,ve.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],X.prototype,"noCustomComponent",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"withManualResources",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"authenticationRequired",void 0);de([(0,Kt.jsonProperty)([])],X.prototype,"messageContexts",void 0);de([(0,Kt.jsonProperty)(void 0)],X.prototype,"session",void 0);var S0=C(D());var x0={"ft-app-context":X};(0,S0.customElements)(x0);var C0=C(ae());var fi=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[n,o]=t.split(".");return{context:n,key:o,custom:n!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Nr=new fi;var K3=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},pn=Symbol("i18nAttributes"),E0=Symbol("i18nListAttributes"),L0=Symbol("i18nProperties"),xo=Symbol("i18nContexts"),fn=Symbol("i18nUnsubs"),A0=(0,_r.applyMixinOnce)(Symbol("withI18n"),function(e){var t,n;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[n]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ii:ln}i18n(i){let{context:s,key:l,message:u}=i,{custom:p,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let y=h??(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(Nr.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=(h,g,y)=>y?.context&&y.key&&i(h,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...h})}:y;(s=this[pn])===null||s===void 0||s.forEach((h,g)=>u[g]=p(h,g,u[g])),(l=this[E0])===null||l===void 0||l.forEach((h,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(v=>p(h,g,v))})}updateI18nProperties(i){var s;(s=this[L0])===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[xo].set(u,{isCustomContext:l}),this[fn].has(u)||this[fn].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[xo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[xo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[fn].forEach(i=>i()),this[fn].clear()}}return t=xo,n=fn,K3([(0,C0.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),So=class extends A0(_r.FtLitElement){},Co=class extends A0(_r.FtLitElementRedux){};var O0=C(D());var pi=class{fromAttribute(t){if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.map(o=>typeof o=="string"?Nr.fromAttribute(o):o):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Z3=new pi;var R0=(e,t)=>(n,o)=>{var a;n.constructor.createProperty(o,{type:Object,hasChanged:O0.hasChanged,converter:Nr,...t}),n[pn]=(a=n[pn])!==null&&a!==void 0?a:new Map,n[pn].set(o,e??{})};var w0=C($());var z0=w0.css`
|
|
2065
2065
|
`;var Eo=C($()),Lo=C(ae()),Ao=C(D());var mn=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},$e=class extends Co{constructor(){super(),this.editorMode=!1,this.addStore(U)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Eo.nothing:Eo.html`
|