@fluid-topics/ft-reader-feedback 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.
|
@@ -587,7 +587,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
587
587
|
position: relative;
|
|
588
588
|
word-break: break-word;
|
|
589
589
|
}
|
|
590
|
-
`;var e1=["top","right","bottom","left"],Jd=["start","end"],Zi=e1.reduce((t,e)=>t.concat(e,e+"-"+Jd[0],e+"-"+Jd[1]),[]),on=Math.min,br=Math.max,nn=Math.round;var _t=t=>({x:t,y:t}),A4={left:"right",right:"left",bottom:"top",top:"bottom"};function qi(t,e,r){return br(t,on(e,r))}function Vn(t,e){return typeof t=="function"?t(e):t}function Ao(t){return t.split("-")[0]}function vr(t){return t.split("-")[1]}function Yi(t){return t==="x"?"y":"x"}function Xi(t){return t==="y"?"height":"width"}function jn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Qi(t){return Yi(jn(t))}function t1(t,e,r){r===void 0&&(r=!1);let o=vr(t),a=Qi(t),i=Xi(a),s=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Ki(s)),[s,Ki(s)]}function r1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Ki(t){let e=Ao(t);return A4[e]+t.slice(e.length)}function O4(t){return{top:0,right:0,bottom:0,left:0,...t}}function o1(t){return typeof t!="number"?O4(t):{top:t,right:t,bottom:t,left:t}}function Wr(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 n1(t,e,r){let{reference:o,floating:a}=t,i=jn(e),s=Qi(e),c=Xi(s),d=Ao(e),u=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,y=o[c]/2-a[c]/2,S;switch(d){case"top":S={x:h,y:o.y-a.height};break;case"bottom":S={x:h,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:g};break;case"left":S={x:o.x-a.width,y:g};break;default:S={x:o.x,y:o.y}}switch(vr(e)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function a1(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:s,elements:c,strategy:d}=t,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=Vn(e,t),C=o1(S),T=c[y?g==="floating"?"reference":"floating":g],k=Wr(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(c.floating)),boundary:u,rootBoundary:h,strategy:d})),N=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,z=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),D=await(i.isElement==null?void 0:i.isElement(z))?await(i.getScale==null?void 0:i.getScale(z))||{x:1,y:1}:{x:1,y:1},K=Wr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:z,strategy:d}):N);return{top:(k.top-K.top+C.top)/D.y,bottom:(K.bottom-k.bottom+C.bottom)/D.y,left:(k.left-K.left+C.left)/D.x,right:(K.right-k.right+C.right)/D.x}}var R4=50,i1=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,c=s.detectOverflow?s:{...s,detectOverflow:a1},d=await(s.isRTL==null?void 0:s.isRTL(e)),u=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:h,y:g}=n1(u,o,d),y=o,S=0,C={};for(let L=0;L<i.length;L++){let T=i[L];if(!T)continue;let{name:k,fn:N}=T,{x:z,y:D,data:K,reset:de}=await N({x:h,y:g,initialPlacement:o,placement:y,strategy:a,middlewareData:C,rects:u,platform:c,elements:{reference:t,floating:e}});h=z??h,g=D??g,C[k]={...C[k],...K},de&&S<R4&&(S++,typeof de=="object"&&(de.placement&&(y=de.placement),de.rects&&(u=de.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):de.rects),{x:h,y:g}=n1(u,y,d)),L=-1)}return{x:h,y:g,placement:y,strategy:a,middlewareData:C}};function w4(t,e,r){return(t?[...r.filter(a=>vr(a)===t),...r.filter(a=>vr(a)!==t)]:r.filter(a=>Ao(a)===a)).filter(a=>t?vr(a)===t||(e?r1(a)!==a:!1):!0)}var s1=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,o,a;let{rects:i,middlewareData:s,placement:c,platform:d,elements:u}=e,{crossAxis:h=!1,alignment:g,allowedPlacements:y=Zi,autoAlignment:S=!0,...C}=Vn(t,e),L=g!==void 0||y===Zi?w4(g||null,S,y):y,T=await d.detectOverflow(e,C),k=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[k];if(N==null)return{};let z=t1(N,i,await(d.isRTL==null?void 0:d.isRTL(u.floating)));if(c!==N)return{reset:{placement:L[0]}};let D=[T[Ao(N)],T[z[0]],T[z[1]]],K=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:D}],de=L[k+1];if(de)return{data:{index:k+1,overflows:K},reset:{placement:de}};let ot=K.map(He=>{let x=vr(He.placement);return[He.placement,x&&h?He.overflows.slice(0,2).reduce((E,$)=>E+$,0):He.overflows[0],He.overflows]}).sort((He,x)=>He[1]-x[1]),Dt=((a=ot.filter(He=>He[2].slice(0,vr(He[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||ot[0][0];return Dt!==c?{data:{index:k+1,overflows:K},reset:{placement:Dt}}:{}}}};var c1=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:c=!1,limiter:d={fn:k=>{let{x:N,y:z}=k;return{x:N,y:z}}},...u}=Vn(t,e),h={x:r,y:o},g=await i.detectOverflow(e,u),y=jn(Ao(a)),S=Yi(y),C=h[S],L=h[y];if(s){let k=S==="y"?"top":"left",N=S==="y"?"bottom":"right",z=C+g[k],D=C-g[N];C=qi(z,C,D)}if(c){let k=y==="y"?"top":"left",N=y==="y"?"bottom":"right",z=L+g[k],D=L-g[N];L=qi(z,L,D)}let T=d.fn({...e,[S]:C,[y]:L});return{...T,data:{x:T.x-r,y:T.y-o,enabled:{[S]:s,[y]:c}}}}}};function Zn(){return typeof window<"u"}function jr(t){return d1(t)?(t.nodeName||"").toLowerCase():"#document"}function at(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ht(t){var e;return(e=(d1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function d1(t){return Zn()?t instanceof Node||t instanceof at(t).Node:!1}function bt(t){return Zn()?t instanceof Element||t instanceof at(t).Element:!1}function Ft(t){return Zn()?t instanceof HTMLElement||t instanceof at(t).HTMLElement:!1}function l1(t){return!Zn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof at(t).ShadowRoot}function Oo(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 f1(t){return/^(table|td|th)$/.test(jr(t))}function an(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var _4=/transform|translate|scale|rotate|perspective|filter/,T4=/paint|layout|strict|content/,Vr=t=>!!t&&t!=="none",Ji;function qn(t){let e=bt(t)?vt(t):t;return Vr(e.transform)||Vr(e.translate)||Vr(e.scale)||Vr(e.rotate)||Vr(e.perspective)||!Yn()&&(Vr(e.backdropFilter)||Vr(e.filter))||_4.test(e.willChange||"")||T4.test(e.contain||"")}function u1(t){let e=or(t);for(;Ft(e)&&!Kr(e);){if(qn(e))return e;if(an(e))return null;e=or(e)}return null}function Yn(){return Ji==null&&(Ji=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ji}function Kr(t){return/^(html|body|#document)$/.test(jr(t))}function vt(t){return at(t).getComputedStyle(t)}function sn(t){return bt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function or(t){if(jr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||l1(t)&&t.host||Ht(t);return l1(e)?e.host:e}function p1(t){let e=or(t);return Kr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ft(e)&&Oo(e)?e:p1(e)}function Kn(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=p1(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),s=at(a);if(i){let c=Xn(s);return e.concat(s,s.visualViewport||[],Oo(a)?a:[],c&&r?Kn(c):[])}else return e.concat(a,Kn(a,[],r))}function Xn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y1(t){let e=vt(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=Ft(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:o,c=nn(r)!==i||nn(o)!==s;return c&&(r=i,o=s),{width:r,height:o,$:c}}function b1(t){return bt(t)?t:t.contextElement}function Ro(t){let e=b1(t);if(!Ft(e))return _t(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=y1(e),s=(i?nn(r.width):r.width)/o,c=(i?nn(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var N4=_t(0);function v1(t){let e=at(t);return!Yn()||!e.visualViewport?N4:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function M4(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==at(t)?!1:e}function cn(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=b1(t),s=_t(1);e&&(o?bt(o)&&(s=Ro(o)):s=Ro(t));let c=M4(i,r,o)?v1(i):_t(0),d=(a.left+c.x)/s.x,u=(a.top+c.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i){let y=at(i),S=o&&bt(o)?at(o):o,C=y,L=Xn(C);for(;L&&o&&S!==C;){let T=Ro(L),k=L.getBoundingClientRect(),N=vt(L),z=k.left+(L.clientLeft+parseFloat(N.paddingLeft))*T.x,D=k.top+(L.clientTop+parseFloat(N.paddingTop))*T.y;d*=T.x,u*=T.y,h*=T.x,g*=T.y,d+=z,u+=D,C=at(L),L=Xn(C)}}return Wr({width:h,height:g,x:d,y:u})}function Qn(t,e){let r=sn(t).scrollLeft;return e?e.left+r:cn(Ht(t)).left+r}function x1(t,e){let r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-Qn(t,r),a=r.top+e.scrollTop;return{x:o,y:a}}function I4(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",s=Ht(o),c=e?an(e.floating):!1;if(o===s||c&&i)return r;let d={scrollLeft:0,scrollTop:0},u=_t(1),h=_t(0),g=Ft(o);if((g||!g&&!i)&&((jr(o)!=="body"||Oo(s))&&(d=sn(o)),g)){let S=cn(o);u=Ro(o),h.x=S.x+o.clientLeft,h.y=S.y+o.clientTop}let y=s&&!g&&!i?x1(s,d):_t(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+h.x+y.x,y:r.y*u.y-d.scrollTop*u.y+h.y+y.y}}function k4(t){return Array.from(t.getClientRects())}function P4(t){let e=Ht(t),r=sn(t),o=t.ownerDocument.body,a=br(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=br(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+Qn(t),c=-r.scrollTop;return vt(o).direction==="rtl"&&(s+=br(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:c}}var h1=25;function z4(t,e){let r=at(t),o=Ht(t),a=r.visualViewport,i=o.clientWidth,s=o.clientHeight,c=0,d=0;if(a){i=a.width,s=a.height;let h=Yn();(!h||h&&e==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}let u=Qn(o);if(u<=0){let h=o.ownerDocument,g=h.body,y=getComputedStyle(g),S=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(o.clientWidth-g.clientWidth-S);C<=h1&&(i-=C)}else u<=h1&&(i+=u);return{width:i,height:s,x:c,y:d}}function D4(t,e){let r=cn(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=Ft(t)?Ro(t):_t(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,d=a*i.x,u=o*i.y;return{width:s,height:c,x:d,y:u}}function m1(t,e,r){let o;if(e==="viewport")o=z4(t,r);else if(e==="document")o=P4(Ht(t));else if(bt(e))o=D4(e,r);else{let a=v1(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Wr(o)}function S1(t,e){let r=or(t);return r===e||!bt(r)||Kr(r)?!1:vt(r).position==="fixed"||S1(r,e)}function B4(t,e){let r=e.get(t);if(r)return r;let o=Kn(t,[],!1).filter(c=>bt(c)&&jr(c)!=="body"),a=null,i=vt(t).position==="fixed",s=i?or(t):t;for(;bt(s)&&!Kr(s);){let c=vt(s),d=qn(s);!d&&c.position==="fixed"&&(a=null),(i?!d&&!a:!d&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Oo(s)&&!d&&S1(t,s))?o=o.filter(h=>h!==s):a=c,s=or(s)}return e.set(t,o),o}function U4(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,s=[...r==="clippingAncestors"?an(e)?[]:B4(e,this._c):[].concat(r),o],c=m1(e,s[0],a),d=c.top,u=c.right,h=c.bottom,g=c.left;for(let y=1;y<s.length;y++){let S=m1(e,s[y],a);d=br(S.top,d),u=on(S.right,u),h=on(S.bottom,h),g=br(S.left,g)}return{width:u-g,height:h-d,x:g,y:d}}function $4(t){let{width:e,height:r}=y1(t);return{width:e,height:r}}function H4(t,e,r){let o=Ft(e),a=Ht(e),i=r==="fixed",s=cn(t,!0,i,e),c={scrollLeft:0,scrollTop:0},d=_t(0);function u(){d.x=Qn(a)}if(o||!o&&!i)if((jr(e)!=="body"||Oo(a))&&(c=sn(e)),o){let S=cn(e,!0,i,e);d.x=S.x+e.clientLeft,d.y=S.y+e.clientTop}else a&&u();i&&!o&&a&&u();let h=a&&!o&&!i?x1(a,c):_t(0),g=s.left+c.scrollLeft-d.x-h.x,y=s.top+c.scrollTop-d.y-h.y;return{x:g,y,width:s.width,height:s.height}}function es(t){return vt(t).position==="static"}function g1(t,e){if(!Ft(t)||vt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ht(t)===r&&(r=r.ownerDocument.body),r}function C1(t,e){let r=at(t);if(an(t))return r;if(!Ft(t)){let a=or(t);for(;a&&!Kr(a);){if(bt(a)&&!es(a))return a;a=or(a)}return r}let o=g1(t,e);for(;o&&f1(o)&&es(o);)o=g1(o,e);return o&&Kr(o)&&es(o)&&!qn(o)?r:o||u1(t)||r}var F4=async function(t){let e=this.getOffsetParent||C1,r=this.getDimensions,o=await r(t.floating);return{reference:H4(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function G4(t){return vt(t).direction==="rtl"}var Jn={convertOffsetParentRelativeRectToViewportRelativeRect:I4,getDocumentElement:Ht,getClippingRect:U4,getOffsetParent:C1,getElementRects:F4,getClientRects:k4,getDimensions:$4,getScale:Ro,isElement:bt,isRTL:G4};var E1=s1,L1=c1;var A1=(t,e,r)=>{let o=new Map,a={platform:Jn,...r},i={...a.platform,_c:o};return i1(t,e,{...a,platform:i})};function O1(t){return W4(t)}function ts(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function W4(t){for(let e=t;e;e=ts(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ts(t);e;e=ts(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 R1(t,e,r){let o;return typeof r=="object"?o=r:o={placement:r},A1(t,e,{strategy:o.strategy,platform:{...Jn,getOffsetParent:a=>Jn.getOffsetParent(a,O1)},middleware:[L1({crossAxis:!0}),E1({allowedPlacements:[o.placement]})]})}var Uo=v(M());var Os=v(X());function V4(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(!ea(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(!ea(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(c=>s[c]!=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(!ea(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ea(t,e){try{return V4(t,e)}catch{return!1}}function ln(t,e){return!ea(t,e)}function w1(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ta(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 _1=v(X(),1);var rs=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:ln,attribute:!1,...e};(0,_1.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:c=>c[o],store:e.store})}};var ra=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 Zr=v(X(),1);var T1=v(X(),1);function N1(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,T1.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:ln,...e??{}})}var oa=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(c){a(c);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 I1=v(F(),1);var na=globalThis,j4=na.ShadowRoot&&(na.ShadyCSS===void 0||na.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Kx=Symbol();var M1=(t,e)=>{if(j4)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let o=document.createElement("style"),a=na.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}};var aa=class extends I1.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 M1(o,e.elementStyles),o}};function k1(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 _o=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 c=t.length-1;c>=0;c--)(s=t[c])&&(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},B1,P1=Symbol("constructorPrototype"),z1=Symbol("constructorName"),U1=Symbol("exportpartsDebouncer"),D1=Symbol("dynamicDependenciesLoaded"),wo=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};wo.eventName="exportparts-updated";var Gt=class extends aa{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[B1]=new oa(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[U1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[z1]=this.constructor.name,this[P1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[z1]&&Object.setPrototypeOf(this,this[P1])}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[D1]||(r[D1]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(wo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(wo.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 wo)})}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=k1(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,c;let d=y=>y!=null&&y.trim().length>0,u=e.filter(d).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let h=new Set;for(let y of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(c=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],L=[...S,...C].filter(d).map(T=>T.trim());for(let T of L)h.add(T)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};B1=U1;_o([(0,Zr.property)()],Gt.prototype,"exportpartsPrefix",void 0);_o([N1([])],Gt.prototype,"exportpartsPrefixes",void 0);_o([(0,Zr.property)({reflect:!0})],Gt.prototype,"exportparts",void 0);_o([(0,Zr.property)()],Gt.prototype,"customStylesheet",void 0);_o([(0,Zr.property)()],Gt.prototype,"elementToFocus",void 0);_o([(0,Zr.state)()],Gt.prototype,"useAdoptedStyleSheets",void 0);function ia(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var dn=Symbol("internalReduxEventsUnsubscribers"),xr=Symbol("internalStoresUnsubscribers"),qr=Symbol("internalStores"),K4=ta(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[qr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[qr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[qr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[qr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[qr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[qr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[xr].has(s.store):this[xr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[xr].set(s,c.subscribe(()=>this.updateFromStores())),this[dn].set(s,[]),ia(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,h)=>{if(typeof this[h]=="function"&&(!u.store||c.name===u.store)){let g=y=>this[h](y);c.addEventListener(u.eventName,g),this[dn].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[xr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[xr].has(s)&&this[xr].get(s)(),this[xr].delete(s),(c=this[dn].get(s))===null||c===void 0||c.forEach(d=>d()),this[dn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=xr,r=qr,o=dn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$1=class extends K4(Gt){};function xt(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 nr(t){return!!t&&!!t[ue]}function Tt(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)===tp}(t)||Array.isArray(t)||!!t[K1]||!!(!((e=t.constructor)===null||e===void 0)&&e[K1])||fs(t)||us(t))}function Yr(t,e,r){r===void 0&&(r=!1),Mo(t)===0?(r?Object.keys:No)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function Mo(t){var e=t[ue];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:fs(t)?2:us(t)?3:0}function To(t,e){return Mo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Z4(t,e){return Mo(t)===2?t.get(e):t[e]}function Z1(t,e,r){var o=Mo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function q1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function fs(t){return J4&&t instanceof Map}function us(t){return ep&&t instanceof Set}function Sr(t){return t.o||t.t}function ps(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Q1(t);delete e[ue];for(var r=No(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 hs(t,e){return e===void 0&&(e=!1),ms(t)||nr(t)||!Tt(t)||(Mo(t)>1&&(t.set=t.add=t.clear=t.delete=q4),Object.freeze(t),e&&Yr(t,function(r,o){return hs(o,!0)},!0)),t}function q4(){xt(2)}function ms(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Wt(t){var e=ds[t];return e||xt(18,t),e}function Y4(t,e){ds[t]||(ds[t]=e)}function ss(){return un}function os(t,e){e&&(Wt("Patches"),t.u=[],t.s=[],t.v=e)}function sa(t){cs(t),t.p.forEach(X4),t.p=null}function cs(t){t===un&&(un=t.l)}function H1(t){return un={p:[],l:un,h:t,m:!0,_:0}}function X4(t){var e=t[ue];e.i===0||e.i===1?e.j():e.g=!0}function ns(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Wt("ES5").S(e,t,o),o?(r[ue].P&&(sa(e),xt(4)),Tt(t)&&(t=ca(e,t),e.l||la(e,t)),e.u&&Wt("Patches").M(r[ue].t,t,e.u,e.s)):t=ca(e,r,[]),sa(e),e.u&&e.v(e.u,e.s),t!==X1?t:void 0}function ca(t,e,r){if(ms(e))return e;var o=e[ue];if(!o)return Yr(e,function(c,d){return F1(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return la(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=ps(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Yr(i,function(c,d){return F1(t,o,a,c,d,r,s)}),la(t,a,!1),r&&t.u&&Wt("Patches").N(o,r,t.u,t.s)}return o.o}function F1(t,e,r,o,a,i,s){if(nr(a)){var c=ca(t,a,i&&e&&e.i!==3&&!To(e.R,o)?i.concat(o):void 0);if(Z1(r,o,c),!nr(c))return;t.m=!1}else s&&r.add(a);if(Tt(a)&&!ms(a)){if(!t.h.D&&t._<1)return;ca(t,a),e&&e.A.l||la(t,a)}}function la(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&hs(e,r)}function as(t,e){var r=t[ue];return(r?Sr(r):t)[e]}function G1(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 Cr(t){t.P||(t.P=!0,t.l&&Cr(t.l))}function is(t){t.o||(t.o=ps(t.t))}function ls(t,e,r){var o=fs(e)?Wt("MapSet").F(e,r):us(e)?Wt("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:ss(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=pn;s&&(d=[c],u=fn);var h=Proxy.revocable(d,u),g=h.revoke,y=h.proxy;return c.k=y,c.j=g,y}(e,r):Wt("ES5").J(e,r);return(r?r.A:ss()).p.push(o),o}function Q4(t){return nr(t)||xt(22,t),function e(r){if(!Tt(r))return r;var o,a=r[ue],i=Mo(r);if(a){if(!a.P&&(a.i<4||!Wt("ES5").K(a)))return a.t;a.I=!0,o=W1(r,i),a.I=!1}else o=W1(r,i);return Yr(o,function(s,c){a&&Z4(a.t,s)===c||Z1(o,s,e(c))}),i===3?new Set(o):o}(t)}function W1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ps(t)}function Y1(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[ue];return pn.get(u,s)},set:function(u){var h=this[ue];pn.set(h,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ue];if(!d.P)switch(d.i){case 5:o(d)&&Cr(d);break;case 4:r(d)&&Cr(d)}}}function r(s){for(var c=s.t,d=s.k,u=No(d),h=u.length-1;h>=0;h--){var g=u[h];if(g!==ue){var y=c[g];if(y===void 0&&!To(c,g))return!0;var S=d[g],C=S&&S[ue];if(C?C.t!==y:!q1(S,y))return!0}}var L=!!c[ue];return u.length!==No(c).length+(L?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&xt(3,JSON.stringify(Sr(s)))}var i={};Y4("ES5",{J:function(s,c){var d=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var L=Q1(y);delete L[ue];for(var T=No(L),k=0;k<T.length;k++){var N=T[k];L[N]=t(N,g||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(d,s),h={i:d?5:4,A:c?c.A:ss(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ue,{value:h,writable:!0}),u},S:function(s,c,d){d?nr(c)&&c[ue].A===s&&e(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var g=h[ue];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)Yr(S,function(D){D!==ue&&(y[D]!==void 0||To(y,D)?C[D]||u(S[D]):(C[D]=!0,Cr(g)))}),Yr(y,function(D){S[D]!==void 0||To(S,D)||(C[D]=!1,Cr(g))});else if(L===5){if(o(g)&&(Cr(g),C.length=!0),S.length<y.length)for(var T=S.length;T<y.length;T++)C[T]=!1;else for(var k=y.length;k<S.length;k++)C[k]=!0;for(var N=Math.min(S.length,y.length),z=0;z<N;z++)S.hasOwnProperty(z)||(C[z]=!0),C[z]===void 0&&u(S[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var V1,un,gs=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",J4=typeof Map<"u",ep=typeof Set<"u",j1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",X1=gs?Symbol.for("immer-nothing"):((V1={})["immer-nothing"]=!0,V1),K1=gs?Symbol.for("immer-draftable"):"__$immer_draftable",ue=gs?Symbol.for("immer-state"):"__$immer_state";var tp=""+Object.prototype.constructor,No=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Q1=Object.getOwnPropertyDescriptors||function(t){var e={};return No(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ds={},pn={get:function(t,e){if(e===ue)return t;var r=Sr(t);if(!To(r,e))return function(a,i,s){var c,d=G1(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!Tt(o)?o:o===as(t.t,e)?(is(t),t.o[e]=ls(t.A.h,o,t)):o},has:function(t,e){return e in Sr(t)},ownKeys:function(t){return Reflect.ownKeys(Sr(t))},set:function(t,e,r){var o=G1(Sr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=as(Sr(t),e),i=a?.[ue];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(q1(r,a)&&(r!==void 0||To(t.t,e)))return!0;is(t),Cr(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 as(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,is(t),Cr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Sr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){xt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){xt(12)}},fn={};Yr(pn,function(t,e){fn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),fn.deleteProperty=function(t,e){return fn.set.call(this,t,e,void 0)},fn.set=function(t,e,r){return pn.set.call(this,t[0],e,r,t[0])};var rp=function(){function t(r){var o=this;this.O=j1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(L){var T=this;L===void 0&&(L=c);for(var k=arguments.length,N=Array(k>1?k-1:0),z=1;z<k;z++)N[z-1]=arguments[z];return d.produce(L,function(D){var K;return(K=i).call.apply(K,[T,D].concat(N))})}}var u;if(typeof i!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),Tt(a)){var h=H1(o),g=ls(o,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?sa(h):cs(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return os(h,s),ns(L,h)},function(L){throw sa(h),L}):(os(h,s),ns(u,h))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===X1&&(u=void 0),o.D&&hs(u,!0),s){var S=[],C=[];Wt("Patches").M(a,u,S,C),s(S,C)}return u}xt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return o.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,c,d=o.produce(a,i,function(u,h){s=u,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(u){return[u,s,c]}):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Tt(r)||xt(8),nr(r)&&(r=Q4(r));var o=H1(this),a=ls(this,r,void 0);return a[ue].C=!0,cs(o),a},e.finishDraft=function(r,o){var a=r&&r[ue],i=a.A;return os(i,o),ns(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!j1&&xt(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=Wt("Patches").$;return nr(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),ct=new rp,op=ct.produce,cS=ct.produceWithPatches.bind(ct),lS=ct.setAutoFreeze.bind(ct),dS=ct.setUseProxies.bind(ct),fS=ct.applyPatches.bind(ct),uS=ct.createDraft.bind(ct),pS=ct.finishDraft.bind(ct),da=op;function Xr(t){"@babel/helpers - typeof";return Xr=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},Xr(t)}function J1(t,e){if(Xr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Xr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e2(t){var e=J1(t,"string");return Xr(e)=="symbol"?e:e+""}function t2(t,e,r){return(e=e2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r2(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 ys(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?r2(Object(r),!0).forEach(function(o){t2(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):r2(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Ke(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 o2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),bs=function(){return Math.random().toString(36).substring(7).split("").join(".")},fa={INIT:"@@redux/INIT"+bs(),REPLACE:"@@redux/REPLACE"+bs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+bs()}};function np(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 vs(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ke(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ke(1));return r(vs)(t,e)}if(typeof t!="function")throw new Error(Ke(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(Ke(3));return i}function g(L){if(typeof L!="function")throw new Error(Ke(4));if(d)throw new Error(Ke(5));var T=!0;return u(),c.push(L),function(){if(T){if(d)throw new Error(Ke(6));T=!1,u();var N=c.indexOf(L);c.splice(N,1),s=null}}}function y(L){if(!np(L))throw new Error(Ke(7));if(typeof L.type>"u")throw new Error(Ke(8));if(d)throw new Error(Ke(9));try{d=!0,i=a(i,L)}finally{d=!1}for(var T=s=c,k=0;k<T.length;k++){var N=T[k];N()}return L}function S(L){if(typeof L!="function")throw new Error(Ke(10));a=L,y({type:fa.REPLACE})}function C(){var L,T=g;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ke(11));function z(){N.next&&N.next(h())}z();var D=T(z);return{unsubscribe:D}}},L[o2]=function(){return this},L}return y({type:fa.INIT}),o={dispatch:y,subscribe:g,getState:h,replaceReducer:S},o[o2]=C,o}function ap(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:fa.INIT});if(typeof o>"u")throw new Error(Ke(12));if(typeof r(void 0,{type:fa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function n2(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{ap(r)}catch(d){c=d}return function(u,h){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],T=r[L],k=u[L],N=T(k,h);if(typeof N>"u"){var z=h&&h.type;throw new Error(Ke(14))}S[L]=N,y=y||N!==k}return y=y||i.length!==Object.keys(u).length,y?S:u}}function Io(){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 a2(){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(Ke(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=Io.apply(void 0,c)(a.dispatch),ys(ys({},a),{},{dispatch:i})}}}function i2(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var s2=i2();s2.withExtraArgument=i2;var xs=s2;var u2=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)}}(),ip=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(h){return d([u,h])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(h){u=[6,h],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ko=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},sp=Object.defineProperty,cp=Object.defineProperties,lp=Object.getOwnPropertyDescriptors,c2=Object.getOwnPropertySymbols,dp=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,l2=function(t,e,r){return e in t?sp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Er=function(t,e){for(var r in e||(e={}))dp.call(e,r)&&l2(t,r,e[r]);if(c2)for(var o=0,a=c2(e);o<a.length;o++){var r=a[o];fp.call(e,r)&&l2(t,r,e[r])}return t},Ss=function(t,e){return cp(t,lp(e))},up=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var pp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Io:Io.apply(null,arguments)},NS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function hp(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 mp=function(t){u2(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,ko([void 0],r[0].concat(this)))):new(e.bind.apply(e,ko([void 0],r.concat(this))))},e}(Array),gp=function(t){u2(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,ko([void 0],r[0].concat(this)))):new(e.bind.apply(e,ko([void 0],r.concat(this))))},e}(Array);function Ls(t){return Tt(t)?da(t,function(){}):t}function yp(t){return typeof t=="boolean"}function bp(){return function(e){return vp(e)}}function vp(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=new mp;if(r&&(yp(r)?c.push(xs):c.push(xs.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var u}return c}var Cs=!0;function p2(t){var e=bp(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,h=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(hp(a))S=n2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(e),!Cs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cs&&C.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=a2.apply(void 0,C),T=Io;d&&(T=pp(Er({trace:!Cs},typeof d=="object"&&d)));var k=new gp(L),N=k;Array.isArray(y)?N=ko([L],y):typeof y=="function"&&(N=y(k));var z=T.apply(void 0,N);return vs(S,h,z)}function Lr(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 Er(Er({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 h2(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function xp(t){return typeof t=="function"}function Sp(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?h2(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(xp(t))d=function(){return Ls(t())};else{var u=Ls(t);d=function(){return u}}function h(g,y){g===void 0&&(g=d());var S=ko([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,L){if(L)if(nr(C)){var T=C,k=L(T,y);return k===void 0?C:k}else{if(Tt(C))return da(C,function(N){return L(N,y)});var k=L(C,y);if(k===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return C},g)}return h.getInitialState=d,h}function Cp(t,e){return t+"/"+e}function m2(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:Ls(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var g=o[h],y=Cp(e,h),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[h]=S,s[y]=S,c[h]=C?Lr(y,C):Lr(y)});function d(){var h=typeof t.extraReducers=="function"?h2(t.extraReducers):[t.extraReducers],g=h[0],y=g===void 0?{}:g,S=h[1],C=S===void 0?[]:S,L=h[2],T=L===void 0?void 0:L,k=Er(Er({},y),s);return Sp(r,function(N){for(var z in k)N.addCase(z,k[z]);for(var D=0,K=C;D<K.length;D++){var de=K[D];N.addMatcher(de.matcher,de.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:e,reducer:function(h,g){return u||(u=d()),u(h,g)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Ep="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lp=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ep[Math.random()*64|0];return e},Ap=["name","message","stack","code"],Es=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),d2=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Op=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Ap;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},PS=function(){function t(e,r,o){var a=Lr(e+"/fulfilled",function(h,g,y,S){return{payload:h,meta:Ss(Er({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=Lr(e+"/pending",function(h,g,y){return{payload:void 0,meta:Ss(Er({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Lr(e+"/rejected",function(h,g,y,S,C){return{payload:S,error:(o&&o.serializeError||Op)(h||"Rejected"),meta:Ss(Er({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(g,y,S){var C=o?.idGenerator?o.idGenerator(h):Lp(),L=new d,T,k=!1;function N(D){T=D,L.abort()}var z=function(){return up(this,null,function(){var D,K,de,ot,$e,Dt,He;return ip(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),ot=(D=o?.condition)==null?void 0:D.call(o,h,{getState:y,extra:S}),wp(ot)?[4,ot]:[3,2];case 1:ot=x.sent(),x.label=2;case 2:if(ot===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,$e=new Promise(function(E,$){return L.signal.addEventListener("abort",function(){return $({name:"AbortError",message:T||"Aborted"})})}),g(i(C,h,(K=o?.getPendingMeta)==null?void 0:K.call(o,{requestId:C,arg:h},{getState:y,extra:S}))),[4,Promise.race([$e,Promise.resolve(r(h,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(E,$){return new Es(E,$)},fulfillWithValue:function(E,$){return new d2(E,$)}})).then(function(E){if(E instanceof Es)throw E;return E instanceof d2?a(E.payload,C,h,E.meta):a(E,C,h)})])];case 3:return de=x.sent(),[3,5];case 4:return Dt=x.sent(),de=Dt instanceof Es?s(null,C,h,Dt.payload,Dt.meta):s(Dt,C,h),[3,5];case 5:return He=o&&!o.dispatchConditionRejection&&s.match(de)&&de.meta.condition,He||g(de),[2,de]}})})}();return Object.assign(z,{abort:N,requestId:C,arg:h,unwrap:function(){return z.then(Rp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Rp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function wp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var g2="listener",y2="completed",b2="cancelled",zS="task-"+b2,DS="task-"+y2,BS=g2+"-"+b2,US=g2+"-"+y2;var As="listenerMiddleware";var $S=Lr(As+"/add"),HS=Lr(As+"/removeAll"),FS=Lr(As+"/remove");var f2,GS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(f2||(f2=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},_p=function(t){return function(e){setTimeout(e,t)}},WS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_p(10);Y1();var Tp=ta(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)}}}),ua=class extends Tp(Object){};window.ftReduxStores||(window.ftReduxStores={});var v2=class t extends ua{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(ia(i))return i;if(a==null)return;let s=m2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=p2({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let h=w1(s.getInitialState());for(let g of u.keeping)h[g]=(d??h)[g];return h}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ra;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...h)=>{let g=u(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[d]:a(h)})}}}),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 pa=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 c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${c}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ha=v(M()),Np="ft-app-info",Vt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Vt.eventName="authentication-change";var Mp={session:(t,e)=>{(0,ha.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>w.dispatchEvent(new Vt(e.payload)),0))}},w=ha.FtReduxStore.get({name:Np,reducers:Mp,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 x2=v(M()),ma=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 c=t.length-1;c>=0;c--)(s=t[c])&&(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},bC=(0,x2.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(w)}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(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>pa.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ma([(0,Os.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ma([(0,Os.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ma([rs({store:w.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),ma([rs({store:w.name})],e.prototype,"uiLocale",void 0),e});var Sa=v(M());var Rs=v(M());var Qr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=w.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=w.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var ga=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Qr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Qr.await()}};var Ze=class extends ga{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(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Rs.CacheRegistry,this.cache=e?a.commonCache:new Rs.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 ya=class extends Ze{async listMySearches(){let{session:e}=w.getState();return er(e,ae.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var ba=class extends Ze{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 va=class extends Ze{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 xa=class extends Ze{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 Ip="ft-user-assets",kp={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(gt).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;_s(t,r,[...ws(t,r),a]),S2(t,r,1,o),C2(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;_s(t,r,ws(t,r).map(a=>a.id===o.id?o:a)),C2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;_s(t,r,ws(t,r).filter(i=>i.id!==a)),S2(t,r,-1,o)}},E2={[gt.SEARCHES]:"savedSearches",[gt.BOOKMARKS]:"bookmarks",[gt.BOOKS]:void 0,[gt.COLLECTIONS]:void 0},ws=(t,e)=>{var r;let o=E2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},_s=(t,e,r)=>{let o=E2[e];o&&(t[o]=r)},S2=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===gt.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},C2=(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)},lt=Sa.FtReduxStore.get({name:Ip,reducers:kp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(gt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ts=class{constructor(e=new va,r=new xa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ba,this.savedSearchesService=new ya,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=w.getState();(0,Sa.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(),lt.actions.clearAssetCount(),lt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),lt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),lt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();lt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();lt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&<.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&<.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(lt.getState().assetCounts.bookmarkByMap).length!==0;e===gt.BOOKMARKS&&r&<.actions.clearBookmarkCountByMap(),lt.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;lt.actions.bookmarks(r)}}},Ns=new Ts;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ns);var Ms=class{addCommand(e,r=!1){w.commands.add(e,r)}consumeCommand(e){return w.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ms;var St=v(M());var L2,Po=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Pp=Symbol("clearAfterUnitTest"),Ca=class extends(0,St.withEventBus)(Ze){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[L2]=()=>{this.defaultMessages={},this.cache=new St.CacheRegistry,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 a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};(0,St.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 St.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 St.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 Po({loadedContexts:e})),this.dispatchEvent(new Po({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Po({loadedContexts:[e]})),this.dispatchEvent(new Po({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,St.delay)(0).then(()=>o()).catch(()=>null)))}};L2=Pp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var zo=window.FluidTopicsI18nService,Ea=window.FluidTopicsCustomI18nService;var A2=v(M()),Is=class{highlightHtml(e,r,o){(0,A2.highlightHtml)(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Is;var O2=v(M());var ks=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.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 O2.DateFormatter.format(e,(o=r?.locale)!==null&&o!==void 0?o:w.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 ks;var R2=v(M());var hn=class{static get(e,r){var o,a;let i=w.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new R2.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var La=class extends Ze{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,a])=>Array.isArray(a)?[o,a.map(i=>typeof i=="object"&&i!=null&&!Array.isArray(i)?this.sortEventArrays(i):i).sort((i,s)=>typeof i=="object"&&i!==null&&"key"in i?i.key.localeCompare(s.key):typeof i=="string"&&typeof s=="string"?i.localeCompare(s):String(i).localeCompare(String(s)))]:typeof a=="object"&&a!==null?[o,this.sortEventArrays(a)]:[o,a]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(a=>(console.info(r),console.debug(a),o)),1e3)}};var Ps=class{urlToSearchRequest(e){return hn.get().parse(e)}searchRequestToUrl(e){return hn.get().serialize(e)}};window.FluidTopicsUrlService=new Ps;var Ar=v(M());var Jr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Jr.eventName="change";var zs=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))}},w2=new zs;var Aa=class t extends Ar.WithEventBus{static build(){return new t(window.history,w2,()=>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,Ar.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Jr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[u,s,c]),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(Jr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Jr.eventName,e)}currentItem(){return(0,Ar.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,Ar.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,Ar.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=Aa.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 Do=class{constructor(){this.storeListeners=[]}store(e,r){if(this.isAuthenticated())return;let o=JSON.stringify(r);window.localStorage.setItem(e,o),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:o,storageArea:window.localStorage}))}get(e){var r,o;if(!this.isAuthenticated())return(o=JSON.parse((r=window.localStorage.getItem(e))!==null&&r!==void 0?r:"null"))!==null&&o!==void 0?o:void 0}addStoreListener(e,r){let o=a=>{a.key===e()&&!this.isAuthenticated()&&r()};this.storeListeners.push(o),window.addEventListener("storage",o)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var _2=v(F());var T2=_2.css`
|
|
590
|
+
`;var e1=["top","right","bottom","left"],Jd=["start","end"],Zi=e1.reduce((t,e)=>t.concat(e,e+"-"+Jd[0],e+"-"+Jd[1]),[]),on=Math.min,br=Math.max,nn=Math.round;var _t=t=>({x:t,y:t}),A4={left:"right",right:"left",bottom:"top",top:"bottom"};function qi(t,e,r){return br(t,on(e,r))}function Vn(t,e){return typeof t=="function"?t(e):t}function Ao(t){return t.split("-")[0]}function vr(t){return t.split("-")[1]}function Yi(t){return t==="x"?"y":"x"}function Xi(t){return t==="y"?"height":"width"}function jn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Qi(t){return Yi(jn(t))}function t1(t,e,r){r===void 0&&(r=!1);let o=vr(t),a=Qi(t),i=Xi(a),s=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Ki(s)),[s,Ki(s)]}function r1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Ki(t){let e=Ao(t);return A4[e]+t.slice(e.length)}function O4(t){return{top:0,right:0,bottom:0,left:0,...t}}function o1(t){return typeof t!="number"?O4(t):{top:t,right:t,bottom:t,left:t}}function Wr(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 n1(t,e,r){let{reference:o,floating:a}=t,i=jn(e),s=Qi(e),c=Xi(s),d=Ao(e),u=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,y=o[c]/2-a[c]/2,S;switch(d){case"top":S={x:h,y:o.y-a.height};break;case"bottom":S={x:h,y:o.y+o.height};break;case"right":S={x:o.x+o.width,y:g};break;case"left":S={x:o.x-a.width,y:g};break;default:S={x:o.x,y:o.y}}switch(vr(e)){case"start":S[s]-=y*(r&&u?-1:1);break;case"end":S[s]+=y*(r&&u?-1:1);break}return S}async function a1(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:s,elements:c,strategy:d}=t,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:y=!1,padding:S=0}=Vn(e,t),C=o1(S),T=c[y?g==="floating"?"reference":"floating":g],k=Wr(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(c.floating)),boundary:u,rootBoundary:h,strategy:d})),N=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,z=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),D=await(i.isElement==null?void 0:i.isElement(z))?await(i.getScale==null?void 0:i.getScale(z))||{x:1,y:1}:{x:1,y:1},K=Wr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:z,strategy:d}):N);return{top:(k.top-K.top+C.top)/D.y,bottom:(K.bottom-k.bottom+C.bottom)/D.y,left:(k.left-K.left+C.left)/D.x,right:(K.right-k.right+C.right)/D.x}}var R4=50,i1=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,c=s.detectOverflow?s:{...s,detectOverflow:a1},d=await(s.isRTL==null?void 0:s.isRTL(e)),u=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:h,y:g}=n1(u,o,d),y=o,S=0,C={};for(let L=0;L<i.length;L++){let T=i[L];if(!T)continue;let{name:k,fn:N}=T,{x:z,y:D,data:K,reset:de}=await N({x:h,y:g,initialPlacement:o,placement:y,strategy:a,middlewareData:C,rects:u,platform:c,elements:{reference:t,floating:e}});h=z??h,g=D??g,C[k]={...C[k],...K},de&&S<R4&&(S++,typeof de=="object"&&(de.placement&&(y=de.placement),de.rects&&(u=de.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):de.rects),{x:h,y:g}=n1(u,y,d)),L=-1)}return{x:h,y:g,placement:y,strategy:a,middlewareData:C}};function w4(t,e,r){return(t?[...r.filter(a=>vr(a)===t),...r.filter(a=>vr(a)!==t)]:r.filter(a=>Ao(a)===a)).filter(a=>t?vr(a)===t||(e?r1(a)!==a:!1):!0)}var s1=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,o,a;let{rects:i,middlewareData:s,placement:c,platform:d,elements:u}=e,{crossAxis:h=!1,alignment:g,allowedPlacements:y=Zi,autoAlignment:S=!0,...C}=Vn(t,e),L=g!==void 0||y===Zi?w4(g||null,S,y):y,T=await d.detectOverflow(e,C),k=((r=s.autoPlacement)==null?void 0:r.index)||0,N=L[k];if(N==null)return{};let z=t1(N,i,await(d.isRTL==null?void 0:d.isRTL(u.floating)));if(c!==N)return{reset:{placement:L[0]}};let D=[T[Ao(N)],T[z[0]],T[z[1]]],K=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:D}],de=L[k+1];if(de)return{data:{index:k+1,overflows:K},reset:{placement:de}};let ot=K.map(He=>{let x=vr(He.placement);return[He.placement,x&&h?He.overflows.slice(0,2).reduce((E,$)=>E+$,0):He.overflows[0],He.overflows]}).sort((He,x)=>He[1]-x[1]),Dt=((a=ot.filter(He=>He[2].slice(0,vr(He[0])?2:3).every(x=>x<=0))[0])==null?void 0:a[0])||ot[0][0];return Dt!==c?{data:{index:k+1,overflows:K},reset:{placement:Dt}}:{}}}};var c1=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:c=!1,limiter:d={fn:k=>{let{x:N,y:z}=k;return{x:N,y:z}}},...u}=Vn(t,e),h={x:r,y:o},g=await i.detectOverflow(e,u),y=jn(Ao(a)),S=Yi(y),C=h[S],L=h[y];if(s){let k=S==="y"?"top":"left",N=S==="y"?"bottom":"right",z=C+g[k],D=C-g[N];C=qi(z,C,D)}if(c){let k=y==="y"?"top":"left",N=y==="y"?"bottom":"right",z=L+g[k],D=L-g[N];L=qi(z,L,D)}let T=d.fn({...e,[S]:C,[y]:L});return{...T,data:{x:T.x-r,y:T.y-o,enabled:{[S]:s,[y]:c}}}}}};function Zn(){return typeof window<"u"}function jr(t){return d1(t)?(t.nodeName||"").toLowerCase():"#document"}function at(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ht(t){var e;return(e=(d1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function d1(t){return Zn()?t instanceof Node||t instanceof at(t).Node:!1}function bt(t){return Zn()?t instanceof Element||t instanceof at(t).Element:!1}function Ft(t){return Zn()?t instanceof HTMLElement||t instanceof at(t).HTMLElement:!1}function l1(t){return!Zn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof at(t).ShadowRoot}function Oo(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 f1(t){return/^(table|td|th)$/.test(jr(t))}function an(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var _4=/transform|translate|scale|rotate|perspective|filter/,T4=/paint|layout|strict|content/,Vr=t=>!!t&&t!=="none",Ji;function qn(t){let e=bt(t)?vt(t):t;return Vr(e.transform)||Vr(e.translate)||Vr(e.scale)||Vr(e.rotate)||Vr(e.perspective)||!Yn()&&(Vr(e.backdropFilter)||Vr(e.filter))||_4.test(e.willChange||"")||T4.test(e.contain||"")}function u1(t){let e=or(t);for(;Ft(e)&&!Kr(e);){if(qn(e))return e;if(an(e))return null;e=or(e)}return null}function Yn(){return Ji==null&&(Ji=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ji}function Kr(t){return/^(html|body|#document)$/.test(jr(t))}function vt(t){return at(t).getComputedStyle(t)}function sn(t){return bt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function or(t){if(jr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||l1(t)&&t.host||Ht(t);return l1(e)?e.host:e}function p1(t){let e=or(t);return Kr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ft(e)&&Oo(e)?e:p1(e)}function Kn(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=p1(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),s=at(a);if(i){let c=Xn(s);return e.concat(s,s.visualViewport||[],Oo(a)?a:[],c&&r?Kn(c):[])}else return e.concat(a,Kn(a,[],r))}function Xn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y1(t){let e=vt(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=Ft(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:o,c=nn(r)!==i||nn(o)!==s;return c&&(r=i,o=s),{width:r,height:o,$:c}}function b1(t){return bt(t)?t:t.contextElement}function Ro(t){let e=b1(t);if(!Ft(e))return _t(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=y1(e),s=(i?nn(r.width):r.width)/o,c=(i?nn(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var N4=_t(0);function v1(t){let e=at(t);return!Yn()||!e.visualViewport?N4:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function M4(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==at(t)?!1:e}function cn(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=b1(t),s=_t(1);e&&(o?bt(o)&&(s=Ro(o)):s=Ro(t));let c=M4(i,r,o)?v1(i):_t(0),d=(a.left+c.x)/s.x,u=(a.top+c.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i){let y=at(i),S=o&&bt(o)?at(o):o,C=y,L=Xn(C);for(;L&&o&&S!==C;){let T=Ro(L),k=L.getBoundingClientRect(),N=vt(L),z=k.left+(L.clientLeft+parseFloat(N.paddingLeft))*T.x,D=k.top+(L.clientTop+parseFloat(N.paddingTop))*T.y;d*=T.x,u*=T.y,h*=T.x,g*=T.y,d+=z,u+=D,C=at(L),L=Xn(C)}}return Wr({width:h,height:g,x:d,y:u})}function Qn(t,e){let r=sn(t).scrollLeft;return e?e.left+r:cn(Ht(t)).left+r}function x1(t,e){let r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-Qn(t,r),a=r.top+e.scrollTop;return{x:o,y:a}}function I4(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",s=Ht(o),c=e?an(e.floating):!1;if(o===s||c&&i)return r;let d={scrollLeft:0,scrollTop:0},u=_t(1),h=_t(0),g=Ft(o);if((g||!g&&!i)&&((jr(o)!=="body"||Oo(s))&&(d=sn(o)),g)){let S=cn(o);u=Ro(o),h.x=S.x+o.clientLeft,h.y=S.y+o.clientTop}let y=s&&!g&&!i?x1(s,d):_t(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+h.x+y.x,y:r.y*u.y-d.scrollTop*u.y+h.y+y.y}}function k4(t){return Array.from(t.getClientRects())}function P4(t){let e=Ht(t),r=sn(t),o=t.ownerDocument.body,a=br(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=br(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+Qn(t),c=-r.scrollTop;return vt(o).direction==="rtl"&&(s+=br(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:c}}var h1=25;function z4(t,e){let r=at(t),o=Ht(t),a=r.visualViewport,i=o.clientWidth,s=o.clientHeight,c=0,d=0;if(a){i=a.width,s=a.height;let h=Yn();(!h||h&&e==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}let u=Qn(o);if(u<=0){let h=o.ownerDocument,g=h.body,y=getComputedStyle(g),S=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(o.clientWidth-g.clientWidth-S);C<=h1&&(i-=C)}else u<=h1&&(i+=u);return{width:i,height:s,x:c,y:d}}function D4(t,e){let r=cn(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=Ft(t)?Ro(t):_t(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,d=a*i.x,u=o*i.y;return{width:s,height:c,x:d,y:u}}function m1(t,e,r){let o;if(e==="viewport")o=z4(t,r);else if(e==="document")o=P4(Ht(t));else if(bt(e))o=D4(e,r);else{let a=v1(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Wr(o)}function S1(t,e){let r=or(t);return r===e||!bt(r)||Kr(r)?!1:vt(r).position==="fixed"||S1(r,e)}function B4(t,e){let r=e.get(t);if(r)return r;let o=Kn(t,[],!1).filter(c=>bt(c)&&jr(c)!=="body"),a=null,i=vt(t).position==="fixed",s=i?or(t):t;for(;bt(s)&&!Kr(s);){let c=vt(s),d=qn(s);!d&&c.position==="fixed"&&(a=null),(i?!d&&!a:!d&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Oo(s)&&!d&&S1(t,s))?o=o.filter(h=>h!==s):a=c,s=or(s)}return e.set(t,o),o}function U4(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,s=[...r==="clippingAncestors"?an(e)?[]:B4(e,this._c):[].concat(r),o],c=m1(e,s[0],a),d=c.top,u=c.right,h=c.bottom,g=c.left;for(let y=1;y<s.length;y++){let S=m1(e,s[y],a);d=br(S.top,d),u=on(S.right,u),h=on(S.bottom,h),g=br(S.left,g)}return{width:u-g,height:h-d,x:g,y:d}}function $4(t){let{width:e,height:r}=y1(t);return{width:e,height:r}}function H4(t,e,r){let o=Ft(e),a=Ht(e),i=r==="fixed",s=cn(t,!0,i,e),c={scrollLeft:0,scrollTop:0},d=_t(0);function u(){d.x=Qn(a)}if(o||!o&&!i)if((jr(e)!=="body"||Oo(a))&&(c=sn(e)),o){let S=cn(e,!0,i,e);d.x=S.x+e.clientLeft,d.y=S.y+e.clientTop}else a&&u();i&&!o&&a&&u();let h=a&&!o&&!i?x1(a,c):_t(0),g=s.left+c.scrollLeft-d.x-h.x,y=s.top+c.scrollTop-d.y-h.y;return{x:g,y,width:s.width,height:s.height}}function es(t){return vt(t).position==="static"}function g1(t,e){if(!Ft(t)||vt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ht(t)===r&&(r=r.ownerDocument.body),r}function C1(t,e){let r=at(t);if(an(t))return r;if(!Ft(t)){let a=or(t);for(;a&&!Kr(a);){if(bt(a)&&!es(a))return a;a=or(a)}return r}let o=g1(t,e);for(;o&&f1(o)&&es(o);)o=g1(o,e);return o&&Kr(o)&&es(o)&&!qn(o)?r:o||u1(t)||r}var F4=async function(t){let e=this.getOffsetParent||C1,r=this.getDimensions,o=await r(t.floating);return{reference:H4(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function G4(t){return vt(t).direction==="rtl"}var Jn={convertOffsetParentRelativeRectToViewportRelativeRect:I4,getDocumentElement:Ht,getClippingRect:U4,getOffsetParent:C1,getElementRects:F4,getClientRects:k4,getDimensions:$4,getScale:Ro,isElement:bt,isRTL:G4};var E1=s1,L1=c1;var A1=(t,e,r)=>{let o=new Map,a={platform:Jn,...r},i={...a.platform,_c:o};return i1(t,e,{...a,platform:i})};function O1(t){return W4(t)}function ts(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function W4(t){for(let e=t;e;e=ts(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ts(t);e;e=ts(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 R1(t,e,r){let o;return typeof r=="object"?o=r:o={placement:r},A1(t,e,{strategy:o.strategy,platform:{...Jn,getOffsetParent:a=>Jn.getOffsetParent(a,O1)},middleware:[L1({crossAxis:!0}),E1({allowedPlacements:[o.placement]})]})}var Uo=v(M());var Os=v(X());function V4(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(!ea(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(!ea(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(c=>s[c]!=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(!ea(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ea(t,e){try{return V4(t,e)}catch{return!1}}function ln(t,e){return!ea(t,e)}function w1(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function ta(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 _1=v(X(),1);var rs=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:ln,attribute:!1,...e};(0,_1.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:c=>c[o],store:e.store})}};var ra=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 Zr=v(X(),1);var T1=v(X(),1);function N1(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,T1.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:ln,...e??{}})}var oa=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(c){a(c);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 I1=v(F(),1);var na=globalThis,j4=na.ShadowRoot&&(na.ShadyCSS===void 0||na.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Kx=Symbol();var M1=(t,e)=>{if(j4)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let o=document.createElement("style"),a=na.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}};var aa=class extends I1.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 M1(o,e.elementStyles),o}};function k1(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 _o=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 c=t.length-1;c>=0;c--)(s=t[c])&&(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},B1,P1=Symbol("constructorPrototype"),z1=Symbol("constructorName"),U1=Symbol("exportpartsDebouncer"),D1=Symbol("dynamicDependenciesLoaded"),wo=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};wo.eventName="exportparts-updated";var Gt=class extends aa{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[B1]=new oa(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[U1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[z1]=this.constructor.name,this[P1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[z1]&&Object.setPrototypeOf(this,this[P1])}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[D1]||(r[D1]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(wo.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(wo.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 wo)})}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=k1(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,c;let d=y=>y!=null&&y.trim().length>0,u=e.filter(d).map(y=>y.trim());if(u.length===0){this.exportparts=void 0;return}let h=new Set;for(let y of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let S=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],C=(c=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],L=[...S,...C].filter(d).map(T=>T.trim());for(let T of L)h.add(T)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>u.map(S=>`${y}:${S}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};B1=U1;_o([(0,Zr.property)()],Gt.prototype,"exportpartsPrefix",void 0);_o([N1([])],Gt.prototype,"exportpartsPrefixes",void 0);_o([(0,Zr.property)({reflect:!0})],Gt.prototype,"exportparts",void 0);_o([(0,Zr.property)()],Gt.prototype,"customStylesheet",void 0);_o([(0,Zr.property)()],Gt.prototype,"elementToFocus",void 0);_o([(0,Zr.state)()],Gt.prototype,"useAdoptedStyleSheets",void 0);function ia(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var dn=Symbol("internalReduxEventsUnsubscribers"),xr=Symbol("internalStoresUnsubscribers"),qr=Symbol("internalStores"),K4=ta(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[qr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[qr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[qr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[qr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[qr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[qr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[xr].has(s.store):this[xr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[xr].set(s,c.subscribe(()=>this.updateFromStores())),this[dn].set(s,[]),ia(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,h)=>{if(typeof this[h]=="function"&&(!u.store||c.name===u.store)){let g=y=>this[h](y);c.addEventListener(u.eventName,g),this[dn].get(s).push(()=>c.removeEventListener(u.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[xr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[xr].has(s)&&this[xr].get(s)(),this[xr].delete(s),(c=this[dn].get(s))===null||c===void 0||c.forEach(d=>d()),this[dn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=xr,r=qr,o=dn,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$1=class extends K4(Gt){};function xt(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 nr(t){return!!t&&!!t[ue]}function Tt(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)===tp}(t)||Array.isArray(t)||!!t[K1]||!!(!((e=t.constructor)===null||e===void 0)&&e[K1])||fs(t)||us(t))}function Yr(t,e,r){r===void 0&&(r=!1),Mo(t)===0?(r?Object.keys:No)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function Mo(t){var e=t[ue];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:fs(t)?2:us(t)?3:0}function To(t,e){return Mo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Z4(t,e){return Mo(t)===2?t.get(e):t[e]}function Z1(t,e,r){var o=Mo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function q1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function fs(t){return J4&&t instanceof Map}function us(t){return ep&&t instanceof Set}function Sr(t){return t.o||t.t}function ps(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Q1(t);delete e[ue];for(var r=No(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 hs(t,e){return e===void 0&&(e=!1),ms(t)||nr(t)||!Tt(t)||(Mo(t)>1&&(t.set=t.add=t.clear=t.delete=q4),Object.freeze(t),e&&Yr(t,function(r,o){return hs(o,!0)},!0)),t}function q4(){xt(2)}function ms(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Wt(t){var e=ds[t];return e||xt(18,t),e}function Y4(t,e){ds[t]||(ds[t]=e)}function ss(){return un}function os(t,e){e&&(Wt("Patches"),t.u=[],t.s=[],t.v=e)}function sa(t){cs(t),t.p.forEach(X4),t.p=null}function cs(t){t===un&&(un=t.l)}function H1(t){return un={p:[],l:un,h:t,m:!0,_:0}}function X4(t){var e=t[ue];e.i===0||e.i===1?e.j():e.g=!0}function ns(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Wt("ES5").S(e,t,o),o?(r[ue].P&&(sa(e),xt(4)),Tt(t)&&(t=ca(e,t),e.l||la(e,t)),e.u&&Wt("Patches").M(r[ue].t,t,e.u,e.s)):t=ca(e,r,[]),sa(e),e.u&&e.v(e.u,e.s),t!==X1?t:void 0}function ca(t,e,r){if(ms(e))return e;var o=e[ue];if(!o)return Yr(e,function(c,d){return F1(t,o,e,c,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return la(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=ps(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Yr(i,function(c,d){return F1(t,o,a,c,d,r,s)}),la(t,a,!1),r&&t.u&&Wt("Patches").N(o,r,t.u,t.s)}return o.o}function F1(t,e,r,o,a,i,s){if(nr(a)){var c=ca(t,a,i&&e&&e.i!==3&&!To(e.R,o)?i.concat(o):void 0);if(Z1(r,o,c),!nr(c))return;t.m=!1}else s&&r.add(a);if(Tt(a)&&!ms(a)){if(!t.h.D&&t._<1)return;ca(t,a),e&&e.A.l||la(t,a)}}function la(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&hs(e,r)}function as(t,e){var r=t[ue];return(r?Sr(r):t)[e]}function G1(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 Cr(t){t.P||(t.P=!0,t.l&&Cr(t.l))}function is(t){t.o||(t.o=ps(t.t))}function ls(t,e,r){var o=fs(e)?Wt("MapSet").F(e,r):us(e)?Wt("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:ss(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=pn;s&&(d=[c],u=fn);var h=Proxy.revocable(d,u),g=h.revoke,y=h.proxy;return c.k=y,c.j=g,y}(e,r):Wt("ES5").J(e,r);return(r?r.A:ss()).p.push(o),o}function Q4(t){return nr(t)||xt(22,t),function e(r){if(!Tt(r))return r;var o,a=r[ue],i=Mo(r);if(a){if(!a.P&&(a.i<4||!Wt("ES5").K(a)))return a.t;a.I=!0,o=W1(r,i),a.I=!1}else o=W1(r,i);return Yr(o,function(s,c){a&&Z4(a.t,s)===c||Z1(o,s,e(c))}),i===3?new Set(o):o}(t)}function W1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ps(t)}function Y1(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[ue];return pn.get(u,s)},set:function(u){var h=this[ue];pn.set(h,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ue];if(!d.P)switch(d.i){case 5:o(d)&&Cr(d);break;case 4:r(d)&&Cr(d)}}}function r(s){for(var c=s.t,d=s.k,u=No(d),h=u.length-1;h>=0;h--){var g=u[h];if(g!==ue){var y=c[g];if(y===void 0&&!To(c,g))return!0;var S=d[g],C=S&&S[ue];if(C?C.t!==y:!q1(S,y))return!0}}var L=!!c[ue];return u.length!==No(c).length+(L?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&xt(3,JSON.stringify(Sr(s)))}var i={};Y4("ES5",{J:function(s,c){var d=Array.isArray(s),u=function(g,y){if(g){for(var S=Array(y.length),C=0;C<y.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var L=Q1(y);delete L[ue];for(var T=No(L),k=0;k<T.length;k++){var N=T[k];L[N]=t(N,g||!!L[N].enumerable)}return Object.create(Object.getPrototypeOf(y),L)}(d,s),h={i:d?5:4,A:c?c.A:ss(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ue,{value:h,writable:!0}),u},S:function(s,c,d){d?nr(c)&&c[ue].A===s&&e(s.p):(s.u&&function u(h){if(h&&typeof h=="object"){var g=h[ue];if(g){var y=g.t,S=g.k,C=g.R,L=g.i;if(L===4)Yr(S,function(D){D!==ue&&(y[D]!==void 0||To(y,D)?C[D]||u(S[D]):(C[D]=!0,Cr(g)))}),Yr(y,function(D){S[D]!==void 0||To(S,D)||(C[D]=!1,Cr(g))});else if(L===5){if(o(g)&&(Cr(g),C.length=!0),S.length<y.length)for(var T=S.length;T<y.length;T++)C[T]=!1;else for(var k=y.length;k<S.length;k++)C[k]=!0;for(var N=Math.min(S.length,y.length),z=0;z<N;z++)S.hasOwnProperty(z)||(C[z]=!0),C[z]===void 0&&u(S[z])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var V1,un,gs=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",J4=typeof Map<"u",ep=typeof Set<"u",j1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",X1=gs?Symbol.for("immer-nothing"):((V1={})["immer-nothing"]=!0,V1),K1=gs?Symbol.for("immer-draftable"):"__$immer_draftable",ue=gs?Symbol.for("immer-state"):"__$immer_state";var tp=""+Object.prototype.constructor,No=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Q1=Object.getOwnPropertyDescriptors||function(t){var e={};return No(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},ds={},pn={get:function(t,e){if(e===ue)return t;var r=Sr(t);if(!To(r,e))return function(a,i,s){var c,d=G1(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!Tt(o)?o:o===as(t.t,e)?(is(t),t.o[e]=ls(t.A.h,o,t)):o},has:function(t,e){return e in Sr(t)},ownKeys:function(t){return Reflect.ownKeys(Sr(t))},set:function(t,e,r){var o=G1(Sr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=as(Sr(t),e),i=a?.[ue];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(q1(r,a)&&(r!==void 0||To(t.t,e)))return!0;is(t),Cr(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 as(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,is(t),Cr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Sr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){xt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){xt(12)}},fn={};Yr(pn,function(t,e){fn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),fn.deleteProperty=function(t,e){return fn.set.call(this,t,e,void 0)},fn.set=function(t,e,r){return pn.set.call(this,t[0],e,r,t[0])};var rp=function(){function t(r){var o=this;this.O=j1,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(L){var T=this;L===void 0&&(L=c);for(var k=arguments.length,N=Array(k>1?k-1:0),z=1;z<k;z++)N[z-1]=arguments[z];return d.produce(L,function(D){var K;return(K=i).call.apply(K,[T,D].concat(N))})}}var u;if(typeof i!="function"&&xt(6),s!==void 0&&typeof s!="function"&&xt(7),Tt(a)){var h=H1(o),g=ls(o,a,void 0),y=!0;try{u=i(g),y=!1}finally{y?sa(h):cs(h)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(L){return os(h,s),ns(L,h)},function(L){throw sa(h),L}):(os(h,s),ns(u,h))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===X1&&(u=void 0),o.D&&hs(u,!0),s){var S=[],C=[];Wt("Patches").M(a,u,S,C),s(S,C)}return u}xt(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return o.produceWithPatches(u,function(S){return a.apply(void 0,[S].concat(g))})};var s,c,d=o.produce(a,i,function(u,h){s=u,c=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(u){return[u,s,c]}):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Tt(r)||xt(8),nr(r)&&(r=Q4(r));var o=H1(this),a=ls(this,r,void 0);return a[ue].C=!0,cs(o),a},e.finishDraft=function(r,o){var a=r&&r[ue],i=a.A;return os(i,o),ns(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!j1&&xt(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=Wt("Patches").$;return nr(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),ct=new rp,op=ct.produce,cS=ct.produceWithPatches.bind(ct),lS=ct.setAutoFreeze.bind(ct),dS=ct.setUseProxies.bind(ct),fS=ct.applyPatches.bind(ct),uS=ct.createDraft.bind(ct),pS=ct.finishDraft.bind(ct),da=op;function Xr(t){"@babel/helpers - typeof";return Xr=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},Xr(t)}function J1(t,e){if(Xr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Xr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function e2(t){var e=J1(t,"string");return Xr(e)=="symbol"?e:e+""}function t2(t,e,r){return(e=e2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r2(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 ys(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?r2(Object(r),!0).forEach(function(o){t2(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):r2(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Ke(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 o2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),bs=function(){return Math.random().toString(36).substring(7).split("").join(".")},fa={INIT:"@@redux/INIT"+bs(),REPLACE:"@@redux/REPLACE"+bs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+bs()}};function np(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 vs(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ke(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ke(1));return r(vs)(t,e)}if(typeof t!="function")throw new Error(Ke(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function h(){if(d)throw new Error(Ke(3));return i}function g(L){if(typeof L!="function")throw new Error(Ke(4));if(d)throw new Error(Ke(5));var T=!0;return u(),c.push(L),function(){if(T){if(d)throw new Error(Ke(6));T=!1,u();var N=c.indexOf(L);c.splice(N,1),s=null}}}function y(L){if(!np(L))throw new Error(Ke(7));if(typeof L.type>"u")throw new Error(Ke(8));if(d)throw new Error(Ke(9));try{d=!0,i=a(i,L)}finally{d=!1}for(var T=s=c,k=0;k<T.length;k++){var N=T[k];N()}return L}function S(L){if(typeof L!="function")throw new Error(Ke(10));a=L,y({type:fa.REPLACE})}function C(){var L,T=g;return L={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Ke(11));function z(){N.next&&N.next(h())}z();var D=T(z);return{unsubscribe:D}}},L[o2]=function(){return this},L}return y({type:fa.INIT}),o={dispatch:y,subscribe:g,getState:h,replaceReducer:S},o[o2]=C,o}function ap(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:fa.INIT});if(typeof o>"u")throw new Error(Ke(12));if(typeof r(void 0,{type:fa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function n2(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{ap(r)}catch(d){c=d}return function(u,h){if(u===void 0&&(u={}),c)throw c;if(0)var g;for(var y=!1,S={},C=0;C<i.length;C++){var L=i[C],T=r[L],k=u[L],N=T(k,h);if(typeof N>"u"){var z=h&&h.type;throw new Error(Ke(14))}S[L]=N,y=y||N!==k}return y=y||i.length!==Object.keys(u).length,y?S:u}}function Io(){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 a2(){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(Ke(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=Io.apply(void 0,c)(a.dispatch),ys(ys({},a),{},{dispatch:i})}}}function i2(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var s2=i2();s2.withExtraArgument=i2;var xs=s2;var u2=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)}}(),ip=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(h){return d([u,h])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(h){u=[6,h],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},ko=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},sp=Object.defineProperty,cp=Object.defineProperties,lp=Object.getOwnPropertyDescriptors,c2=Object.getOwnPropertySymbols,dp=Object.prototype.hasOwnProperty,fp=Object.prototype.propertyIsEnumerable,l2=function(t,e,r){return e in t?sp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Er=function(t,e){for(var r in e||(e={}))dp.call(e,r)&&l2(t,r,e[r]);if(c2)for(var o=0,a=c2(e);o<a.length;o++){var r=a[o];fp.call(e,r)&&l2(t,r,e[r])}return t},Ss=function(t,e){return cp(t,lp(e))},up=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var pp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Io:Io.apply(null,arguments)},NS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function hp(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 mp=function(t){u2(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,ko([void 0],r[0].concat(this)))):new(e.bind.apply(e,ko([void 0],r.concat(this))))},e}(Array),gp=function(t){u2(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,ko([void 0],r[0].concat(this)))):new(e.bind.apply(e,ko([void 0],r.concat(this))))},e}(Array);function Ls(t){return Tt(t)?da(t,function(){}):t}function yp(t){return typeof t=="boolean"}function bp(){return function(e){return vp(e)}}function vp(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=new mp;if(r&&(yp(r)?c.push(xs):c.push(xs.withExtraArgument(r.extraArgument))),0){if(a)var d;if(s)var u}return c}var Cs=!0;function p2(t){var e=bp(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,h=u===void 0?void 0:u,g=r.enhancers,y=g===void 0?void 0:g,S;if(typeof a=="function")S=a;else if(hp(a))S=n2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var C=s;if(typeof C=="function"&&(C=C(e),!Cs&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cs&&C.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var L=a2.apply(void 0,C),T=Io;d&&(T=pp(Er({trace:!Cs},typeof d=="object"&&d)));var k=new gp(L),N=k;Array.isArray(y)?N=ko([L],y):typeof y=="function"&&(N=y(k));var z=T.apply(void 0,N);return vs(S,h,z)}function Lr(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 Er(Er({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 h2(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function xp(t){return typeof t=="function"}function Sp(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?h2(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(xp(t))d=function(){return Ls(t())};else{var u=Ls(t);d=function(){return u}}function h(g,y){g===void 0&&(g=d());var S=ko([i[y.type]],s.filter(function(C){var L=C.matcher;return L(y)}).map(function(C){var L=C.reducer;return L}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,L){if(L)if(nr(C)){var T=C,k=L(T,y);return k===void 0?C:k}else{if(Tt(C))return da(C,function(N){return L(N,y)});var k=L(C,y);if(k===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return k}return C},g)}return h.getInitialState=d,h}function Cp(t,e){return t+"/"+e}function m2(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:Ls(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(h){var g=o[h],y=Cp(e,h),S,C;"reducer"in g?(S=g.reducer,C=g.prepare):S=g,i[h]=S,s[y]=S,c[h]=C?Lr(y,C):Lr(y)});function d(){var h=typeof t.extraReducers=="function"?h2(t.extraReducers):[t.extraReducers],g=h[0],y=g===void 0?{}:g,S=h[1],C=S===void 0?[]:S,L=h[2],T=L===void 0?void 0:L,k=Er(Er({},y),s);return Sp(r,function(N){for(var z in k)N.addCase(z,k[z]);for(var D=0,K=C;D<K.length;D++){var de=K[D];N.addMatcher(de.matcher,de.reducer)}T&&N.addDefaultCase(T)})}var u;return{name:e,reducer:function(h,g){return u||(u=d()),u(h,g)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Ep="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lp=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ep[Math.random()*64|0];return e},Ap=["name","message","stack","code"],Es=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),d2=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Op=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Ap;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},PS=function(){function t(e,r,o){var a=Lr(e+"/fulfilled",function(h,g,y,S){return{payload:h,meta:Ss(Er({},S||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=Lr(e+"/pending",function(h,g,y){return{payload:void 0,meta:Ss(Er({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Lr(e+"/rejected",function(h,g,y,S,C){return{payload:S,error:(o&&o.serializeError||Op)(h||"Rejected"),meta:Ss(Er({},C||{}),{arg:y,requestId:g,rejectedWithValue:!!S,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function u(h){return function(g,y,S){var C=o?.idGenerator?o.idGenerator(h):Lp(),L=new d,T,k=!1;function N(D){T=D,L.abort()}var z=function(){return up(this,null,function(){var D,K,de,ot,$e,Dt,He;return ip(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),ot=(D=o?.condition)==null?void 0:D.call(o,h,{getState:y,extra:S}),wp(ot)?[4,ot]:[3,2];case 1:ot=x.sent(),x.label=2;case 2:if(ot===!1||L.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return k=!0,$e=new Promise(function(E,$){return L.signal.addEventListener("abort",function(){return $({name:"AbortError",message:T||"Aborted"})})}),g(i(C,h,(K=o?.getPendingMeta)==null?void 0:K.call(o,{requestId:C,arg:h},{getState:y,extra:S}))),[4,Promise.race([$e,Promise.resolve(r(h,{dispatch:g,getState:y,extra:S,requestId:C,signal:L.signal,abort:N,rejectWithValue:function(E,$){return new Es(E,$)},fulfillWithValue:function(E,$){return new d2(E,$)}})).then(function(E){if(E instanceof Es)throw E;return E instanceof d2?a(E.payload,C,h,E.meta):a(E,C,h)})])];case 3:return de=x.sent(),[3,5];case 4:return Dt=x.sent(),de=Dt instanceof Es?s(null,C,h,Dt.payload,Dt.meta):s(Dt,C,h),[3,5];case 5:return He=o&&!o.dispatchConditionRejection&&s.match(de)&&de.meta.condition,He||g(de),[2,de]}})})}();return Object.assign(z,{abort:N,requestId:C,arg:h,unwrap:function(){return z.then(Rp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Rp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function wp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var g2="listener",y2="completed",b2="cancelled",zS="task-"+b2,DS="task-"+y2,BS=g2+"-"+b2,US=g2+"-"+y2;var As="listenerMiddleware";var $S=Lr(As+"/add"),HS=Lr(As+"/removeAll"),FS=Lr(As+"/remove");var f2,GS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(f2||(f2=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},_p=function(t){return function(e){setTimeout(e,t)}},WS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_p(10);Y1();var Tp=ta(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)}}}),ua=class extends Tp(Object){};window.ftReduxStores||(window.ftReduxStores={});var v2=class t extends ua{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(ia(i))return i;if(a==null)return;let s=m2({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=p2({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let h=w1(s.getInitialState());for(let g of u.keeping)h[g]=(d??h)[g];return h}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ra;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...h)=>{let g=u(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[d]:a(h)})}}}),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 pa=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ha=v(M()),Np="ft-app-info",Vt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Vt.eventName="authentication-change";var Mp={session:(t,e)=>{(0,ha.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>w.dispatchEvent(new Vt(e.payload)),0))}},w=ha.FtReduxStore.get({name:Np,reducers:Mp,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 x2=v(M()),ma=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 c=t.length-1;c>=0;c--)(s=t[c])&&(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},bC=(0,x2.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(w)}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(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>pa.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ma([(0,Os.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ma([(0,Os.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ma([rs({store:w.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),ma([rs({store:w.name})],e.prototype,"uiLocale",void 0),e});var Sa=v(M());var Rs=v(M());var Qr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=w.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=w.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var ga=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Qr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Qr.await()}};var Ze=class extends ga{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(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Rs.CacheRegistry,this.cache=e?a.commonCache:new Rs.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 ya=class extends Ze{async listMySearches(){let{session:e}=w.getState();return er(e,ae.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var ba=class extends Ze{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 va=class extends Ze{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 xa=class extends Ze{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 Ip="ft-user-assets",kp={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(gt).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;_s(t,r,[...ws(t,r),a]),S2(t,r,1,o),C2(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;_s(t,r,ws(t,r).map(a=>a.id===o.id?o:a)),C2(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;_s(t,r,ws(t,r).filter(i=>i.id!==a)),S2(t,r,-1,o)}},E2={[gt.SEARCHES]:"savedSearches",[gt.BOOKMARKS]:"bookmarks",[gt.BOOKS]:void 0,[gt.COLLECTIONS]:void 0},ws=(t,e)=>{var r;let o=E2[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},_s=(t,e,r)=>{let o=E2[e];o&&(t[o]=r)},S2=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===gt.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},C2=(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)},lt=Sa.FtReduxStore.get({name:Ip,reducers:kp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(gt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ts=class{constructor(e=new va,r=new xa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ba,this.savedSearchesService=new ya,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=w.getState();(0,Sa.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(),lt.actions.clearAssetCount(),lt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),lt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),lt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();lt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();lt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&<.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&<.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(lt.getState().assetCounts.bookmarkByMap).length!==0;e===gt.BOOKMARKS&&r&<.actions.clearBookmarkCountByMap(),lt.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;lt.actions.bookmarks(r)}}},Ns=new Ts;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ns);var Ms=class{addCommand(e,r=!1){w.commands.add(e,r)}consumeCommand(e){return w.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ms;var St=v(M());var L2,Po=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Pp=Symbol("clearAfterUnitTest"),Ca=class extends(0,St.withEventBus)(Ze){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[L2]=()=>{this.defaultMessages={},this.cache=new St.CacheRegistry,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 a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};(0,St.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 St.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 St.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 Po({loadedContexts:e})),this.dispatchEvent(new Po({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Po({loadedContexts:[e]})),this.dispatchEvent(new Po({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,St.delay)(0).then(()=>o()).catch(()=>null)))}};L2=Pp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ca{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var zo=window.FluidTopicsI18nService,Ea=window.FluidTopicsCustomI18nService;var A2=v(M()),Is=class{highlightHtml(e,r,o){(0,A2.highlightHtml)(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Is;var O2=v(M());var ks=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.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 O2.DateFormatter.format(e,(o=r?.locale)!==null&&o!==void 0?o:w.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(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new ks;var R2=v(M());var hn=class{static get(e,r){var o,a;let i=w.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new R2.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var La=class extends Ze{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,a])=>Array.isArray(a)?[o,a.map(i=>typeof i=="object"&&i!=null&&!Array.isArray(i)?this.sortEventArrays(i):i).sort((i,s)=>typeof i=="object"&&i!==null&&"key"in i?i.key.localeCompare(s.key):typeof i=="string"&&typeof s=="string"?i.localeCompare(s):String(i).localeCompare(String(s)))]:typeof a=="object"&&a!==null?[o,this.sortEventArrays(a)]:[o,a]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(a=>(console.info(r),console.debug(a),o)),1e3)}};var Ps=class{urlToSearchRequest(e){return hn.get().parse(e)}searchRequestToUrl(e){return hn.get().serialize(e)}};window.FluidTopicsUrlService=new Ps;var Ar=v(M());var Jr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Jr.eventName="change";var zs=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))}},w2=new zs;var Aa=class t extends Ar.WithEventBus{static build(){return new t(window.history,w2,()=>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,Ar.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Jr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[u,s,c]),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(Jr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Jr.eventName,e)}currentItem(){return(0,Ar.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,Ar.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,Ar.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=Aa.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 Do=class{constructor(){this.storeListeners=[]}store(e,r){if(this.isAuthenticated())return;let o=JSON.stringify(r);window.localStorage.setItem(e,o),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:o,storageArea:window.localStorage}))}get(e){var r,o;if(!this.isAuthenticated())return(o=JSON.parse((r=window.localStorage.getItem(e))!==null&&r!==void 0?r:"null"))!==null&&o!==void 0?o:void 0}addStoreListener(e,r){let o=a=>{a.key===e()&&!this.isAuthenticated()&&r()};this.storeListeners.push(o),window.addEventListener("storage",o)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var _2=v(F());var T2=_2.css`
|
|
591
591
|
`;var M2=v(F()),We=v(X()),Nt=v(M());function N2(t,e){let{authenticationRequired:r,session:o}=w.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Te=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 c=t.length-1;c>=0;c--)(s=t[c])&&(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},se=class extends Nt.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=()=>Qr.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Nt.CacheRegistry,this.cleanSessionDebouncer=new Nt.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return M2.html`
|
|
592
592
|
<slot></slot>
|
|
593
593
|
`}connectedCallback(){super.connectedCallback(),w.addEventListener(Vt.eventName,this.reloadConfiguration)}disconnectedCallback(){w.addEventListener(Vt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,a,i,s,c,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(u=>zo.addContext(u)),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((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),w.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&w.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&w.actions.availableContentLocales((d=(c=this.availableContentLocales)===null||c===void 0?void 0:c.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",()=>N2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};se.elementDefinitions={};se.styles=T2;Te([(0,We.property)()],se.prototype,"baseUrl",void 0);Te([(0,We.property)()],se.prototype,"apiIntegrationIdentifier",void 0);Te([(0,We.property)()],se.prototype,"apiIntegrationAppVersion",void 0);Te([(0,We.property)()],se.prototype,"uiLocale",void 0);Te([(0,Nt.jsonProperty)(null)],se.prototype,"availableUiLocales",void 0);Te([(0,Nt.jsonProperty)(null)],se.prototype,"metadataConfiguration",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"editorMode",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"noCustom",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,We.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],se.prototype,"noCustomComponent",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"withManualResources",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"navigatorOnline",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"forcedOffline",void 0);Te([(0,We.property)({type:Object})],se.prototype,"apiProvider",void 0);Te([(0,We.property)({type:Boolean})],se.prototype,"authenticationRequired",void 0);Te([(0,Nt.jsonProperty)([])],se.prototype,"messageContexts",void 0);Te([(0,Nt.jsonProperty)(void 0)],se.prototype,"session",void 0);Te([(0,We.state)()],se.prototype,"localesConfiguration",void 0);Te([(0,We.state)()],se.prototype,"availableContentLocales",void 0);var I2=v(M());(0,I2.customElement)("ft-app-context")(se);var k2=v(X());var Ds=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-]+$/)}},Bo=new Ds;var zp=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 c=t.length-1;c>=0;c--)(s=t[c])&&(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},gn=Symbol("i18nAttributes"),P2=Symbol("i18nListAttributes"),yn=Symbol("i18nProperties"),Oa=Symbol("i18nContexts"),mn=Symbol("i18nUnsubs"),Or=(0,Uo.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?Ea:zo}i18n(i){let{context:s,key:c,message:d}=i,{custom:u,args:h,argsProvider:g}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=h??(g?g(this):[]);return this.getI18nService(u).resolveMessage(s,c,...y)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Bo.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,u=(h,g,y)=>y?.context&&y.key&&i(h,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...h})}:y;(s=this[gn])===null||s===void 0||s.forEach((h,g)=>d[g]=u(h,g,d[g])),(c=this[P2])===null||c===void 0||c.forEach((h,g)=>{var y;return d[g]=(y=d[g])===null||y===void 0?void 0:y.map(S=>u(h,g,S))})}updateI18nProperties(i){var s;(s=this[yn])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Oa].set(d,{isCustomContext:c}),this[mn].has(d)||this[mn].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[Oa].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Oa].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[mn].forEach(i=>i()),this[mn].clear()}}return e=Oa,r=mn,zp([(0,k2.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Ra=class extends Or(Uo.FtLitElement){},wa=class extends Or(Uo.FtLitElementRedux){};var z2=v(M());var Bs=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?Bo.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Dp=new Bs;var D2=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:z2.hasChanged,converter:Bo,...e}),r[gn]=(a=r[gn])!==null&&a!==void 0?a:new Map,r[gn].set(o,t??{})};var Rr=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?Ea:zo}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 _a=(t,e)=>(r,o)=>{var a,i;r.constructor.createProperty(o,e??{attribute:!1,type:String});let s={...t,key:(a=t.key)!==null&&a!==void 0?a:o};r[yn]=(i=r[yn])!==null&&i!==void 0?i:new Map,r[yn].set(o,s)};var B2=v(F());var U2=B2.css`
|
|
@@ -45,7 +45,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
45
45
|
input::-webkit-search-results-decoration {
|
|
46
46
|
display: none;
|
|
47
47
|
}
|
|
48
|
-
`;var C1={};var nc={};Q(nc,{ParametrizedLabelResolver:()=>bn});var bn=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,i;e=this.resolvePluralKey(e,r);let a=(i=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let i=`${String(e)}[\\=${o}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return o(document.documentElement.lang)}catch{return o()}}};var _c={};Q(_c,{FtCommandQueue:()=>xn,FtLitElementRedux:()=>Xt,FtReduxStore:()=>Jt,FtStateManager:()=>wc,ReduxWatcher:()=>Ci,clearAllStores:()=>Nh,isFtReduxStore:()=>Co,redux:()=>ce,reduxEventListener:()=>vn,reduxReactive:()=>q4,watch:()=>Ih,withRedux:()=>E1});var q4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},ce=t=>{let e=t??{};return(r,o)=>{var i;let a={hasChanged:jt,attribute:!1,...e};b(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[o],store:e.store})}},vn=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var xn=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 Co(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Sn=Symbol("internalReduxEventsUnsubscribers"),fr=Symbol("internalStoresUnsubscribers"),Zr=Symbol("internalStores"),E1=Ee(Symbol("withRedux"),function(t){var e,r,o;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Zr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Zr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Zr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Zr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Zr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Zr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[fr].has(s.store):this[fr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[fr].set(s,c.subscribe(()=>this.updateFromStores())),this[Sn].set(s,[]),Co(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,p)=>{if(typeof this[p]=="function"&&(!u.store||c.name===u.store)){let h=g=>this[p](g);c.addEventListener(u.eventName,h),this[Sn].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[fr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[fr].has(s)&&this[fr].get(s)(),this[fr].delete(s),(c=this[Sn].get(s))===null||c===void 0||c.forEach(d=>d()),this[Sn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=fr,r=Zr,o=Sn,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Xt=class extends E1(Z){};function ut(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 i,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 Qt(t){return!!t&&!!t[ye]}function Ct(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 i=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===oh}(t)||Array.isArray(t)||!!t[T1]||!!(!((e=t.constructor)===null||e===void 0)&&e[T1])||pc(t)||hc(t))}function qr(t,e,r){r===void 0&&(r=!1),Oo(t)===0?(r?Object.keys:Ao)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,i){return e(i,o,t)})}function Oo(t){var e=t[ye];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:pc(t)?2:hc(t)?3:0}function Eo(t,e){return Oo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Y4(t,e){return Oo(t)===2?t.get(e):t[e]}function M1(t,e,r){var o=Oo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function N1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function pc(t){return th&&t instanceof Map}function hc(t){return rh&&t instanceof Set}function pr(t){return t.o||t.t}function mc(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=P1(t);delete e[ye];for(var r=Ao(e),o=0;o<r.length;o++){var i=r[o],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function gc(t,e){return e===void 0&&(e=!1),yc(t)||Qt(t)||!Ct(t)||(Oo(t)>1&&(t.set=t.add=t.clear=t.delete=X4),Object.freeze(t),e&&qr(t,function(r,o){return gc(o,!0)},!0)),t}function X4(){ut(2)}function yc(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function It(t){var e=fc[t];return e||ut(18,t),e}function Q4(t,e){fc[t]||(fc[t]=e)}function lc(){return En}function ic(t,e){e&&(It("Patches"),t.u=[],t.s=[],t.v=e)}function yi(t){dc(t),t.p.forEach(J4),t.p=null}function dc(t){t===En&&(En=t.l)}function A1(t){return En={p:[],l:En,h:t,m:!0,_:0}}function J4(t){var e=t[ye];e.i===0||e.i===1?e.j():e.g=!0}function ac(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||It("ES5").S(e,t,o),o?(r[ye].P&&(yi(e),ut(4)),Ct(t)&&(t=bi(e,t),e.l||vi(e,t)),e.u&&It("Patches").M(r[ye].t,t,e.u,e.s)):t=bi(e,r,[]),yi(e),e.u&&e.v(e.u,e.s),t!==k1?t:void 0}function bi(t,e,r){if(yc(e))return e;var o=e[ye];if(!o)return qr(e,function(c,d){return O1(t,o,e,c,d,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 i=o.i===4||o.i===5?o.o=mc(o.k):o.o,a=i,s=!1;o.i===3&&(a=new Set(i),i.clear(),s=!0),qr(a,function(c,d){return O1(t,o,i,c,d,r,s)}),vi(t,i,!1),r&&t.u&&It("Patches").N(o,r,t.u,t.s)}return o.o}function O1(t,e,r,o,i,a,s){if(Qt(i)){var c=bi(t,i,a&&e&&e.i!==3&&!Eo(e.R,o)?a.concat(o):void 0);if(M1(r,o,c),!Qt(c))return;t.m=!1}else s&&r.add(i);if(Ct(i)&&!yc(i)){if(!t.h.D&&t._<1)return;bi(t,i),e&&e.A.l||vi(t,i)}}function vi(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&gc(e,r)}function sc(t,e){var r=t[ye];return(r?pr(r):t)[e]}function L1(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 hr(t){t.P||(t.P=!0,t.l&&hr(t.l))}function cc(t){t.o||(t.o=mc(t.t))}function uc(t,e,r){var o=pc(e)?It("MapSet").F(e,r):hc(e)?It("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:lc(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=c,u=An;s&&(d=[c],u=Cn);var p=Proxy.revocable(d,u),h=p.revoke,g=p.proxy;return c.k=g,c.j=h,g}(e,r):It("ES5").J(e,r);return(r?r.A:lc()).p.push(o),o}function eh(t){return Qt(t)||ut(22,t),function e(r){if(!Ct(r))return r;var o,i=r[ye],a=Oo(r);if(i){if(!i.P&&(i.i<4||!It("ES5").K(i)))return i.t;i.I=!0,o=R1(r,a),i.I=!1}else o=R1(r,a);return qr(o,function(s,c){i&&Y4(i.t,s)===c||M1(o,s,e(c))}),a===3?new Set(o):o}(t)}function R1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return mc(t)}function I1(){function t(s,c){var d=a[s];return d?d.enumerable=c:a[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[ye];return An.get(u,s)},set:function(u){var p=this[ye];An.set(p,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ye];if(!d.P)switch(d.i){case 5:o(d)&&hr(d);break;case 4:r(d)&&hr(d)}}}function r(s){for(var c=s.t,d=s.k,u=Ao(d),p=u.length-1;p>=0;p--){var h=u[p];if(h!==ye){var g=c[h];if(g===void 0&&!Eo(c,h))return!0;var S=d[h],C=S&&S[ye];if(C?C.t!==g:!N1(S,g))return!0}}var R=!!c[ye];return u.length!==Ao(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&ut(3,JSON.stringify(pr(s)))}var a={};Q4("ES5",{J:function(s,c){var d=Array.isArray(s),u=function(h,g){if(h){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=P1(g);delete R[ye];for(var _=Ao(R),M=0;M<_.length;M++){var I=_[M];R[I]=t(I,h||!!R[I].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),p={i:d?5:4,A:c?c.A:lc(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ye,{value:p,writable:!0}),u},S:function(s,c,d){d?Qt(c)&&c[ye].A===s&&e(s.p):(s.u&&function u(p){if(p&&typeof p=="object"){var h=p[ye];if(h){var g=h.t,S=h.k,C=h.R,R=h.i;if(R===4)qr(S,function(A){A!==ye&&(g[A]!==void 0||Eo(g,A)?C[A]||u(S[A]):(C[A]=!0,hr(h)))}),qr(g,function(A){S[A]!==void 0||Eo(S,A)||(C[A]=!1,hr(h))});else if(R===5){if(o(h)&&(hr(h),C.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)C[_]=!1;else for(var M=g.length;M<S.length;M++)C[M]=!0;for(var I=Math.min(S.length,g.length),O=0;O<I;O++)S.hasOwnProperty(O)||(C[O]=!0),C[O]===void 0&&u(S[O])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var w1,En,bc=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",th=typeof Map<"u",rh=typeof Set<"u",_1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",k1=bc?Symbol.for("immer-nothing"):((w1={})["immer-nothing"]=!0,w1),T1=bc?Symbol.for("immer-draftable"):"__$immer_draftable",ye=bc?Symbol.for("immer-state"):"__$immer_state";var oh=""+Object.prototype.constructor,Ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,P1=Object.getOwnPropertyDescriptors||function(t){var e={};return Ao(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},fc={},An={get:function(t,e){if(e===ye)return t;var r=pr(t);if(!Eo(r,e))return function(i,a,s){var c,d=L1(a,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,r,e);var o=r[e];return t.I||!Ct(o)?o:o===sc(t.t,e)?(cc(t),t.o[e]=uc(t.A.h,o,t)):o},has:function(t,e){return e in pr(t)},ownKeys:function(t){return Reflect.ownKeys(pr(t))},set:function(t,e,r){var o=L1(pr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var i=sc(pr(t),e),a=i?.[ye];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(N1(r,i)&&(r!==void 0||Eo(t.t,e)))return!0;cc(t),hr(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 sc(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,cc(t),hr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=pr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){ut(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ut(12)}},Cn={};qr(An,function(t,e){Cn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Cn.deleteProperty=function(t,e){return Cn.set.call(this,t,e,void 0)},Cn.set=function(t,e,r){return An.set.call(this,t[0],e,r,t[0])};var nh=function(){function t(r){var o=this;this.O=_1,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var d=o;return function(R){var _=this;R===void 0&&(R=c);for(var M=arguments.length,I=Array(M>1?M-1:0),O=1;O<M;O++)I[O-1]=arguments[O];return d.produce(R,function(A){var w;return(w=a).call.apply(w,[_,A].concat(I))})}}var u;if(typeof a!="function"&&ut(6),s!==void 0&&typeof s!="function"&&ut(7),Ct(i)){var p=A1(o),h=uc(o,i,void 0),g=!0;try{u=a(h),g=!1}finally{g?yi(p):dc(p)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(R){return ic(p,s),ac(R,p)},function(R){throw yi(p),R}):(ic(p,s),ac(u,p))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===k1&&(u=void 0),o.D&&gc(u,!0),s){var S=[],C=[];It("Patches").M(i,u,S,C),s(S,C)}return u}ut(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var p=arguments.length,h=Array(p>1?p-1:0),g=1;g<p;g++)h[g-1]=arguments[g];return o.produceWithPatches(u,function(S){return i.apply(void 0,[S].concat(h))})};var s,c,d=o.produce(i,a,function(u,p){s=u,c=p});return typeof Promise<"u"&&d instanceof Promise?d.then(function(u){return[u,s,c]}):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ct(r)||ut(8),Qt(r)&&(r=eh(r));var o=A1(this),i=uc(this,r,void 0);return i[ye].C=!0,dc(o),i},e.finishDraft=function(r,o){var i=r&&r[ye],a=i.A;return ic(a,o),ac(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!_1&&ut(20),this.O=r},e.applyPatches=function(r,o){var i;for(i=o.length-1;i>=0;i--){var a=o[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(o=o.slice(i+1));var s=It("Patches").$;return Qt(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),ot=new nh,ih=ot.produce,BS=ot.produceWithPatches.bind(ot),FS=ot.setAutoFreeze.bind(ot),HS=ot.setUseProxies.bind(ot),GS=ot.applyPatches.bind(ot),WS=ot.createDraft.bind(ot),VS=ot.finishDraft.bind(ot),xi=ih;function Yr(t){"@babel/helpers - typeof";return Yr=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},Yr(t)}function z1(t,e){if(Yr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Yr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function D1(t){var e=z1(t,"string");return Yr(e)=="symbol"?e:e+""}function $1(t,e,r){return(e=D1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,o)}return r}function vc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?U1(Object(r),!0).forEach(function(o){$1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Ve(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 B1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),xc=function(){return Math.random().toString(36).substring(7).split("").join(".")},Si={INIT:"@@redux/INIT"+xc(),REPLACE:"@@redux/REPLACE"+xc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xc()}};function ah(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 Sc(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(Sc)(t,e)}if(typeof t!="function")throw new Error(Ve(2));var i=t,a=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function p(){if(d)throw new Error(Ve(3));return a}function h(R){if(typeof R!="function")throw new Error(Ve(4));if(d)throw new Error(Ve(5));var _=!0;return u(),c.push(R),function(){if(_){if(d)throw new Error(Ve(6));_=!1,u();var I=c.indexOf(R);c.splice(I,1),s=null}}}function g(R){if(!ah(R))throw new Error(Ve(7));if(typeof R.type>"u")throw new Error(Ve(8));if(d)throw new Error(Ve(9));try{d=!0,a=i(a,R)}finally{d=!1}for(var _=s=c,M=0;M<_.length;M++){var I=_[M];I()}return R}function S(R){if(typeof R!="function")throw new Error(Ve(10));i=R,g({type:Si.REPLACE})}function C(){var R,_=h;return R={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ve(11));function O(){I.next&&I.next(p())}O();var A=_(O);return{unsubscribe:A}}},R[B1]=function(){return this},R}return g({type:Si.INIT}),o={dispatch:g,subscribe:h,getState:p,replaceReducer:S},o[B1]=C,o}function sh(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(Ve(12));if(typeof r(void 0,{type:Si.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function F1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var i=e[o];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,c;try{sh(r)}catch(d){c=d}return function(u,p){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var g=!1,S={},C=0;C<a.length;C++){var R=a[C],_=r[R],M=u[R],I=_(M,p);if(typeof I>"u"){var O=p&&p.type;throw new Error(Ve(14))}S[R]=I,g=g||I!==M}return g=g||a.length!==Object.keys(u).length,g?S:u}}function Lo(){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,i){return function(){return o(i.apply(void 0,arguments))}})}function H1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var i=o.apply(void 0,arguments),a=function(){throw new Error(Ve(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return a=Lo.apply(void 0,c)(i.dispatch),vc(vc({},i),{},{dispatch:a})}}}function G1(t){var e=function(o){var i=o.dispatch,a=o.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var W1=G1();W1.withExtraArgument=G1;var Cc=W1;var q1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[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)}}(),ch=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(p){return d([u,p])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],i=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ro=function(t,e){for(var r=0,o=e.length,i=t.length;r<o;r++,i++)t[i]=e[r];return t},lh=Object.defineProperty,dh=Object.defineProperties,uh=Object.getOwnPropertyDescriptors,V1=Object.getOwnPropertySymbols,fh=Object.prototype.hasOwnProperty,ph=Object.prototype.propertyIsEnumerable,j1=function(t,e,r){return e in t?lh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},mr=function(t,e){for(var r in e||(e={}))fh.call(e,r)&&j1(t,r,e[r]);if(V1)for(var o=0,i=V1(e);o<i.length;o++){var r=i[o];ph.call(e,r)&&j1(t,r,e[r])}return t},Ec=function(t,e){return dh(t,uh(e))},hh=function(t,e,r){return new Promise(function(o,i){var a=function(d){try{c(r.next(d))}catch(u){i(u)}},s=function(d){try{c(r.throw(d))}catch(u){i(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};c((r=r.apply(t,e)).next())})};var mh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lo:Lo.apply(null,arguments)},lC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function gh(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 yh=function(t){q1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}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,Ro([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ro([void 0],r.concat(this))))},e}(Array),bh=function(t){q1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}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,Ro([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ro([void 0],r.concat(this))))},e}(Array);function Lc(t){return Ct(t)?xi(t,function(){}):t}function vh(t){return typeof t=="boolean"}function xh(){return function(e){return Sh(e)}}function Sh(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,i=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,c=new yh;if(r&&(vh(r)?c.push(Cc):c.push(Cc.withExtraArgument(r.extraArgument))),0){if(i)var d;if(s)var u}return c}var Ac=!0;function Y1(t){var e=xh(),r=t||{},o=r.reducer,i=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,p=u===void 0?void 0:u,h=r.enhancers,g=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(gh(i))S=F1(i);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 C=s;if(typeof C=="function"&&(C=C(e),!Ac&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ac&&C.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=H1.apply(void 0,C),_=Lo;d&&(_=mh(mr({trace:!Ac},typeof d=="object"&&d)));var M=new bh(R),I=M;Array.isArray(g)?I=Ro([R],g):typeof g=="function"&&(I=g(M));var O=_.apply(void 0,I);return Sc(S,p,O)}function gr(t,e){function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return mr(mr({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 X1(t){var e={},r=[],o,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return o=a,i}};return t(i),[e,r,o]}function Ch(t){return typeof t=="function"}function Eh(t,e,r,o){r===void 0&&(r=[]);var i=typeof e=="function"?X1(e):[e,r,o],a=i[0],s=i[1],c=i[2],d;if(Ch(t))d=function(){return Lc(t())};else{var u=Lc(t);d=function(){return u}}function p(h,g){h===void 0&&(h=d());var S=Ro([a[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(Qt(C)){var _=C,M=R(_,g);return M===void 0?C:M}else{if(Ct(C))return xi(C,function(I){return R(I,g)});var M=R(C,g);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},h)}return p.getInitialState=d,p}function Ah(t,e){return t+"/"+e}function Q1(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:Lc(t.initialState),o=t.reducers||{},i=Object.keys(o),a={},s={},c={};i.forEach(function(p){var h=o[p],g=Ah(e,p),S,C;"reducer"in h?(S=h.reducer,C=h.prepare):S=h,a[p]=S,s[g]=S,c[p]=C?gr(g,C):gr(g)});function d(){var p=typeof t.extraReducers=="function"?X1(t.extraReducers):[t.extraReducers],h=p[0],g=h===void 0?{}:h,S=p[1],C=S===void 0?[]:S,R=p[2],_=R===void 0?void 0:R,M=mr(mr({},g),s);return Eh(r,function(I){for(var O in M)I.addCase(O,M[O]);for(var A=0,w=C;A<w.length;A++){var U=w[A];I.addMatcher(U.matcher,U.reducer)}_&&I.addDefaultCase(_)})}var u;return{name:e,reducer:function(p,h){return u||(u=d()),u(p,h)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Oh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lh=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Oh[Math.random()*64|0];return e},Rh=["name","message","stack","code"],Oc=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),K1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),wh=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Rh;r<o.length;r++){var i=o[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},pC=function(){function t(e,r,o){var i=gr(e+"/fulfilled",function(p,h,g,S){return{payload:p,meta:Ec(mr({},S||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),a=gr(e+"/pending",function(p,h,g){return{payload:void 0,meta:Ec(mr({},g||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),s=gr(e+"/rejected",function(p,h,g,S,C){return{payload:S,error:(o&&o.serializeError||wh)(p||"Rejected"),meta:Ec(mr({},C||{}),{arg:g,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p}();function u(p){return function(h,g,S){var C=o?.idGenerator?o.idGenerator(p):Lh(),R=new d,_,M=!1;function I(A){_=A,R.abort()}var O=function(){return hh(this,null,function(){var A,w,U,K,te,J,H;return ch(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),K=(A=o?.condition)==null?void 0:A.call(o,p,{getState:g,extra:S}),Th(K)?[4,K]:[3,2];case 1:K=v.sent(),v.label=2;case 2:if(K===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,te=new Promise(function(L,B){return R.signal.addEventListener("abort",function(){return B({name:"AbortError",message:_||"Aborted"})})}),h(a(C,p,(w=o?.getPendingMeta)==null?void 0:w.call(o,{requestId:C,arg:p},{getState:g,extra:S}))),[4,Promise.race([te,Promise.resolve(r(p,{dispatch:h,getState:g,extra:S,requestId:C,signal:R.signal,abort:I,rejectWithValue:function(L,B){return new Oc(L,B)},fulfillWithValue:function(L,B){return new K1(L,B)}})).then(function(L){if(L instanceof Oc)throw L;return L instanceof K1?i(L.payload,C,p,L.meta):i(L,C,p)})])];case 3:return U=v.sent(),[3,5];case 4:return J=v.sent(),U=J instanceof Oc?s(null,C,p,J.payload,J.meta):s(J,C,p),[3,5];case 5:return H=o&&!o.dispatchConditionRejection&&s.match(U)&&U.meta.condition,H||h(U),[2,U]}})})}();return Object.assign(O,{abort:I,requestId:C,arg:p,unwrap:function(){return O.then(_h)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function _h(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Th(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var J1="listener",e2="completed",t2="cancelled",hC="task-"+t2,mC="task-"+e2,gC=J1+"-"+t2,yC=J1+"-"+e2;var Rc="listenerMiddleware";var bC=gr(Rc+"/add"),vC=gr(Rc+"/removeAll"),xC=gr(Rc+"/remove");var Z1,SC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Z1||(Z1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Mh=function(t){return function(e){setTimeout(e,t)}},CC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Mh(10);I1();window.ftReduxStores||(window.ftReduxStores={});var Jt=class t extends Kt{static get(e){var r;let o=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(Co(a))return a;if(i==null)return;let s=Q1({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=Y1({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let p=Dr(s.getInitialState());for(let h of u.keeping)p[h]=(d??p)[h];return p}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new xn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let d=s,u=a[d];return u?(...p)=>{let h=u(...p.map(i));return this.reduxStore.dispatch(h),h}:p=>{this.setState({[d]:i(p)})}}}),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 Nh(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Co(e)&&e.clear()}var Ci=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);jt(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 Ih(t,e,r){return new Ci(t,e,r).watch()}var wc=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 Nc={};Q(Nc,{scrollHelper:()=>kh});var Tc,Ei=new Map,Mc=class{lock(e,r){if(r){let o=Ei.get(r);if(o==null||o===e)return Ei.set(r,e),r}}release(e,r){r&&Ei.get(r)===e&&Ei.delete(r)}findFirstScrollableParent(e){var r;let o,i;for(let a of es(e)){let s=a,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&i==null&&(i=s)}return(r=o??i)!==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,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return a+((i=r?.offsetTop)!==null&&i!==void 0?i: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 i=this.getAbsoluteScrollOffset(o,e),a=i-o.clientHeight+e.clientHeight,s=i,c=zr(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,c)*(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=(Tc=window.FluidTopicsScrollHelper)!==null&&Tc!==void 0?Tc:new Mc;var kh=window.FluidTopicsScrollHelper;var kc={};Q(kc,{SearchPlaceConverter:()=>Mo,SearchPlaceQueryParams:()=>ae,isSearchPlaceQueryParams:()=>$2,serializeRequest:()=>$h});var zh=fp(o2(),1);var n2;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(n2||(n2={}));var i2;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(i2||(i2={}));var a2;(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"})(a2||(a2={}));var s2;(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"})(s2||(s2={}));var c2;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(c2||(c2={}));var l2;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(l2||(l2={}));var d2;(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"})(d2||(d2={}));var u2;(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"})(u2||(u2={}));var f2;(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"})(f2||(f2={}));var p2;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(p2||(p2={}));var h2;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(h2||(h2={}));var m2;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(m2||(m2={}));var _e;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(_e||(_e={}));var g2;(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"})(g2||(g2={}));var _o;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_o||(_o={}));var y2;(function(t){t.ASC="ASC",t.DESC="DESC"})(y2||(y2={}));var b2;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(b2||(b2={}));var Ic;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ic||(Ic={}));var L2=t=>Object.keys(Ic).includes(t);var v2;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(v2||(v2={}));var x2;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(x2||(x2={}));var S2;(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"})(S2||(S2={}));var To;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(To||(To={}));var R2=t=>Object.keys(To).includes(t);var C2;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(C2||(C2={}));var E2;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(E2||(E2={}));var A2;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(A2||(A2={}));var pe;(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"})(pe||(pe={}));var ft;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ft||(ft={}));var O2;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(O2||(O2={}));var w2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(w2||(w2={}));var _2;(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"})(_2||(_2={}));var T2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(T2||(T2={}));var M2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(M2||(M2={}));var N2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(N2||(N2={}));var I2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(I2||(I2={}));var k2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(k2||(k2={}));var P2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(P2||(P2={}));var Ph={[pe.PERSONAL_BOOK_SHARE_USER]:[pe.PERSONAL_BOOK_USER],[pe.HTML_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.PDF_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.KHUB_ADMIN]:[pe.CONTENT_PUBLISHER],[pe.ADMIN]:[pe.KHUB_ADMIN,pe.USERS_ADMIN,pe.PORTAL_ADMIN,pe.BEHAVIOR_DATA_USER],[pe.GENERATIVE_AI_EXPORT_USER]:[pe.GENERATIVE_AI_USER]};function z2(t,e){return t===e||(Ph[t]??[]).some(r=>z2(r,e))}function er(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=>z2(o,e))}function Dh(t){return`"${t}"`}function D2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function $h(t,e){return new Mo(t).serialize(e)}var ae;(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"})(ae||(ae={}));var Uh=new Set(Object.values(ae));function $2(t){return Uh.has(t)}var Mo=class{constructor(e,r=20,o=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=i,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,i=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var o,i,a,s,c,d,u,p,h,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ae.LOCALE,e.contentLocale):C.append(ae.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ae.QUERY,e.query);let R=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(A=>A.valueFilter&&!A.valueFilter.negative))!==null&&a!==void 0?a:[];if(R.length>0){let A=R.map(w=>{var U,K;let te=((K=(U=w.valueFilter)===null||U===void 0?void 0:U.values)!==null&&K!==void 0?K:[]).map(J=>this.escapeFilters(J)).map(J=>Dh(D2(J))).join("_");return`${w.key}~${te}`}).join("*");C.append(ae.VALUE_FILTERS,A)}let _=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(A=>A.dateFilter))!==null&&c!==void 0?c:[];if(_.length>0){let A=_.map(w=>{var U;return`${w.key}~${(U=w.dateFilter)===null||U===void 0?void 0:U.type.toLowerCase()}`}).join("*");C.append(ae.DATE_FILTERS,A)}let M=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(A=>A.rangeFilter))!==null&&u!==void 0?u:[];if(M.length>0){let A=M.map(w=>{var U,K;return`${w.key}~${(U=w.rangeFilter)===null||U===void 0?void 0:U.from}_${(K=w.rangeFilter)===null||K===void 0?void 0:K.to}`}).join("*");C.append(ae.RANGE_FILTERS,A)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ae.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ae.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ae.SORT,e.sortId),!((p=e.paging)===null||p===void 0)&&p.perPage&&((g=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ae.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ae.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let I=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let A in I)C.append(A,I[A]);let O=new Array;return C.forEach((A,w)=>{O.push(this.encodeQueryString(w)+"="+this.encodeQueryString(A))}),encodeURI(O.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),i=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?i:{...i,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:i.scope}}fromURLSearchParams(e){var r,o,i,a,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(M){console.warn("Could not decode search request query params, fallback on raw value",M)}let d=new URLSearchParams(e),u=d.get(ae.LOCALE)==="all"?void 0:d.get(ae.LOCALE),p=((r=d.get(ae.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(ae.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(i=d.get(ae.SCOPE))!==null&&i!==void 0?i:"default",S=+((a=d.get(ae.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),C=d.get(ae.KEYWORD_MATCH),R=C?C.toUpperCase()===_o.MANDATORY?_o.MANDATORY:_o.OPTIONAL:void 0,_={};for(let M of d.keys())$2(M)||(_[M]=d.get(M));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ae.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:L2(p)?p:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:zr(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:_}}parseCompatFilters(e){var r,o,i,a,s,c;let d=[];return e.has(ae.FILTERS)&&(d=this.parseValueFilters((r=e.get(ae.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ae.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(ae.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(ae.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(ae.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ae.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(D2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:To[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,i]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replaceAll(o,i);return e}unescapeFilterValue(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replace(i,r);return e}parseLegacyPeriodFilter(e){if(R2(e))return[{key:"ft:lastEdition",dateFilter:{type:To[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:i}}]}return[]}};var zc={};Q(zc,{toFtFormComponent:()=>Xr});var Pc=Symbol("elementInternals"),Xr=Ee(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Pc].form}constructor(...o){super(o),this[Pc]=this.attachInternals()}setFormValue(o){this[Pc].setFormValue(o)}}return e});var Dc={};Q(Dc,{DateFormatter:()=>Qr});var Qr=class{static format(e,r,o,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,i)):this.getIntlDateTime(e,r,o,i)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,i){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(a);if(!i)return s;let c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Uc={};Q(Uc,{ALL_KEYS_VALUE:()=>$c,SameWindowStorageEvent:()=>No});var $c="__all__",No=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==$c}};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 No(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 No(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new No($c))}});var Fc={};Q(Fc,{FocusMainContentEvent:()=>Bc});var Bc=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var U2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Bh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function Fh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Bh);document.addEventListener("click",Fh);var B2=$`
|
|
48
|
+
`;var C1={};var nc={};Q(nc,{ParametrizedLabelResolver:()=>bn});var bn=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,i;e=this.resolvePluralKey(e,r);let a=(i=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let i=`${String(e)}[\\=${o}]`;if(i in this.labels||i in this.defaultLabels)return i}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return o(document.documentElement.lang)}catch{return o()}}};var _c={};Q(_c,{FtCommandQueue:()=>xn,FtLitElementRedux:()=>Xt,FtReduxStore:()=>Jt,FtStateManager:()=>wc,ReduxWatcher:()=>Ci,clearAllStores:()=>Nh,isFtReduxStore:()=>Co,redux:()=>ce,reduxEventListener:()=>vn,reduxReactive:()=>q4,watch:()=>Ih,withRedux:()=>E1});var q4=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},ce=t=>{let e=t??{};return(r,o)=>{var i;let a={hasChanged:jt,attribute:!1,...e};b(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(i=e.selector)!==null&&i!==void 0?i:c=>c[o],store:e.store})}},vn=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var xn=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 Co(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Sn=Symbol("internalReduxEventsUnsubscribers"),fr=Symbol("internalStoresUnsubscribers"),Zr=Symbol("internalStores"),E1=Ee(Symbol("withRedux"),function(t){var e,r,o;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Zr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Zr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Zr].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Zr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Zr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Zr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[fr].has(s.store):this[fr].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[fr].set(s,c.subscribe(()=>this.updateFromStores())),this[Sn].set(s,[]),Co(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,p)=>{if(typeof this[p]=="function"&&(!u.store||c.name===u.store)){let h=g=>this[p](g);c.addEventListener(u.eventName,h),this[Sn].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[fr].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[fr].has(s)&&this[fr].get(s)(),this[fr].delete(s),(c=this[Sn].get(s))===null||c===void 0||c.forEach(d=>d()),this[Sn].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=fr,r=Zr,o=Sn,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Xt=class extends E1(Z){};function ut(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 i,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 Qt(t){return!!t&&!!t[ye]}function Ct(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 i=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===oh}(t)||Array.isArray(t)||!!t[T1]||!!(!((e=t.constructor)===null||e===void 0)&&e[T1])||pc(t)||hc(t))}function qr(t,e,r){r===void 0&&(r=!1),Oo(t)===0?(r?Object.keys:Ao)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,i){return e(i,o,t)})}function Oo(t){var e=t[ye];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:pc(t)?2:hc(t)?3:0}function Eo(t,e){return Oo(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Y4(t,e){return Oo(t)===2?t.get(e):t[e]}function M1(t,e,r){var o=Oo(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function N1(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function pc(t){return th&&t instanceof Map}function hc(t){return rh&&t instanceof Set}function pr(t){return t.o||t.t}function mc(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=P1(t);delete e[ye];for(var r=Ao(e),o=0;o<r.length;o++){var i=r[o],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function gc(t,e){return e===void 0&&(e=!1),yc(t)||Qt(t)||!Ct(t)||(Oo(t)>1&&(t.set=t.add=t.clear=t.delete=X4),Object.freeze(t),e&&qr(t,function(r,o){return gc(o,!0)},!0)),t}function X4(){ut(2)}function yc(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function It(t){var e=fc[t];return e||ut(18,t),e}function Q4(t,e){fc[t]||(fc[t]=e)}function lc(){return En}function ic(t,e){e&&(It("Patches"),t.u=[],t.s=[],t.v=e)}function yi(t){dc(t),t.p.forEach(J4),t.p=null}function dc(t){t===En&&(En=t.l)}function A1(t){return En={p:[],l:En,h:t,m:!0,_:0}}function J4(t){var e=t[ye];e.i===0||e.i===1?e.j():e.g=!0}function ac(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||It("ES5").S(e,t,o),o?(r[ye].P&&(yi(e),ut(4)),Ct(t)&&(t=bi(e,t),e.l||vi(e,t)),e.u&&It("Patches").M(r[ye].t,t,e.u,e.s)):t=bi(e,r,[]),yi(e),e.u&&e.v(e.u,e.s),t!==k1?t:void 0}function bi(t,e,r){if(yc(e))return e;var o=e[ye];if(!o)return qr(e,function(c,d){return O1(t,o,e,c,d,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 i=o.i===4||o.i===5?o.o=mc(o.k):o.o,a=i,s=!1;o.i===3&&(a=new Set(i),i.clear(),s=!0),qr(a,function(c,d){return O1(t,o,i,c,d,r,s)}),vi(t,i,!1),r&&t.u&&It("Patches").N(o,r,t.u,t.s)}return o.o}function O1(t,e,r,o,i,a,s){if(Qt(i)){var c=bi(t,i,a&&e&&e.i!==3&&!Eo(e.R,o)?a.concat(o):void 0);if(M1(r,o,c),!Qt(c))return;t.m=!1}else s&&r.add(i);if(Ct(i)&&!yc(i)){if(!t.h.D&&t._<1)return;bi(t,i),e&&e.A.l||vi(t,i)}}function vi(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&gc(e,r)}function sc(t,e){var r=t[ye];return(r?pr(r):t)[e]}function L1(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 hr(t){t.P||(t.P=!0,t.l&&hr(t.l))}function cc(t){t.o||(t.o=mc(t.t))}function uc(t,e,r){var o=pc(e)?It("MapSet").F(e,r):hc(e)?It("MapSet").T(e,r):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:lc(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},d=c,u=An;s&&(d=[c],u=Cn);var p=Proxy.revocable(d,u),h=p.revoke,g=p.proxy;return c.k=g,c.j=h,g}(e,r):It("ES5").J(e,r);return(r?r.A:lc()).p.push(o),o}function eh(t){return Qt(t)||ut(22,t),function e(r){if(!Ct(r))return r;var o,i=r[ye],a=Oo(r);if(i){if(!i.P&&(i.i<4||!It("ES5").K(i)))return i.t;i.I=!0,o=R1(r,a),i.I=!1}else o=R1(r,a);return qr(o,function(s,c){i&&Y4(i.t,s)===c||M1(o,s,e(c))}),a===3?new Set(o):o}(t)}function R1(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return mc(t)}function I1(){function t(s,c){var d=a[s];return d?d.enumerable=c:a[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[ye];return An.get(u,s)},set:function(u){var p=this[ye];An.set(p,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][ye];if(!d.P)switch(d.i){case 5:o(d)&&hr(d);break;case 4:r(d)&&hr(d)}}}function r(s){for(var c=s.t,d=s.k,u=Ao(d),p=u.length-1;p>=0;p--){var h=u[p];if(h!==ye){var g=c[h];if(g===void 0&&!Eo(c,h))return!0;var S=d[h],C=S&&S[ye];if(C?C.t!==g:!N1(S,g))return!0}}var R=!!c[ye];return u.length!==Ao(c).length+(R?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&ut(3,JSON.stringify(pr(s)))}var a={};Q4("ES5",{J:function(s,c){var d=Array.isArray(s),u=function(h,g){if(h){for(var S=Array(g.length),C=0;C<g.length;C++)Object.defineProperty(S,""+C,t(C,!0));return S}var R=P1(g);delete R[ye];for(var _=Ao(R),M=0;M<_.length;M++){var I=_[M];R[I]=t(I,h||!!R[I].enumerable)}return Object.create(Object.getPrototypeOf(g),R)}(d,s),p={i:d?5:4,A:c?c.A:lc(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ye,{value:p,writable:!0}),u},S:function(s,c,d){d?Qt(c)&&c[ye].A===s&&e(s.p):(s.u&&function u(p){if(p&&typeof p=="object"){var h=p[ye];if(h){var g=h.t,S=h.k,C=h.R,R=h.i;if(R===4)qr(S,function(A){A!==ye&&(g[A]!==void 0||Eo(g,A)?C[A]||u(S[A]):(C[A]=!0,hr(h)))}),qr(g,function(A){S[A]!==void 0||Eo(S,A)||(C[A]=!1,hr(h))});else if(R===5){if(o(h)&&(hr(h),C.length=!0),S.length<g.length)for(var _=S.length;_<g.length;_++)C[_]=!1;else for(var M=g.length;M<S.length;M++)C[M]=!0;for(var I=Math.min(S.length,g.length),O=0;O<I;O++)S.hasOwnProperty(O)||(C[O]=!0),C[O]===void 0&&u(S[O])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var w1,En,bc=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",th=typeof Map<"u",rh=typeof Set<"u",_1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",k1=bc?Symbol.for("immer-nothing"):((w1={})["immer-nothing"]=!0,w1),T1=bc?Symbol.for("immer-draftable"):"__$immer_draftable",ye=bc?Symbol.for("immer-state"):"__$immer_state";var oh=""+Object.prototype.constructor,Ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,P1=Object.getOwnPropertyDescriptors||function(t){var e={};return Ao(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},fc={},An={get:function(t,e){if(e===ye)return t;var r=pr(t);if(!Eo(r,e))return function(i,a,s){var c,d=L1(a,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,r,e);var o=r[e];return t.I||!Ct(o)?o:o===sc(t.t,e)?(cc(t),t.o[e]=uc(t.A.h,o,t)):o},has:function(t,e){return e in pr(t)},ownKeys:function(t){return Reflect.ownKeys(pr(t))},set:function(t,e,r){var o=L1(pr(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var i=sc(pr(t),e),a=i?.[ye];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(N1(r,i)&&(r!==void 0||Eo(t.t,e)))return!0;cc(t),hr(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 sc(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,cc(t),hr(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=pr(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){ut(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){ut(12)}},Cn={};qr(An,function(t,e){Cn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Cn.deleteProperty=function(t,e){return Cn.set.call(this,t,e,void 0)},Cn.set=function(t,e,r){return An.set.call(this,t[0],e,r,t[0])};var nh=function(){function t(r){var o=this;this.O=_1,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var d=o;return function(R){var _=this;R===void 0&&(R=c);for(var M=arguments.length,I=Array(M>1?M-1:0),O=1;O<M;O++)I[O-1]=arguments[O];return d.produce(R,function(A){var w;return(w=a).call.apply(w,[_,A].concat(I))})}}var u;if(typeof a!="function"&&ut(6),s!==void 0&&typeof s!="function"&&ut(7),Ct(i)){var p=A1(o),h=uc(o,i,void 0),g=!0;try{u=a(h),g=!1}finally{g?yi(p):dc(p)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(R){return ic(p,s),ac(R,p)},function(R){throw yi(p),R}):(ic(p,s),ac(u,p))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===k1&&(u=void 0),o.D&&gc(u,!0),s){var S=[],C=[];It("Patches").M(i,u,S,C),s(S,C)}return u}ut(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var p=arguments.length,h=Array(p>1?p-1:0),g=1;g<p;g++)h[g-1]=arguments[g];return o.produceWithPatches(u,function(S){return i.apply(void 0,[S].concat(h))})};var s,c,d=o.produce(i,a,function(u,p){s=u,c=p});return typeof Promise<"u"&&d instanceof Promise?d.then(function(u){return[u,s,c]}):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ct(r)||ut(8),Qt(r)&&(r=eh(r));var o=A1(this),i=uc(this,r,void 0);return i[ye].C=!0,dc(o),i},e.finishDraft=function(r,o){var i=r&&r[ye],a=i.A;return ic(a,o),ac(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!_1&&ut(20),this.O=r},e.applyPatches=function(r,o){var i;for(i=o.length-1;i>=0;i--){var a=o[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(o=o.slice(i+1));var s=It("Patches").$;return Qt(r)?s(r,o):this.produce(r,function(c){return s(c,o)})},t}(),ot=new nh,ih=ot.produce,BS=ot.produceWithPatches.bind(ot),FS=ot.setAutoFreeze.bind(ot),HS=ot.setUseProxies.bind(ot),GS=ot.applyPatches.bind(ot),WS=ot.createDraft.bind(ot),VS=ot.finishDraft.bind(ot),xi=ih;function Yr(t){"@babel/helpers - typeof";return Yr=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},Yr(t)}function z1(t,e){if(Yr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Yr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function D1(t){var e=z1(t,"string");return Yr(e)=="symbol"?e:e+""}function $1(t,e,r){return(e=D1(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,o)}return r}function vc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?U1(Object(r),!0).forEach(function(o){$1(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U1(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Ve(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 B1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),xc=function(){return Math.random().toString(36).substring(7).split("").join(".")},Si={INIT:"@@redux/INIT"+xc(),REPLACE:"@@redux/REPLACE"+xc(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+xc()}};function ah(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 Sc(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ve(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ve(1));return r(Sc)(t,e)}if(typeof t!="function")throw new Error(Ve(2));var i=t,a=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function p(){if(d)throw new Error(Ve(3));return a}function h(R){if(typeof R!="function")throw new Error(Ve(4));if(d)throw new Error(Ve(5));var _=!0;return u(),c.push(R),function(){if(_){if(d)throw new Error(Ve(6));_=!1,u();var I=c.indexOf(R);c.splice(I,1),s=null}}}function g(R){if(!ah(R))throw new Error(Ve(7));if(typeof R.type>"u")throw new Error(Ve(8));if(d)throw new Error(Ve(9));try{d=!0,a=i(a,R)}finally{d=!1}for(var _=s=c,M=0;M<_.length;M++){var I=_[M];I()}return R}function S(R){if(typeof R!="function")throw new Error(Ve(10));i=R,g({type:Si.REPLACE})}function C(){var R,_=h;return R={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ve(11));function O(){I.next&&I.next(p())}O();var A=_(O);return{unsubscribe:A}}},R[B1]=function(){return this},R}return g({type:Si.INIT}),o={dispatch:g,subscribe:h,getState:p,replaceReducer:S},o[B1]=C,o}function sh(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(Ve(12));if(typeof r(void 0,{type:Si.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ve(13))})}function F1(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var i=e[o];typeof t[i]=="function"&&(r[i]=t[i])}var a=Object.keys(r),s,c;try{sh(r)}catch(d){c=d}return function(u,p){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var g=!1,S={},C=0;C<a.length;C++){var R=a[C],_=r[R],M=u[R],I=_(M,p);if(typeof I>"u"){var O=p&&p.type;throw new Error(Ve(14))}S[R]=I,g=g||I!==M}return g=g||a.length!==Object.keys(u).length,g?S:u}}function Lo(){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,i){return function(){return o(i.apply(void 0,arguments))}})}function H1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var i=o.apply(void 0,arguments),a=function(){throw new Error(Ve(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return a=Lo.apply(void 0,c)(i.dispatch),vc(vc({},i),{},{dispatch:a})}}}function G1(t){var e=function(o){var i=o.dispatch,a=o.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var W1=G1();W1.withExtraArgument=G1;var Cc=W1;var q1=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(o[a]=i[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)}}(),ch=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(p){return d([u,p])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],i=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Ro=function(t,e){for(var r=0,o=e.length,i=t.length;r<o;r++,i++)t[i]=e[r];return t},lh=Object.defineProperty,dh=Object.defineProperties,uh=Object.getOwnPropertyDescriptors,V1=Object.getOwnPropertySymbols,fh=Object.prototype.hasOwnProperty,ph=Object.prototype.propertyIsEnumerable,j1=function(t,e,r){return e in t?lh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},mr=function(t,e){for(var r in e||(e={}))fh.call(e,r)&&j1(t,r,e[r]);if(V1)for(var o=0,i=V1(e);o<i.length;o++){var r=i[o];ph.call(e,r)&&j1(t,r,e[r])}return t},Ec=function(t,e){return dh(t,uh(e))},hh=function(t,e,r){return new Promise(function(o,i){var a=function(d){try{c(r.next(d))}catch(u){i(u)}},s=function(d){try{c(r.throw(d))}catch(u){i(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};c((r=r.apply(t,e)).next())})};var mh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lo:Lo.apply(null,arguments)},lC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function gh(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 yh=function(t){q1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}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,Ro([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ro([void 0],r.concat(this))))},e}(Array),bh=function(t){q1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}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,Ro([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ro([void 0],r.concat(this))))},e}(Array);function Lc(t){return Ct(t)?xi(t,function(){}):t}function vh(t){return typeof t=="boolean"}function xh(){return function(e){return Sh(e)}}function Sh(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,i=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,c=new yh;if(r&&(vh(r)?c.push(Cc):c.push(Cc.withExtraArgument(r.extraArgument))),0){if(i)var d;if(s)var u}return c}var Ac=!0;function Y1(t){var e=xh(),r=t||{},o=r.reducer,i=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,p=u===void 0?void 0:u,h=r.enhancers,g=h===void 0?void 0:h,S;if(typeof i=="function")S=i;else if(gh(i))S=F1(i);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 C=s;if(typeof C=="function"&&(C=C(e),!Ac&&!Array.isArray(C)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Ac&&C.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=H1.apply(void 0,C),_=Lo;d&&(_=mh(mr({trace:!Ac},typeof d=="object"&&d)));var M=new bh(R),I=M;Array.isArray(g)?I=Ro([R],g):typeof g=="function"&&(I=g(M));var O=_.apply(void 0,I);return Sc(S,p,O)}function gr(t,e){function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return mr(mr({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 X1(t){var e={},r=[],o,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return o=a,i}};return t(i),[e,r,o]}function Ch(t){return typeof t=="function"}function Eh(t,e,r,o){r===void 0&&(r=[]);var i=typeof e=="function"?X1(e):[e,r,o],a=i[0],s=i[1],c=i[2],d;if(Ch(t))d=function(){return Lc(t())};else{var u=Lc(t);d=function(){return u}}function p(h,g){h===void 0&&(h=d());var S=Ro([a[g.type]],s.filter(function(C){var R=C.matcher;return R(g)}).map(function(C){var R=C.reducer;return R}));return S.filter(function(C){return!!C}).length===0&&(S=[c]),S.reduce(function(C,R){if(R)if(Qt(C)){var _=C,M=R(_,g);return M===void 0?C:M}else{if(Ct(C))return xi(C,function(I){return R(I,g)});var M=R(C,g);if(M===void 0){if(C===null)return C;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}return C},h)}return p.getInitialState=d,p}function Ah(t,e){return t+"/"+e}function Q1(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:Lc(t.initialState),o=t.reducers||{},i=Object.keys(o),a={},s={},c={};i.forEach(function(p){var h=o[p],g=Ah(e,p),S,C;"reducer"in h?(S=h.reducer,C=h.prepare):S=h,a[p]=S,s[g]=S,c[p]=C?gr(g,C):gr(g)});function d(){var p=typeof t.extraReducers=="function"?X1(t.extraReducers):[t.extraReducers],h=p[0],g=h===void 0?{}:h,S=p[1],C=S===void 0?[]:S,R=p[2],_=R===void 0?void 0:R,M=mr(mr({},g),s);return Eh(r,function(I){for(var O in M)I.addCase(O,M[O]);for(var A=0,w=C;A<w.length;A++){var U=w[A];I.addMatcher(U.matcher,U.reducer)}_&&I.addDefaultCase(_)})}var u;return{name:e,reducer:function(p,h){return u||(u=d()),u(p,h)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Oh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lh=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Oh[Math.random()*64|0];return e},Rh=["name","message","stack","code"],Oc=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),K1=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),wh=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Rh;r<o.length;r++){var i=o[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},pC=function(){function t(e,r,o){var i=gr(e+"/fulfilled",function(p,h,g,S){return{payload:p,meta:Ec(mr({},S||{}),{arg:g,requestId:h,requestStatus:"fulfilled"})}}),a=gr(e+"/pending",function(p,h,g){return{payload:void 0,meta:Ec(mr({},g||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),s=gr(e+"/rejected",function(p,h,g,S,C){return{payload:S,error:(o&&o.serializeError||wh)(p||"Rejected"),meta:Ec(mr({},C||{}),{arg:g,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p}();function u(p){return function(h,g,S){var C=o?.idGenerator?o.idGenerator(p):Lh(),R=new d,_,M=!1;function I(A){_=A,R.abort()}var O=function(){return hh(this,null,function(){var A,w,U,K,te,J,H;return ch(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),K=(A=o?.condition)==null?void 0:A.call(o,p,{getState:g,extra:S}),Th(K)?[4,K]:[3,2];case 1:K=v.sent(),v.label=2;case 2:if(K===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return M=!0,te=new Promise(function(L,B){return R.signal.addEventListener("abort",function(){return B({name:"AbortError",message:_||"Aborted"})})}),h(a(C,p,(w=o?.getPendingMeta)==null?void 0:w.call(o,{requestId:C,arg:p},{getState:g,extra:S}))),[4,Promise.race([te,Promise.resolve(r(p,{dispatch:h,getState:g,extra:S,requestId:C,signal:R.signal,abort:I,rejectWithValue:function(L,B){return new Oc(L,B)},fulfillWithValue:function(L,B){return new K1(L,B)}})).then(function(L){if(L instanceof Oc)throw L;return L instanceof K1?i(L.payload,C,p,L.meta):i(L,C,p)})])];case 3:return U=v.sent(),[3,5];case 4:return J=v.sent(),U=J instanceof Oc?s(null,C,p,J.payload,J.meta):s(J,C,p),[3,5];case 5:return H=o&&!o.dispatchConditionRejection&&s.match(U)&&U.meta.condition,H||h(U),[2,U]}})})}();return Object.assign(O,{abort:I,requestId:C,arg:p,unwrap:function(){return O.then(_h)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function _h(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Th(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var J1="listener",e2="completed",t2="cancelled",hC="task-"+t2,mC="task-"+e2,gC=J1+"-"+t2,yC=J1+"-"+e2;var Rc="listenerMiddleware";var bC=gr(Rc+"/add"),vC=gr(Rc+"/removeAll"),xC=gr(Rc+"/remove");var Z1,SC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Z1||(Z1=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Mh=function(t){return function(e){setTimeout(e,t)}},CC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Mh(10);I1();window.ftReduxStores||(window.ftReduxStores={});var Jt=class t extends Kt{static get(e){var r;let o=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(Co(a))return a;if(i==null)return;let s=Q1({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=Y1({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let p=Dr(s.getInitialState());for(let h of u.keeping)p[h]=(d??p)[h];return p}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new xn;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let d=s,u=a[d];return u?(...p)=>{let h=u(...p.map(i));return this.reduxStore.dispatch(h),h}:p=>{this.setState({[d]:i(p)})}}}),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 Nh(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Co(e)&&e.clear()}var Ci=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);jt(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 Ih(t,e,r){return new Ci(t,e,r).watch()}var wc=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 Nc={};Q(Nc,{scrollHelper:()=>kh});var Tc,Ei=new Map,Mc=class{lock(e,r){if(r){let o=Ei.get(r);if(o==null||o===e)return Ei.set(r,e),r}}release(e,r){r&&Ei.get(r)===e&&Ei.delete(r)}findFirstScrollableParent(e){var r;let o,i;for(let a of es(e)){let s=a,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&i==null&&(i=s)}return(r=o??i)!==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,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return a+((i=r?.offsetTop)!==null&&i!==void 0?i: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 i=this.getAbsoluteScrollOffset(o,e),a=i-o.clientHeight+e.clientHeight,s=i,c=zr(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,c)*(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=(Tc=window.FluidTopicsScrollHelper)!==null&&Tc!==void 0?Tc:new Mc;var kh=window.FluidTopicsScrollHelper;var kc={};Q(kc,{SearchPlaceConverter:()=>Mo,SearchPlaceQueryParams:()=>ae,isSearchPlaceQueryParams:()=>$2,serializeRequest:()=>$h});var zh=fp(o2(),1);var n2;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(n2||(n2={}));var i2;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(i2||(i2={}));var a2;(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"})(a2||(a2={}));var s2;(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"})(s2||(s2={}));var c2;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(c2||(c2={}));var l2;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(l2||(l2={}));var d2;(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"})(d2||(d2={}));var u2;(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"})(u2||(u2={}));var f2;(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"})(f2||(f2={}));var p2;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(p2||(p2={}));var h2;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(h2||(h2={}));var m2;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(m2||(m2={}));var _e;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(_e||(_e={}));var g2;(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"})(g2||(g2={}));var _o;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(_o||(_o={}));var y2;(function(t){t.ASC="ASC",t.DESC="DESC"})(y2||(y2={}));var b2;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(b2||(b2={}));var Ic;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ic||(Ic={}));var L2=t=>Object.keys(Ic).includes(t);var v2;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(v2||(v2={}));var x2;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(x2||(x2={}));var S2;(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"})(S2||(S2={}));var To;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(To||(To={}));var R2=t=>Object.keys(To).includes(t);var C2;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(C2||(C2={}));var E2;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(E2||(E2={}));var A2;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(A2||(A2={}));var pe;(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"})(pe||(pe={}));var ft;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ft||(ft={}));var O2;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(O2||(O2={}));var w2;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(w2||(w2={}));var _2;(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"})(_2||(_2={}));var T2;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(T2||(T2={}));var M2;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(M2||(M2={}));var N2;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(N2||(N2={}));var I2;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(I2||(I2={}));var k2;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(k2||(k2={}));var P2;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(P2||(P2={}));var Ph={[pe.PERSONAL_BOOK_SHARE_USER]:[pe.PERSONAL_BOOK_USER],[pe.HTML_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.PDF_EXPORT_USER]:[pe.PERSONAL_BOOK_USER],[pe.KHUB_ADMIN]:[pe.CONTENT_PUBLISHER],[pe.ADMIN]:[pe.KHUB_ADMIN,pe.USERS_ADMIN,pe.PORTAL_ADMIN,pe.BEHAVIOR_DATA_USER],[pe.GENERATIVE_AI_EXPORT_USER]:[pe.GENERATIVE_AI_USER]};function z2(t,e){return t===e||(Ph[t]??[]).some(r=>z2(r,e))}function er(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=>z2(o,e))}function Dh(t){return`"${t}"`}function D2(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function $h(t,e){return new Mo(t).serialize(e)}var ae;(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"})(ae||(ae={}));var Uh=new Set(Object.values(ae));function $2(t){return Uh.has(t)}var Mo=class{constructor(e,r=20,o=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=i,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,i=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var o,i,a,s,c,d,u,p,h,g,S;let C=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&C.append(ae.LOCALE,e.contentLocale):C.append(ae.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&C.append(ae.QUERY,e.query);let R=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(A=>A.valueFilter&&!A.valueFilter.negative))!==null&&a!==void 0?a:[];if(R.length>0){let A=R.map(w=>{var U,K;let te=((K=(U=w.valueFilter)===null||U===void 0?void 0:U.values)!==null&&K!==void 0?K:[]).map(J=>this.escapeFilters(J)).map(J=>Dh(D2(J))).join("_");return`${w.key}~${te}`}).join("*");C.append(ae.VALUE_FILTERS,A)}let _=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(A=>A.dateFilter))!==null&&c!==void 0?c:[];if(_.length>0){let A=_.map(w=>{var U;return`${w.key}~${(U=w.dateFilter)===null||U===void 0?void 0:U.type.toLowerCase()}`}).join("*");C.append(ae.DATE_FILTERS,A)}let M=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(A=>A.rangeFilter))!==null&&u!==void 0?u:[];if(M.length>0){let A=M.map(w=>{var U,K;return`${w.key}~${(U=w.rangeFilter)===null||U===void 0?void 0:U.from}_${(K=w.rangeFilter)===null||K===void 0?void 0:K.to}`}).join("*");C.append(ae.RANGE_FILTERS,A)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&C.append(ae.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&C.append(ae.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&C.append(ae.SORT,e.sortId),!((p=e.paging)===null||p===void 0)&&p.perPage&&((g=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&g!==void 0?g:this.defaultPerPage)!=this.defaultPerPage&&C.append(ae.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&C.append(ae.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let I=(S=e.otherQueryParams)!==null&&S!==void 0?S:{};for(let A in I)C.append(A,I[A]);let O=new Array;return C.forEach((A,w)=>{O.push(this.encodeQueryString(w)+"="+this.encodeQueryString(A))}),encodeURI(O.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),i=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?i:{...i,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:i.scope}}fromURLSearchParams(e){var r,o,i,a,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(M){console.warn("Could not decode search request query params, fallback on raw value",M)}let d=new URLSearchParams(e),u=d.get(ae.LOCALE)==="all"?void 0:d.get(ae.LOCALE),p=((r=d.get(ae.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(ae.SORT))===null||o===void 0?void 0:o.toLowerCase(),g=(i=d.get(ae.SCOPE))!==null&&i!==void 0?i:"default",S=+((a=d.get(ae.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),C=d.get(ae.KEYWORD_MATCH),R=C?C.toUpperCase()===_o.MANDATORY?_o.MANDATORY:_o.OPTIONAL:void 0,_={};for(let M of d.keys())$2(M)||(_[M]=d.get(M));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(ae.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[g])!==null&&c!==void 0?c:"DEFAULT",virtualField:L2(p)?p:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:zr(1,isNaN(S)?this.defaultPerPage:S,1e3)},keywordMatch:R,otherQueryParams:_}}parseCompatFilters(e){var r,o,i,a,s,c;let d=[];return e.has(ae.FILTERS)&&(d=this.parseValueFilters((r=e.get(ae.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(ae.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((i=e.get(ae.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(ae.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(ae.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(ae.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(D2).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:To[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,i]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replaceAll(o,i);return e}unescapeFilterValue(e){for(let[r,o,i]of this.filtersEscapeMapping)e=e.replace(i,r);return e}parseLegacyPeriodFilter(e){if(R2(e))return[{key:"ft:lastEdition",dateFilter:{type:To[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:i}}]}return[]}};var zc={};Q(zc,{toFtFormComponent:()=>Xr});var Pc=Symbol("elementInternals"),Xr=Ee(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Pc].form}constructor(...o){super(o),this[Pc]=this.attachInternals()}setFormValue(o){this[Pc].setFormValue(o)}}return e});var Dc={};Q(Dc,{DateFormatter:()=>Qr});var Qr=class{static format(e,r,o,i,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,i,!!a)):this.getIntlDateTime(e,r,o,i,!!a)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,i,a){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:i?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Uc={};Q(Uc,{ALL_KEYS_VALUE:()=>$c,SameWindowStorageEvent:()=>No});var $c="__all__",No=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==$c}};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 No(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 No(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new No($c))}});var Fc={};Q(Fc,{FocusMainContentEvent:()=>Bc});var Bc=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var U2={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Bh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function Fh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Bh);document.addEventListener("click",Fh);var B2=$`
|
|
49
49
|
.sr-only {
|
|
50
50
|
position:absolute;
|
|
51
51
|
left:-10000px;
|
|
@@ -667,7 +667,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
667
667
|
position: relative;
|
|
668
668
|
word-break: break-word;
|
|
669
669
|
}
|
|
670
|
-
`;var Jh="ft-app-info",zt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};zt.eventName="authentication-change";var e3={session:(t,e)=>{rt(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new zt(e.payload)),0))}},P=Jt.get({name:Jh,reducers:e3,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 _i=function(t,e,r,o){var i=arguments.length,a=i<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 c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},vL=Ee(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(P)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>Qr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return _i([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),_i([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),_i([ce({store:P.name,selector:r=>{var o,i;return(i=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),_i([ce({store:P.name})],e.prototype,"uiLocale",void 0),e});var to=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=P.getState(),i=e??o;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let i=P.subscribe(()=>{o=t.get(e),o&&(i(),r(o))})}})}};var Ti=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:to.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):to.await()}};var je=class extends Ti{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(([c],[d])=>c.localeCompare(d)));let i=this.constructor;i.commonCache=(o=i.commonCache)!==null&&o!==void 0?o:new _t,this.cache=e?i.commonCache:new _t}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 Mi=class extends je{async listMySearches(){let{session:e}=P.getState();return er(e,pe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ni=class extends je{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ii=class extends je{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=P.getState().session;return!!e?.sessionAuthenticated}};var ki=class extends je{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=P.getState().session;return!!e?.sessionAuthenticated}};var t3="ft-user-assets",r3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ft).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:i}=e.payload;el(t,r,[...Jc(t,r),i]),yu(t,r,1,o),bu(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;el(t,r,Jc(t,r).map(i=>i.id===o.id?o:i)),bu(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:i}=e.payload;el(t,r,Jc(t,r).filter(a=>a.id!==i)),yu(t,r,-1,o)}},vu={[ft.SEARCHES]:"savedSearches",[ft.BOOKMARKS]:"bookmarks",[ft.BOOKS]:void 0,[ft.COLLECTIONS]:void 0},Jc=(t,e)=>{var r;let o=vu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},el=(t,e,r)=>{let o=vu[e];o&&(t[o]=r)},yu=(t,e,r,o)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===ft.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},bu=(t,e)=>{let r=t.assetLabels.map(i=>i.title),o=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...o)},nt=Jt.get({name:t3,reducers:r3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ft).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),tl=class{constructor(e=new Ii,r=new ki){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ni,this.savedSearchesService=new Mi,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();rt((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(),nt.actions.clearAssetCount(),nt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),nt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),nt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();nt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();nt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&nt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&nt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(nt.getState().assetCounts.bookmarkByMap).length!==0;e===ft.BOOKMARKS&&r&&nt.actions.clearBookmarkCountByMap(),nt.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;nt.actions.bookmarks(r)}}},rl=new tl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=rl);var ol=class{addCommand(e,r=!1){P.commands.add(e,r)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ol;var xu,Ho=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},o3=Symbol("clearAfterUnitTest"),Pi=class extends ci(je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[xu]=()=>{this.defaultMessages={},this.cache=new _t,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.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 i={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};rt(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,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 i;let a=e.toLowerCase(),s=this.resolveContext(a);return new bn((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},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(i){!(i instanceof Vt)&&r&&console.error(i)}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 i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Ho({loadedContexts:e})),this.dispatchEvent(new Ho({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Ho({loadedContexts:[e]})),this.dispatchEvent(new Ho({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>ii(0).then(()=>o()).catch(()=>null)))}};xu=o3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Go=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var nl=class{highlightHtml(e,r,o){ec(e,r,o)}};window.FluidTopicsHighlightHtmlService=new nl;var il=class{isDate(e){var r,o,i,a;return(a=(i=((o=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var o,i,a;if(e==null)return"";try{return Qr.format(e,(o=r?.locale)!==null&&o!==void 0?o:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!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 il;var _n=class{static get(e,r){var o,i;let a=P.getState(),{lang:s,region:c}=(i=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Mo(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Di=class extends je{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,i])=>Array.isArray(i)?[o,i.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof i=="object"&&i!==null?[o,this.sortEventArrays(i)]:[o,i]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(i=>(console.info(r),console.debug(i),o)),1e3)}};var al=class{urlToSearchRequest(e){return _n.get().parse(e)}searchRequestToUrl(e){return _n.get().serialize(e)}};window.FluidTopicsUrlService=new al;var ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};ro.eventName="change";var sl=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))}},Su=new sl;var $i=class t extends Kt{static build(){return new t(window.history,Su,()=>window.location,!1)}constructor(e,r,o,i){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(i)}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),rt(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ro(this.currentItem())),0)}installProxies(){let e=r=>(o,i,[a,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(i,[u,s,c]),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(ro.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ro.eventName,e)}currentItem(){return Dr(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 Dr(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 Dr(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 i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(i=a),a++;return i}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 i=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=$i.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 Wo=class{constructor(){this.storeListeners=[]}store(e,r){if(this.isAuthenticated())return;let o=JSON.stringify(r);window.localStorage.setItem(e,o),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:o,storageArea:window.localStorage}))}get(e){var r,o;if(!this.isAuthenticated())return(o=JSON.parse((r=window.localStorage.getItem(e))!==null&&r!==void 0?r:"null"))!==null&&o!==void 0?o:void 0}addStoreListener(e,r){let o=i=>{i.key===e()&&!this.isAuthenticated()&&r()};this.storeListeners.push(o),window.addEventListener("storage",o)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var Cu=$`
|
|
670
|
+
`;var Jh="ft-app-info",zt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};zt.eventName="authentication-change";var e3={session:(t,e)=>{rt(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.dispatchEvent(new zt(e.payload)),0))}},P=Jt.get({name:Jh,reducers:e3,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 _i=function(t,e,r,o){var i=arguments.length,a=i<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 c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},vL=Ee(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(P)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===o))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>Qr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return _i([b({type:Boolean})],e.prototype,"useLongDateFormat",void 0),_i([b({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),_i([ce({store:P.name,selector:r=>{var o,i;return(i=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),_i([ce({store:P.name})],e.prototype,"uiLocale",void 0),e});var to=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=P.getState(),i=e??o;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let i=P.subscribe(()=>{o=t.get(e),o&&(i(),r(o))})}})}};var Ti=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:to.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):to.await()}};var je=class extends Ti{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(([c],[d])=>c.localeCompare(d)));let i=this.constructor;i.commonCache=(o=i.commonCache)!==null&&o!==void 0?o:new _t,this.cache=e?i.commonCache:new _t}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 Mi=class extends je{async listMySearches(){let{session:e}=P.getState();return er(e,pe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ni=class extends je{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ii=class extends je{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=P.getState().session;return!!e?.sessionAuthenticated}};var ki=class extends je{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=P.getState().session;return!!e?.sessionAuthenticated}};var t3="ft-user-assets",r3={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ft).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:i}=e.payload;el(t,r,[...Jc(t,r),i]),yu(t,r,1,o),bu(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;el(t,r,Jc(t,r).map(i=>i.id===o.id?o:i)),bu(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:i}=e.payload;el(t,r,Jc(t,r).filter(a=>a.id!==i)),yu(t,r,-1,o)}},vu={[ft.SEARCHES]:"savedSearches",[ft.BOOKMARKS]:"bookmarks",[ft.BOOKS]:void 0,[ft.COLLECTIONS]:void 0},Jc=(t,e)=>{var r;let o=vu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},el=(t,e,r)=>{let o=vu[e];o&&(t[o]=r)},yu=(t,e,r,o)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===ft.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},bu=(t,e)=>{let r=t.assetLabels.map(i=>i.title),o=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...o)},nt=Jt.get({name:t3,reducers:r3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ft).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),tl=class{constructor(e=new Ii,r=new ki){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ni,this.savedSearchesService=new Mi,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=P.getState();rt((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(),nt.actions.clearAssetCount(),nt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),nt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),nt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();nt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();nt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&nt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&nt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(nt.getState().assetCounts.bookmarkByMap).length!==0;e===ft.BOOKMARKS&&r&&nt.actions.clearBookmarkCountByMap(),nt.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;nt.actions.bookmarks(r)}}},rl=new tl;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=rl);var ol=class{addCommand(e,r=!1){P.commands.add(e,r)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ol;var xu,Ho=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},o3=Symbol("clearAfterUnitTest"),Pi=class extends ci(je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[xu]=()=>{this.defaultMessages={},this.cache=new _t,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.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 i={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};rt(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,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 i;let a=e.toLowerCase(),s=this.resolveContext(a);return new bn((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},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(i){!(i instanceof Vt)&&r&&console.error(i)}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 i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Ho({loadedContexts:e})),this.dispatchEvent(new Ho({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Ho({loadedContexts:[e]})),this.dispatchEvent(new Ho({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>ii(0).then(()=>o()).catch(()=>null)))}};xu=o3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Pi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Go=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var nl=class{highlightHtml(e,r,o){ec(e,r,o)}};window.FluidTopicsHighlightHtmlService=new nl;var il=class{isDate(e){var r,o,i,a;return(a=(i=((o=(r=P.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,r){var o,i,a,s;if(e==null)return"";try{return Qr.format(e,(o=r?.locale)!==null&&o!==void 0?o:P.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new il;var _n=class{static get(e,r){var o,i;let a=P.getState(),{lang:s,region:c}=(i=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Mo(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Di=class extends je{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,i])=>Array.isArray(i)?[o,i.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof i=="object"&&i!==null?[o,this.sortEventArrays(i)]:[o,i]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(i=>(console.info(r),console.debug(i),o)),1e3)}};var al=class{urlToSearchRequest(e){return _n.get().parse(e)}searchRequestToUrl(e){return _n.get().serialize(e)}};window.FluidTopicsUrlService=new al;var ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};ro.eventName="change";var sl=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))}},Su=new sl;var $i=class t extends Kt{static build(){return new t(window.history,Su,()=>window.location,!1)}constructor(e,r,o,i){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(i)}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),rt(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ro(this.currentItem())),0)}installProxies(){let e=r=>(o,i,[a,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(i,[u,s,c]),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(ro.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ro.eventName,e)}currentItem(){return Dr(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 Dr(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 Dr(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 i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(i=a),a++;return i}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 i=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=$i.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 Wo=class{constructor(){this.storeListeners=[]}store(e,r){if(this.isAuthenticated())return;let o=JSON.stringify(r);window.localStorage.setItem(e,o),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:o,storageArea:window.localStorage}))}get(e){var r,o;if(!this.isAuthenticated())return(o=JSON.parse((r=window.localStorage.getItem(e))!==null&&r!==void 0?r:"null"))!==null&&o!==void 0?o:void 0}addStoreListener(e,r){let o=i=>{i.key===e()&&!this.isAuthenticated()&&r()};this.storeListeners.push(o),window.addEventListener("storage",o)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=P.getState().session;return!!e?.sessionAuthenticated}};var Cu=$`
|
|
671
671
|
`;function Eu(t,e){let{authenticationRequired:r,session:o}=P.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Me=function(t,e,r,o){var i=arguments.length,a=i<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 c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},me=class extends Z{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=()=>to.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new _t,this.cleanSessionDebouncer=new Se,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return k`
|
|
672
672
|
<slot></slot>
|
|
673
673
|
`}connectedCallback(){super.connectedCallback(),P.addEventListener(zt.eventName,this.reloadConfiguration)}disconnectedCallback(){P.addEventListener(zt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,i,a,s,c,d;super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&P.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Go.addContext(u)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(P.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),P.actions.availableUiLocales((i=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&i!==void 0?i:[]),P.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&P.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&P.actions.availableContentLocales((d=(c=this.availableContentLocales)===null||c===void 0?void 0:c.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",()=>Eu(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};me.elementDefinitions={};me.styles=Cu;Me([b()],me.prototype,"baseUrl",void 0);Me([b()],me.prototype,"apiIntegrationIdentifier",void 0);Me([b()],me.prototype,"apiIntegrationAppVersion",void 0);Me([b()],me.prototype,"uiLocale",void 0);Me([ct(null)],me.prototype,"availableUiLocales",void 0);Me([ct(null)],me.prototype,"metadataConfiguration",void 0);Me([b({type:Boolean})],me.prototype,"editorMode",void 0);Me([b({type:Boolean})],me.prototype,"noCustom",void 0);Me([b({type:Boolean})],me.prototype,"openExternalDocumentInNewTab",void 0);Me([b({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],me.prototype,"noCustomComponent",void 0);Me([b({type:Boolean})],me.prototype,"withManualResources",void 0);Me([b({type:Boolean})],me.prototype,"navigatorOnline",void 0);Me([b({type:Boolean})],me.prototype,"forcedOffline",void 0);Me([b({type:Object})],me.prototype,"apiProvider",void 0);Me([b({type:Boolean})],me.prototype,"authenticationRequired",void 0);Me([ct([])],me.prototype,"messageContexts",void 0);Me([ct(void 0)],me.prototype,"session",void 0);Me([W()],me.prototype,"localesConfiguration",void 0);Me([W()],me.prototype,"availableContentLocales",void 0);X("ft-app-context")(me);var cl=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-]+$/)}},Vo=new cl;var n3=function(t,e,r,o){var i=arguments.length,a=i<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 c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Mn=Symbol("i18nAttributes"),Au=Symbol("i18nListAttributes"),Nn=Symbol("i18nProperties"),Ui=Symbol("i18nContexts"),Tn=Symbol("i18nUnsubs"),Cr=Ee(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?zi:Go}i18n(a){let{context:s,key:c,message:d}=a,{custom:u,args:p,argsProvider:h}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let g=p??(h?h(this):[]);return this.getI18nService(u).resolveMessage(s,c,...g)}return d}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Vo.isI18nKey(a)){let[c,d]=a.split(".");return this.i18n({custom:!0,context:c,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,c,d)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let d=this,u=(p,h,g)=>g?.context&&g.key&&a(p,h,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...p})}:g;(s=this[Mn])===null||s===void 0||s.forEach((p,h)=>d[h]=u(p,h,d[h])),(c=this[Au])===null||c===void 0||c.forEach((p,h)=>{var g;return d[h]=(g=d[h])===null||g===void 0?void 0:g.map(S=>u(p,h,S))})}updateI18nProperties(a){var s;(s=this[Nn])===null||s===void 0||s.forEach((c,d)=>{a(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let d=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[Ui].set(d,{isCustomContext:c}),this[Tn].has(d)||this[Tn].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(a){return this[Ui].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ui].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Tn].forEach(a=>a()),this[Tn].clear()}}return e=Ui,r=Tn,n3([b({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Bi=class extends Cr(Z){},Fi=class extends Cr(Xt){};var ll=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?Vo.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},i3=new ll;var Ou=(t,e)=>(r,o)=>{var i;r.constructor.createProperty(o,{type:Object,hasChanged:jt,converter:Vo,...e}),r[Mn]=(i=r[Mn])!==null&&i!==void 0?i:new Map,r[Mn].set(o,t??{})};var Er=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?zi:Go}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,i)=>{let a=i;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,i)=>(...a)=>this.service.resolveMessage(this.name,i,...a)}),this.rawMessages=new Proxy({},{get:(o,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(o,i)=>()=>i}),this.attributes=new Proxy({},{get:(o,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var Hi=(t,e)=>(r,o)=>{var i,a;r.constructor.createProperty(o,e??{attribute:!1,type:String});let s={...t,key:(i=t.key)!==null&&i!==void 0?i:o};r[Nn]=(a=r[Nn])!==null&&a!==void 0?a:new Map,r[Nn].set(o,s)};var Lu=$`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "Feedback forms for a map and its topics in an integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
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.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "2.0.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.0.12",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "2.0.12",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.0.12",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluid-topics/public-api": "1.0.117"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
|
|
31
31
|
}
|