@fluid-topics/ftds-period-picker 2.1.19 → 2.1.21
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";(()=>{var K4=Object.create;var Ds=Object.defineProperty;var Z4=Object.getOwnPropertyDescriptor;var q4=Object.getOwnPropertyNames;var Y4=Object.getPrototypeOf,X4=Object.prototype.hasOwnProperty;var Nr=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Q4=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of q4(e))!X4.call(t,a)&&a!==r&&Ds(t,a,{get:()=>e[a],enumerable:!(n=Z4(e,a))||n.enumerable});return t};var v=(t,e,r)=>(r=t!=null?K4(Y4(t)):{},Q4(e||!t||!t.__esModule?Ds(r,"default",{value:t,enumerable:!0}):r,t));var _=Nr((im,$s)=>{$s.exports=ftGlobals.wcUtils});var $=Nr((sm,Us)=>{Us.exports=ftGlobals.lit});var V=Nr((cm,Fs)=>{Fs.exports=ftGlobals.litDecorators});var Da=Nr((fm,Bs)=>{Bs.exports=ftGlobals.litRepeat});var Ze=Nr((Jg,jl)=>{jl.exports=ftGlobals.litClassMap});var v2=Nr((jx,b2)=>{b2.exports=ftGlobals.litUnsafeHTML});var V4=v(_());var hn=v($()),Ge=v(V());function rt(t,e,r){return t?e(t):r?.(t)}var T4=v(Da()),Dt=v(_());var li=v(V());var Hs=v(V(),1);var $a=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Gs(t,e){return(0,Hs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Ao(t);try{return JSON.parse(r)}catch{return Ao(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ro,...e??{}})}function J4(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!yn(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(!yn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(t);if(r=i.length,r!==a(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!yn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function yn(t,e){try{return J4(t,e)}catch{return!1}}function Ro(t,e){return!yn(t,e)}function Ao(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function bn(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let a=e(n);return a[t]=!0,a}}var Ws=v(V(),1);var Ua=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:Ro,attribute:!1,...e};(0,Ws.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(l=>l[n]),store:e.store})}};var vn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var cr=v(V(),1);var xn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Vs=v($(),1);var Sn=globalThis,eu=Sn.ShadowRoot&&(Sn.ShadyCSS===void 0||Sn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var js=(t,e)=>{if(eu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),a=Sn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,t.appendChild(n)}};var Cn=class extends Vs.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return js(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){$a(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ks(t,e,...r){var n;let a=t.querySelector(e);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var kr=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Xs,Zs=Symbol("constructorPrototype"),qs=Symbol("constructorName"),Qs=Symbol("exportpartsDebouncer"),Ys=Symbol("dynamicDependenciesLoaded"),Mr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Mr.eventName="exportparts-updated";var gt=class extends Cn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Xs]=new xn(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Qs].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[qs]=this.constructor.name,this[Zs]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[qs]&&Object.setPrototypeOf(this,this[Zs])}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 r=this.constructor;r[Ys]||(r[Ys]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Mr.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 Mr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=Ks(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.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 r,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,m=e.filter(u).map(y=>y.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(R=>R.split(":")[1]))!==null&&l!==void 0?l:[],C=[...x,...S].filter(u).map(R=>R.trim());for(let R of C)h.add(R)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(y=>m.map(x=>`${y}:${x}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};Xs=Qs;kr([(0,cr.property)()],gt.prototype,"exportpartsPrefix",void 0);kr([Gs([])],gt.prototype,"exportpartsPrefixes",void 0);kr([(0,cr.property)({reflect:!0})],gt.prototype,"exportparts",void 0);kr([(0,cr.property)()],gt.prototype,"customStylesheet",void 0);kr([(0,cr.property)()],gt.prototype,"elementToFocus",void 0);kr([(0,cr.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function En(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var wo=Symbol("internalReduxEventsUnsubscribers"),$t=Symbol("internalStoresUnsubscribers"),lr=Symbol("internalStores"),tu=bn(Symbol("withRedux"),function(t){var e,r,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[lr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[lr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[lr].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[lr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[lr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[lr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[$t].has(s.store):this[$t].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var u;this[$t].set(s,l.subscribe(()=>this.updateFromStores())),this[wo].set(s,[]),En(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((m,h)=>{if(typeof this[h]=="function"&&(!m.store||l.name===m.store)){let g=y=>this[h](y);l.addEventListener(m.eventName,g),this[wo].get(s).push(()=>l.removeEventListener(m.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[$t].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[$t].has(s)&&this[$t].get(s)(),this[$t].delete(s),(l=this[wo].get(s))===null||l===void 0||l.forEach(u=>u()),this[wo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=$t,r=lr,n=wo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Js=class extends tu(gt){};function je(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Lt(t){return!!t&&!!t[J]}function ot(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===lu})(t)||Array.isArray(t)||!!t[ic]||!!(!((e=t.constructor)===null||e===void 0)&&e[ic])||Za(t)||qa(t))}function dr(t,e,r){r===void 0&&(r=!1),Dr(t)===0?(r?Object.keys:Pr)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function Dr(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Za(t)?2:qa(t)?3:0}function Tr(t,e){return Dr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ru(t,e){return Dr(t)===2?t.get(e):t[e]}function sc(t,e,r){var n=Dr(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function cc(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Za(t){return su&&t instanceof Map}function qa(t){return cu&&t instanceof Set}function Ut(t){return t.o||t.t}function Ya(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=uc(t);delete e[J];for(var r=Pr(e),n=0;n<r.length;n++){var a=r[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 Xa(t,e){return e===void 0&&(e=!1),Qa(t)||Lt(t)||!ot(t)||(Dr(t)>1&&(t.set=t.add=t.clear=t.delete=ou),Object.freeze(t),e&&dr(t,(function(r,n){return Xa(n,!0)}),!0)),t}function ou(){je(2)}function Qa(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function yt(t){var e=Ka[t];return e||je(18,t),e}function nu(t,e){Ka[t]||(Ka[t]=e)}function Wa(){return _o}function Fa(t,e){e&&(yt("Patches"),t.u=[],t.s=[],t.v=e)}function Ln(t){ja(t),t.p.forEach(au),t.p=null}function ja(t){t===_o&&(_o=t.l)}function ec(t){return _o={p:[],l:_o,h:t,m:!0,_:0}}function au(t){var e=t[J];e.i===0||e.i===1?e.j():e.g=!0}function Ba(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||yt("ES5").S(e,t,n),n?(r[J].P&&(Ln(e),je(4)),ot(t)&&(t=On(e,t),e.l||An(e,t)),e.u&&yt("Patches").M(r[J].t,t,e.u,e.s)):t=On(e,r,[]),Ln(e),e.u&&e.v(e.u,e.s),t!==dc?t:void 0}function On(t,e,r){if(Qa(e))return e;var n=e[J];if(!n)return dr(e,(function(l,u){return tc(t,n,e,l,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return An(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Ya(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),dr(i,(function(l,u){return tc(t,n,a,l,u,r,s)})),An(t,a,!1),r&&t.u&&yt("Patches").N(n,r,t.u,t.s)}return n.o}function tc(t,e,r,n,a,i,s){if(Lt(a)){var l=On(t,a,i&&e&&e.i!==3&&!Tr(e.R,n)?i.concat(n):void 0);if(sc(r,n,l),!Lt(l))return;t.m=!1}else s&&r.add(a);if(ot(a)&&!Qa(a)){if(!t.h.D&&t._<1)return;On(t,a),e&&e.A.l||An(t,a)}}function An(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Xa(e,r)}function Ha(t,e){var r=t[J];return(r?Ut(r):t)[e]}function rc(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Ft(t){t.P||(t.P=!0,t.l&&Ft(t.l))}function Ga(t){t.o||(t.o=Ya(t.t))}function Va(t,e,r){var n=Za(e)?yt("MapSet").F(e,r):qa(e)?yt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Wa(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,m=Io;s&&(u=[l],m=zo);var h=Proxy.revocable(u,m),g=h.revoke,y=h.proxy;return l.k=y,l.j=g,y})(e,r):yt("ES5").J(e,r);return(r?r.A:Wa()).p.push(n),n}function iu(t){return Lt(t)||je(22,t),(function e(r){if(!ot(r))return r;var n,a=r[J],i=Dr(r);if(a){if(!a.P&&(a.i<4||!yt("ES5").K(a)))return a.t;a.I=!0,n=oc(r,i),a.I=!1}else n=oc(r,i);return dr(n,(function(s,l){a&&ru(a.t,s)===l||sc(n,s,e(l))})),i===3?new Set(n):n})(t)}function oc(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ya(t)}function lc(){function t(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var m=this[J];return Io.get(m,s)},set:function(m){var h=this[J];Io.set(h,s,m)}},u}function e(s){for(var l=s.length-1;l>=0;l--){var u=s[l][J];if(!u.P)switch(u.i){case 5:n(u)&&Ft(u);break;case 4:r(u)&&Ft(u)}}}function r(s){for(var l=s.t,u=s.k,m=Pr(u),h=m.length-1;h>=0;h--){var g=m[h];if(g!==J){var y=l[g];if(y===void 0&&!Tr(l,g))return!0;var x=u[g],S=x&&x[J];if(S?S.t!==y:!cc(x,y))return!0}}var C=!!l[J];return m.length!==Pr(l).length+(C?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var m=0;m<l.length;m++)if(!l.hasOwnProperty(m))return!0;return!1}function a(s){s.g&&je(3,JSON.stringify(Ut(s)))}var i={};nu("ES5",{J:function(s,l){var u=Array.isArray(s),m=(function(g,y){if(g){for(var x=Array(y.length),S=0;S<y.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var C=uc(y);delete C[J];for(var R=Pr(C),w=0;w<R.length;w++){var I=R[w];C[I]=t(I,g||!!C[I].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(u,s),h={i:u?5:4,A:l?l.A:Wa(),P:!1,I:!1,R:{},l,t:s,k:m,o:null,g:!1,C:!1};return Object.defineProperty(m,J,{value:h,writable:!0}),m},S:function(s,l,u){u?Lt(l)&&l[J].A===s&&e(s.p):(s.u&&(function m(h){if(h&&typeof h=="object"){var g=h[J];if(g){var y=g.t,x=g.k,S=g.R,C=g.i;if(C===4)dr(x,(function(D){D!==J&&(y[D]!==void 0||Tr(y,D)?S[D]||m(x[D]):(S[D]=!0,Ft(g)))})),dr(y,(function(D){x[D]!==void 0||Tr(x,D)||(S[D]=!1,Ft(g))}));else if(C===5){if(n(g)&&(Ft(g),S.length=!0),x.length<y.length)for(var R=x.length;R<y.length;R++)S[R]=!1;else for(var w=y.length;w<x.length;w++)S[w]=!0;for(var I=Math.min(x.length,y.length),M=0;M<I;M++)x.hasOwnProperty(M)||(S[M]=!0),S[M]===void 0&&m(x[M])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var nc,_o,Ja=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",su=typeof Map<"u",cu=typeof Set<"u",ac=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",dc=Ja?Symbol.for("immer-nothing"):((nc={})["immer-nothing"]=!0,nc),ic=Ja?Symbol.for("immer-draftable"):"__$immer_draftable",J=Ja?Symbol.for("immer-state"):"__$immer_state";var lu=""+Object.prototype.constructor,Pr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,uc=Object.getOwnPropertyDescriptors||function(t){var e={};return Pr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ka={},Io={get:function(t,e){if(e===J)return t;var r=Ut(t);if(!Tr(r,e))return(function(a,i,s){var l,u=rc(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(t,r,e);var n=r[e];return t.I||!ot(n)?n:n===Ha(t.t,e)?(Ga(t),t.o[e]=Va(t.A.h,n,t)):n},has:function(t,e){return e in Ut(t)},ownKeys:function(t){return Reflect.ownKeys(Ut(t))},set:function(t,e,r){var n=rc(Ut(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=Ha(Ut(t),e),i=a?.[J];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(cc(r,a)&&(r!==void 0||Tr(t.t,e)))return!0;Ga(t),Ft(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ha(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ga(t),Ft(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Ut(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){je(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){je(12)}},zo={};dr(Io,(function(t,e){zo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),zo.deleteProperty=function(t,e){return zo.set.call(this,t,e,void 0)},zo.set=function(t,e,r){return Io.set.call(this,t[0],e,r,t[0])};var du=(function(){function t(r){var n=this;this.O=ac,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(C){var R=this;C===void 0&&(C=l);for(var w=arguments.length,I=Array(w>1?w-1:0),M=1;M<w;M++)I[M-1]=arguments[M];return u.produce(C,(function(D){var W;return(W=i).call.apply(W,[R,D].concat(I))}))}}var m;if(typeof i!="function"&&je(6),s!==void 0&&typeof s!="function"&&je(7),ot(a)){var h=ec(n),g=Va(n,a,void 0),y=!0;try{m=i(g),y=!1}finally{y?Ln(h):ja(h)}return typeof Promise<"u"&&m instanceof Promise?m.then((function(C){return Fa(h,s),Ba(C,h)}),(function(C){throw Ln(h),C})):(Fa(h,s),Ba(m,h))}if(!a||typeof a!="object"){if((m=i(a))===void 0&&(m=a),m===dc&&(m=void 0),n.D&&Xa(m,!0),s){var x=[],S=[];yt("Patches").M(a,m,x,S),s(x,S)}return m}je(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(m){for(var h=arguments.length,g=Array(h>1?h-1:0),y=1;y<h;y++)g[y-1]=arguments[y];return n.produceWithPatches(m,(function(x){return a.apply(void 0,[x].concat(g))}))};var s,l,u=n.produce(a,i,(function(m,h){s=m,l=h}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(m){return[m,s,l]})):[u,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){ot(r)||je(8),Lt(r)&&(r=iu(r));var n=ec(this),a=Va(this,r,void 0);return a[J].C=!0,ja(n),a},e.finishDraft=function(r,n){var a=r&&r[J],i=a.A;return Fa(i,n),Ba(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!ac&&je(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=yt("Patches").$;return Lt(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Te=new du,uu=Te.produce,Dm=Te.produceWithPatches.bind(Te),$m=Te.setAutoFreeze.bind(Te),Um=Te.setUseProxies.bind(Te),Fm=Te.applyPatches.bind(Te),Bm=Te.createDraft.bind(Te),Hm=Te.finishDraft.bind(Te),Rn=uu;function ur(t){"@babel/helpers - typeof";return ur=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},ur(t)}function fc(t,e){if(ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ur(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pc(t){var e=fc(t,"string");return ur(e)=="symbol"?e:e+""}function mc(t,e,r){return(e=pc(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ei(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hc(Object(r),!0).forEach(function(n){mc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hc(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,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 gc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ti=function(){return Math.random().toString(36).substring(7).split("").join(".")},wn={INIT:"@@redux/INIT"+ti(),REPLACE:"@@redux/REPLACE"+ti(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ti()}};function fu(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 ri(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Oe(1));return r(ri)(t,e)}if(typeof t!="function")throw new Error(Oe(2));var a=t,i=e,s=[],l=s,u=!1;function m(){l===s&&(l=s.slice())}function h(){if(u)throw new Error(Oe(3));return i}function g(C){if(typeof C!="function")throw new Error(Oe(4));if(u)throw new Error(Oe(5));var R=!0;return m(),l.push(C),function(){if(R){if(u)throw new Error(Oe(6));R=!1,m();var I=l.indexOf(C);l.splice(I,1),s=null}}}function y(C){if(!fu(C))throw new Error(Oe(7));if(typeof C.type>"u")throw new Error(Oe(8));if(u)throw new Error(Oe(9));try{u=!0,i=a(i,C)}finally{u=!1}for(var R=s=l,w=0;w<R.length;w++){var I=R[w];I()}return C}function x(C){if(typeof C!="function")throw new Error(Oe(10));a=C,y({type:wn.REPLACE})}function S(){var C,R=g;return C={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Oe(11));function M(){I.next&&I.next(h())}M();var D=R(M);return{unsubscribe:D}}},C[gc]=function(){return this},C}return y({type:wn.INIT}),n={dispatch:y,subscribe:g,getState:h,replaceReducer:x},n[gc]=S,n}function pu(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:wn.INIT});if(typeof n>"u")throw new Error(Oe(12));if(typeof r(void 0,{type:wn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function yc(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{pu(r)}catch(u){l=u}return function(m,h){if(m===void 0&&(m={}),l)throw l;if(0)var g;for(var y=!1,x={},S=0;S<i.length;S++){var C=i[S],R=r[C],w=m[C],I=R(w,h);if(typeof I>"u"){var M=h&&h.type;throw new Error(Oe(14))}x[C]=I,y=y||I!==w}return y=y||i.length!==Object.keys(m).length,y?x:m}}function $r(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];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),r=0;r<t;r++)e[r]=arguments[r];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)}},l=e.map(function(u){return u(s)});return i=$r.apply(void 0,l)(a.dispatch),ei(ei({},a),{},{dispatch:i})}}}function vc(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var xc=vc();xc.withExtraArgument=vc;var oi=xc;var Oc=(function(){var t=function(e,r){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,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),mu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(m){return function(h){return u([m,h])}}function u(m){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=m[0]&2?a.return:m[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,m[1])).done)return i;switch(a=0,i&&(m=[m[0]&2,i.value]),m[0]){case 0:case 1:i=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,a=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!i||m[1]>i[0]&&m[1]<i[3])){r.label=m[1];break}if(m[0]===6&&r.label<i[1]){r.label=i[1],i=m;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(m);break}i[2]&&r.ops.pop(),r.trys.pop();continue}m=e.call(t,r)}catch(h){m=[6,h],a=0}finally{n=i=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},Ur=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},hu=Object.defineProperty,gu=Object.defineProperties,yu=Object.getOwnPropertyDescriptors,Sc=Object.getOwnPropertySymbols,bu=Object.prototype.hasOwnProperty,vu=Object.prototype.propertyIsEnumerable,Cc=function(t,e,r){return e in t?hu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Bt=function(t,e){for(var r in e||(e={}))bu.call(e,r)&&Cc(t,r,e[r]);if(Sc)for(var n=0,a=Sc(e);n<a.length;n++){var r=a[n];vu.call(e,r)&&Cc(t,r,e[r])}return t},ni=function(t,e){return gu(t,yu(e))},xu=function(t,e,r){return new Promise(function(n,a){var i=function(u){try{l(r.next(u))}catch(m){a(m)}},s=function(u){try{l(r.throw(u))}catch(m){a(m)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((r=r.apply(t,e)).next())})};var Su=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$r:$r.apply(null,arguments)},i8=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Cu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Ht(t,e){function r(){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 Bt(Bt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var Eu=(function(t){Oc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],r.concat(this))))},e})(Array),Lu=(function(t){Oc(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ur([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ur([void 0],r.concat(this))))},e})(Array);function si(t){return ot(t)?Rn(t,function(){}):t}function Ou(t){return typeof t=="boolean"}function Au(){return function(e){return Ru(e)}}function Ru(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,l=t.actionCreatorCheck,u=l===void 0?!0:l,m=new Eu;if(r&&(Ou(r)?m.push(oi):m.push(oi.withExtraArgument(r.extraArgument))),0){if(a)var h;if(s)var g;if(u)var y}return m}var ai=!0;function Ac(t){var e=Au(),r=t||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?e():i,l=r.devTools,u=l===void 0?!0:l,m=r.preloadedState,h=m===void 0?void 0:m,g=r.enhancers,y=g===void 0?void 0:g,x;if(typeof a=="function")x=a;else if(Cu(a))x=yc(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 S=s;if(typeof S=="function"&&(S=S(e),!ai&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ai&&S.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=bc.apply(void 0,S),R=$r;u&&(R=Su(Bt({trace:!ai},typeof u=="object"&&u)));var w=new Lu(C),I=w;Array.isArray(y)?I=Ur([C],y):typeof y=="function"&&(I=y(w));var M=R.apply(void 0,I);return ri(x,h,M)}function Rc(t){var e={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,r,n]}function wu(t){return typeof t=="function"}function zu(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?Rc(e):[e,r,n],i=a[0],s=a[1],l=a[2],u;if(wu(t))u=function(){return si(t())};else{var m=si(t);u=function(){return m}}function h(g,y){g===void 0&&(g=u());var x=Ur([i[y.type]],s.filter(function(S){var C=S.matcher;return C(y)}).map(function(S){var C=S.reducer;return C}));return x.filter(function(S){return!!S}).length===0&&(x=[l]),x.reduce(function(S,C){if(C)if(Lt(S)){var R=S,w=C(R,y);return w===void 0?S:w}else{if(ot(S))return Rn(S,function(I){return C(I,y)});var w=C(S,y);if(w===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return S},g)}return h.getInitialState=u,h}function _u(t,e){return t+"/"+e}function wc(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:si(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var g=n[h],y=_u(e,h),x,S;"reducer"in g?(x=g.reducer,S=g.prepare):x=g,i[h]=x,s[y]=x,l[h]=S?Ht(y,S):Ht(y)});function u(){var h=typeof t.extraReducers=="function"?Rc(t.extraReducers):[t.extraReducers],g=h[0],y=g===void 0?{}:g,x=h[1],S=x===void 0?[]:x,C=h[2],R=C===void 0?void 0:C,w=Bt(Bt({},y),s);return zu(r,function(I){for(var M in w)I.addCase(M,w[M]);for(var D=0,W=S;D<W.length;D++){var Q=W[D];I.addMatcher(Q.matcher,Q.reducer)}R&&I.addDefaultCase(R)})}var m;return{name:e,reducer:function(h,g){return m||(m=u()),m(h,g)},actions:l,caseReducers:i,getInitialState:function(){return m||(m=u()),m.getInitialState()}}}var Iu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Iu[Math.random()*64|0];return e},Mu=["name","message","stack","code"],ii=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ec=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),ku=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=Mu;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},d8=(function(){function t(e,r,n){var a=Ht(e+"/fulfilled",function(h,g,y,x){return{payload:h,meta:ni(Bt({},x||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=Ht(e+"/pending",function(h,g,y){return{payload:void 0,meta:ni(Bt({},y||{}),{arg:g,requestId:h,requestStatus:"pending"})}}),s=Ht(e+"/rejected",function(h,g,y,x,S){return{payload:x,error:(n&&n.serializeError||ku)(h||"Rejected"),meta:ni(Bt({},S||{}),{arg:y,requestId:g,rejectedWithValue:!!x,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h})();function m(h){return function(g,y,x){var S=n?.idGenerator?n.idGenerator(h):Nu(),C=new u,R,w=!1;function I(D){R=D,C.abort()}var M=(function(){return xu(this,null,function(){var D,W,Q,mt,ir,ht,Me;return mu(this,function(We){switch(We.label){case 0:return We.trys.push([0,4,,5]),mt=(D=n?.condition)==null?void 0:D.call(n,h,{getState:y,extra:x}),Pu(mt)?[4,mt]:[3,2];case 1:mt=We.sent(),We.label=2;case 2:if(mt===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,ir=new Promise(function(ke,sr){return C.signal.addEventListener("abort",function(){return sr({name:"AbortError",message:R||"Aborted"})})}),g(i(S,h,(W=n?.getPendingMeta)==null?void 0:W.call(n,{requestId:S,arg:h},{getState:y,extra:x}))),[4,Promise.race([ir,Promise.resolve(r(h,{dispatch:g,getState:y,extra:x,requestId:S,signal:C.signal,abort:I,rejectWithValue:function(ke,sr){return new ii(ke,sr)},fulfillWithValue:function(ke,sr){return new Ec(ke,sr)}})).then(function(ke){if(ke instanceof ii)throw ke;return ke instanceof Ec?a(ke.payload,S,h,ke.meta):a(ke,S,h)})])];case 3:return Q=We.sent(),[3,5];case 4:return ht=We.sent(),Q=ht instanceof ii?s(null,S,h,ht.payload,ht.meta):s(ht,S,h),[3,5];case 5:return Me=n&&!n.dispatchConditionRejection&&s.match(Q)&&Q.meta.condition,Me||g(Q),[2,Q]}})})})();return Object.assign(M,{abort:I,requestId:S,arg:h,unwrap:function(){return M.then(Tu)}})}}return Object.assign(m,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function Tu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Pu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var zc="listener",_c="completed",Ic="cancelled",u8="task-"+Ic,f8="task-"+_c,p8=zc+"-"+Ic,m8=zc+"-"+_c;var ci="listenerMiddleware";var h8=Ht(ci+"/add"),g8=Ht(ci+"/removeAll"),y8=Ht(ci+"/remove");var Lc,b8=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Lc||(Lc=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Du=function(t){return function(e){setTimeout(e,t)}},v8=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Du(10);lc();var $u=bn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),zn=class extends $u(Object){};window.ftReduxStores||(window.ftReduxStores={});var Nc=class t extends zn{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(En(i))return i;if(a==null)return;let s=wc({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=Ac({reducer:(u,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Ao(s.getInitialState());for(let g of m.keeping)h[g]=(u??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...m.overwrites};return s.reducer(u,m)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new vn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,m=i[u];return m?(...h)=>{let g=m(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{this.setState({[u]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _n=class{static format(e,r,n,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,r,n,a,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var In=v(_()),Uu="ft-app-info",Fr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Fr.eventName="authentication-change";var No=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};No.eventName="ui-locale-changed";var Fu={session:(t,e)=>{(0,In.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new Fr(e.payload)),0))}},F=In.FtReduxStore.get({name:Uu,reducers:Fu,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Mc=v(_()),Nn=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},K8=(0,Mc.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(F)}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(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>_n.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Nn([(0,li.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Nn([(0,li.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Nn([Ua({store:F.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Nn([Ua({store:F.name})],e.prototype,"uiLocale",void 0),e});var kc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(kc||(kc={}));var Tc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Tc||(Tc={}));var Pc;(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"})(Pc||(Pc={}));var Dc;(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"})(Dc||(Dc={}));var $c;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})($c||($c={}));var Uc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Uc||(Uc={}));var Fc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Fc||(Fc={}));var Bc;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Bc||(Bc={}));var Hc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Hc||(Hc={}));var Gc;(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"})(Gc||(Gc={}));var Wc;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(Wc||(Wc={}));var jc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(jc||(jc={}));var Vc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Vc||(Vc={}));var Kc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Kc||(Kc={}));var Zc;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Zc||(Zc={}));var qc;(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"})(qc||(qc={}));var Yc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Yc||(Yc={}));var Xc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Xc||(Xc={}));var Qc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Qc||(Qc={}));var Jc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Jc||(Jc={}));var el;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(el||(el={}));var tl;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(tl||(tl={}));var rl;(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"})(rl||(rl={}));var ol;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(ol||(ol={}));var nl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(nl||(nl={}));var al;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(al||(al={}));var il;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(il||(il={}));var ue;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ue||(ue={}));var Ve;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ve||(Ve={}));var sl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(sl||(sl={}));var cl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(cl||(cl={}));var ll;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ll||(ll={}));var dl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(dl||(dl={}));var ul;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(ul||(ul={}));var fl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(fl||(fl={}));var pl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(pl||(pl={}));var ml;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ml||(ml={}));var hl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(hl||(hl={}));var gl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(gl||(gl={}));var yl;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(yl||(yl={}));var bl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(bl||(bl={}));var Bu={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN,ue.BEHAVIOR_DATA_USER],[ue.GENERATIVE_AI_EXPORT_USER]:[ue.GENERATIVE_AI_USER]};function vl(t,e){return t===e||(Bu[t]??[]).some(r=>vl(r,e))}function xl(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=>vl(n,e))}var Dn=v(_());var di=v(_());var fr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=F.getState(),a=e??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let a=F.subscribe(()=>{n=t.get(e),n&&(a(),r(n))})}})}};var Br=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:fr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):fr.await()}};var Pe=class extends Br{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new di.CacheRegistry,this.cache=e?a.commonCache:new di.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Mn=class extends Pe{async listMySearches(){let{session:e}=F.getState();return xl(e,ue.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var kn=class extends Pe{async listMyBookmarks(){let e=F.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Tn=class extends Pe{constructor(){super(...arguments),this.CACHE_DURATION=180*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=F.getState().session;return!!e?.sessionAuthenticated}};var Pn=class extends Pe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var Hu="ft-user-assets",Gu={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(Ve).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:a}=e.payload;fi(t,r,[...ui(t,r),a]),Sl(t,r,1,n),Cl(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;fi(t,r,ui(t,r).map(a=>a.id===n.id?n:a)),Cl(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;fi(t,r,ui(t,r).filter(i=>i.id!==a)),Sl(t,r,-1,n)}},El={[Ve.SEARCHES]:"savedSearches",[Ve.BOOKMARKS]:"bookmarks",[Ve.BOOKS]:void 0,[Ve.COLLECTIONS]:void 0},ui=(t,e)=>{var r;let n=El[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},fi=(t,e,r)=>{let n=El[e];n&&(t[n]=r)},Sl=(t,e,r,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===Ve.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Cl=(t,e)=>{let r=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},Re=Dn.FtReduxStore.get({name:Hu,reducers:Gu,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ve).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),pi=class{constructor(e=new Tn,r=new Pn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new kn,this.savedSearchesService=new Mn,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();(0,Dn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Re.actions.clearAssetCount(),Re.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Re.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Re.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Re.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Re.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Re.getState().assetCounts.allAsset[e]!==r.count&&Re.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Re.getState().assetCounts.bookmarkByMap[e]!==r.count&&Re.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Re.getState().assetCounts.bookmarkByMap).length!==0;e===Ve.BOOKMARKS&&r&&Re.actions.clearBookmarkCountByMap(),Re.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Re.actions.bookmarks(r)}}},Wu=new pi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Wu);var mi=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new mi;var Ke=v(_());var Ll,Hr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ju=Symbol("clearAfterUnitTest"),$n=class extends(0,Ke.withEventBus)(Pe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ll]=()=>{this.defaultMessages={},this.cache=new Ke.CacheRegistry,this.listeners={}},this.currentUiLocale=F.getState().uiLocale,F.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=F.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Ke.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new Ke.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof Ke.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Hr({loadedContexts:e})),this.dispatchEvent(new Hr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Hr({loadedContexts:[e]})),this.dispatchEvent(new Hr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ke.delay)(0).then(()=>n()).catch(()=>null)))}};Ll=ju;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends $n{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends $n{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Gr=window.FluidTopicsI18nService,Un=window.FluidTopicsCustomI18nService;var Ol=v(_()),hi=class{highlightHtml(e,r,n){(0,Ol.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new hi;var Al=v(_());var gi=class{isDate(e){var r,n,a,i;return(i=(a=((n=(r=F.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var n,a,i,s;if(e==null)return"";try{return Al.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:F.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new gi;var Rl=v(_());var Mo=class{static get(e,r){var n,a,i,s;let l=F.getState(),{lang:u,region:m}=(i=(a=(n=l.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new Rl.SearchPlaceConverter(l.baseUrl,e??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${u}-${m}`)}};var yi=class{urlToSearchRequest(e){return Mo.get().parse(e)}searchRequestToUrl(e){return Mo.get().serialize(e)}};window.FluidTopicsUrlService=new yi;var Ot=v(_());var pr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};pr.eventName="change";var bi=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},wl=new bi;var Fn=class t extends Ot.WithEventBus{static build(){return new t(window.history,wl,()=>window.location,!1)}constructor(e,r,n,a){var i,s;super(),this.history=e,this.historyStorage=r,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,r=!1){let n=r&&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,Ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new pr(this.currentItem())),0)}installProxies(){let e=r=>(n,a,[i,s,l])=>{let u=r(),m={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[m,s,l]),this.setCurrentState(m,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(pr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(pr.eventName,e)}currentItem(){return(0,Ot.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,Ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ot.deepCopy)(r.find(n=>e(n)))}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,Ot.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.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,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let a=r??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=Fn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var zl=v($());var _l=zl.css`
|
|
2
|
-
`;var Ml=v($()),we=v(V()),gr=v(_());var mr=v(_());function Il(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Bn=class extends Br{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var vi=class t extends mr.FtStateManager{static build(e){return new t(F,e)}constructor(e,r){super(),this.store=e,this.cache=new mr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Bn,this.cleanSessionDebouncer=new mr.Debouncer,this.reloadDebouncer=new mr.Debouncer(500),this.apiProvider=r??(()=>fr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Fr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>Il(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(
|
|
2
|
+
`;var Ml=v($()),we=v(V()),gr=v(_());var mr=v(_());function Il(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Bn=class extends Br{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var vi=class t extends mr.FtStateManager{static build(e){return new t(F,e)}constructor(e,r){super(),this.store=e,this.cache=new mr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Bn,this.cleanSessionDebouncer=new mr.Debouncer,this.reloadDebouncer=new mr.Debouncer(500),this.apiProvider=r??(()=>fr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Fr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>Il(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new No(n)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},Nl=vi.build();var hr=class extends Event{constructor(e,r,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=a??!1}};var ko=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new hr(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var be=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},re=class extends gr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Nl,this.contextRoot=new ko}render(){return Ml.html`
|
|
3
3
|
<slot></slot>
|
|
4
4
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Gr.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};re.elementDefinitions={};re.styles=_l;be([(0,we.property)()],re.prototype,"baseUrl",void 0);be([(0,we.property)()],re.prototype,"tenantId",void 0);be([(0,we.property)()],re.prototype,"apiIntegrationIdentifier",void 0);be([(0,we.property)()],re.prototype,"apiIntegrationAppVersion",void 0);be([(0,we.property)()],re.prototype,"uiLocale",void 0);be([(0,gr.jsonProperty)(null)],re.prototype,"availableUiLocales",void 0);be([(0,gr.jsonProperty)(null)],re.prototype,"metadataConfiguration",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"editorMode",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"noCustom",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"openExternalDocumentInNewTab",void 0);be([(0,we.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],re.prototype,"noCustomComponent",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"withManualResources",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"navigatorOnline",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"forcedOffline",void 0);be([(0,we.property)({type:Boolean})],re.prototype,"authenticationRequired",void 0);be([(0,gr.jsonProperty)([])],re.prototype,"messageContexts",void 0);be([(0,gr.jsonProperty)(void 0)],re.prototype,"session",void 0);var Tl=v(_());var kl={"ft-app-context":re};(0,Tl.customElements)(kl);var Wr=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Un:Gr}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var Vr=v(_());var Pl=v(V());var xi=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},jr=new xi;var Zu=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Po=Symbol("i18nAttributes"),Dl=Symbol("i18nListAttributes"),Do=Symbol("i18nProperties"),Hn=Symbol("i18nContexts"),To=Symbol("i18nUnsubs"),Gt=(0,Vr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Un:Gr}i18n(i){let{context:s,key:l,message:u}=i,{custom:m,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let y=h??(g?g(this):[]);return this.getI18nService(m).resolveMessage(s,l,...y)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(jr.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,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,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var m;return((m=u?.context)===null||m===void 0?void 0:m.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,m=(h,g,y)=>y?.context&&y.key&&i(h,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...h})}:y;(s=this[Po])===null||s===void 0||s.forEach((h,g)=>u[g]=m(h,g,u[g])),(l=this[Dl])===null||l===void 0||l.forEach((h,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(x=>m(h,g,x))})}updateI18nProperties(i){var s;(s=this[Do])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[Hn].set(u,{isCustomContext:l}),this[To].has(u)||this[To].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[Hn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Hn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[To].forEach(i=>i()),this[To].clear()}}return e=Hn,r=To,Zu([(0,Pl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Gn=class extends Gt(Vr.FtLitElement){},Wn=class extends Gt(Vr.FtLitElementRedux){};var $o=(t,e)=>(r,n)=>{var a,i;r.constructor.createProperty(n,e??{attribute:!1,type:String});let s={...t,key:(a=t.key)!==null&&a!==void 0?a:n};r[Do]=(i=r[Do])!==null&&i!==void 0?i:new Map,r[Do].set(n,s)};var $l=v($());var Ul=$l.css`
|
|
5
5
|
`;var jn=v($()),Vn=v(V()),Kn=v(_());var Uo=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},nt=class extends Wn{constructor(){super(),this.editorMode=!1,this.addStore(F)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":jn.nothing:jn.html`
|
|
@@ -2737,7 +2737,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2737
2737
|
</div>
|
|
2738
2738
|
</div>
|
|
2739
2739
|
</div>
|
|
2740
|
-
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new Na(e.detail)),this.closeMenu()}onContentClick(e){(0,Eo.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ftds-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:n}=await Ra(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${n}px`,this.menuWrapper.classList.add("ftds-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.
|
|
2740
|
+
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new Na(e.detail)),this.closeMenu()}onContentClick(e){(0,Eo.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ftds-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:n}=await Ra(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${n}px`,this.menuWrapper.classList.add("ftds-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};G.elementDefinitions={"ftds-floating-menu-item":Be,"ftds-button":B};G.styles=[C4];me([(0,ie.state)()],G.prototype,"menuOpen",void 0);me([(0,ie.state)()],G.prototype,"forceMenuOpen",void 0);me([(0,ie.query)(".ftds-floating-menu")],G.prototype,"container",void 0);me([(0,ie.query)(".ftds-floating-menu--wrapper")],G.prototype,"menuWrapper",void 0);me([(0,ie.query)("#actions-button")],G.prototype,"actionButton",void 0);me([(0,ie.queryAssignedElements)({slot:"toggle"})],G.prototype,"customToggle",void 0);me([(0,ie.property)({type:Boolean})],G.prototype,"primary",void 0);me([(0,ie.property)({type:Boolean})],G.prototype,"secondary",void 0);me([(0,ie.property)({type:Boolean})],G.prototype,"tertiary",void 0);me([(0,ie.property)({type:Boolean})],G.prototype,"neutral",void 0);me([(0,ie.property)({type:Boolean})],G.prototype,"small",void 0);me([(0,ie.property)()],G.prototype,"label",void 0);me([(0,ie.property)()],G.prototype,"tooltipPosition",void 0);me([(0,ie.property)()],G.prototype,"iconVariant",void 0);me([(0,ie.property)()],G.prototype,"icon",void 0);me([(0,ie.property)()],G.prototype,"text",void 0);me([(0,ie.property)()],G.prototype,"horizontalAlignment",void 0);me([(0,ie.property)()],G.prototype,"verticalAlignment",void 0);me([(0,ie.property)({type:Boolean})],G.prototype,"disabled",void 0);me([(0,Eo.jsonProperty)([])],G.prototype,"closeMenuMatchers",void 0);var z4=v($()),Ma=v(_()),nm={color:Ma.FtCssVariableFactory.extend("--ftds-floating-menu-label-color","",Ma.designSystemVariables.colorOnSurfaceMedium)},_4=z4.css`
|
|
2741
2741
|
.ftds-floating-menu-label {
|
|
2742
2742
|
padding: 4px 8px;
|
|
2743
2743
|
}
|
|
@@ -5,7 +5,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
5
5
|
.highlight-html-match {
|
|
6
6
|
background: ${C1};
|
|
7
7
|
}
|
|
8
|
-
`;function us(t,e,r){var o,a;let i=t.getAttribute("data-highlight-html-query");if((i??"")!==(e??"")){let s=new $f(t);if(s.unmark(),e&&e.trim()){let c={className:(o=r?.className)!==null&&o!==void 0?o:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(c.each=
|
|
8
|
+
`;function us(t,e,r){var o,a;let i=t.getAttribute("data-highlight-html-query");if((i??"")!==(e??"")){let s=new $f(t);if(s.unmark(),e&&e.trim()){let c={className:(o=r?.className)!==null&&o!==void 0?o:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(c.each=u=>{for(let g in r.attributes)u.setAttribute(g,r.attributes[g])}),s.mark(e.replace(/"[^"]+"/g,""),{...c,separateWordSearch:!0}),((a=e.match(/"[^"]+"/g))!==null&&a!==void 0?a:[]).forEach(u=>s.mark(u.replace(/"/g,""),{...c,separateWordSearch:!1}))}}t.setAttribute("data-highlight-html-query",e??"")}var ps={};J(ps,{noTextInputDefaultClearButton:()=>Bf,noTextSelect:()=>on,safariEllipsisFix:()=>Er,wordWrap:()=>Uf});var on=N`
|
|
9
9
|
.ft-no-text-select {
|
|
10
10
|
-webkit-touch-callout: none;
|
|
11
11
|
-webkit-user-select: none;
|
|
@@ -82,7 +82,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
82
82
|
`)}
|
|
83
83
|
</ul>
|
|
84
84
|
`}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?xe.error:this.warningMessages.length?xe.warning:xe.default}}return we([v()],e.prototype,"warningRules",void 0),we([v()],e.prototype,"errorRules",void 0),we([v()],e.prototype,"validateOn",void 0),we([v({type:Boolean})],e.prototype,"validateAtRender",void 0),we([v()],e.prototype,"label",void 0),we([v({type:Boolean})],e.prototype,"hideLabel",void 0),we([v()],e.prototype,"name",void 0),we([v({type:Boolean})],e.prototype,"disabled",void 0),we([v()],e.prototype,"helperText",void 0),we([v()],e.prototype,"forceStatus",void 0),we([v({reflect:!0})],e.prototype,"value",void 0),we([j()],e.prototype,"errorMessages",void 0),we([j()],e.prototype,"warningMessages",void 0),we([j()],e.prototype,"status",void 0),we([j()],e.prototype,"focused",void 0),we([j()],e.prototype,"additionalWarningRules",void 0),we([j()],e.prototype,"additionalErrorRules",void 0),e});var fn=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let o of r)o._$AO?.(e,!1),fn(o,e);return!0},la=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},Zd=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),Hp(e)}};function Up(t){this._$AN!==void 0?(la(this),this._$AM=t,Zd(this)):this._$AM=t}function Bp(t,e=!1,r=0){let o=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(o))for(let i=r;i<o.length;i++)fn(o[i],!1),la(o[i]);else o!=null&&(fn(o,!1),la(o));else fn(this,t)}var Hp=t=>{t.type==Et.CHILD&&(t._$AP??=Bp,t._$AQ??=Up)},lo=class extends nt{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,o){super._$AT(e,r,o),Zd(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(fn(this,e),la(this))}setValue(e){if(_l(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var nc=class extends lo{get element(){var e;return(e=this.part)===null||e===void 0?void 0:e.element}constructor(e){super(e),this.onFirstTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let o=r.relatedTarget;this.isInsideElement(o,this.element)?await this.focusLastDescendant(this.element):await this.focusFirstDescendant(this.element)},this.onLastTrapFocus=async r=>{if(!this.element||!r.relatedTarget)return;let o=r.relatedTarget;this.isInsideElement(o,this.element)?await this.focusFirstDescendant(this.element):await this.focusLastDescendant(this.element)}}render(){return Ce}update(e){return this.part=e,this.ensureFocusTrap(e.element),Ce}reconnected(){var e;this.ensureFocusTrap((e=this.part)===null||e===void 0?void 0:e.element)}disconnected(){this.removeFocusTrap()}ensureFocusTrap(e){var r,o;this.isElementTrappable(e)&&(((r=this.firstTrap)===null||r===void 0?void 0:r.parentElement)===e&&((o=this.lastTrap)===null||o===void 0?void 0:o.parentElement)===e||(this.removeFocusTrap(),this.createFocusTrap(e)))}removeFocusTrap(){var e,r,o,a;(e=this.firstTrap)===null||e===void 0||e.removeEventListener("focus",this.onFirstTrapFocus),(r=this.lastTrap)===null||r===void 0||r.removeEventListener("focus",this.onLastTrapFocus),(o=this.firstTrap)===null||o===void 0||o.remove(),(a=this.lastTrap)===null||a===void 0||a.remove(),this.firstTrap=void 0,this.lastTrap=void 0}isElementTrappable(e){return!!e&&e instanceof HTMLElement&&e.childElementCount>0}createFocusTrap(e){this.firstTrap=this.createTrap(),this.lastTrap=this.createTrap(),e.insertBefore(this.firstTrap,e.firstChild),e.appendChild(this.lastTrap),this.lastTrap.addEventListener("focus",this.onLastTrapFocus),this.firstTrap.addEventListener("focus",this.onFirstTrapFocus)}createTrap(){let e=document.createElement("div");return e.tabIndex=0,e}getChildren(e){return e instanceof HTMLSlotElement?e.assignedElements():e.shadowRoot?e.shadowRoot.children:e.children}async focusFirstDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let o=0;o<r.length;o++){let a=r[o];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusFirstDescendant(a)))return!0}return!1}async focusLastDescendant(e){await this.updateCompleteIfNecessary(e);let r=this.getChildren(e);for(let o=r.length-1;o>=0;o--){let a=r[o];if(a instanceof HTMLElement&&(this.attemptFocus(a)||await this.focusLastDescendant(a)))return!0}return!1}async updateCompleteIfNecessary(e){e instanceof ot&&await e.updateComplete}isInsideElement(e,r){for(let o=e;o;o=o.parentNode){if(o===r)return!0;o instanceof ShadowRoot?o=o.host:o.assignedSlot&&(o=o.assignedSlot)}return!1}attemptFocus(e){return e===this.firstTrap||e===this.lastTrap||!this.isFocusable(e)?!1:(e.focus(),!0)}isFocusable(e){return!e.checkVisibility()||this.isElementDisabled(e)?!1:e instanceof HTMLAnchorElement?!!e.href&&e.rel!=="ignore":e instanceof HTMLInputElement?e.type!=="hidden":e.tabIndex>=0}isElementDisabled(e){return"disabled"in e&&!!e.disabled}},Ov=je(nc);var qd;(function(t){t.sm="sm",t.md="md",t.lg="lg",t.xl="xl"})(qd||(qd={}));var Gp={sm:640,md:768,lg:1024,xl:1280},ac=class extends lo{constructor(e){super(e),this.size=0,this.onResize=()=>{let r=window.innerWidth;this.size!==r&&(this.size=r,this.lastArgs&&this.setValue(this.render(...this.lastArgs)))},this.size=window.innerWidth,window.addEventListener("resize",this.onResize)}disconnected(){window.removeEventListener("resize",this.onResize)}reconnected(){window.addEventListener("resize",this.onResize)}update(e,[r,o,a]){return this.lastArgs=[r,o,a],this.render(r,o,a)}render(e,r,o){let a=this.resolveThreshold(e),i=o??(()=>oe);return this.size>a?r():i()}resolveThreshold(e){return typeof e=="number"?e:Gp[e]}},Rv=je(ac);var ic,sc,cc,lc,dc=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((cc=(sc=(ic=window.safari)===null||ic===void 0?void 0:ic.pushNotification)===null||sc===void 0?void 0:sc.toString())!==null&&cc!==void 0?cc:"")==="[object SafariRemoteNotification]",Wp="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(lc=window.ftGlobals)!==null&&lc!==void 0?lc:{lit:ni,litDecorators:ii,litRepeat:si,litClassMap:ci,litStyleMap:li,litUnsafeHTML:ui,wcUtils:{...xi,...pi,...Ai,...Ks,...Li,...hi,...Wi,...vi,...os,...Xs,...Vd,...Bs,...ns,...Gi,...ls,...js,...cs,...Js,...Qs,...S1,...gi,...fs,...Vi,...ps,...jd,...E1,...hs,...$s,...qs,...as,...ss,...Gs,...Ci,isSafari:dc,isTouchScreen:Wp,setVariable:A}};var Vp="ft-app-info",uo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};uo.eventName="authentication-change";var pn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};pn.eventName="ui-locale-changed";var jp={session:(t,e)=>{Ze(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>K.dispatchEvent(new uo(e.payload)),0))}},K=Rr.get({name:Vp,reducers:jp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var da=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},_x=Le(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(K)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>st.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return da([v({type:Boolean})],e.prototype,"useLongDateFormat",void 0),da([v({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),da([Xr({store:K.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),da([Xr({store:K.name})],e.prototype,"uiLocale",void 0),e});var Ir=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=K.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=K.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var fo=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 Xe=class extends fo{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ot,this.cache=e?a.commonCache:new Ot}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var ua=class extends Xe{async listMySearches(){let{session:e}=K.getState();return Hd(e,ve.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var fa=class extends Xe{async listMyBookmarks(){let e=K.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var pa=class extends Xe{constructor(){super(...arguments),this.CACHE_DURATION=180*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=K.getState().session;return!!e?.sessionAuthenticated}};var ha=class extends Xe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=K.getState().session;return!!e?.sessionAuthenticated}};var Kp="ft-user-assets",Zp={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(it).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;fc(t,r,[...uc(t,r),a]),Yd(t,r,1,o),Xd(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;fc(t,r,uc(t,r).map(a=>a.id===o.id?o:a)),Xd(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;fc(t,r,uc(t,r).filter(i=>i.id!==a)),Yd(t,r,-1,o)}},Jd={[it.SEARCHES]:"savedSearches",[it.BOOKMARKS]:"bookmarks",[it.BOOKS]:void 0,[it.COLLECTIONS]:void 0},uc=(t,e)=>{var r;let o=Jd[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},fc=(t,e,r)=>{let o=Jd[e];o&&(t[o]=r)},Yd=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===it.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},Xd=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Fe=Rr.get({name:Kp,reducers:Zp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(it).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),pc=class{constructor(e=new pa,r=new ha){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=K.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new fa,this.savedSearchesService=new ua,K.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=K.getState();Ze((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),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 r=await this.assetCountsService.getUserAssetCount(e);r&&Fe.getState().assetCounts.allAsset[e]!==r.count&&Fe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Fe.getState().assetCounts.bookmarkByMap[e]!==r.count&&Fe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Fe.getState().assetCounts.bookmarkByMap).length!==0;e===it.BOOKMARKS&&r&&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 r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Fe.actions.bookmarks(r)}}},qp=new pc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=qp);var hc=class{addCommand(e,r=!1){K.commands.add(e,r)}consumeCommand(e){return K.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new hc;var Qd,po=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Yp=Symbol("clearAfterUnitTest"),ma=class extends Zn(Xe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Qd]=()=>{this.defaultMessages={},this.cache=new Ot,this.listeners={}},this.currentUiLocale=K.getState().uiLocale,K.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=K.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ze(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new nn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof pr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new po({loadedContexts:e})),this.dispatchEvent(new po({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new po({loadedContexts:[e]})),this.dispatchEvent(new po({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>jn(0).then(()=>o()).catch(()=>null)))}};Qd=Yp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ma{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ma{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ho=window.FluidTopicsI18nService,ga=window.FluidTopicsCustomI18nService;var mc=class{highlightHtml(e,r,o){us(e,r,o)}};window.FluidTopicsHighlightHtmlService=new mc;var gc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=K.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return st.format(e,(o=r?.locale)!==null&&o!==void 0?o:K.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new gc;var hn=class{static get(e,r){var o,a,i,s;let c=K.getState(),{lang:d,region:u}=(i=(a=(o=c.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new io(c.baseUrl,e??20,(s=c.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${d}-${u}`)}};var yc=class{urlToSearchRequest(e){return hn.get().parse(e)}searchRequestToUrl(e){return hn.get().serialize(e)}};window.FluidTopicsUrlService=new yc;var Mr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Mr.eventName="change";var bc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},e2=new bc;var ya=class t extends Pt{static build(){return new t(window.history,e2,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ze(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Mr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Mr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Mr.eventName,e)}currentItem(){return Ke(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 Ke(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return Ke(r.find(o=>e(o)))}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 Ke(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ya.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var t2=N`
|
|
85
|
-
`;function r2(t,e){let{authenticationRequired:r,session:o}=K.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var ba=class extends fo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var vc=class t extends un{static build(e){return new t(K,e)}constructor(e,r){super(),this.store=e,this.cache=new Ot,this.withManualResources=!0,this.userLocaleService=new ba,this.cleanSessionDebouncer=new Ue,this.reloadDebouncer=new Ue(500),this.apiProvider=r??(()=>Ir.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(uo.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>r2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(
|
|
85
|
+
`;function r2(t,e){let{authenticationRequired:r,session:o}=K.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var ba=class extends fo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var vc=class t extends un{static build(e){return new t(K,e)}constructor(e,r){super(),this.store=e,this.cache=new Ot,this.withManualResources=!0,this.userLocaleService=new ba,this.cleanSessionDebouncer=new Ue,this.reloadDebouncer=new Ue(500),this.apiProvider=r??(()=>Ir.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(uo.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>r2(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new pn(o)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},o2=vc.build();var Nr=class extends Event{constructor(e,r,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=o,this.subscribe=a??!1}};var mn=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:o}=r;for(let{elementRef:a,callbackRef:i}of o){let s=a.deref(),c=i.deref();s===void 0||c===void 0||s.dispatchEvent(new Nr(e.context,s,c,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],o=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(o)||(i.add(o),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(o)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var Re=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},pe=class extends Ar{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.authenticationRequired=!1,this.messageContexts=[],this.stateManager=o2,this.contextRoot=new mn}render(){return k`
|
|
86
86
|
<slot></slot>
|
|
87
87
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>ho.addContext(o)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};pe.elementDefinitions={};pe.styles=t2;Re([v()],pe.prototype,"baseUrl",void 0);Re([v()],pe.prototype,"tenantId",void 0);Re([v()],pe.prototype,"apiIntegrationIdentifier",void 0);Re([v()],pe.prototype,"apiIntegrationAppVersion",void 0);Re([v()],pe.prototype,"uiLocale",void 0);Re([De(null)],pe.prototype,"availableUiLocales",void 0);Re([De(null)],pe.prototype,"metadataConfiguration",void 0);Re([v({type:Boolean})],pe.prototype,"editorMode",void 0);Re([v({type:Boolean})],pe.prototype,"noCustom",void 0);Re([v({type:Boolean})],pe.prototype,"openExternalDocumentInNewTab",void 0);Re([v({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],pe.prototype,"noCustomComponent",void 0);Re([v({type:Boolean})],pe.prototype,"withManualResources",void 0);Re([v({type:Boolean})],pe.prototype,"navigatorOnline",void 0);Re([v({type:Boolean})],pe.prototype,"forcedOffline",void 0);Re([v({type:Boolean})],pe.prototype,"authenticationRequired",void 0);Re([De([])],pe.prototype,"messageContexts",void 0);Re([De(void 0)],pe.prototype,"session",void 0);var n2={"ft-app-context":pe};Q(n2);var mo=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?ga:ho}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var xc=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},go=new xc;var Qp=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},yn=Symbol("i18nAttributes"),a2=Symbol("i18nListAttributes"),bn=Symbol("i18nProperties"),va=Symbol("i18nContexts"),gn=Symbol("i18nUnsubs"),tr=Le(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ga:ho}i18n(i){let{context:s,key:c,message:d}=i,{custom:u,args:g,argsProvider:h}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=g??(h?h(this):[]);return this.getI18nService(u).resolveMessage(s,c,...y)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(go.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,u=(g,h,y)=>y?.context&&y.key&&i(g,h,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...g})}:y;(s=this[yn])===null||s===void 0||s.forEach((g,h)=>d[h]=u(g,h,d[h])),(c=this[a2])===null||c===void 0||c.forEach((g,h)=>{var y;return d[h]=(y=d[h])===null||y===void 0?void 0:y.map(b=>u(g,h,b))})}updateI18nProperties(i){var s;(s=this[bn])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[va].set(d,{isCustomContext:c}),this[gn].has(d)||this[gn].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[va].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[va].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[gn].forEach(i=>i()),this[gn].clear()}}return e=va,r=gn,Qp([v({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),xa=class extends tr(G){},Sa=class extends tr(Ar){};var vn=(t,e)=>(r,o)=>{var a,i;r.constructor.createProperty(o,e??{attribute:!1,type:String});let s={...t,key:(a=t.key)!==null&&a!==void 0?a:o};r[bn]=(i=r[bn])!==null&&i!==void 0?i:new Map,r[bn].set(o,s)};var i2=N`
|
|
88
88
|
`;var xn=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},gt=class extends Sa{constructor(){super(),this.editorMode=!1,this.addStore(K)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":oe:k`
|
|
@@ -2817,7 +2817,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2817
2817
|
</div>
|
|
2818
2818
|
</div>
|
|
2819
2819
|
</div>
|
|
2820
|
-
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new Wa(e.detail)),this.closeMenu()}onContentClick(e){jo(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ftds-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:o}=await en(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${o}px`,this.menuWrapper.classList.add("ftds-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.
|
|
2820
|
+
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new Wa(e.detail)),this.closeMenu()}onContentClick(e){jo(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ftds-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:o}=await en(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${o}px`,this.menuWrapper.classList.add("ftds-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};ne.elementDefinitions={"ftds-floating-menu-item":tt,"ftds-button":Z};ne.styles=[ju];Se([j()],ne.prototype,"menuOpen",void 0);Se([j()],ne.prototype,"forceMenuOpen",void 0);Se([Y(".ftds-floating-menu")],ne.prototype,"container",void 0);Se([Y(".ftds-floating-menu--wrapper")],ne.prototype,"menuWrapper",void 0);Se([Y("#actions-button")],ne.prototype,"actionButton",void 0);Se([Wo({slot:"toggle"})],ne.prototype,"customToggle",void 0);Se([v({type:Boolean})],ne.prototype,"primary",void 0);Se([v({type:Boolean})],ne.prototype,"secondary",void 0);Se([v({type:Boolean})],ne.prototype,"tertiary",void 0);Se([v({type:Boolean})],ne.prototype,"neutral",void 0);Se([v({type:Boolean})],ne.prototype,"small",void 0);Se([v()],ne.prototype,"label",void 0);Se([v()],ne.prototype,"tooltipPosition",void 0);Se([v()],ne.prototype,"iconVariant",void 0);Se([v()],ne.prototype,"icon",void 0);Se([v()],ne.prototype,"text",void 0);Se([v()],ne.prototype,"horizontalAlignment",void 0);Se([v()],ne.prototype,"verticalAlignment",void 0);Se([v({type:Boolean})],ne.prototype,"disabled",void 0);Se([De([])],ne.prototype,"closeMenuMatchers",void 0);var P6={color:n.extend("--ftds-floating-menu-label-color","",ee.colorOnSurfaceMedium)},Zu=N`
|
|
2821
2821
|
.ftds-floating-menu-label {
|
|
2822
2822
|
padding: 4px 8px;
|
|
2823
2823
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ftds-period-picker",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.21",
|
|
4
4
|
"description": "The design system period picker component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-i18n": "2.1.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
24
|
-
"@fluid-topics/ftds-base-input": "2.1.
|
|
25
|
-
"@fluid-topics/ftds-button": "2.1.
|
|
26
|
-
"@fluid-topics/ftds-floating-menu": "2.1.
|
|
27
|
-
"@fluid-topics/ftds-icon": "2.1.
|
|
28
|
-
"@fluid-topics/ftds-radio": "2.1.
|
|
29
|
-
"@fluid-topics/ftds-text-input": "2.1.
|
|
22
|
+
"@fluid-topics/ft-i18n": "2.1.21",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "2.1.21",
|
|
24
|
+
"@fluid-topics/ftds-base-input": "2.1.21",
|
|
25
|
+
"@fluid-topics/ftds-button": "2.1.21",
|
|
26
|
+
"@fluid-topics/ftds-floating-menu": "2.1.21",
|
|
27
|
+
"@fluid-topics/ftds-icon": "2.1.21",
|
|
28
|
+
"@fluid-topics/ftds-radio": "2.1.21",
|
|
29
|
+
"@fluid-topics/ftds-text-input": "2.1.21",
|
|
30
30
|
"lit": "3.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@fluid-topics/ft-wc-test-utils": "2.1.
|
|
33
|
+
"@fluid-topics/ft-wc-test-utils": "2.1.21"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "a0f619df74c0665183d73df09e75b1eddc2a2a1f"
|
|
36
36
|
}
|