@fluid-topics/ft-filter 2.2.15 → 2.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-filter.light.js +1 -1
- package/build/ft-filter.min.js +1 -1
- package/package.json +10 -10
package/build/ft-filter.light.js
CHANGED
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
position: relative;
|
|
268
268
|
word-break: break-word;
|
|
269
269
|
}
|
|
270
|
-
`;var oo=["top","right","bottom","left"],so=["start","end"],mn=oo.reduce((e,t)=>e.concat(t,t+"-"+so[0],t+"-"+so[1]),[]),xr=Math.min,st=Math.max,br=Math.round;var ze=e=>({x:e,y:e}),ru={left:"right",right:"left",bottom:"top",top:"bottom"};function ao(e,t,r){return st(e,xr(t,r))}function Jr(e,t){return typeof e=="function"?e(t):e}function Sr(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function yn(e){return e==="x"?"y":"x"}function gn(e){return e==="y"?"height":"width"}function Zr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function vn(e){return yn(Zr(e))}function lo(e,t,r){r===void 0&&(r=!1);let i=ot(e),s=vn(e),n=gn(s),o=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(o=hn(o)),[o,hn(o)]}function co(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function hn(e){let t=Sr(e);return ru[t]+e.slice(t.length)}function iu(e){var t,r,i,s;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(s=e.left)!=null?s:0}}function uo(e){return typeof e!="number"?iu(e):{top:e,right:e,bottom:e,left:e}}function Rt(e){let{x:t,y:r,width:i,height:s}=e;return{width:i,height:s,top:r,left:t,right:t+i,bottom:r+s,x:t,y:r}}function po(e,t,r){let{reference:i,floating:s}=e,n=Zr(t),o=vn(t),a=gn(o),l=Sr(t),c=n==="y",u=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2,y;switch(l){case"top":y={x:u,y:i.y-s.height};break;case"bottom":y={x:u,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:d};break;case"left":y={x:i.x-s.width,y:d};break;default:y={x:i.x,y:i.y}}let x=ot(t);return x&&(y[o]+=p*(x==="end"?1:-1)*(r&&c?-1:1)),y}async function fo(e,t){var r;t===void 0&&(t={});let{x:i,y:s,platform:n,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:y=0}=Jr(t,e),x=uo(y),v=a[p?d==="floating"?"reference":"floating":d],A=Rt(await n.getClippingRect({element:(r=await(n.isElement==null?void 0:n.isElement(v)))==null||r?v:v.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{x:i,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),C=await(n.isElement==null?void 0:n.isElement(b))&&await(n.getScale==null?void 0:n.getScale(b))||{x:1,y:1},T=Rt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:b,strategy:l}):k);return{top:(A.top-T.top+x.top)/C.y,bottom:(T.bottom-A.bottom+x.bottom)/C.y,left:(A.left-T.left+x.left)/C.x,right:(T.right-A.right+x.right)/C.x}}var nu=50,ho=async(e,t,r)=>{let{placement:i="bottom",strategy:s="absolute",middleware:n=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:fo},l=await(o.isRTL==null?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=po(c,i,l),p=i,y=0,x={};for(let E=0;E<n.length;E++){let v=n[E];if(!v)continue;let{name:A,fn:k}=v,{x:b,y:C,data:T,reset:z}=await k({x:u,y:d,initialPlacement:i,placement:p,strategy:s,middlewareData:x,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=C??d,x[A]={...x[A],...T},z&&y<nu&&(y++,typeof z=="object"&&(z.placement&&(p=z.placement),z.rects&&(c=z.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):z.rects),{x:u,y:d}=po(c,p,l)),E=-1)}return{x:u,y:d,placement:p,strategy:s,middlewareData:x}};function su(e,t,r){return(e?[...r.filter(s=>ot(s)===e),...r.filter(s=>ot(s)!==e)]:r.filter(s=>Sr(s)===s)).filter(s=>e?ot(s)===e||(t?co(s)!==s:!1):!0)}var mo=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,s;let{rects:n,middlewareData:o,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=mn,autoAlignment:y=!0,...x}=Jr(e,t),E=d!==void 0||p===mn?su(d||null,y,p):p,v=((r=o.autoPlacement)==null?void 0:r.index)||0,A=E[v];if(A==null)return{};if(a!==A)return{reset:{placement:E[0]}};let k=await l.detectOverflow(t,x),b=lo(A,n,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[k[Sr(A)],k[b[0]],k[b[1]]],T=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:A,overflows:C}],z=E[v+1];if(z)return{data:{index:v+1,overflows:T},reset:{placement:z}};let $=T.map(_e=>{let gt=ot(_e.placement);return[_e.placement,gt&&u?_e.overflows.slice(0,2).reduce((zc,jc)=>zc+jc,0):_e.overflows[0],_e.overflows]}).sort((_e,gt)=>_e[1]-gt[1]),pr=((s=$.filter(_e=>_e[2].slice(0,ot(_e[0])?2:3).every(gt=>gt<=0))[0])==null?void 0:s[0])||$[0][0];return pr!==a?{data:{index:v+1,overflows:T},reset:{placement:pr}}:{}}}};var yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:s,platform:n}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:k=>{let{x:b,y:C}=k;return{x:b,y:C}}},...c}=Jr(e,t),u={x:r,y:i},d=await n.detectOverflow(t,c),p=Zr(s),y=yn(p),x=u[y],E=u[p],v=(k,b)=>ao(b+d[k==="y"?"top":"left"],b,b-d[k==="y"?"bottom":"right"]);o&&(x=v(y,x)),a&&(E=v(p,E));let A=l.fn({...t,[y]:x,[p]:E});return{...A,data:{x:A.x-r,y:A.y-i,enabled:{[y]:o,[p]:a}}}}}};function ei(){return typeof window<"u"}function Lt(e){return vo(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Je(e){var t;return(t=(vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vo(e){return ei()?e instanceof Node||e instanceof me(e).Node:!1}function Ne(e){return ei()?e instanceof Element||e instanceof me(e).Element:!1}function Ze(e){return ei()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function go(e){return!ei()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}function Er(e){let{overflow:t,overflowX:r,overflowY:i,display:s}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&s!=="inline"&&s!=="contents"}function xo(e){return/^(table|td|th)$/.test(Lt(e))}function Ar(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var ou=/transform|translate|scale|rotate|perspective|filter/,au=/paint|layout|strict|content/,kt=e=>!!e&&e!=="none",xn;function Jt(e){let t=Ne(e)?Pe(e):e;return kt(t.transform)||kt(t.translate)||kt(t.scale)||kt(t.rotate)||kt(t.perspective)||!ti()&&(kt(t.backdropFilter)||kt(t.filter))||ou.test(t.willChange||"")||au.test(t.contain||"")}function bo(e){let t=at(e);for(;Ze(t)&&!Zt(t);){if(Jt(t))return t;if(Ar(t))return null;t=at(t)}return null}function ti(){return xn==null&&(xn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xn}function Zt(e){return/^(html|body|#document)$/.test(Lt(e))}function Pe(e){return me(e).getComputedStyle(e)}function _r(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function at(e){if(Lt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||go(e)&&e.host||Je(e);return go(t)?t.host:t}function So(e){let t=at(e);return Zt(t)?(e.ownerDocument||e).body:Ze(t)&&Er(t)?t:So(t)}function Qr(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let s=So(e),n=s===((i=e.ownerDocument)==null?void 0:i.body),o=me(s);if(n){let a=ri(o);return t.concat(o,o.visualViewport||[],Er(s)?s:[],a&&r?Qr(a):[])}else return t.concat(s,Qr(s,[],r))}function ri(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _o(e){let t=Pe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,s=Ze(e),n=s?e.offsetWidth:r,o=s?e.offsetHeight:i,a=br(r)!==n||br(i)!==o;return a&&(r=n,i=o),{width:r,height:i,$:a}}function Co(e){return Ne(e)?e:e.contextElement}function Qt(e){let t=Co(e);if(!Ze(t))return ze(1);let r=t.getBoundingClientRect(),{width:i,height:s,$:n}=_o(t),o=(n?br(r.width):r.width)/i,a=(n?br(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var lu=ze(0);function wo(e){let t=me(e);return!ti()||!t.visualViewport?lu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cu(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===me(e)}function Cr(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let s=e.getBoundingClientRect(),n=Co(e),o=ze(1);t&&(i?Ne(i)&&(o=Qt(i)):o=Qt(e));let a=cu(n,r,i)?wo(n):ze(0),l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(n&&i){let p=me(n),y=Ne(i)?me(i):i,x=p,E=ri(x);for(;E&&y!==x;){let v=Qt(E),A=E.getBoundingClientRect(),k=Pe(E),b=A.left+(E.clientLeft+parseFloat(k.paddingLeft))*v.x,C=A.top+(E.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=b,c+=C,x=me(E),E=ri(x)}}return Rt({width:u,height:d,x:l,y:c})}function ii(e,t){let r=_r(e).scrollLeft;return t?t.left+r:Cr(Je(e)).left+r}function Oo(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-ii(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function uu(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e,n=s==="fixed",o=Je(i),a=t?Ar(t.floating):!1;if(i===o||a&&n)return r;let l={scrollLeft:0,scrollTop:0},c=ze(1),u=ze(0),d=Ze(i);if((d||!n)&&((Lt(i)!=="body"||Er(o))&&(l=_r(i)),d)){let y=Cr(i);c=Qt(i),u.x=y.x+i.clientLeft,u.y=y.y+i.clientTop}let p=o&&!d&&!n?Oo(o,l):ze(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function du(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function pu(e){let t=_r(e),r=e.ownerDocument.body,i=st(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=st(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),n=-t.scrollLeft+ii(e),o=-t.scrollTop;return Pe(r).direction==="rtl"&&(n+=st(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:n,y:o}}var fu=25;function hu(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",s=me(e),n=Je(e),o=s.visualViewport,a=n.clientWidth,l=n.clientHeight,c=0,u=0;if(o){let p=!ti()||t==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(ii(n)<=0){let p=n.ownerDocument,y=p.body,x=getComputedStyle(y),E=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,v=Math.abs(n.clientWidth-y.clientWidth-E),A=getComputedStyle(n).scrollbarGutter==="stable both-edges"?v/2:v;A<=fu&&(a-=A)}return{width:a,height:l,x:c,y:u}}function mu(e,t){let r=Cr(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,n=Qt(e),o=e.clientWidth*n.x,a=e.clientHeight*n.y,l=s*n.x,c=i*n.y;return{width:o,height:a,x:l,y:c}}function Eo(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=hu(e,r,t);else if(t==="document")i=pu(Je(e));else if(Ne(t))i=mu(t,r);else{let s=wo(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Rt(i)}function yu(e,t){let r=t.get(e);if(r)return r;let i=Qr(e,[],!1).filter(a=>Ne(a)&&Lt(a)!=="body"),s=null,n=Pe(e).position==="fixed",o=n?at(e):e;for(;Ne(o)&&!Zt(o);){let a=Pe(o),l=Jt(o),c=s?s.position:n?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==o):s=a,o=at(o)}return t.set(e,i),i}function gu(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e,o=[...r==="clippingAncestors"?Ar(t)?[]:yu(t,this._c):[].concat(r),i],a=Eo(t,o[0],s),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<o.length;p++){let y=Eo(t,o[p],s);l=st(y.top,l),c=xr(y.right,c),u=xr(y.bottom,u),d=st(y.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function vu(e){let{width:t,height:r}=_o(e);return{width:t,height:r}}function xu(e,t,r){let i=Ze(t),s=Je(t),n=r==="fixed",o=Cr(e,!0,n,t),a={scrollLeft:0,scrollTop:0},l=ze(0);if((i||!n)&&((Lt(t)!=="body"||Er(s))&&(a=_r(t)),i)){let p=Cr(t,!0,n,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!i&&s&&(l.x=ii(s));let c=s&&!i&&!n?Oo(s,a):ze(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function bn(e){return Pe(e).position==="static"}function Ao(e,t){if(!Ze(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Je(e)===r&&(r=r.ownerDocument.body),r}function To(e,t){let r=me(e);if(Ar(e))return r;if(!Ze(e)){let s=at(e);for(;s&&!Zt(s);){if(Ne(s)&&!bn(s))return s;s=at(s)}return r}let i=Ao(e,t);for(;i&&xo(i)&&bn(i);)i=Ao(i,t);return i&&Zt(i)&&bn(i)&&!Jt(i)?r:i||bo(e)||r}var bu=async function(e){let t=this.getOffsetParent||To,r=this.getDimensions,i=await r(e.floating);return{reference:xu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Su(e){return Pe(e).direction==="rtl"}var ni={convertOffsetParentRelativeRectToViewportRelativeRect:uu,getDocumentElement:Je,getClippingRect:gu,getOffsetParent:To,getElementRects:bu,getClientRects:du,getDimensions:vu,getScale:Qt,isElement:Ne,isRTL:Su};var Ro=mo,ko=yo;var Lo=(e,t,r)=>{let i=new Map,s=r??{},n={...ni,...s.platform,_c:i};return ho(e,t,{...s,platform:n})};function Do(e){return Eu(e)}function Sn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Eu(e){for(let t=e;t;t=Sn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Sn(e);t;t=Sn(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Jt(r)||t.tagName==="BODY"))return t}return null}async function No(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Lo(e,t,{strategy:i.strategy,platform:{...ni,getOffsetParent:s=>ni.getOffsetParent(s,Do)},middleware:[ko({crossAxis:!0}),Ro({allowedPlacements:[i.placement]})]})}var lr=f(S());var zn=f(K());var Po=f(K(),1);var En=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Mo(e,t){return(0,Po.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return wr(e);try{return JSON.parse(r)}catch{return wr(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Or,...t??{}})}function Au(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!er(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!er(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),n=s(e);if(r=n.length,r!==s(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=r;i--!==0;){let o=n[i];if(!er(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function er(e,t){try{return Au(e,t)}catch{return!1}}function Or(e,t){return!er(e,t)}function wr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function si(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let s=t(i);return s[e]=!0,s}}var Io=f(K(),1);var An=e=>{let t=e??{};return(r,i)=>{var s;let n={hasChanged:Or,attribute:!1,...t};(0,Io.property)(n)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[i]),store:t.store})}};var oi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Dt=f(K(),1);var ai=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){s(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Uo=f(L(),1);var li=globalThis,_u=li.ShadowRoot&&(li.ShadyCSS===void 0||li.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var $o=(e,t)=>{if(_u)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),s=li.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=r.cssText,e.appendChild(i)}};var ci=class extends Uo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return $o(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){En(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Bo(e,t,...r){var i;let s=e.querySelector(t);for(let n of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return s}var rr=function(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n},zo,Fo=Symbol("constructorPrototype"),Ho=Symbol("constructorName"),jo=Symbol("exportpartsDebouncer"),Vo=Symbol("dynamicDependenciesLoaded"),tr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};tr.eventName="exportparts-updated";var je=class extends ci{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[zo]=new ai(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[jo].run(()=>{var s,n;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ho]=this.constructor.name,this[Fo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ho]&&Object.setPrototypeOf(this,this[Fo])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Vo]||(r[Vo]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(tr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(tr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new tr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let n=[...s??[],i];r=Bo(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(t){var r,i,s,n,o,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let y=(n=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&n!==void 0?n:[],x=(a=(o=p.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],E=[...y,...x].filter(l).map(v=>v.trim());for(let v of E)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(y=>`${p}:${y}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};zo=jo;rr([(0,Dt.property)()],je.prototype,"exportpartsPrefix",void 0);rr([Mo([])],je.prototype,"exportpartsPrefixes",void 0);rr([(0,Dt.property)({reflect:!0})],je.prototype,"exportparts",void 0);rr([(0,Dt.property)()],je.prototype,"customStylesheet",void 0);rr([(0,Dt.property)()],je.prototype,"elementToFocus",void 0);rr([(0,Dt.state)()],je.prototype,"useAdoptedStyleSheets",void 0);function ui(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Tr=Symbol("internalReduxEventsUnsubscribers"),lt=Symbol("internalStoresUnsubscribers"),Nt=Symbol("internalStores"),Cu=si(Symbol("withRedux"),function(e){var t,r,i;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Nt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Nt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Nt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Nt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Nt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Nt].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[lt].has(o.store):this[lt].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l;this[lt].set(o,a.subscribe(()=>this.updateFromStores())),this[Tr].set(o,[]),ui(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Tr].get(o).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[lt].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[lt].has(o)&&this[lt].get(o)(),this[lt].delete(o),(a=this[Tr].get(o))===null||a===void 0||a.forEach(l=>l()),this[Tr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=lt,r=Nt,i=Tr,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Wo=class extends Cu(je){};function ie(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var wu=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ko=wu,_n=()=>Math.random().toString(36).substring(7).split("").join("."),Ou={INIT:`@@redux/INIT${_n()}`,REPLACE:`@@redux/REPLACE${_n()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${_n()}`},di=Ou;function pi(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Cn(e,t,r){if(typeof e!="function")throw new Error(ie(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ie(1));return r(Cn)(e,t)}let i=e,s=t,n=new Map,o=n,a=0,l=!1;function c(){o===n&&(o=new Map,n.forEach((v,A)=>{o.set(A,v)}))}function u(){if(l)throw new Error(ie(3));return s}function d(v){if(typeof v!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));let A=!0;c();let k=a++;return o.set(k,v),function(){if(A){if(l)throw new Error(ie(6));A=!1,c(),o.delete(k),n=null}}}function p(v){if(!pi(v))throw new Error(ie(7));if(typeof v.type>"u")throw new Error(ie(8));if(typeof v.type!="string")throw new Error(ie(17));if(l)throw new Error(ie(9));try{l=!0,s=i(s,v)}finally{l=!1}return(n=o).forEach(k=>{k()}),v}function y(v){if(typeof v!="function")throw new Error(ie(10));i=v,p({type:di.REPLACE})}function x(){let v=d;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(ie(11));function k(){let C=A;C.next&&C.next(u())}return k(),{unsubscribe:v(k)}},[Ko](){return this}}}return p({type:di.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:y,[Ko]:x}}function Tu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:di.INIT})>"u")throw new Error(ie(12));if(typeof r(void 0,{type:di.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function Go(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let i=Object.keys(r),s,n;try{Tu(r)}catch(o){n=o}return function(a={},l){if(n)throw n;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],y=r[p],x=a[p],E=y(x,l);if(typeof E>"u"){let v=l&&l.type;throw new Error(ie(14))}u[p]=E,c=c||E!==x}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Rr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function qo(...e){return t=>(r,i)=>{let s=t(r,i),n=()=>{throw new Error(ie(15))},o={getState:s.getState,dispatch:(l,...c)=>n(l,...c)},a=e.map(l=>l(o));return n=Rr(...a)(s.dispatch),{...s,dispatch:n}}}function Yo(e){return pi(e)&&"type"in e&&typeof e.type=="string"}var na=Symbol.for("immer-nothing"),Xo=Symbol.for("immer-draftable"),ae=Symbol.for("immer-state");function Me(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,nr=ve.getPrototypeOf,yi="constructor",Ei="prototype",Rn="configurable",gi="enumerable",hi="writable",kr="value",We=e=>!!e&&!!e[ae];function xe(e){return e?sa(e)||_i(e)||!!e[Xo]||!!e[yi]?.[Xo]||Ci(e)||wi(e):!1}var Ru=ve[Ei][yi].toString(),Jo=new WeakMap;function sa(e){if(!e||!$n(e))return!1;let t=nr(e);if(t===null||t===ve[Ei])return!0;let r=ve.hasOwnProperty.call(t,yi)&&t[yi];if(r===Object)return!0;if(!ir(r))return!1;let i=Jo.get(r);return i===void 0&&(i=Function.toString.call(r),Jo.set(r,i)),i===Ru}function Ai(e,t,r=!0){Nr(e)===0?(r?Reflect.ownKeys(e):ve.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((i,s)=>t(s,i,e))}function Nr(e){let t=e[ae];return t?t.type_:_i(e)?1:Ci(e)?2:wi(e)?3:0}var wn=(e,t,r=Nr(e))=>r===2?e.has(t):ve[Ei].hasOwnProperty.call(e,t),kn=(e,t,r=Nr(e))=>r===2?e.get(t):e[t],vi=(e,t,r,i=Nr(e))=>{i===2?e.set(t,r):i===3?e.add(r):e[t]=r};function ku(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var _i=Array.isArray,Ci=e=>e instanceof Map,wi=e=>e instanceof Set,$n=e=>typeof e=="object",ir=e=>typeof e=="function",On=e=>typeof e=="boolean";function Lu(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Qe=e=>e.copy_||e.base_;var Un=e=>e.modified_?e.copy_:e.base_;function Ln(e,t){if(Ci(e))return new Map(e);if(wi(e))return new Set(e);if(_i(e))return Array[Ei].slice.call(e);let r=sa(e);if(t===!0||t==="class_only"&&!r){let i=ve.getOwnPropertyDescriptors(e);delete i[ae];let s=Reflect.ownKeys(i);for(let n=0;n<s.length;n++){let o=s[n],a=i[o];a[hi]===!1&&(a[hi]=!0,a[Rn]=!0),(a.get||a.set)&&(i[o]={[Rn]:!0,[hi]:!0,[gi]:a[gi],[kr]:e[o]})}return ve.create(nr(e),i)}else{let i=nr(e);if(i!==null&&r)return{...e};let s=ve.create(i);return ve.assign(s,e)}}function Bn(e,t=!1){return Oi(e)||We(e)||!xe(e)||(Nr(e)>1&&ve.defineProperties(e,{set:fi,add:fi,clear:fi,delete:fi}),ve.freeze(e),t&&Ai(e,(r,i)=>{Bn(i,!0)},!1)),e}function Du(){Me(2)}var fi={[kr]:Du};function Oi(e){return e===null||!$n(e)?!0:ve.isFrozen(e)}var xi="MapSet",Dn="Patches",Zo="ArrayMethods",oa={};function Pt(e){let t=oa[e];return t||Me(0,e),t}var Qo=e=>!!oa[e];var Lr,aa=()=>Lr,Nu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Qo(xi)?Pt(xi):void 0,arrayMethodsPlugin_:Qo(Zo)?Pt(Zo):void 0});function ea(e,t){t&&(e.patchPlugin_=Pt(Dn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Nn(e){Pn(e),e.drafts_.forEach(Pu),e.drafts_=null}function Pn(e){e===Lr&&(Lr=e.parent_)}var ta=e=>Lr=Nu(Lr,e);function Pu(e){let t=e[ae];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ra(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[ae].modified_&&(Nn(t),Me(4)),xe(e)&&(e=ia(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[ae].base_,e,t)}else e=ia(t,r);return Mu(t,e,!0),Nn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==na?e:void 0}function ia(e,t){if(Oi(t))return t;let r=t[ae];if(!r)return bi(t,e.handledSet_,e);if(!Ti(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(e);ua(r,e)}return r.copy_}function Mu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bn(t,r)}function la(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ti=(e,t)=>e.scope_===t,Iu=[];function ca(e,t,r,i){let s=Qe(e),n=e.type_;if(i!==void 0&&kn(s,i,n)===t){vi(s,i,r,n);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ai(s,(l,c)=>{if(We(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=e.draftLocations_.get(t)??Iu;for(let a of o)vi(s,a,r,n)}function $u(e,t,r){e.callbacks_.push(function(s){let n=t;if(!n||!Ti(n,s))return;s.mapSetPlugin_?.fixSetContents(n);let o=Un(n);ca(e,n.draft_??n,o,r),ua(n,s)})}function ua(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:i}=t;if(i){let s=i.getPath(e);s&&i.generatePatches_(e,s,t)}la(e)}}function Uu(e,t,r){let{scope_:i}=e;if(We(r)){let s=r[ae];Ti(s,i)&&s.callbacks_.push(function(){mi(e);let o=Un(s);ca(e,r,o,t)})}else xe(r)&&e.callbacks_.push(function(){let n=Qe(e);e.type_===3?n.has(r)&&bi(r,i.handledSet_,i):kn(n,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bi(kn(e.copy_,t,e.type_),i.handledSet_,i)})}function bi(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||We(e)||t.has(e)||!xe(e)||Oi(e)||(t.add(e),Ai(e,(i,s)=>{if(We(s)){let n=s[ae];if(Ti(n,r)){let o=Un(n);vi(e,i,o,e.type_),la(n)}}else xe(s)&&bi(s,t,r)})),e}function Bu(e,t){let r=_i(e),i={type_:r?1:0,scope_:t?t.scope_:aa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,n=Si;r&&(s=[i],n=Dr);let{revoke:o,proxy:a}=Proxy.revocable(s,n);return i.draft_=a,i.revoke_=o,[a,i]}var Si={get(e,t){if(t===ae)return e;let r=e.scope_.arrayMethodsPlugin_,i=e.type_===1&&typeof t=="string";if(i&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Qe(e);if(!wn(s,t,e.type_))return Hu(e,s,t);let n=s[t];if(e.finalized_||!xe(n)||i&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Lu(t))return n;if(n===Tn(e.base_,t)||Fu(e,t,n)){mi(e);let o=e.type_===1?+t:t,a=In(e.scope_,n,e,o);return e.copy_[o]=a}return n},has(e,t){return t in Qe(e)},ownKeys(e){return Reflect.ownKeys(Qe(e))},set(e,t,r){let i=da(Qe(e),t);if(i?.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){let s=Tn(Qe(e),t),n=s?.[ae];if(n&&n.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ku(r,s)&&(r!==void 0||wn(e.base_,t,e.type_)))return!0;mi(e),Mn(e)}return e.copy_[t]===r&&(r!==void 0||wn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Uu(e,t,r)),!0},deleteProperty(e,t){return mi(e),Tn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Mn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qe(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{[hi]:!0,[Rn]:e.type_!==1||t!=="length",[gi]:i[gi],[kr]:r[t]}},defineProperty(){Me(11)},getPrototypeOf(e){return nr(e.base_)},setPrototypeOf(){Me(12)}},Dr={};for(let e in Si){let t=Si[e];Dr[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Dr.deleteProperty=function(e,t){return Dr.set.call(this,e,t,void 0)};Dr.set=function(e,t,r){return Si.set.call(this,e[0],t,r,e[0])};function Tn(e,t){let r=e[ae];return(r?Qe(r):e)[t]}function Fu(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!xe(r)||r[ae]?!1:e.baseRefs_.has(r)}function Hu(e,t,r){let i=da(t,r);return i?kr in i?i[kr]:i.get?.call(e.draft_):void 0}function da(e,t){if(!(t in e))return;let r=nr(e);for(;r;){let i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=nr(r)}}function Mn(e){e.modified_||(e.modified_=!0,e.parent_&&Mn(e.parent_))}function mi(e){e.copy_||(e.assigned_=new Map,e.copy_=Ln(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,i)=>{if(ir(t)&&!ir(r)){let n=r;r=t;let o=this;return function(l=n,...c){return o.produce(l,u=>r.call(this,u,...c))}}ir(r)||Me(6),i!==void 0&&!ir(i)&&Me(7);let s;if(xe(t)){let n=ta(this),o=In(n,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Nn(n):Pn(n)}return ea(n,i),ra(s,n)}else if(!t||!$n(t)){if(s=r(t),s===void 0&&(s=t),s===na&&(s=void 0),this.autoFreeze_&&Bn(s,!0),i){let n=[],o=[];Pt(Dn).generateReplacementPatches_(t,s,{patches_:n,inversePatches_:o}),i(n,o)}return s}else Me(1,t)},this.produceWithPatches=(t,r)=>{if(ir(t))return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let i,s;return[this.produce(t,r,(o,a)=>{i=o,s=a}),i,s]},On(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),On(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),On(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){xe(e)||Me(8),We(e)&&(e=pa(e));let t=ta(this),r=In(t,e,void 0);return r[ae].isManual_=!0,Pn(t),r}finishDraft(e,t){let r=e&&e[ae];(!r||!r.isManual_)&&Me(9);let{scope_:i}=r;return ea(i,t),ra(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let i=Pt(Dn).applyPatches_;return We(e)?i(e,t):this.produce(e,s=>i(s,t))}};function In(e,t,r,i){let[s,n]=Ci(t)?Pt(xi).proxyMap_(t,r):wi(t)?Pt(xi).proxySet_(t,r):Bu(t,r);return(r?.scope_??aa()).drafts_.push(s),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?$u(r,n,i):n.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:c}=l;n.modified_&&c&&c.generatePatches_(n,[],l)}),s}function pa(e){return We(e)||Me(10,e),fa(e)}function fa(e){if(!xe(e)||Oi(e))return e;let t=e[ae],r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ln(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=Ln(e,!0);return Ai(r,(s,n)=>{vi(r,s,fa(n))},i),t&&(t.finalized_=!1),r}var zu=globalThis.Iterator,mf=typeof zu?.from=="function";var ju=new Vu,Fn=ju.produce;function ha(e){return({dispatch:r,getState:i})=>s=>n=>typeof n=="function"?n(r,i,e):s(n)}var ma=ha(),ya=ha;var Wu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Rr:Rr.apply(null,arguments)},Ef=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Ku=e=>e&&typeof e.match=="function";function ct(e,t){function r(...i){if(t){let s=t(...i);if(!s)throw new Error(et(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>Yo(i)&&i.type===e,r}var Sa=class Pr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Pr.prototype)}static get[Symbol.species](){return Pr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Pr(...t[0].concat(this)):new Pr(...t.concat(this))}};function ga(e){return xe(e)?Fn(e,()=>{}):e}function Ri(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Gu(e){return typeof e=="boolean"}var qu=()=>function(t){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:n=!0}=t??{},o=new Sa;return r&&(Gu(r)?o.push(ma):o.push(ya(r.extraArgument))),o},Yu="RTK_autoBatch";var va=e=>t=>{setTimeout(t,e)},Xu=(e,t)=>r=>{let i=!1,s=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(o),r())},n=e(s),o=setTimeout(s,t)},Ju=(e={type:"raf"})=>t=>(...r)=>{let i=t(...r),s=!0,n=!1,o=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Xu(window.requestAnimationFrame,100):va(10):e.type==="callback"?e.queueNotification:va(e.timeout),c=()=>{o=!1,n&&(n=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>s&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Yu],n=!s,n&&(o||(o=!0,l(c))),i.dispatch(u)}finally{s=!0}}})},Zu=e=>function(r){let{autoBatch:i=!0}=r??{},s=new Sa(e);return i&&s.push(Ju(typeof i=="object"?i:void 0)),s};function Ea(e){let t=qu(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:n=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},l;if(typeof r=="function")l=r;else if(pi(r))l=Go(r);else throw new Error(et(1));let c;typeof i=="function"?c=i(t):c=t();let u=Rr;s&&(u=Wu({trace:!1,...typeof s=="object"&&s}));let d=qo(...c),p=Zu(d),y=typeof a=="function"?a(p):p(),x=u(...y);return Cn(l,o,x)}function Aa(e){let t={},r=[],i,s={addCase(n,o){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(et(28));if(a in t)throw new Error(et(29));return t[a]=o,s},addAsyncThunk(n,o){return o.pending&&(t[n.pending.type]=o.pending),o.rejected&&(t[n.rejected.type]=o.rejected),o.fulfilled&&(t[n.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:n.settled,reducer:o.settled}),s},addMatcher(n,o){return r.push({matcher:n,reducer:o}),s},addDefaultCase(n){return i=n,s}};return e(s),[t,r,i]}function Qu(e){return typeof e=="function"}function ed(e,t){let[r,i,s]=Aa(t),n;if(Qu(e))n=()=>ga(e());else{let a=ga(e);n=()=>a}function o(a=n(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[s]),c.reduce((u,d)=>{if(d)if(We(u)){let y=d(u,l);return y===void 0?u:y}else{if(xe(u))return Fn(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return o.getInitialState=n,o}var td=(e,t)=>Ku(e)?e.match(t):e(t);function rd(...e){return t=>e.some(r=>td(r,t))}var id="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",nd=(e=21)=>{let t="",r=e;for(;r--;)t+=id[Math.random()*64|0];return t},sd=["name","message","stack","code"],Hn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},xa=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},od=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of sd)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ba="External signal was aborted",ad=(()=>{function e(t,r,i){let s=ct(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),n=ct(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=ct(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||od)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let y=i?.idGenerator?i.idGenerator(l):nd(),x=new AbortController,E,v;function A(b){v=b,x.abort()}c&&(c.aborted?A(ba):c.addEventListener("abort",()=>A(ba),{once:!0}));let k=(async function(){let b;try{let T=i?.condition?.(l,{getState:d,extra:p});if(cd(T)&&(T=await T),T===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let z=new Promise(($,j)=>{E=()=>{j({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",E,{once:!0})});u(n(y,l,i?.getPendingMeta?.({requestId:y,arg:l},{getState:d,extra:p}))),b=await Promise.race([z,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:y,signal:x.signal,abort:A,rejectWithValue:(($,j)=>new Hn($,j)),fulfillWithValue:(($,j)=>new xa($,j))})).then($=>{if($ instanceof Hn)throw $;return $ instanceof xa?s($.payload,y,l,$.meta):s($,y,l)})])}catch(T){b=T instanceof Hn?o(null,y,l,T.payload,T.meta):o(T,y,l)}finally{E&&x.signal.removeEventListener("abort",E)}return i&&!i.dispatchConditionRejection&&o.match(b)&&b.meta.condition||u(b),b})();return Object.assign(k,{abort:A,requestId:y,arg:l,unwrap(){return k.then(ld)}})}}return Object.assign(a,{pending:n,rejected:o,fulfilled:s,settled:rd(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function ld(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _a=Symbol.for("rtk-slice-createasyncthunk"),_f={[_a]:ad};function ud(e,t){return`${e}/${t}`}function dd({creators:e}={}){let t=e?.asyncThunk?.[_a];return function(i){let{name:s,reducerPath:n=s}=i;if(!s)throw new Error(et(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(fd()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,C){let T=typeof b=="string"?b:b.type;if(!T)throw new Error(et(12));if(T in l.sliceCaseReducersByType)throw new Error(et(13));return l.sliceCaseReducersByType[T]=C,c},addMatcher(b,C){return l.sliceMatchers.push({matcher:b,reducer:C}),c},exposeAction(b,C){return l.actionCreators[b]=C,c},exposeCaseReducer(b,C){return l.sliceCaseReducersByName[b]=C,c}};a.forEach(b=>{let C=o[b],T={reducerName:b,type:ud(s,b),createNotation:typeof i.reducers=="function"};md(C)?gd(T,C,c,t):hd(T,C,c)});function u(){let[b={},C=[],T=void 0]=typeof i.extraReducers=="function"?Aa(i.extraReducers):[i.extraReducers],z={...b,...l.sliceCaseReducersByType};return ed(i.initialState,$=>{for(let j in z)$.addCase(j,z[j]);for(let j of l.sliceMatchers)$.addMatcher(j.matcher,j.reducer);for(let j of C)$.addMatcher(j.matcher,j.reducer);T&&$.addDefaultCase(T)})}let d=b=>b,p=new Map,y=new WeakMap,x;function E(b,C){return x||(x=u()),x(b,C)}function v(){return x||(x=u()),x.getInitialState()}function A(b,C=!1){function T($){let j=$[b];return typeof j>"u"&&C&&(j=Ri(y,T,v)),j}function z($=d){let j=Ri(p,C,()=>new WeakMap);return Ri(j,$,()=>{let pr={};for(let[_e,gt]of Object.entries(i.selectors??{}))pr[_e]=pd(gt,$,()=>Ri(y,$,v),C);return pr})}return{reducerPath:b,getSelectors:z,get selectors(){return z(T)},selectSlice:T}}let k={name:s,reducer:E,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...A(n),injectInto(b,{reducerPath:C,...T}={}){let z=C??n;return b.inject({reducerPath:z,reducer:E},T),{...k,...A(z,!0)}}};return k}}function pd(e,t,r,i){function s(n,...o){let a=t(n);return typeof a>"u"&&i&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Ca=dd();function fd(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function hd({type:e,reducerName:t,createNotation:r},i,s){let n,o;if("reducer"in i){if(r&&!yd(i))throw new Error(et(17));n=i.reducer,o=i.prepare}else n=i;s.addCase(e,n).exposeCaseReducer(t,n).exposeAction(t,o?ct(e,o):ct(e))}function md(e){return e._reducerDefinitionType==="asyncThunk"}function yd(e){return e._reducerDefinitionType==="reducerWithPrepare"}function gd({type:e,reducerName:t},r,i,s){if(!s)throw new Error(et(18));let{payloadCreator:n,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,d=s(e,n,u);i.exposeAction(t,d),o&&i.addCase(d.fulfilled,o),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(t,{fulfilled:o||ki,pending:a||ki,rejected:l||ki,settled:c||ki})}function ki(){}var wa="listener",Oa="completed",Ta="cancelled",Cf=`task-${Ta}`,wf=`task-${Oa}`,Of=`${wa}-${Ta}`,Tf=`${wa}-${Oa}`;var{assign:Ra}=Object;var Vn="listenerMiddleware";var vd=Ra(ct(`${Vn}/add`),{withTypes:()=>vd}),Rf=ct(`${Vn}/removeAll`),xd=Ra(ct(`${Vn}/remove`),{withTypes:()=>xd});function et(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var bd=si(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Li=class extends bd(Object){};window.ftReduxStores||(window.ftReduxStores={});var ka=class e extends Li{static get(t){var r;let i=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,n=window.ftReduxStores[i];if(ui(n))return n;if(s==null)return;let o=Ca({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ea({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=wr(o.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return o.reducer(l,c)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new oi,this.injectInto=(n,o)=>this.reduxSlice.injectInto(n,o),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let s=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,o,a)=>{let l=o,c=n[l];return c?(...u)=>{let d=c(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];er(p,u)||this.setState({[d]:s(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Di=class{static format(t,r,i,s,n){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,s,!!n)):this.getIntlDateTime(t,r,i,s,!!n)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,s,n){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return n?l:s?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ni=f(S()),Sd="ft-app-info",Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mt.eventName="authentication-change";var Mr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mr.eventName="ui-locale-changed";var Ed={session:(e,t)=>{(0,Ni.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new Mt(t.payload)),0))}},w=Ni.FtReduxStore.get({name:Sd,reducers:Ed,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var La=f(S()),Pi=function(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n},sh=(0,La.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,n;return((n=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1)?a=>Di.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pi([(0,zn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Pi([(0,zn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Pi([An({store:w.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Pi([An({store:w.name})],t.prototype,"uiLocale",void 0),t});var Da;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Da||(Da={}));var Na;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Na||(Na={}));var Pa;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Pa||(Pa={}));var Ma;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Ma||(Ma={}));var Ia;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ia||(Ia={}));var $a;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})($a||($a={}));var Ua;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ua||(Ua={}));var Ba;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ba||(Ba={}));var Fa;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Fa||(Fa={}));var Ha;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Ha||(Ha={}));var Va;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Va||(Va={}));var za;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(za||(za={}));var ja;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ja||(ja={}));var Wa;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Wa||(Wa={}));var Ka;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ka||(Ka={}));var Ga;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Ga||(Ga={}));var qa;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(qa||(qa={}));var Ya;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ya||(Ya={}));var Xa;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Xa||(Xa={}));var Ja;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Ja||(Ja={}));var Za;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Za||(Za={}));var Qa;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Qa||(Qa={}));var el;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(el||(el={}));var tl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(tl||(tl={}));var rl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(rl||(rl={}));var il;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(il||(il={}));var nl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(nl||(nl={}));var Y;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(Y||(Y={}));var we;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(we||(we={}));var sl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(sl||(sl={}));var ol;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ol||(ol={}));var al;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(al||(al={}));var ll;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(ll||(ll={}));var cl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(cl||(cl={}));var ul;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ul||(ul={}));var dl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(dl||(dl={}));var pl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(pl||(pl={}));var fl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(fl||(fl={}));var hl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(hl||(hl={}));var ml;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(ml||(ml={}));var yl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(yl||(yl={}));var Ad={[Y.PERSONAL_BOOK_SHARE_USER]:[Y.PERSONAL_BOOK_USER],[Y.HTML_EXPORT_USER]:[Y.PERSONAL_BOOK_USER],[Y.PDF_EXPORT_USER]:[Y.PERSONAL_BOOK_USER],[Y.KHUB_ADMIN]:[Y.CONTENT_PUBLISHER],[Y.ADMIN]:[Y.KHUB_ADMIN,Y.USERS_ADMIN,Y.PORTAL_ADMIN,Y.BEHAVIOR_DATA_USER],[Y.GENERATIVE_AI_EXPORT_USER]:[Y.GENERATIVE_AI_USER]};function gl(e,t){return e===t||(Ad[e]??[]).some(r=>gl(r,t))}function vl(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>gl(i,t))}var Bi=f(S());var jn=f(S());var It=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),s=t??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let s=w.subscribe(()=>{i=e.get(t),i&&(s(),r(i))})}})}};var sr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:It.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):It.await()}};var be=class extends sr{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(n,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new jn.CacheRegistry,this.cache=t?s.commonCache:new jn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Mi=class extends be{async listMySearches(){let{session:t}=w.getState();return vl(t,Y.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ii=class extends be{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var $i=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var Ui=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var _d="ft-user-assets",Cd={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(we).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:s}=t.payload;Kn(e,r,[...Wn(e,r),s]),xl(e,r,1,i),bl(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;Kn(e,r,Wn(e,r).map(s=>s.id===i.id?i:s)),bl(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:s}=t.payload;Kn(e,r,Wn(e,r).filter(n=>n.id!==s)),xl(e,r,-1,i)}},Sl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},Wn=(e,t)=>{var r;let i=Sl[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},Kn=(e,t,r)=>{let i=Sl[t];i&&(e[i]=r)},xl=(e,t,r,i)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===we.BOOKMARKS&&i)){let n=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},bl=(e,t)=>{let r=e.assetLabels.map(s=>s.title),i=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...i)},ce=Bi.FtReduxStore.get({name:_d,reducers:Cd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(we).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gn=class{constructor(t=new $i,r=new Ui){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ii,this.savedSearchesService=new Mi,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,Bi.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ce.actions.clearAssetCount(),ce.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ce.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ce.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ce.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ce.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&ce.getState().assetCounts.allAsset[t]!==r.count&&ce.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&ce.getState().assetCounts.bookmarkByMap[t]!==r.count&&ce.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(ce.getState().assetCounts.bookmarkByMap).length!==0;t===we.BOOKMARKS&&r&&ce.actions.clearBookmarkCountByMap(),ce.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ce.actions.bookmarks(r)}}},wd=new Gn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=wd);var qn=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qn;var Oe=f(S());var El,or=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Od=Symbol("clearAfterUnitTest"),Fi=class extends(0,Oe.withEventBus)(be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[El]=()=>{this.defaultMessages={},this.cache=new Oe.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,Oe.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var s;let n=t.toLowerCase(),o=this.resolveContext(n);return new Oe.ParametrizedLabelResolver((s=this.defaultMessages[n])!==null&&s!==void 0?s:{},o).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof Oe.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new or({loadedContexts:t})),this.dispatchEvent(new or({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new or({loadedContexts:[t]})),this.dispatchEvent(new or({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,Oe.delay)(0).then(()=>i()).catch(()=>null)))}};El=Od;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fi{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fi{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ir=window.FluidTopicsI18nService,Yn=window.FluidTopicsCustomI18nService;var Al=f(S()),Xn=class{highlightHtml(t,r,i){(0,Al.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new Xn;var _l=f(S());var Jn=class{isDate(t){var r,i,s,n;return(n=(s=((i=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1}format(t,r){var i,s,n,o;if(t==null)return"";try{return _l.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Jn;var Cl=f(S());var $r=class{static get(t,r){var i,s,n,o;let a=w.getState(),{lang:l,region:c}=(n=(s=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Cl.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${l}-${c}`)}};var Zn=class{urlToSearchRequest(t){return $r.get().parse(t)}searchRequestToUrl(t){return $r.get().serialize(t)}};window.FluidTopicsUrlService=new Zn;var tt=f(S());var $t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};$t.eventName="before-location-change";var Ut=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ut.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},wl=new Qn;var Hi=class e extends tt.WithEventBus{static build(){return new e(window.history,wl,()=>window.location,!1)}constructor(t,r,i,s){var n,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(n=t.state)===null||n===void 0?void 0:n.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,tt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Ut(this.currentItem())),0)}installProxies(){let t=r=>(i,s,[n,o,a])=>{let l=new $t(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...n,index:c,href:l.detail.nextLocation.href};i.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(t){this.addEventListener($t.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener($t.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Ut.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ut.eventName,t)}currentItem(){return(0,tt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,tt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,tt.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,tt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let s=t,n=t+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(s=n),n++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,n=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Hi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Ol=f(L());var Tl=Ol.css`
|
|
270
|
+
`;var oo=["top","right","bottom","left"],so=["start","end"],mn=oo.reduce((e,t)=>e.concat(t,t+"-"+so[0],t+"-"+so[1]),[]),xr=Math.min,st=Math.max,br=Math.round;var ze=e=>({x:e,y:e}),ru={left:"right",right:"left",bottom:"top",top:"bottom"};function ao(e,t,r){return st(e,xr(t,r))}function Jr(e,t){return typeof e=="function"?e(t):e}function Sr(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function yn(e){return e==="x"?"y":"x"}function gn(e){return e==="y"?"height":"width"}function Zr(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function vn(e){return yn(Zr(e))}function lo(e,t,r){r===void 0&&(r=!1);let i=ot(e),s=vn(e),n=gn(s),o=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(o=hn(o)),[o,hn(o)]}function co(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function hn(e){let t=Sr(e);return ru[t]+e.slice(t.length)}function iu(e){var t,r,i,s;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(s=e.left)!=null?s:0}}function uo(e){return typeof e!="number"?iu(e):{top:e,right:e,bottom:e,left:e}}function Rt(e){let{x:t,y:r,width:i,height:s}=e;return{width:i,height:s,top:r,left:t,right:t+i,bottom:r+s,x:t,y:r}}function po(e,t,r){let{reference:i,floating:s}=e,n=Zr(t),o=vn(t),a=gn(o),l=Sr(t),c=n==="y",u=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,p=i[a]/2-s[a]/2,y;switch(l){case"top":y={x:u,y:i.y-s.height};break;case"bottom":y={x:u,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:d};break;case"left":y={x:i.x-s.width,y:d};break;default:y={x:i.x,y:i.y}}let x=ot(t);return x&&(y[o]+=p*(x==="end"?1:-1)*(r&&c?-1:1)),y}async function fo(e,t){var r;t===void 0&&(t={});let{x:i,y:s,platform:n,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:y=0}=Jr(t,e),x=uo(y),v=a[p?d==="floating"?"reference":"floating":d],A=Rt(await n.getClippingRect({element:(r=await(n.isElement==null?void 0:n.isElement(v)))==null||r?v:v.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{x:i,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),C=await(n.isElement==null?void 0:n.isElement(b))&&await(n.getScale==null?void 0:n.getScale(b))||{x:1,y:1},T=Rt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:b,strategy:l}):k);return{top:(A.top-T.top+x.top)/C.y,bottom:(T.bottom-A.bottom+x.bottom)/C.y,left:(A.left-T.left+x.left)/C.x,right:(T.right-A.right+x.right)/C.x}}var nu=50,ho=async(e,t,r)=>{let{placement:i="bottom",strategy:s="absolute",middleware:n=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:fo},l=await(o.isRTL==null?void 0:o.isRTL(t)),c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=po(c,i,l),p=i,y=0,x={};for(let E=0;E<n.length;E++){let v=n[E];if(!v)continue;let{name:A,fn:k}=v,{x:b,y:C,data:T,reset:z}=await k({x:u,y:d,initialPlacement:i,placement:p,strategy:s,middlewareData:x,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,d=C??d,x[A]={...x[A],...T},z&&y<nu&&(y++,typeof z=="object"&&(z.placement&&(p=z.placement),z.rects&&(c=z.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):z.rects),{x:u,y:d}=po(c,p,l)),E=-1)}return{x:u,y:d,placement:p,strategy:s,middlewareData:x}};function su(e,t,r){return(e?[...r.filter(s=>ot(s)===e),...r.filter(s=>ot(s)!==e)]:r.filter(s=>Sr(s)===s)).filter(s=>e?ot(s)===e||(t?co(s)!==s:!1):!0)}var mo=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,s;let{rects:n,middlewareData:o,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=mn,autoAlignment:y=!0,...x}=Jr(e,t),E=d!==void 0||p===mn?su(d||null,y,p):p,v=((r=o.autoPlacement)==null?void 0:r.index)||0,A=E[v];if(A==null)return{};if(a!==A)return{reset:{placement:E[0]}};let k=await l.detectOverflow(t,x),b=lo(A,n,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[k[Sr(A)],k[b[0]],k[b[1]]],T=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:A,overflows:C}],z=E[v+1];if(z)return{data:{index:v+1,overflows:T},reset:{placement:z}};let $=T.map(_e=>{let gt=ot(_e.placement);return[_e.placement,gt&&u?_e.overflows.slice(0,2).reduce((zc,jc)=>zc+jc,0):_e.overflows[0],_e.overflows]}).sort((_e,gt)=>_e[1]-gt[1]),pr=((s=$.filter(_e=>_e[2].slice(0,ot(_e[0])?2:3).every(gt=>gt<=0))[0])==null?void 0:s[0])||$[0][0];return pr!==a?{data:{index:v+1,overflows:T},reset:{placement:pr}}:{}}}};var yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:s,platform:n}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:k=>{let{x:b,y:C}=k;return{x:b,y:C}}},...c}=Jr(e,t),u={x:r,y:i},d=await n.detectOverflow(t,c),p=Zr(s),y=yn(p),x=u[y],E=u[p],v=(k,b)=>ao(b+d[k==="y"?"top":"left"],b,b-d[k==="y"?"bottom":"right"]);o&&(x=v(y,x)),a&&(E=v(p,E));let A=l.fn({...t,[y]:x,[p]:E});return{...A,data:{x:A.x-r,y:A.y-i,enabled:{[y]:o,[p]:a}}}}}};function ei(){return typeof window<"u"}function Lt(e){return vo(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Je(e){var t;return(t=(vo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vo(e){return ei()?e instanceof Node||e instanceof me(e).Node:!1}function Ne(e){return ei()?e instanceof Element||e instanceof me(e).Element:!1}function Ze(e){return ei()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function go(e){return!ei()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}function Er(e){let{overflow:t,overflowX:r,overflowY:i,display:s}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&s!=="inline"&&s!=="contents"}function xo(e){return/^(table|td|th)$/.test(Lt(e))}function Ar(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var ou=/transform|translate|scale|rotate|perspective|filter/,au=/paint|layout|strict|content/,kt=e=>!!e&&e!=="none",xn;function Jt(e){let t=Ne(e)?Pe(e):e;return kt(t.transform)||kt(t.translate)||kt(t.scale)||kt(t.rotate)||kt(t.perspective)||!ti()&&(kt(t.backdropFilter)||kt(t.filter))||ou.test(t.willChange||"")||au.test(t.contain||"")}function bo(e){let t=at(e);for(;Ze(t)&&!Zt(t);){if(Jt(t))return t;if(Ar(t))return null;t=at(t)}return null}function ti(){return xn==null&&(xn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xn}function Zt(e){return/^(html|body|#document)$/.test(Lt(e))}function Pe(e){return me(e).getComputedStyle(e)}function _r(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function at(e){if(Lt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||go(e)&&e.host||Je(e);return go(t)?t.host:t}function So(e){let t=at(e);return Zt(t)?(e.ownerDocument||e).body:Ze(t)&&Er(t)?t:So(t)}function Qr(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let s=So(e),n=s===((i=e.ownerDocument)==null?void 0:i.body),o=me(s);if(n){let a=ri(o);return t.concat(o,o.visualViewport||[],Er(s)?s:[],a&&r?Qr(a):[])}else return t.concat(s,Qr(s,[],r))}function ri(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _o(e){let t=Pe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,s=Ze(e),n=s?e.offsetWidth:r,o=s?e.offsetHeight:i,a=br(r)!==n||br(i)!==o;return a&&(r=n,i=o),{width:r,height:i,$:a}}function Co(e){return Ne(e)?e:e.contextElement}function Qt(e){let t=Co(e);if(!Ze(t))return ze(1);let r=t.getBoundingClientRect(),{width:i,height:s,$:n}=_o(t),o=(n?br(r.width):r.width)/i,a=(n?br(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var lu=ze(0);function wo(e){let t=me(e);return!ti()||!t.visualViewport?lu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cu(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===me(e)}function Cr(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let s=e.getBoundingClientRect(),n=Co(e),o=ze(1);t&&(i?Ne(i)&&(o=Qt(i)):o=Qt(e));let a=cu(n,r,i)?wo(n):ze(0),l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(n&&i){let p=me(n),y=Ne(i)?me(i):i,x=p,E=ri(x);for(;E&&y!==x;){let v=Qt(E),A=E.getBoundingClientRect(),k=Pe(E),b=A.left+(E.clientLeft+parseFloat(k.paddingLeft))*v.x,C=A.top+(E.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=b,c+=C,x=me(E),E=ri(x)}}return Rt({width:u,height:d,x:l,y:c})}function ii(e,t){let r=_r(e).scrollLeft;return t?t.left+r:Cr(Je(e)).left+r}function Oo(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-ii(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function uu(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e,n=s==="fixed",o=Je(i),a=t?Ar(t.floating):!1;if(i===o||a&&n)return r;let l={scrollLeft:0,scrollTop:0},c=ze(1),u=ze(0),d=Ze(i);if((d||!n)&&((Lt(i)!=="body"||Er(o))&&(l=_r(i)),d)){let y=Cr(i);c=Qt(i),u.x=y.x+i.clientLeft,u.y=y.y+i.clientTop}let p=o&&!d&&!n?Oo(o,l):ze(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function du(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function pu(e){let t=_r(e),r=e.ownerDocument.body,i=st(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=st(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),n=-t.scrollLeft+ii(e),o=-t.scrollTop;return Pe(r).direction==="rtl"&&(n+=st(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:n,y:o}}var fu=25;function hu(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",s=me(e),n=Je(e),o=s.visualViewport,a=n.clientWidth,l=n.clientHeight,c=0,u=0;if(o){let p=!ti()||t==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(ii(n)<=0){let p=n.ownerDocument,y=p.body,x=getComputedStyle(y),E=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,v=Math.abs(n.clientWidth-y.clientWidth-E),A=getComputedStyle(n).scrollbarGutter==="stable both-edges"?v/2:v;A<=fu&&(a-=A)}return{width:a,height:l,x:c,y:u}}function mu(e,t){let r=Cr(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,n=Qt(e),o=e.clientWidth*n.x,a=e.clientHeight*n.y,l=s*n.x,c=i*n.y;return{width:o,height:a,x:l,y:c}}function Eo(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=hu(e,r,t);else if(t==="document")i=pu(Je(e));else if(Ne(t))i=mu(t,r);else{let s=wo(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Rt(i)}function yu(e,t){let r=t.get(e);if(r)return r;let i=Qr(e,[],!1).filter(a=>Ne(a)&&Lt(a)!=="body"),s=null,n=Pe(e).position==="fixed",o=n?at(e):e;for(;Ne(o)&&!Zt(o);){let a=Pe(o),l=Jt(o),c=s?s.position:n?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==o):s=a,o=at(o)}return t.set(e,i),i}function gu(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e,o=[...r==="clippingAncestors"?Ar(t)?[]:yu(t,this._c):[].concat(r),i],a=Eo(t,o[0],s),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<o.length;p++){let y=Eo(t,o[p],s);l=st(y.top,l),c=xr(y.right,c),u=xr(y.bottom,u),d=st(y.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function vu(e){let{width:t,height:r}=_o(e);return{width:t,height:r}}function xu(e,t,r){let i=Ze(t),s=Je(t),n=r==="fixed",o=Cr(e,!0,n,t),a={scrollLeft:0,scrollTop:0},l=ze(0);if((i||!n)&&((Lt(t)!=="body"||Er(s))&&(a=_r(t)),i)){let p=Cr(t,!0,n,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!i&&s&&(l.x=ii(s));let c=s&&!i&&!n?Oo(s,a):ze(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function bn(e){return Pe(e).position==="static"}function Ao(e,t){if(!Ze(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Je(e)===r&&(r=r.ownerDocument.body),r}function To(e,t){let r=me(e);if(Ar(e))return r;if(!Ze(e)){let s=at(e);for(;s&&!Zt(s);){if(Ne(s)&&!bn(s))return s;s=at(s)}return r}let i=Ao(e,t);for(;i&&xo(i)&&bn(i);)i=Ao(i,t);return i&&Zt(i)&&bn(i)&&!Jt(i)?r:i||bo(e)||r}var bu=async function(e){let t=this.getOffsetParent||To,r=this.getDimensions,i=await r(e.floating);return{reference:xu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Su(e){return Pe(e).direction==="rtl"}var ni={convertOffsetParentRelativeRectToViewportRelativeRect:uu,getDocumentElement:Je,getClippingRect:gu,getOffsetParent:To,getElementRects:bu,getClientRects:du,getDimensions:vu,getScale:Qt,isElement:Ne,isRTL:Su};var Ro=mo,ko=yo;var Lo=(e,t,r)=>{let i=new Map,s=r??{},n={...ni,...s.platform,_c:i};return ho(e,t,{...s,platform:n})};function Do(e){return Eu(e)}function Sn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Eu(e){for(let t=e;t;t=Sn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Sn(e);t;t=Sn(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Jt(r)||t.tagName==="BODY"))return t}return null}async function No(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Lo(e,t,{strategy:i.strategy,platform:{...ni,getOffsetParent:s=>ni.getOffsetParent(s,Do)},middleware:[ko({crossAxis:!0}),Ro({allowedPlacements:[i.placement]})]})}var lr=f(S());var zn=f(K());var Po=f(K(),1);var En=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Mo(e,t){return(0,Po.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return wr(e);try{return JSON.parse(r)}catch{return wr(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Or,...t??{}})}function Au(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!er(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!er(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),n=s(e);if(r=n.length,r!==s(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,n[i]))return!1;for(i=r;i--!==0;){let o=n[i];if(!er(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function er(e,t){try{return Au(e,t)}catch{return!1}}function Or(e,t){return!er(e,t)}function wr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function si(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let s=t(i);return s[e]=!0,s}}var Io=f(K(),1);var An=e=>{let t=e??{};return(r,i)=>{var s;let n={hasChanged:Or,attribute:!1,...t};(0,Io.property)(n)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[i]),store:t.store})}};var oi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Dt=f(K(),1);var ai=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){s(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Uo=f(L(),1);var li=globalThis,_u=li.ShadowRoot&&(li.ShadyCSS===void 0||li.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var $o=(e,t)=>{if(_u)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),s=li.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=r.cssText,e.appendChild(i)}};var ci=class extends Uo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return $o(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){En(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Bo(e,t,...r){var i;let s=e.querySelector(t);for(let n of r)s=(i=s?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return s}var rr=function(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n},zo,Fo=Symbol("constructorPrototype"),Ho=Symbol("constructorName"),jo=Symbol("exportpartsDebouncer"),Vo=Symbol("dynamicDependenciesLoaded"),tr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};tr.eventName="exportparts-updated";var je=class extends ci{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[zo]=new ai(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[jo].run(()=>{var s,n;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ho]=this.constructor.name,this[Fo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ho]&&Object.setPrototypeOf(this,this[Fo])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Vo]||(r[Vo]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(tr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(tr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new tr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:s}=this.elementToFocus;if(i!=null){let n=[...s??[],i];r=Bo(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,s;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(t){var r,i,s,n,o,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let y=(n=(s=p.getAttribute("part"))===null||s===void 0?void 0:s.split(" "))!==null&&n!==void 0?n:[],x=(a=(o=p.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],E=[...y,...x].filter(l).map(v=>v.trim());for(let v of E)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(y=>`${p}:${y}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};zo=jo;rr([(0,Dt.property)()],je.prototype,"exportpartsPrefix",void 0);rr([Mo([])],je.prototype,"exportpartsPrefixes",void 0);rr([(0,Dt.property)({reflect:!0})],je.prototype,"exportparts",void 0);rr([(0,Dt.property)()],je.prototype,"customStylesheet",void 0);rr([(0,Dt.property)()],je.prototype,"elementToFocus",void 0);rr([(0,Dt.state)()],je.prototype,"useAdoptedStyleSheets",void 0);function ui(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Tr=Symbol("internalReduxEventsUnsubscribers"),lt=Symbol("internalStoresUnsubscribers"),Nt=Symbol("internalStores"),Cu=si(Symbol("withRedux"),function(e){var t,r,i;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Nt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Nt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Nt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Nt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Nt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Nt].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[lt].has(o.store):this[lt].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l;this[lt].set(o,a.subscribe(()=>this.updateFromStores())),this[Tr].set(o,[]),ui(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Tr].get(o).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[lt].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[lt].has(o)&&this[lt].get(o)(),this[lt].delete(o),(a=this[Tr].get(o))===null||a===void 0||a.forEach(l=>l()),this[Tr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=lt,r=Nt,i=Tr,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),Wo=class extends Cu(je){};function ie(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var wu=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ko=wu,_n=()=>Math.random().toString(36).substring(7).split("").join("."),Ou={INIT:`@@redux/INIT${_n()}`,REPLACE:`@@redux/REPLACE${_n()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${_n()}`},di=Ou;function pi(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Cn(e,t,r){if(typeof e!="function")throw new Error(ie(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ie(1));return r(Cn)(e,t)}let i=e,s=t,n=new Map,o=n,a=0,l=!1;function c(){o===n&&(o=new Map,n.forEach((v,A)=>{o.set(A,v)}))}function u(){if(l)throw new Error(ie(3));return s}function d(v){if(typeof v!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));let A=!0;c();let k=a++;return o.set(k,v),function(){if(A){if(l)throw new Error(ie(6));A=!1,c(),o.delete(k),n=null}}}function p(v){if(!pi(v))throw new Error(ie(7));if(typeof v.type>"u")throw new Error(ie(8));if(typeof v.type!="string")throw new Error(ie(17));if(l)throw new Error(ie(9));try{l=!0,s=i(s,v)}finally{l=!1}return(n=o).forEach(k=>{k()}),v}function y(v){if(typeof v!="function")throw new Error(ie(10));i=v,p({type:di.REPLACE})}function x(){let v=d;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(ie(11));function k(){let C=A;C.next&&C.next(u())}return k(),{unsubscribe:v(k)}},[Ko](){return this}}}return p({type:di.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:y,[Ko]:x}}function Tu(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:di.INIT})>"u")throw new Error(ie(12));if(typeof r(void 0,{type:di.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function Go(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let i=Object.keys(r),s,n;try{Tu(r)}catch(o){n=o}return function(a={},l){if(n)throw n;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],y=r[p],x=a[p],E=y(x,l);if(typeof E>"u"){let v=l&&l.type;throw new Error(ie(14))}u[p]=E,c=c||E!==x}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Rr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function qo(...e){return t=>(r,i)=>{let s=t(r,i),n=()=>{throw new Error(ie(15))},o={getState:s.getState,dispatch:(l,...c)=>n(l,...c)},a=e.map(l=>l(o));return n=Rr(...a)(s.dispatch),{...s,dispatch:n}}}function Yo(e){return pi(e)&&"type"in e&&typeof e.type=="string"}var na=Symbol.for("immer-nothing"),Xo=Symbol.for("immer-draftable"),ae=Symbol.for("immer-state");function Me(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,nr=ve.getPrototypeOf,yi="constructor",Ei="prototype",Rn="configurable",gi="enumerable",hi="writable",kr="value",We=e=>!!e&&!!e[ae];function xe(e){return e?sa(e)||_i(e)||!!e[Xo]||!!e[yi]?.[Xo]||Ci(e)||wi(e):!1}var Ru=ve[Ei][yi].toString(),Jo=new WeakMap;function sa(e){if(!e||!$n(e))return!1;let t=nr(e);if(t===null||t===ve[Ei])return!0;let r=ve.hasOwnProperty.call(t,yi)&&t[yi];if(r===Object)return!0;if(!ir(r))return!1;let i=Jo.get(r);return i===void 0&&(i=Function.toString.call(r),Jo.set(r,i)),i===Ru}function Ai(e,t,r=!0){Nr(e)===0?(r?Reflect.ownKeys(e):ve.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((i,s)=>t(s,i,e))}function Nr(e){let t=e[ae];return t?t.type_:_i(e)?1:Ci(e)?2:wi(e)?3:0}var wn=(e,t,r=Nr(e))=>r===2?e.has(t):ve[Ei].hasOwnProperty.call(e,t),kn=(e,t,r=Nr(e))=>r===2?e.get(t):e[t],vi=(e,t,r,i=Nr(e))=>{i===2?e.set(t,r):i===3?e.add(r):e[t]=r};function ku(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var _i=Array.isArray,Ci=e=>e instanceof Map,wi=e=>e instanceof Set,$n=e=>typeof e=="object",ir=e=>typeof e=="function",On=e=>typeof e=="boolean";function Lu(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Qe=e=>e.copy_||e.base_;var Un=e=>e.modified_?e.copy_:e.base_;function Ln(e,t){if(Ci(e))return new Map(e);if(wi(e))return new Set(e);if(_i(e))return Array[Ei].slice.call(e);let r=sa(e);if(t===!0||t==="class_only"&&!r){let i=ve.getOwnPropertyDescriptors(e);delete i[ae];let s=Reflect.ownKeys(i);for(let n=0;n<s.length;n++){let o=s[n],a=i[o];a[hi]===!1&&(a[hi]=!0,a[Rn]=!0),(a.get||a.set)&&(i[o]={[Rn]:!0,[hi]:!0,[gi]:a[gi],[kr]:e[o]})}return ve.create(nr(e),i)}else{let i=nr(e);if(i!==null&&r)return{...e};let s=ve.create(i);return ve.assign(s,e)}}function Bn(e,t=!1){return Oi(e)||We(e)||!xe(e)||(Nr(e)>1&&ve.defineProperties(e,{set:fi,add:fi,clear:fi,delete:fi}),ve.freeze(e),t&&Ai(e,(r,i)=>{Bn(i,!0)},!1)),e}function Du(){Me(2)}var fi={[kr]:Du};function Oi(e){return e===null||!$n(e)?!0:ve.isFrozen(e)}var xi="MapSet",Dn="Patches",Zo="ArrayMethods",oa={};function Pt(e){let t=oa[e];return t||Me(0,e),t}var Qo=e=>!!oa[e];var Lr,aa=()=>Lr,Nu=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Qo(xi)?Pt(xi):void 0,arrayMethodsPlugin_:Qo(Zo)?Pt(Zo):void 0});function ea(e,t){t&&(e.patchPlugin_=Pt(Dn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Nn(e){Pn(e),e.drafts_.forEach(Pu),e.drafts_=null}function Pn(e){e===Lr&&(Lr=e.parent_)}var ta=e=>Lr=Nu(Lr,e);function Pu(e){let t=e[ae];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ra(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[ae].modified_&&(Nn(t),Me(4)),xe(e)&&(e=ia(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[ae].base_,e,t)}else e=ia(t,r);return Mu(t,e,!0),Nn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==na?e:void 0}function ia(e,t){if(Oi(t))return t;let r=t[ae];if(!r)return bi(t,e.handledSet_,e);if(!Ti(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(e);ua(r,e)}return r.copy_}function Mu(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bn(t,r)}function la(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ti=(e,t)=>e.scope_===t,Iu=[];function ca(e,t,r,i){let s=Qe(e),n=e.type_;if(i!==void 0&&kn(s,i,n)===t){vi(s,i,r,n);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ai(s,(l,c)=>{if(We(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=e.draftLocations_.get(t)??Iu;for(let a of o)vi(s,a,r,n)}function $u(e,t,r){e.callbacks_.push(function(s){let n=t;if(!n||!Ti(n,s))return;s.mapSetPlugin_?.fixSetContents(n);let o=Un(n);ca(e,n.draft_??n,o,r),ua(n,s)})}function ua(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:i}=t;if(i){let s=i.getPath(e);s&&i.generatePatches_(e,s,t)}la(e)}}function Uu(e,t,r){let{scope_:i}=e;if(We(r)){let s=r[ae];Ti(s,i)&&s.callbacks_.push(function(){mi(e);let o=Un(s);ca(e,r,o,t)})}else xe(r)&&e.callbacks_.push(function(){let n=Qe(e);e.type_===3?n.has(r)&&bi(r,i.handledSet_,i):kn(n,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bi(kn(e.copy_,t,e.type_),i.handledSet_,i)})}function bi(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||We(e)||t.has(e)||!xe(e)||Oi(e)||(t.add(e),Ai(e,(i,s)=>{if(We(s)){let n=s[ae];if(Ti(n,r)){let o=Un(n);vi(e,i,o,e.type_),la(n)}}else xe(s)&&bi(s,t,r)})),e}function Bu(e,t){let r=_i(e),i={type_:r?1:0,scope_:t?t.scope_:aa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=i,n=Si;r&&(s=[i],n=Dr);let{revoke:o,proxy:a}=Proxy.revocable(s,n);return i.draft_=a,i.revoke_=o,[a,i]}var Si={get(e,t){if(t===ae)return e;let r=e.scope_.arrayMethodsPlugin_,i=e.type_===1&&typeof t=="string";if(i&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Qe(e);if(!wn(s,t,e.type_))return Hu(e,s,t);let n=s[t];if(e.finalized_||!xe(n)||i&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Lu(t))return n;if(n===Tn(e.base_,t)||Fu(e,t,n)){mi(e);let o=e.type_===1?+t:t,a=In(e.scope_,n,e,o);return e.copy_[o]=a}return n},has(e,t){return t in Qe(e)},ownKeys(e){return Reflect.ownKeys(Qe(e))},set(e,t,r){let i=da(Qe(e),t);if(i?.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){let s=Tn(Qe(e),t),n=s?.[ae];if(n&&n.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ku(r,s)&&(r!==void 0||wn(e.base_,t,e.type_)))return!0;mi(e),Mn(e)}return e.copy_[t]===r&&(r!==void 0||wn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Uu(e,t,r)),!0},deleteProperty(e,t){return mi(e),Tn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Mn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Qe(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{[hi]:!0,[Rn]:e.type_!==1||t!=="length",[gi]:i[gi],[kr]:r[t]}},defineProperty(){Me(11)},getPrototypeOf(e){return nr(e.base_)},setPrototypeOf(){Me(12)}},Dr={};for(let e in Si){let t=Si[e];Dr[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Dr.deleteProperty=function(e,t){return Dr.set.call(this,e,t,void 0)};Dr.set=function(e,t,r){return Si.set.call(this,e[0],t,r,e[0])};function Tn(e,t){let r=e[ae];return(r?Qe(r):e)[t]}function Fu(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!xe(r)||r[ae]?!1:e.baseRefs_.has(r)}function Hu(e,t,r){let i=da(t,r);return i?kr in i?i[kr]:i.get?.call(e.draft_):void 0}function da(e,t){if(!(t in e))return;let r=nr(e);for(;r;){let i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=nr(r)}}function Mn(e){e.modified_||(e.modified_=!0,e.parent_&&Mn(e.parent_))}function mi(e){e.copy_||(e.assigned_=new Map,e.copy_=Ln(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,i)=>{if(ir(t)&&!ir(r)){let n=r;r=t;let o=this;return function(l=n,...c){return o.produce(l,u=>r.call(this,u,...c))}}ir(r)||Me(6),i!==void 0&&!ir(i)&&Me(7);let s;if(xe(t)){let n=ta(this),o=In(n,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?Nn(n):Pn(n)}return ea(n,i),ra(s,n)}else if(!t||!$n(t)){if(s=r(t),s===void 0&&(s=t),s===na&&(s=void 0),this.autoFreeze_&&Bn(s,!0),i){let n=[],o=[];Pt(Dn).generateReplacementPatches_(t,s,{patches_:n,inversePatches_:o}),i(n,o)}return s}else Me(1,t)},this.produceWithPatches=(t,r)=>{if(ir(t))return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let i,s;return[this.produce(t,r,(o,a)=>{i=o,s=a}),i,s]},On(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),On(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),On(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){xe(e)||Me(8),We(e)&&(e=pa(e));let t=ta(this),r=In(t,e,void 0);return r[ae].isManual_=!0,Pn(t),r}finishDraft(e,t){let r=e&&e[ae];(!r||!r.isManual_)&&Me(9);let{scope_:i}=r;return ea(i,t),ra(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let i=Pt(Dn).applyPatches_;return We(e)?i(e,t):this.produce(e,s=>i(s,t))}};function In(e,t,r,i){let[s,n]=Ci(t)?Pt(xi).proxyMap_(t,r):wi(t)?Pt(xi).proxySet_(t,r):Bu(t,r);return(r?.scope_??aa()).drafts_.push(s),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?$u(r,n,i):n.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:c}=l;n.modified_&&c&&c.generatePatches_(n,[],l)}),s}function pa(e){return We(e)||Me(10,e),fa(e)}function fa(e){if(!xe(e)||Oi(e))return e;let t=e[ae],r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ln(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=Ln(e,!0);return Ai(r,(s,n)=>{vi(r,s,fa(n))},i),t&&(t.finalized_=!1),r}var zu=globalThis.Iterator,mf=typeof zu?.from=="function";var ju=new Vu,Fn=ju.produce;function ha(e){return({dispatch:r,getState:i})=>s=>n=>typeof n=="function"?n(r,i,e):s(n)}var ma=ha(),ya=ha;var Wu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Rr:Rr.apply(null,arguments)},Ef=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Ku=e=>e&&typeof e.match=="function";function ct(e,t){function r(...i){if(t){let s=t(...i);if(!s)throw new Error(et(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>Yo(i)&&i.type===e,r}var Sa=class Pr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Pr.prototype)}static get[Symbol.species](){return Pr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Pr(...t[0].concat(this)):new Pr(...t.concat(this))}};function ga(e){return xe(e)?Fn(e,()=>{}):e}function Ri(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Gu(e){return typeof e=="boolean"}var qu=()=>function(t){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:s=!0,actionCreatorCheck:n=!0}=t??{},o=new Sa;return r&&(Gu(r)?o.push(ma):o.push(ya(r.extraArgument))),o},Yu="RTK_autoBatch";var va=e=>t=>{setTimeout(t,e)},Xu=(e,t)=>r=>{let i=!1,s=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(o),r())},n=e(s),o=setTimeout(s,t)},Ju=(e={type:"raf"})=>t=>(...r)=>{let i=t(...r),s=!0,n=!1,o=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Xu(window.requestAnimationFrame,100):va(10):e.type==="callback"?e.queueNotification:va(e.timeout),c=()=>{o=!1,n&&(n=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>s&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Yu],n=!s,n&&(o||(o=!0,l(c))),i.dispatch(u)}finally{s=!0}}})},Zu=e=>function(r){let{autoBatch:i=!0}=r??{},s=new Sa(e);return i&&s.push(Ju(typeof i=="object"?i:void 0)),s};function Ea(e){let t=qu(),{reducer:r=void 0,middleware:i,devTools:s=!0,duplicateMiddlewareCheck:n=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},l;if(typeof r=="function")l=r;else if(pi(r))l=Go(r);else throw new Error(et(1));let c;typeof i=="function"?c=i(t):c=t();let u=Rr;s&&(u=Wu({trace:!1,...typeof s=="object"&&s}));let d=qo(...c),p=Zu(d),y=typeof a=="function"?a(p):p(),x=u(...y);return Cn(l,o,x)}function Aa(e){let t={},r=[],i,s={addCase(n,o){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(et(28));if(a in t)throw new Error(et(29));return t[a]=o,s},addAsyncThunk(n,o){return o.pending&&(t[n.pending.type]=o.pending),o.rejected&&(t[n.rejected.type]=o.rejected),o.fulfilled&&(t[n.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:n.settled,reducer:o.settled}),s},addMatcher(n,o){return r.push({matcher:n,reducer:o}),s},addDefaultCase(n){return i=n,s}};return e(s),[t,r,i]}function Qu(e){return typeof e=="function"}function ed(e,t){let[r,i,s]=Aa(t),n;if(Qu(e))n=()=>ga(e());else{let a=ga(e);n=()=>a}function o(a=n(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[s]),c.reduce((u,d)=>{if(d)if(We(u)){let y=d(u,l);return y===void 0?u:y}else{if(xe(u))return Fn(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return o.getInitialState=n,o}var td=(e,t)=>Ku(e)?e.match(t):e(t);function rd(...e){return t=>e.some(r=>td(r,t))}var id="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",nd=(e=21)=>{let t="",r=e;for(;r--;)t+=id[Math.random()*64|0];return t},sd=["name","message","stack","code"],Hn=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},xa=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},od=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of sd)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ba="External signal was aborted",ad=(()=>{function e(t,r,i){let s=ct(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),n=ct(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=ct(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||od)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let y=i?.idGenerator?i.idGenerator(l):nd(),x=new AbortController,E,v;function A(b){v=b,x.abort()}c&&(c.aborted?A(ba):c.addEventListener("abort",()=>A(ba),{once:!0}));let k=(async function(){let b;try{let T=i?.condition?.(l,{getState:d,extra:p});if(cd(T)&&(T=await T),T===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let z=new Promise(($,j)=>{E=()=>{j({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",E,{once:!0})});u(n(y,l,i?.getPendingMeta?.({requestId:y,arg:l},{getState:d,extra:p}))),b=await Promise.race([z,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:y,signal:x.signal,abort:A,rejectWithValue:(($,j)=>new Hn($,j)),fulfillWithValue:(($,j)=>new xa($,j))})).then($=>{if($ instanceof Hn)throw $;return $ instanceof xa?s($.payload,y,l,$.meta):s($,y,l)})])}catch(T){b=T instanceof Hn?o(null,y,l,T.payload,T.meta):o(T,y,l)}finally{E&&x.signal.removeEventListener("abort",E)}return i&&!i.dispatchConditionRejection&&o.match(b)&&b.meta.condition||u(b),b})();return Object.assign(k,{abort:A,requestId:y,arg:l,unwrap(){return k.then(ld)}})}}return Object.assign(a,{pending:n,rejected:o,fulfilled:s,settled:rd(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function ld(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function cd(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var _a=Symbol.for("rtk-slice-createasyncthunk"),_f={[_a]:ad};function ud(e,t){return`${e}/${t}`}function dd({creators:e}={}){let t=e?.asyncThunk?.[_a];return function(i){let{name:s,reducerPath:n=s}=i;if(!s)throw new Error(et(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(fd()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(b,C){let T=typeof b=="string"?b:b.type;if(!T)throw new Error(et(12));if(T in l.sliceCaseReducersByType)throw new Error(et(13));return l.sliceCaseReducersByType[T]=C,c},addMatcher(b,C){return l.sliceMatchers.push({matcher:b,reducer:C}),c},exposeAction(b,C){return l.actionCreators[b]=C,c},exposeCaseReducer(b,C){return l.sliceCaseReducersByName[b]=C,c}};a.forEach(b=>{let C=o[b],T={reducerName:b,type:ud(s,b),createNotation:typeof i.reducers=="function"};md(C)?gd(T,C,c,t):hd(T,C,c)});function u(){let[b={},C=[],T=void 0]=typeof i.extraReducers=="function"?Aa(i.extraReducers):[i.extraReducers],z={...b,...l.sliceCaseReducersByType};return ed(i.initialState,$=>{for(let j in z)$.addCase(j,z[j]);for(let j of l.sliceMatchers)$.addMatcher(j.matcher,j.reducer);for(let j of C)$.addMatcher(j.matcher,j.reducer);T&&$.addDefaultCase(T)})}let d=b=>b,p=new Map,y=new WeakMap,x;function E(b,C){return x||(x=u()),x(b,C)}function v(){return x||(x=u()),x.getInitialState()}function A(b,C=!1){function T($){let j=$[b];return typeof j>"u"&&C&&(j=Ri(y,T,v)),j}function z($=d){let j=Ri(p,C,()=>new WeakMap);return Ri(j,$,()=>{let pr={};for(let[_e,gt]of Object.entries(i.selectors??{}))pr[_e]=pd(gt,$,()=>Ri(y,$,v),C);return pr})}return{reducerPath:b,getSelectors:z,get selectors(){return z(T)},selectSlice:T}}let k={name:s,reducer:E,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...A(n),injectInto(b,{reducerPath:C,...T}={}){let z=C??n;return b.inject({reducerPath:z,reducer:E},T),{...k,...A(z,!0)}}};return k}}function pd(e,t,r,i){function s(n,...o){let a=t(n);return typeof a>"u"&&i&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Ca=dd();function fd(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function hd({type:e,reducerName:t,createNotation:r},i,s){let n,o;if("reducer"in i){if(r&&!yd(i))throw new Error(et(17));n=i.reducer,o=i.prepare}else n=i;s.addCase(e,n).exposeCaseReducer(t,n).exposeAction(t,o?ct(e,o):ct(e))}function md(e){return e._reducerDefinitionType==="asyncThunk"}function yd(e){return e._reducerDefinitionType==="reducerWithPrepare"}function gd({type:e,reducerName:t},r,i,s){if(!s)throw new Error(et(18));let{payloadCreator:n,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,d=s(e,n,u);i.exposeAction(t,d),o&&i.addCase(d.fulfilled,o),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(t,{fulfilled:o||ki,pending:a||ki,rejected:l||ki,settled:c||ki})}function ki(){}var wa="listener",Oa="completed",Ta="cancelled",Cf=`task-${Ta}`,wf=`task-${Oa}`,Of=`${wa}-${Ta}`,Tf=`${wa}-${Oa}`;var{assign:Ra}=Object;var Vn="listenerMiddleware";var vd=Ra(ct(`${Vn}/add`),{withTypes:()=>vd}),Rf=ct(`${Vn}/removeAll`),xd=Ra(ct(`${Vn}/remove`),{withTypes:()=>xd});function et(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var bd=si(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,s){this.eventBus.addEventListener(r,i,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,s){this.eventBus.removeEventListener(r,i,s)}}}),Li=class extends bd(Object){};window.ftReduxStores||(window.ftReduxStores={});var ka=class e extends Li{static get(t){var r;let i=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,n=window.ftReduxStores[i];if(ui(n))return n;if(s==null)return;let o=Ca({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ea({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=wr(o.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return o.reducer(l,c)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new oi,this.injectInto=(n,o)=>this.reduxSlice.injectInto(n,o),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let s=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,o,a)=>{let l=o,c=n[l];return c?(...u)=>{let d=c(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];er(p,u)||this.setState({[d]:s(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Di=class{static format(t,r,i,s,n){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,s,!!n)):this.getIntlDateTime(t,r,i,s,!!n)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,s,n){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return n?l:s?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ni=f(S()),Sd="ft-app-info",Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mt.eventName="authentication-change";var Mr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Mr.eventName="ui-locale-changed";var Ed={session:(e,t)=>{(0,Ni.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new Mt(t.payload)),0))}},w=Ni.FtReduxStore.get({name:Sd,reducers:Ed,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var La=f(S()),Pi=function(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n},sh=(0,La.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var s,n;return((n=(s=this.metadataDescriptors.find(a=>a.key===i))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1)?a=>Di.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Pi([(0,zn.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Pi([(0,zn.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Pi([An({store:w.name,selector:r=>{var i,s;return(s=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),Pi([An({store:w.name})],t.prototype,"uiLocale",void 0),t});var Da;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Da||(Da={}));var Na;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Na||(Na={}));var Pa;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Pa||(Pa={}));var Ma;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Ma||(Ma={}));var Ia;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ia||(Ia={}));var $a;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})($a||($a={}));var Ua;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ua||(Ua={}));var Ba;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Ba||(Ba={}));var Fa;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Fa||(Fa={}));var Ha;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Ha||(Ha={}));var Va;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Va||(Va={}));var za;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(za||(za={}));var ja;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ja||(ja={}));var Wa;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Wa||(Wa={}));var Ka;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Ka||(Ka={}));var Ga;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Ga||(Ga={}));var qa;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(qa||(qa={}));var Ya;(function(e){e.ASC="ASC",e.DESC="DESC"})(Ya||(Ya={}));var Xa;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Xa||(Xa={}));var Ja;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Ja||(Ja={}));var Za;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Za||(Za={}));var Qa;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Qa||(Qa={}));var el;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(el||(el={}));var tl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(tl||(tl={}));var rl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(rl||(rl={}));var il;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(il||(il={}));var nl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(nl||(nl={}));var Y;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(Y||(Y={}));var we;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(we||(we={}));var sl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(sl||(sl={}));var ol;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(ol||(ol={}));var al;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(al||(al={}));var ll;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(ll||(ll={}));var cl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(cl||(cl={}));var ul;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ul||(ul={}));var dl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(dl||(dl={}));var pl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(pl||(pl={}));var fl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(fl||(fl={}));var hl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(hl||(hl={}));var ml;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(ml||(ml={}));var yl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(yl||(yl={}));var Ad={[Y.PERSONAL_BOOK_SHARE_USER]:[Y.PERSONAL_BOOK_USER],[Y.HTML_EXPORT_USER]:[Y.PERSONAL_BOOK_USER],[Y.PDF_EXPORT_USER]:[Y.PERSONAL_BOOK_USER],[Y.KHUB_ADMIN]:[Y.CONTENT_PUBLISHER],[Y.ADMIN]:[Y.KHUB_ADMIN,Y.USERS_ADMIN,Y.PORTAL_ADMIN,Y.BEHAVIOR_DATA_USER],[Y.GENERATIVE_AI_EXPORT_USER]:[Y.GENERATIVE_AI_USER]};function gl(e,t){return e===t||(Ad[e]??[]).some(r=>gl(r,t))}function vl(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>gl(i,t))}var Bi=f(S());var jn=f(S());var It=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),s=t??i;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let s=w.subscribe(()=>{i=e.get(t),i&&(s(),r(i))})}})}};var sr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:It.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):It.await()}};var be=class extends sr{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(n,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let s=this.constructor;s.commonCache=(i=s.commonCache)!==null&&i!==void 0?i:new jn.CacheRegistry,this.cache=t?s.commonCache:new jn.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Mi=class extends be{async listMySearches(){let{session:t}=w.getState();return vl(t,Y.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ii=class extends be{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var $i=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var Ui=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var _d="ft-user-assets",Cd={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(we).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:s}=t.payload;Kn(e,r,[...Wn(e,r),s]),xl(e,r,1,i),bl(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;Kn(e,r,Wn(e,r).map(s=>s.id===i.id?i:s)),bl(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:s}=t.payload;Kn(e,r,Wn(e,r).filter(n=>n.id!==s)),xl(e,r,-1,i)}},Sl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},Wn=(e,t)=>{var r;let i=Sl[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},Kn=(e,t,r)=>{let i=Sl[t];i&&(e[i]=r)},xl=(e,t,r,i)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===we.BOOKMARKS&&i)){let n=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},bl=(e,t)=>{let r=e.assetLabels.map(s=>s.title),i=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...i)},ce=Bi.FtReduxStore.get({name:_d,reducers:Cd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(we).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gn=class{constructor(t=new $i,r=new Ui){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ii,this.savedSearchesService=new Mi,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,Bi.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ce.actions.clearAssetCount(),ce.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ce.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ce.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ce.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ce.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&ce.getState().assetCounts.allAsset[t]!==r.count&&ce.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&ce.getState().assetCounts.bookmarkByMap[t]!==r.count&&ce.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(ce.getState().assetCounts.bookmarkByMap).length!==0;t===we.BOOKMARKS&&r&&ce.actions.clearBookmarkCountByMap(),ce.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ce.actions.bookmarks(r)}}},wd=new Gn;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=wd);var qn=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qn;var Oe=f(S());var El,or=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Od=Symbol("clearAfterUnitTest"),Fi=class extends(0,Oe.withEventBus)(be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[El]=()=>{this.defaultMessages={},this.cache=new Oe.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,Oe.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var s;let n=t.toLowerCase(),o=this.resolveContext(n);return new Oe.ParametrizedLabelResolver((s=this.defaultMessages[n])!==null&&s!==void 0?s:{},o).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof Oe.CanceledPromiseError)&&r&&console.error(s)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new or({loadedContexts:t})),this.dispatchEvent(new or({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new or({loadedContexts:[t]})),this.dispatchEvent(new or({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,Oe.delay)(0).then(()=>i()).catch(()=>null)))}};El=Od;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fi{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fi{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Ir=window.FluidTopicsI18nService,Yn=window.FluidTopicsCustomI18nService;var Al=f(S()),Xn=class{highlightHtml(t,r,i){(0,Al.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new Xn;var _l=f(S());var Jn=class{isDate(t){var r,i,s,n;return(n=(s=((i=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||s===void 0?void 0:s.date)!==null&&n!==void 0?n:!1}format(t,r){var i,s,n,o;if(t==null)return"";try{return _l.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Jn;var Cl=f(S());var $r=class{static get(t,r){var i,s,n,o;let a=w.getState(),{lang:l,region:c}=(n=(s=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Cl.SearchPlaceConverter(a.baseUrl,t??20,(o=a.localesConfiguration)===null||o===void 0?void 0:o.allLanguagesAllowed,r??`${l}-${c}`)}};var Zn=class{urlToSearchRequest(t){return $r.get().parse(t)}searchRequestToUrl(t){return $r.get().serialize(t)}};window.FluidTopicsUrlService=new Zn;var tt=f(S());var $t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};$t.eventName="before-location-change";var Ut=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ut.eventName="change";var Qn=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},wl=new Qn;var Hi=class e extends tt.WithEventBus{static build(){return new e(window.history,wl,()=>window.location,!1)}constructor(t,r,i,s){var n,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(n=t.state)===null||n===void 0?void 0:n.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,tt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Ut(this.currentItem())),0)}installProxies(){let t=r=>(i,s,[n,o,a])=>{let l=new $t(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...n,index:c,href:l.detail.nextLocation.href};i.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(t){this.addEventListener($t.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener($t.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Ut.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ut.eventName,t)}currentItem(){return(0,tt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,tt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,tt.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,tt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let s=t,n=t+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(s=n),n++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,n=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Hi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Ol=f(L());var Tl=Ol.css`
|
|
271
271
|
`;var Ll=f(L()),ue=f(K()),Ht=f(S());var Bt=f(S());function Rl(e,t){let{authenticationRequired:r,session:i}=w.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var Vi=class extends sr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var es=class e extends Bt.FtStateManager{static build(t){return new e(w,t)}constructor(t,r){super(),this.store=t,this.cache=new Bt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Vi,this.cleanSessionDebouncer=new Bt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Bt.Debouncer(500),this.apiProvider=r??(()=>It.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Mt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Mt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Rl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Mr(i)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},kl=es.build();var Ft=class extends Event{constructor(t,r,i,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=s??!1}};var Ur=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:s,callbackRef:n}of i){let o=s.deref(),a=n.deref();o===void 0||a===void 0||o.dispatchEvent(new Ft(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let n=s.callbacks.get(r);n===void 0&&s.callbacks.set(r,n=new WeakSet),n.has(i)||(n.add(i),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Q=function(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n},H=class extends Ht.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=kl,this.contextRoot=new Ur}render(){return Ll.html`
|
|
272
272
|
<slot></slot>
|
|
273
273
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Ir.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};H.elementDefinitions={};H.styles=Tl;Q([(0,ue.property)()],H.prototype,"baseUrl",void 0);Q([(0,ue.property)()],H.prototype,"tenantId",void 0);Q([(0,ue.property)()],H.prototype,"apiIntegrationIdentifier",void 0);Q([(0,ue.property)()],H.prototype,"apiIntegrationAppVersion",void 0);Q([(0,ue.property)()],H.prototype,"uiLocale",void 0);Q([(0,Ht.jsonProperty)(null)],H.prototype,"availableUiLocales",void 0);Q([(0,Ht.jsonProperty)(null)],H.prototype,"metadataConfiguration",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"editorMode",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"noCustom",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"openExternalDocumentInNewTab",void 0);Q([(0,ue.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],H.prototype,"noCustomComponent",void 0);Q([(0,ue.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],H.prototype,"noCustomCode",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"withManualResources",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"navigatorOnline",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"forcedOffline",void 0);Q([(0,ue.property)({type:Boolean})],H.prototype,"authenticationRequired",void 0);Q([(0,Ht.jsonProperty)([])],H.prototype,"messageContexts",void 0);Q([(0,Ht.jsonProperty)(void 0)],H.prototype,"session",void 0);var Nl=f(S());var Dl={"ft-app-context":H};(0,Nl.customElements)(Dl);var Pl=f(K());var ts=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},ar=new ts;var kd=function(e,t,r,i){var s=arguments.length,n=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(n=(s<3?o(n):s>3?o(t,r,n):o(t,r))||n);return s>3&&n&&Object.defineProperty(t,r,n),n},Fr=Symbol("i18nAttributes"),Ml=Symbol("i18nListAttributes"),Il=Symbol("i18nProperties"),zi=Symbol("i18nContexts"),Br=Symbol("i18nUnsubs"),Ki=(0,lr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(n){return n??this.useCustomMessageContexts?Yn:Ir}i18n(n){let{context:o,key:a,message:l}=n,{custom:c,args:u,argsProvider:d}=n;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(o,a,...p)}return l}async awaitI18n(n){let{context:o,custom:a}=n;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(n)}customI18n(n,o){if(ar.isI18nKey(n)){let[a,l]=n.split(".");return this.i18n({custom:!0,context:a,key:l,...o})||n}return n}firstUpdated(n){super.firstUpdated(n),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(n){super.update(n),this.updateI18nAttributes((o,a,l)=>n.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(n){this.updateI18nAttributes((o,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===n}),this.updateI18nProperties(o=>o.context.toLowerCase()===n),this.requestUpdate()}updateI18nAttributes(n){var o,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&n(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[Fr])===null||o===void 0||o.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Ml])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(y=>c(u,d,y))})}updateI18nProperties(n){var o;(o=this[Il])===null||o===void 0||o.forEach((a,l)=>{n(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(n,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(n,o,a)}addI18nContext(n,o,a){let l=(typeof n=="string"?n:n.name).toLowerCase();a=typeof n=="string"?a:n.custom,this[zi].set(l,{isCustomContext:a}),this[Br].has(l)||this[Br].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,o)}hasI18nContext(n){return this[zi].has(n.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zi].forEach((n,o)=>this.addI18nContext(o,void 0,n.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Br].forEach(n=>n()),this[Br].clear()}}return t=zi,r=Br,kd([(0,Pl.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),ji=class extends Ki(lr.FtLitElement){},Wi=class extends Ki(lr.FtLitElementRedux){};var $l=f(S());var rs=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?ar.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Ld=new rs;var Ul=(e,t)=>(r,i)=>{var s;r.constructor.createProperty(i,{type:Object,hasChanged:$l.hasChanged,converter:ar,...t}),r[Fr]=(s=r[Fr])!==null&&s!==void 0?s:new Map,r[Fr].set(i,e??{})};var Bl=f(L());var Fl=Bl.css`
|
package/build/ft-filter.min.js
CHANGED
|
@@ -44,7 +44,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
44
44
|
input::-webkit-search-results-decoration {
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
|
-
`;var Dl={};var ji={};z(ji,{ParametrizedLabelResolver:()=>Qr});var Qr=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;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 n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var pa={};z(pa,{FtCommandQueue:()=>eo,FtLitElementRedux:()=>Mt,FtReduxStore:()=>Ft,FtStateManager:()=>lo,ReduxWatcher:()=>cn,clearAllStores:()=>lh,isFtReduxStore:()=>gr,redux:()=>yr,reduxEventListener:()=>ff,reduxReactive:()=>pf,watch:()=>ch,withRedux:()=>Ml});var pf=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},yr=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:Ue,attribute:!1,...e};y(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(c=>c[n]),store:e.store})}},ff=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var eo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==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 gr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var to=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),Dt=Symbol("internalStores"),Ml=de(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Dt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Dt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Dt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Dt].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let p=this.getStore(s.store);p&&(s.store?this[ht].has(s.store):this[ht].size>0)&&(this[c]=s.selector(p.getState(),this))}})}subscribeToStore(s,c){var d;this[ht].set(s,c.subscribe(()=>this.updateFromStores())),this[to].set(s,[]),gr(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||c.name===p.store)){let f=m=>this[h](m);c.addEventListener(p.eventName,f),this[to].get(s).push(()=>c.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ht].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[ht].has(s)&&this[ht].get(s)(),this[ht].delete(s),(c=this[to].get(s))===null||c===void 0||c.forEach(d=>d()),this[to].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ht,r=Dt,n=to,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Mt=class extends Ml(U){};function ue(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 hf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ul=hf,Ki=()=>Math.random().toString(36).substring(7).split("").join("."),mf={INIT:`@@redux/INIT${Ki()}`,REPLACE:`@@redux/REPLACE${Ki()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ki()}`},Ho=mf;function Vo(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Zi(t,e,r){if(typeof t!="function")throw new Error(ue(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ue(1));return r(Zi)(t,e)}let n=t,i=e,a=new Map,s=a,c=0,d=!1;function p(){s===a&&(s=new Map,a.forEach((E,_)=>{s.set(_,E)}))}function h(){if(d)throw new Error(ue(3));return i}function f(E){if(typeof E!="function")throw new Error(ue(4));if(d)throw new Error(ue(5));let _=!0;p();let B=c++;return s.set(B,E),function(){if(_){if(d)throw new Error(ue(6));_=!1,p(),s.delete(B),a=null}}}function m(E){if(!Vo(E))throw new Error(ue(7));if(typeof E.type>"u")throw new Error(ue(8));if(typeof E.type!="string")throw new Error(ue(17));if(d)throw new Error(ue(9));try{d=!0,i=n(i,E)}finally{d=!1}return(a=s).forEach(B=>{B()}),E}function x(E){if(typeof E!="function")throw new Error(ue(10));n=E,m({type:Ho.REPLACE})}function S(){let E=f;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ue(11));function B(){let b=_;b.next&&b.next(h())}return B(),{unsubscribe:E(B)}},[Ul](){return this}}}return m({type:Ho.INIT}),{dispatch:m,subscribe:f,getState:h,replaceReducer:x,[Ul]:S}}function yf(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Ho.INIT})>"u")throw new Error(ue(12));if(typeof r(void 0,{type:Ho.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function Fl(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let c=e[s];typeof t[c]=="function"&&(r[c]=t[c])}let n=Object.keys(r),i,a;try{yf(r)}catch(s){a=s}return function(c={},d){if(a)throw a;let p=!1,h={};for(let f=0;f<n.length;f++){let m=n[f],x=r[m],S=c[m],w=x(S,d);if(typeof w>"u"){let E=d&&d.type;throw new Error(ue(14))}h[m]=w,p=p||w!==S}return p=p||n.length!==Object.keys(c).length,p?h:c}}function ro(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function $l(...t){return e=>(r,n)=>{let i=e(r,n),a=()=>{throw new Error(ue(15))},s={getState:i.getState,dispatch:(d,...p)=>a(d,...p)},c=t.map(d=>d(s));return a=ro(...c)(i.dispatch),{...i,dispatch:a}}}function Bl(t){return Vo(t)&&"type"in t&&typeof t.type=="string"}var ql=Symbol.for("immer-nothing"),zl=Symbol.for("immer-draftable"),ye=Symbol.for("immer-state");function Be(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Ae=Object,xr=Ae.getPrototypeOf,Ko="constructor",Qo="prototype",Ji="configurable",Zo="enumerable",Go="writable",oo="value",Qe=t=>!!t&&!!t[ye];function _e(t){return t?Yl(t)||tn(t)||!!t[zl]||!!t[Ko]?.[zl]||rn(t)||on(t):!1}var gf=Ae[Qo][Ko].toString(),Hl=new WeakMap;function Yl(t){if(!t||!aa(t))return!1;let e=xr(t);if(e===null||e===Ae[Qo])return!0;let r=Ae.hasOwnProperty.call(e,Ko)&&e[Ko];if(r===Object)return!0;if(!br(r))return!1;let n=Hl.get(r);return n===void 0&&(n=Function.toString.call(r),Hl.set(r,n)),n===gf}function en(t,e,r=!0){ao(t)===0?(r?Reflect.ownKeys(t):Ae.keys(t)).forEach(i=>{e(i,t[i],t)}):t.forEach((n,i)=>e(i,n,t))}function ao(t){let e=t[ye];return e?e.type_:tn(t)?1:rn(t)?2:on(t)?3:0}var qi=(t,e,r=ao(t))=>r===2?t.has(e):Ae[Qo].hasOwnProperty.call(t,e),Qi=(t,e,r=ao(t))=>r===2?t.get(e):t[e],qo=(t,e,r,n=ao(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function bf(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var tn=Array.isArray,rn=t=>t instanceof Map,on=t=>t instanceof Set,aa=t=>typeof t=="object",br=t=>typeof t=="function",Yi=t=>typeof t=="boolean";function xf(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var at=t=>t.copy_||t.base_;var sa=t=>t.modified_?t.copy_:t.base_;function ea(t,e){if(rn(t))return new Map(t);if(on(t))return new Set(t);if(tn(t))return Array[Qo].slice.call(t);let r=Yl(t);if(e===!0||e==="class_only"&&!r){let n=Ae.getOwnPropertyDescriptors(t);delete n[ye];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){let s=i[a],c=n[s];c[Go]===!1&&(c[Go]=!0,c[Ji]=!0),(c.get||c.set)&&(n[s]={[Ji]:!0,[Go]:!0,[Zo]:c[Zo],[oo]:t[s]})}return Ae.create(xr(t),n)}else{let n=xr(t);if(n!==null&&r)return{...t};let i=Ae.create(n);return Ae.assign(i,t)}}function la(t,e=!1){return nn(t)||Qe(t)||!_e(t)||(ao(t)>1&&Ae.defineProperties(t,{set:Wo,add:Wo,clear:Wo,delete:Wo}),Ae.freeze(t),e&&en(t,(r,n)=>{la(n,!0)},!1)),t}function vf(){Be(2)}var Wo={[oo]:vf};function nn(t){return t===null||!aa(t)?!0:Ae.isFrozen(t)}var Yo="MapSet",ta="Patches",Vl="ArrayMethods",Xl={};function Ut(t){let e=Xl[t];return e||Be(0,t),e}var Wl=t=>!!Xl[t];var no,Jl=()=>no,Sf=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Wl(Yo)?Ut(Yo):void 0,arrayMethodsPlugin_:Wl(Vl)?Ut(Vl):void 0});function Gl(t,e){e&&(t.patchPlugin_=Ut(ta),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function ra(t){oa(t),t.drafts_.forEach(Ef),t.drafts_=null}function oa(t){t===no&&(no=t.parent_)}var jl=t=>no=Sf(no,t);function Ef(t){let e=t[ye];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Kl(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ye].modified_&&(ra(e),Be(4)),_e(t)&&(t=Zl(e,t));let{patchPlugin_:i}=e;i&&i.generateReplacementPatches_(r[ye].base_,t,e)}else t=Zl(e,r);return Cf(e,t,!0),ra(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ql?t:void 0}function Zl(t,e){if(nn(e))return e;let r=e[ye];if(!r)return Xo(e,t.handledSet_,t);if(!an(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);tc(r,t)}return r.copy_}function Cf(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&la(e,r)}function Ql(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var an=(t,e)=>t.scope_===e,Of=[];function ec(t,e,r,n){let i=at(t),a=t.type_;if(n!==void 0&&Qi(i,n,a)===e){qo(i,n,r,a);return}if(!t.draftLocations_){let c=t.draftLocations_=new Map;en(i,(d,p)=>{if(Qe(p)){let h=c.get(p)||[];h.push(d),c.set(p,h)}})}let s=t.draftLocations_.get(e)??Of;for(let c of s)qo(i,c,r,a)}function wf(t,e,r){t.callbacks_.push(function(i){let a=e;if(!a||!an(a,i))return;i.mapSetPlugin_?.fixSetContents(a);let s=sa(a);ec(t,a.draft_??a,s,r),tc(a,i)})}function tc(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let i=n.getPath(t);i&&n.generatePatches_(t,i,e)}Ql(t)}}function Af(t,e,r){let{scope_:n}=t;if(Qe(r)){let i=r[ye];an(i,n)&&i.callbacks_.push(function(){jo(t);let s=sa(i);ec(t,r,s,e)})}else _e(r)&&t.callbacks_.push(function(){let a=at(t);t.type_===3?a.has(r)&&Xo(r,n.handledSet_,n):Qi(a,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Xo(Qi(t.copy_,e,t.type_),n.handledSet_,n)})}function Xo(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Qe(t)||e.has(t)||!_e(t)||nn(t)||(e.add(t),en(t,(n,i)=>{if(Qe(i)){let a=i[ye];if(an(a,r)){let s=sa(a);qo(t,n,s,t.type_),Ql(a)}}else _e(i)&&Xo(i,e,r)})),t}function _f(t,e){let r=tn(t),n={type_:r?1:0,scope_:e?e.scope_:Jl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,a=Jo;r&&(i=[n],a=io);let{revoke:s,proxy:c}=Proxy.revocable(i,a);return n.draft_=c,n.revoke_=s,[c,n]}var Jo={get(t,e){if(e===ye)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let i=at(t);if(!qi(i,e,t.type_))return Tf(t,i,e);let a=i[e];if(t.finalized_||!_e(a)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&xf(e))return a;if(a===Xi(t.base_,e)||Rf(t,e,a)){jo(t);let s=t.type_===1?+e:e,c=ia(t.scope_,a,t,s);return t.copy_[s]=c}return a},has(t,e){return e in at(t)},ownKeys(t){return Reflect.ownKeys(at(t))},set(t,e,r){let n=rc(at(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let i=Xi(at(t),e),a=i?.[ye];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(bf(r,i)&&(r!==void 0||qi(t.base_,e,t.type_)))return!0;jo(t),na(t)}return t.copy_[e]===r&&(r!==void 0||qi(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),Af(t,e,r)),!0},deleteProperty(t,e){return jo(t),Xi(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),na(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=at(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[Go]:!0,[Ji]:t.type_!==1||e!=="length",[Zo]:n[Zo],[oo]:r[e]}},defineProperty(){Be(11)},getPrototypeOf(t){return xr(t.base_)},setPrototypeOf(){Be(12)}},io={};for(let t in Jo){let e=Jo[t];io[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}io.deleteProperty=function(t,e){return io.set.call(this,t,e,void 0)};io.set=function(t,e,r){return Jo.set.call(this,t[0],e,r,t[0])};function Xi(t,e){let r=t[ye];return(r?at(r):t)[e]}function Rf(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!_e(r)||r[ye]?!1:t.baseRefs_.has(r)}function Tf(t,e,r){let n=rc(e,r);return n?oo in n?n[oo]:n.get?.call(t.draft_):void 0}function rc(t,e){if(!(e in t))return;let r=xr(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=xr(r)}}function na(t){t.modified_||(t.modified_=!0,t.parent_&&na(t.parent_))}function jo(t){t.copy_||(t.assigned_=new Map,t.copy_=ea(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Lf=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(br(e)&&!br(r)){let a=r;r=e;let s=this;return function(d=a,...p){return s.produce(d,h=>r.call(this,h,...p))}}br(r)||Be(6),n!==void 0&&!br(n)&&Be(7);let i;if(_e(e)){let a=jl(this),s=ia(a,e,void 0),c=!0;try{i=r(s),c=!1}finally{c?ra(a):oa(a)}return Gl(a,n),Kl(i,a)}else if(!e||!aa(e)){if(i=r(e),i===void 0&&(i=e),i===ql&&(i=void 0),this.autoFreeze_&&la(i,!0),n){let a=[],s=[];Ut(ta).generateReplacementPatches_(e,i,{patches_:a,inversePatches_:s}),n(a,s)}return i}else Be(1,e)},this.produceWithPatches=(e,r)=>{if(br(e))return(s,...c)=>this.produceWithPatches(s,d=>e(d,...c));let n,i;return[this.produce(e,r,(s,c)=>{n=s,i=c}),n,i]},Yi(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Yi(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Yi(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){_e(t)||Be(8),Qe(t)&&(t=oc(t));let e=jl(this),r=ia(e,t,void 0);return r[ye].isManual_=!0,oa(e),r}finishDraft(t,e){let r=t&&t[ye];(!r||!r.isManual_)&&Be(9);let{scope_:n}=r;return Gl(n,e),Kl(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));let n=Ut(ta).applyPatches_;return Qe(t)?n(t,e):this.produce(t,i=>n(i,e))}};function ia(t,e,r,n){let[i,a]=rn(e)?Ut(Yo).proxyMap_(e,r):on(e)?Ut(Yo).proxySet_(e,r):_f(e,r);return(r?.scope_??Jl()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?wf(r,a,n):a.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:p}=d;a.modified_&&p&&p.generatePatches_(a,[],d)}),i}function oc(t){return Qe(t)||Be(10,t),nc(t)}function nc(t){if(!_e(t)||nn(t))return t;let e=t[ye],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=ea(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=ea(t,!0);return en(r,(i,a)=>{qo(r,i,nc(a))},n),e&&(e.finalized_=!1),r}var kf=globalThis.Iterator,Pv=typeof kf?.from=="function";var If=new Lf,ca=If.produce;function ic(t){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,t):i(a)}var ac=ic(),sc=ic;var Pf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ro:ro.apply(null,arguments)},Bv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Nf=t=>t&&typeof t.match=="function";function mt(t,e){function r(...n){if(e){let i=e(...n);if(!i)throw new Error(st(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>Bl(n)&&n.type===t,r}var pc=class so extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,so.prototype)}static get[Symbol.species](){return so}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new so(...e[0].concat(this)):new so(...e.concat(this))}};function lc(t){return _e(t)?ca(t,()=>{}):t}function sn(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Df(t){return typeof t=="boolean"}var Mf=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=e??{},s=new pc;return r&&(Df(r)?s.push(ac):s.push(sc(r.extraArgument))),s},Uf="RTK_autoBatch";var cc=t=>e=>{setTimeout(e,t)},Ff=(t,e)=>r=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(s),r())},a=t(i),s=setTimeout(i,e)},$f=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),i=!0,a=!1,s=!1,c=new Set,d=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ff(window.requestAnimationFrame,100):cc(10):t.type==="callback"?t.queueNotification:cc(t.timeout),p=()=>{s=!1,a&&(a=!1,c.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let f=()=>i&&h(),m=n.subscribe(f);return c.add(h),()=>{m(),c.delete(h)}},dispatch(h){try{return i=!h?.meta?.[Uf],a=!i,a&&(s||(s=!0,d(p))),n.dispatch(h)}finally{i=!0}}})},Bf=t=>function(r){let{autoBatch:n=!0}=r??{},i=new pc(t);return n&&i.push($f(typeof n=="object"?n:void 0)),i};function fc(t){let e=Mf(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:c=void 0}=t||{},d;if(typeof r=="function")d=r;else if(Vo(r))d=Fl(r);else throw new Error(st(1));let p;typeof n=="function"?p=n(e):p=e();let h=ro;i&&(h=Pf({trace:!1,...typeof i=="object"&&i}));let f=$l(...p),m=Bf(f),x=typeof c=="function"?c(m):m(),S=h(...x);return Zi(d,s,S)}function hc(t){let e={},r=[],n,i={addCase(a,s){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(st(28));if(c in e)throw new Error(st(29));return e[c]=s,i},addAsyncThunk(a,s){return s.pending&&(e[a.pending.type]=s.pending),s.rejected&&(e[a.rejected.type]=s.rejected),s.fulfilled&&(e[a.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase(a){return n=a,i}};return t(i),[e,r,n]}function zf(t){return typeof t=="function"}function Hf(t,e){let[r,n,i]=hc(e),a;if(zf(t))a=()=>lc(t());else{let c=lc(t);a=()=>c}function s(c=a(),d){let p=[r[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return p.filter(h=>!!h).length===0&&(p=[i]),p.reduce((h,f)=>{if(f)if(Qe(h)){let x=f(h,d);return x===void 0?h:x}else{if(_e(h))return ca(h,m=>f(m,d));{let m=f(h,d);if(m===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return h},c)}return s.getInitialState=a,s}var Vf=(t,e)=>Nf(t)?t.match(e):t(e);function Wf(...t){return e=>t.some(r=>Vf(r,e))}var Gf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",jf=(t=21)=>{let e="",r=t;for(;r--;)e+=Gf[Math.random()*64|0];return e},Kf=["name","message","stack","code"],da=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},dc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Zf=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Kf)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},uc="External signal was aborted",qf=(()=>{function t(e,r,n){let i=mt(e+"/fulfilled",(d,p,h,f)=>({payload:d,meta:{...f||{},arg:h,requestId:p,requestStatus:"fulfilled"}})),a=mt(e+"/pending",(d,p,h)=>({payload:void 0,meta:{...h||{},arg:p,requestId:d,requestStatus:"pending"}})),s=mt(e+"/rejected",(d,p,h,f,m)=>({payload:f,error:(n&&n.serializeError||Zf)(d||"Rejected"),meta:{...m||{},arg:h,requestId:p,rejectedWithValue:!!f,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"}}));function c(d,{signal:p}={}){return(h,f,m)=>{let x=n?.idGenerator?n.idGenerator(d):jf(),S=new AbortController,w,E;function _(g){E=g,S.abort()}p&&(p.aborted?_(uc):p.addEventListener("abort",()=>_(uc),{once:!0}));let B=(async function(){let g;try{let v=n?.condition?.(d,{getState:f,extra:m});if(Xf(v)&&(v=await v),v===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let L=new Promise((P,T)=>{w=()=>{T({name:"AbortError",message:E||"Aborted"})},S.signal.addEventListener("abort",w,{once:!0})});h(a(x,d,n?.getPendingMeta?.({requestId:x,arg:d},{getState:f,extra:m}))),g=await Promise.race([L,Promise.resolve(r(d,{dispatch:h,getState:f,extra:m,requestId:x,signal:S.signal,abort:_,rejectWithValue:((P,T)=>new da(P,T)),fulfillWithValue:((P,T)=>new dc(P,T))})).then(P=>{if(P instanceof da)throw P;return P instanceof dc?i(P.payload,x,d,P.meta):i(P,x,d)})])}catch(v){g=v instanceof da?s(null,x,d,v.payload,v.meta):s(v,x,d)}finally{w&&S.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&s.match(g)&&g.meta.condition||h(g),g})();return Object.assign(B,{abort:_,requestId:x,arg:d,unwrap(){return B.then(Yf)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,settled:Wf(s,i),typePrefix:e})}return t.withTypes=()=>t,t})();function Yf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Xf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var mc=Symbol.for("rtk-slice-createasyncthunk"),Hv={[mc]:qf};function Jf(t,e){return`${t}/${e}`}function Qf({creators:t}={}){let e=t?.asyncThunk?.[mc];return function(n){let{name:i,reducerPath:a=i}=n;if(!i)throw new Error(st(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(th()):n.reducers)||{},c=Object.keys(s),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(g,b){let v=typeof g=="string"?g:g.type;if(!v)throw new Error(st(12));if(v in d.sliceCaseReducersByType)throw new Error(st(13));return d.sliceCaseReducersByType[v]=b,p},addMatcher(g,b){return d.sliceMatchers.push({matcher:g,reducer:b}),p},exposeAction(g,b){return d.actionCreators[g]=b,p},exposeCaseReducer(g,b){return d.sliceCaseReducersByName[g]=b,p}};c.forEach(g=>{let b=s[g],v={reducerName:g,type:Jf(i,g),createNotation:typeof n.reducers=="function"};oh(b)?ih(v,b,p,e):rh(v,b,p)});function h(){let[g={},b=[],v=void 0]=typeof n.extraReducers=="function"?hc(n.extraReducers):[n.extraReducers],L={...g,...d.sliceCaseReducersByType};return Hf(n.initialState,P=>{for(let T in L)P.addCase(T,L[T]);for(let T of d.sliceMatchers)P.addMatcher(T.matcher,T.reducer);for(let T of b)P.addMatcher(T.matcher,T.reducer);v&&P.addDefaultCase(v)})}let f=g=>g,m=new Map,x=new WeakMap,S;function w(g,b){return S||(S=h()),S(g,b)}function E(){return S||(S=h()),S.getInitialState()}function _(g,b=!1){function v(P){let T=P[g];return typeof T>"u"&&b&&(T=sn(x,v,E)),T}function L(P=f){let T=sn(m,b,()=>new WeakMap);return sn(T,P,()=>{let H={};for(let[R,D]of Object.entries(n.selectors??{}))H[R]=eh(D,P,()=>sn(x,P,E),b);return H})}return{reducerPath:g,getSelectors:L,get selectors(){return L(v)},selectSlice:v}}let B={name:i,reducer:w,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:E,..._(a),injectInto(g,{reducerPath:b,...v}={}){let L=b??a;return g.inject({reducerPath:L,reducer:w},v),{...B,..._(L,!0)}}};return B}}function eh(t,e,r,n){function i(a,...s){let c=e(a);return typeof c>"u"&&n&&(c=r()),t(c,...s)}return i.unwrapped=t,i}var yc=Qf();function th(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function rh({type:t,reducerName:e,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&!nh(n))throw new Error(st(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(t,a).exposeCaseReducer(e,a).exposeAction(e,s?mt(t,s):mt(t))}function oh(t){return t._reducerDefinitionType==="asyncThunk"}function nh(t){return t._reducerDefinitionType==="reducerWithPrepare"}function ih({type:t,reducerName:e},r,n,i){if(!i)throw new Error(st(18));let{payloadCreator:a,fulfilled:s,pending:c,rejected:d,settled:p,options:h}=r,f=i(t,a,h);n.exposeAction(e,f),s&&n.addCase(f.fulfilled,s),c&&n.addCase(f.pending,c),d&&n.addCase(f.rejected,d),p&&n.addMatcher(f.settled,p),n.exposeCaseReducer(e,{fulfilled:s||ln,pending:c||ln,rejected:d||ln,settled:p||ln})}function ln(){}var gc="listener",bc="completed",xc="cancelled",Vv=`task-${xc}`,Wv=`task-${bc}`,Gv=`${gc}-${xc}`,jv=`${gc}-${bc}`;var{assign:vc}=Object;var ua="listenerMiddleware";var ah=vc(mt(`${ua}/add`),{withTypes:()=>ah}),Kv=mt(`${ua}/removeAll`),sh=vc(mt(`${ua}/remove`),{withTypes:()=>sh});function st(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}window.ftReduxStores||(window.ftReduxStores={});var Ft=class t extends ot{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(gr(a))return a;if(i==null)return;let s=yc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=fc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=Me(s.getInitialState());for(let f of p.keeping)h[f]=(d??h)[f];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new eo,this.injectInto=(a,s)=>this.reduxSlice.injectInto(a,s),this.selectSlice=a=>this.reduxSlice.selectSlice(a);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,p=a[d];return p?(...h)=>{let f=p(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{let f=d,m=this.getState()[f];ce(m,h)||this.setState({[f]:i(h)})}}}),this.eventBus=n??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};function lh(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))gr(e)&&e.clear()}var cn=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}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);Ue(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 ch(t,e,r){return new cn(t,e,r).watch()}var lo=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 n of r)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var ma={};z(ma,{scrollHelper:()=>dh});var fa,dn=new Map,ha=class{lock(e,r){if(r){let n=dn.get(r);if(n==null||n===e)return dn.set(r,e),r}}release(e,r){r&&dn.get(r)===e&&dn.delete(r)}findFirstScrollableParent(e){var r;let n,i;for(let a of oi(e)){let s=a,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else c&&i==null&&(i=s)}return(r=n??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 n,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(n=r.offsetTop)!==null&&n!==void 0?n: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 n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,c=At(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,c)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(fa=window.FluidTopicsScrollHelper)!==null&&fa!==void 0?fa:new ha;var dh=window.FluidTopicsScrollHelper;var ga={};z(ga,{SearchPlaceConverter:()=>Er,SearchPlaceQueryParams:()=>M,isSearchPlaceQueryParams:()=>cd,serializeRequest:()=>mh});var uh=t=>typeof t=="object"&&t!=null;var ph=t=>typeof t=="number",un=t=>typeof t=="string",jc=t=>uh(t)&&un(t.endpoint)&&un(t.method)&&un(t.statusText)&&un(t.body)&&ph(t.status),Sc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Sc||(Sc={}));var Ec;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ec||(Ec={}));var Cc;(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"})(Cc||(Cc={}));var Oc;(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"})(Oc||(Oc={}));var wc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(wc||(wc={}));var Ac;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ac||(Ac={}));var _c;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(_c||(_c={}));var Rc;(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"})(Rc||(Rc={}));var Tc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Tc||(Tc={}));var Lc;(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"})(Lc||(Lc={}));var kc;(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"})(kc||(kc={}));var Ic;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ic||(Ic={}));var Pc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pc||(Pc={}));var Nc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Nc||(Nc={}));var Dc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Dc||(Dc={}));var Mc;(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"})(Mc||(Mc={}));var vr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(vr||(vr={}));var Uc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Uc||(Uc={}));var Fc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fc||(Fc={}));var ya;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ya||(ya={}));var Kc=t=>Object.keys(ya).includes(t);var $c;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})($c||($c={}));var Bc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Bc||(Bc={}));var zc;(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"})(zc||(zc={}));var Sr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Sr||(Sr={}));var Zc=t=>Object.keys(Sr).includes(t);var Hc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Hc||(Hc={}));var Vc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Vc||(Vc={}));var Wc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wc||(Wc={}));var re;(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"})(re||(re={}));var Ie;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ie||(Ie={}));var Gc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Gc||(Gc={}));var qc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(qc||(qc={}));var Yc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Yc||(Yc={}));var Xc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Xc||(Xc={}));var Jc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Jc||(Jc={}));var Qc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qc||(Qc={}));var ed;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ed||(ed={}));var td;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(td||(td={}));var rd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(rd||(rd={}));var od;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(od||(od={}));var nd;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(nd||(nd={}));var id;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(id||(id={}));var fh={[re.PERSONAL_BOOK_SHARE_USER]:[re.PERSONAL_BOOK_USER],[re.HTML_EXPORT_USER]:[re.PERSONAL_BOOK_USER],[re.PDF_EXPORT_USER]:[re.PERSONAL_BOOK_USER],[re.KHUB_ADMIN]:[re.CONTENT_PUBLISHER],[re.ADMIN]:[re.KHUB_ADMIN,re.USERS_ADMIN,re.PORTAL_ADMIN,re.BEHAVIOR_DATA_USER],[re.GENERATIVE_AI_EXPORT_USER]:[re.GENERATIVE_AI_USER]};function ad(t,e){return t===e||(fh[t]??[]).some(r=>ad(r,e))}function sd(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(n=>ad(n,e))}function hh(t){return`"${t}"`}function ld(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function mh(t,e){return new Er(t).serialize(e)}var M;(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.NEGATIVE_VALUE_FILTERS="negative-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"})(M||(M={}));var yh=new Set(Object.values(M));function cd(t){return yh.has(t)}var Er=class{constructor(e,r=20,n=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=n,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 n=r==null||r.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var n,i,a,s,c,d,p,h,f,m,x,S,w;let E=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&E.append(M.LOCALE,e.contentLocale):E.append(M.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&E.append(M.QUERY,e.query);let _=T=>{var H,R;let D=((R=(H=T.valueFilter)===null||H===void 0?void 0:H.values)!==null&&R!==void 0?R:[]).map(Q=>this.escapeFilters(Q)).map(Q=>hh(ld(Q))).join("_");return`${T.key}~${D}`},B=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(T=>T.valueFilter&&!T.valueFilter.negative))!==null&&a!==void 0?a:[];B.length>0&&E.append(M.VALUE_FILTERS,B.map(_).join("*"));let g=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(T=>T.valueFilter&&T.valueFilter.negative))!==null&&c!==void 0?c:[];g.length>0&&E.append(M.NEGATIVE_VALUE_FILTERS,g.map(_).join("*"));let b=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(T=>T.dateFilter))!==null&&p!==void 0?p:[];if(b.length>0){let T=b.map(H=>{var R;return`${H.key}~${(R=H.dateFilter)===null||R===void 0?void 0:R.type.toLowerCase()}`}).join("*");E.append(M.DATE_FILTERS,T)}let v=(f=(h=e.metadataFilters)===null||h===void 0?void 0:h.filter(T=>T.rangeFilter))!==null&&f!==void 0?f:[];if(v.length>0){let T=v.map(H=>{var R,D;return`${H.key}~${(R=H.rangeFilter)===null||R===void 0?void 0:R.from}_${(D=H.rangeFilter)===null||D===void 0?void 0:D.to}`}).join("*");E.append(M.RANGE_FILTERS,T)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&E.append(M.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&E.append(M.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&E.append(M.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((S=(x=e.paging)===null||x===void 0?void 0:x.perPage)!==null&&S!==void 0?S:this.defaultPerPage)!=this.defaultPerPage&&E.append(M.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&E.append(M.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let L=(w=e.otherQueryParams)!==null&&w!==void 0?w:{};for(let T in L)E.append(T,L[T]);let P=new Array;return E.forEach((T,H)=>{P.push(this.encodeQueryString(H)+"="+this.encodeQueryString(T))}),encodeURI(P.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[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,n,i,a,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(_){console.warn("Could not decode search request query params, fallback on raw value",_)}let d=new URLSearchParams(e),p=d.get(M.LOCALE)==="all"?void 0:d.get(M.LOCALE),h=((r=d.get(M.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),f=(n=d.get(M.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(i=d.get(M.SCOPE))!==null&&i!==void 0?i:"default",x=+((a=d.get(M.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),S=d.get(M.KEYWORD_MATCH),w=S?S.toUpperCase()===vr.MANDATORY?vr.MANDATORY:vr.OPTIONAL:void 0,E={};for(let _ of d.keys())cd(_)||(E[_]=d.get(_));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(M.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[m])!==null&&c!==void 0?c:"DEFAULT",virtualField:Kc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:At(1,isNaN(x)?this.defaultPerPage:x,1e3)},keywordMatch:w,otherQueryParams:E}}parseCompatFilters(e){var r,n,i,a,s,c,d;let p=[];return e.has(M.FILTERS)&&(p=this.parseValueFilters((r=e.get(M.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(M.PERIOD))!==null&&n!==void 0&&n&&(p=[...p,...this.parseLegacyPeriodFilter(((i=e.get(M.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...p,...this.parseValueFilters((a=e.get(M.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseValueFilters((s=e.get(M.NEGATIVE_VALUE_FILTERS))!==null&&s!==void 0?s:"",!0),...this.parseDateFilters((c=e.get(M.DATE_FILTERS))!==null&&c!==void 0?c:""),...this.parseRangeFilters((d=e.get(M.RANGE_FILTERS))!==null&&d!==void 0?d:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e,r=!1){return e.length===0?[]:this.splitUnknownFilter(e).map(n=>({key:n[0],valueFilter:{values:n[1].split("_").map(ld).map(i=>this.unescapeFilterValue(i)),negative:r}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Sr[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,n,i]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(i,r);return e}parseLegacyPeriodFilter(e){if(Zc(e))return[{key:"ft:lastEdition",dateFilter:{type:Sr[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[M.LOCALE,M.FILTERS,M.VALUE_FILTERS,M.NEGATIVE_VALUE_FILTERS,M.DATE_FILTERS,M.RANGE_FILTERS].forEach(i=>{r.searchParams.delete(i)}),r.toString()}static updateLocaleParamInUrl(e,r){let n=new URL(e);return n.searchParams.delete(M.LOCALE),r!==void 0&&n.searchParams.append(M.LOCALE,r),n.toString()}};var va={};z(va,{toFtFormComponent:()=>xa});var ba=Symbol("elementInternals"),xa=de(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[ba].form}constructor(...n){super(n),this[ba]=this.attachInternals()}setFormValue(n){this[ba].setFormValue(n)}}return e});var Sa={};z(Sa,{DateFormatter:()=>$t});var $t=class{static format(e,r,n,i,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!a)):this.getIntlDateTime(e,r,n,i,!!a)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,a){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:i?`${c} ${d}`:c}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ca={};z(Ca,{ALL_KEYS_VALUE:()=>Ea,SameWindowStorageEvent:()=>Cr});var Ea="__all__",Cr=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ea}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Cr(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Cr(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Cr(Ea))}});var wa={};z(wa,{FocusMainContentEvent:()=>Oa});var Oa=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var dd={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function gh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function bh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",gh);document.addEventListener("click",bh);var ud=k`
|
|
47
|
+
`;var Dl={};var ji={};z(ji,{ParametrizedLabelResolver:()=>Qr});var Qr=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var n,i;e=this.resolvePluralKey(e,r);let a=(i=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&i!==void 0?i:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((n,i)=>e=e.replace(new RegExp(`\\{${i}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(n,s))),e}resolvePluralKey(e,r){for(let n of r)if(typeof n=="number"){let i=`${String(e)}[\\=${n}]`;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 n=i=>r?.includes("date")?e.toLocaleDateString(i):r?.includes("time")?e.toLocaleTimeString(i):e.toLocaleString(i);try{return n(document.documentElement.lang)}catch{return n()}}};var pa={};z(pa,{FtCommandQueue:()=>eo,FtLitElementRedux:()=>Mt,FtReduxStore:()=>Ft,FtStateManager:()=>lo,ReduxWatcher:()=>cn,clearAllStores:()=>lh,isFtReduxStore:()=>gr,redux:()=>yr,reduxEventListener:()=>ff,reduxReactive:()=>pf,watch:()=>ch,withRedux:()=>Ml});var pf=()=>(t,e)=>{var r;let n=t.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(r=n.reduxReactiveProperties)===null||r===void 0||r.add(e)},yr=t=>{let e=t??{};return(r,n)=>{var i;let a={hasChanged:Ue,attribute:!1,...e};y(a)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(c=>c[n]),store:e.store})}},ff=t=>(e,r)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(r,t)};var eo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==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 gr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var to=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),Dt=Symbol("internalStores"),Ml=de(Symbol("withRedux"),function(t){var e,r,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Dt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Dt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Dt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Dt].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let p=this.getStore(s.store);p&&(s.store?this[ht].has(s.store):this[ht].size>0)&&(this[c]=s.selector(p.getState(),this))}})}subscribeToStore(s,c){var d;this[ht].set(s,c.subscribe(()=>this.updateFromStores())),this[to].set(s,[]),gr(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||c.name===p.store)){let f=m=>this[h](m);c.addEventListener(p.eventName,f),this[to].get(s).push(()=>c.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ht].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[ht].has(s)&&this[ht].get(s)(),this[ht].delete(s),(c=this[to].get(s))===null||c===void 0||c.forEach(d=>d()),this[to].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ht,r=Dt,n=to,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),Mt=class extends Ml(U){};function ue(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 hf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ul=hf,Ki=()=>Math.random().toString(36).substring(7).split("").join("."),mf={INIT:`@@redux/INIT${Ki()}`,REPLACE:`@@redux/REPLACE${Ki()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ki()}`},Ho=mf;function Vo(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Zi(t,e,r){if(typeof t!="function")throw new Error(ue(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ue(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ue(1));return r(Zi)(t,e)}let n=t,i=e,a=new Map,s=a,c=0,d=!1;function p(){s===a&&(s=new Map,a.forEach((E,_)=>{s.set(_,E)}))}function h(){if(d)throw new Error(ue(3));return i}function f(E){if(typeof E!="function")throw new Error(ue(4));if(d)throw new Error(ue(5));let _=!0;p();let B=c++;return s.set(B,E),function(){if(_){if(d)throw new Error(ue(6));_=!1,p(),s.delete(B),a=null}}}function m(E){if(!Vo(E))throw new Error(ue(7));if(typeof E.type>"u")throw new Error(ue(8));if(typeof E.type!="string")throw new Error(ue(17));if(d)throw new Error(ue(9));try{d=!0,i=n(i,E)}finally{d=!1}return(a=s).forEach(B=>{B()}),E}function x(E){if(typeof E!="function")throw new Error(ue(10));n=E,m({type:Ho.REPLACE})}function S(){let E=f;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ue(11));function B(){let b=_;b.next&&b.next(h())}return B(),{unsubscribe:E(B)}},[Ul](){return this}}}return m({type:Ho.INIT}),{dispatch:m,subscribe:f,getState:h,replaceReducer:x,[Ul]:S}}function yf(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Ho.INIT})>"u")throw new Error(ue(12));if(typeof r(void 0,{type:Ho.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ue(13))})}function Fl(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let c=e[s];typeof t[c]=="function"&&(r[c]=t[c])}let n=Object.keys(r),i,a;try{yf(r)}catch(s){a=s}return function(c={},d){if(a)throw a;let p=!1,h={};for(let f=0;f<n.length;f++){let m=n[f],x=r[m],S=c[m],w=x(S,d);if(typeof w>"u"){let E=d&&d.type;throw new Error(ue(14))}h[m]=w,p=p||w!==S}return p=p||n.length!==Object.keys(c).length,p?h:c}}function ro(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...n)=>e(r(...n)))}function $l(...t){return e=>(r,n)=>{let i=e(r,n),a=()=>{throw new Error(ue(15))},s={getState:i.getState,dispatch:(d,...p)=>a(d,...p)},c=t.map(d=>d(s));return a=ro(...c)(i.dispatch),{...i,dispatch:a}}}function Bl(t){return Vo(t)&&"type"in t&&typeof t.type=="string"}var ql=Symbol.for("immer-nothing"),zl=Symbol.for("immer-draftable"),ye=Symbol.for("immer-state");function Be(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Ae=Object,xr=Ae.getPrototypeOf,Ko="constructor",Qo="prototype",Ji="configurable",Zo="enumerable",Go="writable",oo="value",Qe=t=>!!t&&!!t[ye];function _e(t){return t?Yl(t)||tn(t)||!!t[zl]||!!t[Ko]?.[zl]||rn(t)||on(t):!1}var gf=Ae[Qo][Ko].toString(),Hl=new WeakMap;function Yl(t){if(!t||!aa(t))return!1;let e=xr(t);if(e===null||e===Ae[Qo])return!0;let r=Ae.hasOwnProperty.call(e,Ko)&&e[Ko];if(r===Object)return!0;if(!br(r))return!1;let n=Hl.get(r);return n===void 0&&(n=Function.toString.call(r),Hl.set(r,n)),n===gf}function en(t,e,r=!0){ao(t)===0?(r?Reflect.ownKeys(t):Ae.keys(t)).forEach(i=>{e(i,t[i],t)}):t.forEach((n,i)=>e(i,n,t))}function ao(t){let e=t[ye];return e?e.type_:tn(t)?1:rn(t)?2:on(t)?3:0}var qi=(t,e,r=ao(t))=>r===2?t.has(e):Ae[Qo].hasOwnProperty.call(t,e),Qi=(t,e,r=ao(t))=>r===2?t.get(e):t[e],qo=(t,e,r,n=ao(t))=>{n===2?t.set(e,r):n===3?t.add(r):t[e]=r};function bf(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var tn=Array.isArray,rn=t=>t instanceof Map,on=t=>t instanceof Set,aa=t=>typeof t=="object",br=t=>typeof t=="function",Yi=t=>typeof t=="boolean";function xf(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var at=t=>t.copy_||t.base_;var sa=t=>t.modified_?t.copy_:t.base_;function ea(t,e){if(rn(t))return new Map(t);if(on(t))return new Set(t);if(tn(t))return Array[Qo].slice.call(t);let r=Yl(t);if(e===!0||e==="class_only"&&!r){let n=Ae.getOwnPropertyDescriptors(t);delete n[ye];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){let s=i[a],c=n[s];c[Go]===!1&&(c[Go]=!0,c[Ji]=!0),(c.get||c.set)&&(n[s]={[Ji]:!0,[Go]:!0,[Zo]:c[Zo],[oo]:t[s]})}return Ae.create(xr(t),n)}else{let n=xr(t);if(n!==null&&r)return{...t};let i=Ae.create(n);return Ae.assign(i,t)}}function la(t,e=!1){return nn(t)||Qe(t)||!_e(t)||(ao(t)>1&&Ae.defineProperties(t,{set:Wo,add:Wo,clear:Wo,delete:Wo}),Ae.freeze(t),e&&en(t,(r,n)=>{la(n,!0)},!1)),t}function vf(){Be(2)}var Wo={[oo]:vf};function nn(t){return t===null||!aa(t)?!0:Ae.isFrozen(t)}var Yo="MapSet",ta="Patches",Vl="ArrayMethods",Xl={};function Ut(t){let e=Xl[t];return e||Be(0,t),e}var Wl=t=>!!Xl[t];var no,Jl=()=>no,Sf=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Wl(Yo)?Ut(Yo):void 0,arrayMethodsPlugin_:Wl(Vl)?Ut(Vl):void 0});function Gl(t,e){e&&(t.patchPlugin_=Ut(ta),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function ra(t){oa(t),t.drafts_.forEach(Ef),t.drafts_=null}function oa(t){t===no&&(no=t.parent_)}var jl=t=>no=Sf(no,t);function Ef(t){let e=t[ye];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Kl(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ye].modified_&&(ra(e),Be(4)),_e(t)&&(t=Zl(e,t));let{patchPlugin_:i}=e;i&&i.generateReplacementPatches_(r[ye].base_,t,e)}else t=Zl(e,r);return Cf(e,t,!0),ra(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ql?t:void 0}function Zl(t,e){if(nn(e))return e;let r=e[ye];if(!r)return Xo(e,t.handledSet_,t);if(!an(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(t);tc(r,t)}return r.copy_}function Cf(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&la(e,r)}function Ql(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var an=(t,e)=>t.scope_===e,Of=[];function ec(t,e,r,n){let i=at(t),a=t.type_;if(n!==void 0&&Qi(i,n,a)===e){qo(i,n,r,a);return}if(!t.draftLocations_){let c=t.draftLocations_=new Map;en(i,(d,p)=>{if(Qe(p)){let h=c.get(p)||[];h.push(d),c.set(p,h)}})}let s=t.draftLocations_.get(e)??Of;for(let c of s)qo(i,c,r,a)}function wf(t,e,r){t.callbacks_.push(function(i){let a=e;if(!a||!an(a,i))return;i.mapSetPlugin_?.fixSetContents(a);let s=sa(a);ec(t,a.draft_??a,s,r),tc(a,i)})}function tc(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:n}=e;if(n){let i=n.getPath(t);i&&n.generatePatches_(t,i,e)}Ql(t)}}function Af(t,e,r){let{scope_:n}=t;if(Qe(r)){let i=r[ye];an(i,n)&&i.callbacks_.push(function(){jo(t);let s=sa(i);ec(t,r,s,e)})}else _e(r)&&t.callbacks_.push(function(){let a=at(t);t.type_===3?a.has(r)&&Xo(r,n.handledSet_,n):Qi(a,e,t.type_)===r&&n.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Xo(Qi(t.copy_,e,t.type_),n.handledSet_,n)})}function Xo(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Qe(t)||e.has(t)||!_e(t)||nn(t)||(e.add(t),en(t,(n,i)=>{if(Qe(i)){let a=i[ye];if(an(a,r)){let s=sa(a);qo(t,n,s,t.type_),Ql(a)}}else _e(i)&&Xo(i,e,r)})),t}function _f(t,e){let r=tn(t),n={type_:r?1:0,scope_:e?e.scope_:Jl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,a=Jo;r&&(i=[n],a=io);let{revoke:s,proxy:c}=Proxy.revocable(i,a);return n.draft_=c,n.revoke_=s,[c,n]}var Jo={get(t,e){if(e===ye)return t;let r=t.scope_.arrayMethodsPlugin_,n=t.type_===1&&typeof e=="string";if(n&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let i=at(t);if(!qi(i,e,t.type_))return Tf(t,i,e);let a=i[e];if(t.finalized_||!_e(a)||n&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&xf(e))return a;if(a===Xi(t.base_,e)||Rf(t,e,a)){jo(t);let s=t.type_===1?+e:e,c=ia(t.scope_,a,t,s);return t.copy_[s]=c}return a},has(t,e){return e in at(t)},ownKeys(t){return Reflect.ownKeys(at(t))},set(t,e,r){let n=rc(at(t),e);if(n?.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){let i=Xi(at(t),e),a=i?.[ye];if(a&&a.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(bf(r,i)&&(r!==void 0||qi(t.base_,e,t.type_)))return!0;jo(t),na(t)}return t.copy_[e]===r&&(r!==void 0||qi(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),Af(t,e,r)),!0},deleteProperty(t,e){return jo(t),Xi(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),na(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=at(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{[Go]:!0,[Ji]:t.type_!==1||e!=="length",[Zo]:n[Zo],[oo]:r[e]}},defineProperty(){Be(11)},getPrototypeOf(t){return xr(t.base_)},setPrototypeOf(){Be(12)}},io={};for(let t in Jo){let e=Jo[t];io[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}io.deleteProperty=function(t,e){return io.set.call(this,t,e,void 0)};io.set=function(t,e,r){return Jo.set.call(this,t[0],e,r,t[0])};function Xi(t,e){let r=t[ye];return(r?at(r):t)[e]}function Rf(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!_e(r)||r[ye]?!1:t.baseRefs_.has(r)}function Tf(t,e,r){let n=rc(e,r);return n?oo in n?n[oo]:n.get?.call(t.draft_):void 0}function rc(t,e){if(!(e in t))return;let r=xr(t);for(;r;){let n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=xr(r)}}function na(t){t.modified_||(t.modified_=!0,t.parent_&&na(t.parent_))}function jo(t){t.copy_||(t.assigned_=new Map,t.copy_=ea(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Lf=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,n)=>{if(br(e)&&!br(r)){let a=r;r=e;let s=this;return function(d=a,...p){return s.produce(d,h=>r.call(this,h,...p))}}br(r)||Be(6),n!==void 0&&!br(n)&&Be(7);let i;if(_e(e)){let a=jl(this),s=ia(a,e,void 0),c=!0;try{i=r(s),c=!1}finally{c?ra(a):oa(a)}return Gl(a,n),Kl(i,a)}else if(!e||!aa(e)){if(i=r(e),i===void 0&&(i=e),i===ql&&(i=void 0),this.autoFreeze_&&la(i,!0),n){let a=[],s=[];Ut(ta).generateReplacementPatches_(e,i,{patches_:a,inversePatches_:s}),n(a,s)}return i}else Be(1,e)},this.produceWithPatches=(e,r)=>{if(br(e))return(s,...c)=>this.produceWithPatches(s,d=>e(d,...c));let n,i;return[this.produce(e,r,(s,c)=>{n=s,i=c}),n,i]},Yi(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Yi(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Yi(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){_e(t)||Be(8),Qe(t)&&(t=oc(t));let e=jl(this),r=ia(e,t,void 0);return r[ye].isManual_=!0,oa(e),r}finishDraft(t,e){let r=t&&t[ye];(!r||!r.isManual_)&&Be(9);let{scope_:n}=r;return Gl(n,e),Kl(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let i=e[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(e=e.slice(r+1));let n=Ut(ta).applyPatches_;return Qe(t)?n(t,e):this.produce(t,i=>n(i,e))}};function ia(t,e,r,n){let[i,a]=rn(e)?Ut(Yo).proxyMap_(e,r):on(e)?Ut(Yo).proxySet_(e,r):_f(e,r);return(r?.scope_??Jl()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?wf(r,a,n):a.callbacks_.push(function(d){d.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:p}=d;a.modified_&&p&&p.generatePatches_(a,[],d)}),i}function oc(t){return Qe(t)||Be(10,t),nc(t)}function nc(t){if(!_e(t)||nn(t))return t;let e=t[ye],r,n=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=ea(t,e.scope_.immer_.useStrictShallowCopy_),n=e.scope_.immer_.shouldUseStrictIteration()}else r=ea(t,!0);return en(r,(i,a)=>{qo(r,i,nc(a))},n),e&&(e.finalized_=!1),r}var kf=globalThis.Iterator,Pv=typeof kf?.from=="function";var If=new Lf,ca=If.produce;function ic(t){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,t):i(a)}var ac=ic(),sc=ic;var Pf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ro:ro.apply(null,arguments)},Bv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Nf=t=>t&&typeof t.match=="function";function mt(t,e){function r(...n){if(e){let i=e(...n);if(!i)throw new Error(st(0));return{type:t,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>Bl(n)&&n.type===t,r}var pc=class so extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,so.prototype)}static get[Symbol.species](){return so}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new so(...e[0].concat(this)):new so(...e.concat(this))}};function lc(t){return _e(t)?ca(t,()=>{}):t}function sn(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Df(t){return typeof t=="boolean"}var Mf=()=>function(e){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=e??{},s=new pc;return r&&(Df(r)?s.push(ac):s.push(sc(r.extraArgument))),s},Uf="RTK_autoBatch";var cc=t=>e=>{setTimeout(e,t)},Ff=(t,e)=>r=>{let n=!1,i=()=>{n||(n=!0,cancelAnimationFrame(a),clearTimeout(s),r())},a=t(i),s=setTimeout(i,e)},$f=(t={type:"raf"})=>e=>(...r)=>{let n=e(...r),i=!0,a=!1,s=!1,c=new Set,d=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ff(window.requestAnimationFrame,100):cc(10):t.type==="callback"?t.queueNotification:cc(t.timeout),p=()=>{s=!1,a&&(a=!1,c.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let f=()=>i&&h(),m=n.subscribe(f);return c.add(h),()=>{m(),c.delete(h)}},dispatch(h){try{return i=!h?.meta?.[Uf],a=!i,a&&(s||(s=!0,d(p))),n.dispatch(h)}finally{i=!0}}})},Bf=t=>function(r){let{autoBatch:n=!0}=r??{},i=new pc(t);return n&&i.push($f(typeof n=="object"?n:void 0)),i};function fc(t){let e=Mf(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:s=void 0,enhancers:c=void 0}=t||{},d;if(typeof r=="function")d=r;else if(Vo(r))d=Fl(r);else throw new Error(st(1));let p;typeof n=="function"?p=n(e):p=e();let h=ro;i&&(h=Pf({trace:!1,...typeof i=="object"&&i}));let f=$l(...p),m=Bf(f),x=typeof c=="function"?c(m):m(),S=h(...x);return Zi(d,s,S)}function hc(t){let e={},r=[],n,i={addCase(a,s){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(st(28));if(c in e)throw new Error(st(29));return e[c]=s,i},addAsyncThunk(a,s){return s.pending&&(e[a.pending.type]=s.pending),s.rejected&&(e[a.rejected.type]=s.rejected),s.fulfilled&&(e[a.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase(a){return n=a,i}};return t(i),[e,r,n]}function zf(t){return typeof t=="function"}function Hf(t,e){let[r,n,i]=hc(e),a;if(zf(t))a=()=>lc(t());else{let c=lc(t);a=()=>c}function s(c=a(),d){let p=[r[d.type],...n.filter(({matcher:h})=>h(d)).map(({reducer:h})=>h)];return p.filter(h=>!!h).length===0&&(p=[i]),p.reduce((h,f)=>{if(f)if(Qe(h)){let x=f(h,d);return x===void 0?h:x}else{if(_e(h))return ca(h,m=>f(m,d));{let m=f(h,d);if(m===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return h},c)}return s.getInitialState=a,s}var Vf=(t,e)=>Nf(t)?t.match(e):t(e);function Wf(...t){return e=>t.some(r=>Vf(r,e))}var Gf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",jf=(t=21)=>{let e="",r=t;for(;r--;)e+=Gf[Math.random()*64|0];return e},Kf=["name","message","stack","code"],da=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},dc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Zf=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Kf)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},uc="External signal was aborted",qf=(()=>{function t(e,r,n){let i=mt(e+"/fulfilled",(d,p,h,f)=>({payload:d,meta:{...f||{},arg:h,requestId:p,requestStatus:"fulfilled"}})),a=mt(e+"/pending",(d,p,h)=>({payload:void 0,meta:{...h||{},arg:p,requestId:d,requestStatus:"pending"}})),s=mt(e+"/rejected",(d,p,h,f,m)=>({payload:f,error:(n&&n.serializeError||Zf)(d||"Rejected"),meta:{...m||{},arg:h,requestId:p,rejectedWithValue:!!f,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"}}));function c(d,{signal:p}={}){return(h,f,m)=>{let x=n?.idGenerator?n.idGenerator(d):jf(),S=new AbortController,w,E;function _(g){E=g,S.abort()}p&&(p.aborted?_(uc):p.addEventListener("abort",()=>_(uc),{once:!0}));let B=(async function(){let g;try{let v=n?.condition?.(d,{getState:f,extra:m});if(Xf(v)&&(v=await v),v===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let L=new Promise((P,T)=>{w=()=>{T({name:"AbortError",message:E||"Aborted"})},S.signal.addEventListener("abort",w,{once:!0})});h(a(x,d,n?.getPendingMeta?.({requestId:x,arg:d},{getState:f,extra:m}))),g=await Promise.race([L,Promise.resolve(r(d,{dispatch:h,getState:f,extra:m,requestId:x,signal:S.signal,abort:_,rejectWithValue:((P,T)=>new da(P,T)),fulfillWithValue:((P,T)=>new dc(P,T))})).then(P=>{if(P instanceof da)throw P;return P instanceof dc?i(P.payload,x,d,P.meta):i(P,x,d)})])}catch(v){g=v instanceof da?s(null,x,d,v.payload,v.meta):s(v,x,d)}finally{w&&S.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&s.match(g)&&g.meta.condition||h(g),g})();return Object.assign(B,{abort:_,requestId:x,arg:d,unwrap(){return B.then(Yf)}})}}return Object.assign(c,{pending:a,rejected:s,fulfilled:i,settled:Wf(s,i),typePrefix:e})}return t.withTypes=()=>t,t})();function Yf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Xf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var mc=Symbol.for("rtk-slice-createasyncthunk"),Hv={[mc]:qf};function Jf(t,e){return`${t}/${e}`}function Qf({creators:t}={}){let e=t?.asyncThunk?.[mc];return function(n){let{name:i,reducerPath:a=i}=n;if(!i)throw new Error(st(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(th()):n.reducers)||{},c=Object.keys(s),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(g,b){let v=typeof g=="string"?g:g.type;if(!v)throw new Error(st(12));if(v in d.sliceCaseReducersByType)throw new Error(st(13));return d.sliceCaseReducersByType[v]=b,p},addMatcher(g,b){return d.sliceMatchers.push({matcher:g,reducer:b}),p},exposeAction(g,b){return d.actionCreators[g]=b,p},exposeCaseReducer(g,b){return d.sliceCaseReducersByName[g]=b,p}};c.forEach(g=>{let b=s[g],v={reducerName:g,type:Jf(i,g),createNotation:typeof n.reducers=="function"};oh(b)?ih(v,b,p,e):rh(v,b,p)});function h(){let[g={},b=[],v=void 0]=typeof n.extraReducers=="function"?hc(n.extraReducers):[n.extraReducers],L={...g,...d.sliceCaseReducersByType};return Hf(n.initialState,P=>{for(let T in L)P.addCase(T,L[T]);for(let T of d.sliceMatchers)P.addMatcher(T.matcher,T.reducer);for(let T of b)P.addMatcher(T.matcher,T.reducer);v&&P.addDefaultCase(v)})}let f=g=>g,m=new Map,x=new WeakMap,S;function w(g,b){return S||(S=h()),S(g,b)}function E(){return S||(S=h()),S.getInitialState()}function _(g,b=!1){function v(P){let T=P[g];return typeof T>"u"&&b&&(T=sn(x,v,E)),T}function L(P=f){let T=sn(m,b,()=>new WeakMap);return sn(T,P,()=>{let H={};for(let[R,D]of Object.entries(n.selectors??{}))H[R]=eh(D,P,()=>sn(x,P,E),b);return H})}return{reducerPath:g,getSelectors:L,get selectors(){return L(v)},selectSlice:v}}let B={name:i,reducer:w,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:E,..._(a),injectInto(g,{reducerPath:b,...v}={}){let L=b??a;return g.inject({reducerPath:L,reducer:w},v),{...B,..._(L,!0)}}};return B}}function eh(t,e,r,n){function i(a,...s){let c=e(a);return typeof c>"u"&&n&&(c=r()),t(c,...s)}return i.unwrapped=t,i}var yc=Qf();function th(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function rh({type:t,reducerName:e,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&!nh(n))throw new Error(st(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(t,a).exposeCaseReducer(e,a).exposeAction(e,s?mt(t,s):mt(t))}function oh(t){return t._reducerDefinitionType==="asyncThunk"}function nh(t){return t._reducerDefinitionType==="reducerWithPrepare"}function ih({type:t,reducerName:e},r,n,i){if(!i)throw new Error(st(18));let{payloadCreator:a,fulfilled:s,pending:c,rejected:d,settled:p,options:h}=r,f=i(t,a,h);n.exposeAction(e,f),s&&n.addCase(f.fulfilled,s),c&&n.addCase(f.pending,c),d&&n.addCase(f.rejected,d),p&&n.addMatcher(f.settled,p),n.exposeCaseReducer(e,{fulfilled:s||ln,pending:c||ln,rejected:d||ln,settled:p||ln})}function ln(){}var gc="listener",bc="completed",xc="cancelled",Vv=`task-${xc}`,Wv=`task-${bc}`,Gv=`${gc}-${xc}`,jv=`${gc}-${bc}`;var{assign:vc}=Object;var ua="listenerMiddleware";var ah=vc(mt(`${ua}/add`),{withTypes:()=>ah}),Kv=mt(`${ua}/removeAll`),sh=vc(mt(`${ua}/remove`),{withTypes:()=>sh});function st(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}window.ftReduxStores||(window.ftReduxStores={});var Ft=class t extends ot{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(gr(a))return a;if(i==null)return;let s=yc({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),c=fc({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let h=Me(s.getInitialState());for(let f of p.keeping)h[f]=(d??h)[f];return h}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new eo,this.injectInto=(a,s)=>this.reduxSlice.injectInto(a,s),this.selectSlice=a=>this.reduxSlice.selectSlice(a);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,p=a[d];return p?(...h)=>{let f=p(...h.map(i));return this.reduxStore.dispatch(f),f}:h=>{let f=d,m=this.getState()[f];ce(m,h)||this.setState({[f]:i(h)})}}}),this.eventBus=n??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};function lh(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))gr(e)&&e.clear()}var cn=class{constructor(e,r,n){this.store=e,this.valueSelector=r,this.callback=n}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);Ue(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 ch(t,e,r){return new cn(t,e,r).watch()}var lo=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 n of r)this.getOrCreateRequestConsumers(n).add(e).size==1&&this.onNewNeededRequest(n)}unregisterComponent(e,r){for(let n of r)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var ma={};z(ma,{scrollHelper:()=>dh});var fa,dn=new Map,ha=class{lock(e,r){if(r){let n=dn.get(r);if(n==null||n===e)return dn.set(r,e),r}}release(e,r){r&&dn.get(r)===e&&dn.delete(r)}findFirstScrollableParent(e){var r;let n,i;for(let a of oi(e)){let s=a,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else c&&i==null&&(i=s)}return(r=n??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 n,i;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(n=r.offsetTop)!==null&&n!==void 0?n: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 n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let i=this.getAbsoluteScrollOffset(n,e),a=i-n.clientHeight+e.clientHeight,s=i,c=At(0,(s-n.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,c)*(a-s)+s;n.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(fa=window.FluidTopicsScrollHelper)!==null&&fa!==void 0?fa:new ha;var dh=window.FluidTopicsScrollHelper;var ga={};z(ga,{SearchPlaceConverter:()=>Er,SearchPlaceQueryParams:()=>M,isSearchPlaceQueryParams:()=>cd,serializeRequest:()=>mh});var uh=t=>typeof t=="object"&&t!=null;var ph=t=>typeof t=="number",un=t=>typeof t=="string",jc=t=>uh(t)&&un(t.endpoint)&&un(t.method)&&un(t.statusText)&&un(t.body)&&ph(t.status),Sc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Sc||(Sc={}));var Ec;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ec||(Ec={}));var Cc;(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"})(Cc||(Cc={}));var Oc;(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"})(Oc||(Oc={}));var wc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(wc||(wc={}));var Ac;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ac||(Ac={}));var _c;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(_c||(_c={}));var Rc;(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"})(Rc||(Rc={}));var Tc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Tc||(Tc={}));var Lc;(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"})(Lc||(Lc={}));var kc;(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"})(kc||(kc={}));var Ic;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ic||(Ic={}));var Pc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pc||(Pc={}));var Nc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Nc||(Nc={}));var Dc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Dc||(Dc={}));var Mc;(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"})(Mc||(Mc={}));var vr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(vr||(vr={}));var Uc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Uc||(Uc={}));var Fc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fc||(Fc={}));var ya;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(ya||(ya={}));var Kc=t=>Object.keys(ya).includes(t);var $c;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})($c||($c={}));var Bc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Bc||(Bc={}));var zc;(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"})(zc||(zc={}));var Sr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Sr||(Sr={}));var Zc=t=>Object.keys(Sr).includes(t);var Hc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Hc||(Hc={}));var Vc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Vc||(Vc={}));var Wc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Wc||(Wc={}));var re;(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"})(re||(re={}));var Ie;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ie||(Ie={}));var Gc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Gc||(Gc={}));var qc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(qc||(qc={}));var Yc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Yc||(Yc={}));var Xc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Xc||(Xc={}));var Jc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Jc||(Jc={}));var Qc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qc||(Qc={}));var ed;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ed||(ed={}));var td;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(td||(td={}));var rd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(rd||(rd={}));var od;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(od||(od={}));var nd;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(nd||(nd={}));var id;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(id||(id={}));var fh={[re.PERSONAL_BOOK_SHARE_USER]:[re.PERSONAL_BOOK_USER],[re.HTML_EXPORT_USER]:[re.PERSONAL_BOOK_USER],[re.PDF_EXPORT_USER]:[re.PERSONAL_BOOK_USER],[re.KHUB_ADMIN]:[re.CONTENT_PUBLISHER],[re.ADMIN]:[re.KHUB_ADMIN,re.USERS_ADMIN,re.PORTAL_ADMIN,re.BEHAVIOR_DATA_USER],[re.GENERATIVE_AI_EXPORT_USER]:[re.GENERATIVE_AI_USER]};function ad(t,e){return t===e||(fh[t]??[]).some(r=>ad(r,e))}function sd(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(n=>ad(n,e))}function hh(t){return`"${t}"`}function ld(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function mh(t,e){return new Er(t).serialize(e)}var M;(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.NEGATIVE_VALUE_FILTERS="negative-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"})(M||(M={}));var yh=new Set(Object.values(M));function cd(t){return yh.has(t)}var Er=class{constructor(e,r=20,n=!1,i="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=n,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 n=r==null||r.trim().length===0,i=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return i.search=this.toURLSearchParams(e),i.toString()}toURLSearchParams(e,r=!1){var n,i,a,s,c,d,p,h,f,m,x,S,w;let E=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&E.append(M.LOCALE,e.contentLocale):E.append(M.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&E.append(M.QUERY,e.query);let _=T=>{var H,R;let D=((R=(H=T.valueFilter)===null||H===void 0?void 0:H.values)!==null&&R!==void 0?R:[]).map(Q=>this.escapeFilters(Q)).map(Q=>hh(ld(Q))).join("_");return`${T.key}~${D}`},B=(a=(i=e.metadataFilters)===null||i===void 0?void 0:i.filter(T=>T.valueFilter&&!T.valueFilter.negative))!==null&&a!==void 0?a:[];B.length>0&&E.append(M.VALUE_FILTERS,B.map(_).join("*"));let g=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(T=>T.valueFilter&&T.valueFilter.negative))!==null&&c!==void 0?c:[];g.length>0&&E.append(M.NEGATIVE_VALUE_FILTERS,g.map(_).join("*"));let b=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(T=>T.dateFilter))!==null&&p!==void 0?p:[];if(b.length>0){let T=b.map(H=>{var R;return`${H.key}~${(R=H.dateFilter)===null||R===void 0?void 0:R.type.toLowerCase()}`}).join("*");E.append(M.DATE_FILTERS,T)}let v=(f=(h=e.metadataFilters)===null||h===void 0?void 0:h.filter(T=>T.rangeFilter))!==null&&f!==void 0?f:[];if(v.length>0){let T=v.map(H=>{var R,D;return`${H.key}~${(R=H.rangeFilter)===null||R===void 0?void 0:R.from}_${(D=H.rangeFilter)===null||D===void 0?void 0:D.to}`}).join("*");E.append(M.RANGE_FILTERS,T)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&E.append(M.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&E.append(M.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&E.append(M.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((S=(x=e.paging)===null||x===void 0?void 0:x.perPage)!==null&&S!==void 0?S:this.defaultPerPage)!=this.defaultPerPage&&E.append(M.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&E.append(M.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let L=(w=e.otherQueryParams)!==null&&w!==void 0?w:{};for(let T in L)E.append(T,L[T]);let P=new Array;return E.forEach((T,H)=>{P.push(this.encodeQueryString(H)+"="+this.encodeQueryString(T))}),encodeURI(P.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let n=e.split("?"),i=this.fromURLSearchParams(n.slice(1).join("?")),a=n[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,n,i,a,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(_){console.warn("Could not decode search request query params, fallback on raw value",_)}let d=new URLSearchParams(e),p=d.get(M.LOCALE)==="all"?void 0:d.get(M.LOCALE),h=((r=d.get(M.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),f=(n=d.get(M.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(i=d.get(M.SCOPE))!==null&&i!==void 0?i:"default",x=+((a=d.get(M.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),S=d.get(M.KEYWORD_MATCH),w=S?S.toUpperCase()===vr.MANDATORY?vr.MANDATORY:vr.OPTIONAL:void 0,E={};for(let _ of d.keys())cd(_)||(E[_]=d.get(_));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(M.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[m])!==null&&c!==void 0?c:"DEFAULT",virtualField:Kc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:At(1,isNaN(x)?this.defaultPerPage:x,1e3)},keywordMatch:w,otherQueryParams:E}}parseCompatFilters(e){var r,n,i,a,s,c,d;let p=[];return e.has(M.FILTERS)&&(p=this.parseValueFilters((r=e.get(M.FILTERS))!==null&&r!==void 0?r:"")),(n=e.has(M.PERIOD))!==null&&n!==void 0&&n&&(p=[...p,...this.parseLegacyPeriodFilter(((i=e.get(M.PERIOD))!==null&&i!==void 0?i:"").toUpperCase())]),[...p,...this.parseValueFilters((a=e.get(M.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseValueFilters((s=e.get(M.NEGATIVE_VALUE_FILTERS))!==null&&s!==void 0?s:"",!0),...this.parseDateFilters((c=e.get(M.DATE_FILTERS))!==null&&c!==void 0?c:""),...this.parseRangeFilters((d=e.get(M.RANGE_FILTERS))!==null&&d!==void 0?d:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e,r=!1){return e.length===0?[]:this.splitUnknownFilter(e).map(n=>({key:n[0],valueFilter:{values:n[1].split("_").map(ld).map(i=>this.unescapeFilterValue(i)),negative:r}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Sr[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,n,i]of this.filtersEscapeMapping)e=e.replaceAll(r,n);return e}superEscapeFilters(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(n,i);return e}unescapeFilterValue(e){for(let[r,n,i]of this.filtersEscapeMapping)e=e.replaceAll(i,r);return e}parseLegacyPeriodFilter(e){if(Zc(e))return[{key:"ft:lastEdition",dateFilter:{type:Sr[e]}}];if(e.startsWith("CUSTOM_")){let[r,n,i]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:i}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[M.LOCALE,M.FILTERS,M.VALUE_FILTERS,M.NEGATIVE_VALUE_FILTERS,M.DATE_FILTERS,M.RANGE_FILTERS].forEach(i=>{r.searchParams.delete(i)}),r.toString()}static updateLocaleParamInUrl(e,r){let n=new URL(e);return n.searchParams.delete(M.LOCALE),r!==void 0&&n.searchParams.append(M.LOCALE,r),n.toString()}};var va={};z(va,{toFtFormComponent:()=>xa});var ba=Symbol("elementInternals"),xa=de(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[ba].form}constructor(...n){super(n),this[ba]=this.attachInternals()}setFormValue(n){this[ba].setFormValue(n)}}return e});var Sa={};z(Sa,{DateFormatter:()=>$t});var $t=class{static format(e,r,n,i,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!a)):this.getIntlDateTime(e,r,n,i,!!a)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,a){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:i?`${c} ${d}`:c}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ca={};z(Ca,{ALL_KEYS_VALUE:()=>Ea,SameWindowStorageEvent:()=>Cr});var Ea="__all__",Cr=class extends CustomEvent{constructor(e,r,n){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Ea}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Cr(r[0],n,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let n=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Cr(r[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Cr(Ea))}});var wa={};z(wa,{FocusMainContentEvent:()=>Oa});var Oa=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var dd={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function gh(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function bh(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",gh);document.addEventListener("click",bh);var ud=k`
|
|
48
48
|
.sr-only {
|
|
49
49
|
position:absolute;
|
|
50
50
|
left:-10000px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filter",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.16",
|
|
4
4
|
"description": "Flat selector for multivalued or monovalued filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "2.2.
|
|
23
|
-
"@fluid-topics/ft-checkbox": "2.2.
|
|
24
|
-
"@fluid-topics/ft-icon": "2.2.
|
|
25
|
-
"@fluid-topics/ft-radio": "2.2.
|
|
26
|
-
"@fluid-topics/ft-ripple": "2.2.
|
|
27
|
-
"@fluid-topics/ft-snap-scroll": "2.2.
|
|
28
|
-
"@fluid-topics/ft-typography": "2.2.
|
|
29
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
22
|
+
"@fluid-topics/ft-button": "2.2.16",
|
|
23
|
+
"@fluid-topics/ft-checkbox": "2.2.16",
|
|
24
|
+
"@fluid-topics/ft-icon": "2.2.16",
|
|
25
|
+
"@fluid-topics/ft-radio": "2.2.16",
|
|
26
|
+
"@fluid-topics/ft-ripple": "2.2.16",
|
|
27
|
+
"@fluid-topics/ft-snap-scroll": "2.2.16",
|
|
28
|
+
"@fluid-topics/ft-typography": "2.2.16",
|
|
29
|
+
"@fluid-topics/ft-wc-utils": "2.2.16",
|
|
30
30
|
"lit": "3.3.3"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "c461a5d4f16255f9dd084cb26b2f988702693e2f"
|
|
33
33
|
}
|