@fluid-topics/ftds-text-area 2.2.40 → 2.2.41

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.
@@ -2080,7 +2080,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
2080
2080
  position: relative;
2081
2081
  word-break: break-word;
2082
2082
  }
2083
- `;var I1=["top","right","bottom","left"],T1=["start","end"],ai=I1.reduce((e,t)=>e.concat(t,t+"-"+T1[0],t+"-"+T1[1]),[]),sn=Math.min,_t=Math.max,cn=Math.round;var Ye=e=>({x:e,y:e}),k3={left:"right",right:"left",bottom:"top",top:"bottom"};function k1(e,t,n){return _t(e,sn(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function wt(e){return e.split("-")[1]}function ii(e){return e==="x"?"y":"x"}function si(e){return e==="y"?"height":"width"}function io(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function ci(e){return ii(io(e))}function P1(e,t,n){n===void 0&&(n=!1);let o=wt(e),a=ci(e),i=si(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=oi(s)),[s,oi(s)]}function D1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function oi(e){let t=ln(e);return k3[t]+e.slice(t.length)}function P3(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 U1(e){return typeof e!="number"?P3(e):{top:e,right:e,bottom:e,left:e}}function tr(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 B1(e,t,n){let{reference:o,floating:a}=e,i=io(t),s=ci(t),l=si(s),f=ln(t),m=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,v;switch(f){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 R=wt(t);return R&&(v[s]+=b*(R==="end"?1:-1)*(n&&m?-1:1)),v}async function H1(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:b=!1,padding:v=0}=ao(t,e),R=U1(v),_=l[b?g==="floating"?"reference":"floating":g],T=tr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),U=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,N=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),I=await(i.isElement==null?void 0:i.isElement(N))&&await(i.getScale==null?void 0:i.getScale(N))||{x:1,y:1},H=tr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:U,offsetParent:N,strategy:f}):U);return{top:(T.top-H.top+R.top)/I.y,bottom:(H.bottom-T.bottom+R.bottom)/I.y,left:(T.left-H.left+R.left)/I.x,right:(H.right-T.right+R.right)/I.x}}var D3=50,$1=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:H1},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=B1(m,o,f),b=o,v=0,R={};for(let w=0;w<i.length;w++){let _=i[w];if(!_)continue;let{name:T,fn:U}=_,{x:N,y:I,data:H,reset:$}=await U({x:h,y:g,initialPlacement:o,placement:b,strategy:a,middlewareData:R,rects:m,platform:l,elements:{reference:e,floating:t}});h=N??h,g=I??g,R[T]={...R[T],...H},$&&v<D3&&(v++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(m=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):$.rects),{x:h,y:g}=B1(m,b,f)),w=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:R}};function U3(e,t,n){return(e?[...n.filter(a=>wt(a)===e),...n.filter(a=>wt(a)!==e)]:n.filter(a=>ln(a)===a)).filter(a=>e?wt(a)===e||(t?D1(a)!==a:!1):!0)}var G1=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:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=ai,autoAlignment:v=!0,...R}=ao(e,t),w=g!==void 0||b===ai?U3(g||null,v,b):b,_=((n=s.autoPlacement)==null?void 0:n.index)||0,T=w[_];if(T==null)return{};if(l!==T)return{reset:{placement:w[0]}};let U=await f.detectOverflow(t,R),N=P1(T,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),I=[U[ln(T)],U[N[0]],U[N[1]]],H=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:T,overflows:I}],$=w[_+1];if($)return{data:{index:_+1,overflows:H},reset:{placement:$}};let J=H.map(_e=>{let Fr=wt(_e.placement);return[_e.placement,Fr&&h?_e.overflows.slice(0,2).reduce((Gd,Fd)=>Gd+Fd,0):_e.overflows[0],_e.overflows]}).sort((_e,Fr)=>_e[1]-Fr[1]),mr=((a=J.filter(_e=>_e[2].slice(0,wt(_e[0])?2:3).every(Fr=>Fr<=0))[0])==null?void 0:a[0])||J[0][0];return mr!==l?{data:{index:_+1,overflows:H},reset:{placement:mr}}:{}}}};var F1=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:f={fn:U=>{let{x:N,y:I}=U;return{x:N,y:I}}},...m}=ao(e,t),h={x:n,y:o},g=await i.detectOverflow(t,m),b=io(a),v=ii(b),R=h[v],w=h[b],_=(U,N)=>k1(N+g[U==="y"?"top":"left"],N,N-g[U==="y"?"bottom":"right"]);s&&(R=_(v,R)),l&&(w=_(b,w));let T=f.fn({...t,[v]:R,[b]:w});return{...T,data:{x:T.x-n,y:T.y-o,enabled:{[v]:s,[b]:l}}}}}};function co(){return typeof window<"u"}function nr(e){return V1(e)?(e.nodeName||"").toLowerCase():"#document"}function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pt(e){var t;return(t=(V1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function V1(e){return co()?e instanceof Node||e instanceof xe(e).Node:!1}function Fe(e){return co()?e instanceof Element||e instanceof xe(e).Element:!1}function mt(e){return co()?e instanceof HTMLElement||e instanceof xe(e).HTMLElement:!1}function W1(e){return!co()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}function dn(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function j1(e){return/^(table|td|th)$/.test(nr(e))}function fn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var B3=/transform|translate|scale|rotate|perspective|filter/,H3=/paint|layout|strict|content/,rr=e=>!!e&&e!=="none",li;function Or(e){let t=Fe(e)?We(e):e;return rr(t.transform)||rr(t.translate)||rr(t.scale)||rr(t.rotate)||rr(t.perspective)||!lo()&&(rr(t.backdropFilter)||rr(t.filter))||B3.test(t.willChange||"")||H3.test(t.contain||"")}function K1(e){let t=Nt(e);for(;mt(t)&&!Rr(t);){if(Or(t))return t;if(fn(t))return null;t=Nt(t)}return null}function lo(){return li==null&&(li=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),li}function Rr(e){return/^(html|body|#document)$/.test(nr(e))}function We(e){return xe(e).getComputedStyle(e)}function un(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nt(e){if(nr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||W1(e)&&e.host||pt(e);return W1(t)?t.host:t}function Z1(e){let t=Nt(e);return Rr(t)?(e.ownerDocument||e).body:mt(t)&&dn(t)?t:Z1(t)}function so(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=Z1(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=xe(a);if(i){let l=fo(s);return t.concat(s,s.visualViewport||[],dn(a)?a:[],l&&n?so(l):[])}else return t.concat(a,so(a,[],n))}function fo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X1(e){let t=We(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=mt(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=cn(n)!==i||cn(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function Q1(e){return Fe(e)?e:e.contextElement}function _r(e){let t=Q1(e);if(!mt(t))return Ye(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=X1(t),s=(i?cn(n.width):n.width)/o,l=(i?cn(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var $3=Ye(0);function J1(e){let t=xe(e);return!lo()||!t.visualViewport?$3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function G3(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xe(e)}function pn(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=Q1(e),s=Ye(1);t&&(o?Fe(o)&&(s=_r(o)):s=_r(e));let l=G3(i,n,o)?J1(i):Ye(0),f=(a.left+l.x)/s.x,m=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i&&o){let b=xe(i),v=Fe(o)?xe(o):o,R=b,w=fo(R);for(;w&&v!==R;){let _=_r(w),T=w.getBoundingClientRect(),U=We(w),N=T.left+(w.clientLeft+parseFloat(U.paddingLeft))*_.x,I=T.top+(w.clientTop+parseFloat(U.paddingTop))*_.y;f*=_.x,m*=_.y,h*=_.x,g*=_.y,f+=N,m+=I,R=xe(w),w=fo(R)}}return tr({width:h,height:g,x:f,y:m})}function uo(e,t){let n=un(e).scrollLeft;return t?t.left+n:pn(pt(e)).left+n}function e2(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-uo(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function F3(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=pt(o),l=t?fn(t.floating):!1;if(o===s||l&&i)return n;let f={scrollLeft:0,scrollTop:0},m=Ye(1),h=Ye(0),g=mt(o);if((g||!i)&&((nr(o)!=="body"||dn(s))&&(f=un(o)),g)){let v=pn(o);m=_r(o),h.x=v.x+o.clientLeft,h.y=v.y+o.clientTop}let b=s&&!g&&!i?e2(s,f):Ye(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:n.y*m.y-f.scrollTop*m.y+h.y+b.y}}function W3(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function V3(e){let t=un(e),n=e.ownerDocument.body,o=_t(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=_t(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+uo(e),s=-t.scrollTop;return We(n).direction==="rtl"&&(i+=_t(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var j3=25;function K3(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=xe(e),i=pt(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!lo()||t==="fixed";o?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(uo(i)<=0){let b=i.ownerDocument,v=b.body,R=getComputedStyle(v),w=b.compatMode==="CSS1Compat"&&parseFloat(R.marginLeft)+parseFloat(R.marginRight)||0,_=Math.abs(i.clientWidth-v.clientWidth-w),T=getComputedStyle(i).scrollbarGutter==="stable both-edges"?_/2:_;T<=j3&&(l-=T)}return{width:l,height:f,x:m,y:h}}function Z3(e,t){let n=pn(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=_r(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=o*i.y;return{width:s,height:l,x:f,y:m}}function q1(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=K3(e,n,t);else if(t==="document")o=V3(pt(e));else if(Fe(t))o=Z3(t,n);else{let a=J1(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return tr(o)}function q3(e,t){let n=t.get(e);if(n)return n;let o=so(e,[],!1).filter(l=>Fe(l)&&nr(l)!=="body"),a=null,i=We(e).position==="fixed",s=i?Nt(e):e;for(;Fe(s)&&!Rr(s);){let l=We(s),f=Or(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?o=o.filter(g=>g!==s):a=l,s=Nt(s)}return t.set(e,o),o}function Y3(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?fn(t)?[]:q3(t,this._c):[].concat(n),o],l=q1(t,s[0],a),f=l.top,m=l.right,h=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let v=q1(t,s[b],a);f=_t(v.top,f),m=sn(v.right,m),h=sn(v.bottom,h),g=_t(v.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function X3(e){let{width:t,height:n}=X1(e);return{width:t,height:n}}function Q3(e,t,n){let o=mt(t),a=pt(t),i=n==="fixed",s=pn(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=Ye(0);if((o||!i)&&((nr(t)!=="body"||dn(a))&&(l=un(t)),o)){let b=pn(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!o&&a&&(f.x=uo(a));let m=a&&!o&&!i?e2(a,l):Ye(0),h=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:h,y:g,width:s.width,height:s.height}}function di(e){return We(e).position==="static"}function Y1(e,t){if(!mt(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pt(e)===n&&(n=n.ownerDocument.body),n}function t2(e,t){let n=xe(e);if(fn(e))return n;if(!mt(e)){let a=Nt(e);for(;a&&!Rr(a);){if(Fe(a)&&!di(a))return a;a=Nt(a)}return n}let o=Y1(e,t);for(;o&&j1(o)&&di(o);)o=Y1(o,t);return o&&Rr(o)&&di(o)&&!Or(o)?n:o||K1(e)||n}var J3=async function(e){let t=this.getOffsetParent||t2,n=this.getDimensions,o=await n(e.floating);return{reference:Q3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ep(e){return We(e).direction==="rtl"}var po={convertOffsetParentRelativeRectToViewportRelativeRect:F3,getDocumentElement:pt,getClippingRect:Y3,getOffsetParent:t2,getElementRects:J3,getClientRects:W3,getDimensions:X3,getScale:_r,isElement:Fe,isRTL:ep};var r2=G1,n2=F1;var o2=(e,t,n)=>{let o=new Map,a=n??{},i={...po,...a.platform,_c:o};return $1(e,t,{...a,platform:i})};function a2(e){return tp(e)}function fi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function tp(e){for(let t=e;t;t=fi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=fi(e);t;t=fi(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||Or(n)||t.tagName==="BODY"))return t}return null}async function i2(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},o2(e,t,{strategy:o.strategy,platform:{...po,getOffsetParent:a=>po.getOffsetParent(a,a2)},middleware:[n2({crossAxis:!0}),r2({allowedPlacements:[o.placement]})]})}var Dr=x(k());var Ti=x(ne());var s2=x(ne(),1);var ui=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},rp=e=>({fromAttribute:t=>{if(t==null)return mn(e);try{return JSON.parse(t)}catch{return mn(e)}},toAttribute:t=>JSON.stringify(t)});function c2(e,t){return(0,s2.property)({type:Object,converter:rp(e),hasChanged:hn,...t??{}})}function np(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(!wr(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(!wr(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(!wr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function wr(e,t){try{return np(e,t)}catch{return!1}}function hn(e,t){return!wr(e,t)}function mn(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function mo(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 l2=x(ne(),1);var pi=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:hn,attribute:!1,...t};(0,l2.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 ho=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 or=x(ne(),1);var go=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 bo=x(G(),1);var yo=class extends bo.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(0,bo.adoptStyles)(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){ui(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 d2(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 zr=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},m2,f2=Symbol("constructorPrototype"),u2=Symbol("constructorName"),h2=Symbol("exportpartsDebouncer"),p2=Symbol("dynamicDependenciesLoaded"),Nr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Nr.eventName="exportparts-updated";var Xe=class extends yo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[m2]=new go(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[h2].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[u2]=this.constructor.name,this[f2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[u2]&&Object.setPrototypeOf(this,this[f2])}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[p2]||(n[p2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Nr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Nr.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 Nr)})}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=d2(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 f=b=>b!=null&&b.trim().length>0,m=t.filter(f).map(b=>b.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let b of(i=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let v=(s=(o=b.getAttribute("part"))===null||o===void 0?void 0:o.split(" "))!==null&&s!==void 0?s:[],R=(l=(a=b.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],w=[...v,...R].filter(f).map(_=>_.trim());for(let _ of w)h.add(_)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(b=>m.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};m2=h2;zr([(0,or.property)()],Xe.prototype,"exportpartsPrefix",void 0);zr([c2([])],Xe.prototype,"exportpartsPrefixes",void 0);zr([(0,or.property)({reflect:!0})],Xe.prototype,"exportparts",void 0);zr([(0,or.property)()],Xe.prototype,"customStylesheet",void 0);zr([(0,or.property)()],Xe.prototype,"elementToFocus",void 0);zr([(0,or.state)()],Xe.prototype,"useAdoptedStyleSheets",void 0);function xo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var gn=Symbol("internalReduxEventsUnsubscribers"),zt=Symbol("internalStoresUnsubscribers"),ar=Symbol("internalStores"),op=mo(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[ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ar].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ar].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[ar].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[ar].delete(l)}setupStores(){this.unsubscribeFromStores(),this[ar].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[zt].has(s.store):this[zt].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f,m;this[zt].set(s,l.subscribe(()=>this.updateFromStores())),this[gn].set(s,[]),xo(l)&&(!((f=l.deprecatedKeys)===null||f===void 0)&&f.length&&this.reduxConstructor.reduxProperties.forEach((h,g)=>{this.getStore(h.store)===l&&l.deprecatedKeys.includes(g)&&console.warn("Element",this,"is subscribed to deprecated key",g,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((h,g)=>{if(typeof this[g]=="function"&&(!h.store||l.name===h.store)){let b=v=>this[g](v);l.addEventListener(h.eventName,b),this[gn].get(s).push(()=>l.removeEventListener(h.eventName,b))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[zt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[zt].has(s)&&this[zt].get(s)(),this[zt].delete(s),(l=this[gn].get(s))===null||l===void 0||l.forEach(f=>f()),this[gn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=zt,n=ar,o=gn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),g2=class extends op(Xe){};function ue(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 ap=typeof Symbol=="function"&&Symbol.observable||"@@observable",y2=ap,mi=()=>Math.random().toString(36).substring(7).split("").join("."),ip={INIT:`@@redux/INIT${mi()}`,REPLACE:`@@redux/REPLACE${mi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${mi()}`},vo=ip;function So(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function hi(e,t,n){if(typeof e!="function")throw new Error(ue(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ue(1));return n(hi)(e,t)}let o=e,a=t,i=new Map,s=i,l=0,f=!1;function m(){s===i&&(s=new Map,i.forEach((_,T)=>{s.set(T,_)}))}function h(){if(f)throw new Error(ue(3));return a}function g(_){if(typeof _!="function")throw new Error(ue(4));if(f)throw new Error(ue(5));let T=!0;m();let U=l++;return s.set(U,_),function(){if(T){if(f)throw new Error(ue(6));T=!1,m(),s.delete(U),i=null}}}function b(_){if(!So(_))throw new Error(ue(7));if(typeof _.type>"u")throw new Error(ue(8));if(typeof _.type!="string")throw new Error(ue(17));if(f)throw new Error(ue(9));try{f=!0,a=o(a,_)}finally{f=!1}return(i=s).forEach(U=>{U()}),_}function v(_){if(typeof _!="function")throw new Error(ue(10));o=_,b({type:vo.REPLACE})}function R(){let _=g;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(ue(11));function U(){let I=T;I.next&&I.next(h())}return U(),{unsubscribe:_(U)}},[y2](){return this}}}return b({type:vo.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:v,[y2]:R}}function sp(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:vo.INIT})>"u")throw new Error(ue(12));if(typeof n(void 0,{type:vo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function gi(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(n[l]=e[l])}let o=Object.keys(n),a,i;try{sp(n)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<o.length;g++){let b=o[g],v=n[b],R=l[b],w=v(R,f);if(typeof w>"u"){let _=f&&f.type;throw new Error(ue(14))}h[b]=w,m=m||w!==R}return m=m||o.length!==Object.keys(l).length,m?h:l}}function yn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function b2(...e){return t=>(n,o)=>{let a=t(n,o),i=()=>{throw new Error(ue(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=yn(...l)(a.dispatch),{...a,dispatch:i}}}function x2(e){return So(e)&&"type"in e&&typeof e.type=="string"}var _2=Symbol.for("immer-nothing"),v2=Symbol.for("immer-draftable"),me=Symbol.for("immer-state");function Ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ee=Object,Tr=Ee.getPrototypeOf,Lo="constructor",zo="prototype",vi="configurable",Oo="enumerable",Eo="writable",bn="value",Qe=e=>!!e&&!!e[me];function Ae(e){return e?w2(e)||To(e)||!!e[v2]||!!e[Lo]?.[v2]||Io(e)||Cn(e):!1}var cp=Ee[zo][Lo].toString(),S2=new WeakMap;function w2(e){if(!e||!_i(e))return!1;let t=Tr(e);if(t===null||t===Ee[zo])return!0;let n=Ee.hasOwnProperty.call(t,Lo)&&t[Lo];if(n===Object)return!0;if(!Mr(n))return!1;let o=S2.get(n);return o===void 0&&(o=Function.toString.call(n),S2.set(n,o)),o===cp}function Mo(e,t,n=!0){Sn(e)===0?(n?Reflect.ownKeys(e):Ee.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((o,a)=>t(a,o,e))}function Sn(e){let t=e[me];return t?t.type_:To(e)?1:Io(e)?2:Cn(e)?3:0}var yi=(e,t,n=Sn(e))=>n===2?e.has(t):Ee[zo].hasOwnProperty.call(e,t),Si=(e,t,n=Sn(e))=>n===2?e.get(t):e[t],Ro=(e,t,n,o=Sn(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function lp(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var To=Array.isArray,Io=e=>e instanceof Map,Cn=e=>e instanceof Set,_i=e=>typeof e=="object",Mr=e=>typeof e=="function",bi=e=>typeof e=="boolean";function dp(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ht=e=>e.copy_||e.base_;var wi=e=>e.modified_?e.copy_:e.base_;function Ci(e,t){if(Io(e))return new Map(e);if(Cn(e))return new Set(e);if(To(e))return Array[zo].slice.call(e);let n=w2(e);if(t===!0||t==="class_only"&&!n){let o=Ee.getOwnPropertyDescriptors(e);delete o[me];let a=Reflect.ownKeys(o);for(let i=0;i<a.length;i++){let s=a[i],l=o[s];l[Eo]===!1&&(l[Eo]=!0,l[vi]=!0),(l.get||l.set)&&(o[s]={[vi]:!0,[Eo]:!0,[Oo]:l[Oo],[bn]:e[s]})}return Ee.create(Tr(e),o)}else{let o=Tr(e);if(o!==null&&n)return{...e};let a=Ee.create(o);return Ee.assign(a,e)}}function ko(e,t=!1){return Po(e)||Qe(e)||!Ae(e)||(Sn(e)>1&&Ee.defineProperties(e,{set:Co,add:Co,clear:Co,delete:Co}),Ee.freeze(e),t&&Mo(e,(n,o)=>{ko(o,!0)},!1)),e}function fp(){Ve(2)}var Co={[bn]:fp};function Po(e){return e===null||!_i(e)?!0:Ee.isFrozen(e)}var _o="MapSet",Ei="Patches",C2="ArrayMethods",N2={};function ir(e){let t=N2[e];return t||Ve(0,e),t}var E2=e=>!!N2[e];var xn,z2=()=>xn,up=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:E2(_o)?ir(_o):void 0,arrayMethodsPlugin_:E2(C2)?ir(C2):void 0});function A2(e,t){t&&(e.patchPlugin_=ir(Ei),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ai(e){Li(e),e.drafts_.forEach(pp),e.drafts_=null}function Li(e){e===xn&&(xn=e.parent_)}var L2=e=>xn=up(xn,e);function pp(e){let t=e[me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function O2(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[me].modified_&&(Ai(t),Ve(4)),Ae(e)&&(e=R2(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[me].base_,e,t)}else e=R2(t,n);return mp(t,e,!0),Ai(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_2?e:void 0}function R2(e,t){if(Po(t))return t;let n=t[me];if(!n)return wo(t,e.handledSet_,e);if(!Do(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);I2(n,e)}return n.copy_}function mp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ko(t,n)}function M2(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Do=(e,t)=>e.scope_===t,hp=[];function T2(e,t,n,o){let a=ht(e),i=e.type_;if(o!==void 0&&Si(a,o,i)===t){Ro(a,o,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Mo(a,(f,m)=>{if(Qe(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??hp;for(let l of s)Ro(a,l,n,i)}function gp(e,t,n){e.callbacks_.push(function(a){let i=t;if(!i||!Do(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=wi(i);T2(e,i.draft_??i,s,n),I2(i,a)})}function I2(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let a=o.getPath(e);a&&o.generatePatches_(e,a,t)}M2(e)}}function yp(e,t,n){let{scope_:o}=e;if(Qe(n)){let a=n[me];Do(a,o)&&a.callbacks_.push(function(){Ao(e);let s=wi(a);T2(e,n,s,t)})}else Ae(n)&&e.callbacks_.push(function(){let i=ht(e);e.type_===3?i.has(n)&&wo(n,o.handledSet_,o):Si(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&wo(Si(e.copy_,t,e.type_),o.handledSet_,o)})}function wo(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Qe(e)||t.has(e)||!Ae(e)||Po(e)||(t.add(e),Mo(e,(o,a)=>{if(Qe(a)){let i=a[me];if(Do(i,n)){let s=wi(i);Ro(e,o,s,e.type_),M2(i)}}else Ae(a)&&wo(a,t,n)})),e}function bp(e,t){let n=To(e),o={type_:n?1:0,scope_:t?t.scope_:z2(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=o,i=No;n&&(a=[o],i=vn);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,[l,o]}var No={get(e,t){if(t===me)return e;let n=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=ht(e);if(!yi(a,t,e.type_))return vp(e,a,t);let i=a[t];if(e.finalized_||!Ae(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&dp(t))return i;if(i===xi(e.base_,t)||xp(e,t,i)){Ao(e);let s=e.type_===1?+t:t,l=Ri(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in ht(e)},ownKeys(e){return Reflect.ownKeys(ht(e))},set(e,t,n){let o=k2(ht(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){let a=xi(ht(e),t),i=a?.[me];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(lp(n,a)&&(n!==void 0||yi(e.base_,t,e.type_)))return!0;Ao(e),Oi(e)}return e.copy_[t]===n&&(n!==void 0||yi(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),yp(e,t,n)),!0},deleteProperty(e,t){return Ao(e),xi(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Oi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=ht(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[Eo]:!0,[vi]:e.type_!==1||t!=="length",[Oo]:o[Oo],[bn]:n[t]}},defineProperty(){Ve(11)},getPrototypeOf(e){return Tr(e.base_)},setPrototypeOf(){Ve(12)}},vn={};for(let e in No){let t=No[e];vn[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}vn.deleteProperty=function(e,t){return vn.set.call(this,e,t,void 0)};vn.set=function(e,t,n){return No.set.call(this,e[0],t,n,e[0])};function xi(e,t){let n=e[me];return(n?ht(n):e)[t]}function xp(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!Ae(n)||n[me]?!1:e.baseRefs_.has(n)}function vp(e,t,n){let o=k2(t,n);return o?bn in o?o[bn]:o.get?.call(e.draft_):void 0}function k2(e,t){if(!(t in e))return;let n=Tr(e);for(;n;){let o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Tr(n)}}function Oi(e){e.modified_||(e.modified_=!0,e.parent_&&Oi(e.parent_))}function Ao(e){e.copy_||(e.assigned_=new Map,e.copy_=Ci(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sp=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(Mr(t)&&!Mr(n)){let i=n;n=t;let s=this;return function(f=i,...m){return s.produce(f,h=>n.call(this,h,...m))}}Mr(n)||Ve(6),o!==void 0&&!Mr(o)&&Ve(7);let a;if(Ae(t)){let i=L2(this),s=Ri(i,t,void 0),l=!0;try{a=n(s),l=!1}finally{l?Ai(i):Li(i)}return A2(i,o),O2(a,i)}else if(!t||!_i(t)){if(a=n(t),a===void 0&&(a=t),a===_2&&(a=void 0),this.autoFreeze_&&ko(a,!0),o){let i=[],s=[];ir(Ei).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),o(i,s)}return a}else Ve(1,t)},this.produceWithPatches=(t,n)=>{if(Mr(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let o,a;return[this.produce(t,n,(s,l)=>{o=s,a=l}),o,a]},bi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),bi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),bi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ae(e)||Ve(8),Qe(e)&&(e=P2(e));let t=L2(this),n=Ri(t,e,void 0);return n[me].isManual_=!0,Li(t),n}finishDraft(e,t){let n=e&&e[me];(!n||!n.isManual_)&&Ve(9);let{scope_:o}=n;return A2(o,t),O2(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));let o=ir(Ei).applyPatches_;return Qe(e)?o(e,t):this.produce(e,a=>o(a,t))}};function Ri(e,t,n,o){let[a,i]=Io(t)?ir(_o).proxyMap_(t,n):Cn(t)?ir(_o).proxySet_(t,n):bp(t,n);return(n?.scope_??z2()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?gp(n,i,o):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function P2(e){return Qe(e)||Ve(10,e),D2(e)}function D2(e){if(!Ae(e)||Po(e))return e;let t=e[me],n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ci(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Ci(e,!0);let a=n;return Cn(n)&&(n=new Set),Mo(a,(i,s)=>{Ro(n,i,D2(s))},o),t&&(t.finalized_=!1),n}var Cp=globalThis.Iterator,sy=typeof Cp?.from=="function";var Ep=new Sp,Ni=Ep.produce;function U2(e){return({dispatch:n,getState:o})=>a=>i=>typeof i=="function"?i(n,o,e):a(i)}var B2=U2(),H2=U2;var Ap=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yn:yn.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Lp=e=>e&&typeof e.match=="function";function Mt(e,t){function n(...o){if(t){let a=t(...o);if(!a)throw new Error(Je(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:o[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=o=>x2(o)&&o.type===e,n}var V2=class En extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,En.prototype)}static get[Symbol.species](){return En}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new En(...t[0].concat(this)):new En(...t.concat(this))}};function $2(e){return Ae(e)?Ni(e,()=>{}):e}function Uo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Op(e){return typeof e=="boolean"}var Rp=()=>function(t){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new V2;return n&&(Op(n)?s.push(B2):s.push(H2(n.extraArgument))),s},_p="RTK_autoBatch";var G2=e=>t=>{setTimeout(t,e)},wp=(e,t)=>n=>{let o=!1,a,i,s=()=>{o||(o=!0,cancelAnimationFrame(a),clearTimeout(i),n())};a=e(s),i=setTimeout(s,t)},Np=(e={type:"raf"})=>t=>(...n)=>{let o=t(...n),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?wp(window.requestAnimationFrame,100):G2(10):e.type==="callback"?e.queueNotification:G2(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},o,{subscribe(h){let g=()=>a&&h(),b=o.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[_p],i=!a,i&&(s||(s=!0,f(m))),o.dispatch(h)}finally{a=!0}}})},zp=e=>function(n){let{autoBatch:o=!0}=n??{},a=new V2(e);return o&&a.push(Np(typeof o=="object"?o:void 0)),a};function j2(e){let t=Rp(),{reducer:n=void 0,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof n=="function")f=n;else if(So(n))f=gi(n);else throw new Error(Je(1));let m;typeof o=="function"?m=o(t):m=t();let h=yn;a&&(h=Ap({trace:!1,...typeof a=="object"&&a}));let g=b2(...m),b=zp(g),v=typeof l=="function"?l(b):b(),R=h(...v);return hi(f,s,R)}function K2(e){let t={},n=[],o,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(Je(28));if(l in t)throw new Error(Je(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return o=i,a}};return e(a),[t,n,o]}function Mp(e){return typeof e=="function"}function Tp(e,t){let[n,o,a]=K2(t),i;if(Mp(e))i=()=>$2(e());else{let l=$2(e);i=()=>l}function s(l=i(),f){let m=[n[f.type],...o.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(Qe(h)){let b=g(h,f);return b===void 0?h:b}else{if(Ae(h))return Ni(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw new Error(Je(9))}return b}}return h},l)}return s.getInitialState=i,s}var Ip=(e,t)=>Lp(e)?e.match(t):e(t);function kp(...e){return t=>e.some(n=>Ip(n,t))}var Pp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Dp=(e=21)=>{let t="",n=e;for(;n--;)t+=Pp[Math.random()*64|0];return t},Up=["name","message","stack","code"],zi=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},F2=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Bp=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of Up)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},W2="External signal was aborted",Hp=(()=>{function e(t,n,o){let a=Mt(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=Mt(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=Mt(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(o&&o.serializeError||Bp)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:g!==void 0,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let v=o?.idGenerator?o.idGenerator(f):Dp(),R=new AbortController,w,_;function T(N){_=N,R.abort()}m&&(m.aborted?T(W2):m.addEventListener("abort",()=>T(W2),{once:!0}));let U=(async function(){let N;try{let I=o?.condition?.(f,{getState:g,extra:b});if(Gp(I)&&(I=await I),I===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(R.signal.aborted)throw{name:"AbortError",message:_||"Aborted"};let H=new Promise(($,J)=>{w=()=>{J({name:"AbortError",message:_||"Aborted"})},R.signal.addEventListener("abort",w,{once:!0})});h(i(v,f,o?.getPendingMeta?.({requestId:v,arg:f},{getState:g,extra:b}))),N=await Promise.race([H,Promise.resolve(n(f,{dispatch:h,getState:g,extra:b,requestId:v,signal:R.signal,abort:T,rejectWithValue:(($,J)=>new zi($,J)),fulfillWithValue:(($,J)=>new F2($,J))})).then($=>{if($ instanceof zi)throw $;return $ instanceof F2?a($.payload,v,f,$.meta):a($,v,f)})])}catch(I){N=I instanceof zi?s(null,v,f,I.payload,I.meta):s(I,v,f)}finally{w&&R.signal.removeEventListener("abort",w)}return o&&!o.dispatchConditionRejection&&s.match(N)&&N.meta.condition||h(N),N})();return Object.assign(U,{abort:T,requestId:v,arg:f,unwrap(){return U.then($p)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:kp(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function $p(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Z2=Symbol.for("rtk-slice-createasyncthunk"),hy={[Z2]:Hp};function Fp(e,t){return`${e}/${t}`}function Wp({creators:e}={}){let t=e?.asyncThunk?.[Z2];return function(o){let{name:a,reducerPath:i=a}=o;if(!a)throw new Error(Je(11));typeof process<"u";let s=(typeof o.reducers=="function"?o.reducers(jp()):o.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(N,I){let H=typeof N=="string"?N:N.type;if(!H)throw new Error(Je(12));if(H in f.sliceCaseReducersByType)throw new Error(Je(13));return f.sliceCaseReducersByType[H]=I,m},addMatcher(N,I){return f.sliceMatchers.push({matcher:N,reducer:I}),m},exposeAction(N,I){return f.actionCreators[N]=I,m},exposeCaseReducer(N,I){return f.sliceCaseReducersByName[N]=I,m}};l.forEach(N=>{let I=s[N],H={reducerName:N,type:Fp(a,N),createNotation:typeof o.reducers=="function"};Zp(I)?Yp(H,I,m,t):Kp(H,I,m)});function h(){let[N={},I=[],H=void 0]=typeof o.extraReducers=="function"?K2(o.extraReducers):[o.extraReducers],$={...N,...f.sliceCaseReducersByType};return Tp(o.initialState,J=>{for(let re in $)J.addCase(re,$[re]);for(let re of f.sliceMatchers)J.addMatcher(re.matcher,re.reducer);for(let re of I)J.addMatcher(re.matcher,re.reducer);H&&J.addDefaultCase(H)})}let g=N=>N,b=new Map,v=new WeakMap,R;function w(N,I){return R||(R=h()),R(N,I)}function _(){return R||(R=h()),R.getInitialState()}function T(N,I=!1){function H(J){let re=J[N];return typeof re>"u"&&I&&(re=Uo(v,H,_)),re}function $(J=g){return Uo(Uo(b,I,()=>new WeakMap),J,()=>{let re={};for(let[mr,_e]of Object.entries(o.selectors??{}))re[mr]=Vp(_e,J,()=>Uo(v,J,_),I);return re})}return{reducerPath:N,getSelectors:$,get selectors(){return $(H)},selectSlice:H}}let U={name:a,reducer:w,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:_,...T(i),injectInto(N,{reducerPath:I,...H}={}){let $=I??i;return N.inject({reducerPath:$,reducer:w},H),{...U,...T($,!0)}}};return U}}function Vp(e,t,n,o){function a(i,...s){let l=t(i);return typeof l>"u"&&o&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var q2=Wp();function jp(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Kp({type:e,reducerName:t,createNotation:n},o,a){let i,s;if("reducer"in o){if(n&&!qp(o))throw new Error(Je(17));i=o.reducer,s=o.prepare}else i=o;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Mt(e,s):Mt(e))}function Zp(e){return e._reducerDefinitionType==="asyncThunk"}function qp(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Yp({type:e,reducerName:t},n,o,a){if(!a)throw new Error(Je(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=n,g=a(e,i,h);o.exposeAction(t,g),s&&o.addCase(g.fulfilled,s),l&&o.addCase(g.pending,l),f&&o.addCase(g.rejected,f),m&&o.addMatcher(g.settled,m),o.exposeCaseReducer(t,{fulfilled:s||Bo,pending:l||Bo,rejected:f||Bo,settled:m||Bo})}function Bo(){}var Y2="listener",X2="completed",Q2="cancelled",gy=`task-${Q2}`,yy=`task-${X2}`,by=`${Y2}-${Q2}`,xy=`${Y2}-${X2}`;var{assign:J2}=Object;var Mi="listenerMiddleware";var Xp=J2(Mt(`${Mi}/add`),{withTypes:()=>Xp}),vy=Mt(`${Mi}/removeAll`),Qp=J2(Mt(`${Mi}/remove`),{withTypes:()=>Qp});function Je(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Jp=mo(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)}}}),Ho=class extends Jp(Object){};window.ftReduxStores||(window.ftReduxStores={});var e0=class e extends Ho{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(xo(i))return i;if(a==null)return;let s=q2({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=j2({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=mn(s.getInitialState());for(let g of m.keeping)h[g]=(f??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...m.overwrites};return s.reducer(f,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus,a.deprecatedKeys)}constructor(t,n,o,a){super(),this.reduxSlice=t,this.reduxStore=n,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new ho,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,f)=>{let m=l,h=s[m];return h?(...g)=>{let b=h(...g.map(i));return this.reduxStore.dispatch(b),b}:g=>{let b=m,v=this.getState()[b];wr(v,g)||this.setState({[b]:i(g)})}}}),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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var $o=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),f=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`: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 Go=x(k()),e6="ft-app-info",sr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};sr.eventName="authentication-change";var An=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};An.eventName="ui-locale-changed";var t6={session:(e,t)=>{(0,Go.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>B.dispatchEvent(new sr(t.payload)),0))}},B=Go.FtReduxStore.get({name:e6,reducers:t6,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var t0=x(k()),Fo=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},Yy=(0,t0.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(B)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>$o.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Fo([(0,Ti.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Fo([(0,Ti.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Fo([pi({store:B.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),Fo([pi({store:B.name})],t.prototype,"uiLocale",void 0),t});var r0;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(r0||(r0={}));var n0;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(n0||(n0={}));var o0;(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"})(o0||(o0={}));var a0;(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"})(a0||(a0={}));var i0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(i0||(i0={}));var s0;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(s0||(s0={}));var c0;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(c0||(c0={}));var l0;(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"})(l0||(l0={}));var d0;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(d0||(d0={}));var f0;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(f0||(f0={}));var u0;(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",e.DOC_DIFF="DOC_DIFF"})(u0||(u0={}));var p0;(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"})(p0||(p0={}));var m0;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(m0||(m0={}));var h0;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(h0||(h0={}));var g0;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(g0||(g0={}));var y0;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(y0||(y0={}));var b0;(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"})(b0||(b0={}));var x0;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(x0||(x0={}));var v0;(function(e){e.ASC="ASC",e.DESC="DESC"})(v0||(v0={}));var S0;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(S0||(S0={}));var C0;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(C0||(C0={}));var E0;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(E0||(E0={}));var A0;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(A0||(A0={}));var L0;(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"})(L0||(L0={}));var O0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(O0||(O0={}));var R0;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(R0||(R0={}));var _0;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_0||(_0={}));var w0;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(w0||(w0={}));var ie;(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"})(ie||(ie={}));var Me;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Me||(Me={}));var N0;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(N0||(N0={}));var z0;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(z0||(z0={}));var M0;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(M0||(M0={}));var T0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(T0||(T0={}));var I0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(I0||(I0={}));var k0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(k0||(k0={}));var P0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(P0||(P0={}));var D0;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(D0||(D0={}));var U0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(U0||(U0={}));var B0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(B0||(B0={}));var H0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(H0||(H0={}));var $0;(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"})($0||($0={}));var G0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(G0||(G0={}));var r6={[ie.PERSONAL_BOOK_SHARE_USER]:[ie.PERSONAL_BOOK_USER],[ie.HTML_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.PDF_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.KHUB_ADMIN]:[ie.CONTENT_PUBLISHER],[ie.ADMIN]:[ie.KHUB_ADMIN,ie.USERS_ADMIN,ie.PORTAL_ADMIN,ie.BEHAVIOR_DATA_USER],[ie.GENERATIVE_AI_EXPORT_USER]:[ie.GENERATIVE_AI_USER]};function F0(e,t){return e===t||(r6[e]??[]).some(n=>F0(n,t))}function Ii(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=>F0(o,t))}function W0(e,...t){return e==null?!1:t.some(n=>Ii(e,n))}var Zo=x(k());var ki=x(k());var cr=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=B.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=B.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var Ir=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:cr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):cr.await()}};var Le=class extends Ir{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],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new ki.CacheRegistry,this.cache=t?a.commonCache:new ki.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 Wo=class extends Le{async listMySearches(){let{session:t}=B.getState();return Ii(t,ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Vo=class extends Le{async listMyBookmarks(){let t=B.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var jo=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=B.getState().session;return!!t?.sessionAuthenticated}};var Ko=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=B.getState().session;return!!t?.sessionAuthenticated}};var n6="ft-user-assets",o6={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(Me).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;Di(e,n,[...Pi(e,n),a]),V0(e,n,1,o),j0(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;Di(e,n,Pi(e,n).map(a=>a.id===o.id?o:a)),j0(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;Di(e,n,Pi(e,n).filter(i=>i.id!==a)),V0(e,n,-1,o)}},K0={[Me.SEARCHES]:"savedSearches",[Me.BOOKMARKS]:"bookmarks",[Me.BOOKS]:void 0,[Me.COLLECTIONS]:void 0},Pi=(e,t)=>{var n;let o=K0[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},Di=(e,t,n)=>{let o=K0[t];o&&(e[o]=n)},V0=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===Me.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},j0=(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)},ge=Zo.FtReduxStore.get({name:n6,reducers:o6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Me).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ui=class{constructor(t=new jo,n=new Ko){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vo,this.savedSearchesService=new Wo,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=B.getState();(0,Zo.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(),ge.actions.clearAssetCount(),ge.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ge.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ge.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ge.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ge.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&ge.getState().assetCounts.allAsset[t]!==n.count&&ge.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&ge.getState().assetCounts.bookmarkByMap[t]!==n.count&&ge.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(ge.getState().assetCounts.bookmarkByMap).length!==0;t===Me.BOOKMARKS&&n&&ge.actions.clearBookmarkCountByMap(),ge.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;ge.actions.bookmarks(n)}}},a6=new Ui;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=a6);var Bi=class{addCommand(t,n=!1){B.commands.add(t,n)}consumeCommand(t){return B.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Bi;var Te=x(k());var Z0,kr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},i6=Symbol("clearAfterUnitTest"),qo=class extends(0,Te.withEventBus)(Le){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Z0]=()=>{this.defaultMessages={},this.cache=new Te.CacheRegistry,this.listeners={}},this.currentUiLocale=B.getState().uiLocale,B.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=B.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,Te.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 Te.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 Te.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 kr({loadedContexts:t})),this.dispatchEvent(new kr({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new kr({loadedContexts:[t]})),this.dispatchEvent(new kr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Te.delay)(0).then(()=>o()).catch(()=>null)))}};Z0=i6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends qo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends qo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ln=window.FluidTopicsI18nService,Hi=window.FluidTopicsCustomI18nService;var q0=x(k()),$i=class{highlightHtml(t,n,o){(0,q0.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new $i;var Y0=x(k());var Gi=class{isDate(t){var n,o,a,i;return(i=(o=((a=(n=B.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||o===void 0?void 0:o.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return Y0.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:B.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 Gi;var X0=x(k());var On=class{static get(t,n,{baseUrl:o,localesConfiguration:a,availableContentLocales:i}=B.getState()){var s;if(!n||i.length>0&&!i.some(l=>l.lang===n)){let l=a?.defaultLocales.defaultContentLocale;n=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new X0.SearchPlaceConverter(o,t??20,a?.allLanguagesAllowed,n,i)}};var Fi=class{urlToSearchRequest(t){return On.get().parse(t)}searchRequestToUrl(t){return On.get().serialize(t)}};window.FluidTopicsUrlService=new Fi;var gt=x(k());var lr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};lr.eventName="before-location-change";var dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};dr.eventName="change";var Wi=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))}},Q0=new Wi;var Yo=class e extends gt.WithEventBus{static build(){return new e(window.history,Q0,()=>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,gt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new dr(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let f=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new lr(f);this.dispatchEvent(m);let h=n(),g={...h===this.currentIndex?this.currentState:void 0,...i,index:h,href:m.detail.nextLocation.href};o.apply(a,[g,s,g.href]),this.setCurrentState(g,!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)}addBeforeLocationChangeListener(t){this.addEventListener(lr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(lr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(dr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(dr.eventName,t)}currentItem(){return(0,gt.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,gt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,gt.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,gt.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=Yo.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),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var J0=x(G());var ed=J0.css`
2083
+ `;var I1=["top","right","bottom","left"],T1=["start","end"],ai=I1.reduce((e,t)=>e.concat(t,t+"-"+T1[0],t+"-"+T1[1]),[]),sn=Math.min,_t=Math.max,cn=Math.round;var Ye=e=>({x:e,y:e}),k3={left:"right",right:"left",bottom:"top",top:"bottom"};function k1(e,t,n){return _t(e,sn(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function ln(e){return e.split("-")[0]}function wt(e){return e.split("-")[1]}function ii(e){return e==="x"?"y":"x"}function si(e){return e==="y"?"height":"width"}function io(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function ci(e){return ii(io(e))}function P1(e,t,n){n===void 0&&(n=!1);let o=wt(e),a=ci(e),i=si(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=oi(s)),[s,oi(s)]}function D1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function oi(e){let t=ln(e);return k3[t]+e.slice(t.length)}function P3(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 U1(e){return typeof e!="number"?P3(e):{top:e,right:e,bottom:e,left:e}}function tr(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 B1(e,t,n){let{reference:o,floating:a}=e,i=io(t),s=ci(t),l=si(s),f=ln(t),m=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,v;switch(f){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 R=wt(t);return R&&(v[s]+=b*(R==="end"?1:-1)*(n&&m?-1:1)),v}async function H1(e,t){var n;t===void 0&&(t={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:b=!1,padding:v=0}=ao(t,e),R=U1(v),_=l[b?g==="floating"?"reference":"floating":g],T=tr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),U=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,N=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),I=await(i.isElement==null?void 0:i.isElement(N))&&await(i.getScale==null?void 0:i.getScale(N))||{x:1,y:1},H=tr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:U,offsetParent:N,strategy:f}):U);return{top:(T.top-H.top+R.top)/I.y,bottom:(H.bottom-T.bottom+R.bottom)/I.y,left:(T.left-H.left+R.left)/I.x,right:(H.right-T.right+R.right)/I.x}}var D3=50,$1=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:H1},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=B1(m,o,f),b=o,v=0,R={};for(let w=0;w<i.length;w++){let _=i[w];if(!_)continue;let{name:T,fn:U}=_,{x:N,y:I,data:H,reset:$}=await U({x:h,y:g,initialPlacement:o,placement:b,strategy:a,middlewareData:R,rects:m,platform:l,elements:{reference:e,floating:t}});h=N??h,g=I??g,R[T]={...R[T],...H},$&&v<D3&&(v++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(m=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):$.rects),{x:h,y:g}=B1(m,b,f)),w=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:R}};function U3(e,t,n){return(e?[...n.filter(a=>wt(a)===e),...n.filter(a=>wt(a)!==e)]:n.filter(a=>ln(a)===a)).filter(a=>e?wt(a)===e||(t?D1(a)!==a:!1):!0)}var G1=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:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=ai,autoAlignment:v=!0,...R}=ao(e,t),w=g!==void 0||b===ai?U3(g||null,v,b):b,_=((n=s.autoPlacement)==null?void 0:n.index)||0,T=w[_];if(T==null)return{};if(l!==T)return{reset:{placement:w[0]}};let U=await f.detectOverflow(t,R),N=P1(T,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),I=[U[ln(T)],U[N[0]],U[N[1]]],H=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:T,overflows:I}],$=w[_+1];if($)return{data:{index:_+1,overflows:H},reset:{placement:$}};let J=H.map(_e=>{let Fr=wt(_e.placement);return[_e.placement,Fr&&h?_e.overflows.slice(0,2).reduce((Gd,Fd)=>Gd+Fd,0):_e.overflows[0],_e.overflows]}).sort((_e,Fr)=>_e[1]-Fr[1]),mr=((a=J.filter(_e=>_e[2].slice(0,wt(_e[0])?2:3).every(Fr=>Fr<=0))[0])==null?void 0:a[0])||J[0][0];return mr!==l?{data:{index:_+1,overflows:H},reset:{placement:mr}}:{}}}};var F1=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:f={fn:U=>{let{x:N,y:I}=U;return{x:N,y:I}}},...m}=ao(e,t),h={x:n,y:o},g=await i.detectOverflow(t,m),b=io(a),v=ii(b),R=h[v],w=h[b],_=(U,N)=>k1(N+g[U==="y"?"top":"left"],N,N-g[U==="y"?"bottom":"right"]);s&&(R=_(v,R)),l&&(w=_(b,w));let T=f.fn({...t,[v]:R,[b]:w});return{...T,data:{x:T.x-n,y:T.y-o,enabled:{[v]:s,[b]:l}}}}}};function co(){return typeof window<"u"}function nr(e){return V1(e)?(e.nodeName||"").toLowerCase():"#document"}function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pt(e){var t;return(t=(V1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function V1(e){return co()?e instanceof Node||e instanceof xe(e).Node:!1}function Fe(e){return co()?e instanceof Element||e instanceof xe(e).Element:!1}function mt(e){return co()?e instanceof HTMLElement||e instanceof xe(e).HTMLElement:!1}function W1(e){return!co()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}function dn(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function j1(e){return/^(table|td|th)$/.test(nr(e))}function fn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var B3=/transform|translate|scale|rotate|perspective|filter/,H3=/paint|layout|strict|content/,rr=e=>!!e&&e!=="none",li;function Or(e){let t=Fe(e)?We(e):e;return rr(t.transform)||rr(t.translate)||rr(t.scale)||rr(t.rotate)||rr(t.perspective)||!lo()&&(rr(t.backdropFilter)||rr(t.filter))||B3.test(t.willChange||"")||H3.test(t.contain||"")}function K1(e){let t=Nt(e);for(;mt(t)&&!Rr(t);){if(Or(t))return t;if(fn(t))return null;t=Nt(t)}return null}function lo(){return li==null&&(li=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),li}function Rr(e){return/^(html|body|#document)$/.test(nr(e))}function We(e){return xe(e).getComputedStyle(e)}function un(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nt(e){if(nr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||W1(e)&&e.host||pt(e);return W1(t)?t.host:t}function Z1(e){let t=Nt(e);return Rr(t)?(e.ownerDocument||e).body:mt(t)&&dn(t)?t:Z1(t)}function so(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=Z1(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=xe(a);if(i){let l=fo(s);return t.concat(s,s.visualViewport||[],dn(a)?a:[],l&&n?so(l):[])}else return t.concat(a,so(a,[],n))}function fo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X1(e){let t=We(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=mt(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=cn(n)!==i||cn(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function Q1(e){return Fe(e)?e:e.contextElement}function _r(e){let t=Q1(e);if(!mt(t))return Ye(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=X1(t),s=(i?cn(n.width):n.width)/o,l=(i?cn(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var $3=Ye(0);function J1(e){let t=xe(e);return!lo()||!t.visualViewport?$3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function G3(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xe(e)}function pn(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=Q1(e),s=Ye(1);t&&(o?Fe(o)&&(s=_r(o)):s=_r(e));let l=G3(i,n,o)?J1(i):Ye(0),f=(a.left+l.x)/s.x,m=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i&&o){let b=xe(i),v=Fe(o)?xe(o):o,R=b,w=fo(R);for(;w&&v!==R;){let _=_r(w),T=w.getBoundingClientRect(),U=We(w),N=T.left+(w.clientLeft+parseFloat(U.paddingLeft))*_.x,I=T.top+(w.clientTop+parseFloat(U.paddingTop))*_.y;f*=_.x,m*=_.y,h*=_.x,g*=_.y,f+=N,m+=I,R=xe(w),w=fo(R)}}return tr({width:h,height:g,x:f,y:m})}function uo(e,t){let n=un(e).scrollLeft;return t?t.left+n:pn(pt(e)).left+n}function e2(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-uo(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function F3(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=pt(o),l=t?fn(t.floating):!1;if(o===s||l&&i)return n;let f={scrollLeft:0,scrollTop:0},m=Ye(1),h=Ye(0),g=mt(o);if((g||!i)&&((nr(o)!=="body"||dn(s))&&(f=un(o)),g)){let v=pn(o);m=_r(o),h.x=v.x+o.clientLeft,h.y=v.y+o.clientTop}let b=s&&!g&&!i?e2(s,f):Ye(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:n.y*m.y-f.scrollTop*m.y+h.y+b.y}}function W3(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function V3(e){let t=un(e),n=e.ownerDocument.body,o=_t(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=_t(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+uo(e),s=-t.scrollTop;return We(n).direction==="rtl"&&(i+=_t(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var j3=25;function K3(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=xe(e),i=pt(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!lo()||t==="fixed";o?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(uo(i)<=0){let b=i.ownerDocument,v=b.body,R=getComputedStyle(v),w=b.compatMode==="CSS1Compat"&&parseFloat(R.marginLeft)+parseFloat(R.marginRight)||0,_=Math.abs(i.clientWidth-v.clientWidth-w),T=getComputedStyle(i).scrollbarGutter==="stable both-edges"?_/2:_;T<=j3&&(l-=T)}return{width:l,height:f,x:m,y:h}}function Z3(e,t){let n=pn(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=_r(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=o*i.y;return{width:s,height:l,x:f,y:m}}function q1(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=K3(e,n,t);else if(t==="document")o=V3(pt(e));else if(Fe(t))o=Z3(t,n);else{let a=J1(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return tr(o)}function q3(e,t){let n=t.get(e);if(n)return n;let o=so(e,[],!1).filter(l=>Fe(l)&&nr(l)!=="body"),a=null,i=We(e).position==="fixed",s=i?Nt(e):e;for(;Fe(s)&&!Rr(s);){let l=We(s),f=Or(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?o=o.filter(g=>g!==s):a=l,s=Nt(s)}return t.set(e,o),o}function Y3(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?fn(t)?[]:q3(t,this._c):[].concat(n),o],l=q1(t,s[0],a),f=l.top,m=l.right,h=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let v=q1(t,s[b],a);f=_t(v.top,f),m=sn(v.right,m),h=sn(v.bottom,h),g=_t(v.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function X3(e){let{width:t,height:n}=X1(e);return{width:t,height:n}}function Q3(e,t,n){let o=mt(t),a=pt(t),i=n==="fixed",s=pn(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=Ye(0);if((o||!i)&&((nr(t)!=="body"||dn(a))&&(l=un(t)),o)){let b=pn(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!o&&a&&(f.x=uo(a));let m=a&&!o&&!i?e2(a,l):Ye(0),h=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:h,y:g,width:s.width,height:s.height}}function di(e){return We(e).position==="static"}function Y1(e,t){if(!mt(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return pt(e)===n&&(n=n.ownerDocument.body),n}function t2(e,t){let n=xe(e);if(fn(e))return n;if(!mt(e)){let a=Nt(e);for(;a&&!Rr(a);){if(Fe(a)&&!di(a))return a;a=Nt(a)}return n}let o=Y1(e,t);for(;o&&j1(o)&&di(o);)o=Y1(o,t);return o&&Rr(o)&&di(o)&&!Or(o)?n:o||K1(e)||n}var J3=async function(e){let t=this.getOffsetParent||t2,n=this.getDimensions,o=await n(e.floating);return{reference:Q3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ep(e){return We(e).direction==="rtl"}var po={convertOffsetParentRelativeRectToViewportRelativeRect:F3,getDocumentElement:pt,getClippingRect:Y3,getOffsetParent:t2,getElementRects:J3,getClientRects:W3,getDimensions:X3,getScale:_r,isElement:Fe,isRTL:ep};var r2=G1,n2=F1;var o2=(e,t,n)=>{let o=new Map,a=n??{},i={...po,...a.platform,_c:o};return $1(e,t,{...a,platform:i})};function a2(e){return tp(e)}function fi(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function tp(e){for(let t=e;t;t=fi(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=fi(e);t;t=fi(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||Or(n)||t.tagName==="BODY"))return t}return null}async function i2(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},o2(e,t,{strategy:o.strategy,platform:{...po,getOffsetParent:a=>po.getOffsetParent(a,a2)},middleware:[n2({crossAxis:!0}),r2({allowedPlacements:[o.placement]})]})}var Dr=x(k());var Ti=x(ne());var s2=x(ne(),1);var ui=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},rp=e=>({fromAttribute:t=>{if(t==null)return mn(e);try{return JSON.parse(t)}catch{return mn(e)}},toAttribute:t=>JSON.stringify(t)});function c2(e,t){return(0,s2.property)({type:Object,converter:rp(e),hasChanged:hn,...t??{}})}function np(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(!wr(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(!wr(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(!wr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function wr(e,t){try{return np(e,t)}catch{return!1}}function hn(e,t){return!wr(e,t)}function mn(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function mo(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 l2=x(ne(),1);var pi=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:hn,attribute:!1,...t};(0,l2.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 ho=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 or=x(ne(),1);var go=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 bo=x(G(),1);var yo=class extends bo.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(0,bo.adoptStyles)(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){ui(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 d2(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 zr=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},m2,f2=Symbol("constructorPrototype"),u2=Symbol("constructorName"),h2=Symbol("exportpartsDebouncer"),p2=Symbol("dynamicDependenciesLoaded"),Nr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Nr.eventName="exportparts-updated";var Xe=class extends yo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[m2]=new go(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[h2].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[u2]=this.constructor.name,this[f2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[u2]&&Object.setPrototypeOf(this,this[f2])}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[p2]||(n[p2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Nr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Nr.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 Nr)})}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=d2(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 f=b=>b!=null&&b.trim().length>0,m=t.filter(f).map(b=>b.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let b of(i=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let v=(s=(o=b.getAttribute("part"))===null||o===void 0?void 0:o.split(" "))!==null&&s!==void 0?s:[],R=(l=(a=b.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(_=>_.split(":")[1]))!==null&&l!==void 0?l:[],w=[...v,...R].filter(f).map(_=>_.trim());for(let _ of w)h.add(_)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(b=>m.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};m2=h2;zr([(0,or.property)()],Xe.prototype,"exportpartsPrefix",void 0);zr([c2([])],Xe.prototype,"exportpartsPrefixes",void 0);zr([(0,or.property)({reflect:!0})],Xe.prototype,"exportparts",void 0);zr([(0,or.property)()],Xe.prototype,"customStylesheet",void 0);zr([(0,or.property)()],Xe.prototype,"elementToFocus",void 0);zr([(0,or.state)()],Xe.prototype,"useAdoptedStyleSheets",void 0);function xo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var gn=Symbol("internalReduxEventsUnsubscribers"),zt=Symbol("internalStoresUnsubscribers"),ar=Symbol("internalStores"),op=mo(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[ar].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ar].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ar].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[ar].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[ar].delete(l)}setupStores(){this.unsubscribeFromStores(),this[ar].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[zt].has(s.store):this[zt].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f,m;this[zt].set(s,l.subscribe(()=>this.updateFromStores())),this[gn].set(s,[]),xo(l)&&(!((f=l.deprecatedKeys)===null||f===void 0)&&f.length&&this.reduxConstructor.reduxProperties.forEach((h,g)=>{this.getStore(h.store)===l&&l.deprecatedKeys.includes(g)&&console.warn("Element",this,"is subscribed to deprecated key",g,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((h,g)=>{if(typeof this[g]=="function"&&(!h.store||l.name===h.store)){let b=v=>this[g](v);l.addEventListener(h.eventName,b),this[gn].get(s).push(()=>l.removeEventListener(h.eventName,b))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[zt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[zt].has(s)&&this[zt].get(s)(),this[zt].delete(s),(l=this[gn].get(s))===null||l===void 0||l.forEach(f=>f()),this[gn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=zt,n=ar,o=gn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),g2=class extends op(Xe){};function ue(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 ap=typeof Symbol=="function"&&Symbol.observable||"@@observable",y2=ap,mi=()=>Math.random().toString(36).substring(7).split("").join("."),ip={INIT:`@@redux/INIT${mi()}`,REPLACE:`@@redux/REPLACE${mi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${mi()}`},vo=ip;function So(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function hi(e,t,n){if(typeof e!="function")throw new Error(ue(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ue(1));return n(hi)(e,t)}let o=e,a=t,i=new Map,s=i,l=0,f=!1;function m(){s===i&&(s=new Map,i.forEach((_,T)=>{s.set(T,_)}))}function h(){if(f)throw new Error(ue(3));return a}function g(_){if(typeof _!="function")throw new Error(ue(4));if(f)throw new Error(ue(5));let T=!0;m();let U=l++;return s.set(U,_),function(){if(T){if(f)throw new Error(ue(6));T=!1,m(),s.delete(U),i=null}}}function b(_){if(!So(_))throw new Error(ue(7));if(typeof _.type>"u")throw new Error(ue(8));if(typeof _.type!="string")throw new Error(ue(17));if(f)throw new Error(ue(9));try{f=!0,a=o(a,_)}finally{f=!1}return(i=s).forEach(U=>{U()}),_}function v(_){if(typeof _!="function")throw new Error(ue(10));o=_,b({type:vo.REPLACE})}function R(){let _=g;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(ue(11));function U(){let I=T;I.next&&I.next(h())}return U(),{unsubscribe:_(U)}},[y2](){return this}}}return b({type:vo.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:v,[y2]:R}}function sp(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:vo.INIT})>"u")throw new Error(ue(12));if(typeof n(void 0,{type:vo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function gi(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(n[l]=e[l])}let o=Object.keys(n),a,i;try{sp(n)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<o.length;g++){let b=o[g],v=n[b],R=l[b],w=v(R,f);if(typeof w>"u"){let _=f&&f.type;throw new Error(ue(14))}h[b]=w,m=m||w!==R}return m=m||o.length!==Object.keys(l).length,m?h:l}}function yn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function b2(...e){return t=>(n,o)=>{let a=t(n,o),i=()=>{throw new Error(ue(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=yn(...l)(a.dispatch),{...a,dispatch:i}}}function x2(e){return So(e)&&"type"in e&&typeof e.type=="string"}var _2=Symbol.for("immer-nothing"),v2=Symbol.for("immer-draftable"),me=Symbol.for("immer-state");function Ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ee=Object,Tr=Ee.getPrototypeOf,Lo="constructor",zo="prototype",vi="configurable",Oo="enumerable",Eo="writable",bn="value",Qe=e=>!!e&&!!e[me];function Ae(e){return e?w2(e)||To(e)||!!e[v2]||!!e[Lo]?.[v2]||Io(e)||Cn(e):!1}var cp=Ee[zo][Lo].toString(),S2=new WeakMap;function w2(e){if(!e||!_i(e))return!1;let t=Tr(e);if(t===null||t===Ee[zo])return!0;let n=Ee.hasOwnProperty.call(t,Lo)&&t[Lo];if(n===Object)return!0;if(!Mr(n))return!1;let o=S2.get(n);return o===void 0&&(o=Function.toString.call(n),S2.set(n,o)),o===cp}function Mo(e,t,n=!0){Sn(e)===0?(n?Reflect.ownKeys(e):Ee.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((o,a)=>t(a,o,e))}function Sn(e){let t=e[me];return t?t.type_:To(e)?1:Io(e)?2:Cn(e)?3:0}var yi=(e,t,n=Sn(e))=>n===2?e.has(t):Ee[zo].hasOwnProperty.call(e,t),Si=(e,t,n=Sn(e))=>n===2?e.get(t):e[t],Ro=(e,t,n,o=Sn(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function lp(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var To=Array.isArray,Io=e=>e instanceof Map,Cn=e=>e instanceof Set,_i=e=>typeof e=="object",Mr=e=>typeof e=="function",bi=e=>typeof e=="boolean";function dp(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ht=e=>e.copy_||e.base_;var wi=e=>e.modified_?e.copy_:e.base_;function Ci(e,t){if(Io(e))return new Map(e);if(Cn(e))return new Set(e);if(To(e))return Array[zo].slice.call(e);let n=w2(e);if(t===!0||t==="class_only"&&!n){let o=Ee.getOwnPropertyDescriptors(e);delete o[me];let a=Reflect.ownKeys(o);for(let i=0;i<a.length;i++){let s=a[i],l=o[s];l[Eo]===!1&&(l[Eo]=!0,l[vi]=!0),(l.get||l.set)&&(o[s]={[vi]:!0,[Eo]:!0,[Oo]:l[Oo],[bn]:e[s]})}return Ee.create(Tr(e),o)}else{let o=Tr(e);if(o!==null&&n)return{...e};let a=Ee.create(o);return Ee.assign(a,e)}}function ko(e,t=!1){return Po(e)||Qe(e)||!Ae(e)||(Sn(e)>1&&Ee.defineProperties(e,{set:Co,add:Co,clear:Co,delete:Co}),Ee.freeze(e),t&&Mo(e,(n,o)=>{ko(o,!0)},!1)),e}function fp(){Ve(2)}var Co={[bn]:fp};function Po(e){return e===null||!_i(e)?!0:Ee.isFrozen(e)}var _o="MapSet",Ei="Patches",C2="ArrayMethods",N2={};function ir(e){let t=N2[e];return t||Ve(0,e),t}var E2=e=>!!N2[e];var xn,z2=()=>xn,up=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:E2(_o)?ir(_o):void 0,arrayMethodsPlugin_:E2(C2)?ir(C2):void 0});function A2(e,t){t&&(e.patchPlugin_=ir(Ei),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ai(e){Li(e),e.drafts_.forEach(pp),e.drafts_=null}function Li(e){e===xn&&(xn=e.parent_)}var L2=e=>xn=up(xn,e);function pp(e){let t=e[me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function O2(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[me].modified_&&(Ai(t),Ve(4)),Ae(e)&&(e=R2(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[me].base_,e,t)}else e=R2(t,n);return mp(t,e,!0),Ai(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_2?e:void 0}function R2(e,t){if(Po(t))return t;let n=t[me];if(!n)return wo(t,e.handledSet_,e);if(!Do(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);I2(n,e)}return n.copy_}function mp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ko(t,n)}function M2(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Do=(e,t)=>e.scope_===t,hp=[];function T2(e,t,n,o){let a=ht(e),i=e.type_;if(o!==void 0&&Si(a,o,i)===t){Ro(a,o,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;Mo(a,(f,m)=>{if(Qe(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??hp;for(let l of s)Ro(a,l,n,i)}function gp(e,t,n){e.callbacks_.push(function(a){let i=t;if(!i||!Do(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=wi(i);T2(e,i.draft_??i,s,n),I2(i,a)})}function I2(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let a=o.getPath(e);a&&o.generatePatches_(e,a,t)}M2(e)}}function yp(e,t,n){let{scope_:o}=e;if(Qe(n)){let a=n[me];Do(a,o)&&a.callbacks_.push(function(){Ao(e);let s=wi(a);T2(e,n,s,t)})}else Ae(n)&&e.callbacks_.push(function(){let i=ht(e);e.type_===3?i.has(n)&&wo(n,o.handledSet_,o):Si(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&wo(Si(e.copy_,t,e.type_),o.handledSet_,o)})}function wo(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Qe(e)||t.has(e)||!Ae(e)||Po(e)||(t.add(e),Mo(e,(o,a)=>{if(Qe(a)){let i=a[me];if(Do(i,n)){let s=wi(i);Ro(e,o,s,e.type_),M2(i)}}else Ae(a)&&wo(a,t,n)})),e}function bp(e,t){let n=To(e),o={type_:n?1:0,scope_:t?t.scope_:z2(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=o,i=No;n&&(a=[o],i=vn);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,[l,o]}var No={get(e,t){if(t===me)return e;let n=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=ht(e);if(!yi(a,t,e.type_))return vp(e,a,t);let i=a[t];if(e.finalized_||!Ae(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&dp(t))return i;if(i===xi(e.base_,t)||xp(e,t,i)){Ao(e);let s=e.type_===1?+t:t,l=Ri(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in ht(e)},ownKeys(e){return Reflect.ownKeys(ht(e))},set(e,t,n){let o=k2(ht(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){let a=xi(ht(e),t),i=a?.[me];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(lp(n,a)&&(n!==void 0||yi(e.base_,t,e.type_)))return!0;Ao(e),Oi(e)}return e.copy_[t]===n&&(n!==void 0||yi(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),yp(e,t,n)),!0},deleteProperty(e,t){return Ao(e),xi(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Oi(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=ht(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[Eo]:!0,[vi]:e.type_!==1||t!=="length",[Oo]:o[Oo],[bn]:n[t]}},defineProperty(){Ve(11)},getPrototypeOf(e){return Tr(e.base_)},setPrototypeOf(){Ve(12)}},vn={};for(let e in No){let t=No[e];vn[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}vn.deleteProperty=function(e,t){return vn.set.call(this,e,t,void 0)};vn.set=function(e,t,n){return No.set.call(this,e[0],t,n,e[0])};function xi(e,t){let n=e[me];return(n?ht(n):e)[t]}function xp(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!Ae(n)||n[me]?!1:e.baseRefs_.has(n)}function vp(e,t,n){let o=k2(t,n);return o?bn in o?o[bn]:o.get?.call(e.draft_):void 0}function k2(e,t){if(!(t in e))return;let n=Tr(e);for(;n;){let o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Tr(n)}}function Oi(e){e.modified_||(e.modified_=!0,e.parent_&&Oi(e.parent_))}function Ao(e){e.copy_||(e.assigned_=new Map,e.copy_=Ci(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Sp=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(Mr(t)&&!Mr(n)){let i=n;n=t;let s=this;return function(f=i,...m){return s.produce(f,h=>n.call(this,h,...m))}}Mr(n)||Ve(6),o!==void 0&&!Mr(o)&&Ve(7);let a;if(Ae(t)){let i=L2(this),s=Ri(i,t,void 0),l=!0;try{a=n(s),l=!1}finally{l?Ai(i):Li(i)}return A2(i,o),O2(a,i)}else if(!t||!_i(t)){if(a=n(t),a===void 0&&(a=t),a===_2&&(a=void 0),this.autoFreeze_&&ko(a,!0),o){let i=[],s=[];ir(Ei).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),o(i,s)}return a}else Ve(1,t)},this.produceWithPatches=(t,n)=>{if(Mr(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let o,a;return[this.produce(t,n,(s,l)=>{o=s,a=l}),o,a]},bi(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),bi(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),bi(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ae(e)||Ve(8),Qe(e)&&(e=P2(e));let t=L2(this),n=Ri(t,e,void 0);return n[me].isManual_=!0,Li(t),n}finishDraft(e,t){let n=e&&e[me];(!n||!n.isManual_)&&Ve(9);let{scope_:o}=n;return A2(o,t),O2(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));let o=ir(Ei).applyPatches_;return Qe(e)?o(e,t):this.produce(e,a=>o(a,t))}};function Ri(e,t,n,o){let[a,i]=Io(t)?ir(_o).proxyMap_(t,n):Cn(t)?ir(_o).proxySet_(t,n):bp(t,n);return(n?.scope_??z2()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?gp(n,i,o):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function P2(e){return Qe(e)||Ve(10,e),D2(e)}function D2(e){if(!Ae(e)||Po(e))return e;let t=e[me],n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ci(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Ci(e,!0);let a=n;return Cn(n)&&(n=new Set),Mo(a,(i,s)=>{Ro(n,i,D2(s))},o),t&&(t.finalized_=!1),n}var Cp=globalThis.Iterator,sy=typeof Cp?.from=="function";var Ep=new Sp,Ni=Ep.produce;function U2(e){return({dispatch:n,getState:o})=>a=>i=>typeof i=="function"?i(n,o,e):a(i)}var B2=U2(),H2=U2;var Ap=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yn:yn.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Lp=e=>e&&typeof e.match=="function";function Mt(e,t){function n(...o){if(t){let a=t(...o);if(!a)throw new Error(Je(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:o[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=o=>x2(o)&&o.type===e,n}var V2=class En extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,En.prototype)}static get[Symbol.species](){return En}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new En(...t[0].concat(this)):new En(...t.concat(this))}};function $2(e){return Ae(e)?Ni(e,()=>{}):e}function Uo(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Op(e){return typeof e=="boolean"}var Rp=()=>function(t){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new V2;return n&&(Op(n)?s.push(B2):s.push(H2(n.extraArgument))),s},_p="RTK_autoBatch";var G2=e=>t=>{setTimeout(t,e)},wp=(e,t)=>n=>{let o=!1,a,i,s=()=>{o||(o=!0,cancelAnimationFrame(a),clearTimeout(i),n())};a=e(s),i=setTimeout(s,t)},Np=(e={type:"raf"})=>t=>(...n)=>{let o=t(...n),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?wp(window.requestAnimationFrame,100):G2(10):e.type==="callback"?e.queueNotification:G2(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},o,{subscribe(h){let g=()=>a&&h(),b=o.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[_p],i=!a,i&&(s||(s=!0,f(m))),o.dispatch(h)}finally{a=!0}}})},zp=e=>function(n){let{autoBatch:o=!0}=n??{},a=new V2(e);return o&&a.push(Np(typeof o=="object"?o:void 0)),a};function j2(e){let t=Rp(),{reducer:n=void 0,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof n=="function")f=n;else if(So(n))f=gi(n);else throw new Error(Je(1));let m;typeof o=="function"?m=o(t):m=t();let h=yn;a&&(h=Ap({trace:!1,...typeof a=="object"&&a}));let g=b2(...m),b=zp(g),v=typeof l=="function"?l(b):b(),R=h(...v);return hi(f,s,R)}function K2(e){let t={},n=[],o,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(Je(28));if(l in t)throw new Error(Je(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return o=i,a}};return e(a),[t,n,o]}function Mp(e){return typeof e=="function"}function Tp(e,t){let[n,o,a]=K2(t),i;if(Mp(e))i=()=>$2(e());else{let l=$2(e);i=()=>l}function s(l=i(),f){let m=[n[f.type],...o.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(Qe(h)){let b=g(h,f);return b===void 0?h:b}else{if(Ae(h))return Ni(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw new Error(Je(9))}return b}}return h},l)}return s.getInitialState=i,s}var Ip=(e,t)=>Lp(e)?e.match(t):e(t);function kp(...e){return t=>e.some(n=>Ip(n,t))}var Pp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Dp=(e=21)=>{let t="",n=e;for(;n--;)t+=Pp[Math.random()*64|0];return t},Up=["name","message","stack","code"],zi=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},F2=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Bp=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of Up)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},W2="External signal was aborted",Hp=(()=>{function e(t,n,o){let a=Mt(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=Mt(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=Mt(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(o&&o.serializeError||Bp)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:g!==void 0,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let v=o?.idGenerator?o.idGenerator(f):Dp(),R=new AbortController,w,_;function T(N){_=N,R.abort()}m&&(m.aborted?T(W2):m.addEventListener("abort",()=>T(W2),{once:!0}));let U=(async function(){let N;try{let I=o?.condition?.(f,{getState:g,extra:b});if(Gp(I)&&(I=await I),I===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(R.signal.aborted)throw{name:"AbortError",message:_||"Aborted"};let H=new Promise(($,J)=>{w=()=>{J({name:"AbortError",message:_||"Aborted"})},R.signal.addEventListener("abort",w,{once:!0})});h(i(v,f,o?.getPendingMeta?.({requestId:v,arg:f},{getState:g,extra:b}))),N=await Promise.race([H,Promise.resolve(n(f,{dispatch:h,getState:g,extra:b,requestId:v,signal:R.signal,abort:T,rejectWithValue:(($,J)=>new zi($,J)),fulfillWithValue:(($,J)=>new F2($,J))})).then($=>{if($ instanceof zi)throw $;return $ instanceof F2?a($.payload,v,f,$.meta):a($,v,f)})])}catch(I){N=I instanceof zi?s(null,v,f,I.payload,I.meta):s(I,v,f)}finally{w&&R.signal.removeEventListener("abort",w)}return o&&!o.dispatchConditionRejection&&s.match(N)&&N.meta.condition||h(N),N})();return Object.assign(U,{abort:T,requestId:v,arg:f,unwrap(){return U.then($p)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:kp(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function $p(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Z2=Symbol.for("rtk-slice-createasyncthunk"),hy={[Z2]:Hp};function Fp(e,t){return`${e}/${t}`}function Wp({creators:e}={}){let t=e?.asyncThunk?.[Z2];return function(o){let{name:a,reducerPath:i=a}=o;if(!a)throw new Error(Je(11));typeof process<"u";let s=(typeof o.reducers=="function"?o.reducers(jp()):o.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(N,I){let H=typeof N=="string"?N:N.type;if(!H)throw new Error(Je(12));if(H in f.sliceCaseReducersByType)throw new Error(Je(13));return f.sliceCaseReducersByType[H]=I,m},addMatcher(N,I){return f.sliceMatchers.push({matcher:N,reducer:I}),m},exposeAction(N,I){return f.actionCreators[N]=I,m},exposeCaseReducer(N,I){return f.sliceCaseReducersByName[N]=I,m}};l.forEach(N=>{let I=s[N],H={reducerName:N,type:Fp(a,N),createNotation:typeof o.reducers=="function"};Zp(I)?Yp(H,I,m,t):Kp(H,I,m)});function h(){let[N={},I=[],H=void 0]=typeof o.extraReducers=="function"?K2(o.extraReducers):[o.extraReducers],$={...N,...f.sliceCaseReducersByType};return Tp(o.initialState,J=>{for(let re in $)J.addCase(re,$[re]);for(let re of f.sliceMatchers)J.addMatcher(re.matcher,re.reducer);for(let re of I)J.addMatcher(re.matcher,re.reducer);H&&J.addDefaultCase(H)})}let g=N=>N,b=new Map,v=new WeakMap,R;function w(N,I){return R||(R=h()),R(N,I)}function _(){return R||(R=h()),R.getInitialState()}function T(N,I=!1){function H(J){let re=J[N];return typeof re>"u"&&I&&(re=Uo(v,H,_)),re}function $(J=g){return Uo(Uo(b,I,()=>new WeakMap),J,()=>{let re={};for(let[mr,_e]of Object.entries(o.selectors??{}))re[mr]=Vp(_e,J,()=>Uo(v,J,_),I);return re})}return{reducerPath:N,getSelectors:$,get selectors(){return $(H)},selectSlice:H}}let U={name:a,reducer:w,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:_,...T(i),injectInto(N,{reducerPath:I,...H}={}){let $=I??i;return N.inject({reducerPath:$,reducer:w},H),{...U,...T($,!0)}}};return U}}function Vp(e,t,n,o){function a(i,...s){let l=t(i);return typeof l>"u"&&o&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var q2=Wp();function jp(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Kp({type:e,reducerName:t,createNotation:n},o,a){let i,s;if("reducer"in o){if(n&&!qp(o))throw new Error(Je(17));i=o.reducer,s=o.prepare}else i=o;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Mt(e,s):Mt(e))}function Zp(e){return e._reducerDefinitionType==="asyncThunk"}function qp(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Yp({type:e,reducerName:t},n,o,a){if(!a)throw new Error(Je(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=n,g=a(e,i,h);o.exposeAction(t,g),s&&o.addCase(g.fulfilled,s),l&&o.addCase(g.pending,l),f&&o.addCase(g.rejected,f),m&&o.addMatcher(g.settled,m),o.exposeCaseReducer(t,{fulfilled:s||Bo,pending:l||Bo,rejected:f||Bo,settled:m||Bo})}function Bo(){}var Y2="listener",X2="completed",Q2="cancelled",gy=`task-${Q2}`,yy=`task-${X2}`,by=`${Y2}-${Q2}`,xy=`${Y2}-${X2}`;var{assign:J2}=Object;var Mi="listenerMiddleware";var Xp=J2(Mt(`${Mi}/add`),{withTypes:()=>Xp}),vy=Mt(`${Mi}/removeAll`),Qp=J2(Mt(`${Mi}/remove`),{withTypes:()=>Qp});function Je(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Jp=mo(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)}}}),Ho=class extends Jp(Object){};window.ftReduxStores||(window.ftReduxStores={});var e0=class e extends Ho{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(xo(i))return i;if(a==null)return;let s=q2({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=j2({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=mn(s.getInitialState());for(let g of m.keeping)h[g]=(f??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...m.overwrites};return s.reducer(f,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus,a.deprecatedKeys)}constructor(t,n,o,a){super(),this.reduxSlice=t,this.reduxStore=n,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new ho,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,f)=>{let m=l,h=s[m];return h?(...g)=>{let b=h(...g.map(i));return this.reduxStore.dispatch(b),b}:g=>{let b=m,v=this.getState()[b];wr(v,g)||this.setState({[b]:i(g)})}}}),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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var $o=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),f=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`: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 Go=x(k()),e6="ft-app-info",sr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};sr.eventName="authentication-change";var An=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};An.eventName="ui-locale-changed";var t6={session:(e,t)=>{(0,Go.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>B.dispatchEvent(new sr(t.payload)),0))}},B=Go.FtReduxStore.get({name:e6,reducers:t6,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var t0=x(k()),Fo=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},Yy=(0,t0.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(B)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>$o.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Fo([(0,Ti.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Fo([(0,Ti.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Fo([pi({store:B.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),Fo([pi({store:B.name})],t.prototype,"uiLocale",void 0),t});var r0;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(r0||(r0={}));var n0;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(n0||(n0={}));var o0;(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"})(o0||(o0={}));var a0;(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"})(a0||(a0={}));var i0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(i0||(i0={}));var s0;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(s0||(s0={}));var c0;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(c0||(c0={}));var l0;(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"})(l0||(l0={}));var d0;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(d0||(d0={}));var f0;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(f0||(f0={}));var u0;(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",e.DOC_DIFF="DOC_DIFF"})(u0||(u0={}));var p0;(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"})(p0||(p0={}));var m0;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(m0||(m0={}));var h0;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(h0||(h0={}));var g0;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(g0||(g0={}));var y0;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(y0||(y0={}));var b0;(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"})(b0||(b0={}));var x0;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(x0||(x0={}));var v0;(function(e){e.ASC="ASC",e.DESC="DESC"})(v0||(v0={}));var S0;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(S0||(S0={}));var C0;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(C0||(C0={}));var E0;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(E0||(E0={}));var A0;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(A0||(A0={}));var L0;(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"})(L0||(L0={}));var O0;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(O0||(O0={}));var R0;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(R0||(R0={}));var _0;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_0||(_0={}));var w0;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(w0||(w0={}));var ie;(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"})(ie||(ie={}));var Me;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Me||(Me={}));var N0;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(N0||(N0={}));var z0;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(z0||(z0={}));var M0;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(M0||(M0={}));var T0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(T0||(T0={}));var I0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(I0||(I0={}));var k0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(k0||(k0={}));var P0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(P0||(P0={}));var D0;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(D0||(D0={}));var U0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(U0||(U0={}));var B0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(B0||(B0={}));var H0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(H0||(H0={}));var $0;(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"})($0||($0={}));var G0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(G0||(G0={}));var r6={[ie.PERSONAL_BOOK_SHARE_USER]:[ie.PERSONAL_BOOK_USER],[ie.HTML_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.PDF_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.KHUB_ADMIN]:[ie.CONTENT_PUBLISHER],[ie.ADMIN]:[ie.KHUB_ADMIN,ie.USERS_ADMIN,ie.PORTAL_ADMIN,ie.BEHAVIOR_DATA_USER],[ie.GENERATIVE_AI_EXPORT_USER]:[ie.GENERATIVE_AI_USER]};function F0(e,t){return e===t||(r6[e]??[]).some(n=>F0(n,t))}function Ii(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=>F0(o,t))}function W0(e,...t){return e==null?!1:t.some(n=>Ii(e,n))}var Zo=x(k());var ki=x(k());var cr=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=B.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=B.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var Ir=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:cr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):cr.await()}};var Le=class extends Ir{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],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new ki.CacheRegistry,this.cache=t?a.commonCache:new ki.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 Wo=class extends Le{async listMySearches(){let{session:t}=B.getState();return Ii(t,ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Vo=class extends Le{async listMyBookmarks(){let t=B.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var jo=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=B.getState().session;return!!t?.sessionAuthenticated}};var Ko=class extends Le{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=B.getState().session;return!!t?.sessionAuthenticated}};var n6="ft-user-assets",o6={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(Me).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;Di(e,n,[...Pi(e,n),a]),V0(e,n,1,o),j0(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;Di(e,n,Pi(e,n).map(a=>a.id===o.id?o:a)),j0(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;Di(e,n,Pi(e,n).filter(i=>i.id!==a)),V0(e,n,-1,o)}},K0={[Me.SEARCHES]:"savedSearches",[Me.BOOKMARKS]:"bookmarks",[Me.BOOKS]:void 0,[Me.COLLECTIONS]:void 0},Pi=(e,t)=>{var n;let o=K0[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},Di=(e,t,n)=>{let o=K0[t];o&&(e[o]=n)},V0=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===Me.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},j0=(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)},ge=Zo.FtReduxStore.get({name:n6,reducers:o6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Me).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ui=class{constructor(t=new jo,n=new Ko){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=B.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Vo,this.savedSearchesService=new Wo,B.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=B.getState();(0,Zo.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(),ge.actions.clearAssetCount(),ge.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ge.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ge.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ge.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ge.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&ge.getState().assetCounts.allAsset[t]!==n.count&&ge.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&ge.getState().assetCounts.bookmarkByMap[t]!==n.count&&ge.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(ge.getState().assetCounts.bookmarkByMap).length!==0;t===Me.BOOKMARKS&&n&&ge.actions.clearBookmarkCountByMap(),ge.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;ge.actions.bookmarks(n)}}},a6=new Ui;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=a6);var Bi=class{addCommand(t,n=!1){B.commands.add(t,n)}consumeCommand(t){return B.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Bi;var Te=x(k());var Z0,kr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},i6=Symbol("clearAfterUnitTest"),qo=class extends(0,Te.withEventBus)(Le){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Z0]=()=>{this.defaultMessages={},this.cache=new Te.CacheRegistry,this.listeners={}},this.currentUiLocale=B.getState().uiLocale,B.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=B.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,Te.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 Te.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 Te.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 kr({loadedContexts:t})),this.dispatchEvent(new kr({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new kr({loadedContexts:[t]})),this.dispatchEvent(new kr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,Te.delay)(0).then(()=>o()).catch(()=>null)))}};Z0=i6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends qo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends qo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ln=window.FluidTopicsI18nService,Hi=window.FluidTopicsCustomI18nService;var q0=x(k()),$i=class{highlightHtml(t,n,o){(0,q0.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new $i;var Y0=x(k());var Gi=class{isDate(t){var n,o,a,i;return(i=(o=((a=(n=B.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||o===void 0?void 0:o.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return Y0.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:B.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 Gi;var X0=x(k());var On=class{static get(t,n,{baseUrl:o,localesConfiguration:a,availableContentLocales:i}=B.getState()){var s;if(n==="all"&&a?.allLanguagesAllowed)n=void 0;else if(!n||i.length>0&&!i.some(l=>l.lang===n)){let l=a?.defaultLocales.defaultContentLocale;n=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new X0.SearchPlaceConverter(o,t??20,a?.allLanguagesAllowed,n,i)}};var Fi=class{urlToSearchRequest(t){return On.get().parse(t)}searchRequestToUrl(t){return On.get().serialize(t)}};window.FluidTopicsUrlService=new Fi;var gt=x(k());var lr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};lr.eventName="before-location-change";var dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};dr.eventName="change";var Wi=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))}},Q0=new Wi;var Yo=class e extends gt.WithEventBus{static build(){return new e(window.history,Q0,()=>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,gt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new dr(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let f=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new lr(f);this.dispatchEvent(m);let h=n(),g={...h===this.currentIndex?this.currentState:void 0,...i,index:h,href:m.detail.nextLocation.href};o.apply(a,[g,s,g.href]),this.setCurrentState(g,!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)}addBeforeLocationChangeListener(t){this.addEventListener(lr.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(lr.eventName,t)}addHistoryChangeListener(t){this.addEventListener(dr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(dr.eventName,t)}currentItem(){return(0,gt.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,gt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,gt.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,gt.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=Yo.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),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var J0=x(G());var ed=J0.css`
2084
2084
  `;var nd=x(G()),ye=x(ne()),ur=x(k());var et=x(k());function td(e,t){let{authenticationRequired:n,session:o}=B.getState();return n&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var Xo=class extends Ir{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Vi=class e extends et.FtStateManager{static build(t){return new e(B,t)}constructor(t,n){super(),this.store=t,this.cache=new et.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Xo,this.knownContexts=new et.AbstractRegistry,this.knownCustomComponents=new et.AbstractRegistry,this.cleanSessionDebouncer=new et.Debouncer,this.reloadConfiguration=()=>{var o;(o=this.cache)===null||o===void 0||o.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new et.Debouncer(500),this.apiProvider=n??(()=>cr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(sr.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(sr.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",()=>td(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=n.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(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,n){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:n}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new An(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(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)}userHasAnyRole(...t){return W0(B.getState().session,...t)}},rd=Vi.build();var fr=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 Rn=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 fr(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 ce=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},Z=class extends ur.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=rd,this.contextRoot=new Rn}render(){return nd.html`
2085
2085
  <slot></slot>
2086
2086
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var n;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),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("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),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())}};Z.elementDefinitions={};Z.styles=ed;ce([(0,ye.property)()],Z.prototype,"baseUrl",void 0);ce([(0,ye.property)()],Z.prototype,"tenantId",void 0);ce([(0,ye.property)()],Z.prototype,"apiIntegrationIdentifier",void 0);ce([(0,ye.property)()],Z.prototype,"apiIntegrationAppVersion",void 0);ce([(0,ye.property)()],Z.prototype,"uiLocale",void 0);ce([(0,ur.jsonProperty)(null)],Z.prototype,"availableUiLocales",void 0);ce([(0,ur.jsonProperty)(null)],Z.prototype,"metadataConfiguration",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"editorMode",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"noCustom",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"openExternalDocumentInNewTab",void 0);ce([(0,ye.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Z.prototype,"noCustomComponent",void 0);ce([(0,ye.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],Z.prototype,"noCustomCode",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"withManualResources",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"navigatorOnline",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"forcedOffline",void 0);ce([(0,ye.property)({type:Boolean})],Z.prototype,"authenticationRequired",void 0);ce([(0,ur.jsonProperty)([])],Z.prototype,"messageContexts",void 0);ce([(0,ur.jsonProperty)(void 0)],Z.prototype,"session",void 0);var ad=x(k());var od={"ft-app-context":Z};(0,ad.customElements)(od);var id=x(ne());var ji=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-]+$/)}},Pr=new ji;var l6=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},wn=Symbol("i18nAttributes"),sd=Symbol("i18nListAttributes"),cd=Symbol("i18nProperties"),Qo=Symbol("i18nContexts"),_n=Symbol("i18nUnsubs"),ta=(0,Dr.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?Hi:Ln}i18n(i){let{context:s,key:l,message:f}=i,{custom:m,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let b=h??(g?g(this):[]);return this.getI18nService(m).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Pr.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var m;return((m=f?.context)===null||m===void 0?void 0:m.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,m=(h,g,b)=>b?.context&&b.key&&i(h,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...h})}:b;(s=this[wn])===null||s===void 0||s.forEach((h,g)=>f[g]=m(h,g,f[g])),(l=this[sd])===null||l===void 0||l.forEach((h,g)=>{var b;return f[g]=(b=f[g])===null||b===void 0?void 0:b.map(v=>m(h,g,v))})}updateI18nProperties(i){var s;(s=this[cd])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Qo].set(f,{isCustomContext:l}),this[_n].has(f)||this[_n].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[Qo].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Qo].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[_n].forEach(i=>i()),this[_n].clear()}}return t=Qo,n=_n,l6([(0,id.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Jo=class extends ta(Dr.FtLitElement){},ea=class extends ta(Dr.FtLitElementRedux){};var ld=x(k());var Ki=class{fromAttribute(t){if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.map(o=>typeof o=="string"?Pr.fromAttribute(o):o):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},d6=new Ki;var dd=(e,t)=>(n,o)=>{var a;n.constructor.createProperty(o,{type:Object,hasChanged:ld.hasChanged,converter:Pr,...t}),n[wn]=(a=n[wn])!==null&&a!==void 0?a:new Map,n[wn].set(o,e??{})};var fd=x(G());var ud=fd.css`