@fluid-topics/ft-search-type 1.3.54 → 1.3.55

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.
@@ -541,7 +541,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
541
541
  word-break: break-word;
542
542
  }
543
543
  `;var Xs=["top","right","bottom","left"],Qs=["start","end"],Pa=Xs.reduce((t,e)=>t.concat(e,e+"-"+Qs[0],e+"-"+Qs[1]),[]),Js=Math.min,el=Math.max;var Ou={left:"right",right:"left",bottom:"top",top:"bottom"},Eu={start:"end",end:"start"};function ka(t,e,o){return el(t,Js(e,o))}function zo(t,e){return typeof t=="function"?t(e):t}function Dr(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function Da(t){return t==="x"?"y":"x"}function Ba(t){return t==="y"?"height":"width"}function Ho(t){return["top","bottom"].includes(Dr(t))?"y":"x"}function Ma(t){return Da(Ho(t))}function tl(t,e,o){o===void 0&&(o=!1);let n=Pt(t),a=Ma(t),i=Ba(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=_a(s)),[s,_a(s)]}function rl(t){return t.replace(/start|end/g,e=>Eu[e])}function _a(t){return t.replace(/left|right|bottom|top/g,e=>Ou[e])}function Au(t){return{top:0,right:0,bottom:0,left:0,...t}}function ol(t){return typeof t!="number"?Au(t):{top:t,right:t,bottom:t,left:t}}function or(t){let{x:e,y:o,width:n,height:a}=t;return{width:n,height:a,top:o,left:e,right:e+n,bottom:o+a,x:e,y:o}}function nl(t,e,o){let{reference:n,floating:a}=t,i=Ho(e),s=Ma(e),c=Ba(s),u=Dr(e),p=i==="y",m=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,b=n[c]/2-a[c]/2,S;switch(u){case"top":S={x:m,y:n.y-a.height};break;case"bottom":S={x:m,y:n.y+n.height};break;case"right":S={x:n.x+n.width,y:h};break;case"left":S={x:n.x-a.width,y:h};break;default:S={x:n.x,y:n.y}}switch(Pt(e)){case"start":S[s]-=b*(o&&p?-1:1);break;case"end":S[s]+=b*(o&&p?-1:1);break}return S}var al=async(t,e,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,c=i.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(e)),p=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:h}=nl(p,n,u),b=n,S={},v=0;for(let E=0;E<c.length;E++){let{name:I,fn:L}=c[E],{x:_,y:k,data:$,reset:F}=await L({x:m,y:h,initialPlacement:n,placement:b,strategy:a,middlewareData:S,rects:p,platform:s,elements:{reference:t,floating:e}});m=_??m,h=k??h,S={...S,[I]:{...S[I],...$}},F&&v<=50&&(v++,typeof F=="object"&&(F.placement&&(b=F.placement),F.rects&&(p=F.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):F.rects),{x:m,y:h}=nl(p,b,u)),E=-1)}return{x:m,y:h,placement:b,strategy:a,middlewareData:S}};async function $a(t,e){var o;e===void 0&&(e={});let{x:n,y:a,platform:i,rects:s,elements:c,strategy:u}=t,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:b=!1,padding:S=0}=zo(e,t),v=ol(S),I=c[b?h==="floating"?"reference":"floating":h],L=or(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(I)))==null||o?I:I.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:p,rootBoundary:m,strategy:u})),_=h==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),$=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},F=or(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:k,strategy:u}):_);return{top:(L.top-F.top+v.top)/$.y,bottom:(F.bottom-L.bottom+v.bottom)/$.y,left:(L.left-F.left+v.left)/$.x,right:(F.right-L.right+v.right)/$.x}}function wu(t,e,o){return(t?[...o.filter(a=>Pt(a)===t),...o.filter(a=>Pt(a)!==t)]:o.filter(a=>Dr(a)===a)).filter(a=>t?Pt(a)===t||(e?rl(a)!==a:!1):!0)}var Fa=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,a;let{rects:i,middlewareData:s,placement:c,platform:u,elements:p}=e,{crossAxis:m=!1,alignment:h,allowedPlacements:b=Pa,autoAlignment:S=!0,...v}=zo(t,e),E=h!==void 0||b===Pa?wu(h||null,S,b):b,I=await $a(e,v),L=((o=s.autoPlacement)==null?void 0:o.index)||0,_=E[L];if(_==null)return{};let k=tl(_,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(c!==_)return{reset:{placement:E[0]}};let $=[I[Dr(_)],I[k[0]],I[k[1]]],F=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:$}],Ie=E[L+1];if(Ie)return{data:{index:L+1,overflows:F},reset:{placement:Ie}};let st=F.map(ye=>{let y=Pt(ye.placement);return[ye.placement,y&&m?ye.overflows.slice(0,2).reduce((x,P)=>x+P,0):ye.overflows[0],ye.overflows]}).sort((ye,y)=>ye[1]-y[1]),lt=((a=st.filter(ye=>ye[2].slice(0,Pt(ye[0])?2:3).every(y=>y<=0))[0])==null?void 0:a[0])||st[0][0];return lt!==c?{data:{index:L+1,overflows:F},reset:{placement:lt}}:{}}}};var Ua=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:n,placement:a}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:I=>{let{x:L,y:_}=I;return{x:L,y:_}}},...u}=zo(t,e),p={x:o,y:n},m=await $a(e,u),h=Ho(Dr(a)),b=Da(h),S=p[b],v=p[h];if(i){let I=b==="y"?"top":"left",L=b==="y"?"bottom":"right",_=S+m[I],k=S-m[L];S=ka(_,S,k)}if(s){let I=h==="y"?"top":"left",L=h==="y"?"bottom":"right",_=v+m[I],k=v-m[L];v=ka(_,v,k)}let E=c.fn({...e,[b]:S,[h]:v});return{...E,data:{x:E.x-o,y:E.y-n,enabled:{[b]:i,[h]:s}}}}}};var za=Math.min,Br=Math.max,co=Math.round;var wt=t=>({x:t,y:t});function Rt(t){return sl(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Tt(t){var e;return(e=(sl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function sl(t){return t instanceof Node||t instanceof Pe(t).Node}function pt(t){return t instanceof Element||t instanceof Pe(t).Element}function Je(t){return t instanceof HTMLElement||t instanceof Pe(t).HTMLElement}function il(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot}function Mr(t){let{overflow:e,overflowX:o,overflowY:n,display:a}=Me(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(a)}function ll(t){return["table","td","th"].includes(Rt(t))}function Go(t){let e=Vo(),o=Me(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 cl(t){let e=nr(t);for(;Je(e)&&!uo(e);){if(Go(e))return e;e=nr(e)}return null}function Vo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function uo(t){return["html","body","#document"].includes(Rt(t))}function Me(t){return Pe(t).getComputedStyle(t)}function po(t){return pt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nr(t){if(Rt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||il(t)&&t.host||Tt(t);return il(e)?e.host:e}function dl(t){let e=nr(t);return uo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Je(e)&&Mr(e)?e:dl(e)}function Wo(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);let a=dl(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=Pe(a);return i?e.concat(s,s.visualViewport||[],Mr(a)?a:[],s.frameElement&&o?Wo(s.frameElement):[]):e.concat(a,Wo(a,[],o))}function fl(t){let e=Me(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,a=Je(t),i=a?t.offsetWidth:o,s=a?t.offsetHeight:n,c=co(o)!==i||co(n)!==s;return c&&(o=i,n=s),{width:o,height:n,$:c}}function hl(t){return pt(t)?t:t.contextElement}function $r(t){let e=hl(t);if(!Je(e))return wt(1);let o=e.getBoundingClientRect(),{width:n,height:a,$:i}=fl(e),s=(i?co(o.width):o.width)/n,c=(i?co(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Lu=wt(0);function yl(t){let e=Pe(t);return!Vo()||!e.visualViewport?Lu:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Nu(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==Pe(t)?!1:e}function fo(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);let a=t.getBoundingClientRect(),i=hl(t),s=wt(1);e&&(n?pt(n)&&(s=$r(n)):s=$r(t));let c=Nu(i,o,n)?yl(i):wt(0),u=(a.left+c.x)/s.x,p=(a.top+c.y)/s.y,m=a.width/s.x,h=a.height/s.y;if(i){let b=Pe(i),S=n&&pt(n)?Pe(n):n,v=b.frameElement;for(;v&&n&&S!==b;){let E=$r(v),I=v.getBoundingClientRect(),L=Me(v),_=I.left+(v.clientLeft+parseFloat(L.paddingLeft))*E.x,k=I.top+(v.clientTop+parseFloat(L.paddingTop))*E.y;u*=E.x,p*=E.y,m*=E.x,h*=E.y,u+=_,p+=k,v=Pe(v).frameElement}}return or({width:m,height:h,x:u,y:p})}function Iu(t){let{rect:e,offsetParent:o,strategy:n}=t,a=Je(o),i=Tt(o);if(o===i)return e;let s={scrollLeft:0,scrollTop:0},c=wt(1),u=wt(0);if((a||!a&&n!=="fixed")&&((Rt(o)!=="body"||Mr(i))&&(s=po(o)),Je(o))){let p=fo(o);c=$r(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-s.scrollLeft*c.x+u.x,y:e.y*c.y-s.scrollTop*c.y+u.y}}function _u(t){return Array.from(t.getClientRects())}function ml(t){return fo(Tt(t)).left+po(t).scrollLeft}function Pu(t){let e=Tt(t),o=po(t),n=t.ownerDocument.body,a=Br(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Br(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+ml(t),c=-o.scrollTop;return Me(n).direction==="rtl"&&(s+=Br(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:c}}function ku(t,e){let o=Pe(t),n=Tt(t),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,c=0,u=0;if(a){i=a.width,s=a.height;let p=Vo();(!p||p&&e==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}return{width:i,height:s,x:c,y:u}}function Du(t,e){let o=fo(t,!0,e==="fixed"),n=o.top+t.clientTop,a=o.left+t.clientLeft,i=Je(t)?$r(t):wt(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:c,x:u,y:p}}function ul(t,e,o){let n;if(e==="viewport")n=ku(t,o);else if(e==="document")n=Pu(Tt(t));else if(pt(e))n=Du(e,o);else{let a=yl(t);n={...e,x:e.x-a.x,y:e.y-a.y}}return or(n)}function gl(t,e){let o=nr(t);return o===e||!pt(o)||uo(o)?!1:Me(o).position==="fixed"||gl(o,e)}function Bu(t,e){let o=e.get(t);if(o)return o;let n=Wo(t,[],!1).filter(c=>pt(c)&&Rt(c)!=="body"),a=null,i=Me(t).position==="fixed",s=i?nr(t):t;for(;pt(s)&&!uo(s);){let c=Me(s),u=Go(s);!u&&c.position==="fixed"&&(a=null),(i?!u&&!a:!u&&c.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Mr(s)&&!u&&gl(t,s))?n=n.filter(m=>m!==s):a=c,s=nr(s)}return e.set(t,n),n}function Mu(t){let{element:e,boundary:o,rootBoundary:n,strategy:a}=t,s=[...o==="clippingAncestors"?Bu(e,this._c):[].concat(o),n],c=s[0],u=s.reduce((p,m)=>{let h=ul(e,m,a);return p.top=Br(h.top,p.top),p.right=za(h.right,p.right),p.bottom=za(h.bottom,p.bottom),p.left=Br(h.left,p.left),p},ul(e,c,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function $u(t){return fl(t)}function Fu(t,e,o){let n=Je(e),a=Tt(e),i=o==="fixed",s=fo(t,!0,i,e),c={scrollLeft:0,scrollTop:0},u=wt(0);if(n||!n&&!i)if((Rt(e)!=="body"||Mr(a))&&(c=po(e)),n){let p=fo(e,!0,i,e);u.x=p.x+e.clientLeft,u.y=p.y+e.clientTop}else a&&(u.x=ml(a));return{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function pl(t,e){return!Je(t)||Me(t).position==="fixed"?null:e?e(t):t.offsetParent}function bl(t,e){let o=Pe(t);if(!Je(t))return o;let n=pl(t,e);for(;n&&ll(n)&&Me(n).position==="static";)n=pl(n,e);return n&&(Rt(n)==="html"||Rt(n)==="body"&&Me(n).position==="static"&&!Go(n))?o:n||cl(t)||o}var Uu=async function(t){let{reference:e,floating:o,strategy:n}=t,a=this.getOffsetParent||bl,i=this.getDimensions;return{reference:Fu(e,await a(o),n),floating:{x:0,y:0,...await i(o)}}};function zu(t){return Me(t).direction==="rtl"}var jo={convertOffsetParentRelativeRectToViewportRelativeRect:Iu,getDocumentElement:Tt,getClippingRect:Mu,getOffsetParent:bl,getElementRects:Uu,getClientRects:_u,getDimensions:$u,getScale:$r,isElement:pt,isRTL:zu};var xl=(t,e,o)=>{let n=new Map,a={platform:jo,...o},i={...a.platform,_c:n};return al(t,e,{...a,platform:i})};function vl(t){return Hu(t)}function Ha(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Hu(t){for(let e=t;e;e=Ha(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ha(t);e;e=Ha(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 Sl(t,e,o){return xl(t,e,{platform:{...jo,getOffsetParent:n=>jo.getOffsetParent(n,vl)},middleware:[Ua({crossAxis:!0}),Fa({allowedPlacements:[o]})]})}var Xr=g(R());var td=g(R());var ac=g(B()),be=g(j()),et=g(R());var Cl=g(B());var Ol=Cl.css`
544
- `;var Ko=g(R()),Wu="ft-app-info",ar=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ar.eventName="authentication-change";var Gu={session:(t,e)=>{(0,Ko.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new ar(e.payload)),0))}},T=Ko.FtReduxStore.get({name:Wu,reducers:Gu,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 Wa=g(R());var ir=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=T.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let a=T.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var Zo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ir.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ir.await()}};var Ce=class extends Zo{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[u])=>c.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Wa.CacheRegistry,this.cache=e?a.commonCache:new Wa.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 qo=class extends Ce{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ga=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ga;var Ge=g(R());var El,Fr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Vu=Symbol("clearAfterUnitTest"),Yo=class extends(0,Ge.withEventBus)(Ce){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[El]=()=>{this.defaultMessages={},this.cache=new Ge.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.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 a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Ge.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,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 a;let i=e.toLowerCase(),s=this.resolveContext(i);return new Ge.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},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(a){!(a instanceof Ge.CanceledPromiseError)&&o&&console.error(a)}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 a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Fr({loadedContexts:e})),this.dispatchEvent(new Fr({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new Fr({loadedContexts:[e]})),this.dispatchEvent(new Fr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ge.delay)(0).then(()=>n()).catch(()=>null)))}};El=Vu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Yo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Yo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Ur=window.FluidTopicsI18nService,Qo=window.FluidTopicsCustomI18nService;var Al=g(R()),Va=class{highlightHtml(e,o,n){(0,Al.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Va;var Ku=g(Rl(),1);var Tl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Tl||(Tl={}));var Ll;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ll||(Ll={}));var Nl;(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"})(Nl||(Nl={}));var Dt;(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"})(Dt||(Dt={}));var Il;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Il||(Il={}));var _l;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(_l||(_l={}));var sr;(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"})(sr||(sr={}));var Pl;(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"})(Pl||(Pl={}));var kl;(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"})(kl||(kl={}));var Dl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Dl||(Dl={}));var Bl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Bl||(Bl={}));var Ml;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ml||(Ml={}));var $l;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})($l||($l={}));var Fl;(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"})(Fl||(Fl={}));var lr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(lr||(lr={}));var Ul;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ul||(Ul={}));var zl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zl||(zl={}));var Hr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Hr||(Hr={}));var Hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var Wl;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wl||(Wl={}));var Gl;(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"})(Gl||(Gl={}));var Vl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Vl||(Vl={}));var ft;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(ft||(ft={}));var Wr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Wr||(Wr={}));var jl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(jl||(jl={}));var se;(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"})(se||(se={}));var Ve;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ve||(Ve={}));var Kl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Kl||(Kl={}));var Zl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Zl||(Zl={}));var ql;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(ql||(ql={}));var Yl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Yl||(Yl={}));var Ql;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Ql||(Ql={}));var ju={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function Xl(t,e){return t===e||(ju[t]??[]).some(o=>Xl(o,e))}function Jl(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=>Xl(n,e))}var en=class extends Ce{async listMySearches(){let{session:e}=T.getState();return Jl(e,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var ec=g(R());var ja=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return ec.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new ja;var tc=g(R());var ho=class{static get(e,o){var n,a;let i=T.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new tc.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,o??`${s}-${c}`)}};var tn=class extends Ce{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}sortEventArrays(e){let o=Object.entries(e).map(([n,a])=>Array.isArray(a)?[n,a.map(i=>typeof i=="object"&&i!=null&&!Array.isArray(i)?this.sortEventArrays(i):i).sort((i,s)=>typeof i=="object"&&i!==null&&"key"in i?i.key.localeCompare(s.key):typeof i=="string"&&typeof s=="string"?i.localeCompare(s):String(i).localeCompare(String(s)))]:typeof a=="object"&&a!==null?[n,this.sortEventArrays(a)]:[n,a]);return Object.fromEntries(o)}sendEvents(e,o){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>n).catch(a=>(console.info(o),console.debug(a),n)),1e3)}};var Ka=class{urlToSearchRequest(e){return ho.get().parse(e)}searchRequestToUrl(e){return ho.get().serialize(e)}};window.FluidTopicsUrlService=new Ka;var Bt=g(R());var cr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};cr.eventName="change";var Za=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))}},rc=new Za;var rn=class t extends Bt.WithEventBus{static build(){return new t(window.history,rc,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,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,Bt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new cr(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[p,s,c]),this.setCurrentState(p,!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(cr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(cr.eventName,e)}currentItem(){return(0,Bt.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,Bt.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,Bt.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 a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}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 a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=rn.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 oc=T;function nc(t,e){var o;return oc.getState().authenticationRequired&&!(!((o=oc.getState().session)===null||o===void 0)&&o.sessionAuthenticated)?Promise.resolve(e):t()}var le=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},q=class extends et.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=()=>ir.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new et.CacheRegistry,this.cleanSessionDebouncer=new et.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return ac.html`
544
+ `;var Ko=g(R()),Wu="ft-app-info",ar=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ar.eventName="authentication-change";var Gu={session:(t,e)=>{(0,Ko.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>T.dispatchEvent(new ar(e.payload)),0))}},T=Ko.FtReduxStore.get({name:Wu,reducers:Gu,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 Wa=g(R());var ir=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=T.getState(),a=e??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let a=T.subscribe(()=>{n=t.get(e),n&&(a(),o(n))})}})}};var Zo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ir.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ir.await()}};var Ce=class extends Zo{constructor(e=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[u])=>c.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Wa.CacheRegistry,this.cache=e?a.commonCache:new Wa.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 qo=class extends Ce{async listMyBookmarks(){let e=T.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Ga=class{addCommand(e,o=!1){T.commands.add(e,o)}consumeCommand(e){return T.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ga;var Ge=g(R());var El,Fr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Vu=Symbol("clearAfterUnitTest"),Yo=class extends(0,Ge.withEventBus)(Ce){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[El]=()=>{this.defaultMessages={},this.cache=new Ge.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=T.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 a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Ge.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,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 a;let i=e.toLowerCase(),s=this.resolveContext(i);return new Ge.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},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(a){!(a instanceof Ge.CanceledPromiseError)&&o&&console.error(a)}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 a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Fr({loadedContexts:e})),this.dispatchEvent(new Fr({loadedContexts:e})),await Promise.all(e.map(o=>this.notify(o,!1)))}async notify(e,o=!0){o&&(document.body.dispatchEvent(new Fr({loadedContexts:[e]})),this.dispatchEvent(new Fr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ge.delay)(0).then(()=>n()).catch(()=>null)))}};El=Vu;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Yo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Yo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Ur=window.FluidTopicsI18nService,Qo=window.FluidTopicsCustomI18nService;var Al=g(R()),Va=class{highlightHtml(e,o,n){(0,Al.highlightHtml)(e,o,n)}};window.FluidTopicsHighlightHtmlService=new Va;var Ku=g(Rl(),1);var Tl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Tl||(Tl={}));var Ll;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ll||(Ll={}));var Nl;(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"})(Nl||(Nl={}));var Dt;(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"})(Dt||(Dt={}));var Il;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Il||(Il={}));var _l;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(_l||(_l={}));var sr;(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"})(sr||(sr={}));var Pl;(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"})(Pl||(Pl={}));var kl;(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"})(kl||(kl={}));var Dl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Dl||(Dl={}));var Bl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Bl||(Bl={}));var Ml;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ml||(Ml={}));var $l;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})($l||($l={}));var Fl;(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"})(Fl||(Fl={}));var lr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(lr||(lr={}));var Ul;(function(t){t.ASC="ASC",t.DESC="DESC"})(Ul||(Ul={}));var zl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(zl||(zl={}));var Hr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Hr||(Hr={}));var Hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var Wl;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Wl||(Wl={}));var Gl;(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"})(Gl||(Gl={}));var Vl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Vl||(Vl={}));var ft;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(ft||(ft={}));var Wr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Wr||(Wr={}));var jl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(jl||(jl={}));var se;(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"})(se||(se={}));var Ve;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ve||(Ve={}));var Kl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Kl||(Kl={}));var Zl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Zl||(Zl={}));var ql;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ql||(ql={}));var Yl;(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(Yl||(Yl={}));var Ql;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ql||(Ql={}));var Xl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Xl||(Xl={}));var ju={[se.PERSONAL_BOOK_SHARE_USER]:[se.PERSONAL_BOOK_USER],[se.HTML_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.PDF_EXPORT_USER]:[se.PERSONAL_BOOK_USER],[se.KHUB_ADMIN]:[se.CONTENT_PUBLISHER],[se.ADMIN]:[se.KHUB_ADMIN,se.USERS_ADMIN,se.PORTAL_ADMIN],[se.GENERATIVE_AI_EXPORT_USER]:[se.GENERATIVE_AI_USER]};function Jl(t,e){return t===e||(ju[t]??[]).some(o=>Jl(o,e))}function ec(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=>Jl(n,e))}var en=class extends Ce{async listMySearches(){let{session:e}=T.getState();return ec(e,se.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var tc=g(R());var ja=class{isDate(e){var o,n,a,i;return(i=(a=((n=(o=T.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,o){var n,a,i;return tc.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:T.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new ja;var rc=g(R());var ho=class{static get(e,o){var n,a;let i=T.getState(),{lang:s,region:c}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new rc.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,o??`${s}-${c}`)}};var tn=class extends Ce{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}sortEventArrays(e){let o=Object.entries(e).map(([n,a])=>Array.isArray(a)?[n,a.map(i=>typeof i=="object"&&i!=null&&!Array.isArray(i)?this.sortEventArrays(i):i).sort((i,s)=>typeof i=="object"&&i!==null&&"key"in i?i.key.localeCompare(s.key):typeof i=="string"&&typeof s=="string"?i.localeCompare(s):String(i).localeCompare(String(s)))]:typeof a=="object"&&a!==null?[n,this.sortEventArrays(a)]:[n,a]);return Object.fromEntries(o)}sendEvents(e,o){let n="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>n).catch(a=>(console.info(o),console.debug(a),n)),1e3)}};var Ka=class{urlToSearchRequest(e){return ho.get().parse(e)}searchRequestToUrl(e){return ho.get().serialize(e)}};window.FluidTopicsUrlService=new Ka;var Bt=g(R());var cr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};cr.eventName="change";var Za=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))}},oc=new Za;var rn=class t extends Bt.WithEventBus{static build(){return new t(window.history,oc,()=>window.location,!1)}constructor(e,o,n,a){var i,s;super(),this.history=e,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,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,Bt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new cr(this.currentItem())),0)}installProxies(){let e=o=>(n,a,[i,s,c])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof c=="string"?c:(c??this.windowLocation()).href};n.apply(a,[p,s,c]),this.setCurrentState(p,!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(cr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(cr.eventName,e)}currentItem(){return(0,Bt.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,Bt.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,Bt.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 a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}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 a=o??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=rn.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)});function nc(t,e){let{authenticationRequired:o,session:n}=T.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var le=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},q=class extends et.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=()=>ir.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new et.CacheRegistry,this.cleanSessionDebouncer=new et.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return ac.html`
545
545
  <slot></slot>
546
546
  `}connectedCallback(){super.connectedCallback(),T.addEventListener(ar.eventName,this.reloadConfiguration)}disconnectedCallback(){T.addEventListener(ar.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var o,n,a,i,s,c,u;super.update(e),e.has("baseUrl")&&(T.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&T.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&T.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&T.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&T.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&T.actions.noCustom(this.noCustom),e.has("editorMode")&&T.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&T.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&T.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Ur.addContext(p)),e.has("openExternalDocumentInNewTab")&&T.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&T.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&T.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(T.actions.defaultLocales((o=this.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales),T.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),T.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&T.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&T.actions.availableContentLocales((u=(c=this.availableContentLocales)===null||c===void 0?void 0:c.contentLocales)!==null&&u!==void 0?u:[]),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",()=>nc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};q.elementDefinitions={};q.styles=Ol;le([(0,be.property)()],q.prototype,"baseUrl",void 0);le([(0,be.property)()],q.prototype,"apiIntegrationIdentifier",void 0);le([(0,be.property)()],q.prototype,"apiIntegrationAppVersion",void 0);le([(0,be.property)()],q.prototype,"uiLocale",void 0);le([(0,et.jsonProperty)(null)],q.prototype,"availableUiLocales",void 0);le([(0,et.jsonProperty)(null)],q.prototype,"metadataConfiguration",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"editorMode",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"noCustom",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"openExternalDocumentInNewTab",void 0);le([(0,be.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],q.prototype,"noCustomComponent",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"withManualResources",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"navigatorOnline",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"forcedOffline",void 0);le([(0,be.property)({type:Object})],q.prototype,"apiProvider",void 0);le([(0,be.property)({type:Boolean})],q.prototype,"authenticationRequired",void 0);le([(0,et.jsonProperty)([])],q.prototype,"messageContexts",void 0);le([(0,et.jsonProperty)(void 0)],q.prototype,"session",void 0);le([(0,be.state)()],q.prototype,"localesConfiguration",void 0);le([(0,be.state)()],q.prototype,"availableContentLocales",void 0);var xi=g(j());function Zu(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,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!on(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(!on(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 i=s=>Object.keys(s).filter(c=>s[c]!=null);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let s=a[n];if(!on(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function on(t,e){try{return Zu(t,e)}catch{return!1}}function yo(t,e){return!on(t,e)}function nn(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let a=e(n);return a[t]=!0,a}}var ic=g(j(),1);var qa=t=>{let e=t??{};return(o,n)=>{var a;let i={hasChanged:yo,attribute:!1,...e};(0,ic.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:c=>c[n],store:e.store})}};var an=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 dr=g(j(),1);var sc=g(j(),1);function lc(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,sc.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:yo,...e??{}})}var sn=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 a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(c){a(c);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var dc=g(B(),1);var ln=globalThis,qu=ln.ShadowRoot&&(ln.ShadyCSS===void 0||ln.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lv=Symbol();var cc=(t,e)=>{if(qu)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=ln.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}};var cn=class extends dc.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return cc(n,e.elementStyles),n}};function uc(t,e,...o){var n;let a=t.querySelector(e);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Vr=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},yc,pc=Symbol("constructorPrototype"),fc=Symbol("constructorName"),mc=Symbol("exportpartsDebouncer"),hc=Symbol("dynamicDependenciesLoaded"),Gr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Gr.eventName="exportparts-updated";var ht=class extends cn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[yc]=new sn(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[mc].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[fc]=this.constructor.name,this[pc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[fc]&&Object.setPrototypeOf(this,this[pc])}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[hc]||(o[hc]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Gr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Gr.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 Gr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=uc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(e){var o,n,a,i,s,c;let u=b=>b!=null&&b.trim().length>0,p=e.filter(u).map(b=>b.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let S=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],v=(c=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(I=>I.split(":")[1]))!==null&&c!==void 0?c:[],E=[...S,...v].filter(u).map(I=>I.trim());for(let I of E)m.add(I)}if(m.size===0){this.exportparts=void 0;return}let h=[...m.values()].flatMap(b=>p.map(S=>`${b}:${S}--${b}`));this.exportparts=[...this.part,...h].join(", ")}};yc=mc;Vr([(0,dr.property)()],ht.prototype,"exportpartsPrefix",void 0);Vr([lc([])],ht.prototype,"exportpartsPrefixes",void 0);Vr([(0,dr.property)({reflect:!0})],ht.prototype,"exportparts",void 0);Vr([(0,dr.property)()],ht.prototype,"customStylesheet",void 0);Vr([(0,dr.property)()],ht.prototype,"elementToFocus",void 0);Vr([(0,dr.state)()],ht.prototype,"useAdoptedStyleSheets",void 0);function dn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var mo=Symbol("internalReduxEventsUnsubscribers"),Mt=Symbol("internalStoresUnsubscribers"),ur=Symbol("internalStores"),Yu=nn(Symbol("withRedux"),function(t){var e,o,n;class a 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[ur].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ur].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[ur].get(s)}addStore(s,c){var u;c=(u=c??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(c),this[ur].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[ur].delete(c)}setupStores(){this.unsubscribeFromStores(),this[ur].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let u=this.constructor.getPropertyOptions(c);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:c)){let p=this.getStore(s.store);p&&(s.store?this[Mt].has(s.store):this[Mt].size>0)&&(this[c]=s.selector(p.getState(),this))}})}subscribeToStore(s,c){var u;this[Mt].set(s,c.subscribe(()=>this.updateFromStores())),this[mo].set(s,[]),dn(c)&&c.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||c.name===p.store)){let h=b=>this[m](b);c.addEventListener(p.eventName,h),this[mo].get(s).push(()=>c.removeEventListener(p.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Mt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Mt].has(s)&&this[Mt].get(s)(),this[Mt].delete(s),(c=this[mo].get(s))===null||c===void 0||c.forEach(u=>u()),this[mo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Mt,o=ur,n=mo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),gc=class extends Yu(ht){};function je(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 a,i;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 Lt(t){return!!t&&!!t[J]}function tt(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 a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===np}(t)||Array.isArray(t)||!!t[Ec]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ec])||ni(t)||ai(t))}function pr(t,e,o){o===void 0&&(o=!1),Zr(t)===0?(o?Object.keys:Kr)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,a){return e(a,n,t)})}function Zr(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ni(t)?2:ai(t)?3:0}function jr(t,e){return Zr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Qu(t,e){return Zr(t)===2?t.get(e):t[e]}function Ac(t,e,o){var n=Zr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function wc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ni(t){return rp&&t instanceof Map}function ai(t){return op&&t instanceof Set}function $t(t){return t.o||t.t}function ii(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Lc(t);delete e[J];for(var o=Kr(e),n=0;n<o.length;n++){var a=o[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function si(t,e){return e===void 0&&(e=!1),li(t)||Lt(t)||!tt(t)||(Zr(t)>1&&(t.set=t.add=t.clear=t.delete=Xu),Object.freeze(t),e&&pr(t,function(o,n){return si(n,!0)},!0)),t}function Xu(){je(2)}function li(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function yt(t){var e=oi[t];return e||je(18,t),e}function Ju(t,e){oi[t]||(oi[t]=e)}function ei(){return bo}function Ya(t,e){e&&(yt("Patches"),t.u=[],t.s=[],t.v=e)}function un(t){ti(t),t.p.forEach(ep),t.p=null}function ti(t){t===bo&&(bo=t.l)}function bc(t){return bo={p:[],l:bo,h:t,m:!0,_:0}}function ep(t){var e=t[J];e.i===0||e.i===1?e.j():e.g=!0}function Qa(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||yt("ES5").S(e,t,n),n?(o[J].P&&(un(e),je(4)),tt(t)&&(t=pn(e,t),e.l||fn(e,t)),e.u&&yt("Patches").M(o[J].t,t,e.u,e.s)):t=pn(e,o,[]),un(e),e.u&&e.v(e.u,e.s),t!==Tc?t:void 0}function pn(t,e,o){if(li(e))return e;var n=e[J];if(!n)return pr(e,function(c,u){return xc(t,n,e,c,u,o)},!0),e;if(n.A!==t)return e;if(!n.P)return fn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=ii(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),pr(i,function(c,u){return xc(t,n,a,c,u,o,s)}),fn(t,a,!1),o&&t.u&&yt("Patches").N(n,o,t.u,t.s)}return n.o}function xc(t,e,o,n,a,i,s){if(Lt(a)){var c=pn(t,a,i&&e&&e.i!==3&&!jr(e.R,n)?i.concat(n):void 0);if(Ac(o,n,c),!Lt(c))return;t.m=!1}else s&&o.add(a);if(tt(a)&&!li(a)){if(!t.h.D&&t._<1)return;pn(t,a),e&&e.A.l||fn(t,a)}}function fn(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&si(e,o)}function Xa(t,e){var o=t[J];return(o?$t(o):t)[e]}function vc(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 Ft(t){t.P||(t.P=!0,t.l&&Ft(t.l))}function Ja(t){t.o||(t.o=ii(t.t))}function ri(t,e,o){var n=ni(e)?yt("MapSet").F(e,o):ai(e)?yt("MapSet").T(e,o):t.O?function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:ei(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=c,p=xo;s&&(u=[c],p=go);var m=Proxy.revocable(u,p),h=m.revoke,b=m.proxy;return c.k=b,c.j=h,b}(e,o):yt("ES5").J(e,o);return(o?o.A:ei()).p.push(n),n}function tp(t){return Lt(t)||je(22,t),function e(o){if(!tt(o))return o;var n,a=o[J],i=Zr(o);if(a){if(!a.P&&(a.i<4||!yt("ES5").K(a)))return a.t;a.I=!0,n=Sc(o,i),a.I=!1}else n=Sc(o,i);return pr(n,function(s,c){a&&Qu(a.t,s)===c||Ac(n,s,e(c))}),i===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 ii(t)}function Rc(){function t(s,c){var u=i[s];return u?u.enumerable=c:i[s]=u={configurable:!0,enumerable:c,get:function(){var p=this[J];return xo.get(p,s)},set:function(p){var m=this[J];xo.set(m,s,p)}},u}function e(s){for(var c=s.length-1;c>=0;c--){var u=s[c][J];if(!u.P)switch(u.i){case 5:n(u)&&Ft(u);break;case 4:o(u)&&Ft(u)}}}function o(s){for(var c=s.t,u=s.k,p=Kr(u),m=p.length-1;m>=0;m--){var h=p[m];if(h!==J){var b=c[h];if(b===void 0&&!jr(c,h))return!0;var S=u[h],v=S&&S[J];if(v?v.t!==b:!wc(S,b))return!0}}var E=!!c[J];return p.length!==Kr(c).length+(E?0:1)}function n(s){var c=s.k;if(c.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(c,c.length-1);if(u&&!u.get)return!0;for(var p=0;p<c.length;p++)if(!c.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&je(3,JSON.stringify($t(s)))}var i={};Ju("ES5",{J:function(s,c){var u=Array.isArray(s),p=function(h,b){if(h){for(var S=Array(b.length),v=0;v<b.length;v++)Object.defineProperty(S,""+v,t(v,!0));return S}var E=Lc(b);delete E[J];for(var I=Kr(E),L=0;L<I.length;L++){var _=I[L];E[_]=t(_,h||!!E[_].enumerable)}return Object.create(Object.getPrototypeOf(b),E)}(u,s),m={i:u?5:4,A:c?c.A:ei(),P:!1,I:!1,R:{},l:c,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,J,{value:m,writable:!0}),p},S:function(s,c,u){u?Lt(c)&&c[J].A===s&&e(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var h=m[J];if(h){var b=h.t,S=h.k,v=h.R,E=h.i;if(E===4)pr(S,function($){$!==J&&(b[$]!==void 0||jr(b,$)?v[$]||p(S[$]):(v[$]=!0,Ft(h)))}),pr(b,function($){S[$]!==void 0||jr(S,$)||(v[$]=!1,Ft(h))});else if(E===5){if(n(h)&&(Ft(h),v.length=!0),S.length<b.length)for(var I=S.length;I<b.length;I++)v[I]=!1;else for(var L=b.length;L<S.length;L++)v[L]=!0;for(var _=Math.min(S.length,b.length),k=0;k<_;k++)S.hasOwnProperty(k)||(v[k]=!0),v[k]===void 0&&p(S[k])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Cc,bo,ci=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",rp=typeof Map<"u",op=typeof Set<"u",Oc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Tc=ci?Symbol.for("immer-nothing"):((Cc={})["immer-nothing"]=!0,Cc),Ec=ci?Symbol.for("immer-draftable"):"__$immer_draftable",J=ci?Symbol.for("immer-state"):"__$immer_state";var np=""+Object.prototype.constructor,Kr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Lc=Object.getOwnPropertyDescriptors||function(t){var e={};return Kr(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},oi={},xo={get:function(t,e){if(e===J)return t;var o=$t(t);if(!jr(o,e))return function(a,i,s){var c,u=vc(i,s);return u?"value"in u?u.value:(c=u.get)===null||c===void 0?void 0:c.call(a.k):void 0}(t,o,e);var n=o[e];return t.I||!tt(n)?n:n===Xa(t.t,e)?(Ja(t),t.o[e]=ri(t.A.h,n,t)):n},has:function(t,e){return e in $t(t)},ownKeys:function(t){return Reflect.ownKeys($t(t))},set:function(t,e,o){var n=vc($t(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var a=Xa($t(t),e),i=a?.[J];if(i&&i.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(wc(o,a)&&(o!==void 0||jr(t.t,e)))return!0;Ja(t),Ft(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 Xa(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ja(t),Ft(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=$t(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){je(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){je(12)}},go={};pr(xo,function(t,e){go[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),go.deleteProperty=function(t,e){return go.set.call(this,t,e,void 0)},go.set=function(t,e,o){return xo.set.call(this,t[0],e,o,t[0])};var ap=function(){function t(o){var n=this;this.O=Oc,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var u=n;return function(E){var I=this;E===void 0&&(E=c);for(var L=arguments.length,_=Array(L>1?L-1:0),k=1;k<L;k++)_[k-1]=arguments[k];return u.produce(E,function($){var F;return(F=i).call.apply(F,[I,$].concat(_))})}}var p;if(typeof i!="function"&&je(6),s!==void 0&&typeof s!="function"&&je(7),tt(a)){var m=bc(n),h=ri(n,a,void 0),b=!0;try{p=i(h),b=!1}finally{b?un(m):ti(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(E){return Ya(m,s),Qa(E,m)},function(E){throw un(m),E}):(Ya(m,s),Qa(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Tc&&(p=void 0),n.D&&si(p,!0),s){var S=[],v=[];yt("Patches").M(a,p,S,v),s(S,v)}return p}je(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,h=Array(m>1?m-1:0),b=1;b<m;b++)h[b-1]=arguments[b];return n.produceWithPatches(p,function(S){return a.apply(void 0,[S].concat(h))})};var s,c,u=n.produce(a,i,function(p,m){s=p,c=m});return typeof Promise<"u"&&u instanceof Promise?u.then(function(p){return[p,s,c]}):[u,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){tt(o)||je(8),Lt(o)&&(o=tp(o));var n=bc(this),a=ri(this,o,void 0);return a[J].C=!0,ti(n),a},e.finishDraft=function(o,n){var a=o&&o[J],i=a.A;return Ya(i,n),Qa(void 0,i)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Oc&&je(20),this.O=o},e.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=yt("Patches").$;return Lt(o)?s(o,n):this.produce(o,function(c){return s(c,n)})},t}(),$e=new ap,ip=$e.produce,Gv=$e.produceWithPatches.bind($e),Vv=$e.setAutoFreeze.bind($e),jv=$e.setUseProxies.bind($e),Kv=$e.applyPatches.bind($e),Zv=$e.createDraft.bind($e),qv=$e.finishDraft.bind($e),hn=ip;function fr(t){"@babel/helpers - typeof";return fr=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},fr(t)}function Nc(t,e){if(fr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(fr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ic(t){var e=Nc(t,"string");return fr(e)=="symbol"?e:e+""}function _c(t,e,o){return(e=Ic(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Pc(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),o.push.apply(o,n)}return o}function di(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Pc(Object(o),!0).forEach(function(n){_c(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Pc(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function Oe(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 kc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ui=function(){return Math.random().toString(36).substring(7).split("").join(".")},yn={INIT:"@@redux/INIT"+ui(),REPLACE:"@@redux/REPLACE"+ui(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ui()}};function sp(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 pi(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(Oe(1));return o(pi)(t,e)}if(typeof t!="function")throw new Error(Oe(2));var a=t,i=e,s=[],c=s,u=!1;function p(){c===s&&(c=s.slice())}function m(){if(u)throw new Error(Oe(3));return i}function h(E){if(typeof E!="function")throw new Error(Oe(4));if(u)throw new Error(Oe(5));var I=!0;return p(),c.push(E),function(){if(I){if(u)throw new Error(Oe(6));I=!1,p();var _=c.indexOf(E);c.splice(_,1),s=null}}}function b(E){if(!sp(E))throw new Error(Oe(7));if(typeof E.type>"u")throw new Error(Oe(8));if(u)throw new Error(Oe(9));try{u=!0,i=a(i,E)}finally{u=!1}for(var I=s=c,L=0;L<I.length;L++){var _=I[L];_()}return E}function S(E){if(typeof E!="function")throw new Error(Oe(10));a=E,b({type:yn.REPLACE})}function v(){var E,I=h;return E={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(Oe(11));function k(){_.next&&_.next(m())}k();var $=I(k);return{unsubscribe:$}}},E[kc]=function(){return this},E}return b({type:yn.INIT}),n={dispatch:b,subscribe:h,getState:m,replaceReducer:S},n[kc]=v,n}function lp(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:yn.INIT});if(typeof n>"u")throw new Error(Oe(12));if(typeof o(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function Dc(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(o[a]=t[a])}var i=Object.keys(o),s,c;try{lp(o)}catch(u){c=u}return function(p,m){if(p===void 0&&(p={}),c)throw c;if(0)var h;for(var b=!1,S={},v=0;v<i.length;v++){var E=i[v],I=o[E],L=p[E],_=I(L,m);if(typeof _>"u"){var k=m&&m.type;throw new Error(Oe(14))}S[E]=_,b=b||_!==L}return b=b||i.length!==Object.keys(p).length,b?S:p}}function qr(){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,a){return function(){return n(a.apply(void 0,arguments))}})}function Bc(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Oe(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(u){return u(s)});return i=qr.apply(void 0,c)(a.dispatch),di(di({},a),{},{dispatch:i})}}}function Mc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var $c=Mc();$c.withExtraArgument=Mc;var fi=$c;var Wc=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},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)}}(),cp=function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=e.call(t,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Yr=function(t,e){for(var o=0,n=e.length,a=t.length;o<n;o++,a++)t[a]=e[o];return t},dp=Object.defineProperty,up=Object.defineProperties,pp=Object.getOwnPropertyDescriptors,Fc=Object.getOwnPropertySymbols,fp=Object.prototype.hasOwnProperty,hp=Object.prototype.propertyIsEnumerable,Uc=function(t,e,o){return e in t?dp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ut=function(t,e){for(var o in e||(e={}))fp.call(e,o)&&Uc(t,o,e[o]);if(Fc)for(var n=0,a=Fc(e);n<a.length;n++){var o=a[n];hp.call(e,o)&&Uc(t,o,e[o])}return t},hi=function(t,e){return up(t,pp(e))},yp=function(t,e,o){return new Promise(function(n,a){var i=function(u){try{c(o.next(u))}catch(p){a(p)}},s=function(u){try{c(o.throw(u))}catch(p){a(p)}},c=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};c((o=o.apply(t,e)).next())})};var mp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qr:qr.apply(null,arguments)},f0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function gp(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 bp=function(t){Wc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var 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,Yr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Yr([void 0],o.concat(this))))},e}(Array),xp=function(t){Wc(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=t.apply(this,o)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var 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,Yr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Yr([void 0],o.concat(this))))},e}(Array);function gi(t){return tt(t)?hn(t,function(){}):t}function vp(t){return typeof t=="boolean"}function Sp(){return function(e){return Cp(e)}}function Cp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,c=new bp;if(o&&(vp(o)?c.push(fi):c.push(fi.withExtraArgument(o.extraArgument))),0){if(a)var u;if(s)var p}return c}var yi=!0;function Gc(t){var e=Sp(),o=t||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?e():i,c=o.devTools,u=c===void 0?!0:c,p=o.preloadedState,m=p===void 0?void 0:p,h=o.enhancers,b=h===void 0?void 0:h,S;if(typeof a=="function")S=a;else if(gp(a))S=Dc(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=s;if(typeof v=="function"&&(v=v(e),!yi&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!yi&&v.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=Bc.apply(void 0,v),I=qr;u&&(I=mp(Ut({trace:!yi},typeof u=="object"&&u)));var L=new xp(E),_=L;Array.isArray(b)?_=Yr([E],b):typeof b=="function"&&(_=b(L));var k=I.apply(void 0,_);return pi(S,m,k)}function zt(t,e){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Ut(Ut({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.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 Vc(t){var e={},o=[],n,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(c in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,o,n]}function Op(t){return typeof t=="function"}function Ep(t,e,o,n){o===void 0&&(o=[]);var a=typeof e=="function"?Vc(e):[e,o,n],i=a[0],s=a[1],c=a[2],u;if(Op(t))u=function(){return gi(t())};else{var p=gi(t);u=function(){return p}}function m(h,b){h===void 0&&(h=u());var S=Yr([i[b.type]],s.filter(function(v){var E=v.matcher;return E(b)}).map(function(v){var E=v.reducer;return E}));return S.filter(function(v){return!!v}).length===0&&(S=[c]),S.reduce(function(v,E){if(E)if(Lt(v)){var I=v,L=E(I,b);return L===void 0?v:L}else{if(tt(v))return hn(v,function(_){return E(_,b)});var L=E(v,b);if(L===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return L}return v},h)}return m.getInitialState=u,m}function Ap(t,e){return t+"/"+e}function jc(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:gi(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},c={};a.forEach(function(m){var h=n[m],b=Ap(e,m),S,v;"reducer"in h?(S=h.reducer,v=h.prepare):S=h,i[m]=S,s[b]=S,c[m]=v?zt(b,v):zt(b)});function u(){var m=typeof t.extraReducers=="function"?Vc(t.extraReducers):[t.extraReducers],h=m[0],b=h===void 0?{}:h,S=m[1],v=S===void 0?[]:S,E=m[2],I=E===void 0?void 0:E,L=Ut(Ut({},b),s);return Ep(o,function(_){for(var k in L)_.addCase(k,L[k]);for(var $=0,F=v;$<F.length;$++){var Ie=F[$];_.addMatcher(Ie.matcher,Ie.reducer)}I&&_.addDefaultCase(I)})}var p;return{name:e,reducer:function(m,h){return p||(p=u()),p(m,h)},actions:c,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var wp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rp=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=wp[Math.random()*64|0];return e},Tp=["name","message","stack","code"],mi=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),zc=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Lp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=Tp;o<n.length;o++){var a=n[o];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},g0=function(){function t(e,o,n){var a=zt(e+"/fulfilled",function(m,h,b,S){return{payload:m,meta:hi(Ut({},S||{}),{arg:b,requestId:h,requestStatus:"fulfilled"})}}),i=zt(e+"/pending",function(m,h,b){return{payload:void 0,meta:hi(Ut({},b||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=zt(e+"/rejected",function(m,h,b,S,v){return{payload:S,error:(n&&n.serializeError||Lp)(m||"Rejected"),meta:hi(Ut({},v||{}),{arg:b,requestId:h,rejectedWithValue:!!S,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,u=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(h,b,S){var v=n?.idGenerator?n.idGenerator(m):Rp(),E=new u,I,L=!1;function _($){I=$,E.abort()}var k=function(){return yp(this,null,function(){var $,F,Ie,st,we,lt,ye;return cp(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),st=($=n?.condition)==null?void 0:$.call(n,m,{getState:b,extra:S}),Ip(st)?[4,st]:[3,2];case 1:st=y.sent(),y.label=2;case 2:if(st===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return L=!0,we=new Promise(function(x,P){return E.signal.addEventListener("abort",function(){return P({name:"AbortError",message:I||"Aborted"})})}),h(i(v,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:v,arg:m},{getState:b,extra:S}))),[4,Promise.race([we,Promise.resolve(o(m,{dispatch:h,getState:b,extra:S,requestId:v,signal:E.signal,abort:_,rejectWithValue:function(x,P){return new mi(x,P)},fulfillWithValue:function(x,P){return new zc(x,P)}})).then(function(x){if(x instanceof mi)throw x;return x instanceof zc?a(x.payload,v,m,x.meta):a(x,v,m)})])];case 3:return Ie=y.sent(),[3,5];case 4:return lt=y.sent(),Ie=lt instanceof mi?s(null,v,m,lt.payload,lt.meta):s(lt,v,m),[3,5];case 5:return ye=n&&!n.dispatchConditionRejection&&s.match(Ie)&&Ie.meta.condition,ye||h(Ie),[2,Ie]}})})}();return Object.assign(k,{abort:_,requestId:v,arg:m,unwrap:function(){return k.then(Np)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();function Np(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ip(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Kc="listener",Zc="completed",qc="cancelled",b0="task-"+qc,x0="task-"+Zc,v0=Kc+"-"+qc,S0=Kc+"-"+Zc;var bi="listenerMiddleware";var C0=zt(bi+"/add"),O0=zt(bi+"/removeAll"),E0=zt(bi+"/remove");var Hc,A0=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Hc||(Hc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},_p=function(t){return function(e){setTimeout(e,t)}},w0=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_p(10);Rc();var Pp=nn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),mn=class extends Pp(Object){};window.ftReduxStores||(window.ftReduxStores={});var Yc=class t extends mn{static get(e){var o;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(dn(i))return i;if(a==null)return;let s=jc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),c=Gc({reducer:(u,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...u,...p.overwrites}:s.reducer(u,p)});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,o,n){super(),this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new an;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let u=s,p=i[u];return p?(...m)=>{let h=p(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[u]:a(m)})}}}),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 gn=class{static format(e,o,n,a){return window.moment?window.moment(e).locale(o).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(e,o,n,a)}static getMomentDateFormat(e,o){return e?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(e,o,n,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let c=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(i);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 Qc=g(R()),bn=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},X0=(0,Qc.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(T)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>gn.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return bn([(0,xi.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),bn([(0,xi.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),bn([qa({store:T.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),bn([qa({store:T.name})],e.prototype,"uiLocale",void 0),e});var Sn=g(R());var xn=class extends Ce{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=T.getState().session;return!!e?.sessionAuthenticated}};var vn=class extends Ce{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=T.getState().session;return!!e?.sessionAuthenticated}};var kp="ft-user-assets",Dp={setAssetCount:(t,e)=>{let{userAssetType:o,count:n}=e.payload.assetCount;t.assetCounts.allAsset[o]=n},clearAssetCount:t=>{Object.values(Ve).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:a}=e.payload;Si(t,o,[...vi(t,o),a]),Xc(t,o,1,n),Jc(t,a)},editAsset:(t,e)=>{let{assetType:o,asset:n}=e.payload;Si(t,o,vi(t,o).map(a=>a.id===n.id?n:a)),Jc(t,n)},removeAsset:(t,e)=>{let{assetType:o,mapId:n,assetId:a}=e.payload;Si(t,o,vi(t,o).filter(i=>i.id!==a)),Xc(t,o,-1,n)}},ed={[Ve.SEARCHES]:"savedSearches",[Ve.BOOKMARKS]:"bookmarks",[Ve.BOOKS]:void 0,[Ve.COLLECTIONS]:void 0},vi=(t,e)=>{var o;let n=ed[e];return n?(o=t[n])!==null&&o!==void 0?o:[]:[]},Si=(t,e,o)=>{let n=ed[e];n&&(t[n]=o)},Xc=(t,e,o,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+o),e===Ve.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Jc=(t,e)=>{let o=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},Fe=Sn.FtReduxStore.get({name:kp,reducers:Dp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ve).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ci=class{constructor(e=new xn,o=new vn){this.assetCountsService=e,this.assetLabelsService=o,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new qo,this.savedSearchesService=new en,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=T.getState();(0,Sn.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(),Fe.actions.clearAssetCount(),Fe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Fe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Fe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Fe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Fe.actions.assetLabels(e)}async loadAssetCount(e){let o=await this.assetCountsService.getUserAssetCount(e);o&&Fe.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(e){let o=await this.assetCountsService.getUserBookmarkCountByMap(e);o&&Fe.actions.setBookmarkCountByMap({count:o.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let o=Object.keys(Fe.getState().assetCounts.bookmarkByMap).length!==0;e===Ve.BOOKMARKS&&o&&Fe.actions.clearBookmarkCountByMap(),Fe.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;Fe.actions.bookmarks(o)}}},Oi=new Ci;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Oi);(0,td.customElement)("ft-app-context")(q);var rd=g(j());var Ei=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,a]=e.split(".");return{context:n,key:a,custom:!0,message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Qr=new Ei;var Bp=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},So=Symbol("i18nAttributes"),od=Symbol("i18nListAttributes"),nd=Symbol("i18nProperties"),Cn=Symbol("i18nContexts"),vo=Symbol("i18nUnsubs"),Jr=(0,Xr.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(i){return i??this.useCustomMessageContexts?Qo:Ur}i18n(i){let{context:s,key:c,message:u}=i,{custom:p,args:m,argsProvider:h}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(h?h(this):[]);return this.getI18nService(p).resolveMessage(s,c,...b)}return u}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Qr.isI18nKey(i)){let[c,u]=i.split(".");return this.i18n({custom:!0,context:c,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,u)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let u=this,p=(m,h,b)=>b?.context&&b.key&&i(m,h,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[So])===null||s===void 0||s.forEach((m,h)=>u[h]=p(m,h,u[h])),(c=this[od])===null||c===void 0||c.forEach((m,h)=>{var b;return u[h]=(b=u[h])===null||b===void 0?void 0:b.map(S=>p(m,h,S))})}updateI18nProperties(i){var s;(s=this[nd])===null||s===void 0||s.forEach((c,u)=>{i(c,u)&&(this[u]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let u=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Cn].set(u,{isCustomContext:c}),this[vo].has(u)||this[vo].set(u,this.getI18nService(c).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(c).prepareContext(u,s)}hasI18nContext(i){return this[Cn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Cn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[vo].forEach(i=>i()),this[vo].clear()}}return e=Cn,o=vo,Bp([(0,rd.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),On=class extends Jr(Xr.FtLitElement){},En=class extends Jr(Xr.FtLitElementRedux){};var ad=g(R());var Ai=class{fromAttribute(e){if(!e)return[];try{let o=JSON.parse(e);return Array.isArray(o)?o.map(n=>typeof n=="string"?Qr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Mp=new Ai;var id=(t,e)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:ad.hasChanged,converter:Qr,...e}),o[So]=(a=o[So])!==null&&a!==void 0?a:new Map,o[So].set(n,t??{})};var cd=g(R());var An=g(B()),wn=g(j()),Rn=g(R());var sd=g(B());var ld=sd.css`
547
547
  `;var Co=function(t,e,o,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,o,i):s(e,o))||i);return a>3&&i&&Object.defineProperty(e,o,i),i},rt=class extends En{constructor(){super(),this.editorMode=!1,this.addStore(T)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":An.nothing:An.html`