@fluid-topics/ft-search-input 2.0.11 → 2.0.12

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.
@@ -531,7 +531,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
531
531
  position: relative;
532
532
  word-break: break-word;
533
533
  }
534
- `;var $1=["top","right","bottom","left"],z1=["start","end"],Js=$1.reduce((t,e)=>t.concat(e,e+"-"+z1[0],e+"-"+z1[1]),[]),aa=Math.min,Jr=Math.max,ia=Math.round;var sr=t=>({x:t,y:t}),t3={left:"right",right:"left",bottom:"top",top:"bottom"};function el(t,e,r){return Jr(t,aa(e,r))}function ti(t,e){return typeof t=="function"?t(e):t}function gn(t){return t.split("-")[0]}function eo(t){return t.split("-")[1]}function tl(t){return t==="x"?"y":"x"}function rl(t){return t==="y"?"height":"width"}function ri(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function ol(t){return tl(ri(t))}function D1(t,e,r){r===void 0&&(r=!1);let o=eo(t),a=ol(t),i=rl(a),s=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Qs(s)),[s,Qs(s)]}function B1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Qs(t){let e=gn(t);return t3[e]+t.slice(e.length)}function r3(t){return{top:0,right:0,bottom:0,left:0,...t}}function F1(t){return typeof t!="number"?r3(t):{top:t,right:t,bottom:t,left:t}}function Mo(t){let{x:e,y:r,width:o,height:a}=t;return{width:o,height:a,top:r,left:e,right:e+o,bottom:r+a,x:e,y:r}}function U1(t,e,r){let{reference:o,floating:a}=t,i=ri(e),s=ol(e),l=rl(s),f=gn(e),u=i==="y",g=o.x+o.width/2-a.width/2,y=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,S;switch(f){case"top":S={x:g,y:o.y-a.height};break;case"bottom":S={x:g,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y};break;case"left":S={x:o.x-a.width,y};break;default:S={x:o.x,y:o.y}}switch(eo(e)){case"start":S[s]-=b*(r&&u?-1:1);break;case"end":S[s]+=b*(r&&u?-1:1);break}return S}async function H1(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:g="viewport",elementContext:y="floating",altBoundary:b=!1,padding:S=0}=ti(e,t),O=F1(S),T=l[b?y==="floating"?"reference":"floating":y],I=Mo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(T)))==null||r?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:g,strategy:f})),N=y==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),F=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},oe=Mo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:D,strategy:f}):N);return{top:(I.top-oe.top+O.top)/F.y,bottom:(oe.bottom-I.bottom+O.bottom)/F.y,left:(I.left-oe.left+O.left)/F.x,right:(oe.right-I.right+O.right)/F.x}}var o3=50,G1=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:H1},f=await(s.isRTL==null?void 0:s.isRTL(e)),u=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:g,y}=U1(u,o,f),b=o,S=0,O={};for(let A=0;A<i.length;A++){let T=i[A];if(!T)continue;let{name:I,fn:N}=T,{x:D,y:F,data:oe,reset:Le}=await N({x:g,y,initialPlacement:o,placement:b,strategy:a,middlewareData:O,rects:u,platform:l,elements:{reference:t,floating:e}});g=D??g,y=F??y,O[I]={...O[I],...oe},Le&&S<o3&&(S++,typeof Le=="object"&&(Le.placement&&(b=Le.placement),Le.rects&&(u=Le.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):Le.rects),{x:g,y}=U1(u,b,f)),A=-1)}return{x:g,y,placement:b,strategy:a,middlewareData:O}};function n3(t,e,r){return(t?[...r.filter(a=>eo(a)===t),...r.filter(a=>eo(a)!==t)]:r.filter(a=>gn(a)===a)).filter(a=>t?eo(a)===t||(e?B1(a)!==a:!1):!0)}var W1=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,o,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=e,{crossAxis:g=!1,alignment:y,allowedPlacements:b=Js,autoAlignment:S=!0,...O}=ti(t,e),A=y!==void 0||b===Js?n3(y||null,S,b):b,T=await f.detectOverflow(e,O),I=((r=s.autoPlacement)==null?void 0:r.index)||0,N=A[I];if(N==null)return{};let D=D1(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:A[0]}};let F=[T[gn(N)],T[D[0]],T[D[1]]],oe=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:F}],Le=A[I+1];if(Le)return{data:{index:I+1,overflows:oe},reset:{placement:Le}};let Lt=oe.map(tt=>{let x=eo(tt.placement);return[tt.placement,x&&g?tt.overflows.slice(0,2).reduce((E,U)=>E+U,0):tt.overflows[0],tt.overflows]}).sort((tt,x)=>tt[1]-x[1]),yr=((a=Lt.filter(tt=>tt[2].slice(0,eo(tt[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Lt[0][0];return yr!==l?{data:{index:I+1,overflows:oe},reset:{placement:yr}}:{}}}};var V1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:o,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:I=>{let{x:N,y:D}=I;return{x:N,y:D}}},...u}=ti(t,e),g={x:r,y:o},y=await i.detectOverflow(e,u),b=ri(gn(a)),S=tl(b),O=g[S],A=g[b];if(s){let I=S==="y"?"top":"left",N=S==="y"?"bottom":"right",D=O+y[I],F=O-y[N];O=el(D,O,F)}if(l){let I=b==="y"?"top":"left",N=b==="y"?"bottom":"right",D=A+y[I],F=A-y[N];A=el(D,A,F)}let T=f.fn({...e,[S]:O,[b]:A});return{...T,data:{x:T.x-r,y:T.y-o,enabled:{[S]:s,[b]:l}}}}}};function ni(){return typeof window<"u"}function Po(t){return K1(t)?(t.nodeName||"").toLowerCase():"#document"}function At(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Sr(t){var e;return(e=(K1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function K1(t){return ni()?t instanceof Node||t instanceof At(t).Node:!1}function Wt(t){return ni()?t instanceof Element||t instanceof At(t).Element:!1}function Cr(t){return ni()?t instanceof HTMLElement||t instanceof At(t).HTMLElement:!1}function j1(t){return!ni()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof At(t).ShadowRoot}function yn(t){let{overflow:e,overflowX:r,overflowY:o,display:a}=Vt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+r)&&a!=="inline"&&a!=="contents"}function q1(t){return/^(table|td|th)$/.test(Po(t))}function sa(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var a3=/transform|translate|scale|rotate|perspective|filter/,i3=/paint|layout|strict|content/,Io=t=>!!t&&t!=="none",nl;function ai(t){let e=Wt(t)?Vt(t):t;return Io(e.transform)||Io(e.translate)||Io(e.scale)||Io(e.rotate)||Io(e.perspective)||!ii()&&(Io(e.backdropFilter)||Io(e.filter))||a3.test(e.willChange||"")||i3.test(e.contain||"")}function Z1(t){let e=Dr(t);for(;Cr(e)&&!zo(e);){if(ai(e))return e;if(sa(e))return null;e=Dr(e)}return null}function ii(){return nl==null&&(nl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nl}function zo(t){return/^(html|body|#document)$/.test(Po(t))}function Vt(t){return At(t).getComputedStyle(t)}function la(t){return Wt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dr(t){if(Po(t)==="html")return t;let e=t.assignedSlot||t.parentNode||j1(t)&&t.host||Sr(t);return j1(e)?e.host:e}function Y1(t){let e=Dr(t);return zo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Cr(e)&&yn(e)?e:Y1(e)}function oi(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=Y1(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),s=At(a);if(i){let l=si(s);return e.concat(s,s.visualViewport||[],yn(a)?a:[],l&&r?oi(l):[])}else return e.concat(a,oi(a,[],r))}function si(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function e2(t){let e=Vt(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=Cr(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:o,l=ia(r)!==i||ia(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function t2(t){return Wt(t)?t:t.contextElement}function bn(t){let e=t2(t);if(!Cr(e))return sr(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=e2(e),s=(i?ia(r.width):r.width)/o,l=(i?ia(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var s3=sr(0);function r2(t){let e=At(t);return!ii()||!e.visualViewport?s3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function l3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==At(t)?!1:e}function ca(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=t2(t),s=sr(1);e&&(o?Wt(o)&&(s=bn(o)):s=bn(t));let l=l3(i,r,o)?r2(i):sr(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,g=a.width/s.x,y=a.height/s.y;if(i){let b=At(i),S=o&&Wt(o)?At(o):o,O=b,A=si(O);for(;A&&o&&S!==O;){let T=bn(A),I=A.getBoundingClientRect(),N=Vt(A),D=I.left+(A.clientLeft+parseFloat(N.paddingLeft))*T.x,F=I.top+(A.clientTop+parseFloat(N.paddingTop))*T.y;f*=T.x,u*=T.y,g*=T.x,y*=T.y,f+=D,u+=F,O=At(A),A=si(O)}}return Mo({width:g,height:y,x:f,y:u})}function li(t,e){let r=la(t).scrollLeft;return e?e.left+r:ca(Sr(t)).left+r}function o2(t,e){let r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-li(t,r),a=r.top+e.scrollTop;return{x:o,y:a}}function c3(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",s=Sr(o),l=e?sa(e.floating):!1;if(o===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=sr(1),g=sr(0),y=Cr(o);if((y||!y&&!i)&&((Po(o)!=="body"||yn(s))&&(f=la(o)),y)){let S=ca(o);u=bn(o),g.x=S.x+o.clientLeft,g.y=S.y+o.clientTop}let b=s&&!y&&!i?o2(s,f):sr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+g.x+b.x,y:r.y*u.y-f.scrollTop*u.y+g.y+b.y}}function d3(t){return Array.from(t.getClientRects())}function f3(t){let e=Sr(t),r=la(t),o=t.ownerDocument.body,a=Jr(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=Jr(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+li(t),l=-r.scrollTop;return Vt(o).direction==="rtl"&&(s+=Jr(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:l}}var X1=25;function u3(t,e){let r=At(t),o=Sr(t),a=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let g=ii();(!g||g&&e==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=li(o);if(u<=0){let g=o.ownerDocument,y=g.body,b=getComputedStyle(y),S=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,O=Math.abs(o.clientWidth-y.clientWidth-S);O<=X1&&(i-=O)}else u<=X1&&(i+=u);return{width:i,height:s,x:l,y:f}}function p3(t,e){let r=ca(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=Cr(t)?bn(t):sr(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,f=a*i.x,u=o*i.y;return{width:s,height:l,x:f,y:u}}function Q1(t,e,r){let o;if(e==="viewport")o=u3(t,r);else if(e==="document")o=f3(Sr(t));else if(Wt(e))o=p3(e,r);else{let a=r2(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Mo(o)}function n2(t,e){let r=Dr(t);return r===e||!Wt(r)||zo(r)?!1:Vt(r).position==="fixed"||n2(r,e)}function h3(t,e){let r=e.get(t);if(r)return r;let o=oi(t,[],!1).filter(l=>Wt(l)&&Po(l)!=="body"),a=null,i=Vt(t).position==="fixed",s=i?Dr(t):t;for(;Wt(s)&&!zo(s);){let l=Vt(s),f=ai(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||yn(s)&&!f&&n2(t,s))?o=o.filter(g=>g!==s):a=l,s=Dr(s)}return e.set(t,o),o}function m3(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,s=[...r==="clippingAncestors"?sa(e)?[]:h3(e,this._c):[].concat(r),o],l=Q1(e,s[0],a),f=l.top,u=l.right,g=l.bottom,y=l.left;for(let b=1;b<s.length;b++){let S=Q1(e,s[b],a);f=Jr(S.top,f),u=aa(S.right,u),g=aa(S.bottom,g),y=Jr(S.left,y)}return{width:u-y,height:g-f,x:y,y:f}}function g3(t){let{width:e,height:r}=e2(t);return{width:e,height:r}}function y3(t,e,r){let o=Cr(e),a=Sr(e),i=r==="fixed",s=ca(t,!0,i,e),l={scrollLeft:0,scrollTop:0},f=sr(0);function u(){f.x=li(a)}if(o||!o&&!i)if((Po(e)!=="body"||yn(a))&&(l=la(e)),o){let S=ca(e,!0,i,e);f.x=S.x+e.clientLeft,f.y=S.y+e.clientTop}else a&&u();i&&!o&&a&&u();let g=a&&!o&&!i?o2(a,l):sr(0),y=s.left+l.scrollLeft-f.x-g.x,b=s.top+l.scrollTop-f.y-g.y;return{x:y,y:b,width:s.width,height:s.height}}function al(t){return Vt(t).position==="static"}function J1(t,e){if(!Cr(t)||Vt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Sr(t)===r&&(r=r.ownerDocument.body),r}function a2(t,e){let r=At(t);if(sa(t))return r;if(!Cr(t)){let a=Dr(t);for(;a&&!zo(a);){if(Wt(a)&&!al(a))return a;a=Dr(a)}return r}let o=J1(t,e);for(;o&&q1(o)&&al(o);)o=J1(o,e);return o&&zo(o)&&al(o)&&!ai(o)?r:o||Z1(t)||r}var b3=async function(t){let e=this.getOffsetParent||a2,r=this.getDimensions,o=await r(t.floating);return{reference:y3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function v3(t){return Vt(t).direction==="rtl"}var ci={convertOffsetParentRelativeRectToViewportRelativeRect:c3,getDocumentElement:Sr,getClippingRect:m3,getOffsetParent:a2,getElementRects:b3,getClientRects:d3,getDimensions:g3,getScale:bn,isElement:Wt,isRTL:v3};var i2=W1,s2=V1;var l2=(t,e,r)=>{let o=new Map,a={platform:ci,...r},i={...a.platform,_c:o};return G1(t,e,{...a,platform:i})};function c2(t){return x3(t)}function il(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function x3(t){for(let e=t;e;e=il(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=il(t);e;e=il(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||e.tagName==="BODY"))return e}return null}async function d2(t,e,r){let o;return typeof r=="object"?o=r:o={placement:r},l2(t,e,{strategy:o.strategy,platform:{...ci,getOffsetParent:a=>ci.getOffsetParent(a,c2)},middleware:[s2({crossAxis:!0}),i2({allowedPlacements:[o.placement]})]})}var _n=h(L());var Tl=h(V());function S3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,o,a;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(o=r;o--!==0;)if(!di(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!di(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(t),r=a.length,r!==i(e).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[o]))return!1;for(o=r;o--!==0;){let s=a[o];if(!di(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function di(t,e){try{return S3(t,e)}catch{return!1}}function da(t,e){return!di(t,e)}function f2(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function fi(t,e){let r=o=>o[t]===!0;return o=>{if(r(o))return o;let a=e(o);return a[t]=!0,a}}var u2=h(V(),1);var sl=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:da,attribute:!1,...e};(0,u2.property)(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[o],store:e.store})}};var ui=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var $o=h(V(),1);var p2=h(V(),1);function h2(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,p2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return r();try{return JSON.parse(o)}catch{return r()}},toAttribute:o=>JSON.stringify(o)},hasChanged:da,...e??{}})}var pi=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,o)=>{this.resolvePromise=r,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let o=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>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 g2=h(k(),1);var hi=globalThis,C3=hi.ShadowRoot&&(hi.ShadyCSS===void 0||hi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,JC=Symbol();var m2=(t,e)=>{if(C3)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let o=document.createElement("style"),a=hi.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}};var mi=class extends g2.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let r={...e.shadowRootOptions,customElements:e.registry},o=this.renderOptions.creationScope=this.attachShadow(r);return m2(o,e.elementStyles),o}};function y2(t,e,...r){var o;let a=t.querySelector(e);for(let i of r)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var xn=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},S2,b2=Symbol("constructorPrototype"),v2=Symbol("constructorName"),C2=Symbol("exportpartsDebouncer"),x2=Symbol("dynamicDependenciesLoaded"),vn=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};vn.eventName="exportparts-updated";var Or=class extends mi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[S2]=new pi(5),this.scheduleExportpartsUpdate=()=>{var e,r,o;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(o=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&o!==void 0&&o)&&this[C2].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[v2]=this.constructor.name,this[b2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[v2]&&Object.setPrototypeOf(this,this[b2])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let r=this.constructor;r[x2]||(r[x2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(vn.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(vn.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new vn)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];r=y2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,o,a;if(((o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.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(e){var r,o,a,i,s,l;let f=b=>b!=null&&b.trim().length>0,u=e.filter(f).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let g=new Set;for(let b of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],O=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&l!==void 0?l:[],A=[...S,...O].filter(f).map(T=>T.trim());for(let T of A)g.add(T)}if(g.size===0){this.exportparts=void 0;return}let y=[...g.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...y].join(", ")}};S2=C2;xn([(0,$o.property)()],Or.prototype,"exportpartsPrefix",void 0);xn([h2([])],Or.prototype,"exportpartsPrefixes",void 0);xn([(0,$o.property)({reflect:!0})],Or.prototype,"exportparts",void 0);xn([(0,$o.property)()],Or.prototype,"customStylesheet",void 0);xn([(0,$o.property)()],Or.prototype,"elementToFocus",void 0);xn([(0,$o.state)()],Or.prototype,"useAdoptedStyleSheets",void 0);function gi(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var fa=Symbol("internalReduxEventsUnsubscribers"),to=Symbol("internalStoresUnsubscribers"),Do=Symbol("internalStores"),O3=fi(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Do].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Do].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Do].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Do].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Do].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Do].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 u=this.getStore(s.store);u&&(s.store?this[to].has(s.store):this[to].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[to].set(s,l.subscribe(()=>this.updateFromStores())),this[fa].set(s,[]),gi(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,g)=>{if(typeof this[g]=="function"&&(!u.store||l.name===u.store)){let y=b=>this[g](b);l.addEventListener(u.eventName,y),this[fa].get(s).push(()=>l.removeEventListener(u.eventName,y))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[to].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[to].has(s)&&this[to].get(s)(),this[to].delete(s),(l=this[fa].get(s))===null||l===void 0||l.forEach(f=>f()),this[fa].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=to,r=Do,o=fa,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),O2=class extends O3(Or){};function jt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Br(t){return!!t&&!!t[Re]}function lr(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===T3}(t)||Array.isArray(t)||!!t[_2]||!!(!((e=t.constructor)===null||e===void 0)&&e[_2])||gl(t)||yl(t))}function Bo(t,e,r){r===void 0&&(r=!1),On(t)===0?(r?Object.keys:Cn)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function On(t){var e=t[Re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:gl(t)?2:yl(t)?3:0}function Sn(t,e){return On(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function L3(t,e){return On(t)===2?t.get(e):t[e]}function T2(t,e,r){var o=On(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function N2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function gl(t){return k3&&t instanceof Map}function yl(t){return _3&&t instanceof Set}function ro(t){return t.o||t.t}function bl(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=P2(t);delete e[Re];for(var r=Cn(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function vl(t,e){return e===void 0&&(e=!1),xl(t)||Br(t)||!lr(t)||(On(t)>1&&(t.set=t.add=t.clear=t.delete=E3),Object.freeze(t),e&&Bo(t,function(r,o){return vl(o,!0)},!0)),t}function E3(){jt(2)}function xl(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Lr(t){var e=ml[t];return e||jt(18,t),e}function A3(t,e){ml[t]||(ml[t]=e)}function ul(){return pa}function ll(t,e){e&&(Lr("Patches"),t.u=[],t.s=[],t.v=e)}function yi(t){pl(t),t.p.forEach(R3),t.p=null}function pl(t){t===pa&&(pa=t.l)}function L2(t){return pa={p:[],l:pa,h:t,m:!0,_:0}}function R3(t){var e=t[Re];e.i===0||e.i===1?e.j():e.g=!0}function cl(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Lr("ES5").S(e,t,o),o?(r[Re].P&&(yi(e),jt(4)),lr(t)&&(t=bi(e,t),e.l||vi(e,t)),e.u&&Lr("Patches").M(r[Re].t,t,e.u,e.s)):t=bi(e,r,[]),yi(e),e.u&&e.v(e.u,e.s),t!==I2?t:void 0}function bi(t,e,r){if(xl(e))return e;var o=e[Re];if(!o)return Bo(e,function(l,f){return E2(t,o,e,l,f,r)},!0),e;if(o.A!==t)return e;if(!o.P)return vi(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=bl(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Bo(i,function(l,f){return E2(t,o,a,l,f,r,s)}),vi(t,a,!1),r&&t.u&&Lr("Patches").N(o,r,t.u,t.s)}return o.o}function E2(t,e,r,o,a,i,s){if(Br(a)){var l=bi(t,a,i&&e&&e.i!==3&&!Sn(e.R,o)?i.concat(o):void 0);if(T2(r,o,l),!Br(l))return;t.m=!1}else s&&r.add(a);if(lr(a)&&!xl(a)){if(!t.h.D&&t._<1)return;bi(t,a),e&&e.A.l||vi(t,a)}}function vi(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&vl(e,r)}function dl(t,e){var r=t[Re];return(r?ro(r):t)[e]}function A2(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function oo(t){t.P||(t.P=!0,t.l&&oo(t.l))}function fl(t){t.o||(t.o=bl(t.t))}function hl(t,e,r){var o=gl(e)?Lr("MapSet").F(e,r):yl(e)?Lr("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ul(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=ha;s&&(f=[l],u=ua);var g=Proxy.revocable(f,u),y=g.revoke,b=g.proxy;return l.k=b,l.j=y,b}(e,r):Lr("ES5").J(e,r);return(r?r.A:ul()).p.push(o),o}function w3(t){return Br(t)||jt(22,t),function e(r){if(!lr(r))return r;var o,a=r[Re],i=On(r);if(a){if(!a.P&&(a.i<4||!Lr("ES5").K(a)))return a.t;a.I=!0,o=R2(r,i),a.I=!1}else o=R2(r,i);return Bo(o,function(s,l){a&&L3(a.t,s)===l||T2(o,s,e(l))}),i===3?new Set(o):o}(t)}function R2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return bl(t)}function M2(){function t(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[Re];return ha.get(u,s)},set:function(u){var g=this[Re];ha.set(g,s,u)}},f}function e(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Re];if(!f.P)switch(f.i){case 5:o(f)&&oo(f);break;case 4:r(f)&&oo(f)}}}function r(s){for(var l=s.t,f=s.k,u=Cn(f),g=u.length-1;g>=0;g--){var y=u[g];if(y!==Re){var b=l[y];if(b===void 0&&!Sn(l,y))return!0;var S=f[y],O=S&&S[Re];if(O?O.t!==b:!N2(S,b))return!0}}var A=!!l[Re];return u.length!==Cn(l).length+(A?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&jt(3,JSON.stringify(ro(s)))}var i={};A3("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(y,b){if(y){for(var S=Array(b.length),O=0;O<b.length;O++)Object.defineProperty(S,""+O,t(O,!0));return S}var A=P2(b);delete A[Re];for(var T=Cn(A),I=0;I<T.length;I++){var N=T[I];A[N]=t(N,y||!!A[N].enumerable)}return Object.create(Object.getPrototypeOf(b),A)}(f,s),g={i:f?5:4,A:l?l.A:ul(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Re,{value:g,writable:!0}),u},S:function(s,l,f){f?Br(l)&&l[Re].A===s&&e(s.p):(s.u&&function u(g){if(g&&typeof g=="object"){var y=g[Re];if(y){var b=y.t,S=y.k,O=y.R,A=y.i;if(A===4)Bo(S,function(F){F!==Re&&(b[F]!==void 0||Sn(b,F)?O[F]||u(S[F]):(O[F]=!0,oo(y)))}),Bo(b,function(F){S[F]!==void 0||Sn(S,F)||(O[F]=!1,oo(y))});else if(A===5){if(o(y)&&(oo(y),O.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)O[T]=!1;else for(var I=b.length;I<S.length;I++)O[I]=!0;for(var N=Math.min(S.length,b.length),D=0;D<N;D++)S.hasOwnProperty(D)||(O[D]=!0),O[D]===void 0&&u(S[D])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var w2,pa,Sl=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",k3=typeof Map<"u",_3=typeof Set<"u",k2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",I2=Sl?Symbol.for("immer-nothing"):((w2={})["immer-nothing"]=!0,w2),_2=Sl?Symbol.for("immer-draftable"):"__$immer_draftable",Re=Sl?Symbol.for("immer-state"):"__$immer_state";var T3=""+Object.prototype.constructor,Cn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,P2=Object.getOwnPropertyDescriptors||function(t){var e={};return Cn(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ml={},ha={get:function(t,e){if(e===Re)return t;var r=ro(t);if(!Sn(r,e))return function(a,i,s){var l,f=A2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!lr(o)?o:o===dl(t.t,e)?(fl(t),t.o[e]=hl(t.A.h,o,t)):o},has:function(t,e){return e in ro(t)},ownKeys:function(t){return Reflect.ownKeys(ro(t))},set:function(t,e,r){var o=A2(ro(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=dl(ro(t),e),i=a?.[Re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(N2(r,a)&&(r!==void 0||Sn(t.t,e)))return!0;fl(t),oo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return dl(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,fl(t),oo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ro(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){jt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){jt(12)}},ua={};Bo(ha,function(t,e){ua[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ua.deleteProperty=function(t,e){return ua.set.call(this,t,e,void 0)},ua.set=function(t,e,r){return ha.set.call(this,t[0],e,r,t[0])};var N3=function(){function t(r){var o=this;this.O=k2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=o;return function(A){var T=this;A===void 0&&(A=l);for(var I=arguments.length,N=Array(I>1?I-1:0),D=1;D<I;D++)N[D-1]=arguments[D];return f.produce(A,function(F){var oe;return(oe=i).call.apply(oe,[T,F].concat(N))})}}var u;if(typeof i!="function"&&jt(6),s!==void 0&&typeof s!="function"&&jt(7),lr(a)){var g=L2(o),y=hl(o,a,void 0),b=!0;try{u=i(y),b=!1}finally{b?yi(g):pl(g)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(A){return ll(g,s),cl(A,g)},function(A){throw yi(g),A}):(ll(g,s),cl(u,g))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===I2&&(u=void 0),o.D&&vl(u,!0),s){var S=[],O=[];Lr("Patches").M(a,u,S,O),s(S,O)}return u}jt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var g=arguments.length,y=Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];return o.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};var s,l,f=o.produce(a,i,function(u,g){s=u,l=g});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){lr(r)||jt(8),Br(r)&&(r=w3(r));var o=L2(this),a=hl(this,r,void 0);return a[Re].C=!0,pl(o),a},e.finishDraft=function(r,o){var a=r&&r[Re],i=a.A;return ll(i,o),cl(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!k2&&jt(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=Lr("Patches").$;return Br(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),Nt=new N3,M3=Nt.produce,hO=Nt.produceWithPatches.bind(Nt),mO=Nt.setAutoFreeze.bind(Nt),gO=Nt.setUseProxies.bind(Nt),yO=Nt.applyPatches.bind(Nt),bO=Nt.createDraft.bind(Nt),vO=Nt.finishDraft.bind(Nt),xi=M3;function Fo(t){"@babel/helpers - typeof";return Fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(t)}function z2(t,e){if(Fo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Fo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $2(t){var e=z2(t,"string");return Fo(e)=="symbol"?e:e+""}function D2(t,e,r){return(e=$2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Cl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?B2(Object(r),!0).forEach(function(o){D2(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B2(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ht(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var F2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ol=function(){return Math.random().toString(36).substring(7).split("").join(".")},Si={INIT:"@@redux/INIT"+Ol(),REPLACE:"@@redux/REPLACE"+Ol(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ol()}};function I3(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ll(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ht(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ht(1));return r(Ll)(t,e)}if(typeof t!="function")throw new Error(ht(2));var a=t,i=e,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function g(){if(f)throw new Error(ht(3));return i}function y(A){if(typeof A!="function")throw new Error(ht(4));if(f)throw new Error(ht(5));var T=!0;return u(),l.push(A),function(){if(T){if(f)throw new Error(ht(6));T=!1,u();var N=l.indexOf(A);l.splice(N,1),s=null}}}function b(A){if(!I3(A))throw new Error(ht(7));if(typeof A.type>"u")throw new Error(ht(8));if(f)throw new Error(ht(9));try{f=!0,i=a(i,A)}finally{f=!1}for(var T=s=l,I=0;I<T.length;I++){var N=T[I];N()}return A}function S(A){if(typeof A!="function")throw new Error(ht(10));a=A,b({type:Si.REPLACE})}function O(){var A,T=y;return A={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ht(11));function D(){N.next&&N.next(g())}D();var F=T(D);return{unsubscribe:F}}},A[F2]=function(){return this},A}return b({type:Si.INIT}),o={dispatch:b,subscribe:y,getState:g,replaceReducer:S},o[F2]=O,o}function P3(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Si.INIT});if(typeof o>"u")throw new Error(ht(12));if(typeof r(void 0,{type:Si.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ht(13))})}function U2(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{P3(r)}catch(f){l=f}return function(u,g){if(u===void 0&&(u={}),l)throw l;if(0)var y;for(var b=!1,S={},O=0;O<i.length;O++){var A=i[O],T=r[A],I=u[A],N=T(I,g);if(typeof N>"u"){var D=g&&g.type;throw new Error(ht(14))}S[A]=N,b=b||N!==I}return b=b||i.length!==Object.keys(u).length,b?S:u}}function Ln(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function H2(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ht(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(f){return f(s)});return i=Ln.apply(void 0,l)(a.dispatch),Cl(Cl({},a),{},{dispatch:i})}}}function G2(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var W2=G2();W2.withExtraArgument=G2;var El=W2;var Z2=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),z3=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(g){return f([u,g])}}function f(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(g){u=[6,g],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},En=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},$3=Object.defineProperty,D3=Object.defineProperties,B3=Object.getOwnPropertyDescriptors,V2=Object.getOwnPropertySymbols,F3=Object.prototype.hasOwnProperty,U3=Object.prototype.propertyIsEnumerable,j2=function(t,e,r){return e in t?$3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},no=function(t,e){for(var r in e||(e={}))F3.call(e,r)&&j2(t,r,e[r]);if(V2)for(var o=0,a=V2(e);o<a.length;o++){var r=a[o];U3.call(e,r)&&j2(t,r,e[r])}return t},Al=function(t,e){return D3(t,B3(e))},H3=function(t,e,r){return new Promise(function(o,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?o(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(t,e)).next())})};var G3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ln:Ln.apply(null,arguments)},$O=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function W3(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var V3=function(t){Z2(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,En([void 0],r[0].concat(this)))):new(e.bind.apply(e,En([void 0],r.concat(this))))},e}(Array),j3=function(t){Z2(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,En([void 0],r[0].concat(this)))):new(e.bind.apply(e,En([void 0],r.concat(this))))},e}(Array);function kl(t){return lr(t)?xi(t,function(){}):t}function K3(t){return typeof t=="boolean"}function q3(){return function(e){return Z3(e)}}function Z3(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,l=new V3;if(r&&(K3(r)?l.push(El):l.push(El.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var Rl=!0;function Y2(t){var e=q3(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,g=u===void 0?void 0:u,y=r.enhancers,b=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(W3(a))S=U2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var O=s;if(typeof O=="function"&&(O=O(e),!Rl&&!Array.isArray(O)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Rl&&O.some(function(F){return typeof F!="function"}))throw new Error("each middleware provided to configureStore must be a function");var A=H2.apply(void 0,O),T=Ln;f&&(T=G3(no({trace:!Rl},typeof f=="object"&&f)));var I=new j3(A),N=I;Array.isArray(b)?N=En([A],b):typeof b=="function"&&(N=b(I));var D=T.apply(void 0,N);return Ll(S,g,D)}function ao(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return no(no({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function X2(t){var e={},r=[],o,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function Y3(t){return typeof t=="function"}function X3(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?X2(e):[e,r,o],i=a[0],s=a[1],l=a[2],f;if(Y3(t))f=function(){return kl(t())};else{var u=kl(t);f=function(){return u}}function g(y,b){y===void 0&&(y=f());var S=En([i[b.type]],s.filter(function(O){var A=O.matcher;return A(b)}).map(function(O){var A=O.reducer;return A}));return S.filter(function(O){return!!O}).length===0&&(S=[l]),S.reduce(function(O,A){if(A)if(Br(O)){var T=O,I=A(T,b);return I===void 0?O:I}else{if(lr(O))return xi(O,function(N){return A(N,b)});var I=A(O,b);if(I===void 0){if(O===null)return O;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return O},y)}return g.getInitialState=f,g}function Q3(t,e){return t+"/"+e}function Q2(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:kl(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},l={};a.forEach(function(g){var y=o[g],b=Q3(e,g),S,O;"reducer"in y?(S=y.reducer,O=y.prepare):S=y,i[g]=S,s[b]=S,l[g]=O?ao(b,O):ao(b)});function f(){var g=typeof t.extraReducers=="function"?X2(t.extraReducers):[t.extraReducers],y=g[0],b=y===void 0?{}:y,S=g[1],O=S===void 0?[]:S,A=g[2],T=A===void 0?void 0:A,I=no(no({},b),s);return X3(r,function(N){for(var D in I)N.addCase(D,I[D]);for(var F=0,oe=O;F<oe.length;F++){var Le=oe[F];N.addMatcher(Le.matcher,Le.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:e,reducer:function(g,y){return u||(u=f()),u(g,y)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var J3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",em=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=J3[Math.random()*64|0];return e},tm=["name","message","stack","code"],wl=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),K2=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),rm=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=tm;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},UO=function(){function t(e,r,o){var a=ao(e+"/fulfilled",function(g,y,b,S){return{payload:g,meta:Al(no({},S||{}),{arg:b,requestId:y,requestStatus:"fulfilled"})}}),i=ao(e+"/pending",function(g,y,b){return{payload:void 0,meta:Al(no({},b||{}),{arg:y,requestId:g,requestStatus:"pending"})}}),s=ao(e+"/rejected",function(g,y,b,S,O){return{payload:S,error:(o&&o.serializeError||rm)(g||"Rejected"),meta:Al(no({},O||{}),{arg:b,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function g(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return g.prototype.abort=function(){},g}();function u(g){return function(y,b,S){var O=o?.idGenerator?o.idGenerator(g):em(),A=new f,T,I=!1;function N(F){T=F,A.abort()}var D=function(){return H3(this,null,function(){var F,oe,Le,Lt,et,yr,tt;return z3(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Lt=(F=o?.condition)==null?void 0:F.call(o,g,{getState:b,extra:S}),nm(Lt)?[4,Lt]:[3,2];case 1:Lt=x.sent(),x.label=2;case 2:if(Lt===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,et=new Promise(function(E,U){return A.signal.addEventListener("abort",function(){return U({name:"AbortError",message:T||"Aborted"})})}),y(i(O,g,(oe=o?.getPendingMeta)==null?void 0:oe.call(o,{requestId:O,arg:g},{getState:b,extra:S}))),[4,Promise.race([et,Promise.resolve(r(g,{dispatch:y,getState:b,extra:S,requestId:O,signal:A.signal,abort:N,rejectWithValue:function(E,U){return new wl(E,U)},fulfillWithValue:function(E,U){return new K2(E,U)}})).then(function(E){if(E instanceof wl)throw E;return E instanceof K2?a(E.payload,O,g,E.meta):a(E,O,g)})])];case 3:return Le=x.sent(),[3,5];case 4:return yr=x.sent(),Le=yr instanceof wl?s(null,O,g,yr.payload,yr.meta):s(yr,O,g),[3,5];case 5:return tt=o&&!o.dispatchConditionRejection&&s.match(Le)&&Le.meta.condition,tt||y(Le),[2,Le]}})})}();return Object.assign(D,{abort:N,requestId:O,arg:g,unwrap:function(){return D.then(om)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function om(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function nm(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var J2="listener",ef="completed",tf="cancelled",HO="task-"+tf,GO="task-"+ef,WO=J2+"-"+tf,VO=J2+"-"+ef;var _l="listenerMiddleware";var jO=ao(_l+"/add"),KO=ao(_l+"/removeAll"),qO=ao(_l+"/remove");var q2,ZO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(q2||(q2=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},am=function(t){return function(e){setTimeout(e,t)}},YO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:am(10);M2();var im=fi(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,o,a){this.eventBus.addEventListener(r,o,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,o,a){this.eventBus.removeEventListener(r,o,a)}}}),Ci=class extends im(Object){};window.ftReduxStores||(window.ftReduxStores={});var rf=class t extends Ci{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(gi(i))return i;if(a==null)return;let s=Q2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Y2({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let g=f2(s.getInitialState());for(let y of u.keeping)g[y]=(f??g)[y];return g}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ui;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...g)=>{let y=u(...g.map(a));return this.reduxStore.dispatch(y),y}:g=>{this.setState({[f]:a(g)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Oi=class{static format(e,r,o,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a)):this.getIntlDateTime(e,r,o,a)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Li=h(L()),sm="ft-app-info",Uo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Uo.eventName="authentication-change";var lm={session:(t,e)=>{(0,Li.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>z.dispatchEvent(new Uo(e.payload)),0))}},z=Li.FtReduxStore.get({name:sm,reducers:lm,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var of=h(L()),Ei=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},LL=(0,of.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}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=>Oi.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ei([(0,Tl.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ei([(0,Tl.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ei([sl({store:z.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Ei([sl({store:z.name})],e.prototype,"uiLocale",void 0),e});var dm=h(af(),1);var sf;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(sf||(sf={}));var lf;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(lf||(lf={}));var cf;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(cf||(cf={}));var df;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(df||(df={}));var ff;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ff||(ff={}));var uf;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(uf||(uf={}));var pf;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(pf||(pf={}));var hf;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(hf||(hf={}));var mf;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(mf||(mf={}));var gf;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(gf||(gf={}));var yf;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(yf||(yf={}));var bf;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(bf||(bf={}));var vf;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(vf||(vf={}));var xf;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(xf||(xf={}));var Nl;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nl||(Nl={}));var Sf;(function(t){t.ASC="ASC",t.DESC="DESC"})(Sf||(Sf={}));var Cf;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Cf||(Cf={}));var Ml;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ml||(Ml={}));var Of;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Of||(Of={}));var Lf;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Lf||(Lf={}));var Ef;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ef||(Ef={}));var Af;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Af||(Af={}));var Rf;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Rf||(Rf={}));var Il;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Il||(Il={}));var wf;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(wf||(wf={}));var ze;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ze||(ze={}));var Kt;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Kt||(Kt={}));var kf;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(kf||(kf={}));var _f;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(_f||(_f={}));var Tf;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(Tf||(Tf={}));var Nf;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Nf||(Nf={}));var Mf;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Mf||(Mf={}));var If;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(If||(If={}));var Pf;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Pf||(Pf={}));var zf;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(zf||(zf={}));var $f;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})($f||($f={}));var cm={[ze.PERSONAL_BOOK_SHARE_USER]:[ze.PERSONAL_BOOK_USER],[ze.HTML_EXPORT_USER]:[ze.PERSONAL_BOOK_USER],[ze.PDF_EXPORT_USER]:[ze.PERSONAL_BOOK_USER],[ze.KHUB_ADMIN]:[ze.CONTENT_PUBLISHER],[ze.ADMIN]:[ze.KHUB_ADMIN,ze.USERS_ADMIN,ze.PORTAL_ADMIN,ze.BEHAVIOR_DATA_USER],[ze.GENERATIVE_AI_EXPORT_USER]:[ze.GENERATIVE_AI_USER]};function Df(t,e){return t===e||(cm[t]??[]).some(r=>Df(r,e))}function Bf(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>Df(o,e))}var Mi=h(L());var Pl=h(L());var Ho=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=z.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=z.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var wi=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ho.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ho.await()}};var Rt=class extends wi{constructor(e=!0,r){var o;super(r),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 Pl.CacheRegistry,this.cache=e?a.commonCache:new Pl.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ki=class extends Rt{async listMySearches(){let{session:e}=z.getState();return Bf(e,ze.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var _i=class extends Rt{async listMyBookmarks(){let e=z.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ti=class extends Rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=z.getState().session;return!!e?.sessionAuthenticated}};var Ni=class extends Rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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 e=z.getState().session;return!!e?.sessionAuthenticated}};var fm="ft-user-assets",um={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(Kt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;$l(t,r,[...zl(t,r),a]),Ff(t,r,1,o),Uf(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;$l(t,r,zl(t,r).map(a=>a.id===o.id?o:a)),Uf(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;$l(t,r,zl(t,r).filter(i=>i.id!==a)),Ff(t,r,-1,o)}},Hf={[Kt.SEARCHES]:"savedSearches",[Kt.BOOKMARKS]:"bookmarks",[Kt.BOOKS]:void 0,[Kt.COLLECTIONS]:void 0},zl=(t,e)=>{var r;let o=Hf[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},$l=(t,e,r)=>{let o=Hf[e];o&&(t[o]=r)},Ff=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===Kt.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},Uf=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Mt=Mi.FtReduxStore.get({name:fm,reducers:um,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Kt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Dl=class{constructor(e=new Ti,r=new Ni){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new _i,this.savedSearchesService=new ki,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=z.getState();(0,Mi.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Mt.actions.clearAssetCount(),Mt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Mt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Mt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Mt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Mt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Mt.getState().assetCounts.bookmarkByMap).length!==0;e===Kt.BOOKMARKS&&r&&Mt.actions.clearBookmarkCountByMap(),Mt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mt.actions.bookmarks(r)}}},pm=new Dl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pm);var Bl=class{addCommand(e,r=!1){z.commands.add(e,r)}consumeCommand(e){return z.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Bl;var qt=h(L());var Gf,Rn=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},hm=Symbol("clearAfterUnitTest"),Ii=class extends(0,qt.withEventBus)(Rt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Gf]=()=>{this.defaultMessages={},this.cache=new qt.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=z.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};(0,qt.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new qt.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof qt.CanceledPromiseError)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Rn({loadedContexts:e})),this.dispatchEvent(new Rn({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Rn({loadedContexts:[e]})),this.dispatchEvent(new Rn({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,qt.delay)(0).then(()=>o()).catch(()=>null)))}};Gf=hm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ii{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ii{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var wn=window.FluidTopicsI18nService,Pi=window.FluidTopicsCustomI18nService;var Wf=h(L()),Fl=class{highlightHtml(e,r,o){(0,Wf.highlightHtml)(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Fl;var Vf=h(L());var Ul=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i;if(e==null)return"";try{return Vf.DateFormatter.format(e,(o=r?.locale)!==null&&o!==void 0?o:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new Ul;var jf=h(L());var Fr=class{static get(e,r){var o,a;let i=z.getState(),{lang:s,region:l}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new jf.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Hl=class{urlToSearchRequest(e){return Fr.get().parse(e)}searchRequestToUrl(e){return Fr.get().serialize(e)}};window.FluidTopicsUrlService=new Hl;var so=h(L());var Go=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Go.eventName="change";var Gl=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Kf=new Gl;var zi=class t extends so.WithEventBus{static build(){return new t(window.history,Kf,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,so.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Go(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Go.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Go.eventName,e)}currentItem(){return(0,so.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,so.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,so.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var qf=h(k());var Zf=qf.css`
534
+ `;var $1=["top","right","bottom","left"],z1=["start","end"],Js=$1.reduce((t,e)=>t.concat(e,e+"-"+z1[0],e+"-"+z1[1]),[]),aa=Math.min,Jr=Math.max,ia=Math.round;var sr=t=>({x:t,y:t}),t3={left:"right",right:"left",bottom:"top",top:"bottom"};function el(t,e,r){return Jr(t,aa(e,r))}function ti(t,e){return typeof t=="function"?t(e):t}function gn(t){return t.split("-")[0]}function eo(t){return t.split("-")[1]}function tl(t){return t==="x"?"y":"x"}function rl(t){return t==="y"?"height":"width"}function ri(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function ol(t){return tl(ri(t))}function D1(t,e,r){r===void 0&&(r=!1);let o=eo(t),a=ol(t),i=rl(a),s=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Qs(s)),[s,Qs(s)]}function B1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Qs(t){let e=gn(t);return t3[e]+t.slice(e.length)}function r3(t){return{top:0,right:0,bottom:0,left:0,...t}}function F1(t){return typeof t!="number"?r3(t):{top:t,right:t,bottom:t,left:t}}function Mo(t){let{x:e,y:r,width:o,height:a}=t;return{width:o,height:a,top:r,left:e,right:e+o,bottom:r+a,x:e,y:r}}function U1(t,e,r){let{reference:o,floating:a}=t,i=ri(e),s=ol(e),l=rl(s),f=gn(e),u=i==="y",g=o.x+o.width/2-a.width/2,y=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,S;switch(f){case"top":S={x:g,y:o.y-a.height};break;case"bottom":S={x:g,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y};break;case"left":S={x:o.x-a.width,y};break;default:S={x:o.x,y:o.y}}switch(eo(e)){case"start":S[s]-=b*(r&&u?-1:1);break;case"end":S[s]+=b*(r&&u?-1:1);break}return S}async function H1(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:g="viewport",elementContext:y="floating",altBoundary:b=!1,padding:S=0}=ti(e,t),O=F1(S),T=l[b?y==="floating"?"reference":"floating":y],I=Mo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(T)))==null||r?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:g,strategy:f})),N=y==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),F=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},oe=Mo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:D,strategy:f}):N);return{top:(I.top-oe.top+O.top)/F.y,bottom:(oe.bottom-I.bottom+O.bottom)/F.y,left:(I.left-oe.left+O.left)/F.x,right:(oe.right-I.right+O.right)/F.x}}var o3=50,G1=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:H1},f=await(s.isRTL==null?void 0:s.isRTL(e)),u=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:g,y}=U1(u,o,f),b=o,S=0,O={};for(let A=0;A<i.length;A++){let T=i[A];if(!T)continue;let{name:I,fn:N}=T,{x:D,y:F,data:oe,reset:Le}=await N({x:g,y,initialPlacement:o,placement:b,strategy:a,middlewareData:O,rects:u,platform:l,elements:{reference:t,floating:e}});g=D??g,y=F??y,O[I]={...O[I],...oe},Le&&S<o3&&(S++,typeof Le=="object"&&(Le.placement&&(b=Le.placement),Le.rects&&(u=Le.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):Le.rects),{x:g,y}=U1(u,b,f)),A=-1)}return{x:g,y,placement:b,strategy:a,middlewareData:O}};function n3(t,e,r){return(t?[...r.filter(a=>eo(a)===t),...r.filter(a=>eo(a)!==t)]:r.filter(a=>gn(a)===a)).filter(a=>t?eo(a)===t||(e?B1(a)!==a:!1):!0)}var W1=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,o,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:u}=e,{crossAxis:g=!1,alignment:y,allowedPlacements:b=Js,autoAlignment:S=!0,...O}=ti(t,e),A=y!==void 0||b===Js?n3(y||null,S,b):b,T=await f.detectOverflow(e,O),I=((r=s.autoPlacement)==null?void 0:r.index)||0,N=A[I];if(N==null)return{};let D=D1(N,i,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(l!==N)return{reset:{placement:A[0]}};let F=[T[gn(N)],T[D[0]],T[D[1]]],oe=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:F}],Le=A[I+1];if(Le)return{data:{index:I+1,overflows:oe},reset:{placement:Le}};let Lt=oe.map(tt=>{let x=eo(tt.placement);return[tt.placement,x&&g?tt.overflows.slice(0,2).reduce((E,U)=>E+U,0):tt.overflows[0],tt.overflows]}).sort((tt,x)=>tt[1]-x[1]),yr=((a=Lt.filter(tt=>tt[2].slice(0,eo(tt[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||Lt[0][0];return yr!==l?{data:{index:I+1,overflows:oe},reset:{placement:yr}}:{}}}};var V1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:o,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:I=>{let{x:N,y:D}=I;return{x:N,y:D}}},...u}=ti(t,e),g={x:r,y:o},y=await i.detectOverflow(e,u),b=ri(gn(a)),S=tl(b),O=g[S],A=g[b];if(s){let I=S==="y"?"top":"left",N=S==="y"?"bottom":"right",D=O+y[I],F=O-y[N];O=el(D,O,F)}if(l){let I=b==="y"?"top":"left",N=b==="y"?"bottom":"right",D=A+y[I],F=A-y[N];A=el(D,A,F)}let T=f.fn({...e,[S]:O,[b]:A});return{...T,data:{x:T.x-r,y:T.y-o,enabled:{[S]:s,[b]:l}}}}}};function ni(){return typeof window<"u"}function Po(t){return K1(t)?(t.nodeName||"").toLowerCase():"#document"}function At(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Sr(t){var e;return(e=(K1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function K1(t){return ni()?t instanceof Node||t instanceof At(t).Node:!1}function Wt(t){return ni()?t instanceof Element||t instanceof At(t).Element:!1}function Cr(t){return ni()?t instanceof HTMLElement||t instanceof At(t).HTMLElement:!1}function j1(t){return!ni()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof At(t).ShadowRoot}function yn(t){let{overflow:e,overflowX:r,overflowY:o,display:a}=Vt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+r)&&a!=="inline"&&a!=="contents"}function q1(t){return/^(table|td|th)$/.test(Po(t))}function sa(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var a3=/transform|translate|scale|rotate|perspective|filter/,i3=/paint|layout|strict|content/,Io=t=>!!t&&t!=="none",nl;function ai(t){let e=Wt(t)?Vt(t):t;return Io(e.transform)||Io(e.translate)||Io(e.scale)||Io(e.rotate)||Io(e.perspective)||!ii()&&(Io(e.backdropFilter)||Io(e.filter))||a3.test(e.willChange||"")||i3.test(e.contain||"")}function Z1(t){let e=Dr(t);for(;Cr(e)&&!zo(e);){if(ai(e))return e;if(sa(e))return null;e=Dr(e)}return null}function ii(){return nl==null&&(nl=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nl}function zo(t){return/^(html|body|#document)$/.test(Po(t))}function Vt(t){return At(t).getComputedStyle(t)}function la(t){return Wt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Dr(t){if(Po(t)==="html")return t;let e=t.assignedSlot||t.parentNode||j1(t)&&t.host||Sr(t);return j1(e)?e.host:e}function Y1(t){let e=Dr(t);return zo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Cr(e)&&yn(e)?e:Y1(e)}function oi(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=Y1(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),s=At(a);if(i){let l=si(s);return e.concat(s,s.visualViewport||[],yn(a)?a:[],l&&r?oi(l):[])}else return e.concat(a,oi(a,[],r))}function si(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function e2(t){let e=Vt(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=Cr(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:o,l=ia(r)!==i||ia(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function t2(t){return Wt(t)?t:t.contextElement}function bn(t){let e=t2(t);if(!Cr(e))return sr(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=e2(e),s=(i?ia(r.width):r.width)/o,l=(i?ia(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var s3=sr(0);function r2(t){let e=At(t);return!ii()||!e.visualViewport?s3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function l3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==At(t)?!1:e}function ca(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=t2(t),s=sr(1);e&&(o?Wt(o)&&(s=bn(o)):s=bn(t));let l=l3(i,r,o)?r2(i):sr(0),f=(a.left+l.x)/s.x,u=(a.top+l.y)/s.y,g=a.width/s.x,y=a.height/s.y;if(i){let b=At(i),S=o&&Wt(o)?At(o):o,O=b,A=si(O);for(;A&&o&&S!==O;){let T=bn(A),I=A.getBoundingClientRect(),N=Vt(A),D=I.left+(A.clientLeft+parseFloat(N.paddingLeft))*T.x,F=I.top+(A.clientTop+parseFloat(N.paddingTop))*T.y;f*=T.x,u*=T.y,g*=T.x,y*=T.y,f+=D,u+=F,O=At(A),A=si(O)}}return Mo({width:g,height:y,x:f,y:u})}function li(t,e){let r=la(t).scrollLeft;return e?e.left+r:ca(Sr(t)).left+r}function o2(t,e){let r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-li(t,r),a=r.top+e.scrollTop;return{x:o,y:a}}function c3(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",s=Sr(o),l=e?sa(e.floating):!1;if(o===s||l&&i)return r;let f={scrollLeft:0,scrollTop:0},u=sr(1),g=sr(0),y=Cr(o);if((y||!y&&!i)&&((Po(o)!=="body"||yn(s))&&(f=la(o)),y)){let S=ca(o);u=bn(o),g.x=S.x+o.clientLeft,g.y=S.y+o.clientTop}let b=s&&!y&&!i?o2(s,f):sr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-f.scrollLeft*u.x+g.x+b.x,y:r.y*u.y-f.scrollTop*u.y+g.y+b.y}}function d3(t){return Array.from(t.getClientRects())}function f3(t){let e=Sr(t),r=la(t),o=t.ownerDocument.body,a=Jr(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=Jr(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+li(t),l=-r.scrollTop;return Vt(o).direction==="rtl"&&(s+=Jr(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:l}}var X1=25;function u3(t,e){let r=At(t),o=Sr(t),a=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,f=0;if(a){i=a.width,s=a.height;let g=ii();(!g||g&&e==="fixed")&&(l=a.offsetLeft,f=a.offsetTop)}let u=li(o);if(u<=0){let g=o.ownerDocument,y=g.body,b=getComputedStyle(y),S=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,O=Math.abs(o.clientWidth-y.clientWidth-S);O<=X1&&(i-=O)}else u<=X1&&(i+=u);return{width:i,height:s,x:l,y:f}}function p3(t,e){let r=ca(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=Cr(t)?bn(t):sr(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,f=a*i.x,u=o*i.y;return{width:s,height:l,x:f,y:u}}function Q1(t,e,r){let o;if(e==="viewport")o=u3(t,r);else if(e==="document")o=f3(Sr(t));else if(Wt(e))o=p3(e,r);else{let a=r2(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Mo(o)}function n2(t,e){let r=Dr(t);return r===e||!Wt(r)||zo(r)?!1:Vt(r).position==="fixed"||n2(r,e)}function h3(t,e){let r=e.get(t);if(r)return r;let o=oi(t,[],!1).filter(l=>Wt(l)&&Po(l)!=="body"),a=null,i=Vt(t).position==="fixed",s=i?Dr(t):t;for(;Wt(s)&&!zo(s);){let l=Vt(s),f=ai(s);!f&&l.position==="fixed"&&(a=null),(i?!f&&!a:!f&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||yn(s)&&!f&&n2(t,s))?o=o.filter(g=>g!==s):a=l,s=Dr(s)}return e.set(t,o),o}function m3(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,s=[...r==="clippingAncestors"?sa(e)?[]:h3(e,this._c):[].concat(r),o],l=Q1(e,s[0],a),f=l.top,u=l.right,g=l.bottom,y=l.left;for(let b=1;b<s.length;b++){let S=Q1(e,s[b],a);f=Jr(S.top,f),u=aa(S.right,u),g=aa(S.bottom,g),y=Jr(S.left,y)}return{width:u-y,height:g-f,x:y,y:f}}function g3(t){let{width:e,height:r}=e2(t);return{width:e,height:r}}function y3(t,e,r){let o=Cr(e),a=Sr(e),i=r==="fixed",s=ca(t,!0,i,e),l={scrollLeft:0,scrollTop:0},f=sr(0);function u(){f.x=li(a)}if(o||!o&&!i)if((Po(e)!=="body"||yn(a))&&(l=la(e)),o){let S=ca(e,!0,i,e);f.x=S.x+e.clientLeft,f.y=S.y+e.clientTop}else a&&u();i&&!o&&a&&u();let g=a&&!o&&!i?o2(a,l):sr(0),y=s.left+l.scrollLeft-f.x-g.x,b=s.top+l.scrollTop-f.y-g.y;return{x:y,y:b,width:s.width,height:s.height}}function al(t){return Vt(t).position==="static"}function J1(t,e){if(!Cr(t)||Vt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Sr(t)===r&&(r=r.ownerDocument.body),r}function a2(t,e){let r=At(t);if(sa(t))return r;if(!Cr(t)){let a=Dr(t);for(;a&&!zo(a);){if(Wt(a)&&!al(a))return a;a=Dr(a)}return r}let o=J1(t,e);for(;o&&q1(o)&&al(o);)o=J1(o,e);return o&&zo(o)&&al(o)&&!ai(o)?r:o||Z1(t)||r}var b3=async function(t){let e=this.getOffsetParent||a2,r=this.getDimensions,o=await r(t.floating);return{reference:y3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function v3(t){return Vt(t).direction==="rtl"}var ci={convertOffsetParentRelativeRectToViewportRelativeRect:c3,getDocumentElement:Sr,getClippingRect:m3,getOffsetParent:a2,getElementRects:b3,getClientRects:d3,getDimensions:g3,getScale:bn,isElement:Wt,isRTL:v3};var i2=W1,s2=V1;var l2=(t,e,r)=>{let o=new Map,a={platform:ci,...r},i={...a.platform,_c:o};return G1(t,e,{...a,platform:i})};function c2(t){return x3(t)}function il(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function x3(t){for(let e=t;e;e=il(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=il(t);e;e=il(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||e.tagName==="BODY"))return e}return null}async function d2(t,e,r){let o;return typeof r=="object"?o=r:o={placement:r},l2(t,e,{strategy:o.strategy,platform:{...ci,getOffsetParent:a=>ci.getOffsetParent(a,c2)},middleware:[s2({crossAxis:!0}),i2({allowedPlacements:[o.placement]})]})}var _n=h(L());var Tl=h(V());function S3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,o,a;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(o=r;o--!==0;)if(!di(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!di(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(t),r=a.length,r!==i(e).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[o]))return!1;for(o=r;o--!==0;){let s=a[o];if(!di(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function di(t,e){try{return S3(t,e)}catch{return!1}}function da(t,e){return!di(t,e)}function f2(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function fi(t,e){let r=o=>o[t]===!0;return o=>{if(r(o))return o;let a=e(o);return a[t]=!0,a}}var u2=h(V(),1);var sl=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:da,attribute:!1,...e};(0,u2.property)(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[o],store:e.store})}};var ui=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var $o=h(V(),1);var p2=h(V(),1);function h2(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,p2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return r();try{return JSON.parse(o)}catch{return r()}},toAttribute:o=>JSON.stringify(o)},hasChanged:da,...e??{}})}var pi=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,o)=>{this.resolvePromise=r,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let o=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>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 g2=h(k(),1);var hi=globalThis,C3=hi.ShadowRoot&&(hi.ShadyCSS===void 0||hi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,JC=Symbol();var m2=(t,e)=>{if(C3)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let o=document.createElement("style"),a=hi.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}};var mi=class extends g2.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let r={...e.shadowRootOptions,customElements:e.registry},o=this.renderOptions.creationScope=this.attachShadow(r);return m2(o,e.elementStyles),o}};function y2(t,e,...r){var o;let a=t.querySelector(e);for(let i of r)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var xn=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},S2,b2=Symbol("constructorPrototype"),v2=Symbol("constructorName"),C2=Symbol("exportpartsDebouncer"),x2=Symbol("dynamicDependenciesLoaded"),vn=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};vn.eventName="exportparts-updated";var Or=class extends mi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[S2]=new pi(5),this.scheduleExportpartsUpdate=()=>{var e,r,o;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(o=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&o!==void 0&&o)&&this[C2].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[v2]=this.constructor.name,this[b2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[v2]&&Object.setPrototypeOf(this,this[b2])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let r=this.constructor;r[x2]||(r[x2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(vn.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(vn.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new vn)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];r=y2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,o,a;if(((o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.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(e){var r,o,a,i,s,l;let f=b=>b!=null&&b.trim().length>0,u=e.filter(f).map(b=>b.trim());if(u.length===0){this.exportparts=void 0;return}let g=new Set;for(let b of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],O=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&l!==void 0?l:[],A=[...S,...O].filter(f).map(T=>T.trim());for(let T of A)g.add(T)}if(g.size===0){this.exportparts=void 0;return}let y=[...g.values()].flatMap(b=>u.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...y].join(", ")}};S2=C2;xn([(0,$o.property)()],Or.prototype,"exportpartsPrefix",void 0);xn([h2([])],Or.prototype,"exportpartsPrefixes",void 0);xn([(0,$o.property)({reflect:!0})],Or.prototype,"exportparts",void 0);xn([(0,$o.property)()],Or.prototype,"customStylesheet",void 0);xn([(0,$o.property)()],Or.prototype,"elementToFocus",void 0);xn([(0,$o.state)()],Or.prototype,"useAdoptedStyleSheets",void 0);function gi(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var fa=Symbol("internalReduxEventsUnsubscribers"),to=Symbol("internalStoresUnsubscribers"),Do=Symbol("internalStores"),O3=fi(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Do].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Do].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Do].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Do].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Do].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Do].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 u=this.getStore(s.store);u&&(s.store?this[to].has(s.store):this[to].size>0)&&(this[l]=s.selector(u.getState(),this))}})}subscribeToStore(s,l){var f;this[to].set(s,l.subscribe(()=>this.updateFromStores())),this[fa].set(s,[]),gi(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((u,g)=>{if(typeof this[g]=="function"&&(!u.store||l.name===u.store)){let y=b=>this[g](b);l.addEventListener(u.eventName,y),this[fa].get(s).push(()=>l.removeEventListener(u.eventName,y))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[to].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[to].has(s)&&this[to].get(s)(),this[to].delete(s),(l=this[fa].get(s))===null||l===void 0||l.forEach(f=>f()),this[fa].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=to,r=Do,o=fa,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),O2=class extends O3(Or){};function jt(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Br(t){return!!t&&!!t[Re]}function lr(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===T3}(t)||Array.isArray(t)||!!t[_2]||!!(!((e=t.constructor)===null||e===void 0)&&e[_2])||gl(t)||yl(t))}function Bo(t,e,r){r===void 0&&(r=!1),On(t)===0?(r?Object.keys:Cn)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function On(t){var e=t[Re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:gl(t)?2:yl(t)?3:0}function Sn(t,e){return On(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function L3(t,e){return On(t)===2?t.get(e):t[e]}function T2(t,e,r){var o=On(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function N2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function gl(t){return k3&&t instanceof Map}function yl(t){return _3&&t instanceof Set}function ro(t){return t.o||t.t}function bl(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=P2(t);delete e[Re];for(var r=Cn(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function vl(t,e){return e===void 0&&(e=!1),xl(t)||Br(t)||!lr(t)||(On(t)>1&&(t.set=t.add=t.clear=t.delete=E3),Object.freeze(t),e&&Bo(t,function(r,o){return vl(o,!0)},!0)),t}function E3(){jt(2)}function xl(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Lr(t){var e=ml[t];return e||jt(18,t),e}function A3(t,e){ml[t]||(ml[t]=e)}function ul(){return pa}function ll(t,e){e&&(Lr("Patches"),t.u=[],t.s=[],t.v=e)}function yi(t){pl(t),t.p.forEach(R3),t.p=null}function pl(t){t===pa&&(pa=t.l)}function L2(t){return pa={p:[],l:pa,h:t,m:!0,_:0}}function R3(t){var e=t[Re];e.i===0||e.i===1?e.j():e.g=!0}function cl(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Lr("ES5").S(e,t,o),o?(r[Re].P&&(yi(e),jt(4)),lr(t)&&(t=bi(e,t),e.l||vi(e,t)),e.u&&Lr("Patches").M(r[Re].t,t,e.u,e.s)):t=bi(e,r,[]),yi(e),e.u&&e.v(e.u,e.s),t!==I2?t:void 0}function bi(t,e,r){if(xl(e))return e;var o=e[Re];if(!o)return Bo(e,function(l,f){return E2(t,o,e,l,f,r)},!0),e;if(o.A!==t)return e;if(!o.P)return vi(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=bl(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Bo(i,function(l,f){return E2(t,o,a,l,f,r,s)}),vi(t,a,!1),r&&t.u&&Lr("Patches").N(o,r,t.u,t.s)}return o.o}function E2(t,e,r,o,a,i,s){if(Br(a)){var l=bi(t,a,i&&e&&e.i!==3&&!Sn(e.R,o)?i.concat(o):void 0);if(T2(r,o,l),!Br(l))return;t.m=!1}else s&&r.add(a);if(lr(a)&&!xl(a)){if(!t.h.D&&t._<1)return;bi(t,a),e&&e.A.l||vi(t,a)}}function vi(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&vl(e,r)}function dl(t,e){var r=t[Re];return(r?ro(r):t)[e]}function A2(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function oo(t){t.P||(t.P=!0,t.l&&oo(t.l))}function fl(t){t.o||(t.o=bl(t.t))}function hl(t,e,r){var o=gl(e)?Lr("MapSet").F(e,r):yl(e)?Lr("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ul(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},f=l,u=ha;s&&(f=[l],u=ua);var g=Proxy.revocable(f,u),y=g.revoke,b=g.proxy;return l.k=b,l.j=y,b}(e,r):Lr("ES5").J(e,r);return(r?r.A:ul()).p.push(o),o}function w3(t){return Br(t)||jt(22,t),function e(r){if(!lr(r))return r;var o,a=r[Re],i=On(r);if(a){if(!a.P&&(a.i<4||!Lr("ES5").K(a)))return a.t;a.I=!0,o=R2(r,i),a.I=!1}else o=R2(r,i);return Bo(o,function(s,l){a&&L3(a.t,s)===l||T2(o,s,e(l))}),i===3?new Set(o):o}(t)}function R2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return bl(t)}function M2(){function t(s,l){var f=i[s];return f?f.enumerable=l:i[s]=f={configurable:!0,enumerable:l,get:function(){var u=this[Re];return ha.get(u,s)},set:function(u){var g=this[Re];ha.set(g,s,u)}},f}function e(s){for(var l=s.length-1;l>=0;l--){var f=s[l][Re];if(!f.P)switch(f.i){case 5:o(f)&&oo(f);break;case 4:r(f)&&oo(f)}}}function r(s){for(var l=s.t,f=s.k,u=Cn(f),g=u.length-1;g>=0;g--){var y=u[g];if(y!==Re){var b=l[y];if(b===void 0&&!Sn(l,y))return!0;var S=f[y],O=S&&S[Re];if(O?O.t!==b:!N2(S,b))return!0}}var A=!!l[Re];return u.length!==Cn(l).length+(A?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var f=Object.getOwnPropertyDescriptor(l,l.length-1);if(f&&!f.get)return!0;for(var u=0;u<l.length;u++)if(!l.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&jt(3,JSON.stringify(ro(s)))}var i={};A3("ES5",{J:function(s,l){var f=Array.isArray(s),u=function(y,b){if(y){for(var S=Array(b.length),O=0;O<b.length;O++)Object.defineProperty(S,""+O,t(O,!0));return S}var A=P2(b);delete A[Re];for(var T=Cn(A),I=0;I<T.length;I++){var N=T[I];A[N]=t(N,y||!!A[N].enumerable)}return Object.create(Object.getPrototypeOf(b),A)}(f,s),g={i:f?5:4,A:l?l.A:ul(),P:!1,I:!1,R:{},l,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Re,{value:g,writable:!0}),u},S:function(s,l,f){f?Br(l)&&l[Re].A===s&&e(s.p):(s.u&&function u(g){if(g&&typeof g=="object"){var y=g[Re];if(y){var b=y.t,S=y.k,O=y.R,A=y.i;if(A===4)Bo(S,function(F){F!==Re&&(b[F]!==void 0||Sn(b,F)?O[F]||u(S[F]):(O[F]=!0,oo(y)))}),Bo(b,function(F){S[F]!==void 0||Sn(S,F)||(O[F]=!1,oo(y))});else if(A===5){if(o(y)&&(oo(y),O.length=!0),S.length<b.length)for(var T=S.length;T<b.length;T++)O[T]=!1;else for(var I=b.length;I<S.length;I++)O[I]=!0;for(var N=Math.min(S.length,b.length),D=0;D<N;D++)S.hasOwnProperty(D)||(O[D]=!0),O[D]===void 0&&u(S[D])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var w2,pa,Sl=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",k3=typeof Map<"u",_3=typeof Set<"u",k2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",I2=Sl?Symbol.for("immer-nothing"):((w2={})["immer-nothing"]=!0,w2),_2=Sl?Symbol.for("immer-draftable"):"__$immer_draftable",Re=Sl?Symbol.for("immer-state"):"__$immer_state";var T3=""+Object.prototype.constructor,Cn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,P2=Object.getOwnPropertyDescriptors||function(t){var e={};return Cn(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ml={},ha={get:function(t,e){if(e===Re)return t;var r=ro(t);if(!Sn(r,e))return function(a,i,s){var l,f=A2(i,s);return f?"value"in f?f.value:(l=f.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!lr(o)?o:o===dl(t.t,e)?(fl(t),t.o[e]=hl(t.A.h,o,t)):o},has:function(t,e){return e in ro(t)},ownKeys:function(t){return Reflect.ownKeys(ro(t))},set:function(t,e,r){var o=A2(ro(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=dl(ro(t),e),i=a?.[Re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(N2(r,a)&&(r!==void 0||Sn(t.t,e)))return!0;fl(t),oo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return dl(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,fl(t),oo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=ro(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){jt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){jt(12)}},ua={};Bo(ha,function(t,e){ua[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ua.deleteProperty=function(t,e){return ua.set.call(this,t,e,void 0)},ua.set=function(t,e,r){return ha.set.call(this,t[0],e,r,t[0])};var N3=function(){function t(r){var o=this;this.O=k2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var f=o;return function(A){var T=this;A===void 0&&(A=l);for(var I=arguments.length,N=Array(I>1?I-1:0),D=1;D<I;D++)N[D-1]=arguments[D];return f.produce(A,function(F){var oe;return(oe=i).call.apply(oe,[T,F].concat(N))})}}var u;if(typeof i!="function"&&jt(6),s!==void 0&&typeof s!="function"&&jt(7),lr(a)){var g=L2(o),y=hl(o,a,void 0),b=!0;try{u=i(y),b=!1}finally{b?yi(g):pl(g)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(A){return ll(g,s),cl(A,g)},function(A){throw yi(g),A}):(ll(g,s),cl(u,g))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===I2&&(u=void 0),o.D&&vl(u,!0),s){var S=[],O=[];Lr("Patches").M(a,u,S,O),s(S,O)}return u}jt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var g=arguments.length,y=Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];return o.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(y))})};var s,l,f=o.produce(a,i,function(u,g){s=u,l=g});return typeof Promise<"u"&&f instanceof Promise?f.then(function(u){return[u,s,l]}):[f,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){lr(r)||jt(8),Br(r)&&(r=w3(r));var o=L2(this),a=hl(this,r,void 0);return a[Re].C=!0,pl(o),a},e.finishDraft=function(r,o){var a=r&&r[Re],i=a.A;return ll(i,o),cl(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!k2&&jt(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=Lr("Patches").$;return Br(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),Nt=new N3,M3=Nt.produce,hO=Nt.produceWithPatches.bind(Nt),mO=Nt.setAutoFreeze.bind(Nt),gO=Nt.setUseProxies.bind(Nt),yO=Nt.applyPatches.bind(Nt),bO=Nt.createDraft.bind(Nt),vO=Nt.finishDraft.bind(Nt),xi=M3;function Fo(t){"@babel/helpers - typeof";return Fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(t)}function z2(t,e){if(Fo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Fo(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $2(t){var e=z2(t,"string");return Fo(e)=="symbol"?e:e+""}function D2(t,e,r){return(e=$2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Cl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?B2(Object(r),!0).forEach(function(o){D2(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B2(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ht(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var F2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ol=function(){return Math.random().toString(36).substring(7).split("").join(".")},Si={INIT:"@@redux/INIT"+Ol(),REPLACE:"@@redux/REPLACE"+Ol(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ol()}};function I3(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ll(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ht(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ht(1));return r(Ll)(t,e)}if(typeof t!="function")throw new Error(ht(2));var a=t,i=e,s=[],l=s,f=!1;function u(){l===s&&(l=s.slice())}function g(){if(f)throw new Error(ht(3));return i}function y(A){if(typeof A!="function")throw new Error(ht(4));if(f)throw new Error(ht(5));var T=!0;return u(),l.push(A),function(){if(T){if(f)throw new Error(ht(6));T=!1,u();var N=l.indexOf(A);l.splice(N,1),s=null}}}function b(A){if(!I3(A))throw new Error(ht(7));if(typeof A.type>"u")throw new Error(ht(8));if(f)throw new Error(ht(9));try{f=!0,i=a(i,A)}finally{f=!1}for(var T=s=l,I=0;I<T.length;I++){var N=T[I];N()}return A}function S(A){if(typeof A!="function")throw new Error(ht(10));a=A,b({type:Si.REPLACE})}function O(){var A,T=y;return A={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ht(11));function D(){N.next&&N.next(g())}D();var F=T(D);return{unsubscribe:F}}},A[F2]=function(){return this},A}return b({type:Si.INIT}),o={dispatch:b,subscribe:y,getState:g,replaceReducer:S},o[F2]=O,o}function P3(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Si.INIT});if(typeof o>"u")throw new Error(ht(12));if(typeof r(void 0,{type:Si.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ht(13))})}function U2(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{P3(r)}catch(f){l=f}return function(u,g){if(u===void 0&&(u={}),l)throw l;if(0)var y;for(var b=!1,S={},O=0;O<i.length;O++){var A=i[O],T=r[A],I=u[A],N=T(I,g);if(typeof N>"u"){var D=g&&g.type;throw new Error(ht(14))}S[A]=N,b=b||N!==I}return b=b||i.length!==Object.keys(u).length,b?S:u}}function Ln(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function H2(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ht(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(f){return f(s)});return i=Ln.apply(void 0,l)(a.dispatch),Cl(Cl({},a),{},{dispatch:i})}}}function G2(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var W2=G2();W2.withExtraArgument=G2;var El=W2;var Z2=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),z3=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(u){return function(g){return f([u,g])}}function f(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(g){u=[6,g],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},En=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},$3=Object.defineProperty,D3=Object.defineProperties,B3=Object.getOwnPropertyDescriptors,V2=Object.getOwnPropertySymbols,F3=Object.prototype.hasOwnProperty,U3=Object.prototype.propertyIsEnumerable,j2=function(t,e,r){return e in t?$3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},no=function(t,e){for(var r in e||(e={}))F3.call(e,r)&&j2(t,r,e[r]);if(V2)for(var o=0,a=V2(e);o<a.length;o++){var r=a[o];U3.call(e,r)&&j2(t,r,e[r])}return t},Al=function(t,e){return D3(t,B3(e))},H3=function(t,e,r){return new Promise(function(o,a){var i=function(f){try{l(r.next(f))}catch(u){a(u)}},s=function(f){try{l(r.throw(f))}catch(u){a(u)}},l=function(f){return f.done?o(f.value):Promise.resolve(f.value).then(i,s)};l((r=r.apply(t,e)).next())})};var G3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ln:Ln.apply(null,arguments)},$O=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function W3(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var V3=function(t){Z2(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,En([void 0],r[0].concat(this)))):new(e.bind.apply(e,En([void 0],r.concat(this))))},e}(Array),j3=function(t){Z2(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,En([void 0],r[0].concat(this)))):new(e.bind.apply(e,En([void 0],r.concat(this))))},e}(Array);function kl(t){return lr(t)?xi(t,function(){}):t}function K3(t){return typeof t=="boolean"}function q3(){return function(e){return Z3(e)}}function Z3(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,l=new V3;if(r&&(K3(r)?l.push(El):l.push(El.withExtraArgument(r.extraArgument))),0){if(a)var f;if(s)var u}return l}var Rl=!0;function Y2(t){var e=q3(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,l=r.devTools,f=l===void 0?!0:l,u=r.preloadedState,g=u===void 0?void 0:u,y=r.enhancers,b=y===void 0?void 0:y,S;if(typeof a=="function")S=a;else if(W3(a))S=U2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var O=s;if(typeof O=="function"&&(O=O(e),!Rl&&!Array.isArray(O)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Rl&&O.some(function(F){return typeof F!="function"}))throw new Error("each middleware provided to configureStore must be a function");var A=H2.apply(void 0,O),T=Ln;f&&(T=G3(no({trace:!Rl},typeof f=="object"&&f)));var I=new j3(A),N=I;Array.isArray(b)?N=En([A],b):typeof b=="function"&&(N=b(I));var D=T.apply(void 0,N);return Ll(S,g,D)}function ao(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return no(no({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function X2(t){var e={},r=[],o,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function Y3(t){return typeof t=="function"}function X3(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?X2(e):[e,r,o],i=a[0],s=a[1],l=a[2],f;if(Y3(t))f=function(){return kl(t())};else{var u=kl(t);f=function(){return u}}function g(y,b){y===void 0&&(y=f());var S=En([i[b.type]],s.filter(function(O){var A=O.matcher;return A(b)}).map(function(O){var A=O.reducer;return A}));return S.filter(function(O){return!!O}).length===0&&(S=[l]),S.reduce(function(O,A){if(A)if(Br(O)){var T=O,I=A(T,b);return I===void 0?O:I}else{if(lr(O))return xi(O,function(N){return A(N,b)});var I=A(O,b);if(I===void 0){if(O===null)return O;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return O},y)}return g.getInitialState=f,g}function Q3(t,e){return t+"/"+e}function Q2(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:kl(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},l={};a.forEach(function(g){var y=o[g],b=Q3(e,g),S,O;"reducer"in y?(S=y.reducer,O=y.prepare):S=y,i[g]=S,s[b]=S,l[g]=O?ao(b,O):ao(b)});function f(){var g=typeof t.extraReducers=="function"?X2(t.extraReducers):[t.extraReducers],y=g[0],b=y===void 0?{}:y,S=g[1],O=S===void 0?[]:S,A=g[2],T=A===void 0?void 0:A,I=no(no({},b),s);return X3(r,function(N){for(var D in I)N.addCase(D,I[D]);for(var F=0,oe=O;F<oe.length;F++){var Le=oe[F];N.addMatcher(Le.matcher,Le.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:e,reducer:function(g,y){return u||(u=f()),u(g,y)},actions:l,caseReducers:i,getInitialState:function(){return u||(u=f()),u.getInitialState()}}}var J3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",em=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=J3[Math.random()*64|0];return e},tm=["name","message","stack","code"],wl=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),K2=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),rm=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=tm;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},UO=function(){function t(e,r,o){var a=ao(e+"/fulfilled",function(g,y,b,S){return{payload:g,meta:Al(no({},S||{}),{arg:b,requestId:y,requestStatus:"fulfilled"})}}),i=ao(e+"/pending",function(g,y,b){return{payload:void 0,meta:Al(no({},b||{}),{arg:y,requestId:g,requestStatus:"pending"})}}),s=ao(e+"/rejected",function(g,y,b,S,O){return{payload:S,error:(o&&o.serializeError||rm)(g||"Rejected"),meta:Al(no({},O||{}),{arg:b,requestId:y,rejectedWithValue:!!S,requestStatus:"rejected",aborted:g?.name==="AbortError",condition:g?.name==="ConditionError"})}}),l=!1,f=typeof AbortController<"u"?AbortController:function(){function g(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return g.prototype.abort=function(){},g}();function u(g){return function(y,b,S){var O=o?.idGenerator?o.idGenerator(g):em(),A=new f,T,I=!1;function N(F){T=F,A.abort()}var D=function(){return H3(this,null,function(){var F,oe,Le,Lt,et,yr,tt;return z3(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),Lt=(F=o?.condition)==null?void 0:F.call(o,g,{getState:b,extra:S}),nm(Lt)?[4,Lt]:[3,2];case 1:Lt=x.sent(),x.label=2;case 2:if(Lt===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,et=new Promise(function(E,U){return A.signal.addEventListener("abort",function(){return U({name:"AbortError",message:T||"Aborted"})})}),y(i(O,g,(oe=o?.getPendingMeta)==null?void 0:oe.call(o,{requestId:O,arg:g},{getState:b,extra:S}))),[4,Promise.race([et,Promise.resolve(r(g,{dispatch:y,getState:b,extra:S,requestId:O,signal:A.signal,abort:N,rejectWithValue:function(E,U){return new wl(E,U)},fulfillWithValue:function(E,U){return new K2(E,U)}})).then(function(E){if(E instanceof wl)throw E;return E instanceof K2?a(E.payload,O,g,E.meta):a(E,O,g)})])];case 3:return Le=x.sent(),[3,5];case 4:return yr=x.sent(),Le=yr instanceof wl?s(null,O,g,yr.payload,yr.meta):s(yr,O,g),[3,5];case 5:return tt=o&&!o.dispatchConditionRejection&&s.match(Le)&&Le.meta.condition,tt||y(Le),[2,Le]}})})}();return Object.assign(D,{abort:N,requestId:O,arg:g,unwrap:function(){return D.then(om)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function om(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function nm(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var J2="listener",ef="completed",tf="cancelled",HO="task-"+tf,GO="task-"+ef,WO=J2+"-"+tf,VO=J2+"-"+ef;var _l="listenerMiddleware";var jO=ao(_l+"/add"),KO=ao(_l+"/removeAll"),qO=ao(_l+"/remove");var q2,ZO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(q2||(q2=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},am=function(t){return function(e){setTimeout(e,t)}},YO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:am(10);M2();var im=fi(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,o,a){this.eventBus.addEventListener(r,o,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,o,a){this.eventBus.removeEventListener(r,o,a)}}}),Ci=class extends im(Object){};window.ftReduxStores||(window.ftReduxStores={});var rf=class t extends Ci{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(gi(i))return i;if(a==null)return;let s=Q2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Y2({reducer:(f,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let g=f2(s.getInitialState());for(let y of u.keeping)g[y]=(f??g)[y];return g}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...u.overwrites};return s.reducer(f,u)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ui;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,u=i[f];return u?(...g)=>{let y=u(...g.map(a));return this.reduxStore.dispatch(y),y}:g=>{this.setState({[f]:a(g)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Oi=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Li=h(L()),sm="ft-app-info",Uo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Uo.eventName="authentication-change";var lm={session:(t,e)=>{(0,Li.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>z.dispatchEvent(new Uo(e.payload)),0))}},z=Li.FtReduxStore.get({name:sm,reducers:lm,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var of=h(L()),Ei=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},LL=(0,of.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}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=>Oi.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ei([(0,Tl.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ei([(0,Tl.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ei([sl({store:z.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Ei([sl({store:z.name})],e.prototype,"uiLocale",void 0),e});var dm=h(af(),1);var sf;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(sf||(sf={}));var lf;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(lf||(lf={}));var cf;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(cf||(cf={}));var df;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(df||(df={}));var ff;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ff||(ff={}));var uf;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(uf||(uf={}));var pf;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(pf||(pf={}));var hf;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(hf||(hf={}));var mf;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(mf||(mf={}));var gf;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(gf||(gf={}));var yf;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(yf||(yf={}));var bf;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(bf||(bf={}));var vf;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(vf||(vf={}));var xf;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(xf||(xf={}));var Nl;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nl||(Nl={}));var Sf;(function(t){t.ASC="ASC",t.DESC="DESC"})(Sf||(Sf={}));var Cf;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Cf||(Cf={}));var Ml;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ml||(Ml={}));var Of;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Of||(Of={}));var Lf;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Lf||(Lf={}));var Ef;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ef||(Ef={}));var Af;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Af||(Af={}));var Rf;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Rf||(Rf={}));var Il;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Il||(Il={}));var wf;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(wf||(wf={}));var ze;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ze||(ze={}));var Kt;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Kt||(Kt={}));var kf;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(kf||(kf={}));var _f;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(_f||(_f={}));var Tf;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(Tf||(Tf={}));var Nf;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Nf||(Nf={}));var Mf;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Mf||(Mf={}));var If;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(If||(If={}));var Pf;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Pf||(Pf={}));var zf;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(zf||(zf={}));var $f;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})($f||($f={}));var cm={[ze.PERSONAL_BOOK_SHARE_USER]:[ze.PERSONAL_BOOK_USER],[ze.HTML_EXPORT_USER]:[ze.PERSONAL_BOOK_USER],[ze.PDF_EXPORT_USER]:[ze.PERSONAL_BOOK_USER],[ze.KHUB_ADMIN]:[ze.CONTENT_PUBLISHER],[ze.ADMIN]:[ze.KHUB_ADMIN,ze.USERS_ADMIN,ze.PORTAL_ADMIN,ze.BEHAVIOR_DATA_USER],[ze.GENERATIVE_AI_EXPORT_USER]:[ze.GENERATIVE_AI_USER]};function Df(t,e){return t===e||(cm[t]??[]).some(r=>Df(r,e))}function Bf(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>Df(o,e))}var Mi=h(L());var Pl=h(L());var Ho=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=z.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=z.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var wi=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ho.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ho.await()}};var Rt=class extends wi{constructor(e=!0,r){var o;super(r),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 Pl.CacheRegistry,this.cache=e?a.commonCache:new Pl.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ki=class extends Rt{async listMySearches(){let{session:e}=z.getState();return Bf(e,ze.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var _i=class extends Rt{async listMyBookmarks(){let e=z.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ti=class extends Rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=z.getState().session;return!!e?.sessionAuthenticated}};var Ni=class extends Rt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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 e=z.getState().session;return!!e?.sessionAuthenticated}};var fm="ft-user-assets",um={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(Kt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;$l(t,r,[...zl(t,r),a]),Ff(t,r,1,o),Uf(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;$l(t,r,zl(t,r).map(a=>a.id===o.id?o:a)),Uf(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;$l(t,r,zl(t,r).filter(i=>i.id!==a)),Ff(t,r,-1,o)}},Hf={[Kt.SEARCHES]:"savedSearches",[Kt.BOOKMARKS]:"bookmarks",[Kt.BOOKS]:void 0,[Kt.COLLECTIONS]:void 0},zl=(t,e)=>{var r;let o=Hf[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},$l=(t,e,r)=>{let o=Hf[e];o&&(t[o]=r)},Ff=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===Kt.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},Uf=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Mt=Mi.FtReduxStore.get({name:fm,reducers:um,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Kt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Dl=class{constructor(e=new Ti,r=new Ni){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new _i,this.savedSearchesService=new ki,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=z.getState();(0,Mi.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Mt.actions.clearAssetCount(),Mt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Mt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Mt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Mt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Mt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Mt.getState().assetCounts.bookmarkByMap).length!==0;e===Kt.BOOKMARKS&&r&&Mt.actions.clearBookmarkCountByMap(),Mt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mt.actions.bookmarks(r)}}},pm=new Dl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pm);var Bl=class{addCommand(e,r=!1){z.commands.add(e,r)}consumeCommand(e){return z.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Bl;var qt=h(L());var Gf,Rn=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},hm=Symbol("clearAfterUnitTest"),Ii=class extends(0,qt.withEventBus)(Rt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Gf]=()=>{this.defaultMessages={},this.cache=new qt.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=z.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};(0,qt.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new qt.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof qt.CanceledPromiseError)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Rn({loadedContexts:e})),this.dispatchEvent(new Rn({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Rn({loadedContexts:[e]})),this.dispatchEvent(new Rn({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,qt.delay)(0).then(()=>o()).catch(()=>null)))}};Gf=hm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ii{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ii{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var wn=window.FluidTopicsI18nService,Pi=window.FluidTopicsCustomI18nService;var Wf=h(L()),Fl=class{highlightHtml(e,r,o){(0,Wf.highlightHtml)(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Fl;var Vf=h(L());var Ul=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return Vf.DateFormatter.format(e,(o=r?.locale)!==null&&o!==void 0?o:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ul;var jf=h(L());var Fr=class{static get(e,r){var o,a;let i=z.getState(),{lang:s,region:l}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new jf.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Hl=class{urlToSearchRequest(e){return Fr.get().parse(e)}searchRequestToUrl(e){return Fr.get().serialize(e)}};window.FluidTopicsUrlService=new Hl;var so=h(L());var Go=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Go.eventName="change";var Gl=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Kf=new Gl;var zi=class t extends so.WithEventBus{static build(){return new t(window.history,Kf,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,so.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Go(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,l])=>{let f=r(),u={...f===this.currentIndex?this.currentState:void 0,...i,index:f,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(a,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Go.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Go.eventName,e)}currentItem(){return(0,so.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,so.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,so.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=zi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var qf=h(k());var Zf=qf.css`
535
535
  `;var Xf=h(k()),nt=h(V()),cr=h(L());function Yf(t,e){let{authenticationRequired:r,session:o}=z.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var je=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ve=class extends cr.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Ho.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new cr.CacheRegistry,this.cleanSessionDebouncer=new cr.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return Xf.html`
536
536
  <slot></slot>
537
537
  `}connectedCallback(){super.connectedCallback(),z.addEventListener(Uo.eventName,this.reloadConfiguration)}disconnectedCallback(){z.addEventListener(Uo.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,a,i,s,l,f;super.update(e),e.has("baseUrl")&&(z.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&z.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&z.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&z.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&z.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&z.actions.noCustom(this.noCustom),e.has("editorMode")&&z.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&z.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&z.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>wn.addContext(u)),e.has("openExternalDocumentInNewTab")&&z.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&z.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&z.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(z.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),z.actions.availableUiLocales((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),z.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&z.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&z.actions.availableContentLocales((f=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&f!==void 0?f:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Yf(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ve.elementDefinitions={};ve.styles=Zf;je([(0,nt.property)()],ve.prototype,"baseUrl",void 0);je([(0,nt.property)()],ve.prototype,"apiIntegrationIdentifier",void 0);je([(0,nt.property)()],ve.prototype,"apiIntegrationAppVersion",void 0);je([(0,nt.property)()],ve.prototype,"uiLocale",void 0);je([(0,cr.jsonProperty)(null)],ve.prototype,"availableUiLocales",void 0);je([(0,cr.jsonProperty)(null)],ve.prototype,"metadataConfiguration",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"editorMode",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"noCustom",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"openExternalDocumentInNewTab",void 0);je([(0,nt.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ve.prototype,"noCustomComponent",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"withManualResources",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"navigatorOnline",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"forcedOffline",void 0);je([(0,nt.property)({type:Object})],ve.prototype,"apiProvider",void 0);je([(0,nt.property)({type:Boolean})],ve.prototype,"authenticationRequired",void 0);je([(0,cr.jsonProperty)([])],ve.prototype,"messageContexts",void 0);je([(0,cr.jsonProperty)(void 0)],ve.prototype,"session",void 0);je([(0,nt.state)()],ve.prototype,"localesConfiguration",void 0);je([(0,nt.state)()],ve.prototype,"availableContentLocales",void 0);var Qf=h(L());(0,Qf.customElement)("ft-app-context")(ve);var Jf=h(V());var Wl=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},kn=new Wl;var mm=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ga=Symbol("i18nAttributes"),eu=Symbol("i18nListAttributes"),tu=Symbol("i18nProperties"),$i=Symbol("i18nContexts"),ma=Symbol("i18nUnsubs"),Tn=(0,_n.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Pi:wn}i18n(i){let{context:s,key:l,message:f}=i,{custom:u,args:g,argsProvider:y}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let b=g??(y?y(this):[]);return this.getI18nService(u).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(kn.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 u;return((u=f?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,u=(g,y,b)=>b?.context&&b.key&&i(g,y,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...g})}:b;(s=this[ga])===null||s===void 0||s.forEach((g,y)=>f[y]=u(g,y,f[y])),(l=this[eu])===null||l===void 0||l.forEach((g,y)=>{var b;return f[y]=(b=f[y])===null||b===void 0?void 0:b.map(S=>u(g,y,S))})}updateI18nProperties(i){var s;(s=this[tu])===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[$i].set(f,{isCustomContext:l}),this[ma].has(f)||this[ma].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[$i].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[$i].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ma].forEach(i=>i()),this[ma].clear()}}return e=$i,r=ma,mm([(0,Jf.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Di=class extends Tn(_n.FtLitElement){},Bi=class extends Tn(_n.FtLitElementRedux){};var ru=h(L());var Vl=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?kn.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},gm=new Vl;var Fi=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:ru.hasChanged,converter:kn,...e}),r[ga]=(a=r[ga])!==null&&a!==void 0?a:new Map,r[ga].set(o,t??{})};var Ui=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Pi:wn}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var ou=h(k());var nu=ou.css`
@@ -45,7 +45,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
45
45
  input::-webkit-search-results-decoration {
46
46
  display: none;
47
47
  }
48
- `;var jf={};var Ol={};ne(Ol,{ParametrizedLabelResolver:()=>Fr});var Fr=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,n;e=this.resolvePluralKey(e,r);let a=(n=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&n!==void 0?n:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,n)=>e=e.replace(new RegExp(`\\{${n}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let n=`${String(e)}[\\=${o}]`;if(n in this.labels||n in this.defaultLabels)return n}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=n=>r?.includes("date")?e.toLocaleDateString(n):r?.includes("time")?e.toLocaleTimeString(n):e.toLocaleString(n);try{return o(document.documentElement.lang)}catch{return o()}}};var Kl={};ne(Kl,{FtCommandQueue:()=>Ji,FtLitElementRedux:()=>Ao,FtReduxStore:()=>jr,FtStateManager:()=>na,ReduxWatcher:()=>ia,clearAllStores:()=>L3,isFtReduxStore:()=>ri,redux:()=>nr,reduxEventListener:()=>H4,reduxReactive:()=>U4,watch:()=>Ap,withRedux:()=>Kf});var U4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},nr=t=>{let e=t??{};return(r,o)=>{var n;let a={hasChanged:St,attribute:!1,...e};g(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=e.selector)!==null&&n!==void 0?n:l=>l[o],store:e.store})}},H4=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var Ji=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function ri(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var en=Symbol("internalReduxEventsUnsubscribers"),Ur=Symbol("internalStoresUnsubscribers"),Lo=Symbol("internalStores"),Kf=Ge(Symbol("withRedux"),function(t){var e,r,o;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Lo].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Lo].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Lo].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[Lo].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Lo].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Lo].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let f=this.getStore(s.store);f&&(s.store?this[Ur].has(s.store):this[Ur].size>0)&&(this[l]=s.selector(f.getState(),this))}})}subscribeToStore(s,l){var d;this[Ur].set(s,l.subscribe(()=>this.updateFromStores())),this[en].set(s,[]),ri(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,u)=>{if(typeof this[u]=="function"&&(!f.store||l.name===f.store)){let h=y=>this[u](y);l.addEventListener(f.eventName,h),this[en].get(s).push(()=>l.removeEventListener(f.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ur].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ur].has(s)&&this[Ur].get(s)(),this[Ur].delete(s),(l=this[en].get(s))===null||l===void 0||l.forEach(d=>d()),this[en].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ur,r=Lo,o=en,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Ao=class extends Kf(U){};function It(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Sr(t){return!!t&&!!t[Ae]}function Kt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Y4}(t)||Array.isArray(t)||!!t[ep]||!!(!((e=t.constructor)===null||e===void 0)&&e[ep])||Ml(t)||Nl(t))}function wo(t,e,r){r===void 0&&(r=!1),ni(t)===0?(r?Object.keys:ii)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,n){return e(n,o,t)})}function ni(t){var e=t[Ae];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ml(t)?2:Nl(t)?3:0}function oi(t,e){return ni(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function G4(t,e){return ni(t)===2?t.get(e):t[e]}function tp(t,e,r){var o=ni(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function rp(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ml(t){return q4&&t instanceof Map}function Nl(t){return Z4&&t instanceof Set}function Hr(t){return t.o||t.t}function Pl(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=np(t);delete e[Ae];for(var r=ii(e),o=0;o<r.length;o++){var n=r[o],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Il(t,e){return e===void 0&&(e=!1),zl(t)||Sr(t)||!Kt(t)||(ni(t)>1&&(t.set=t.add=t.clear=t.delete=W4),Object.freeze(t),e&&wo(t,function(r,o){return Il(o,!0)},!0)),t}function W4(){It(2)}function zl(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ar(t){var e=Tl[t];return e||It(18,t),e}function V4(t,e){Tl[t]||(Tl[t]=e)}function Rl(){return rn}function El(t,e){e&&(ar("Patches"),t.u=[],t.s=[],t.v=e)}function Jn(t){_l(t),t.p.forEach(j4),t.p=null}function _l(t){t===rn&&(rn=t.l)}function qf(t){return rn={p:[],l:rn,h:t,m:!0,_:0}}function j4(t){var e=t[Ae];e.i===0||e.i===1?e.j():e.g=!0}function Ll(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||ar("ES5").S(e,t,o),o?(r[Ae].P&&(Jn(e),It(4)),Kt(t)&&(t=ea(e,t),e.l||ta(e,t)),e.u&&ar("Patches").M(r[Ae].t,t,e.u,e.s)):t=ea(e,r,[]),Jn(e),e.u&&e.v(e.u,e.s),t!==ip?t:void 0}function ea(t,e,r){if(zl(e))return e;var o=e[Ae];if(!o)return wo(e,function(l,d){return Zf(t,o,e,l,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return ta(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=Pl(o.k):o.o,a=n,s=!1;o.i===3&&(a=new Set(n),n.clear(),s=!0),wo(a,function(l,d){return Zf(t,o,n,l,d,r,s)}),ta(t,n,!1),r&&t.u&&ar("Patches").N(o,r,t.u,t.s)}return o.o}function Zf(t,e,r,o,n,a,s){if(Sr(n)){var l=ea(t,n,a&&e&&e.i!==3&&!oi(e.R,o)?a.concat(o):void 0);if(tp(r,o,l),!Sr(l))return;t.m=!1}else s&&r.add(n);if(Kt(n)&&!zl(n)){if(!t.h.D&&t._<1)return;ea(t,n),e&&e.A.l||ta(t,n)}}function ta(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Il(e,r)}function Al(t,e){var r=t[Ae];return(r?Hr(r):t)[e]}function Yf(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function Gr(t){t.P||(t.P=!0,t.l&&Gr(t.l))}function wl(t){t.o||(t.o=Pl(t.t))}function kl(t,e,r){var o=Ml(e)?ar("MapSet").F(e,r):Nl(e)?ar("MapSet").T(e,r):t.O?function(n,a){var s=Array.isArray(n),l={i:s?1:0,A:a?a.A:Rl(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},d=l,f=on;s&&(d=[l],f=tn);var u=Proxy.revocable(d,f),h=u.revoke,y=u.proxy;return l.k=y,l.j=h,y}(e,r):ar("ES5").J(e,r);return(r?r.A:Rl()).p.push(o),o}function K4(t){return Sr(t)||It(22,t),function e(r){if(!Kt(r))return r;var o,n=r[Ae],a=ni(r);if(n){if(!n.P&&(n.i<4||!ar("ES5").K(n)))return n.t;n.I=!0,o=Xf(r,a),n.I=!1}else o=Xf(r,a);return wo(o,function(s,l){n&&G4(n.t,s)===l||tp(o,s,e(l))}),a===3?new Set(o):o}(t)}function Xf(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Pl(t)}function op(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var f=this[Ae];return on.get(f,s)},set:function(f){var u=this[Ae];on.set(u,s,f)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][Ae];if(!d.P)switch(d.i){case 5:o(d)&&Gr(d);break;case 4:r(d)&&Gr(d)}}}function r(s){for(var l=s.t,d=s.k,f=ii(d),u=f.length-1;u>=0;u--){var h=f[u];if(h!==Ae){var y=l[h];if(y===void 0&&!oi(l,h))return!0;var O=d[h],E=O&&O[Ae];if(E?E.t!==y:!rp(O,y))return!0}}var _=!!l[Ae];return f.length!==ii(l).length+(_?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var f=0;f<l.length;f++)if(!l.hasOwnProperty(f))return!0;return!1}function n(s){s.g&&It(3,JSON.stringify(Hr(s)))}var a={};V4("ES5",{J:function(s,l){var d=Array.isArray(s),f=function(h,y){if(h){for(var O=Array(y.length),E=0;E<y.length;E++)Object.defineProperty(O,""+E,t(E,!0));return O}var _=np(y);delete _[Ae];for(var N=ii(_),I=0;I<N.length;I++){var $=N[I];_[$]=t($,h||!!_[$].enumerable)}return Object.create(Object.getPrototypeOf(y),_)}(d,s),u={i:d?5:4,A:l?l.A:Rl(),P:!1,I:!1,R:{},l,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,Ae,{value:u,writable:!0}),f},S:function(s,l,d){d?Sr(l)&&l[Ae].A===s&&e(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var h=u[Ae];if(h){var y=h.t,O=h.k,E=h.R,_=h.i;if(_===4)wo(O,function(L){L!==Ae&&(y[L]!==void 0||oi(y,L)?E[L]||f(O[L]):(E[L]=!0,Gr(h)))}),wo(y,function(L){O[L]!==void 0||oi(O,L)||(E[L]=!1,Gr(h))});else if(_===5){if(o(h)&&(Gr(h),E.length=!0),O.length<y.length)for(var N=O.length;N<y.length;N++)E[N]=!1;else for(var I=y.length;I<O.length;I++)E[I]=!0;for(var $=Math.min(O.length,y.length),A=0;A<$;A++)O.hasOwnProperty(A)||(E[A]=!0),E[A]===void 0&&f(O[A])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Qf,rn,$l=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",q4=typeof Map<"u",Z4=typeof Set<"u",Jf=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ip=$l?Symbol.for("immer-nothing"):((Qf={})["immer-nothing"]=!0,Qf),ep=$l?Symbol.for("immer-draftable"):"__$immer_draftable",Ae=$l?Symbol.for("immer-state"):"__$immer_state";var Y4=""+Object.prototype.constructor,ii=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,np=Object.getOwnPropertyDescriptors||function(t){var e={};return ii(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Tl={},on={get:function(t,e){if(e===Ae)return t;var r=Hr(t);if(!oi(r,e))return function(n,a,s){var l,d=Yf(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(n.k):void 0}(t,r,e);var o=r[e];return t.I||!Kt(o)?o:o===Al(t.t,e)?(wl(t),t.o[e]=kl(t.A.h,o,t)):o},has:function(t,e){return e in Hr(t)},ownKeys:function(t){return Reflect.ownKeys(Hr(t))},set:function(t,e,r){var o=Yf(Hr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var n=Al(Hr(t),e),a=n?.[Ae];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(rp(r,n)&&(r!==void 0||oi(t.t,e)))return!0;wl(t),Gr(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Al(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,wl(t),Gr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Hr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){It(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){It(12)}},tn={};wo(on,function(t,e){tn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),tn.deleteProperty=function(t,e){return tn.set.call(this,t,e,void 0)},tn.set=function(t,e,r){return on.set.call(this,t[0],e,r,t[0])};var X4=function(){function t(r){var o=this;this.O=Jf,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var l=a;a=n;var d=o;return function(_){var N=this;_===void 0&&(_=l);for(var I=arguments.length,$=Array(I>1?I-1:0),A=1;A<I;A++)$[A-1]=arguments[A];return d.produce(_,function(L){var k;return(k=a).call.apply(k,[N,L].concat($))})}}var f;if(typeof a!="function"&&It(6),s!==void 0&&typeof s!="function"&&It(7),Kt(n)){var u=qf(o),h=kl(o,n,void 0),y=!0;try{f=a(h),y=!1}finally{y?Jn(u):_l(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(_){return El(u,s),Ll(_,u)},function(_){throw Jn(u),_}):(El(u,s),Ll(f,u))}if(!n||typeof n!="object"){if((f=a(n))===void 0&&(f=n),f===ip&&(f=void 0),o.D&&Il(f,!0),s){var O=[],E=[];ar("Patches").M(n,f,O,E),s(O,E)}return f}It(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(f){for(var u=arguments.length,h=Array(u>1?u-1:0),y=1;y<u;y++)h[y-1]=arguments[y];return o.produceWithPatches(f,function(O){return n.apply(void 0,[O].concat(h))})};var s,l,d=o.produce(n,a,function(f,u){s=f,l=u});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,l]}):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Kt(r)||It(8),Sr(r)&&(r=K4(r));var o=qf(this),n=kl(this,r,void 0);return n[Ae].C=!0,_l(o),n},e.finishDraft=function(r,o){var n=r&&r[Ae],a=n.A;return El(a,o),Ll(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Jf&&It(20),this.O=r},e.applyPatches=function(r,o){var n;for(n=o.length-1;n>=0;n--){var a=o[n];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}n>-1&&(o=o.slice(n+1));var s=ar("Patches").$;return Sr(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),Ot=new X4,Q4=Ot.produce,kC=Ot.produceWithPatches.bind(Ot),TC=Ot.setAutoFreeze.bind(Ot),MC=Ot.setUseProxies.bind(Ot),NC=Ot.applyPatches.bind(Ot),PC=Ot.createDraft.bind(Ot),IC=Ot.finishDraft.bind(Ot),ra=Q4;function Ro(t){"@babel/helpers - typeof";return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ro(t)}function ap(t,e){if(Ro(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ro(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sp(t){var e=ap(t,"string");return Ro(e)=="symbol"?e:e+""}function lp(t,e,r){return(e=sp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function Dl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cp(Object(r),!0).forEach(function(o){lp(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cp(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function st(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var dp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Bl=function(){return Math.random().toString(36).substring(7).split("").join(".")},oa={INIT:"@@redux/INIT"+Bl(),REPLACE:"@@redux/REPLACE"+Bl(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Bl()}};function J4(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Fl(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(st(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(st(1));return r(Fl)(t,e)}if(typeof t!="function")throw new Error(st(2));var n=t,a=e,s=[],l=s,d=!1;function f(){l===s&&(l=s.slice())}function u(){if(d)throw new Error(st(3));return a}function h(_){if(typeof _!="function")throw new Error(st(4));if(d)throw new Error(st(5));var N=!0;return f(),l.push(_),function(){if(N){if(d)throw new Error(st(6));N=!1,f();var $=l.indexOf(_);l.splice($,1),s=null}}}function y(_){if(!J4(_))throw new Error(st(7));if(typeof _.type>"u")throw new Error(st(8));if(d)throw new Error(st(9));try{d=!0,a=n(a,_)}finally{d=!1}for(var N=s=l,I=0;I<N.length;I++){var $=N[I];$()}return _}function O(_){if(typeof _!="function")throw new Error(st(10));n=_,y({type:oa.REPLACE})}function E(){var _,N=h;return _={subscribe:function($){if(typeof $!="object"||$===null)throw new Error(st(11));function A(){$.next&&$.next(u())}A();var L=N(A);return{unsubscribe:L}}},_[dp]=function(){return this},_}return y({type:oa.INIT}),o={dispatch:y,subscribe:h,getState:u,replaceReducer:O},o[dp]=E,o}function e3(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:oa.INIT});if(typeof o>"u")throw new Error(st(12));if(typeof r(void 0,{type:oa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(st(13))})}function fp(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var n=e[o];typeof t[n]=="function"&&(r[n]=t[n])}var a=Object.keys(r),s,l;try{e3(r)}catch(d){l=d}return function(f,u){if(f===void 0&&(f={}),l)throw l;if(0)var h;for(var y=!1,O={},E=0;E<a.length;E++){var _=a[E],N=r[_],I=f[_],$=N(I,u);if(typeof $>"u"){var A=u&&u.type;throw new Error(st(14))}O[_]=$,y=y||$!==I}return y=y||a.length!==Object.keys(f).length,y?O:f}}function ai(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function pp(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var n=o.apply(void 0,arguments),a=function(){throw new Error(st(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=ai.apply(void 0,l)(n.dispatch),Dl(Dl({},n),{},{dispatch:a})}}}function up(t){var e=function(o){var n=o.dispatch,a=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,a,t):s(l)}}};return e}var hp=up();hp.withExtraArgument=up;var Ul=hp;var vp=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),t3=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(u){return d([f,u])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=f[0]&2?n.return:f[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,f[1])).done)return a;switch(n=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,n=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(u){f=[6,u],n=0}finally{o=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},si=function(t,e){for(var r=0,o=e.length,n=t.length;r<o;r++,n++)t[n]=e[r];return t},r3=Object.defineProperty,o3=Object.defineProperties,i3=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertySymbols,n3=Object.prototype.hasOwnProperty,a3=Object.prototype.propertyIsEnumerable,gp=function(t,e,r){return e in t?r3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Wr=function(t,e){for(var r in e||(e={}))n3.call(e,r)&&gp(t,r,e[r]);if(mp)for(var o=0,n=mp(e);o<n.length;o++){var r=n[o];a3.call(e,r)&&gp(t,r,e[r])}return t},Hl=function(t,e){return o3(t,i3(e))},s3=function(t,e,r){return new Promise(function(o,n){var a=function(d){try{l(r.next(d))}catch(f){n(f)}},s=function(d){try{l(r.throw(d))}catch(f){n(f)}},l=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})};var l3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ai:ai.apply(null,arguments)},JC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function c3(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var d3=function(t){vp(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,si([void 0],r[0].concat(this)))):new(e.bind.apply(e,si([void 0],r.concat(this))))},e}(Array),f3=function(t){vp(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,si([void 0],r[0].concat(this)))):new(e.bind.apply(e,si([void 0],r.concat(this))))},e}(Array);function Vl(t){return Kt(t)?ra(t,function(){}):t}function p3(t){return typeof t=="boolean"}function u3(){return function(e){return h3(e)}}function h3(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,n=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,l=new d3;if(r&&(p3(r)?l.push(Ul):l.push(Ul.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var f}return l}var Gl=!0;function xp(t){var e=u3(),r=t||{},o=r.reducer,n=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,f=r.preloadedState,u=f===void 0?void 0:f,h=r.enhancers,y=h===void 0?void 0:h,O;if(typeof n=="function")O=n;else if(c3(n))O=fp(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=s;if(typeof E=="function"&&(E=E(e),!Gl&&!Array.isArray(E)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gl&&E.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var _=pp.apply(void 0,E),N=ai;d&&(N=l3(Wr({trace:!Gl},typeof d=="object"&&d)));var I=new f3(_),$=I;Array.isArray(y)?$=si([_],y):typeof y=="function"&&($=y(I));var A=N.apply(void 0,$);return Fl(O,u,A)}function Vr(t,e){function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return Wr(Wr({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function Sp(t){var e={},r=[],o,n={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,n},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return o=a,n}};return t(n),[e,r,o]}function m3(t){return typeof t=="function"}function g3(t,e,r,o){r===void 0&&(r=[]);var n=typeof e=="function"?Sp(e):[e,r,o],a=n[0],s=n[1],l=n[2],d;if(m3(t))d=function(){return Vl(t())};else{var f=Vl(t);d=function(){return f}}function u(h,y){h===void 0&&(h=d());var O=si([a[y.type]],s.filter(function(E){var _=E.matcher;return _(y)}).map(function(E){var _=E.reducer;return _}));return O.filter(function(E){return!!E}).length===0&&(O=[l]),O.reduce(function(E,_){if(_)if(Sr(E)){var N=E,I=_(N,y);return I===void 0?E:I}else{if(Kt(E))return ra(E,function($){return _($,y)});var I=_(E,y);if(I===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return E},h)}return u.getInitialState=d,u}function y3(t,e){return t+"/"+e}function Cp(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Vl(t.initialState),o=t.reducers||{},n=Object.keys(o),a={},s={},l={};n.forEach(function(u){var h=o[u],y=y3(e,u),O,E;"reducer"in h?(O=h.reducer,E=h.prepare):O=h,a[u]=O,s[y]=O,l[u]=E?Vr(y,E):Vr(y)});function d(){var u=typeof t.extraReducers=="function"?Sp(t.extraReducers):[t.extraReducers],h=u[0],y=h===void 0?{}:h,O=u[1],E=O===void 0?[]:O,_=u[2],N=_===void 0?void 0:_,I=Wr(Wr({},y),s);return g3(r,function($){for(var A in I)$.addCase(A,I[A]);for(var L=0,k=E;L<k.length;L++){var H=k[L];$.addMatcher(H.matcher,H.reducer)}N&&$.addDefaultCase(N)})}var f;return{name:e,reducer:function(u,h){return f||(f=d()),f(u,h)},actions:l,caseReducers:a,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var b3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",v3=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=b3[Math.random()*64|0];return e},x3=["name","message","stack","code"],Wl=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),yp=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),S3=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=x3;r<o.length;r++){var n=o[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},oO=function(){function t(e,r,o){var n=Vr(e+"/fulfilled",function(u,h,y,O){return{payload:u,meta:Hl(Wr({},O||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),a=Vr(e+"/pending",function(u,h,y){return{payload:void 0,meta:Hl(Wr({},y||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),s=Vr(e+"/rejected",function(u,h,y,O,E){return{payload:O,error:(o&&o.serializeError||S3)(u||"Rejected"),meta:Hl(Wr({},E||{}),{arg:y,requestId:h,rejectedWithValue:!!O,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(h,y,O){var E=o?.idGenerator?o.idGenerator(u):v3(),_=new d,N,I=!1;function $(L){N=L,_.abort()}var A=function(){return s3(this,null,function(){var L,k,H,X,le,se,q;return t3(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),X=(L=o?.condition)==null?void 0:L.call(o,u,{getState:y,extra:O}),O3(X)?[4,X]:[3,2];case 1:X=x.sent(),x.label=2;case 2:if(X===!1||_.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,le=new Promise(function(w,j){return _.signal.addEventListener("abort",function(){return j({name:"AbortError",message:N||"Aborted"})})}),h(a(E,u,(k=o?.getPendingMeta)==null?void 0:k.call(o,{requestId:E,arg:u},{getState:y,extra:O}))),[4,Promise.race([le,Promise.resolve(r(u,{dispatch:h,getState:y,extra:O,requestId:E,signal:_.signal,abort:$,rejectWithValue:function(w,j){return new Wl(w,j)},fulfillWithValue:function(w,j){return new yp(w,j)}})).then(function(w){if(w instanceof Wl)throw w;return w instanceof yp?n(w.payload,E,u,w.meta):n(w,E,u)})])];case 3:return H=x.sent(),[3,5];case 4:return se=x.sent(),H=se instanceof Wl?s(null,E,u,se.payload,se.meta):s(se,E,u),[3,5];case 5:return q=o&&!o.dispatchConditionRejection&&s.match(H)&&H.meta.condition,q||h(H),[2,H]}})})}();return Object.assign(A,{abort:$,requestId:E,arg:u,unwrap:function(){return A.then(C3)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function C3(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function O3(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Op="listener",Ep="completed",Lp="cancelled",iO="task-"+Lp,nO="task-"+Ep,aO=Op+"-"+Lp,sO=Op+"-"+Ep;var jl="listenerMiddleware";var lO=Vr(jl+"/add"),cO=Vr(jl+"/removeAll"),dO=Vr(jl+"/remove");var bp,fO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(bp||(bp=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},E3=function(t){return function(e){setTimeout(e,t)}},pO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:E3(10);op();window.ftReduxStores||(window.ftReduxStores={});var jr=class t extends vr{static get(e){var r;let o=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(ri(a))return a;if(n==null)return;let s=Cp({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),l=xp({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let u=ho(s.getInitialState());for(let h of f.keeping)u[h]=(d??u)[h];return u}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[n.name]=new t(s,l,n.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ji;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,f=a[d];return f?(...u)=>{let h=f(...u.map(n));return this.reduxStore.dispatch(h),h}:u=>{this.setState({[d]:n(u)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function L3(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ri(e)&&e.clear()}var ia=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);St(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Ap(t,e,r){return new ia(t,e,r).watch()}var na=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Yl={};ne(Yl,{scrollHelper:()=>A3});var ql,aa=new Map,Zl=class{lock(e,r){if(r){let o=aa.get(r);if(o==null||o===e)return aa.set(r,e),r}}release(e,r){r&&aa.get(r)===e&&aa.delete(r)}findFirstScrollableParent(e){var r;let o,n;for(let a of Cs(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else l&&n==null&&(n=s)}return(r=o??n)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,n;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return a+((n=r?.offsetTop)!==null&&n!==void 0?n:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let n=this.getAbsoluteScrollOffset(o,e),a=n-o.clientHeight+e.clientHeight,s=n,l=Ir(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(ql=window.FluidTopicsScrollHelper)!==null&&ql!==void 0?ql:new Zl;var A3=window.FluidTopicsScrollHelper;var Ql={};ne(Ql,{SearchPlaceConverter:()=>qr,SearchPlaceQueryParams:()=>ge,isSearchPlaceQueryParams:()=>du,serializeRequest:()=>k3});var R3=dh(Rp(),1);var _p;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(_p||(_p={}));var kp;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(kp||(kp={}));var Tp;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Tp||(Tp={}));var Mp;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Mp||(Mp={}));var Np;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Np||(Np={}));var Pp;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Pp||(Pp={}));var Ip;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Ip||(Ip={}));var zp;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(zp||(zp={}));var $p;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})($p||($p={}));var Dp;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Dp||(Dp={}));var Bp;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Bp||(Bp={}));var Fp;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Fp||(Fp={}));var Up;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Up||(Up={}));var Hp;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Hp||(Hp={}));var _o;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_o||(_o={}));var Gp;(function(t){t.ASC="ASC",t.DESC="DESC"})(Gp||(Gp={}));var Wp;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Wp||(Wp={}));var ca;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ca||(ca={}));var Xp=t=>Object.keys(ca).includes(t);var Vp;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Vp||(Vp={}));var jp;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(jp||(jp={}));var Kp;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Kp||(Kp={}));var ci;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ci||(ci={}));var Qp=t=>Object.keys(ci).includes(t);var qp;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(qp||(qp={}));var Xl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Xl||(Xl={}));var Zp;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Zp||(Zp={}));var De;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(De||(De={}));var zt;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(zt||(zt={}));var Yp;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Yp||(Yp={}));var Jp;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Jp||(Jp={}));var eu;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(eu||(eu={}));var tu;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(tu||(tu={}));var ru;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ru||(ru={}));var ou;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(ou||(ou={}));var iu;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(iu||(iu={}));var nu;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(nu||(nu={}));var au;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(au||(au={}));var w3={[De.PERSONAL_BOOK_SHARE_USER]:[De.PERSONAL_BOOK_USER],[De.HTML_EXPORT_USER]:[De.PERSONAL_BOOK_USER],[De.PDF_EXPORT_USER]:[De.PERSONAL_BOOK_USER],[De.KHUB_ADMIN]:[De.CONTENT_PUBLISHER],[De.ADMIN]:[De.KHUB_ADMIN,De.USERS_ADMIN,De.PORTAL_ADMIN,De.BEHAVIOR_DATA_USER],[De.GENERATIVE_AI_EXPORT_USER]:[De.GENERATIVE_AI_USER]};function su(t,e){return t===e||(w3[t]??[]).some(r=>su(r,e))}function lu(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>su(o,e))}function _3(t){return`"${t}"`}function cu(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function k3(t,e){return new qr(t).serialize(e)}var ge;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(ge||(ge={}));var T3=new Set(Object.values(ge));function du(t){return T3.has(t)}var qr=class{constructor(e,r=20,o=!1,n="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=n,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,n=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return n.search=this.toURLSearchParams(e),n.toString()}toURLSearchParams(e,r=!1){var o,n,a,s,l,d,f,u,h,y,O;let E=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&E.append(ge.LOCALE,e.contentLocale):E.append(ge.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&E.append(ge.QUERY,e.query);let _=(a=(n=e.metadataFilters)===null||n===void 0?void 0:n.filter(L=>L.valueFilter&&!L.valueFilter.negative))!==null&&a!==void 0?a:[];if(_.length>0){let L=_.map(k=>{var H,X;let le=((X=(H=k.valueFilter)===null||H===void 0?void 0:H.values)!==null&&X!==void 0?X:[]).map(se=>this.escapeFilters(se)).map(se=>_3(cu(se))).join("_");return`${k.key}~${le}`}).join("*");E.append(ge.VALUE_FILTERS,L)}let N=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(L=>L.dateFilter))!==null&&l!==void 0?l:[];if(N.length>0){let L=N.map(k=>{var H;return`${k.key}~${(H=k.dateFilter)===null||H===void 0?void 0:H.type.toLowerCase()}`}).join("*");E.append(ge.DATE_FILTERS,L)}let I=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(L=>L.rangeFilter))!==null&&f!==void 0?f:[];if(I.length>0){let L=I.map(k=>{var H,X;return`${k.key}~${(H=k.rangeFilter)===null||H===void 0?void 0:H.from}_${(X=k.rangeFilter)===null||X===void 0?void 0:X.to}`}).join("*");E.append(ge.RANGE_FILTERS,L)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&E.append(ge.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&E.append(ge.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&E.append(ge.SORT,e.sortId),!((u=e.paging)===null||u===void 0)&&u.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&E.append(ge.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&E.append(ge.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let $=(O=e.otherQueryParams)!==null&&O!==void 0?O:{};for(let L in $)E.append(L,$[L]);let A=new Array;return E.forEach((L,k)=>{A.push(this.encodeQueryString(k)+"="+this.encodeQueryString(L))}),encodeURI(A.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),n=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?n:{...n,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:n.scope}}fromURLSearchParams(e){var r,o,n,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(I){console.warn("Could not decode search request query params, fallback on raw value",I)}let d=new URLSearchParams(e),f=d.get(ge.LOCALE)==="all"?void 0:d.get(ge.LOCALE),u=((r=d.get(ge.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(ge.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(n=d.get(ge.SCOPE))!==null&&n!==void 0?n:"default",O=+((a=d.get(ge.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),E=d.get(ge.KEYWORD_MATCH),_=E?E.toUpperCase()===_o.MANDATORY?_o.MANDATORY:_o.OPTIONAL:void 0,N={};for(let I of d.keys())du(I)||(N[I]=d.get(I));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ge.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[y])!==null&&l!==void 0?l:"DEFAULT",virtualField:Xp(u)?u:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Ir(1,isNaN(O)?this.defaultPerPage:O,1e3)},keywordMatch:_,otherQueryParams:N}}parseCompatFilters(e){var r,o,n,a,s,l;let d=[];return e.has(ge.FILTERS)&&(d=this.parseValueFilters((r=e.get(ge.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ge.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((n=e.get(ge.PERIOD))!==null&&n!==void 0?n:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(ge.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(ge.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(ge.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(cu).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:ci[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}unescapeFilterValue(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replace(n,r);return e}parseLegacyPeriodFilter(e){if(Qp(e))return[{key:"ft:lastEdition",dateFilter:{type:ci[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,n]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:n}}]}return[]}};var tc={};ne(tc,{toFtFormComponent:()=>ec});var Jl=Symbol("elementInternals"),ec=Ge(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Jl].form}constructor(...o){super(o),this[Jl]=this.attachInternals()}setFormValue(o){this[Jl].setFormValue(o)}}return e});var rc={};ne(rc,{DateFormatter:()=>ko});var ko=class{static format(e,r,o,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(e,r,o,n)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,n){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(a);if(!n)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${l}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ic={};ne(ic,{ALL_KEYS_VALUE:()=>oc,SameWindowStorageEvent:()=>di});var oc="__all__",di=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==oc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new di(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new di(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new di(oc))}});var ac={};ne(ac,{FocusMainContentEvent:()=>nc});var nc=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var fu={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function M3(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function N3(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",M3);document.addEventListener("click",N3);var fi=T`
48
+ `;var jf={};var Ol={};ne(Ol,{ParametrizedLabelResolver:()=>Fr});var Fr=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,n;e=this.resolvePluralKey(e,r);let a=(n=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&n!==void 0?n:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,n)=>e=e.replace(new RegExp(`\\{${n}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let n=`${String(e)}[\\=${o}]`;if(n in this.labels||n in this.defaultLabels)return n}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=n=>r?.includes("date")?e.toLocaleDateString(n):r?.includes("time")?e.toLocaleTimeString(n):e.toLocaleString(n);try{return o(document.documentElement.lang)}catch{return o()}}};var Kl={};ne(Kl,{FtCommandQueue:()=>Ji,FtLitElementRedux:()=>Ao,FtReduxStore:()=>jr,FtStateManager:()=>na,ReduxWatcher:()=>ia,clearAllStores:()=>L3,isFtReduxStore:()=>ri,redux:()=>nr,reduxEventListener:()=>H4,reduxReactive:()=>U4,watch:()=>Ap,withRedux:()=>Kf});var U4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},nr=t=>{let e=t??{};return(r,o)=>{var n;let a={hasChanged:St,attribute:!1,...e};g(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=e.selector)!==null&&n!==void 0?n:l=>l[o],store:e.store})}},H4=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var Ji=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function ri(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var en=Symbol("internalReduxEventsUnsubscribers"),Ur=Symbol("internalStoresUnsubscribers"),Lo=Symbol("internalStores"),Kf=Ge(Symbol("withRedux"),function(t){var e,r,o;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Lo].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Lo].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Lo].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[Lo].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Lo].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Lo].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let f=this.getStore(s.store);f&&(s.store?this[Ur].has(s.store):this[Ur].size>0)&&(this[l]=s.selector(f.getState(),this))}})}subscribeToStore(s,l){var d;this[Ur].set(s,l.subscribe(()=>this.updateFromStores())),this[en].set(s,[]),ri(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((f,u)=>{if(typeof this[u]=="function"&&(!f.store||l.name===f.store)){let h=y=>this[u](y);l.addEventListener(f.eventName,h),this[en].get(s).push(()=>l.removeEventListener(f.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ur].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Ur].has(s)&&this[Ur].get(s)(),this[Ur].delete(s),(l=this[en].get(s))===null||l===void 0||l.forEach(d=>d()),this[en].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ur,r=Lo,o=en,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Ao=class extends Kf(U){};function It(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Sr(t){return!!t&&!!t[Ae]}function Kt(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===Y4}(t)||Array.isArray(t)||!!t[ep]||!!(!((e=t.constructor)===null||e===void 0)&&e[ep])||Ml(t)||Nl(t))}function wo(t,e,r){r===void 0&&(r=!1),ni(t)===0?(r?Object.keys:ii)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,n){return e(n,o,t)})}function ni(t){var e=t[Ae];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ml(t)?2:Nl(t)?3:0}function oi(t,e){return ni(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function G4(t,e){return ni(t)===2?t.get(e):t[e]}function tp(t,e,r){var o=ni(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function rp(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ml(t){return q4&&t instanceof Map}function Nl(t){return Z4&&t instanceof Set}function Hr(t){return t.o||t.t}function Pl(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=np(t);delete e[Ae];for(var r=ii(e),o=0;o<r.length;o++){var n=r[o],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Il(t,e){return e===void 0&&(e=!1),zl(t)||Sr(t)||!Kt(t)||(ni(t)>1&&(t.set=t.add=t.clear=t.delete=W4),Object.freeze(t),e&&wo(t,function(r,o){return Il(o,!0)},!0)),t}function W4(){It(2)}function zl(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ar(t){var e=Tl[t];return e||It(18,t),e}function V4(t,e){Tl[t]||(Tl[t]=e)}function Rl(){return rn}function El(t,e){e&&(ar("Patches"),t.u=[],t.s=[],t.v=e)}function Jn(t){_l(t),t.p.forEach(j4),t.p=null}function _l(t){t===rn&&(rn=t.l)}function qf(t){return rn={p:[],l:rn,h:t,m:!0,_:0}}function j4(t){var e=t[Ae];e.i===0||e.i===1?e.j():e.g=!0}function Ll(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||ar("ES5").S(e,t,o),o?(r[Ae].P&&(Jn(e),It(4)),Kt(t)&&(t=ea(e,t),e.l||ta(e,t)),e.u&&ar("Patches").M(r[Ae].t,t,e.u,e.s)):t=ea(e,r,[]),Jn(e),e.u&&e.v(e.u,e.s),t!==ip?t:void 0}function ea(t,e,r){if(zl(e))return e;var o=e[Ae];if(!o)return wo(e,function(l,d){return Zf(t,o,e,l,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return ta(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=Pl(o.k):o.o,a=n,s=!1;o.i===3&&(a=new Set(n),n.clear(),s=!0),wo(a,function(l,d){return Zf(t,o,n,l,d,r,s)}),ta(t,n,!1),r&&t.u&&ar("Patches").N(o,r,t.u,t.s)}return o.o}function Zf(t,e,r,o,n,a,s){if(Sr(n)){var l=ea(t,n,a&&e&&e.i!==3&&!oi(e.R,o)?a.concat(o):void 0);if(tp(r,o,l),!Sr(l))return;t.m=!1}else s&&r.add(n);if(Kt(n)&&!zl(n)){if(!t.h.D&&t._<1)return;ea(t,n),e&&e.A.l||ta(t,n)}}function ta(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Il(e,r)}function Al(t,e){var r=t[Ae];return(r?Hr(r):t)[e]}function Yf(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function Gr(t){t.P||(t.P=!0,t.l&&Gr(t.l))}function wl(t){t.o||(t.o=Pl(t.t))}function kl(t,e,r){var o=Ml(e)?ar("MapSet").F(e,r):Nl(e)?ar("MapSet").T(e,r):t.O?function(n,a){var s=Array.isArray(n),l={i:s?1:0,A:a?a.A:Rl(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},d=l,f=on;s&&(d=[l],f=tn);var u=Proxy.revocable(d,f),h=u.revoke,y=u.proxy;return l.k=y,l.j=h,y}(e,r):ar("ES5").J(e,r);return(r?r.A:Rl()).p.push(o),o}function K4(t){return Sr(t)||It(22,t),function e(r){if(!Kt(r))return r;var o,n=r[Ae],a=ni(r);if(n){if(!n.P&&(n.i<4||!ar("ES5").K(n)))return n.t;n.I=!0,o=Xf(r,a),n.I=!1}else o=Xf(r,a);return wo(o,function(s,l){n&&G4(n.t,s)===l||tp(o,s,e(l))}),a===3?new Set(o):o}(t)}function Xf(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Pl(t)}function op(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var f=this[Ae];return on.get(f,s)},set:function(f){var u=this[Ae];on.set(u,s,f)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][Ae];if(!d.P)switch(d.i){case 5:o(d)&&Gr(d);break;case 4:r(d)&&Gr(d)}}}function r(s){for(var l=s.t,d=s.k,f=ii(d),u=f.length-1;u>=0;u--){var h=f[u];if(h!==Ae){var y=l[h];if(y===void 0&&!oi(l,h))return!0;var O=d[h],E=O&&O[Ae];if(E?E.t!==y:!rp(O,y))return!0}}var _=!!l[Ae];return f.length!==ii(l).length+(_?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var f=0;f<l.length;f++)if(!l.hasOwnProperty(f))return!0;return!1}function n(s){s.g&&It(3,JSON.stringify(Hr(s)))}var a={};V4("ES5",{J:function(s,l){var d=Array.isArray(s),f=function(h,y){if(h){for(var O=Array(y.length),E=0;E<y.length;E++)Object.defineProperty(O,""+E,t(E,!0));return O}var _=np(y);delete _[Ae];for(var N=ii(_),I=0;I<N.length;I++){var $=N[I];_[$]=t($,h||!!_[$].enumerable)}return Object.create(Object.getPrototypeOf(y),_)}(d,s),u={i:d?5:4,A:l?l.A:Rl(),P:!1,I:!1,R:{},l,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,Ae,{value:u,writable:!0}),f},S:function(s,l,d){d?Sr(l)&&l[Ae].A===s&&e(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var h=u[Ae];if(h){var y=h.t,O=h.k,E=h.R,_=h.i;if(_===4)wo(O,function(L){L!==Ae&&(y[L]!==void 0||oi(y,L)?E[L]||f(O[L]):(E[L]=!0,Gr(h)))}),wo(y,function(L){O[L]!==void 0||oi(O,L)||(E[L]=!1,Gr(h))});else if(_===5){if(o(h)&&(Gr(h),E.length=!0),O.length<y.length)for(var N=O.length;N<y.length;N++)E[N]=!1;else for(var I=y.length;I<O.length;I++)E[I]=!0;for(var $=Math.min(O.length,y.length),A=0;A<$;A++)O.hasOwnProperty(A)||(E[A]=!0),E[A]===void 0&&f(O[A])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Qf,rn,$l=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",q4=typeof Map<"u",Z4=typeof Set<"u",Jf=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ip=$l?Symbol.for("immer-nothing"):((Qf={})["immer-nothing"]=!0,Qf),ep=$l?Symbol.for("immer-draftable"):"__$immer_draftable",Ae=$l?Symbol.for("immer-state"):"__$immer_state";var Y4=""+Object.prototype.constructor,ii=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,np=Object.getOwnPropertyDescriptors||function(t){var e={};return ii(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},Tl={},on={get:function(t,e){if(e===Ae)return t;var r=Hr(t);if(!oi(r,e))return function(n,a,s){var l,d=Yf(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(n.k):void 0}(t,r,e);var o=r[e];return t.I||!Kt(o)?o:o===Al(t.t,e)?(wl(t),t.o[e]=kl(t.A.h,o,t)):o},has:function(t,e){return e in Hr(t)},ownKeys:function(t){return Reflect.ownKeys(Hr(t))},set:function(t,e,r){var o=Yf(Hr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var n=Al(Hr(t),e),a=n?.[Ae];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(rp(r,n)&&(r!==void 0||oi(t.t,e)))return!0;wl(t),Gr(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Al(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,wl(t),Gr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Hr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){It(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){It(12)}},tn={};wo(on,function(t,e){tn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),tn.deleteProperty=function(t,e){return tn.set.call(this,t,e,void 0)},tn.set=function(t,e,r){return on.set.call(this,t[0],e,r,t[0])};var X4=function(){function t(r){var o=this;this.O=Jf,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var l=a;a=n;var d=o;return function(_){var N=this;_===void 0&&(_=l);for(var I=arguments.length,$=Array(I>1?I-1:0),A=1;A<I;A++)$[A-1]=arguments[A];return d.produce(_,function(L){var k;return(k=a).call.apply(k,[N,L].concat($))})}}var f;if(typeof a!="function"&&It(6),s!==void 0&&typeof s!="function"&&It(7),Kt(n)){var u=qf(o),h=kl(o,n,void 0),y=!0;try{f=a(h),y=!1}finally{y?Jn(u):_l(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(_){return El(u,s),Ll(_,u)},function(_){throw Jn(u),_}):(El(u,s),Ll(f,u))}if(!n||typeof n!="object"){if((f=a(n))===void 0&&(f=n),f===ip&&(f=void 0),o.D&&Il(f,!0),s){var O=[],E=[];ar("Patches").M(n,f,O,E),s(O,E)}return f}It(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(f){for(var u=arguments.length,h=Array(u>1?u-1:0),y=1;y<u;y++)h[y-1]=arguments[y];return o.produceWithPatches(f,function(O){return n.apply(void 0,[O].concat(h))})};var s,l,d=o.produce(n,a,function(f,u){s=f,l=u});return typeof Promise<"u"&&d instanceof Promise?d.then(function(f){return[f,s,l]}):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Kt(r)||It(8),Sr(r)&&(r=K4(r));var o=qf(this),n=kl(this,r,void 0);return n[Ae].C=!0,_l(o),n},e.finishDraft=function(r,o){var n=r&&r[Ae],a=n.A;return El(a,o),Ll(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Jf&&It(20),this.O=r},e.applyPatches=function(r,o){var n;for(n=o.length-1;n>=0;n--){var a=o[n];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}n>-1&&(o=o.slice(n+1));var s=ar("Patches").$;return Sr(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),Ot=new X4,Q4=Ot.produce,kC=Ot.produceWithPatches.bind(Ot),TC=Ot.setAutoFreeze.bind(Ot),MC=Ot.setUseProxies.bind(Ot),NC=Ot.applyPatches.bind(Ot),PC=Ot.createDraft.bind(Ot),IC=Ot.finishDraft.bind(Ot),ra=Q4;function Ro(t){"@babel/helpers - typeof";return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ro(t)}function ap(t,e){if(Ro(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Ro(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sp(t){var e=ap(t,"string");return Ro(e)=="symbol"?e:e+""}function lp(t,e,r){return(e=sp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function Dl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cp(Object(r),!0).forEach(function(o){lp(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cp(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function st(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var dp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Bl=function(){return Math.random().toString(36).substring(7).split("").join(".")},oa={INIT:"@@redux/INIT"+Bl(),REPLACE:"@@redux/REPLACE"+Bl(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Bl()}};function J4(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Fl(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(st(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(st(1));return r(Fl)(t,e)}if(typeof t!="function")throw new Error(st(2));var n=t,a=e,s=[],l=s,d=!1;function f(){l===s&&(l=s.slice())}function u(){if(d)throw new Error(st(3));return a}function h(_){if(typeof _!="function")throw new Error(st(4));if(d)throw new Error(st(5));var N=!0;return f(),l.push(_),function(){if(N){if(d)throw new Error(st(6));N=!1,f();var $=l.indexOf(_);l.splice($,1),s=null}}}function y(_){if(!J4(_))throw new Error(st(7));if(typeof _.type>"u")throw new Error(st(8));if(d)throw new Error(st(9));try{d=!0,a=n(a,_)}finally{d=!1}for(var N=s=l,I=0;I<N.length;I++){var $=N[I];$()}return _}function O(_){if(typeof _!="function")throw new Error(st(10));n=_,y({type:oa.REPLACE})}function E(){var _,N=h;return _={subscribe:function($){if(typeof $!="object"||$===null)throw new Error(st(11));function A(){$.next&&$.next(u())}A();var L=N(A);return{unsubscribe:L}}},_[dp]=function(){return this},_}return y({type:oa.INIT}),o={dispatch:y,subscribe:h,getState:u,replaceReducer:O},o[dp]=E,o}function e3(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:oa.INIT});if(typeof o>"u")throw new Error(st(12));if(typeof r(void 0,{type:oa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(st(13))})}function fp(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var n=e[o];typeof t[n]=="function"&&(r[n]=t[n])}var a=Object.keys(r),s,l;try{e3(r)}catch(d){l=d}return function(f,u){if(f===void 0&&(f={}),l)throw l;if(0)var h;for(var y=!1,O={},E=0;E<a.length;E++){var _=a[E],N=r[_],I=f[_],$=N(I,u);if(typeof $>"u"){var A=u&&u.type;throw new Error(st(14))}O[_]=$,y=y||$!==I}return y=y||a.length!==Object.keys(f).length,y?O:f}}function ai(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function pp(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var n=o.apply(void 0,arguments),a=function(){throw new Error(st(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=ai.apply(void 0,l)(n.dispatch),Dl(Dl({},n),{},{dispatch:a})}}}function up(t){var e=function(o){var n=o.dispatch,a=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,a,t):s(l)}}};return e}var hp=up();hp.withExtraArgument=up;var Ul=hp;var vp=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),t3=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(u){return d([f,u])}}function d(f){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=f[0]&2?n.return:f[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,f[1])).done)return a;switch(n=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,n=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=e.call(t,r)}catch(u){f=[6,u],n=0}finally{o=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},si=function(t,e){for(var r=0,o=e.length,n=t.length;r<o;r++,n++)t[n]=e[r];return t},r3=Object.defineProperty,o3=Object.defineProperties,i3=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertySymbols,n3=Object.prototype.hasOwnProperty,a3=Object.prototype.propertyIsEnumerable,gp=function(t,e,r){return e in t?r3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Wr=function(t,e){for(var r in e||(e={}))n3.call(e,r)&&gp(t,r,e[r]);if(mp)for(var o=0,n=mp(e);o<n.length;o++){var r=n[o];a3.call(e,r)&&gp(t,r,e[r])}return t},Hl=function(t,e){return o3(t,i3(e))},s3=function(t,e,r){return new Promise(function(o,n){var a=function(d){try{l(r.next(d))}catch(f){n(f)}},s=function(d){try{l(r.throw(d))}catch(f){n(f)}},l=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})};var l3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ai:ai.apply(null,arguments)},JC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function c3(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}var d3=function(t){vp(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,si([void 0],r[0].concat(this)))):new(e.bind.apply(e,si([void 0],r.concat(this))))},e}(Array),f3=function(t){vp(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,si([void 0],r[0].concat(this)))):new(e.bind.apply(e,si([void 0],r.concat(this))))},e}(Array);function Vl(t){return Kt(t)?ra(t,function(){}):t}function p3(t){return typeof t=="boolean"}function u3(){return function(e){return h3(e)}}function h3(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,n=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,l=new d3;if(r&&(p3(r)?l.push(Ul):l.push(Ul.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var f}return l}var Gl=!0;function xp(t){var e=u3(),r=t||{},o=r.reducer,n=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,f=r.preloadedState,u=f===void 0?void 0:f,h=r.enhancers,y=h===void 0?void 0:h,O;if(typeof n=="function")O=n;else if(c3(n))O=fp(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var E=s;if(typeof E=="function"&&(E=E(e),!Gl&&!Array.isArray(E)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gl&&E.some(function(L){return typeof L!="function"}))throw new Error("each middleware provided to configureStore must be a function");var _=pp.apply(void 0,E),N=ai;d&&(N=l3(Wr({trace:!Gl},typeof d=="object"&&d)));var I=new f3(_),$=I;Array.isArray(y)?$=si([_],y):typeof y=="function"&&($=y(I));var A=N.apply(void 0,$);return Fl(O,u,A)}function Vr(t,e){function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return Wr(Wr({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function Sp(t){var e={},r=[],o,n={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,n},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return o=a,n}};return t(n),[e,r,o]}function m3(t){return typeof t=="function"}function g3(t,e,r,o){r===void 0&&(r=[]);var n=typeof e=="function"?Sp(e):[e,r,o],a=n[0],s=n[1],l=n[2],d;if(m3(t))d=function(){return Vl(t())};else{var f=Vl(t);d=function(){return f}}function u(h,y){h===void 0&&(h=d());var O=si([a[y.type]],s.filter(function(E){var _=E.matcher;return _(y)}).map(function(E){var _=E.reducer;return _}));return O.filter(function(E){return!!E}).length===0&&(O=[l]),O.reduce(function(E,_){if(_)if(Sr(E)){var N=E,I=_(N,y);return I===void 0?E:I}else{if(Kt(E))return ra(E,function($){return _($,y)});var I=_(E,y);if(I===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return I}return E},h)}return u.getInitialState=d,u}function y3(t,e){return t+"/"+e}function Cp(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Vl(t.initialState),o=t.reducers||{},n=Object.keys(o),a={},s={},l={};n.forEach(function(u){var h=o[u],y=y3(e,u),O,E;"reducer"in h?(O=h.reducer,E=h.prepare):O=h,a[u]=O,s[y]=O,l[u]=E?Vr(y,E):Vr(y)});function d(){var u=typeof t.extraReducers=="function"?Sp(t.extraReducers):[t.extraReducers],h=u[0],y=h===void 0?{}:h,O=u[1],E=O===void 0?[]:O,_=u[2],N=_===void 0?void 0:_,I=Wr(Wr({},y),s);return g3(r,function($){for(var A in I)$.addCase(A,I[A]);for(var L=0,k=E;L<k.length;L++){var H=k[L];$.addMatcher(H.matcher,H.reducer)}N&&$.addDefaultCase(N)})}var f;return{name:e,reducer:function(u,h){return f||(f=d()),f(u,h)},actions:l,caseReducers:a,getInitialState:function(){return f||(f=d()),f.getInitialState()}}}var b3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",v3=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=b3[Math.random()*64|0];return e},x3=["name","message","stack","code"],Wl=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),yp=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),S3=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=x3;r<o.length;r++){var n=o[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},oO=function(){function t(e,r,o){var n=Vr(e+"/fulfilled",function(u,h,y,O){return{payload:u,meta:Hl(Wr({},O||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),a=Vr(e+"/pending",function(u,h,y){return{payload:void 0,meta:Hl(Wr({},y||{}),{arg:h,requestId:u,requestStatus:"pending"})}}),s=Vr(e+"/rejected",function(u,h,y,O,E){return{payload:O,error:(o&&o.serializeError||S3)(u||"Rejected"),meta:Hl(Wr({},E||{}),{arg:y,requestId:h,rejectedWithValue:!!O,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(h,y,O){var E=o?.idGenerator?o.idGenerator(u):v3(),_=new d,N,I=!1;function $(L){N=L,_.abort()}var A=function(){return s3(this,null,function(){var L,k,H,X,le,se,q;return t3(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),X=(L=o?.condition)==null?void 0:L.call(o,u,{getState:y,extra:O}),O3(X)?[4,X]:[3,2];case 1:X=x.sent(),x.label=2;case 2:if(X===!1||_.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return I=!0,le=new Promise(function(w,j){return _.signal.addEventListener("abort",function(){return j({name:"AbortError",message:N||"Aborted"})})}),h(a(E,u,(k=o?.getPendingMeta)==null?void 0:k.call(o,{requestId:E,arg:u},{getState:y,extra:O}))),[4,Promise.race([le,Promise.resolve(r(u,{dispatch:h,getState:y,extra:O,requestId:E,signal:_.signal,abort:$,rejectWithValue:function(w,j){return new Wl(w,j)},fulfillWithValue:function(w,j){return new yp(w,j)}})).then(function(w){if(w instanceof Wl)throw w;return w instanceof yp?n(w.payload,E,u,w.meta):n(w,E,u)})])];case 3:return H=x.sent(),[3,5];case 4:return se=x.sent(),H=se instanceof Wl?s(null,E,u,se.payload,se.meta):s(se,E,u),[3,5];case 5:return q=o&&!o.dispatchConditionRejection&&s.match(H)&&H.meta.condition,q||h(H),[2,H]}})})}();return Object.assign(A,{abort:$,requestId:E,arg:u,unwrap:function(){return A.then(C3)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();function C3(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function O3(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Op="listener",Ep="completed",Lp="cancelled",iO="task-"+Lp,nO="task-"+Ep,aO=Op+"-"+Lp,sO=Op+"-"+Ep;var jl="listenerMiddleware";var lO=Vr(jl+"/add"),cO=Vr(jl+"/removeAll"),dO=Vr(jl+"/remove");var bp,fO=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(bp||(bp=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},E3=function(t){return function(e){setTimeout(e,t)}},pO=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:E3(10);op();window.ftReduxStores||(window.ftReduxStores={});var jr=class t extends vr{static get(e){var r;let o=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(ri(a))return a;if(n==null)return;let s=Cp({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),l=xp({reducer:(d,f)=>{if(f.type==="CLEAR_FT_REDUX_STORE"){let u=ho(s.getInitialState());for(let h of f.keeping)u[h]=(d??u)[h];return u}else if(typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...f.overwrites};return s.reducer(d,f)}});return window.ftReduxStores[n.name]=new t(s,l,n.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ji;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,f=a[d];return f?(...u)=>{let h=f(...u.map(n));return this.reduxStore.dispatch(h),h}:u=>{this.setState({[d]:n(u)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function L3(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))ri(e)&&e.clear()}var ia=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);St(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Ap(t,e,r){return new ia(t,e,r).watch()}var na=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Yl={};ne(Yl,{scrollHelper:()=>A3});var ql,aa=new Map,Zl=class{lock(e,r){if(r){let o=aa.get(r);if(o==null||o===e)return aa.set(r,e),r}}release(e,r){r&&aa.get(r)===e&&aa.delete(r)}findFirstScrollableParent(e){var r;let o,n;for(let a of Cs(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else l&&n==null&&(n=s)}return(r=o??n)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,n;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return a+((n=r?.offsetTop)!==null&&n!==void 0?n:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let n=this.getAbsoluteScrollOffset(o,e),a=n-o.clientHeight+e.clientHeight,s=n,l=Ir(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(ql=window.FluidTopicsScrollHelper)!==null&&ql!==void 0?ql:new Zl;var A3=window.FluidTopicsScrollHelper;var Ql={};ne(Ql,{SearchPlaceConverter:()=>qr,SearchPlaceQueryParams:()=>ge,isSearchPlaceQueryParams:()=>du,serializeRequest:()=>k3});var R3=dh(Rp(),1);var _p;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(_p||(_p={}));var kp;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(kp||(kp={}));var Tp;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Tp||(Tp={}));var Mp;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Mp||(Mp={}));var Np;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Np||(Np={}));var Pp;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Pp||(Pp={}));var Ip;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Ip||(Ip={}));var zp;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(zp||(zp={}));var $p;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})($p||($p={}));var Dp;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Dp||(Dp={}));var Bp;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Bp||(Bp={}));var Fp;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Fp||(Fp={}));var Up;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Up||(Up={}));var Hp;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Hp||(Hp={}));var _o;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_o||(_o={}));var Gp;(function(t){t.ASC="ASC",t.DESC="DESC"})(Gp||(Gp={}));var Wp;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Wp||(Wp={}));var ca;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ca||(ca={}));var Xp=t=>Object.keys(ca).includes(t);var Vp;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Vp||(Vp={}));var jp;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(jp||(jp={}));var Kp;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Kp||(Kp={}));var ci;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ci||(ci={}));var Qp=t=>Object.keys(ci).includes(t);var qp;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(qp||(qp={}));var Xl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Xl||(Xl={}));var Zp;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Zp||(Zp={}));var De;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(De||(De={}));var zt;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(zt||(zt={}));var Yp;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Yp||(Yp={}));var Jp;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Jp||(Jp={}));var eu;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(eu||(eu={}));var tu;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(tu||(tu={}));var ru;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ru||(ru={}));var ou;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(ou||(ou={}));var iu;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(iu||(iu={}));var nu;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(nu||(nu={}));var au;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(au||(au={}));var w3={[De.PERSONAL_BOOK_SHARE_USER]:[De.PERSONAL_BOOK_USER],[De.HTML_EXPORT_USER]:[De.PERSONAL_BOOK_USER],[De.PDF_EXPORT_USER]:[De.PERSONAL_BOOK_USER],[De.KHUB_ADMIN]:[De.CONTENT_PUBLISHER],[De.ADMIN]:[De.KHUB_ADMIN,De.USERS_ADMIN,De.PORTAL_ADMIN,De.BEHAVIOR_DATA_USER],[De.GENERATIVE_AI_EXPORT_USER]:[De.GENERATIVE_AI_USER]};function su(t,e){return t===e||(w3[t]??[]).some(r=>su(r,e))}function lu(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>su(o,e))}function _3(t){return`"${t}"`}function cu(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function k3(t,e){return new qr(t).serialize(e)}var ge;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(ge||(ge={}));var T3=new Set(Object.values(ge));function du(t){return T3.has(t)}var qr=class{constructor(e,r=20,o=!1,n="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=n,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,n=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return n.search=this.toURLSearchParams(e),n.toString()}toURLSearchParams(e,r=!1){var o,n,a,s,l,d,f,u,h,y,O;let E=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&E.append(ge.LOCALE,e.contentLocale):E.append(ge.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&E.append(ge.QUERY,e.query);let _=(a=(n=e.metadataFilters)===null||n===void 0?void 0:n.filter(L=>L.valueFilter&&!L.valueFilter.negative))!==null&&a!==void 0?a:[];if(_.length>0){let L=_.map(k=>{var H,X;let le=((X=(H=k.valueFilter)===null||H===void 0?void 0:H.values)!==null&&X!==void 0?X:[]).map(se=>this.escapeFilters(se)).map(se=>_3(cu(se))).join("_");return`${k.key}~${le}`}).join("*");E.append(ge.VALUE_FILTERS,L)}let N=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(L=>L.dateFilter))!==null&&l!==void 0?l:[];if(N.length>0){let L=N.map(k=>{var H;return`${k.key}~${(H=k.dateFilter)===null||H===void 0?void 0:H.type.toLowerCase()}`}).join("*");E.append(ge.DATE_FILTERS,L)}let I=(f=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(L=>L.rangeFilter))!==null&&f!==void 0?f:[];if(I.length>0){let L=I.map(k=>{var H,X;return`${k.key}~${(H=k.rangeFilter)===null||H===void 0?void 0:H.from}_${(X=k.rangeFilter)===null||X===void 0?void 0:X.to}`}).join("*");E.append(ge.RANGE_FILTERS,L)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&E.append(ge.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&E.append(ge.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&E.append(ge.SORT,e.sortId),!((u=e.paging)===null||u===void 0)&&u.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&E.append(ge.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&E.append(ge.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let $=(O=e.otherQueryParams)!==null&&O!==void 0?O:{};for(let L in $)E.append(L,$[L]);let A=new Array;return E.forEach((L,k)=>{A.push(this.encodeQueryString(k)+"="+this.encodeQueryString(L))}),encodeURI(A.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),n=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?n:{...n,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:n.scope}}fromURLSearchParams(e){var r,o,n,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(I){console.warn("Could not decode search request query params, fallback on raw value",I)}let d=new URLSearchParams(e),f=d.get(ge.LOCALE)==="all"?void 0:d.get(ge.LOCALE),u=((r=d.get(ge.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(ge.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(n=d.get(ge.SCOPE))!==null&&n!==void 0?n:"default",O=+((a=d.get(ge.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),E=d.get(ge.KEYWORD_MATCH),_=E?E.toUpperCase()===_o.MANDATORY?_o.MANDATORY:_o.OPTIONAL:void 0,N={};for(let I of d.keys())du(I)||(N[I]=d.get(I));return{contentLocale:f??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ge.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[y])!==null&&l!==void 0?l:"DEFAULT",virtualField:Xp(u)?u:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Ir(1,isNaN(O)?this.defaultPerPage:O,1e3)},keywordMatch:_,otherQueryParams:N}}parseCompatFilters(e){var r,o,n,a,s,l;let d=[];return e.has(ge.FILTERS)&&(d=this.parseValueFilters((r=e.get(ge.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ge.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((n=e.get(ge.PERIOD))!==null&&n!==void 0?n:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(ge.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(ge.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(ge.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(cu).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:ci[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}unescapeFilterValue(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replace(n,r);return e}parseLegacyPeriodFilter(e){if(Qp(e))return[{key:"ft:lastEdition",dateFilter:{type:ci[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,n]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:n}}]}return[]}};var tc={};ne(tc,{toFtFormComponent:()=>ec});var Jl=Symbol("elementInternals"),ec=Ge(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Jl].form}constructor(...o){super(o),this[Jl]=this.attachInternals()}setFormValue(o){this[Jl].setFormValue(o)}}return e});var rc={};ne(rc,{DateFormatter:()=>ko});var ko=class{static format(e,r,o,n,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,n,!!a)):this.getIntlDateTime(e,r,o,n,!!a)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,n,a){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:n?`${l} ${d}`:l}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ic={};ne(ic,{ALL_KEYS_VALUE:()=>oc,SameWindowStorageEvent:()=>di});var oc="__all__",di=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==oc}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new di(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new di(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new di(oc))}});var ac={};ne(ac,{FocusMainContentEvent:()=>nc});var nc=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var fu={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function M3(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function N3(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",M3);document.addEventListener("click",N3);var fi=T`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -611,7 +611,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
611
611
  position: relative;
612
612
  word-break: break-word;
613
613
  }
614
- `;var U3="ft-app-info",Po=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Po.eventName="authentication-change";var H3={session:(t,e)=>{He(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>W.dispatchEvent(new Po(e.payload)),0))}},W=jr.get({name:U3,reducers:H3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var pa=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ZA=Ge(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(W)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>ko.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return pa([g({type:Boolean})],e.prototype,"useLongDateFormat",void 0),pa([g({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),pa([nr({store:W.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),pa([nr({store:W.name})],e.prototype,"uiLocale",void 0),e});var Io=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=W.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=W.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}};var ua=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Io.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Io.await()}};var yt=class extends ua{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new tr,this.cache=e?n.commonCache:new tr}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ha=class extends yt{async listMySearches(){let{session:e}=W.getState();return lu(e,De.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var ma=class extends yt{async listMyBookmarks(){let e=W.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ga=class extends yt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=W.getState().session;return!!e?.sessionAuthenticated}};var ya=class extends yt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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 e=W.getState().session;return!!e?.sessionAuthenticated}};var G3="ft-user-assets",W3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(zt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;bc(t,r,[...yc(t,r),n]),Uu(t,r,1,o),Hu(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;bc(t,r,yc(t,r).map(n=>n.id===o.id?o:n)),Hu(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;bc(t,r,yc(t,r).filter(a=>a.id!==n)),Uu(t,r,-1,o)}},Gu={[zt.SEARCHES]:"savedSearches",[zt.BOOKMARKS]:"bookmarks",[zt.BOOKS]:void 0,[zt.COLLECTIONS]:void 0},yc=(t,e)=>{var r;let o=Gu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},bc=(t,e,r)=>{let o=Gu[e];o&&(t[o]=r)},Uu=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===zt.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},Hu=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Et=jr.get({name:G3,reducers:W3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(zt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vc=class{constructor(e=new ga,r=new ya){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=W.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ma,this.savedSearchesService=new ha,W.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=W.getState();He((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Et.actions.clearAssetCount(),Et.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Et.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Et.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Et.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Et.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Et.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Et.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Et.getState().assetCounts.bookmarkByMap).length!==0;e===zt.BOOKMARKS&&r&&Et.actions.clearBookmarkCountByMap(),Et.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Et.actions.bookmarks(r)}}},V3=new vc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=V3);var xc=class{addCommand(e,r=!1){W.commands.add(e,r)}consumeCommand(e){return W.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xc;var Wu,xi=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},j3=Symbol("clearAfterUnitTest"),ba=class extends Wn(yt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Wu]=()=>{this.defaultMessages={},this.cache=new tr,this.listeners={}},this.currentUiLocale=W.getState().uiLocale,W.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=W.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};He(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Fr((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Pr)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new xi({loadedContexts:e})),this.dispatchEvent(new xi({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new xi({loadedContexts:[e]})),this.dispatchEvent(new xi({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Gn(0).then(()=>o()).catch(()=>null)))}};Wu=j3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ba{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ba{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Si=window.FluidTopicsI18nService,va=window.FluidTopicsCustomI18nService;var Sc=class{highlightHtml(e,r,o){xl(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Sc;var Cc=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=W.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a;if(e==null)return"";try{return ko.format(e,(o=r?.locale)!==null&&o!==void 0?o:W.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new Cc;var Lr=class{static get(e,r){var o,n;let a=W.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new qr(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Oc=class{urlToSearchRequest(e){return Lr.get().parse(e)}searchRequestToUrl(e){return Lr.get().serialize(e)}};window.FluidTopicsUrlService=new Oc;var zo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};zo.eventName="change";var Ec=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Vu=new Ec;var xa=class t extends vr{static build(){return new t(window.history,Vu,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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),He(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new zo(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[f,s,l]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(zo.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(zo.eventName,e)}currentItem(){return ho(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return ho(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return ho(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=xa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var ju=T`
614
+ `;var U3="ft-app-info",Po=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Po.eventName="authentication-change";var H3={session:(t,e)=>{He(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>W.dispatchEvent(new Po(e.payload)),0))}},W=jr.get({name:U3,reducers:H3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var pa=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ZA=Ge(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(W)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>ko.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return pa([g({type:Boolean})],e.prototype,"useLongDateFormat",void 0),pa([g({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),pa([nr({store:W.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),pa([nr({store:W.name})],e.prototype,"uiLocale",void 0),e});var Io=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=W.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=W.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}};var ua=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Io.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Io.await()}};var yt=class extends ua{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new tr,this.cache=e?n.commonCache:new tr}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ha=class extends yt{async listMySearches(){let{session:e}=W.getState();return lu(e,De.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var ma=class extends yt{async listMyBookmarks(){let e=W.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var ga=class extends yt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=W.getState().session;return!!e?.sessionAuthenticated}};var ya=class extends yt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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 e=W.getState().session;return!!e?.sessionAuthenticated}};var G3="ft-user-assets",W3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(zt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;bc(t,r,[...yc(t,r),n]),Uu(t,r,1,o),Hu(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;bc(t,r,yc(t,r).map(n=>n.id===o.id?o:n)),Hu(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;bc(t,r,yc(t,r).filter(a=>a.id!==n)),Uu(t,r,-1,o)}},Gu={[zt.SEARCHES]:"savedSearches",[zt.BOOKMARKS]:"bookmarks",[zt.BOOKS]:void 0,[zt.COLLECTIONS]:void 0},yc=(t,e)=>{var r;let o=Gu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},bc=(t,e,r)=>{let o=Gu[e];o&&(t[o]=r)},Uu=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===zt.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},Hu=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Et=jr.get({name:G3,reducers:W3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(zt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),vc=class{constructor(e=new ga,r=new ya){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=W.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ma,this.savedSearchesService=new ha,W.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=W.getState();He((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Et.actions.clearAssetCount(),Et.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Et.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Et.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Et.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Et.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Et.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Et.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Et.getState().assetCounts.bookmarkByMap).length!==0;e===zt.BOOKMARKS&&r&&Et.actions.clearBookmarkCountByMap(),Et.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Et.actions.bookmarks(r)}}},V3=new vc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=V3);var xc=class{addCommand(e,r=!1){W.commands.add(e,r)}consumeCommand(e){return W.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xc;var Wu,xi=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},j3=Symbol("clearAfterUnitTest"),ba=class extends Wn(yt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Wu]=()=>{this.defaultMessages={},this.cache=new tr,this.listeners={}},this.currentUiLocale=W.getState().uiLocale,W.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=W.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};He(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Fr((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Pr)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new xi({loadedContexts:e})),this.dispatchEvent(new xi({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new xi({loadedContexts:[e]})),this.dispatchEvent(new xi({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Gn(0).then(()=>o()).catch(()=>null)))}};Wu=j3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ba{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ba{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Si=window.FluidTopicsI18nService,va=window.FluidTopicsCustomI18nService;var Sc=class{highlightHtml(e,r,o){xl(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Sc;var Cc=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=W.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a,s;if(e==null)return"";try{return ko.format(e,(o=r?.locale)!==null&&o!==void 0?o:W.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new Cc;var Lr=class{static get(e,r){var o,n;let a=W.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new qr(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var Oc=class{urlToSearchRequest(e){return Lr.get().parse(e)}searchRequestToUrl(e){return Lr.get().serialize(e)}};window.FluidTopicsUrlService=new Oc;var zo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};zo.eventName="change";var Ec=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Vu=new Ec;var xa=class t extends vr{static build(){return new t(window.history,Vu,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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),He(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new zo(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),f={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[f,s,l]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(zo.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(zo.eventName,e)}currentItem(){return ho(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return ho(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return ho(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=xa.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var ju=T`
615
615
  `;function Ku(t,e){let{authenticationRequired:r,session:o}=W.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Ke=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Oe=class extends U{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Io.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new tr,this.cleanSessionDebouncer=new me,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return S`
616
616
  <slot></slot>
617
617
  `}connectedCallback(){super.connectedCallback(),W.addEventListener(Po.eventName,this.reloadConfiguration)}disconnectedCallback(){W.addEventListener(Po.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,n,a,s,l,d;super.update(e),e.has("baseUrl")&&(W.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&W.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&W.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&W.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&W.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&W.actions.noCustom(this.noCustom),e.has("editorMode")&&W.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&W.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&W.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(f=>Si.addContext(f)),e.has("openExternalDocumentInNewTab")&&W.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&W.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&W.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(W.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),W.actions.availableUiLocales((n=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&n!==void 0?n:[]),W.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&W.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&W.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Ku(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Oe.elementDefinitions={};Oe.styles=ju;Ke([g()],Oe.prototype,"baseUrl",void 0);Ke([g()],Oe.prototype,"apiIntegrationIdentifier",void 0);Ke([g()],Oe.prototype,"apiIntegrationAppVersion",void 0);Ke([g()],Oe.prototype,"uiLocale",void 0);Ke([Ne(null)],Oe.prototype,"availableUiLocales",void 0);Ke([Ne(null)],Oe.prototype,"metadataConfiguration",void 0);Ke([g({type:Boolean})],Oe.prototype,"editorMode",void 0);Ke([g({type:Boolean})],Oe.prototype,"noCustom",void 0);Ke([g({type:Boolean})],Oe.prototype,"openExternalDocumentInNewTab",void 0);Ke([g({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],Oe.prototype,"noCustomComponent",void 0);Ke([g({type:Boolean})],Oe.prototype,"withManualResources",void 0);Ke([g({type:Boolean})],Oe.prototype,"navigatorOnline",void 0);Ke([g({type:Boolean})],Oe.prototype,"forcedOffline",void 0);Ke([g({type:Object})],Oe.prototype,"apiProvider",void 0);Ke([g({type:Boolean})],Oe.prototype,"authenticationRequired",void 0);Ke([Ne([])],Oe.prototype,"messageContexts",void 0);Ke([Ne(void 0)],Oe.prototype,"session",void 0);Ke([F()],Oe.prototype,"localesConfiguration",void 0);Ke([F()],Oe.prototype,"availableContentLocales",void 0);V("ft-app-context")(Oe);var Lc=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Ci=new Lc;var K3=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},cn=Symbol("i18nAttributes"),qu=Symbol("i18nListAttributes"),Zu=Symbol("i18nProperties"),Sa=Symbol("i18nContexts"),ln=Symbol("i18nUnsubs"),Oi=Ge(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?va:Si}i18n(a){let{context:s,key:l,message:d}=a,{custom:f,args:u,argsProvider:h}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let y=u??(h?h(this):[]);return this.getI18nService(f).resolveMessage(s,l,...y)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Ci.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,f=(u,h,y)=>y?.context&&y.key&&a(u,h,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...u})}:y;(s=this[cn])===null||s===void 0||s.forEach((u,h)=>d[h]=f(u,h,d[h])),(l=this[qu])===null||l===void 0||l.forEach((u,h)=>{var y;return d[h]=(y=d[h])===null||y===void 0?void 0:y.map(O=>f(u,h,O))})}updateI18nProperties(a){var s;(s=this[Zu])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[Sa].set(d,{isCustomContext:l}),this[ln].has(d)||this[ln].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Sa].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Sa].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ln].forEach(a=>a()),this[ln].clear()}}return e=Sa,r=ln,K3([g({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Ca=class extends Oi(U){},Oa=class extends Oi(Ao){};var Ac=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?Ci.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},q3=new Ac;var Ea=(t,e)=>(r,o)=>{var n;r.constructor.createProperty(o,{type:Object,hasChanged:St,converter:Ci,...e}),r[cn]=(n=r[cn])!==null&&n!==void 0?n:new Map,r[cn].set(o,t??{})};var La=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?va:Si}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,n)=>{let a=n;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...a)=>this.service.resolveMessage(this.name,n,...a)}),this.rawMessages=new Proxy({},{get:(o,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(o,n)=>()=>n}),this.attributes=new Proxy({},{get:(o,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Yu=T`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-input",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "Search bar input for integrated search component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,18 +19,18 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "2.0.11",
23
- "@fluid-topics/ft-button": "2.0.11",
24
- "@fluid-topics/ft-i18n": "2.0.11",
25
- "@fluid-topics/ft-icon": "2.0.11",
26
- "@fluid-topics/ft-ripple": "2.0.11",
27
- "@fluid-topics/ft-search-context": "2.0.11",
28
- "@fluid-topics/ft-typography": "2.0.11",
29
- "@fluid-topics/ft-wc-utils": "2.0.11",
22
+ "@fluid-topics/ft-app-context": "2.0.12",
23
+ "@fluid-topics/ft-button": "2.0.12",
24
+ "@fluid-topics/ft-i18n": "2.0.12",
25
+ "@fluid-topics/ft-icon": "2.0.12",
26
+ "@fluid-topics/ft-ripple": "2.0.12",
27
+ "@fluid-topics/ft-search-context": "2.0.12",
28
+ "@fluid-topics/ft-typography": "2.0.12",
29
+ "@fluid-topics/ft-wc-utils": "2.0.12",
30
30
  "lit": "3.1.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@fluid-topics/public-api": "1.0.117"
34
34
  },
35
- "gitHead": "aedc97fb65c7bafd16b7adef8218a58f59fea690"
35
+ "gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
36
36
  }