@fluid-topics/ft-filterable-table 1.3.52 → 1.3.54
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.
|
@@ -1246,7 +1246,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
1246
1246
|
`;var _s=["top","right","bottom","left"],Is=["start","end"],li=_s.reduce((t,e)=>t.concat(e,e+"-"+Is[0],e+"-"+Is[1]),[]),Ps=Math.min,ks=Math.max;var Ad={left:"right",right:"left",bottom:"top",top:"bottom"},wd={start:"end",end:"start"};function ci(t,e,o){return ks(t,Ps(e,o))}function Eo(t,e){return typeof t=="function"?t(e):t}function Sr(t){return t.split("-")[0]}function It(t){return t.split("-")[1]}function di(t){return t==="x"?"y":"x"}function pi(t){return t==="y"?"height":"width"}function Ao(t){return["top","bottom"].includes(Sr(t))?"y":"x"}function ui(t){return di(Ao(t))}function Ds(t,e,o){o===void 0&&(o=!1);let n=It(t),i=ui(t),a=pi(i),s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=si(s)),[s,si(s)]}function $s(t){return t.replace(/start|end/g,e=>wd[e])}function si(t){return t.replace(/left|right|bottom|top/g,e=>Ad[e])}function Rd(t){return{top:0,right:0,bottom:0,left:0,...t}}function Bs(t){return typeof t!="number"?Rd(t):{top:t,right:t,bottom:t,left:t}}function Yt(t){let{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Ms(t,e,o){let{reference:n,floating:i}=t,a=Ao(e),s=ui(e),c=pi(s),p=Sr(e),u=a==="y",y=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[c]/2-i[c]/2,x;switch(p){case"top":x={x:y,y:n.y-i.height};break;case"bottom":x={x:y,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:h};break;case"left":x={x:n.x-i.width,y:h};break;default:x={x:n.x,y:n.y}}switch(It(e)){case"start":x[s]-=m*(o&&u?-1:1);break;case"end":x[s]+=m*(o&&u?-1:1);break}return x}var Us=async(t,e,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=o,c=a.filter(Boolean),p=await(s.isRTL==null?void 0:s.isRTL(e)),u=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:y,y:h}=Ms(u,n,p),m=n,x={},S=0;for(let C=0;C<c.length;C++){let{name:T,fn:R}=c[C],{x:L,y:$,data:W,reset:G}=await R({x:y,y:h,initialPlacement:n,placement:m,strategy:i,middlewareData:x,rects:u,platform:s,elements:{reference:t,floating:e}});y=L??y,h=$??h,x={...x,[T]:{...x[T],...W}},G&&S<=50&&(S++,typeof G=="object"&&(G.placement&&(m=G.placement),G.rects&&(u=G.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):G.rects),{x:y,y:h}=Ms(u,m,p)),C=-1)}return{x:y,y:h,placement:m,strategy:i,middlewareData:x}};async function fi(t,e){var o;e===void 0&&(e={});let{x:n,y:i,platform:a,rects:s,elements:c,strategy:p}=t,{boundary:u="clippingAncestors",rootBoundary:y="viewport",elementContext:h="floating",altBoundary:m=!1,padding:x=0}=Eo(e,t),S=Bs(x),T=c[m?h==="floating"?"reference":"floating":h],R=Yt(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(T)))==null||o?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:u,rootBoundary:y,strategy:p})),L=h==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),W=await(a.isElement==null?void 0:a.isElement($))?await(a.getScale==null?void 0:a.getScale($))||{x:1,y:1}:{x:1,y:1},G=Yt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:L,offsetParent:$,strategy:p}):L);return{top:(R.top-G.top+S.top)/W.y,bottom:(G.bottom-R.bottom+S.bottom)/W.y,left:(R.left-G.left+S.left)/W.x,right:(G.right-R.right+S.right)/W.x}}function Td(t,e,o){return(t?[...o.filter(i=>It(i)===t),...o.filter(i=>It(i)!==t)]:o.filter(i=>Sr(i)===i)).filter(i=>t?It(i)===t||(e?$s(i)!==i:!1):!0)}var hi=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;let{rects:a,middlewareData:s,placement:c,platform:p,elements:u}=e,{crossAxis:y=!1,alignment:h,allowedPlacements:m=li,autoAlignment:x=!0,...S}=Eo(t,e),C=h!==void 0||m===li?Td(h||null,x,m):m,T=await fi(e,S),R=((o=s.autoPlacement)==null?void 0:o.index)||0,L=C[R];if(L==null)return{};let $=Ds(L,a,await(p.isRTL==null?void 0:p.isRTL(u.floating)));if(c!==L)return{reset:{placement:C[0]}};let W=[T[Sr(L)],T[$[0]],T[$[1]]],G=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:L,overflows:W}],Ne=C[R+1];if(Ne)return{data:{index:R+1,overflows:G},reset:{placement:Ne}};let et=G.map(Se=>{let g=It(Se.placement);return[Se.placement,g&&y?Se.overflows.slice(0,2).reduce((v,k)=>v+k,0):Se.overflows[0],Se.overflows]}).sort((Se,g)=>Se[1]-g[1]),tt=((i=et.filter(Se=>Se[2].slice(0,It(Se[0])?2:3).every(g=>g<=0))[0])==null?void 0:i[0])||et[0][0];return tt!==c?{data:{index:R+1,overflows:G},reset:{placement:tt}}:{}}}};var yi=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:T=>{let{x:R,y:L}=T;return{x:R,y:L}}},...p}=Eo(t,e),u={x:o,y:n},y=await fi(e,p),h=Ao(Sr(i)),m=di(h),x=u[m],S=u[h];if(a){let T=m==="y"?"top":"left",R=m==="y"?"bottom":"right",L=x+y[T],$=x-y[R];x=ci(L,x,$)}if(s){let T=h==="y"?"top":"left",R=h==="y"?"bottom":"right",L=S+y[T],$=S-y[R];S=ci(L,S,$)}let C=c.fn({...e,[m]:x,[h]:S});return{...C,data:{x:C.x-o,y:C.y-n,enabled:{[m]:a,[h]:s}}}}}};var gi=Math.min,Or=Math.max,qr=Math.round;var mt=t=>({x:t,y:t});function bt(t){return zs(t)?(t.nodeName||"").toLowerCase():"#document"}function _e(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function xt(t){var e;return(e=(zs(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zs(t){return t instanceof Node||t instanceof _e(t).Node}function st(t){return t instanceof Element||t instanceof _e(t).Element}function Ze(t){return t instanceof HTMLElement||t instanceof _e(t).HTMLElement}function Fs(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _e(t).ShadowRoot}function Cr(t){let{overflow:e,overflowX:o,overflowY:n,display:i}=ke(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function Hs(t){return["table","td","th"].includes(bt(t))}function Ro(t){let e=To(),o=ke(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function Ws(t){let e=Xt(t);for(;Ze(e)&&!Yr(e);){if(Ro(e))return e;e=Xt(e)}return null}function To(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yr(t){return["html","body","#document"].includes(bt(t))}function ke(t){return _e(t).getComputedStyle(t)}function Xr(t){return st(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Xt(t){if(bt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Fs(t)&&t.host||xt(t);return Fs(e)?e.host:e}function Gs(t){let e=Xt(t);return Yr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ze(e)&&Cr(e)?e:Gs(e)}function wo(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);let i=Gs(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),s=_e(i);return a?e.concat(s,s.visualViewport||[],Cr(i)?i:[],s.frameElement&&o?wo(s.frameElement):[]):e.concat(i,wo(i,[],o))}function Ks(t){let e=ke(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=Ze(t),a=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=qr(o)!==a||qr(n)!==s;return c&&(o=a,n=s),{width:o,height:n,$:c}}function Zs(t){return st(t)?t:t.contextElement}function Er(t){let e=Zs(t);if(!Ze(e))return mt(1);let o=e.getBoundingClientRect(),{width:n,height:i,$:a}=Ks(e),s=(a?qr(o.width):o.width)/n,c=(a?qr(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Id=mt(0);function qs(t){let e=_e(t);return!To()||!e.visualViewport?Id:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _d(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==_e(t)?!1:e}function Qr(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);let i=t.getBoundingClientRect(),a=Zs(t),s=mt(1);e&&(n?st(n)&&(s=Er(n)):s=Er(t));let c=_d(a,o,n)?qs(a):mt(0),p=(i.left+c.x)/s.x,u=(i.top+c.y)/s.y,y=i.width/s.x,h=i.height/s.y;if(a){let m=_e(a),x=n&&st(n)?_e(n):n,S=m.frameElement;for(;S&&n&&x!==m;){let C=Er(S),T=S.getBoundingClientRect(),R=ke(S),L=T.left+(S.clientLeft+parseFloat(R.paddingLeft))*C.x,$=T.top+(S.clientTop+parseFloat(R.paddingTop))*C.y;p*=C.x,u*=C.y,y*=C.x,h*=C.y,p+=L,u+=$,S=_e(S).frameElement}}return Yt({width:y,height:h,x:p,y:u})}function Pd(t){let{rect:e,offsetParent:o,strategy:n}=t,i=Ze(o),a=xt(o);if(o===a)return e;let s={scrollLeft:0,scrollTop:0},c=mt(1),p=mt(0);if((i||!i&&n!=="fixed")&&((bt(o)!=="body"||Cr(a))&&(s=Xr(o)),Ze(o))){let u=Qr(o);c=Er(o),p.x=u.x+o.clientLeft,p.y=u.y+o.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-s.scrollLeft*c.x+p.x,y:e.y*c.y-s.scrollTop*c.y+p.y}}function kd(t){return Array.from(t.getClientRects())}function Ys(t){return Qr(xt(t)).left+Xr(t).scrollLeft}function Dd(t){let e=xt(t),o=Xr(t),n=t.ownerDocument.body,i=Or(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Or(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+Ys(t),c=-o.scrollTop;return ke(n).direction==="rtl"&&(s+=Or(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:c}}function $d(t,e){let o=_e(t),n=xt(t),i=o.visualViewport,a=n.clientWidth,s=n.clientHeight,c=0,p=0;if(i){a=i.width,s=i.height;let u=To();(!u||u&&e==="fixed")&&(c=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:c,y:p}}function Bd(t,e){let o=Qr(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,a=Ze(t)?Er(t):mt(1),s=t.clientWidth*a.x,c=t.clientHeight*a.y,p=i*a.x,u=n*a.y;return{width:s,height:c,x:p,y:u}}function js(t,e,o){let n;if(e==="viewport")n=$d(t,o);else if(e==="document")n=Dd(xt(t));else if(st(e))n=Bd(e,o);else{let i=qs(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Yt(n)}function Xs(t,e){let o=Xt(t);return o===e||!st(o)||Yr(o)?!1:ke(o).position==="fixed"||Xs(o,e)}function Md(t,e){let o=e.get(t);if(o)return o;let n=wo(t,[],!1).filter(c=>st(c)&&bt(c)!=="body"),i=null,a=ke(t).position==="fixed",s=a?Xt(t):t;for(;st(s)&&!Yr(s);){let c=ke(s),p=Ro(s);!p&&c.position==="fixed"&&(i=null),(a?!p&&!i:!p&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Cr(s)&&!p&&Xs(t,s))?n=n.filter(y=>y!==s):i=c,s=Xt(s)}return e.set(t,n),n}function Ud(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t,s=[...o==="clippingAncestors"?Md(e,this._c):[].concat(o),n],c=s[0],p=s.reduce((u,y)=>{let h=js(e,y,i);return u.top=Or(h.top,u.top),u.right=gi(h.right,u.right),u.bottom=gi(h.bottom,u.bottom),u.left=Or(h.left,u.left),u},js(e,c,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Fd(t){return Ks(t)}function zd(t,e,o){let n=Ze(e),i=xt(e),a=o==="fixed",s=Qr(t,!0,a,e),c={scrollLeft:0,scrollTop:0},p=mt(0);if(n||!n&&!a)if((bt(e)!=="body"||Cr(i))&&(c=Xr(e)),n){let u=Qr(e,!0,a,e);p.x=u.x+e.clientLeft,p.y=u.y+e.clientTop}else i&&(p.x=Ys(i));return{x:s.left+c.scrollLeft-p.x,y:s.top+c.scrollTop-p.y,width:s.width,height:s.height}}function Vs(t,e){return!Ze(t)||ke(t).position==="fixed"?null:e?e(t):t.offsetParent}function Qs(t,e){let o=_e(t);if(!Ze(t))return o;let n=Vs(t,e);for(;n&&Hs(n)&&ke(n).position==="static";)n=Vs(n,e);return n&&(bt(n)==="html"||bt(n)==="body"&&ke(n).position==="static"&&!Ro(n))?o:n||Ws(t)||o}var Hd=async function(t){let{reference:e,floating:o,strategy:n}=t,i=this.getOffsetParent||Qs,a=this.getDimensions;return{reference:zd(e,await i(o),n),floating:{x:0,y:0,...await a(o)}}};function Wd(t){return ke(t).direction==="rtl"}var Lo={convertOffsetParentRelativeRectToViewportRelativeRect:Pd,getDocumentElement:xt,getClippingRect:Ud,getOffsetParent:Qs,getElementRects:Hd,getClientRects:kd,getDimensions:Fd,getScale:Er,isElement:st,isRTL:Wd};var Js=(t,e,o)=>{let n=new Map,i={platform:Lo,...o},a={...i.platform,_c:n};return Us(t,e,{...i,platform:a})};function el(t){return Gd(t)}function mi(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Gd(t){for(let e=t;e;e=mi(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=mi(t);e;e=mi(e)){if(!(e instanceof Element))continue;let o=getComputedStyle(e);if(o.display!=="contents"&&(o.position!=="static"||o.filter!=="none"||e.tagName==="BODY"))return e}return null}async function tl(t,e,o){return Js(t,e,{platform:{...Lo,getOffsetParent:n=>Lo.getOffsetParent(n,el)},middleware:[yi({crossAxis:!0}),hi({allowedPlacements:[o]})]})}var Dr=b(I());var zc=b(I());var jl=b(V()),Ae=b(ie()),qe=b(I());var rl=b(V());var ol=rl.css`
|
|
1247
1247
|
`;var No=b(I()),jd="ft-app-info",Qt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Qt.eventName="authentication-change";var Vd={session:(t,e)=>{(0,No.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>N.dispatchEvent(new Qt(e.payload)),0))}},N=No.FtReduxStore.get({name:jd,reducers:Vd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var bi=b(I());var Jt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=N.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=N.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var Io=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Jt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Jt.await()}};var De=class extends Io{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[p])=>c.localeCompare(p)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new bi.CacheRegistry,this.cache=e?i.commonCache:new bi.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var _o=class extends De{async listMyBookmarks(){let e=N.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var xi=class{addCommand(e,o=!1){N.commands.add(e,o)}consumeCommand(e){return N.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xi;var ze=b(I());var nl,Ar=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Kd=Symbol("clearAfterUnitTest"),Po=class extends(0,ze.withEventBus)(De){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[nl]=()=>{this.defaultMessages={},this.cache=new ze.CacheRegistry,this.listeners={}},this.currentUiLocale=N.getState().uiLocale,N.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=N.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),o&&Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,ze.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var o,n;return this.fetchContext(e),(n=(o=this.cache.getNow(e))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,o){let n=e.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(e,o,...n){var i;let a=e.toLowerCase(),s=this.resolveContext(a);return new ze.ParametrizedLabelResolver((i=this.defaultMessages[a])!==null&&i!==void 0?i:{},s).resolve(o,...n)}async fetchContext(e){let o=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),o&&await this.notify(e)}catch(i){!(i instanceof ze.CanceledPromiseError)&&o&&console.error(i)}return n}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Ar({loadedContexts:e})),this.dispatchEvent(new Ar({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new Ar({loadedContexts:[e]})),this.dispatchEvent(new Ar({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,ze.delay)(0).then(()=>n()).catch(()=>null)))}};nl=Kd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Po{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Po{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Jr=window.FluidTopicsI18nService,vi=window.FluidTopicsCustomI18nService;var il=b(I()),Si=class{highlightHtml(e,o,n){(0,il.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Si;var qd=b(sl(),1);var ll;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(ll||(ll={}));var cl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(cl||(cl={}));var dl;(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"})(dl||(dl={}));var pl;(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"})(pl||(pl={}));var ul;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ul||(ul={}));var fl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(fl||(fl={}));var hl;(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__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",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__DISPLAY="TOPIC__DISPLAY",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"})(hl||(hl={}));var yl;(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"})(yl||(yl={}));var gl;(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"})(gl||(gl={}));var ml;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ml||(ml={}));var bl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(bl||(bl={}));var xl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(xl||(xl={}));var vl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(vl||(vl={}));var Sl;(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"})(Sl||(Sl={}));var Ol;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Ol||(Ol={}));var Cl;(function(t){t.ASC="ASC",t.DESC="DESC"})(Cl||(Cl={}));var El;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(El||(El={}));var Al;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Al||(Al={}));var wl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(wl||(wl={}));var Rl;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Rl||(Rl={}));var Tl;(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"})(Tl||(Tl={}));var Ll;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ll||(Ll={}));var Nl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Nl||(Nl={}));var Il;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Il||(Il={}));var _l;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(_l||(_l={}));var ye;(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.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_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.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ye||(ye={}));var He;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(He||(He={}));var Pl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Pl||(Pl={}));var kl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(kl||(kl={}));var Dl;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(Dl||(Dl={}));var $l;(function(t){t.TEXT="TEXT",t.HTML="HTML"})($l||($l={}));var Bl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Bl||(Bl={}));var Zd={[ye.PERSONAL_BOOK_SHARE_USER]:[ye.PERSONAL_BOOK_USER],[ye.HTML_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.PDF_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.KHUB_ADMIN]:[ye.CONTENT_PUBLISHER],[ye.ADMIN]:[ye.KHUB_ADMIN,ye.USERS_ADMIN,ye.PORTAL_ADMIN],[ye.GENERATIVE_AI_EXPORT_USER]:[ye.GENERATIVE_AI_USER]};function Ml(t,e){return t===e||(Zd[t]??[]).some(o=>Ml(o,e))}function Ul(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=>Ml(n,e))}var $o=class extends De{async listMySearches(){let{session:e}=N.getState();return Ul(e,ye.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Fl=b(I());var Oi=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=N.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return Fl.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:N.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new Oi;var zl=b(I());var eo=class{static get(e,o){var n,i;let a=N.getState(),{lang:s,region:c}=(i=(n=a.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new zl.SearchPlaceConverter(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,o??`${s}-${c}`)}};var Ci=class{urlToSearchRequest(e){return eo.get().parse(e)}searchRequestToUrl(e){return eo.get().serialize(e)}};window.FluidTopicsUrlService=new Ci;var Pt=b(I());var er=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};er.eventName="change";var Ei=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let o=sessionStorage.getItem(this.itemName(e));return o?JSON.parse(o):void 0}set(e,o){sessionStorage.setItem(this.itemName(e),JSON.stringify(o))}},Hl=new Ei;var Bo=class t extends Pt.WithEventBus{static build(){return new t(window.history,Hl,()=>window.location,!1)}constructor(e,o,n,i){var a,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(e,o=!1){let n=o&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Pt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new er(this.currentItem())),0)}installProxies(){let e=o=>(n,i,[a,s,c])=>{let p=o(),u={...p===this.currentIndex?this.currentState:void 0,...a,index:p,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(i,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let o=this.history.length-1;o>=0;o--)e?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(e){var o;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(o=e?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(er.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(er.eventName,e)}currentItem(){return(0,Pt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Pt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Pt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var o;let n=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;if(!n)return e;let i=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,n);)this.hasState(a)&&(i=a),a++;return i}buildCurrentState(){var e,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&o!==void 0?o:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,o){var n;if(!this.hasState(e))return!1;let i=o??this.currentState.majorStateId,a=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return a==null||a!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Bo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Wl=N;function Gl(t,e){var o;return Wl.getState().authenticationRequired&&!(!((o=Wl.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(e):t()}var ge=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ee=class extends qe.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Jt.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new qe.CacheRegistry,this.cleanSessionDebouncer=new qe.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return jl.html`
|
|
1248
1248
|
<slot></slot>
|
|
1249
|
-
`}connectedCallback(){super.connectedCallback(),N.addEventListener(Qt.eventName,this.reloadConfiguration)}disconnectedCallback(){N.addEventListener(Qt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,i,a,s,c,p;super.update(e),e.has("baseUrl")&&(N.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&N.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&N.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&N.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&N.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&N.actions.noCustom(this.noCustom),e.has("editorMode")&&N.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&N.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&N.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Jr.addContext(u)),e.has("openExternalDocumentInNewTab")&&N.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&N.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&N.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(N.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),N.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),N.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&N.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&N.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Gl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ee.elementDefinitions={};ee.styles=ol;ge([(0,Ae.property)()],ee.prototype,"baseUrl",void 0);ge([(0,Ae.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);ge([(0,Ae.property)()],ee.prototype,"apiIntegrationAppVersion",void 0);ge([(0,Ae.property)()],ee.prototype,"uiLocale",void 0);ge([(0,qe.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);ge([(0,qe.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"editorMode",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"noCustom",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);ge([(0,Ae.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);ge([(0,Ae.property)({type:Object})],ee.prototype,"apiProvider",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"authenticationRequired",void 0);ge([(0,qe.jsonProperty)([])],ee.prototype,"messageContexts",void 0);ge([(0,qe.jsonProperty)(void 0)],ee.prototype,"session",void 0);ge([(0,Ae.state)()],ee.prototype,"localesConfiguration",void 0);ge([(0,Ae.state)()],ee.prototype,"availableContentLocales",void 0);var qi=b(ie());function Yd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Mo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Mo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Mo(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Mo(t,e){try{return Yd(t,e)}catch{return!1}}function to(t,e){return!Mo(t,e)}function Uo(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let i=e(n);return i[t]=!0,i}}var Vl=b(ie(),1);var Ai=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:to,attribute:!1,...e};(0,Vl.property)(a)(o,n);let s=o.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})}};var Fo=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var tr=b(ie(),1);var Kl=b(ie(),1);function Zl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Kl.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:to,...e??{}})}var zo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Yl=b(V(),1);var Ho=globalThis,Xd=Ho.ShadowRoot&&(Ho.ShadyCSS===void 0||Ho.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,g0=Symbol();var ql=(t,e)=>{if(Xd)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Ho.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Wo=class extends Yl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ql(n,e.elementStyles),n}};function Xl(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var Tr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},tc,Ql=Symbol("constructorPrototype"),Jl=Symbol("constructorName"),rc=Symbol("exportpartsDebouncer"),ec=Symbol("dynamicDependenciesLoaded"),Rr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Rr.eventName="exportparts-updated";var lt=class extends Wo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[tc]=new zo(5),this.scheduleExportpartsUpdate=()=>{var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[rc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Jl]=this.constructor.name,this[Ql]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Jl]&&Object.setPrototypeOf(this,this[Ql])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[ec]||(o[ec]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Rr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Rr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Rr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=Xl(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=m=>m!=null&&m.trim().length>0,u=e.filter(p).map(m=>m.trim());if(u.length===0){this.exportparts=void 0;return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],S=(c=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],C=[...x,...S].filter(p).map(T=>T.trim());for(let T of C)y.add(T)}if(y.size===0){this.exportparts=void 0;return}let h=[...y.values()].flatMap(m=>u.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};tc=rc;Tr([(0,tr.property)()],lt.prototype,"exportpartsPrefix",void 0);Tr([Zl([])],lt.prototype,"exportpartsPrefixes",void 0);Tr([(0,tr.property)({reflect:!0})],lt.prototype,"exportparts",void 0);Tr([(0,tr.property)()],lt.prototype,"customStylesheet",void 0);Tr([(0,tr.property)()],lt.prototype,"elementToFocus",void 0);Tr([(0,tr.state)()],lt.prototype,"useAdoptedStyleSheets",void 0);function Go(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ro=Symbol("internalReduxEventsUnsubscribers"),kt=Symbol("internalStoresUnsubscribers"),rr=Symbol("internalStores"),Qd=Uo(Symbol("withRedux"),function(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=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[rr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[rr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[rr].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[rr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[rr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[rr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[kt].has(s.store):this[kt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[kt].set(s,c.subscribe(()=>this.updateFromStores())),this[ro].set(s,[]),Go(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,y)=>{if(typeof this[y]=="function"&&(!u.store||c.name===u.store)){let h=m=>this[y](m);c.addEventListener(u.eventName,h),this[ro].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[kt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[kt].has(s)&&this[kt].get(s)(),this[kt].delete(s),(c=this[ro].get(s))===null||c===void 0||c.forEach(p=>p()),this[ro].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=kt,o=rr,n=ro,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),oc=class extends Qd(lt){};function We(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vt(t){return!!t&&!!t[oe]}function Ye(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ap}(t)||Array.isArray(t)||!!t[dc]||!!(!((e=t.constructor)===null||e===void 0)&&e[dc])||ki(t)||Di(t))}function or(t,e,o){o===void 0&&(o=!1),Ir(t)===0?(o?Object.keys:Nr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ir(t){var e=t[oe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ki(t)?2:Di(t)?3:0}function Lr(t,e){return Ir(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Jd(t,e){return Ir(t)===2?t.get(e):t[e]}function pc(t,e,o){var n=Ir(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function uc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ki(t){return np&&t instanceof Map}function Di(t){return ip&&t instanceof Set}function Dt(t){return t.o||t.t}function $i(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=yc(t);delete e[oe];for(var o=Nr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Bi(t,e){return e===void 0&&(e=!1),Mi(t)||vt(t)||!Ye(t)||(Ir(t)>1&&(t.set=t.add=t.clear=t.delete=ep),Object.freeze(t),e&&or(t,function(o,n){return Bi(n,!0)},!0)),t}function ep(){We(2)}function Mi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ct(t){var e=Pi[t];return e||We(18,t),e}function tp(t,e){Pi[t]||(Pi[t]=e)}function Ni(){return no}function wi(t,e){e&&(ct("Patches"),t.u=[],t.s=[],t.v=e)}function jo(t){Ii(t),t.p.forEach(rp),t.p=null}function Ii(t){t===no&&(no=t.l)}function nc(t){return no={p:[],l:no,h:t,m:!0,_:0}}function rp(t){var e=t[oe];e.i===0||e.i===1?e.j():e.g=!0}function Ri(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||ct("ES5").S(e,t,n),n?(o[oe].P&&(jo(e),We(4)),Ye(t)&&(t=Vo(e,t),e.l||Ko(e,t)),e.u&&ct("Patches").M(o[oe].t,t,e.u,e.s)):t=Vo(e,o,[]),jo(e),e.u&&e.v(e.u,e.s),t!==hc?t:void 0}function Vo(t,e,o){if(Mi(e))return e;var n=e[oe];if(!n)return or(e,function(c,p){return ic(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Ko(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=$i(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),or(a,function(c,p){return ic(t,n,i,c,p,o,s)}),Ko(t,i,!1),o&&t.u&&ct("Patches").N(n,o,t.u,t.s)}return n.o}function ic(t,e,o,n,i,a,s){if(vt(i)){var c=Vo(t,i,a&&e&&e.i!==3&&!Lr(e.R,n)?a.concat(n):void 0);if(pc(o,n,c),!vt(c))return;t.m=!1}else s&&o.add(i);if(Ye(i)&&!Mi(i)){if(!t.h.D&&t._<1)return;Vo(t,i),e&&e.A.l||Ko(t,i)}}function Ko(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Bi(e,o)}function Ti(t,e){var o=t[oe];return(o?Dt(o):t)[e]}function ac(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function $t(t){t.P||(t.P=!0,t.l&&$t(t.l))}function Li(t){t.o||(t.o=$i(t.t))}function _i(t,e,o){var n=ki(e)?ct("MapSet").F(e,o):Di(e)?ct("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:Ni(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=io;s&&(p=[c],u=oo);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return c.k=m,c.j=h,m}(e,o):ct("ES5").J(e,o);return(o?o.A:Ni()).p.push(n),n}function op(t){return vt(t)||We(22,t),function e(o){if(!Ye(o))return o;var n,i=o[oe],a=Ir(o);if(i){if(!i.P&&(i.i<4||!ct("ES5").K(i)))return i.t;i.I=!0,n=sc(o,a),i.I=!1}else n=sc(o,a);return or(n,function(s,c){i&&Jd(i.t,s)===c||pc(n,s,e(c))}),a===3?new Set(n):n}(t)}function sc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $i(t)}function fc(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[oe];return io.get(u,s)},set:function(u){var y=this[oe];io.set(y,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][oe];if(!p.P)switch(p.i){case 5:n(p)&&$t(p);break;case 4:o(p)&&$t(p)}}}function o(s){for(var c=s.t,p=s.k,u=Nr(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==oe){var m=c[h];if(m===void 0&&!Lr(c,h))return!0;var x=p[h],S=x&&x[oe];if(S?S.t!==m:!uc(x,m))return!0}}var C=!!c[oe];return u.length!==Nr(c).length+(C?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&We(3,JSON.stringify(Dt(s)))}var a={};tp("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(h,m){if(h){for(var x=Array(m.length),S=0;S<m.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var C=yc(m);delete C[oe];for(var T=Nr(C),R=0;R<T.length;R++){var L=T[R];C[L]=t(L,h||!!C[L].enumerable)}return Object.create(Object.getPrototypeOf(m),C)}(p,s),y={i:p?5:4,A:c?c.A:Ni(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,oe,{value:y,writable:!0}),u},S:function(s,c,p){p?vt(c)&&c[oe].A===s&&e(s.p):(s.u&&function u(y){if(y&&typeof y=="object"){var h=y[oe];if(h){var m=h.t,x=h.k,S=h.R,C=h.i;if(C===4)or(x,function(W){W!==oe&&(m[W]!==void 0||Lr(m,W)?S[W]||u(x[W]):(S[W]=!0,$t(h)))}),or(m,function(W){x[W]!==void 0||Lr(x,W)||(S[W]=!1,$t(h))});else if(C===5){if(n(h)&&($t(h),S.length=!0),x.length<m.length)for(var T=x.length;T<m.length;T++)S[T]=!1;else for(var R=m.length;R<x.length;R++)S[R]=!0;for(var L=Math.min(x.length,m.length),$=0;$<L;$++)x.hasOwnProperty($)||(S[$]=!0),S[$]===void 0&&u(x[$])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var lc,no,Ui=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",np=typeof Map<"u",ip=typeof Set<"u",cc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hc=Ui?Symbol.for("immer-nothing"):((lc={})["immer-nothing"]=!0,lc),dc=Ui?Symbol.for("immer-draftable"):"__$immer_draftable",oe=Ui?Symbol.for("immer-state"):"__$immer_state";var ap=""+Object.prototype.constructor,Nr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,yc=Object.getOwnPropertyDescriptors||function(t){var e={};return Nr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Pi={},io={get:function(t,e){if(e===oe)return t;var o=Dt(t);if(!Lr(o,e))return function(i,a,s){var c,p=ac(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Ye(n)?n:n===Ti(t.t,e)?(Li(t),t.o[e]=_i(t.A.h,n,t)):n},has:function(t,e){return e in Dt(t)},ownKeys:function(t){return Reflect.ownKeys(Dt(t))},set:function(t,e,o){var n=ac(Dt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Ti(Dt(t),e),a=i?.[oe];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(uc(o,i)&&(o!==void 0||Lr(t.t,e)))return!0;Li(t),$t(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ti(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Li(t),$t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Dt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){We(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){We(12)}},oo={};or(io,function(t,e){oo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),oo.deleteProperty=function(t,e){return oo.set.call(this,t,e,void 0)},oo.set=function(t,e,o){return io.set.call(this,t[0],e,o,t[0])};var sp=function(){function t(o){var n=this;this.O=cc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(C){var T=this;C===void 0&&(C=c);for(var R=arguments.length,L=Array(R>1?R-1:0),$=1;$<R;$++)L[$-1]=arguments[$];return p.produce(C,function(W){var G;return(G=a).call.apply(G,[T,W].concat(L))})}}var u;if(typeof a!="function"&&We(6),s!==void 0&&typeof s!="function"&&We(7),Ye(i)){var y=nc(n),h=_i(n,i,void 0),m=!0;try{u=a(h),m=!1}finally{m?jo(y):Ii(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(C){return wi(y,s),Ri(C,y)},function(C){throw jo(y),C}):(wi(y,s),Ri(u,y))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===hc&&(u=void 0),n.D&&Bi(u,!0),s){var x=[],S=[];ct("Patches").M(i,u,x,S),s(x,S)}return u}We(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(x){return i.apply(void 0,[x].concat(h))})};var s,c,p=n.produce(i,a,function(u,y){s=u,c=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Ye(o)||We(8),vt(o)&&(o=op(o));var n=nc(this),i=_i(this,o,void 0);return i[oe].C=!0,Ii(n),i},e.finishDraft=function(o,n){var i=o&&o[oe],a=i.A;return wi(a,n),Ri(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!cc&&We(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=ct("Patches").$;return vt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),$e=new sp,lp=$e.produce,I0=$e.produceWithPatches.bind($e),_0=$e.setAutoFreeze.bind($e),P0=$e.setUseProxies.bind($e),k0=$e.applyPatches.bind($e),D0=$e.createDraft.bind($e),$0=$e.finishDraft.bind($e),Zo=lp;function nr(t){"@babel/helpers - typeof";return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(t)}function gc(t,e){if(nr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(nr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mc(t){var e=gc(t,"string");return nr(e)=="symbol"?e:e+""}function bc(t,e,o){return(e=mc(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function xc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Fi(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?xc(Object(o),!0).forEach(function(n){bc(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Re(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 vc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),zi=function(){return Math.random().toString(36).substring(7).split("").join(".")},qo={INIT:"@@redux/INIT"+zi(),REPLACE:"@@redux/REPLACE"+zi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zi()}};function cp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Hi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Re(1));return o(Hi)(t,e)}if(typeof t!="function")throw new Error(Re(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function y(){if(p)throw new Error(Re(3));return a}function h(C){if(typeof C!="function")throw new Error(Re(4));if(p)throw new Error(Re(5));var T=!0;return u(),c.push(C),function(){if(T){if(p)throw new Error(Re(6));T=!1,u();var L=c.indexOf(C);c.splice(L,1),s=null}}}function m(C){if(!cp(C))throw new Error(Re(7));if(typeof C.type>"u")throw new Error(Re(8));if(p)throw new Error(Re(9));try{p=!0,a=i(a,C)}finally{p=!1}for(var T=s=c,R=0;R<T.length;R++){var L=T[R];L()}return C}function x(C){if(typeof C!="function")throw new Error(Re(10));i=C,m({type:qo.REPLACE})}function S(){var C,T=h;return C={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(Re(11));function $(){L.next&&L.next(y())}$();var W=T($);return{unsubscribe:W}}},C[vc]=function(){return this},C}return m({type:qo.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:x},n[vc]=S,n}function dp(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:qo.INIT});if(typeof n>"u")throw new Error(Re(12));if(typeof o(void 0,{type:qo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Sc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{dp(o)}catch(p){c=p}return function(u,y){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var m=!1,x={},S=0;S<a.length;S++){var C=a[S],T=o[C],R=u[C],L=T(R,y);if(typeof L>"u"){var $=y&&y.type;throw new Error(Re(14))}x[C]=L,m=m||L!==R}return m=m||a.length!==Object.keys(u).length,m?x:u}}function _r(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Oc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Re(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=_r.apply(void 0,c)(i.dispatch),Fi(Fi({},i),{},{dispatch:a})}}}function Cc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Ec=Cc();Ec.withExtraArgument=Cc;var Wi=Ec;var Lc=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),pp=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(y){u=[6,y],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Pr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},up=Object.defineProperty,fp=Object.defineProperties,hp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,yp=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,wc=function(t,e,o){return e in t?up(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Bt=function(t,e){for(var o in e||(e={}))yp.call(e,o)&&wc(t,o,e[o]);if(Ac)for(var n=0,i=Ac(e);n<i.length;n++){var o=i[n];gp.call(e,o)&&wc(t,o,e[o])}return t},Gi=function(t,e){return fp(t,hp(e))},mp=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var bp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_r:_r.apply(null,arguments)},eS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function xp(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var vp=function(t){Lc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array),Sp=function(t){Lc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array);function Ki(t){return Ye(t)?Zo(t,function(){}):t}function Op(t){return typeof t=="boolean"}function Cp(){return function(e){return Ep(e)}}function Ep(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new vp;if(o&&(Op(o)?c.push(Wi):c.push(Wi.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var ji=!0;function Nc(t){var e=Cp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,x;if(typeof i=="function")x=i;else if(xp(i))x=Sc(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(e),!ji&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ji&&S.some(function(W){return typeof W!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Oc.apply(void 0,S),T=_r;p&&(T=bp(Bt({trace:!ji},typeof p=="object"&&p)));var R=new Sp(C),L=R;Array.isArray(m)?L=Pr([C],m):typeof m=="function"&&(L=m(R));var $=T.apply(void 0,L);return Hi(x,y,$)}function Mt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Bt(Bt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Ic(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Ap(t){return typeof t=="function"}function wp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Ic(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Ap(t))p=function(){return Ki(t())};else{var u=Ki(t);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var x=Pr([a[m.type]],s.filter(function(S){var C=S.matcher;return C(m)}).map(function(S){var C=S.reducer;return C}));return x.filter(function(S){return!!S}).length===0&&(x=[c]),x.reduce(function(S,C){if(C)if(vt(S)){var T=S,R=C(T,m);return R===void 0?S:R}else{if(Ye(S))return Zo(S,function(L){return C(L,m)});var R=C(S,m);if(R===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return S},h)}return y.getInitialState=p,y}function Rp(t,e){return t+"/"+e}function _c(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Ki(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(y){var h=n[y],m=Rp(e,y),x,S;"reducer"in h?(x=h.reducer,S=h.prepare):x=h,a[y]=x,s[m]=x,c[y]=S?Mt(m,S):Mt(m)});function p(){var y=typeof t.extraReducers=="function"?Ic(t.extraReducers):[t.extraReducers],h=y[0],m=h===void 0?{}:h,x=y[1],S=x===void 0?[]:x,C=y[2],T=C===void 0?void 0:C,R=Bt(Bt({},m),s);return wp(o,function(L){for(var $ in R)L.addCase($,R[$]);for(var W=0,G=S;W<G.length;W++){var Ne=G[W];L.addMatcher(Ne.matcher,Ne.reducer)}T&&L.addDefaultCase(T)})}var u;return{name:e,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Tp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Tp[Math.random()*64|0];return e},Np=["name","message","stack","code"],Vi=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Rc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ip=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Np;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},nS=function(){function t(e,o,n){var i=Mt(e+"/fulfilled",function(y,h,m,x){return{payload:y,meta:Gi(Bt({},x||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),a=Mt(e+"/pending",function(y,h,m){return{payload:void 0,meta:Gi(Bt({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),s=Mt(e+"/rejected",function(y,h,m,x,S){return{payload:x,error:(n&&n.serializeError||Ip)(y||"Rejected"),meta:Gi(Bt({},S||{}),{arg:m,requestId:h,rejectedWithValue:!!x,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,x){var S=n?.idGenerator?n.idGenerator(y):Lp(),C=new p,T,R=!1;function L(W){T=W,C.abort()}var $=function(){return mp(this,null,function(){var W,G,Ne,et,Te,tt,Se;return pp(this,function(g){switch(g.label){case 0:return g.trys.push([0,4,,5]),et=(W=n?.condition)==null?void 0:W.call(n,y,{getState:m,extra:x}),Pp(et)?[4,et]:[3,2];case 1:et=g.sent(),g.label=2;case 2:if(et===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Te=new Promise(function(v,k){return C.signal.addEventListener("abort",function(){return k({name:"AbortError",message:T||"Aborted"})})}),h(a(S,y,(G=n?.getPendingMeta)==null?void 0:G.call(n,{requestId:S,arg:y},{getState:m,extra:x}))),[4,Promise.race([Te,Promise.resolve(o(y,{dispatch:h,getState:m,extra:x,requestId:S,signal:C.signal,abort:L,rejectWithValue:function(v,k){return new Vi(v,k)},fulfillWithValue:function(v,k){return new Rc(v,k)}})).then(function(v){if(v instanceof Vi)throw v;return v instanceof Rc?i(v.payload,S,y,v.meta):i(v,S,y)})])];case 3:return Ne=g.sent(),[3,5];case 4:return tt=g.sent(),Ne=tt instanceof Vi?s(null,S,y,tt.payload,tt.meta):s(tt,S,y),[3,5];case 5:return Se=n&&!n.dispatchConditionRejection&&s.match(Ne)&&Ne.meta.condition,Se||h(Ne),[2,Ne]}})})}();return Object.assign($,{abort:L,requestId:S,arg:y,unwrap:function(){return $.then(_p)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function _p(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Pp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Pc="listener",kc="completed",Dc="cancelled",iS="task-"+Dc,aS="task-"+kc,sS=Pc+"-"+Dc,lS=Pc+"-"+kc;var Zi="listenerMiddleware";var cS=Mt(Zi+"/add"),dS=Mt(Zi+"/removeAll"),pS=Mt(Zi+"/remove");var Tc,uS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Tc||(Tc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},kp=function(t){return function(e){setTimeout(e,t)}},fS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kp(10);fc();var Dp=Uo(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Yo=class extends Dp(Object){};window.ftReduxStores||(window.ftReduxStores={});var $c=class t extends Yo{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Go(a))return a;if(i==null)return;let s=_c({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Nc({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Fo;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...y)=>{let h=u(...y.map(i));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[p]:i(y)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Xo=class{static format(e,o,n,i){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(e,o,n,i)}static getMomentDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,i){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(a);if(!i)return s;let c=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var Bc=b(I()),Qo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},BS=(0,Bc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(N)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>Xo.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Qo([(0,qi.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Qo([(0,qi.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Qo([Ai({store:N.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),Qo([Ai({store:N.name})],e.prototype,"uiLocale",void 0),e});var tn=b(I());var Jo=class extends De{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=N.getState().session;return!!e?.sessionAuthenticated}};var en=class extends De{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=N.getState().session;return!!e?.sessionAuthenticated}};var $p="ft-user-assets",Bp={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(He).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:o,mapId:n,asset:i}=e.payload;Xi(t,o,[...Yi(t,o),i]),Mc(t,o,1,n),Uc(t,i)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;Xi(t,o,Yi(t,o).map(i=>i.id===n.id?n:i)),Uc(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:i}=e.payload;Xi(t,o,Yi(t,o).filter(a=>a.id!==i)),Mc(t,o,-1,n)}},Fc={[He.SEARCHES]:"savedSearches",[He.BOOKMARKS]:"bookmarks",[He.BOOKS]:void 0,[He.COLLECTIONS]:void 0},Yi=(t,e)=>{var o;let n=Fc[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},Xi=(t,e,o)=>{let n=Fc[e];n&&(t[n]=o)},Mc=(t,e,o,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+o),e===He.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+o)}},Uc=(t,e)=>{let o=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},Be=tn.FtReduxStore.get({name:$p,reducers:Bp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(He).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Qi=class{constructor(e=new Jo,o=new en){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=N.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new _o,this.savedSearchesService=new $o,N.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=N.getState();(0,tn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Be.actions.clearAssetCount(),Be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Be.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&Be.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&Be.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(Be.getState().assetCounts.bookmarkByMap).length!==0;e===He.BOOKMARKS&&o&&Be.actions.clearBookmarkCountByMap(),Be.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Be.actions.bookmarks(o)}}},Mp=new Qi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Mp);(0,zc.customElement)("ft-app-context")(ee);var Hc=b(ie());var Ji=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,i]=e.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},kr=new Ji;var Up=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},so=Symbol("i18nAttributes"),Wc=Symbol("i18nListAttributes"),Gc=Symbol("i18nProperties"),rn=Symbol("i18nContexts"),ao=Symbol("i18nUnsubs"),jc=(0,Dr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?vi:Jr}i18n(a){let{context:s,key:c,message:p}=a,{custom:u,args:y,argsProvider:h}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let m=y??(h?h(this):[]);return this.getI18nService(u).resolveMessage(s,c,...m)}return p}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(kr.isI18nKey(a)){let[c,p]=a.split(".");return this.i18n({custom:!0,context:c,key:p,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,p)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let p=this,u=(y,h,m)=>m?.context&&m.key&&a(y,h,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...y})}:m;(s=this[so])===null||s===void 0||s.forEach((y,h)=>p[h]=u(y,h,p[h])),(c=this[Wc])===null||c===void 0||c.forEach((y,h)=>{var m;return p[h]=(m=p[h])===null||m===void 0?void 0:m.map(x=>u(y,h,x))})}updateI18nProperties(a){var s;(s=this[Gc])===null||s===void 0||s.forEach((c,p)=>{a(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let p=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[rn].set(p,{isCustomContext:c}),this[ao].has(p)||this[ao].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,s)}hasI18nContext(a){return this[rn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[rn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ao].forEach(a=>a()),this[ao].clear()}}return e=rn,o=ao,Up([(0,Hc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),on=class extends jc(Dr.FtLitElement){},nn=class extends jc(Dr.FtLitElementRedux){};var Vc=b(I());var ea=class{fromAttribute(e){if(!e)return[];try{let o=JSON.parse(e);return Array.isArray(o)?o.map(n=>typeof n=="string"?kr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Fp=new ea;var Kc=(t,e)=>(o,n)=>{var i;o.constructor.createProperty(n,{type:Object,hasChanged:Vc.hasChanged,converter:kr,...e}),o[so]=(i=o[so])!==null&&i!==void 0?i:new Map,o[so].set(n,t??{})};var Yc=b(I());var an=b(V()),sn=b(ie()),ln=b(I());var Zc=b(V());var qc=Zc.css`
|
|
1249
|
+
`}connectedCallback(){super.connectedCallback(),N.addEventListener(Qt.eventName,this.reloadConfiguration)}disconnectedCallback(){N.addEventListener(Qt.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,i,a,s,c,p;super.update(e),e.has("baseUrl")&&(N.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&N.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&N.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&N.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&N.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&N.actions.noCustom(this.noCustom),e.has("editorMode")&&N.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&N.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&N.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(u=>Jr.addContext(u)),e.has("openExternalDocumentInNewTab")&&N.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&N.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&N.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(N.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),N.actions.availableUiLocales((i=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&i!==void 0?i:[]),N.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&N.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&N.actions.availableContentLocales((p=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Gl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};ee.elementDefinitions={};ee.styles=ol;ge([(0,Ae.property)()],ee.prototype,"baseUrl",void 0);ge([(0,Ae.property)()],ee.prototype,"apiIntegrationIdentifier",void 0);ge([(0,Ae.property)()],ee.prototype,"apiIntegrationAppVersion",void 0);ge([(0,Ae.property)()],ee.prototype,"uiLocale",void 0);ge([(0,qe.jsonProperty)(null)],ee.prototype,"availableUiLocales",void 0);ge([(0,qe.jsonProperty)(null)],ee.prototype,"metadataConfiguration",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"editorMode",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"noCustom",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"openExternalDocumentInNewTab",void 0);ge([(0,Ae.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ee.prototype,"noCustomComponent",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"withManualResources",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"navigatorOnline",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"forcedOffline",void 0);ge([(0,Ae.property)({type:Object})],ee.prototype,"apiProvider",void 0);ge([(0,Ae.property)({type:Boolean})],ee.prototype,"authenticationRequired",void 0);ge([(0,qe.jsonProperty)([])],ee.prototype,"messageContexts",void 0);ge([(0,qe.jsonProperty)(void 0)],ee.prototype,"session",void 0);ge([(0,Ae.state)()],ee.prototype,"localesConfiguration",void 0);ge([(0,Ae.state)()],ee.prototype,"availableContentLocales",void 0);var qi=b(ie());function Yd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Mo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Mo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(c=>s[c]!=null);if(i=a(t),o=i.length,o!==a(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Mo(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Mo(t,e){try{return Yd(t,e)}catch{return!1}}function to(t,e){return!Mo(t,e)}function Uo(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let i=e(n);return i[t]=!0,i}}var Vl=b(ie(),1);var Ai=t=>{let e=t??{};return(o,n)=>{var i;let a={hasChanged:to,attribute:!1,...e};(0,Vl.property)(a)(o,n);let s=o.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})}};var Fo=class{constructor(){this.queue=[]}add(e,o=!1){o&&this.clear(e.type),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(e){typeof e=="string"?this.queue=this.queue.filter(o=>o.type!==e):this.queue=this.queue.filter(o=>!e.test(o.type))}};var tr=b(ie(),1);var Kl=b(ie(),1);function Zl(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Kl.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:to,...e??{}})}var zo=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){i(c);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Yl=b(V(),1);var Ho=globalThis,Xd=Ho.ShadowRoot&&(Ho.ShadyCSS===void 0||Ho.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,g0=Symbol();var ql=(t,e)=>{if(Xd)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),i=Ho.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)}};var Wo=class extends Yl.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ql(n,e.elementStyles),n}};function Xl(t,e,...o){var n;let i=t.querySelector(e);for(let a of o)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(a);return i}var Tr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},tc,Ql=Symbol("constructorPrototype"),Jl=Symbol("constructorName"),rc=Symbol("exportpartsDebouncer"),ec=Symbol("dynamicDependenciesLoaded"),Rr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Rr.eventName="exportparts-updated";var lt=class extends Wo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[tc]=new zo(5),this.scheduleExportpartsUpdate=()=>{var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[rc].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Jl]=this.constructor.name,this[Ql]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Jl]&&Object.setPrototypeOf(this,this[Ql])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[ec]||(o[ec]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Rr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Rr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new Rr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let a=[...i??[],n];o=Xl(this.shadowRoot,...a)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}setExportpartsAttribute(e){var o,n,i,a,s,c;let p=m=>m!=null&&m.trim().length>0,u=e.filter(p).map(m=>m.trim());if(u.length===0){this.exportparts=void 0;return}let y=new Set;for(let m of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=m.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],S=(c=(s=m.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(T=>T.split(":")[1]))!==null&&c!==void 0?c:[],C=[...x,...S].filter(p).map(T=>T.trim());for(let T of C)y.add(T)}if(y.size===0){this.exportparts=void 0;return}let h=[...y.values()].flatMap(m=>u.map(x=>`${m}:${x}--${m}`));this.exportparts=[...this.part,...h].join(", ")}};tc=rc;Tr([(0,tr.property)()],lt.prototype,"exportpartsPrefix",void 0);Tr([Zl([])],lt.prototype,"exportpartsPrefixes",void 0);Tr([(0,tr.property)({reflect:!0})],lt.prototype,"exportparts",void 0);Tr([(0,tr.property)()],lt.prototype,"customStylesheet",void 0);Tr([(0,tr.property)()],lt.prototype,"elementToFocus",void 0);Tr([(0,tr.state)()],lt.prototype,"useAdoptedStyleSheets",void 0);function Go(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ro=Symbol("internalReduxEventsUnsubscribers"),kt=Symbol("internalStoresUnsubscribers"),rr=Symbol("internalStores"),Qd=Uo(Symbol("withRedux"),function(t){var e,o,n;class i extends t{constructor(){super(...arguments),this[e]=new Map,this[o]=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[rr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[rr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[rr].get(s)}addStore(s,c){var p;c=(p=c??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(c),this[rr].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[rr].delete(c)}setupStores(){this.unsubscribeFromStores(),this[rr].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let p=this.constructor.getPropertyOptions(c);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[kt].has(s.store):this[kt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var p;this[kt].set(s,c.subscribe(()=>this.updateFromStores())),this[ro].set(s,[]),Go(c)&&c.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((u,y)=>{if(typeof this[y]=="function"&&(!u.store||c.name===u.store)){let h=m=>this[y](m);c.addEventListener(u.eventName,h),this[ro].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[kt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[kt].has(s)&&this[kt].get(s)(),this[kt].delete(s),(c=this[ro].get(s))===null||c===void 0||c.forEach(p=>p()),this[ro].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=kt,o=rr,n=ro,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),oc=class extends Qd(lt){};function We(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vt(t){return!!t&&!!t[oe]}function Ye(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===ap}(t)||Array.isArray(t)||!!t[dc]||!!(!((e=t.constructor)===null||e===void 0)&&e[dc])||ki(t)||Di(t))}function or(t,e,o){o===void 0&&(o=!1),Ir(t)===0?(o?Object.keys:Nr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Ir(t){var e=t[oe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ki(t)?2:Di(t)?3:0}function Lr(t,e){return Ir(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Jd(t,e){return Ir(t)===2?t.get(e):t[e]}function pc(t,e,o){var n=Ir(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function uc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ki(t){return np&&t instanceof Map}function Di(t){return ip&&t instanceof Set}function Dt(t){return t.o||t.t}function $i(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=yc(t);delete e[oe];for(var o=Nr(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Bi(t,e){return e===void 0&&(e=!1),Mi(t)||vt(t)||!Ye(t)||(Ir(t)>1&&(t.set=t.add=t.clear=t.delete=ep),Object.freeze(t),e&&or(t,function(o,n){return Bi(n,!0)},!0)),t}function ep(){We(2)}function Mi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ct(t){var e=Pi[t];return e||We(18,t),e}function tp(t,e){Pi[t]||(Pi[t]=e)}function Ni(){return no}function wi(t,e){e&&(ct("Patches"),t.u=[],t.s=[],t.v=e)}function jo(t){Ii(t),t.p.forEach(rp),t.p=null}function Ii(t){t===no&&(no=t.l)}function nc(t){return no={p:[],l:no,h:t,m:!0,_:0}}function rp(t){var e=t[oe];e.i===0||e.i===1?e.j():e.g=!0}function Ri(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||ct("ES5").S(e,t,n),n?(o[oe].P&&(jo(e),We(4)),Ye(t)&&(t=Vo(e,t),e.l||Ko(e,t)),e.u&&ct("Patches").M(o[oe].t,t,e.u,e.s)):t=Vo(e,o,[]),jo(e),e.u&&e.v(e.u,e.s),t!==hc?t:void 0}function Vo(t,e,o){if(Mi(e))return e;var n=e[oe];if(!n)return or(e,function(c,p){return ic(t,n,e,c,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return Ko(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=$i(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),or(a,function(c,p){return ic(t,n,i,c,p,o,s)}),Ko(t,i,!1),o&&t.u&&ct("Patches").N(n,o,t.u,t.s)}return n.o}function ic(t,e,o,n,i,a,s){if(vt(i)){var c=Vo(t,i,a&&e&&e.i!==3&&!Lr(e.R,n)?a.concat(n):void 0);if(pc(o,n,c),!vt(c))return;t.m=!1}else s&&o.add(i);if(Ye(i)&&!Mi(i)){if(!t.h.D&&t._<1)return;Vo(t,i),e&&e.A.l||Ko(t,i)}}function Ko(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Bi(e,o)}function Ti(t,e){var o=t[oe];return(o?Dt(o):t)[e]}function ac(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function $t(t){t.P||(t.P=!0,t.l&&$t(t.l))}function Li(t){t.o||(t.o=$i(t.t))}function _i(t,e,o){var n=ki(e)?ct("MapSet").F(e,o):Di(e)?ct("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),c={i:s?1:0,A:a?a.A:Ni(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=c,u=io;s&&(p=[c],u=oo);var y=Proxy.revocable(p,u),h=y.revoke,m=y.proxy;return c.k=m,c.j=h,m}(e,o):ct("ES5").J(e,o);return(o?o.A:Ni()).p.push(n),n}function op(t){return vt(t)||We(22,t),function e(o){if(!Ye(o))return o;var n,i=o[oe],a=Ir(o);if(i){if(!i.P&&(i.i<4||!ct("ES5").K(i)))return i.t;i.I=!0,n=sc(o,a),i.I=!1}else n=sc(o,a);return or(n,function(s,c){i&&Jd(i.t,s)===c||pc(n,s,e(c))}),a===3?new Set(n):n}(t)}function sc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $i(t)}function fc(){function t(s,c){var p=a[s];return p?p.enumerable=c:a[s]=p={configurable:!0,enumerable:c,get:function(){var u=this[oe];return io.get(u,s)},set:function(u){var y=this[oe];io.set(y,s,u)}},p}function e(s){for(var c=s.length-1;c>=0;c--){var p=s[c][oe];if(!p.P)switch(p.i){case 5:n(p)&&$t(p);break;case 4:o(p)&&$t(p)}}}function o(s){for(var c=s.t,p=s.k,u=Nr(p),y=u.length-1;y>=0;y--){var h=u[y];if(h!==oe){var m=c[h];if(m===void 0&&!Lr(c,h))return!0;var x=p[h],S=x&&x[oe];if(S?S.t!==m:!uc(x,m))return!0}}var C=!!c[oe];return u.length!==Nr(c).length+(C?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(c,c.length-1);if(p&&!p.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function i(s){s.g&&We(3,JSON.stringify(Dt(s)))}var a={};tp("ES5",{J:function(s,c){var p=Array.isArray(s),u=function(h,m){if(h){for(var x=Array(m.length),S=0;S<m.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var C=yc(m);delete C[oe];for(var T=Nr(C),R=0;R<T.length;R++){var L=T[R];C[L]=t(L,h||!!C[L].enumerable)}return Object.create(Object.getPrototypeOf(m),C)}(p,s),y={i:p?5:4,A:c?c.A:Ni(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,oe,{value:y,writable:!0}),u},S:function(s,c,p){p?vt(c)&&c[oe].A===s&&e(s.p):(s.u&&function u(y){if(y&&typeof y=="object"){var h=y[oe];if(h){var m=h.t,x=h.k,S=h.R,C=h.i;if(C===4)or(x,function(W){W!==oe&&(m[W]!==void 0||Lr(m,W)?S[W]||u(x[W]):(S[W]=!0,$t(h)))}),or(m,function(W){x[W]!==void 0||Lr(x,W)||(S[W]=!1,$t(h))});else if(C===5){if(n(h)&&($t(h),S.length=!0),x.length<m.length)for(var T=x.length;T<m.length;T++)S[T]=!1;else for(var R=m.length;R<x.length;R++)S[R]=!0;for(var L=Math.min(x.length,m.length),$=0;$<L;$++)x.hasOwnProperty($)||(S[$]=!0),S[$]===void 0&&u(x[$])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var lc,no,Ui=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",np=typeof Map<"u",ip=typeof Set<"u",cc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hc=Ui?Symbol.for("immer-nothing"):((lc={})["immer-nothing"]=!0,lc),dc=Ui?Symbol.for("immer-draftable"):"__$immer_draftable",oe=Ui?Symbol.for("immer-state"):"__$immer_state";var ap=""+Object.prototype.constructor,Nr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,yc=Object.getOwnPropertyDescriptors||function(t){var e={};return Nr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},Pi={},io={get:function(t,e){if(e===oe)return t;var o=Dt(t);if(!Lr(o,e))return function(i,a,s){var c,p=ac(a,s);return p?"value"in p?p.value:(c=p.get)===null||c===void 0?void 0:c.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Ye(n)?n:n===Ti(t.t,e)?(Li(t),t.o[e]=_i(t.A.h,n,t)):n},has:function(t,e){return e in Dt(t)},ownKeys:function(t){return Reflect.ownKeys(Dt(t))},set:function(t,e,o){var n=ac(Dt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=Ti(Dt(t),e),a=i?.[oe];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(uc(o,i)&&(o!==void 0||Lr(t.t,e)))return!0;Li(t),$t(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ti(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Li(t),$t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Dt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){We(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){We(12)}},oo={};or(io,function(t,e){oo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),oo.deleteProperty=function(t,e){return oo.set.call(this,t,e,void 0)},oo.set=function(t,e,o){return io.set.call(this,t[0],e,o,t[0])};var sp=function(){function t(o){var n=this;this.O=cc,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var c=a;a=i;var p=n;return function(C){var T=this;C===void 0&&(C=c);for(var R=arguments.length,L=Array(R>1?R-1:0),$=1;$<R;$++)L[$-1]=arguments[$];return p.produce(C,function(W){var G;return(G=a).call.apply(G,[T,W].concat(L))})}}var u;if(typeof a!="function"&&We(6),s!==void 0&&typeof s!="function"&&We(7),Ye(i)){var y=nc(n),h=_i(n,i,void 0),m=!0;try{u=a(h),m=!1}finally{m?jo(y):Ii(y)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(C){return wi(y,s),Ri(C,y)},function(C){throw jo(y),C}):(wi(y,s),Ri(u,y))}if(!i||typeof i!="object"){if((u=a(i))===void 0&&(u=i),u===hc&&(u=void 0),n.D&&Bi(u,!0),s){var x=[],S=[];ct("Patches").M(i,u,x,S),s(x,S)}return u}We(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(u){for(var y=arguments.length,h=Array(y>1?y-1:0),m=1;m<y;m++)h[m-1]=arguments[m];return n.produceWithPatches(u,function(x){return i.apply(void 0,[x].concat(h))})};var s,c,p=n.produce(i,a,function(u,y){s=u,c=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(u){return[u,s,c]}):[p,s,c]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Ye(o)||We(8),vt(o)&&(o=op(o));var n=nc(this),i=_i(this,o,void 0);return i[oe].C=!0,Ii(n),i},e.finishDraft=function(o,n){var i=o&&o[oe],a=i.A;return wi(a,n),Ri(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!cc&&We(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=ct("Patches").$;return vt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),$e=new sp,lp=$e.produce,I0=$e.produceWithPatches.bind($e),_0=$e.setAutoFreeze.bind($e),P0=$e.setUseProxies.bind($e),k0=$e.applyPatches.bind($e),D0=$e.createDraft.bind($e),$0=$e.finishDraft.bind($e),Zo=lp;function nr(t){"@babel/helpers - typeof";return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(t)}function gc(t,e){if(nr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(nr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mc(t){var e=gc(t,"string");return nr(e)=="symbol"?e:e+""}function bc(t,e,o){return(e=mc(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function xc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Fi(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?xc(Object(o),!0).forEach(function(n){bc(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Re(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 vc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),zi=function(){return Math.random().toString(36).substring(7).split("").join(".")},qo={INIT:"@@redux/INIT"+zi(),REPLACE:"@@redux/REPLACE"+zi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zi()}};function cp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Hi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Re(1));return o(Hi)(t,e)}if(typeof t!="function")throw new Error(Re(2));var i=t,a=e,s=[],c=s,p=!1;function u(){c===s&&(c=s.slice())}function y(){if(p)throw new Error(Re(3));return a}function h(C){if(typeof C!="function")throw new Error(Re(4));if(p)throw new Error(Re(5));var T=!0;return u(),c.push(C),function(){if(T){if(p)throw new Error(Re(6));T=!1,u();var L=c.indexOf(C);c.splice(L,1),s=null}}}function m(C){if(!cp(C))throw new Error(Re(7));if(typeof C.type>"u")throw new Error(Re(8));if(p)throw new Error(Re(9));try{p=!0,a=i(a,C)}finally{p=!1}for(var T=s=c,R=0;R<T.length;R++){var L=T[R];L()}return C}function x(C){if(typeof C!="function")throw new Error(Re(10));i=C,m({type:qo.REPLACE})}function S(){var C,T=h;return C={subscribe:function(L){if(typeof L!="object"||L===null)throw new Error(Re(11));function $(){L.next&&L.next(y())}$();var W=T($);return{unsubscribe:W}}},C[vc]=function(){return this},C}return m({type:qo.INIT}),n={dispatch:m,subscribe:h,getState:y,replaceReducer:x},n[vc]=S,n}function dp(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:qo.INIT});if(typeof n>"u")throw new Error(Re(12));if(typeof o(void 0,{type:qo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Sc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,c;try{dp(o)}catch(p){c=p}return function(u,y){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var m=!1,x={},S=0;S<a.length;S++){var C=a[S],T=o[C],R=u[C],L=T(R,y);if(typeof L>"u"){var $=y&&y.type;throw new Error(Re(14))}x[C]=L,m=m||L!==R}return m=m||a.length!==Object.keys(u).length,m?x:u}}function _r(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Oc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(Re(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=e.map(function(p){return p(s)});return a=_r.apply(void 0,c)(i.dispatch),Fi(Fi({},i),{},{dispatch:a})}}}function Cc(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(c){return typeof c=="function"?c(i,a,t):s(c)}}};return e}var Ec=Cc();Ec.withExtraArgument=Cc;var Wi=Ec;var Lc=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),pp=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(y){return p([u,y])}}function p(u){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,i=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(y){u=[6,y],i=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Pr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},up=Object.defineProperty,fp=Object.defineProperties,hp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,yp=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,wc=function(t,e,o){return e in t?up(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Bt=function(t,e){for(var o in e||(e={}))yp.call(e,o)&&wc(t,o,e[o]);if(Ac)for(var n=0,i=Ac(e);n<i.length;n++){var o=i[n];gp.call(e,o)&&wc(t,o,e[o])}return t},Gi=function(t,e){return fp(t,hp(e))},mp=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{c(o.next(p))}catch(u){i(u)}},s=function(p){try{c(o.throw(p))}catch(u){i(u)}},c=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};c((o=o.apply(t,e)).next())})};var bp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_r:_r.apply(null,arguments)},eS=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function xp(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var vp=function(t){Lc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array),Sp=function(t){Lc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Pr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Pr([void 0],o.concat(this))))},e}(Array);function Ki(t){return Ye(t)?Zo(t,function(){}):t}function Op(t){return typeof t=="boolean"}function Cp(){return function(e){return Ep(e)}}function Ep(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,c=new vp;if(o&&(Op(o)?c.push(Wi):c.push(Wi.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var u}return c}var ji=!0;function Nc(t){var e=Cp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,c=o.devTools,p=c===void 0?!0:c,u=o.preloadedState,y=u===void 0?void 0:u,h=o.enhancers,m=h===void 0?void 0:h,x;if(typeof i=="function")x=i;else if(xp(i))x=Sc(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(e),!ji&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ji&&S.some(function(W){return typeof W!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Oc.apply(void 0,S),T=_r;p&&(T=bp(Bt({trace:!ji},typeof p=="object"&&p)));var R=new Sp(C),L=R;Array.isArray(m)?L=Pr([C],m):typeof m=="function"&&(L=m(R));var $=T.apply(void 0,L);return Hi(x,y,$)}function Mt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return Bt(Bt({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function Ic(t){var e={},o=[],n,i={addCase:function(a,s){var c=typeof a=="string"?a:a.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function Ap(t){return typeof t=="function"}function wp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?Ic(e):[e,o,n],a=i[0],s=i[1],c=i[2],p;if(Ap(t))p=function(){return Ki(t())};else{var u=Ki(t);p=function(){return u}}function y(h,m){h===void 0&&(h=p());var x=Pr([a[m.type]],s.filter(function(S){var C=S.matcher;return C(m)}).map(function(S){var C=S.reducer;return C}));return x.filter(function(S){return!!S}).length===0&&(x=[c]),x.reduce(function(S,C){if(C)if(vt(S)){var T=S,R=C(T,m);return R===void 0?S:R}else{if(Ye(S))return Zo(S,function(L){return C(L,m)});var R=C(S,m);if(R===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return S},h)}return y.getInitialState=p,y}function Rp(t,e){return t+"/"+e}function _c(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Ki(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},c={};i.forEach(function(y){var h=n[y],m=Rp(e,y),x,S;"reducer"in h?(x=h.reducer,S=h.prepare):x=h,a[y]=x,s[m]=x,c[y]=S?Mt(m,S):Mt(m)});function p(){var y=typeof t.extraReducers=="function"?Ic(t.extraReducers):[t.extraReducers],h=y[0],m=h===void 0?{}:h,x=y[1],S=x===void 0?[]:x,C=y[2],T=C===void 0?void 0:C,R=Bt(Bt({},m),s);return wp(o,function(L){for(var $ in R)L.addCase($,R[$]);for(var W=0,G=S;W<G.length;W++){var Ne=G[W];L.addMatcher(Ne.matcher,Ne.reducer)}T&&L.addDefaultCase(T)})}var u;return{name:e,reducer:function(y,h){return u||(u=p()),u(y,h)},actions:c,caseReducers:a,getInitialState:function(){return u||(u=p()),u.getInitialState()}}}var Tp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=Tp[Math.random()*64|0];return e},Np=["name","message","stack","code"],Vi=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Rc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ip=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Np;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},nS=function(){function t(e,o,n){var i=Mt(e+"/fulfilled",function(y,h,m,x){return{payload:y,meta:Gi(Bt({},x||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),a=Mt(e+"/pending",function(y,h,m){return{payload:void 0,meta:Gi(Bt({},m||{}),{arg:h,requestId:y,requestStatus:"pending"})}}),s=Mt(e+"/rejected",function(y,h,m,x,S){return{payload:x,error:(n&&n.serializeError||Ip)(y||"Rejected"),meta:Gi(Bt({},S||{}),{arg:m,requestId:h,rejectedWithValue:!!x,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),c=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function u(y){return function(h,m,x){var S=n?.idGenerator?n.idGenerator(y):Lp(),C=new p,T,R=!1;function L(W){T=W,C.abort()}var $=function(){return mp(this,null,function(){var W,G,Ne,et,Te,tt,Se;return pp(this,function(g){switch(g.label){case 0:return g.trys.push([0,4,,5]),et=(W=n?.condition)==null?void 0:W.call(n,y,{getState:m,extra:x}),Pp(et)?[4,et]:[3,2];case 1:et=g.sent(),g.label=2;case 2:if(et===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,Te=new Promise(function(v,k){return C.signal.addEventListener("abort",function(){return k({name:"AbortError",message:T||"Aborted"})})}),h(a(S,y,(G=n?.getPendingMeta)==null?void 0:G.call(n,{requestId:S,arg:y},{getState:m,extra:x}))),[4,Promise.race([Te,Promise.resolve(o(y,{dispatch:h,getState:m,extra:x,requestId:S,signal:C.signal,abort:L,rejectWithValue:function(v,k){return new Vi(v,k)},fulfillWithValue:function(v,k){return new Rc(v,k)}})).then(function(v){if(v instanceof Vi)throw v;return v instanceof Rc?i(v.payload,S,y,v.meta):i(v,S,y)})])];case 3:return Ne=g.sent(),[3,5];case 4:return tt=g.sent(),Ne=tt instanceof Vi?s(null,S,y,tt.payload,tt.meta):s(tt,S,y),[3,5];case 5:return Se=n&&!n.dispatchConditionRejection&&s.match(Ne)&&Ne.meta.condition,Se||h(Ne),[2,Ne]}})})}();return Object.assign($,{abort:L,requestId:S,arg:y,unwrap:function(){return $.then(_p)}})}}return Object.assign(u,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function _p(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Pp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Pc="listener",kc="completed",Dc="cancelled",iS="task-"+Dc,aS="task-"+kc,sS=Pc+"-"+Dc,lS=Pc+"-"+kc;var Zi="listenerMiddleware";var cS=Mt(Zi+"/add"),dS=Mt(Zi+"/removeAll"),pS=Mt(Zi+"/remove");var Tc,uS=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Tc||(Tc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},kp=function(t){return function(e){setTimeout(e,t)}},fS=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kp(10);fc();var Dp=Uo(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,i){this.eventBus.addEventListener(o,n,i)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,i){this.eventBus.removeEventListener(o,n,i)}}}),Yo=class extends Dp(Object){};window.ftReduxStores||(window.ftReduxStores={});var $c=class t extends Yo{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Go(a))return a;if(i==null)return;let s=_c({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),c=Nc({reducer:(p,u)=>u.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...u.overwrites}:s.reducer(p,u)});return window.ftReduxStores[i.name]=new t(s,c,i.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Fo;let i=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,c)=>{let p=s,u=a[p];return u?(...y)=>{let h=u(...y.map(i));return this.reduxStore.dispatch(h),h}:y=>{this.setState({[p]:i(y)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Xo=class{static format(e,o,n,i){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,i)):this.getIntlDateTime(e,o,n,i)}static getMomentDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,i){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(a);if(!i)return s;let c=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(a);return`${s} ${c}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${e(Math.abs(o)/60)}:${e(Math.abs(o)%60)}`}};var Bc=b(I()),Qo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},US=(0,Bc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(N)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,a;return((a=(i=this.metadataDescriptors.find(c=>c.key===n))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1)?c=>Xo.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Qo([(0,qi.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Qo([(0,qi.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Qo([Ai({store:N.name,selector:o=>{var n,i;return(i=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),Qo([Ai({store:N.name})],e.prototype,"uiLocale",void 0),e});var tn=b(I());var Jo=class extends De{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=N.getState().session;return!!e?.sessionAuthenticated}};var en=class extends De{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=N.getState().session;return!!e?.sessionAuthenticated}};var $p="ft-user-assets",Bp={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(He).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let o=e.payload.mapId;t.assetCounts.bookmarkByMap[o]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:o,mapId:n,asset:i}=e.payload;Xi(t,o,[...Yi(t,o),i]),Mc(t,o,1,n),Uc(t,i)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;Xi(t,o,Yi(t,o).map(i=>i.id===n.id?n:i)),Uc(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:i}=e.payload;Xi(t,o,Yi(t,o).filter(a=>a.id!==i)),Mc(t,o,-1,n)}},Fc={[He.SEARCHES]:"savedSearches",[He.BOOKMARKS]:"bookmarks",[He.BOOKS]:void 0,[He.COLLECTIONS]:void 0},Yi=(t,e)=>{var o;let n=Fc[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},Xi=(t,e,o)=>{let n=Fc[e];n&&(t[n]=o)},Mc=(t,e,o,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+o),e===He.BOOKMARKS&&n)){let a=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,a+o)}},Uc=(t,e)=>{let o=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!o.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},Be=tn.FtReduxStore.get({name:$p,reducers:Bp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(He).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Qi=class{constructor(e=new Jo,o=new en){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=N.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new _o,this.savedSearchesService=new $o,N.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=N.getState();(0,tn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Be.actions.clearAssetCount(),Be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Be.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&Be.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&Be.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(Be.getState().assetCounts.bookmarkByMap).length!==0;e===He.BOOKMARKS&&o&&Be.actions.clearBookmarkCountByMap(),Be.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Be.actions.bookmarks(o)}}},Mp=new Qi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Mp);(0,zc.customElement)("ft-app-context")(ee);var Hc=b(ie());var Ji=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[n,i]=e.split(".");return{context:n,key:i,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},kr=new Ji;var Up=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},so=Symbol("i18nAttributes"),Wc=Symbol("i18nListAttributes"),Gc=Symbol("i18nProperties"),rn=Symbol("i18nContexts"),ao=Symbol("i18nUnsubs"),jc=(0,Dr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,o;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[o]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?vi:Jr}i18n(a){let{context:s,key:c,message:p}=a,{custom:u,args:y,argsProvider:h}=a;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let m=y??(h?h(this):[]);return this.getI18nService(u).resolveMessage(s,c,...m)}return p}async awaitI18n(a){let{context:s,custom:c}=a;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(a)}customI18n(a,s){if(kr.isI18nKey(a)){let[c,p]=a.split(".");return this.i18n({custom:!0,context:c,key:p,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,c,p)=>a.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,c,p)=>{var u;return((u=p?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,c;let p=this,u=(y,h,m)=>m?.context&&m.key&&a(y,h,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...y})}:m;(s=this[so])===null||s===void 0||s.forEach((y,h)=>p[h]=u(y,h,p[h])),(c=this[Wc])===null||c===void 0||c.forEach((y,h)=>{var m;return p[h]=(m=p[h])===null||m===void 0?void 0:m.map(x=>u(y,h,x))})}updateI18nProperties(a){var s;(s=this[Gc])===null||s===void 0||s.forEach((c,p)=>{a(c,p)&&(this[p]=this.i18n(c))})}addI18nMessages(a,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,c)}addI18nContext(a,s,c){let p=(typeof a=="string"?a:a.name).toLowerCase();c=typeof a=="string"?c:a.custom,this[rn].set(p,{isCustomContext:c}),this[ao].has(p)||this[ao].set(p,this.getI18nService(c).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(c).prepareContext(p,s)}hasI18nContext(a){return this[rn].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[rn].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[ao].forEach(a=>a()),this[ao].clear()}}return e=rn,o=ao,Up([(0,Hc.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),on=class extends jc(Dr.FtLitElement){},nn=class extends jc(Dr.FtLitElementRedux){};var Vc=b(I());var ea=class{fromAttribute(e){if(!e)return[];try{let o=JSON.parse(e);return Array.isArray(o)?o.map(n=>typeof n=="string"?kr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Fp=new ea;var Kc=(t,e)=>(o,n)=>{var i;o.constructor.createProperty(n,{type:Object,hasChanged:Vc.hasChanged,converter:kr,...e}),o[so]=(i=o[so])!==null&&i!==void 0?i:new Map,o[so].set(n,t??{})};var Yc=b(I());var an=b(V()),sn=b(ie()),ln=b(I());var Zc=b(V());var qc=Zc.css`
|
|
1250
1250
|
`;var lo=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Xe=class extends nn{constructor(){super(),this.editorMode=!1,this.addStore(N)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":an.nothing:an.html`
|
|
1251
1251
|
<span class="ft-i18n">
|
|
1252
1252
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|