@fluid-topics/ft-reader-topic-title 1.3.54 → 1.3.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
45
45
  input::-webkit-search-results-decoration {
46
46
  display: none;
47
47
  }
48
- `;var Ss={};var Un={};D(Un,{ParametrizedLabelResolver:()=>hr});var hr=class r{constructor(e,t){this.defaultLabels=e,this.labels=t}resolve(e,...t){var n,a;e=this.resolvePluralKey(e,t);let i=(a=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&a!==void 0?a:"";return r.replaceParameters(i,...t)}static replaceParameters(e,...t){return t.forEach((n,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>r.formatValue(n,s))),e}resolvePluralKey(e,t){for(let n of t)if(typeof n=="number"){let a=`${String(e)}[\\=${n}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,t){return e instanceof Date?r.formatDate(e,t):e??""}static formatDate(e,t){let n=a=>t?.includes("date")?e.toLocaleDateString(a):t?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return n(document.documentElement.lang)}catch{return n()}}};var da={};D(da,{FtCommandQueue:()=>gr,FtLitElementRedux:()=>ct,FtReduxStore:()=>Me,FtStateManager:()=>la,ReduxWatcher:()=>qr,clearAllStores:()=>Fu,isFtReduxStore:()=>_t,redux:()=>q,reduxEventListener:()=>Bn,reduxReactive:()=>eu,watch:()=>Uu,withRedux:()=>Os});var eu=()=>(r,e)=>{var t;let n=r.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(t=n.reduxReactiveProperties)===null||t===void 0||t.add(e)},q=r=>{let e=r??{};return(t,n)=>{var a;let i={hasChanged:rt,attribute:!1,...e};_(i)(t,n);let s=t.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})}},Bn=r=>(e,t)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(t,r)};var gr=class{constructor(){this.queue=[]}add(e,t=!1){t&&this.clear(e.type),this.queue.push(e)}consume(e){let t=this.queue.find(n=>n.type===e);return t&&(this.queue=this.queue.filter(n=>n!==t)),t}clear(e){typeof e=="string"?this.queue=this.queue.filter(t=>t.type!==e):this.queue=this.queue.filter(t=>!e.test(t.type))}};function _t(r){var e;return(e=r?.isFtReduxStore)!==null&&e!==void 0?e:!1}var mr=Symbol("internalReduxEventsUnsubscribers"),ze=Symbol("internalStoresUnsubscribers"),st=Symbol("internalStores"),Os=K(Symbol("withRedux"),function(r){var e,t,n;class a extends r{constructor(){super(...arguments),this[e]=new Map,this[t]=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[st].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[st].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[st].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[st].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[st].delete(l)}setupStores(){this.unsubscribeFromStores(),this[st].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[ze].has(s.store):this[ze].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[ze].set(s,l.subscribe(()=>this.updateFromStores())),this[mr].set(s,[]),_t(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[h](m);l.addEventListener(p.eventName,f),this[mr].get(s).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ze].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[ze].has(s)&&this[ze].get(s)(),this[ze].delete(s),(l=this[mr].get(s))===null||l===void 0||l.forEach(d=>d()),this[mr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ze,t=st,n=mr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ct=class extends Os(J){};function fe(r){for(var e=arguments.length,t=Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+r+(t.length?" "+t.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ke(r){return!!r&&!!r[j]}function be(r){var e;return!!r&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===cu}(r)||Array.isArray(r)||!!r[Ts]||!!(!((e=r.constructor)===null||e===void 0)&&e[Ts])||Zn(r)||qn(r))}function lt(r,e,t){t===void 0&&(t=!1),kt(r)===0?(t?Object.keys:Pt)(r).forEach(function(n){t&&typeof n=="symbol"||e(n,r[n],r)}):r.forEach(function(n,a){return e(a,n,r)})}function kt(r){var e=r[j];return e?e.i>3?e.i-4:e.i:Array.isArray(r)?1:Zn(r)?2:qn(r)?3:0}function Lt(r,e){return kt(r)===2?r.has(e):Object.prototype.hasOwnProperty.call(r,e)}function tu(r,e){return kt(r)===2?r.get(e):r[e]}function Ns(r,e,t){var n=kt(r);n===2?r.set(e,t):n===3?r.add(t):r[e]=t}function _s(r,e){return r===e?r!==0||1/r==1/e:r!=r&&e!=e}function Zn(r){return iu&&r instanceof Map}function qn(r){return su&&r instanceof Set}function je(r){return r.o||r.t}function Yn(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var e=ks(r);delete e[j];for(var t=Pt(e),n=0;n<t.length;n++){var a=t[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:r[a]})}return Object.create(Object.getPrototypeOf(r),e)}function Jn(r,e){return e===void 0&&(e=!1),Qn(r)||ke(r)||!be(r)||(kt(r)>1&&(r.set=r.add=r.clear=r.delete=ru),Object.freeze(r),e&&lt(r,function(t,n){return Jn(n,!0)},!0)),r}function ru(){fe(2)}function Qn(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function Ce(r){var e=Vn[r];return e||fe(18,r),e}function ou(r,e){Vn[r]||(Vn[r]=e)}function jn(){return br}function Hn(r,e){e&&(Ce("Patches"),r.u=[],r.s=[],r.v=e)}function jr(r){Gn(r),r.p.forEach(nu),r.p=null}function Gn(r){r===br&&(br=r.l)}function Es(r){return br={p:[],l:br,h:r,m:!0,_:0}}function nu(r){var e=r[j];e.i===0||e.i===1?e.j():e.g=!0}function $n(r,e){e._=e.p.length;var t=e.p[0],n=r!==void 0&&r!==t;return e.h.O||Ce("ES5").S(e,r,n),n?(t[j].P&&(jr(e),fe(4)),be(r)&&(r=Gr(e,r),e.l||Kr(e,r)),e.u&&Ce("Patches").M(t[j].t,r,e.u,e.s)):r=Gr(e,t,[]),jr(e),e.u&&e.v(e.u,e.s),r!==Ps?r:void 0}function Gr(r,e,t){if(Qn(e))return e;var n=e[j];if(!n)return lt(e,function(l,d){return Cs(r,n,e,l,d,t)},!0),e;if(n.A!==r)return e;if(!n.P)return Kr(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Yn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),lt(i,function(l,d){return Cs(r,n,a,l,d,t,s)}),Kr(r,a,!1),t&&r.u&&Ce("Patches").N(n,t,r.u,r.s)}return n.o}function Cs(r,e,t,n,a,i,s){if(ke(a)){var l=Gr(r,a,i&&e&&e.i!==3&&!Lt(e.R,n)?i.concat(n):void 0);if(Ns(t,n,l),!ke(l))return;r.m=!1}else s&&t.add(a);if(be(a)&&!Qn(a)){if(!r.h.D&&r._<1)return;Gr(r,a),e&&e.A.l||Kr(r,a)}}function Kr(r,e,t){t===void 0&&(t=!1),!r.l&&r.h.D&&r.m&&Jn(e,t)}function Wn(r,e){var t=r[j];return(t?je(t):r)[e]}function ws(r,e){if(e in r)for(var t=Object.getPrototypeOf(r);t;){var n=Object.getOwnPropertyDescriptor(t,e);if(n)return n;t=Object.getPrototypeOf(t)}}function Ge(r){r.P||(r.P=!0,r.l&&Ge(r.l))}function zn(r){r.o||(r.o=Yn(r.t))}function Kn(r,e,t){var n=Zn(e)?Ce("MapSet").F(e,t):qn(e)?Ce("MapSet").T(e,t):r.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:jn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=l,p=vr;s&&(d=[l],p=yr);var h=Proxy.revocable(d,p),f=h.revoke,m=h.proxy;return l.k=m,l.j=f,m}(e,t):Ce("ES5").J(e,t);return(t?t.A:jn()).p.push(n),n}function au(r){return ke(r)||fe(22,r),function e(t){if(!be(t))return t;var n,a=t[j],i=kt(t);if(a){if(!a.P&&(a.i<4||!Ce("ES5").K(a)))return a.t;a.I=!0,n=As(t,i),a.I=!1}else n=As(t,i);return lt(n,function(s,l){a&&tu(a.t,s)===l||Ns(n,s,e(l))}),i===3?new Set(n):n}(r)}function As(r,e){switch(e){case 2:return new Map(r);case 3:return Array.from(r)}return Yn(r)}function Ls(){function r(s,l){var d=i[s];return d?d.enumerable=l:i[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[j];return vr.get(p,s)},set:function(p){var h=this[j];vr.set(h,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][j];if(!d.P)switch(d.i){case 5:n(d)&&Ge(d);break;case 4:t(d)&&Ge(d)}}}function t(s){for(var l=s.t,d=s.k,p=Pt(d),h=p.length-1;h>=0;h--){var f=p[h];if(f!==j){var m=l[f];if(m===void 0&&!Lt(l,f))return!0;var b=d[f],y=b&&b[j];if(y?y.t!==m:!_s(b,m))return!0}}var E=!!l[j];return p.length!==Pt(l).length+(E?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&fe(3,JSON.stringify(je(s)))}var i={};ou("ES5",{J:function(s,l){var d=Array.isArray(s),p=function(f,m){if(f){for(var b=Array(m.length),y=0;y<m.length;y++)Object.defineProperty(b,""+y,r(y,!0));return b}var E=ks(m);delete E[j];for(var C=Pt(E),w=0;w<C.length;w++){var A=C[w];E[A]=r(A,f||!!E[A].enumerable)}return Object.create(Object.getPrototypeOf(m),E)}(d,s),h={i:d?5:4,A:l?l.A:jn(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,j,{value:h,writable:!0}),p},S:function(s,l,d){d?ke(l)&&l[j].A===s&&e(s.p):(s.u&&function p(h){if(h&&typeof h=="object"){var f=h[j];if(f){var m=f.t,b=f.k,y=f.R,E=f.i;if(E===4)lt(b,function(v){v!==j&&(m[v]!==void 0||Lt(m,v)?y[v]||p(b[v]):(y[v]=!0,Ge(f)))}),lt(m,function(v){b[v]!==void 0||Lt(b,v)||(y[v]=!1,Ge(f))});else if(E===5){if(n(f)&&(Ge(f),y.length=!0),b.length<m.length)for(var C=b.length;C<m.length;C++)y[C]=!1;else for(var w=m.length;w<b.length;w++)y[w]=!0;for(var A=Math.min(b.length,m.length),S=0;S<A;S++)b.hasOwnProperty(S)||(y[S]=!0),y[S]===void 0&&p(b[S])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?t(s):n(s)}})}var Rs,br,Xn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",iu=typeof Map<"u",su=typeof Set<"u",Is=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ps=Xn?Symbol.for("immer-nothing"):((Rs={})["immer-nothing"]=!0,Rs),Ts=Xn?Symbol.for("immer-draftable"):"__$immer_draftable",j=Xn?Symbol.for("immer-state"):"__$immer_state";var cu=""+Object.prototype.constructor,Pt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,ks=Object.getOwnPropertyDescriptors||function(r){var e={};return Pt(r).forEach(function(t){e[t]=Object.getOwnPropertyDescriptor(r,t)}),e},Vn={},vr={get:function(r,e){if(e===j)return r;var t=je(r);if(!Lt(t,e))return function(a,i,s){var l,d=ws(i,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(a.k):void 0}(r,t,e);var n=t[e];return r.I||!be(n)?n:n===Wn(r.t,e)?(zn(r),r.o[e]=Kn(r.A.h,n,r)):n},has:function(r,e){return e in je(r)},ownKeys:function(r){return Reflect.ownKeys(je(r))},set:function(r,e,t){var n=ws(je(r),e);if(n?.set)return n.set.call(r.k,t),!0;if(!r.P){var a=Wn(je(r),e),i=a?.[j];if(i&&i.t===t)return r.o[e]=t,r.R[e]=!1,!0;if(_s(t,a)&&(t!==void 0||Lt(r.t,e)))return!0;zn(r),Ge(r)}return r.o[e]===t&&(t!==void 0||e in r.o)||Number.isNaN(t)&&Number.isNaN(r.o[e])||(r.o[e]=t,r.R[e]=!0),!0},deleteProperty:function(r,e){return Wn(r.t,e)!==void 0||e in r.t?(r.R[e]=!1,zn(r),Ge(r)):delete r.R[e],r.o&&delete r.o[e],!0},getOwnPropertyDescriptor:function(r,e){var t=je(r),n=Reflect.getOwnPropertyDescriptor(t,e);return n&&{writable:!0,configurable:r.i!==1||e!=="length",enumerable:n.enumerable,value:t[e]}},defineProperty:function(){fe(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){fe(12)}},yr={};lt(vr,function(r,e){yr[r]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),yr.deleteProperty=function(r,e){return yr.set.call(this,r,e,void 0)},yr.set=function(r,e,t){return vr.set.call(this,r[0],e,t,r[0])};var lu=function(){function r(t){var n=this;this.O=Is,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var d=n;return function(E){var C=this;E===void 0&&(E=l);for(var w=arguments.length,A=Array(w>1?w-1:0),S=1;S<w;S++)A[S-1]=arguments[S];return d.produce(E,function(v){var O;return(O=i).call.apply(O,[C,v].concat(A))})}}var p;if(typeof i!="function"&&fe(6),s!==void 0&&typeof s!="function"&&fe(7),be(a)){var h=Es(n),f=Kn(n,a,void 0),m=!0;try{p=i(f),m=!1}finally{m?jr(h):Gn(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(E){return Hn(h,s),$n(E,h)},function(E){throw jr(h),E}):(Hn(h,s),$n(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Ps&&(p=void 0),n.D&&Jn(p,!0),s){var b=[],y=[];Ce("Patches").M(a,p,b,y),s(b,y)}return p}fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,f=Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];return n.produceWithPatches(p,function(b){return a.apply(void 0,[b].concat(f))})};var s,l,d=n.produce(a,i,function(p,h){s=p,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,s,l]}):[d,s,l]},typeof t?.useProxies=="boolean"&&this.setUseProxies(t.useProxies),typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var e=r.prototype;return e.createDraft=function(t){be(t)||fe(8),ke(t)&&(t=au(t));var n=Es(this),a=Kn(this,t,void 0);return a[j].C=!0,Gn(n),a},e.finishDraft=function(t,n){var a=t&&t[j],i=a.A;return Hn(i,n),$n(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Is&&fe(20),this.O=t},e.applyPatches=function(t,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Ce("Patches").$;return ke(t)?s(t,n):this.produce(t,function(l){return s(l,n)})},r}(),le=new lu,du=le.produce,qy=le.produceWithPatches.bind(le),Yy=le.setAutoFreeze.bind(le),Jy=le.setUseProxies.bind(le),Qy=le.applyPatches.bind(le),Xy=le.createDraft.bind(le),eb=le.finishDraft.bind(le),Vr=du;function dt(r){"@babel/helpers - typeof";return dt=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},dt(r)}function Ms(r,e){if(dt(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(dt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Ds(r){var e=Ms(r,"string");return dt(e)=="symbol"?e:e+""}function Fs(r,e,t){return(e=Ds(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Us(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function ea(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Us(Object(t),!0).forEach(function(n){Fs(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Us(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ee(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Bs=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ta=function(){return Math.random().toString(36).substring(7).split("").join(".")},Zr={INIT:"@@redux/INIT"+ta(),REPLACE:"@@redux/REPLACE"+ta(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ta()}};function uu(r){if(typeof r!="object"||r===null)return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function ra(r,e,t){var n;if(typeof e=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof e=="function"&&typeof t>"u"&&(t=e,e=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(ee(1));return t(ra)(r,e)}if(typeof r!="function")throw new Error(ee(2));var a=r,i=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(ee(3));return i}function f(E){if(typeof E!="function")throw new Error(ee(4));if(d)throw new Error(ee(5));var C=!0;return p(),l.push(E),function(){if(C){if(d)throw new Error(ee(6));C=!1,p();var A=l.indexOf(E);l.splice(A,1),s=null}}}function m(E){if(!uu(E))throw new Error(ee(7));if(typeof E.type>"u")throw new Error(ee(8));if(d)throw new Error(ee(9));try{d=!0,i=a(i,E)}finally{d=!1}for(var C=s=l,w=0;w<C.length;w++){var A=C[w];A()}return E}function b(E){if(typeof E!="function")throw new Error(ee(10));a=E,m({type:Zr.REPLACE})}function y(){var E,C=f;return E={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(ee(11));function S(){A.next&&A.next(h())}S();var v=C(S);return{unsubscribe:v}}},E[Bs]=function(){return this},E}return m({type:Zr.INIT}),n={dispatch:m,subscribe:f,getState:h,replaceReducer:b},n[Bs]=y,n}function pu(r){Object.keys(r).forEach(function(e){var t=r[e],n=t(void 0,{type:Zr.INIT});if(typeof n>"u")throw new Error(ee(12));if(typeof t(void 0,{type:Zr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function Hs(r){for(var e=Object.keys(r),t={},n=0;n<e.length;n++){var a=e[n];typeof r[a]=="function"&&(t[a]=r[a])}var i=Object.keys(t),s,l;try{pu(t)}catch(d){l=d}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var f;for(var m=!1,b={},y=0;y<i.length;y++){var E=i[y],C=t[E],w=p[E],A=C(w,h);if(typeof A>"u"){var S=h&&h.type;throw new Error(ee(14))}b[E]=A,m=m||A!==w}return m=m||i.length!==Object.keys(p).length,m?b:p}}function Mt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];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 $s(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(ee(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return i=Mt.apply(void 0,l)(a.dispatch),ea(ea({},a),{},{dispatch:i})}}}function Ws(r){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,r):s(l)}}};return e}var zs=Ws();zs.withExtraArgument=Ws;var oa=zs;var Zs=function(){var r=function(e,t){return r=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])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fu=function(r,e){var t={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(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,a=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){t.label=p[1];break}if(p[0]===6&&t.label<i[1]){t.label=i[1],i=p;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(p);break}i[2]&&t.ops.pop(),t.trys.pop();continue}p=e.call(r,t)}catch(h){p=[6,h],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Dt=function(r,e){for(var t=0,n=e.length,a=r.length;t<n;t++,a++)r[a]=e[t];return r},hu=Object.defineProperty,gu=Object.defineProperties,mu=Object.getOwnPropertyDescriptors,js=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,bu=Object.prototype.propertyIsEnumerable,Gs=function(r,e,t){return e in r?hu(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t},Ke=function(r,e){for(var t in e||(e={}))yu.call(e,t)&&Gs(r,t,e[t]);if(js)for(var n=0,a=js(e);n<a.length;n++){var t=a[n];bu.call(e,t)&&Gs(r,t,e[t])}return r},na=function(r,e){return gu(r,mu(e))},vu=function(r,e,t){return new Promise(function(n,a){var i=function(d){try{l(t.next(d))}catch(p){a(p)}},s=function(d){try{l(t.throw(d))}catch(p){a(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,s)};l((t=t.apply(r,e)).next())})};var xu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mt:Mt.apply(null,arguments)},bb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Su(r){if(typeof r!="object"||r===null)return!1;var e=Object.getPrototypeOf(r);if(e===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return e===t}var Ou=function(r){Zs(e,r);function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=r.apply(this,t)||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 t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r.prototype.concat.apply(this,t)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1&&Array.isArray(t[0])?new(e.bind.apply(e,Dt([void 0],t[0].concat(this)))):new(e.bind.apply(e,Dt([void 0],t.concat(this))))},e}(Array),Eu=function(r){Zs(e,r);function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=r.apply(this,t)||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 t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r.prototype.concat.apply(this,t)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1&&Array.isArray(t[0])?new(e.bind.apply(e,Dt([void 0],t[0].concat(this)))):new(e.bind.apply(e,Dt([void 0],t.concat(this))))},e}(Array);function sa(r){return be(r)?Vr(r,function(){}):r}function Cu(r){return typeof r=="boolean"}function wu(){return function(e){return Au(e)}}function Au(r){r===void 0&&(r={});var e=r.thunk,t=e===void 0?!0:e,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,s=i===void 0?!0:i,l=new Ou;if(t&&(Cu(t)?l.push(oa):l.push(oa.withExtraArgument(t.extraArgument))),0){if(a)var d;if(s)var p}return l}var aa=!0;function qs(r){var e=wu(),t=r||{},n=t.reducer,a=n===void 0?void 0:n,i=t.middleware,s=i===void 0?e():i,l=t.devTools,d=l===void 0?!0:l,p=t.preloadedState,h=p===void 0?void 0:p,f=t.enhancers,m=f===void 0?void 0:f,b;if(typeof a=="function")b=a;else if(Su(a))b=Hs(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 y=s;if(typeof y=="function"&&(y=y(e),!aa&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!aa&&y.some(function(v){return typeof v!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=$s.apply(void 0,y),C=Mt;d&&(C=xu(Ke({trace:!aa},typeof d=="object"&&d)));var w=new Eu(E),A=w;Array.isArray(m)?A=Dt([E],m):typeof m=="function"&&(A=m(w));var S=C.apply(void 0,A);return ra(b,h,S)}function Ve(r,e){function t(){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 Ke(Ke({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return t.toString=function(){return""+r},t.type=r,t.match=function(n){return n.type===r},t}function Ys(r){var e={},t=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return t.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[e,t,n]}function Ru(r){return typeof r=="function"}function Iu(r,e,t,n){t===void 0&&(t=[]);var a=typeof e=="function"?Ys(e):[e,t,n],i=a[0],s=a[1],l=a[2],d;if(Ru(r))d=function(){return sa(r())};else{var p=sa(r);d=function(){return p}}function h(f,m){f===void 0&&(f=d());var b=Dt([i[m.type]],s.filter(function(y){var E=y.matcher;return E(m)}).map(function(y){var E=y.reducer;return E}));return b.filter(function(y){return!!y}).length===0&&(b=[l]),b.reduce(function(y,E){if(E)if(ke(y)){var C=y,w=E(C,m);return w===void 0?y:w}else{if(be(y))return Vr(y,function(A){return E(A,m)});var w=E(y,m);if(w===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return y},f)}return h.getInitialState=d,h}function Tu(r,e){return r+"/"+e}function Js(r){var e=r.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var t=typeof r.initialState=="function"?r.initialState:sa(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var f=n[h],m=Tu(e,h),b,y;"reducer"in f?(b=f.reducer,y=f.prepare):b=f,i[h]=b,s[m]=b,l[h]=y?Ve(m,y):Ve(m)});function d(){var h=typeof r.extraReducers=="function"?Ys(r.extraReducers):[r.extraReducers],f=h[0],m=f===void 0?{}:f,b=h[1],y=b===void 0?[]:b,E=h[2],C=E===void 0?void 0:E,w=Ke(Ke({},m),s);return Iu(t,function(A){for(var S in w)A.addCase(S,w[S]);for(var v=0,O=y;v<O.length;v++){var T=O[v];A.addMatcher(T.matcher,T.reducer)}C&&A.addDefaultCase(C)})}var p;return{name:e,reducer:function(h,f){return p||(p=d()),p(h,f)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Nu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_u=function(r){r===void 0&&(r=21);for(var e="",t=r;t--;)e+=Nu[Math.random()*64|0];return e},Lu=["name","message","stack","code"],ia=function(){function r(e,t){this.payload=e,this.meta=t}return r}(),Ks=function(){function r(e,t){this.payload=e,this.meta=t}return r}(),Pu=function(r){if(typeof r=="object"&&r!==null){for(var e={},t=0,n=Lu;t<n.length;t++){var a=n[t];typeof r[a]=="string"&&(e[a]=r[a])}return e}return{message:String(r)}},Ob=function(){function r(e,t,n){var a=Ve(e+"/fulfilled",function(h,f,m,b){return{payload:h,meta:na(Ke({},b||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),i=Ve(e+"/pending",function(h,f,m){return{payload:void 0,meta:na(Ke({},m||{}),{arg:f,requestId:h,requestStatus:"pending"})}}),s=Ve(e+"/rejected",function(h,f,m,b,y){return{payload:b,error:(n&&n.serializeError||Pu)(h||"Rejected"),meta:na(Ke({},y||{}),{arg:m,requestId:f,rejectedWithValue:!!b,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(f,m,b){var y=n?.idGenerator?n.idGenerator(h):_u(),E=new d,C,w=!1;function A(v){C=v,E.abort()}var S=function(){return vu(this,null,function(){var v,O,T,L,M,P,N;return fu(this,function(g){switch(g.label){case 0:return g.trys.push([0,4,,5]),L=(v=n?.condition)==null?void 0:v.call(n,h,{getState:m,extra:b}),Mu(L)?[4,L]:[3,2];case 1:L=g.sent(),g.label=2;case 2:if(L===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,M=new Promise(function(x,I){return E.signal.addEventListener("abort",function(){return I({name:"AbortError",message:C||"Aborted"})})}),f(i(y,h,(O=n?.getPendingMeta)==null?void 0:O.call(n,{requestId:y,arg:h},{getState:m,extra:b}))),[4,Promise.race([M,Promise.resolve(t(h,{dispatch:f,getState:m,extra:b,requestId:y,signal:E.signal,abort:A,rejectWithValue:function(x,I){return new ia(x,I)},fulfillWithValue:function(x,I){return new Ks(x,I)}})).then(function(x){if(x instanceof ia)throw x;return x instanceof Ks?a(x.payload,y,h,x.meta):a(x,y,h)})])];case 3:return T=g.sent(),[3,5];case 4:return P=g.sent(),T=P instanceof ia?s(null,y,h,P.payload,P.meta):s(P,y,h),[3,5];case 5:return N=n&&!n.dispatchConditionRejection&&s.match(T)&&T.meta.condition,N||f(T),[2,T]}})})}();return Object.assign(S,{abort:A,requestId:y,arg:h,unwrap:function(){return S.then(ku)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return r.withTypes=function(){return r},r}();function ku(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Mu(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Qs="listener",Xs="completed",ec="cancelled",Eb="task-"+ec,Cb="task-"+Xs,wb=Qs+"-"+ec,Ab=Qs+"-"+Xs;var ca="listenerMiddleware";var Rb=Ve(ca+"/add"),Ib=Ve(ca+"/removeAll"),Tb=Ve(ca+"/remove");var Vs,Nb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Vs||(Vs=Promise.resolve())).then(r).catch(function(e){return setTimeout(function(){throw e},0)})},Du=function(r){return function(e){setTimeout(e,r)}},_b=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Du(10);Ls();window.ftReduxStores||(window.ftReduxStores={});var Me=class r extends Te{static get(e){var t;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(_t(i))return i;if(a==null)return;let s=Js({...a,reducers:(t=a.reducers)!==null&&t!==void 0?t:{}}),l=qs({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:s.reducer(d,p)});return window.ftReduxStores[a.name]=new r(s,l,a.eventBus)}constructor(e,t,n){super(),this.reduxSlice=e,this.reduxStore=t,this.isFtReduxStore=!0,this.commands=new gr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,p=i[d];return p?(...h)=>{let f=p(...h.map(a));return this.reduxStore.dispatch(f),f}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Fu(){var r;for(let e of Object.values((r=window.ftReduxStores)!==null&&r!==void 0?r:{}))_t(e)&&e.clear()}var qr=class{constructor(e,t,n){this.store=e,this.valueSelector=t,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),t=this.valueSelector(e);rt(this.lastValue,t)&&(this.callback(t,e),this.lastValue=t)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Uu(r,e,t){return new qr(r,e,t).watch()}var la=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var t;return(t=this.requestConsumers.get(e))!==null&&t!==void 0?t:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,t){for(let n of t)this.getOrCreateRequestConsumers(n).add(e)}unregisterComponent(e,t){for(let n of t)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var fa={};D(fa,{scrollHelper:()=>Bu});var ua,Yr=new Map,pa=class{lock(e,t){if(t){let n=Yr.get(t);if(n==null||n===e)return Yr.set(t,e),t}}release(e,t){t&&Yr.get(t)===e&&Yr.delete(t)}findFirstScrollableParent(e){var t;let n,a;for(let i of Yo(e)){let s=i,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&a==null&&(a=s)}return(t=n??a)!==null&&t!==void 0?t:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)}catch{return!1}}getAbsoluteScrollOffset(e,t){var n,a;let i=0;for(;t&&t.offsetParent!==e.offsetParent;)i+=(n=t.offsetTop)!==null&&n!==void 0?n:0,t=t.offsetParent;return i+((a=t?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,t){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return t;default:return 0}}scrollIntoViewIfPossible(e,t){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let a=this.getAbsoluteScrollOffset(n,e),i=a-n.clientHeight+e.clientHeight,s=a,l=Xt(0,(s-n.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(t?.position,l)*(i-s)+s;n.scrollTo({behavior:t?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(ua=window.FluidTopicsScrollHelper)!==null&&ua!==void 0?ua:new pa;var Bu=window.FluidTopicsScrollHelper;var ga={};D(ga,{SearchPlaceConverter:()=>Ht,SearchPlaceQueryParams:()=>B,isSearchPlaceQueryParams:()=>kc,serializeRequest:()=>zu});var $u=cl(rc(),1);var oc;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(oc||(oc={}));var nc;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(nc||(nc={}));var ac;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(ac||(ac={}));var ic;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(ic||(ic={}));var sc;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(sc||(sc={}));var cc;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(cc||(cc={}));var lc;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(lc||(lc={}));var dc;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(dc||(dc={}));var uc;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW"})(uc||(uc={}));var pc;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(pc||(pc={}));var fc;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(fc||(fc={}));var hc;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(hc||(hc={}));var gc;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(gc||(gc={}));var mc;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(mc||(mc={}));var Ut;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(Ut||(Ut={}));var yc;(function(r){r.ASC="ASC",r.DESC="DESC"})(yc||(yc={}));var bc;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(bc||(bc={}));var ha;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(ha||(ha={}));var wc=r=>Object.keys(ha).includes(r);var vc;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(vc||(vc={}));var xc;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(xc||(xc={}));var Sc;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Sc||(Sc={}));var Bt;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Bt||(Bt={}));var Ac=r=>Object.keys(Bt).includes(r);var Oc;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Oc||(Oc={}));var Ec;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ec||(Ec={}));var Cc;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Cc||(Cc={}));var W;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(W||(W={}));var he;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(he||(he={}));var Rc;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Rc||(Rc={}));var Ic;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Ic||(Ic={}));var Tc;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Tc||(Tc={}));var Nc;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(Nc||(Nc={}));var _c;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(_c||(_c={}));var Hu={[W.PERSONAL_BOOK_SHARE_USER]:[W.PERSONAL_BOOK_USER],[W.HTML_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.PDF_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.KHUB_ADMIN]:[W.CONTENT_PUBLISHER],[W.ADMIN]:[W.KHUB_ADMIN,W.USERS_ADMIN,W.PORTAL_ADMIN],[W.GENERATIVE_AI_EXPORT_USER]:[W.GENERATIVE_AI_USER]};function Lc(r,e){return r===e||(Hu[r]??[]).some(t=>Lc(t,e))}function De(r,e){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Lc(n,e))}function Wu(r){return`"${r}"`}function Pc(r){return r.startsWith('"')&&r.endsWith('"')?r.replace(/(^"+)|("+$)/g,""):r}function zu(r,e){return new Ht(r).serialize(e)}var B;(function(r){r.LOCALE="content-lang",r.QUERY="query",r.SCOPE="scope",r.FILTERS="filters",r.VIRTUAL_FIELD="virtual-field",r.PERIOD="period",r.VALUE_FILTERS="value-filters",r.DATE_FILTERS="date-filters",r.RANGE_FILTERS="range-filters",r.SORT="sort",r.PER_PAGE="per-page",r.KEYWORD_MATCH="keyword-match"})(B||(B={}));var ju=new Set(Object.values(B));function kc(r){return ju.has(r)}var Ht=class{constructor(e,t=20,n=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=t,this.allLanguagesAllowed=n,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,t){return this.serializeToCurrentPageIfPossible(e,t??"/search")}serializeToCurrentPageIfPossible(e,t){let n=t==null||t.trim().length===0,a=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${t}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,t=!1){var n,a,i,s,l,d,p,h,f,m,b;let y=new URLSearchParams;e.contentLocale?(!t||e.contentLocale!==this.defaultContentLocale)&&y.append(B.LOCALE,e.contentLocale):y.append(B.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&y.append(B.QUERY,e.query);let E=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(v=>v.valueFilter&&!v.valueFilter.negative))!==null&&i!==void 0?i:[];if(E.length>0){let v=E.map(O=>{var T,L;let M=((L=(T=O.valueFilter)===null||T===void 0?void 0:T.values)!==null&&L!==void 0?L:[]).map(P=>this.escapeFilters(P)).map(P=>Wu(Pc(P))).join("_");return`${O.key}~${M}`}).join("*");y.append(B.VALUE_FILTERS,v)}let C=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(v=>v.dateFilter))!==null&&l!==void 0?l:[];if(C.length>0){let v=C.map(O=>{var T;return`${O.key}~${(T=O.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");y.append(B.DATE_FILTERS,v)}let w=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(v=>v.rangeFilter))!==null&&p!==void 0?p:[];if(w.length>0){let v=w.map(O=>{var T,L;return`${O.key}~${(T=O.rangeFilter)===null||T===void 0?void 0:T.from}_${(L=O.rangeFilter)===null||L===void 0?void 0:L.to}`}).join("*");y.append(B.RANGE_FILTERS,v)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&y.append(B.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&y.append(B.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&y.append(B.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((m=(f=e.paging)===null||f===void 0?void 0:f.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&y.append(B.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&y.append(B.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let A=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let v in A)y.append(v,A[v]);let S=new Array;return y.forEach((v,O)=>{S.push(this.encodeQueryString(O)+"="+this.encodeQueryString(v))}),encodeURI(S.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var t;let n=e.split("?"),a=this.fromURLSearchParams(n.slice(1).join("?")),i=n[0].split("/search/")[1];return i==null?a:{...a,scope:(t=this.scopeMapping[i])!==null&&t!==void 0?t:a.scope}}fromURLSearchParams(e){var t,n,a,i,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),p=d.get(B.LOCALE)==="all"?void 0:d.get(B.LOCALE),h=((t=d.get(B.VIRTUAL_FIELD))!==null&&t!==void 0?t:"EVERYWHERE").toUpperCase(),f=(n=d.get(B.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(a=d.get(B.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(B.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),y=d.get(B.KEYWORD_MATCH),E=y?y.toUpperCase()===Ut.MANDATORY?Ut.MANDATORY:Ut.OPTIONAL:void 0,C={};for(let w of d.keys())kc(w)||(C[w]=d.get(w));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(B.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:wc(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Xt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:E,otherQueryParams:C}}parseCompatFilters(e){var t,n,a,i,s,l;let d=[];return e.has(B.FILTERS)&&(d=this.parseValueFilters((t=e.get(B.FILTERS))!==null&&t!==void 0?t:"")),(n=e.has(B.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(B.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(B.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(B.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(B.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(t=>t.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(t=>({key:t[0],valueFilter:{values:t[1].split("_").map(Pc).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(t=>({key:t[0],dateFilter:{type:Bt[t[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(t=>({key:t[0],rangeFilter:{from:t[1].split("_")[0],to:t[1].split("_")[1]}}))}escapeFilters(e){for(let[t,n,a]of this.filtersEscapeMapping)e=e.replaceAll(t,n);return e}superEscapeFilters(e){for(let[t,n,a]of this.filtersEscapeMapping)e=e.replaceAll(n,a);return e}unescapeFilterValue(e){for(let[t,n,a]of this.filtersEscapeMapping)e=e.replace(a,t);return e}parseLegacyPeriodFilter(e){if(Ac(e))return[{key:"ft:lastEdition",dateFilter:{type:Bt[e]}}];if(e.startsWith("CUSTOM_")){let[t,n,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:a}}]}return[]}};var ya={};D(ya,{toFtFormComponent:()=>Gu});var ma=Symbol("elementInternals"),Gu=K(Symbol("toFtFormComponent"),function(r){class e extends r{static get formAssociated(){return!0}get form(){return this[ma].form}constructor(...n){super(n),this[ma]=this.attachInternals()}setFormValue(n){this[ma].setFormValue(n)}}return e});var ba={};D(ba,{DateFormatter:()=>ut});var ut=class{static format(e,t,n,a){return window.moment?window.moment(e).locale(t).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(e,t,n,a)}static getMomentDateFormat(e,t){return e?t?"lll":"ll":t?"L LT":"L"}static getIntlDateTime(e,t,n,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(t,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(t,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),t=new Date().getTimezoneOffset();return`${t<0?"+":"-"}${e(Math.abs(t)/60)}:${e(Math.abs(t)%60)}`}};var xa={};D(xa,{ALL_KEYS_VALUE:()=>va,SameWindowStorageEvent:()=>$t});var va="__all__",$t=class extends CustomEvent{constructor(e,t,n){super("same-window-storage",{detail:{key:e,oldValue:t,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==va}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(r,e,t){let n=e.getItem(t[0]);Reflect.apply(r,e,t),window.dispatchEvent(new $t(t[0],n,t[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(r,e,t){let n=e.getItem(t[0]);Reflect.apply(r,e,t),window.dispatchEvent(new $t(t[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(r,e,t){Reflect.apply(r,e,t),window.dispatchEvent(new $t(va))}});var Oa={};D(Oa,{FocusMainContentEvent:()=>Sa});var Sa=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var Mc={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Ku(r){(r.key==="Enter"||r.key===" "||r.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=r.key}function Vu(r){window.FluidTopicsA11yHints.isKeyboardNavigation=r.detail==0}document.addEventListener("keydown",Ku);document.addEventListener("click",Vu);var Dc=$`
48
+ `;var Ss={};var Un={};D(Un,{ParametrizedLabelResolver:()=>hr});var hr=class r{constructor(e,t){this.defaultLabels=e,this.labels=t}resolve(e,...t){var n,a;e=this.resolvePluralKey(e,t);let i=(a=(n=this.labels[e])!==null&&n!==void 0?n:this.defaultLabels[e])!==null&&a!==void 0?a:"";return r.replaceParameters(i,...t)}static replaceParameters(e,...t){return t.forEach((n,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>r.formatValue(n,s))),e}resolvePluralKey(e,t){for(let n of t)if(typeof n=="number"){let a=`${String(e)}[\\=${n}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,t){return e instanceof Date?r.formatDate(e,t):e??""}static formatDate(e,t){let n=a=>t?.includes("date")?e.toLocaleDateString(a):t?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return n(document.documentElement.lang)}catch{return n()}}};var da={};D(da,{FtCommandQueue:()=>gr,FtLitElementRedux:()=>ct,FtReduxStore:()=>Me,FtStateManager:()=>la,ReduxWatcher:()=>qr,clearAllStores:()=>Fu,isFtReduxStore:()=>_t,redux:()=>q,reduxEventListener:()=>Bn,reduxReactive:()=>eu,watch:()=>Uu,withRedux:()=>Os});var eu=()=>(r,e)=>{var t;let n=r.constructor;n.reduxReactiveProperties=new Set(n.reduxReactiveProperties),(t=n.reduxReactiveProperties)===null||t===void 0||t.add(e)},q=r=>{let e=r??{};return(t,n)=>{var a;let i={hasChanged:rt,attribute:!1,...e};_(i)(t,n);let s=t.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})}},Bn=r=>(e,t)=>{let n=e.constructor;n.reduxEventListeners=new Map(n.reduxEventListeners),n.reduxEventListeners.set(t,r)};var gr=class{constructor(){this.queue=[]}add(e,t=!1){t&&this.clear(e.type),this.queue.push(e)}consume(e){let t=this.queue.find(n=>n.type===e);return t&&(this.queue=this.queue.filter(n=>n!==t)),t}clear(e){typeof e=="string"?this.queue=this.queue.filter(t=>t.type!==e):this.queue=this.queue.filter(t=>!e.test(t.type))}};function _t(r){var e;return(e=r?.isFtReduxStore)!==null&&e!==void 0?e:!1}var mr=Symbol("internalReduxEventsUnsubscribers"),ze=Symbol("internalStoresUnsubscribers"),st=Symbol("internalStores"),Os=K(Symbol("withRedux"),function(r){var e,t,n;class a extends r{constructor(){super(...arguments),this[e]=new Map,this[t]=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[st].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[st].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[st].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[st].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[st].delete(l)}setupStores(){this.unsubscribeFromStores(),this[st].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[ze].has(s.store):this[ze].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[ze].set(s,l.subscribe(()=>this.updateFromStores())),this[mr].set(s,[]),_t(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,h)=>{if(typeof this[h]=="function"&&(!p.store||l.name===p.store)){let f=m=>this[h](m);l.addEventListener(p.eventName,f),this[mr].get(s).push(()=>l.removeEventListener(p.eventName,f))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ze].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[ze].has(s)&&this[ze].get(s)(),this[ze].delete(s),(l=this[mr].get(s))===null||l===void 0||l.forEach(d=>d()),this[mr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ze,t=st,n=mr,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),ct=class extends Os(J){};function fe(r){for(var e=arguments.length,t=Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+r+(t.length?" "+t.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ke(r){return!!r&&!!r[j]}function be(r){var e;return!!r&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===cu}(r)||Array.isArray(r)||!!r[Ts]||!!(!((e=r.constructor)===null||e===void 0)&&e[Ts])||Zn(r)||qn(r))}function lt(r,e,t){t===void 0&&(t=!1),kt(r)===0?(t?Object.keys:Pt)(r).forEach(function(n){t&&typeof n=="symbol"||e(n,r[n],r)}):r.forEach(function(n,a){return e(a,n,r)})}function kt(r){var e=r[j];return e?e.i>3?e.i-4:e.i:Array.isArray(r)?1:Zn(r)?2:qn(r)?3:0}function Lt(r,e){return kt(r)===2?r.has(e):Object.prototype.hasOwnProperty.call(r,e)}function tu(r,e){return kt(r)===2?r.get(e):r[e]}function Ns(r,e,t){var n=kt(r);n===2?r.set(e,t):n===3?r.add(t):r[e]=t}function _s(r,e){return r===e?r!==0||1/r==1/e:r!=r&&e!=e}function Zn(r){return iu&&r instanceof Map}function qn(r){return su&&r instanceof Set}function je(r){return r.o||r.t}function Yn(r){if(Array.isArray(r))return Array.prototype.slice.call(r);var e=ks(r);delete e[j];for(var t=Pt(e),n=0;n<t.length;n++){var a=t[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:r[a]})}return Object.create(Object.getPrototypeOf(r),e)}function Jn(r,e){return e===void 0&&(e=!1),Qn(r)||ke(r)||!be(r)||(kt(r)>1&&(r.set=r.add=r.clear=r.delete=ru),Object.freeze(r),e&&lt(r,function(t,n){return Jn(n,!0)},!0)),r}function ru(){fe(2)}function Qn(r){return r==null||typeof r!="object"||Object.isFrozen(r)}function Ce(r){var e=Vn[r];return e||fe(18,r),e}function ou(r,e){Vn[r]||(Vn[r]=e)}function jn(){return br}function Hn(r,e){e&&(Ce("Patches"),r.u=[],r.s=[],r.v=e)}function jr(r){Gn(r),r.p.forEach(nu),r.p=null}function Gn(r){r===br&&(br=r.l)}function Es(r){return br={p:[],l:br,h:r,m:!0,_:0}}function nu(r){var e=r[j];e.i===0||e.i===1?e.j():e.g=!0}function $n(r,e){e._=e.p.length;var t=e.p[0],n=r!==void 0&&r!==t;return e.h.O||Ce("ES5").S(e,r,n),n?(t[j].P&&(jr(e),fe(4)),be(r)&&(r=Gr(e,r),e.l||Kr(e,r)),e.u&&Ce("Patches").M(t[j].t,r,e.u,e.s)):r=Gr(e,t,[]),jr(e),e.u&&e.v(e.u,e.s),r!==Ps?r:void 0}function Gr(r,e,t){if(Qn(e))return e;var n=e[j];if(!n)return lt(e,function(l,d){return Cs(r,n,e,l,d,t)},!0),e;if(n.A!==r)return e;if(!n.P)return Kr(r,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Yn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),lt(i,function(l,d){return Cs(r,n,a,l,d,t,s)}),Kr(r,a,!1),t&&r.u&&Ce("Patches").N(n,t,r.u,r.s)}return n.o}function Cs(r,e,t,n,a,i,s){if(ke(a)){var l=Gr(r,a,i&&e&&e.i!==3&&!Lt(e.R,n)?i.concat(n):void 0);if(Ns(t,n,l),!ke(l))return;r.m=!1}else s&&t.add(a);if(be(a)&&!Qn(a)){if(!r.h.D&&r._<1)return;Gr(r,a),e&&e.A.l||Kr(r,a)}}function Kr(r,e,t){t===void 0&&(t=!1),!r.l&&r.h.D&&r.m&&Jn(e,t)}function Wn(r,e){var t=r[j];return(t?je(t):r)[e]}function ws(r,e){if(e in r)for(var t=Object.getPrototypeOf(r);t;){var n=Object.getOwnPropertyDescriptor(t,e);if(n)return n;t=Object.getPrototypeOf(t)}}function Ge(r){r.P||(r.P=!0,r.l&&Ge(r.l))}function zn(r){r.o||(r.o=Yn(r.t))}function Kn(r,e,t){var n=Zn(e)?Ce("MapSet").F(e,t):qn(e)?Ce("MapSet").T(e,t):r.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:jn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=l,p=vr;s&&(d=[l],p=yr);var h=Proxy.revocable(d,p),f=h.revoke,m=h.proxy;return l.k=m,l.j=f,m}(e,t):Ce("ES5").J(e,t);return(t?t.A:jn()).p.push(n),n}function au(r){return ke(r)||fe(22,r),function e(t){if(!be(t))return t;var n,a=t[j],i=kt(t);if(a){if(!a.P&&(a.i<4||!Ce("ES5").K(a)))return a.t;a.I=!0,n=As(t,i),a.I=!1}else n=As(t,i);return lt(n,function(s,l){a&&tu(a.t,s)===l||Ns(n,s,e(l))}),i===3?new Set(n):n}(r)}function As(r,e){switch(e){case 2:return new Map(r);case 3:return Array.from(r)}return Yn(r)}function Ls(){function r(s,l){var d=i[s];return d?d.enumerable=l:i[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[j];return vr.get(p,s)},set:function(p){var h=this[j];vr.set(h,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][j];if(!d.P)switch(d.i){case 5:n(d)&&Ge(d);break;case 4:t(d)&&Ge(d)}}}function t(s){for(var l=s.t,d=s.k,p=Pt(d),h=p.length-1;h>=0;h--){var f=p[h];if(f!==j){var m=l[f];if(m===void 0&&!Lt(l,f))return!0;var b=d[f],y=b&&b[j];if(y?y.t!==m:!_s(b,m))return!0}}var E=!!l[j];return p.length!==Pt(l).length+(E?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&fe(3,JSON.stringify(je(s)))}var i={};ou("ES5",{J:function(s,l){var d=Array.isArray(s),p=function(f,m){if(f){for(var b=Array(m.length),y=0;y<m.length;y++)Object.defineProperty(b,""+y,r(y,!0));return b}var E=ks(m);delete E[j];for(var C=Pt(E),w=0;w<C.length;w++){var A=C[w];E[A]=r(A,f||!!E[A].enumerable)}return Object.create(Object.getPrototypeOf(m),E)}(d,s),h={i:d?5:4,A:l?l.A:jn(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,j,{value:h,writable:!0}),p},S:function(s,l,d){d?ke(l)&&l[j].A===s&&e(s.p):(s.u&&function p(h){if(h&&typeof h=="object"){var f=h[j];if(f){var m=f.t,b=f.k,y=f.R,E=f.i;if(E===4)lt(b,function(v){v!==j&&(m[v]!==void 0||Lt(m,v)?y[v]||p(b[v]):(y[v]=!0,Ge(f)))}),lt(m,function(v){b[v]!==void 0||Lt(b,v)||(y[v]=!1,Ge(f))});else if(E===5){if(n(f)&&(Ge(f),y.length=!0),b.length<m.length)for(var C=b.length;C<m.length;C++)y[C]=!1;else for(var w=m.length;w<b.length;w++)y[w]=!0;for(var A=Math.min(b.length,m.length),S=0;S<A;S++)b.hasOwnProperty(S)||(y[S]=!0),y[S]===void 0&&p(b[S])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?t(s):n(s)}})}var Rs,br,Xn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",iu=typeof Map<"u",su=typeof Set<"u",Is=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ps=Xn?Symbol.for("immer-nothing"):((Rs={})["immer-nothing"]=!0,Rs),Ts=Xn?Symbol.for("immer-draftable"):"__$immer_draftable",j=Xn?Symbol.for("immer-state"):"__$immer_state";var cu=""+Object.prototype.constructor,Pt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Object.getOwnPropertyNames,ks=Object.getOwnPropertyDescriptors||function(r){var e={};return Pt(r).forEach(function(t){e[t]=Object.getOwnPropertyDescriptor(r,t)}),e},Vn={},vr={get:function(r,e){if(e===j)return r;var t=je(r);if(!Lt(t,e))return function(a,i,s){var l,d=ws(i,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(a.k):void 0}(r,t,e);var n=t[e];return r.I||!be(n)?n:n===Wn(r.t,e)?(zn(r),r.o[e]=Kn(r.A.h,n,r)):n},has:function(r,e){return e in je(r)},ownKeys:function(r){return Reflect.ownKeys(je(r))},set:function(r,e,t){var n=ws(je(r),e);if(n?.set)return n.set.call(r.k,t),!0;if(!r.P){var a=Wn(je(r),e),i=a?.[j];if(i&&i.t===t)return r.o[e]=t,r.R[e]=!1,!0;if(_s(t,a)&&(t!==void 0||Lt(r.t,e)))return!0;zn(r),Ge(r)}return r.o[e]===t&&(t!==void 0||e in r.o)||Number.isNaN(t)&&Number.isNaN(r.o[e])||(r.o[e]=t,r.R[e]=!0),!0},deleteProperty:function(r,e){return Wn(r.t,e)!==void 0||e in r.t?(r.R[e]=!1,zn(r),Ge(r)):delete r.R[e],r.o&&delete r.o[e],!0},getOwnPropertyDescriptor:function(r,e){var t=je(r),n=Reflect.getOwnPropertyDescriptor(t,e);return n&&{writable:!0,configurable:r.i!==1||e!=="length",enumerable:n.enumerable,value:t[e]}},defineProperty:function(){fe(11)},getPrototypeOf:function(r){return Object.getPrototypeOf(r.t)},setPrototypeOf:function(){fe(12)}},yr={};lt(vr,function(r,e){yr[r]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),yr.deleteProperty=function(r,e){return yr.set.call(this,r,e,void 0)},yr.set=function(r,e,t){return vr.set.call(this,r[0],e,t,r[0])};var lu=function(){function r(t){var n=this;this.O=Is,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var d=n;return function(E){var C=this;E===void 0&&(E=l);for(var w=arguments.length,A=Array(w>1?w-1:0),S=1;S<w;S++)A[S-1]=arguments[S];return d.produce(E,function(v){var O;return(O=i).call.apply(O,[C,v].concat(A))})}}var p;if(typeof i!="function"&&fe(6),s!==void 0&&typeof s!="function"&&fe(7),be(a)){var h=Es(n),f=Kn(n,a,void 0),m=!0;try{p=i(f),m=!1}finally{m?jr(h):Gn(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(E){return Hn(h,s),$n(E,h)},function(E){throw jr(h),E}):(Hn(h,s),$n(p,h))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Ps&&(p=void 0),n.D&&Jn(p,!0),s){var b=[],y=[];Ce("Patches").M(a,p,b,y),s(b,y)}return p}fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var h=arguments.length,f=Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];return n.produceWithPatches(p,function(b){return a.apply(void 0,[b].concat(f))})};var s,l,d=n.produce(a,i,function(p,h){s=p,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,s,l]}):[d,s,l]},typeof t?.useProxies=="boolean"&&this.setUseProxies(t.useProxies),typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var e=r.prototype;return e.createDraft=function(t){be(t)||fe(8),ke(t)&&(t=au(t));var n=Es(this),a=Kn(this,t,void 0);return a[j].C=!0,Gn(n),a},e.finishDraft=function(t,n){var a=t&&t[j],i=a.A;return Hn(i,n),$n(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Is&&fe(20),this.O=t},e.applyPatches=function(t,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Ce("Patches").$;return ke(t)?s(t,n):this.produce(t,function(l){return s(l,n)})},r}(),le=new lu,du=le.produce,qy=le.produceWithPatches.bind(le),Yy=le.setAutoFreeze.bind(le),Jy=le.setUseProxies.bind(le),Qy=le.applyPatches.bind(le),Xy=le.createDraft.bind(le),eb=le.finishDraft.bind(le),Vr=du;function dt(r){"@babel/helpers - typeof";return dt=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},dt(r)}function Ms(r,e){if(dt(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(dt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Ds(r){var e=Ms(r,"string");return dt(e)=="symbol"?e:e+""}function Fs(r,e,t){return(e=Ds(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Us(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function ea(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Us(Object(t),!0).forEach(function(n){Fs(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Us(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ee(r){return"Minified Redux error #"+r+"; visit https://redux.js.org/Errors?code="+r+" for the full message or use the non-minified dev environment for full errors. "}var Bs=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ta=function(){return Math.random().toString(36).substring(7).split("").join(".")},Zr={INIT:"@@redux/INIT"+ta(),REPLACE:"@@redux/REPLACE"+ta(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ta()}};function uu(r){if(typeof r!="object"||r===null)return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function ra(r,e,t){var n;if(typeof e=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof e=="function"&&typeof t>"u"&&(t=e,e=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(ee(1));return t(ra)(r,e)}if(typeof r!="function")throw new Error(ee(2));var a=r,i=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function h(){if(d)throw new Error(ee(3));return i}function f(E){if(typeof E!="function")throw new Error(ee(4));if(d)throw new Error(ee(5));var C=!0;return p(),l.push(E),function(){if(C){if(d)throw new Error(ee(6));C=!1,p();var A=l.indexOf(E);l.splice(A,1),s=null}}}function m(E){if(!uu(E))throw new Error(ee(7));if(typeof E.type>"u")throw new Error(ee(8));if(d)throw new Error(ee(9));try{d=!0,i=a(i,E)}finally{d=!1}for(var C=s=l,w=0;w<C.length;w++){var A=C[w];A()}return E}function b(E){if(typeof E!="function")throw new Error(ee(10));a=E,m({type:Zr.REPLACE})}function y(){var E,C=f;return E={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(ee(11));function S(){A.next&&A.next(h())}S();var v=C(S);return{unsubscribe:v}}},E[Bs]=function(){return this},E}return m({type:Zr.INIT}),n={dispatch:m,subscribe:f,getState:h,replaceReducer:b},n[Bs]=y,n}function pu(r){Object.keys(r).forEach(function(e){var t=r[e],n=t(void 0,{type:Zr.INIT});if(typeof n>"u")throw new Error(ee(12));if(typeof t(void 0,{type:Zr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function Hs(r){for(var e=Object.keys(r),t={},n=0;n<e.length;n++){var a=e[n];typeof r[a]=="function"&&(t[a]=r[a])}var i=Object.keys(t),s,l;try{pu(t)}catch(d){l=d}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(0)var f;for(var m=!1,b={},y=0;y<i.length;y++){var E=i[y],C=t[E],w=p[E],A=C(w,h);if(typeof A>"u"){var S=h&&h.type;throw new Error(ee(14))}b[E]=A,m=m||A!==w}return m=m||i.length!==Object.keys(p).length,m?b:p}}function Mt(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];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 $s(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(ee(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return i=Mt.apply(void 0,l)(a.dispatch),ea(ea({},a),{},{dispatch:i})}}}function Ws(r){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,r):s(l)}}};return e}var zs=Ws();zs.withExtraArgument=Ws;var oa=zs;var Zs=function(){var r=function(e,t){return r=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])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fu=function(r,e){var t={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(p){return function(h){return d([p,h])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,a=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){t.label=p[1];break}if(p[0]===6&&t.label<i[1]){t.label=i[1],i=p;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(p);break}i[2]&&t.ops.pop(),t.trys.pop();continue}p=e.call(r,t)}catch(h){p=[6,h],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Dt=function(r,e){for(var t=0,n=e.length,a=r.length;t<n;t++,a++)r[a]=e[t];return r},hu=Object.defineProperty,gu=Object.defineProperties,mu=Object.getOwnPropertyDescriptors,js=Object.getOwnPropertySymbols,yu=Object.prototype.hasOwnProperty,bu=Object.prototype.propertyIsEnumerable,Gs=function(r,e,t){return e in r?hu(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t},Ke=function(r,e){for(var t in e||(e={}))yu.call(e,t)&&Gs(r,t,e[t]);if(js)for(var n=0,a=js(e);n<a.length;n++){var t=a[n];bu.call(e,t)&&Gs(r,t,e[t])}return r},na=function(r,e){return gu(r,mu(e))},vu=function(r,e,t){return new Promise(function(n,a){var i=function(d){try{l(t.next(d))}catch(p){a(p)}},s=function(d){try{l(t.throw(d))}catch(p){a(p)}},l=function(d){return d.done?n(d.value):Promise.resolve(d.value).then(i,s)};l((t=t.apply(r,e)).next())})};var xu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mt:Mt.apply(null,arguments)},bb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(r){return r}};function Su(r){if(typeof r!="object"||r===null)return!1;var e=Object.getPrototypeOf(r);if(e===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return e===t}var Ou=function(r){Zs(e,r);function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=r.apply(this,t)||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 t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r.prototype.concat.apply(this,t)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1&&Array.isArray(t[0])?new(e.bind.apply(e,Dt([void 0],t[0].concat(this)))):new(e.bind.apply(e,Dt([void 0],t.concat(this))))},e}(Array),Eu=function(r){Zs(e,r);function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=r.apply(this,t)||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 t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r.prototype.concat.apply(this,t)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.length===1&&Array.isArray(t[0])?new(e.bind.apply(e,Dt([void 0],t[0].concat(this)))):new(e.bind.apply(e,Dt([void 0],t.concat(this))))},e}(Array);function sa(r){return be(r)?Vr(r,function(){}):r}function Cu(r){return typeof r=="boolean"}function wu(){return function(e){return Au(e)}}function Au(r){r===void 0&&(r={});var e=r.thunk,t=e===void 0?!0:e,n=r.immutableCheck,a=n===void 0?!0:n,i=r.serializableCheck,s=i===void 0?!0:i,l=new Ou;if(t&&(Cu(t)?l.push(oa):l.push(oa.withExtraArgument(t.extraArgument))),0){if(a)var d;if(s)var p}return l}var aa=!0;function qs(r){var e=wu(),t=r||{},n=t.reducer,a=n===void 0?void 0:n,i=t.middleware,s=i===void 0?e():i,l=t.devTools,d=l===void 0?!0:l,p=t.preloadedState,h=p===void 0?void 0:p,f=t.enhancers,m=f===void 0?void 0:f,b;if(typeof a=="function")b=a;else if(Su(a))b=Hs(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 y=s;if(typeof y=="function"&&(y=y(e),!aa&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!aa&&y.some(function(v){return typeof v!="function"}))throw new Error("each middleware provided to configureStore must be a function");var E=$s.apply(void 0,y),C=Mt;d&&(C=xu(Ke({trace:!aa},typeof d=="object"&&d)));var w=new Eu(E),A=w;Array.isArray(m)?A=Dt([E],m):typeof m=="function"&&(A=m(w));var S=C.apply(void 0,A);return ra(b,h,S)}function Ve(r,e){function t(){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 Ke(Ke({type:r,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:r,payload:n[0]}}return t.toString=function(){return""+r},t.type=r,t.match=function(n){return n.type===r},t}function Ys(r){var e={},t=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return t.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return r(a),[e,t,n]}function Ru(r){return typeof r=="function"}function Iu(r,e,t,n){t===void 0&&(t=[]);var a=typeof e=="function"?Ys(e):[e,t,n],i=a[0],s=a[1],l=a[2],d;if(Ru(r))d=function(){return sa(r())};else{var p=sa(r);d=function(){return p}}function h(f,m){f===void 0&&(f=d());var b=Dt([i[m.type]],s.filter(function(y){var E=y.matcher;return E(m)}).map(function(y){var E=y.reducer;return E}));return b.filter(function(y){return!!y}).length===0&&(b=[l]),b.reduce(function(y,E){if(E)if(ke(y)){var C=y,w=E(C,m);return w===void 0?y:w}else{if(be(y))return Vr(y,function(A){return E(A,m)});var w=E(y,m);if(w===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return y},f)}return h.getInitialState=d,h}function Tu(r,e){return r+"/"+e}function Js(r){var e=r.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var t=typeof r.initialState=="function"?r.initialState:sa(r.initialState),n=r.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(h){var f=n[h],m=Tu(e,h),b,y;"reducer"in f?(b=f.reducer,y=f.prepare):b=f,i[h]=b,s[m]=b,l[h]=y?Ve(m,y):Ve(m)});function d(){var h=typeof r.extraReducers=="function"?Ys(r.extraReducers):[r.extraReducers],f=h[0],m=f===void 0?{}:f,b=h[1],y=b===void 0?[]:b,E=h[2],C=E===void 0?void 0:E,w=Ke(Ke({},m),s);return Iu(t,function(A){for(var S in w)A.addCase(S,w[S]);for(var v=0,O=y;v<O.length;v++){var T=O[v];A.addMatcher(T.matcher,T.reducer)}C&&A.addDefaultCase(C)})}var p;return{name:e,reducer:function(h,f){return p||(p=d()),p(h,f)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Nu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_u=function(r){r===void 0&&(r=21);for(var e="",t=r;t--;)e+=Nu[Math.random()*64|0];return e},Lu=["name","message","stack","code"],ia=function(){function r(e,t){this.payload=e,this.meta=t}return r}(),Ks=function(){function r(e,t){this.payload=e,this.meta=t}return r}(),Pu=function(r){if(typeof r=="object"&&r!==null){for(var e={},t=0,n=Lu;t<n.length;t++){var a=n[t];typeof r[a]=="string"&&(e[a]=r[a])}return e}return{message:String(r)}},Ob=function(){function r(e,t,n){var a=Ve(e+"/fulfilled",function(h,f,m,b){return{payload:h,meta:na(Ke({},b||{}),{arg:m,requestId:f,requestStatus:"fulfilled"})}}),i=Ve(e+"/pending",function(h,f,m){return{payload:void 0,meta:na(Ke({},m||{}),{arg:f,requestId:h,requestStatus:"pending"})}}),s=Ve(e+"/rejected",function(h,f,m,b,y){return{payload:b,error:(n&&n.serializeError||Pu)(h||"Rejected"),meta:na(Ke({},y||{}),{arg:m,requestId:f,rejectedWithValue:!!b,requestStatus:"rejected",aborted:h?.name==="AbortError",condition:h?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return h.prototype.abort=function(){},h}();function p(h){return function(f,m,b){var y=n?.idGenerator?n.idGenerator(h):_u(),E=new d,C,w=!1;function A(v){C=v,E.abort()}var S=function(){return vu(this,null,function(){var v,O,T,L,M,P,N;return fu(this,function(g){switch(g.label){case 0:return g.trys.push([0,4,,5]),L=(v=n?.condition)==null?void 0:v.call(n,h,{getState:m,extra:b}),Mu(L)?[4,L]:[3,2];case 1:L=g.sent(),g.label=2;case 2:if(L===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,M=new Promise(function(x,I){return E.signal.addEventListener("abort",function(){return I({name:"AbortError",message:C||"Aborted"})})}),f(i(y,h,(O=n?.getPendingMeta)==null?void 0:O.call(n,{requestId:y,arg:h},{getState:m,extra:b}))),[4,Promise.race([M,Promise.resolve(t(h,{dispatch:f,getState:m,extra:b,requestId:y,signal:E.signal,abort:A,rejectWithValue:function(x,I){return new ia(x,I)},fulfillWithValue:function(x,I){return new Ks(x,I)}})).then(function(x){if(x instanceof ia)throw x;return x instanceof Ks?a(x.payload,y,h,x.meta):a(x,y,h)})])];case 3:return T=g.sent(),[3,5];case 4:return P=g.sent(),T=P instanceof ia?s(null,y,h,P.payload,P.meta):s(P,y,h),[3,5];case 5:return N=n&&!n.dispatchConditionRejection&&s.match(T)&&T.meta.condition,N||f(T),[2,T]}})})}();return Object.assign(S,{abort:A,requestId:y,arg:h,unwrap:function(){return S.then(ku)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return r.withTypes=function(){return r},r}();function ku(r){if(r.meta&&r.meta.rejectedWithValue)throw r.payload;if(r.error)throw r.error;return r.payload}function Mu(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}var Qs="listener",Xs="completed",ec="cancelled",Eb="task-"+ec,Cb="task-"+Xs,wb=Qs+"-"+ec,Ab=Qs+"-"+Xs;var ca="listenerMiddleware";var Rb=Ve(ca+"/add"),Ib=Ve(ca+"/removeAll"),Tb=Ve(ca+"/remove");var Vs,Nb=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(r){return(Vs||(Vs=Promise.resolve())).then(r).catch(function(e){return setTimeout(function(){throw e},0)})},Du=function(r){return function(e){setTimeout(e,r)}},_b=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Du(10);Ls();window.ftReduxStores||(window.ftReduxStores={});var Me=class r extends Te{static get(e){var t;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(_t(i))return i;if(a==null)return;let s=Js({...a,reducers:(t=a.reducers)!==null&&t!==void 0?t:{}}),l=qs({reducer:(d,p)=>p.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__")?{...d,...p.overwrites}:s.reducer(d,p)});return window.ftReduxStores[a.name]=new r(s,l,a.eventBus)}constructor(e,t,n){super(),this.reduxSlice=e,this.reduxStore=t,this.isFtReduxStore=!0,this.commands=new gr;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let d=s,p=i[d];return p?(...h)=>{let f=p(...h.map(a));return this.reduxStore.dispatch(f),f}:h=>{this.setState({[d]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function Fu(){var r;for(let e of Object.values((r=window.ftReduxStores)!==null&&r!==void 0?r:{}))_t(e)&&e.clear()}var qr=class{constructor(e,t,n){this.store=e,this.valueSelector=t,this.callback=n}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),t=this.valueSelector(e);rt(this.lastValue,t)&&(this.callback(t,e),this.lastValue=t)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function Uu(r,e,t){return new qr(r,e,t).watch()}var la=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var t;return(t=this.requestConsumers.get(e))!==null&&t!==void 0?t:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,t){for(let n of t)this.getOrCreateRequestConsumers(n).add(e)}unregisterComponent(e,t){for(let n of t)this.getOrCreateRequestConsumers(n).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var fa={};D(fa,{scrollHelper:()=>Bu});var ua,Yr=new Map,pa=class{lock(e,t){if(t){let n=Yr.get(t);if(n==null||n===e)return Yr.set(t,e),t}}release(e,t){t&&Yr.get(t)===e&&Yr.delete(t)}findFirstScrollableParent(e){var t;let n,a;for(let i of Yo(e)){let s=i,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){n=s;break}else l&&a==null&&(a=s)}return(t=n??a)!==null&&t!==void 0?t:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)}catch{return!1}}getAbsoluteScrollOffset(e,t){var n,a;let i=0;for(;t&&t.offsetParent!==e.offsetParent;)i+=(n=t.offsetTop)!==null&&n!==void 0?n:0,t=t.offsetParent;return i+((a=t?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,t){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return t;default:return 0}}scrollIntoViewIfPossible(e,t){let n=this.findFirstScrollableParent(e);if(e&&this.lock(this,n)){let a=this.getAbsoluteScrollOffset(n,e),i=a-n.clientHeight+e.clientHeight,s=a,l=Xt(0,(s-n.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(t?.position,l)*(i-s)+s;n.scrollTo({behavior:t?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,n);this.release(this,n)}};window.FluidTopicsScrollHelper=(ua=window.FluidTopicsScrollHelper)!==null&&ua!==void 0?ua:new pa;var Bu=window.FluidTopicsScrollHelper;var ga={};D(ga,{SearchPlaceConverter:()=>Ht,SearchPlaceQueryParams:()=>B,isSearchPlaceQueryParams:()=>Mc,serializeRequest:()=>zu});var $u=cl(rc(),1);var oc;(function(r){r.black="black",r.green="green",r.blue="blue",r.purple="purple",r.red="red",r.orange="orange",r.yellow="yellow"})(oc||(oc={}));var nc;(function(r){r.OFFICIAL="OFFICIAL",r.PERSONAL="PERSONAL",r.SHARED="SHARED"})(nc||(nc={}));var ac;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(ac||(ac={}));var ic;(function(r){r.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",r.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",r.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",r.PERSONAL_BOOK="PERSONAL_BOOK",r.ATTACHMENT="ATTACHMENT",r.RESOURCE="RESOURCE",r.HTML_PACKAGE="HTML_PACKAGE"})(ic||(ic={}));var sc;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(sc||(sc={}));var cc;(function(r){r.VALUE="VALUE",r.DATE="DATE",r.RANGE="RANGE"})(cc||(cc={}));var lc;(function(r){r.BOOKMARK__CREATE="BOOKMARK__CREATE",r.BOOKMARK__DELETE="BOOKMARK__DELETE",r.CASE_DEFLECTION__START="CASE_DEFLECTION__START",r.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",r.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",r.CHATBOT__RATE="CHATBOT__RATE",r.COLLECTION__CREATE="COLLECTION__CREATE",r.COLLECTION__UPDATE="COLLECTION__UPDATE",r.COLLECTION__DELETE="COLLECTION__DELETE",r.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",r.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",r.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",r.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",r.DOCUMENT__PRINT="DOCUMENT__PRINT",r.DOCUMENT__PROCESS="DOCUMENT__PROCESS",r.DOCUMENT__RATE="DOCUMENT__RATE",r.DOCUMENT__SEARCH="DOCUMENT__SEARCH",r.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",r.DOCUMENT__UNRATE="DOCUMENT__UNRATE",r.FEEDBACK__SEND="FEEDBACK__SEND",r.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",r.AI__RATE="AI__RATE",r.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",r.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",r.KHUB__PROCESS="KHUB__PROCESS",r.KHUB__SEARCH="KHUB__SEARCH",r.LABELS__DOWNLOAD="LABELS__DOWNLOAD",r.LINK__SHARE="LINK__SHARE",r.PAGE__DISPLAY="PAGE__DISPLAY",r.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",r.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",r.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",r.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",r.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",r.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",r.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",r.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",r.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",r.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",r.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",r.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",r.TOPIC__DISPLAY="TOPIC__DISPLAY",r.TOPIC__RATE="TOPIC__RATE",r.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",r.TOPIC__UNRATE="TOPIC__UNRATE",r.USER__LOGIN="USER__LOGIN",r.USER__LOGOUT="USER__LOGOUT",r.HEARTBEAT="HEARTBEAT"})(lc||(lc={}));var dc;(function(r){r.THIRD_PARTY="THIRD_PARTY",r.OFF_THE_GRID="OFF_THE_GRID",r.CONTENT_PACKAGER="CONTENT_PACKAGER",r.PAGES="PAGES",r.DESIGNED_READER="DESIGNED_READER"})(dc||(dc={}));var uc;(function(r){r.HOMEPAGE="HOMEPAGE",r.CUSTOM="CUSTOM",r.HEADER="HEADER",r.READER="READER",r.TOPIC_TEMPLATE="TOPIC_TEMPLATE",r.SEARCH="SEARCH",r.SEARCH_RESULT="SEARCH_RESULT",r.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",r.LINK_PREVIEW="LINK_PREVIEW"})(uc||(uc={}));var pc;(function(r){r.CLASSIC="CLASSIC",r.CUSTOM="CUSTOM",r.DESIGNER="DESIGNER"})(pc||(pc={}));var fc;(function(r){r.AND="AND",r.OR="OR",r.MONOVALUED="MONOVALUED"})(fc||(fc={}));var hc;(function(r){r.NONE="NONE",r.ALPHABET="ALPHABET",r.VERSION="VERSION"})(hc||(hc={}));var gc;(function(r){r.STARS="STARS",r.LIKE="LIKE",r.DICHOTOMOUS="DICHOTOMOUS",r.NO_RATING="NO_RATING"})(gc||(gc={}));var mc;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR",r.CUSTOM="CUSTOM"})(mc||(mc={}));var Ut;(function(r){r.OPTIONAL="OPTIONAL",r.MANDATORY="MANDATORY"})(Ut||(Ut={}));var yc;(function(r){r.ASC="ASC",r.DESC="DESC"})(yc||(yc={}));var bc;(function(r){r.ALPHA="ALPHA",r.NATURAL="NATURAL"})(bc||(bc={}));var ha;(function(r){r.EVERYWHERE="EVERYWHERE",r.TITLE_ONLY="TITLE_ONLY",r.NONE="NONE"})(ha||(ha={}));var Ac=r=>Object.keys(ha).includes(r);var vc;(function(r){r.ARTICLE="ARTICLE",r.BOOK="BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(vc||(vc={}));var xc;(function(r){r.FLUIDTOPICS="FLUIDTOPICS",r.EXTERNAL="EXTERNAL"})(xc||(xc={}));var Sc;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.PERSONAL_BOOK="PERSONAL_BOOK",r.SHARED_BOOK="SHARED_BOOK",r.HTML_PACKAGE="HTML_PACKAGE"})(Sc||(Sc={}));var Bt;(function(r){r.LAST_WEEK="LAST_WEEK",r.LAST_MONTH="LAST_MONTH",r.LAST_QUARTER="LAST_QUARTER",r.LAST_YEAR="LAST_YEAR"})(Bt||(Bt={}));var Rc=r=>Object.keys(Bt).includes(r);var Oc;(function(r){r.MAP="MAP",r.DOCUMENT="DOCUMENT",r.TOPIC="TOPIC",r.HTML_PACKAGE="HTML_PACKAGE",r.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Oc||(Oc={}));var Ec;(function(r){r.DEFAULT="DEFAULT",r.DOCUMENTS="DOCUMENTS",r.ALL_TOPICS="ALL_TOPICS",r.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ec||(Ec={}));var Cc;(function(r){r.PLAIN_TEXT="PLAIN_TEXT",r.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",r.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Cc||(Cc={}));var W;(function(r){r.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",r.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",r.HTML_EXPORT_USER="HTML_EXPORT_USER",r.PDF_EXPORT_USER="PDF_EXPORT_USER",r.SAVED_SEARCH_USER="SAVED_SEARCH_USER",r.COLLECTION_USER="COLLECTION_USER",r.OFFLINE_USER="OFFLINE_USER",r.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",r.ANALYTICS_USER="ANALYTICS_USER",r.BETA_USER="BETA_USER",r.DEBUG_USER="DEBUG_USER",r.PRINT_USER="PRINT_USER",r.RATING_USER="RATING_USER",r.FEEDBACK_USER="FEEDBACK_USER",r.GENERATIVE_AI_USER="GENERATIVE_AI_USER",r.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",r.CONTENT_PUBLISHER="CONTENT_PUBLISHER",r.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",r.KHUB_ADMIN="KHUB_ADMIN",r.USERS_ADMIN="USERS_ADMIN",r.PORTAL_ADMIN="PORTAL_ADMIN",r.ADMIN="ADMIN"})(W||(W={}));var he;(function(r){r.SEARCHES="SEARCHES",r.BOOKMARKS="BOOKMARKS",r.BOOKS="BOOKS",r.COLLECTIONS="COLLECTIONS"})(he||(he={}));var wc;(function(r){r.UNAUTHENTICATED="UNAUTHENTICATED",r.USER_INCOMPLETE="USER_INCOMPLETE",r.MFA_REQUIRED="MFA_REQUIRED",r.AUTHENTICATED="AUTHENTICATED"})(wc||(wc={}));var Ic;(function(r){r.VALID="VALID",r.INVALID="INVALID"})(Ic||(Ic={}));var Tc;(function(r){r.JSON="JSON",r.TEXT="TEXT"})(Tc||(Tc={}));var Nc;(function(r){r.USER="USER",r.ASSISTANT="ASSISTANT"})(Nc||(Nc={}));var _c;(function(r){r.TEXT="TEXT",r.HTML="HTML"})(_c||(_c={}));var Lc;(function(r){r.HTML="HTML",r.MARKDOWN="MARKDOWN"})(Lc||(Lc={}));var Hu={[W.PERSONAL_BOOK_SHARE_USER]:[W.PERSONAL_BOOK_USER],[W.HTML_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.PDF_EXPORT_USER]:[W.PERSONAL_BOOK_USER],[W.KHUB_ADMIN]:[W.CONTENT_PUBLISHER],[W.ADMIN]:[W.KHUB_ADMIN,W.USERS_ADMIN,W.PORTAL_ADMIN],[W.GENERATIVE_AI_EXPORT_USER]:[W.GENERATIVE_AI_USER]};function Pc(r,e){return r===e||(Hu[r]??[]).some(t=>Pc(t,e))}function De(r,e){return r==null?!1:(Array.isArray(r)?r:Array.isArray(r.roles)?r.roles:Array.isArray(r.profile?.roles)?r.profile.roles:[]).some(n=>Pc(n,e))}function Wu(r){return`"${r}"`}function kc(r){return r.startsWith('"')&&r.endsWith('"')?r.replace(/(^"+)|("+$)/g,""):r}function zu(r,e){return new Ht(r).serialize(e)}var B;(function(r){r.LOCALE="content-lang",r.QUERY="query",r.SCOPE="scope",r.FILTERS="filters",r.VIRTUAL_FIELD="virtual-field",r.PERIOD="period",r.VALUE_FILTERS="value-filters",r.DATE_FILTERS="date-filters",r.RANGE_FILTERS="range-filters",r.SORT="sort",r.PER_PAGE="per-page",r.KEYWORD_MATCH="keyword-match"})(B||(B={}));var ju=new Set(Object.values(B));function Mc(r){return ju.has(r)}var Ht=class{constructor(e,t=20,n=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=t,this.allLanguagesAllowed=n,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,t){return this.serializeToCurrentPageIfPossible(e,t??"/search")}serializeToCurrentPageIfPossible(e,t){let n=t==null||t.trim().length===0,a=new URL(n?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${t}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,t=!1){var n,a,i,s,l,d,p,h,f,m,b;let y=new URLSearchParams;e.contentLocale?(!t||e.contentLocale!==this.defaultContentLocale)&&y.append(B.LOCALE,e.contentLocale):y.append(B.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((n=e.query)===null||n===void 0?void 0:n.length)>0&&y.append(B.QUERY,e.query);let E=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(v=>v.valueFilter&&!v.valueFilter.negative))!==null&&i!==void 0?i:[];if(E.length>0){let v=E.map(O=>{var T,L;let M=((L=(T=O.valueFilter)===null||T===void 0?void 0:T.values)!==null&&L!==void 0?L:[]).map(P=>this.escapeFilters(P)).map(P=>Wu(kc(P))).join("_");return`${O.key}~${M}`}).join("*");y.append(B.VALUE_FILTERS,v)}let C=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(v=>v.dateFilter))!==null&&l!==void 0?l:[];if(C.length>0){let v=C.map(O=>{var T;return`${O.key}~${(T=O.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");y.append(B.DATE_FILTERS,v)}let w=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(v=>v.rangeFilter))!==null&&p!==void 0?p:[];if(w.length>0){let v=w.map(O=>{var T,L;return`${O.key}~${(T=O.rangeFilter)===null||T===void 0?void 0:T.from}_${(L=O.rangeFilter)===null||L===void 0?void 0:L.to}`}).join("*");y.append(B.RANGE_FILTERS,v)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&y.append(B.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&y.append(B.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&y.append(B.SORT,e.sortId),!((h=e.paging)===null||h===void 0)&&h.perPage&&((m=(f=e.paging)===null||f===void 0?void 0:f.perPage)!==null&&m!==void 0?m:this.defaultPerPage)!=this.defaultPerPage&&y.append(B.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&y.append(B.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let A=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let v in A)y.append(v,A[v]);let S=new Array;return y.forEach((v,O)=>{S.push(this.encodeQueryString(O)+"="+this.encodeQueryString(v))}),encodeURI(S.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var t;let n=e.split("?"),a=this.fromURLSearchParams(n.slice(1).join("?")),i=n[0].split("/search/")[1];return i==null?a:{...a,scope:(t=this.scopeMapping[i])!==null&&t!==void 0?t:a.scope}}fromURLSearchParams(e){var t,n,a,i,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),p=d.get(B.LOCALE)==="all"?void 0:d.get(B.LOCALE),h=((t=d.get(B.VIRTUAL_FIELD))!==null&&t!==void 0?t:"EVERYWHERE").toUpperCase(),f=(n=d.get(B.SORT))===null||n===void 0?void 0:n.toLowerCase(),m=(a=d.get(B.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(B.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),y=d.get(B.KEYWORD_MATCH),E=y?y.toUpperCase()===Ut.MANDATORY?Ut.MANDATORY:Ut.OPTIONAL:void 0,C={};for(let w of d.keys())Mc(w)||(C[w]=d.get(w));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(B.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[m])!==null&&l!==void 0?l:"DEFAULT",virtualField:Ac(h)?h:"EVERYWHERE",sortId:f,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Xt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:E,otherQueryParams:C}}parseCompatFilters(e){var t,n,a,i,s,l;let d=[];return e.has(B.FILTERS)&&(d=this.parseValueFilters((t=e.get(B.FILTERS))!==null&&t!==void 0?t:"")),(n=e.has(B.PERIOD))!==null&&n!==void 0&&n&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(B.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(B.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(B.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(B.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(t=>t.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(t=>({key:t[0],valueFilter:{values:t[1].split("_").map(kc).map(n=>this.unescapeFilterValue(n)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(t=>({key:t[0],dateFilter:{type:Bt[t[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(t=>({key:t[0],rangeFilter:{from:t[1].split("_")[0],to:t[1].split("_")[1]}}))}escapeFilters(e){for(let[t,n,a]of this.filtersEscapeMapping)e=e.replaceAll(t,n);return e}superEscapeFilters(e){for(let[t,n,a]of this.filtersEscapeMapping)e=e.replaceAll(n,a);return e}unescapeFilterValue(e){for(let[t,n,a]of this.filtersEscapeMapping)e=e.replace(a,t);return e}parseLegacyPeriodFilter(e){if(Rc(e))return[{key:"ft:lastEdition",dateFilter:{type:Bt[e]}}];if(e.startsWith("CUSTOM_")){let[t,n,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:n,to:a}}]}return[]}};var ya={};D(ya,{toFtFormComponent:()=>Gu});var ma=Symbol("elementInternals"),Gu=K(Symbol("toFtFormComponent"),function(r){class e extends r{static get formAssociated(){return!0}get form(){return this[ma].form}constructor(...n){super(n),this[ma]=this.attachInternals()}setFormValue(n){this[ma].setFormValue(n)}}return e});var ba={};D(ba,{DateFormatter:()=>ut});var ut=class{static format(e,t,n,a){return window.moment?window.moment(e).locale(t).format(this.getMomentDateFormat(n,a)):this.getIntlDateTime(e,t,n,a)}static getMomentDateFormat(e,t){return e?t?"lll":"ll":t?"L LT":"L"}static getIntlDateTime(e,t,n,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(t,{dateStyle:n?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(t,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),t=new Date().getTimezoneOffset();return`${t<0?"+":"-"}${e(Math.abs(t)/60)}:${e(Math.abs(t)%60)}`}};var xa={};D(xa,{ALL_KEYS_VALUE:()=>va,SameWindowStorageEvent:()=>$t});var va="__all__",$t=class extends CustomEvent{constructor(e,t,n){super("same-window-storage",{detail:{key:e,oldValue:t,newValue:n}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==va}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(r,e,t){let n=e.getItem(t[0]);Reflect.apply(r,e,t),window.dispatchEvent(new $t(t[0],n,t[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(r,e,t){let n=e.getItem(t[0]);Reflect.apply(r,e,t),window.dispatchEvent(new $t(t[0],n))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(r,e,t){Reflect.apply(r,e,t),window.dispatchEvent(new $t(va))}});var Oa={};D(Oa,{FocusMainContentEvent:()=>Sa});var Sa=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var Dc={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Ku(r){(r.key==="Enter"||r.key===" "||r.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=r.key}function Vu(r){window.FluidTopicsA11yHints.isKeyboardNavigation=r.detail==0}document.addEventListener("keydown",Ku);document.addEventListener("click",Vu);var Fc=$`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -69,7 +69,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
69
69
  width:auto;
70
70
  height:auto;
71
71
  }
72
- `;var Zu={checkVisibility:!0},yv=K(Symbol("withAriaNotification"),function(r){class e extends r{sendAriaNotification(n,a){let{checkVisibility:i}={...Zu,...a};setTimeout(()=>{(!i||this.checkVisibility())&&(n=typeof n=="string"?n:n?.message,n&&this.dispatchEvent(new tr({type:"aria",message:n})))},20)}}return e});function Fc(r,e,t){return r?e(r):t?.(r)}var Q=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},pt;(function(r){r.blur="blur",r.blurWithStatusResolutionOnInput="blurWithStatusResolutionOnInput",r.input="input"})(pt||(pt={}));var ft;(function(r){r.default="default",r.warning="warning",r.error="error"})(ft||(ft={}));var Ea=class extends CustomEvent{constructor(e){super("input-validated",{detail:{level:e}})}},Rv=K(Symbol("toFtInput"),function(r){class e extends r{constructor(){super(...arguments),this.warningRules=[],this.errorRules=[],this.validateOn=pt.input,this.validateAtRender=!1,this.label="",this.hideLabel=!1,this.name="",this.disabled=!1,this.errorMessages=[],this.warningMessages=[],this.status=ft.default,this.focused=!1,this.additionalWarningRules=[],this.additionalErrorRules=[]}connectedCallback(){super.connectedCallback(),this.validateAtRender&&this.triggerValidation()}onBlur(){this.focused=!1,(this.validateOn===pt.blur||this.validateOn===pt.blurWithStatusResolutionOnInput)&&this.triggerValidation()}onFocus(){this.focused=!0}onInput(){(this.status!==ft.default&&this.validateOn===pt.blurWithStatusResolutionOnInput||this.validateOn===pt.input)&&this.triggerValidation()}triggerValidation(){this.errorMessages=this.processRules([...this.errorRules,...this.additionalErrorRules]),this.warningMessages=this.processRules([...this.warningRules,...this.additionalWarningRules]),this.status=this.resolveStatus(),this.dispatchEvent(new Ea(this.status))}get messagesForScreenReaderElementId(){return"sr-helper-text-list"}renderMessagesForScreenReader(){return te`
72
+ `;var Zu={checkVisibility:!0},yv=K(Symbol("withAriaNotification"),function(r){class e extends r{sendAriaNotification(n,a){let{checkVisibility:i}={...Zu,...a};setTimeout(()=>{(!i||this.checkVisibility())&&(n=typeof n=="string"?n:n?.message,n&&this.dispatchEvent(new tr({type:"aria",message:n})))},20)}}return e});function Uc(r,e,t){return r?e(r):t?.(r)}var Q=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},pt;(function(r){r.blur="blur",r.blurWithStatusResolutionOnInput="blurWithStatusResolutionOnInput",r.input="input"})(pt||(pt={}));var ft;(function(r){r.default="default",r.warning="warning",r.error="error"})(ft||(ft={}));var Ea=class extends CustomEvent{constructor(e){super("input-validated",{detail:{level:e}})}},Rv=K(Symbol("toFtInput"),function(r){class e extends r{constructor(){super(...arguments),this.warningRules=[],this.errorRules=[],this.validateOn=pt.input,this.validateAtRender=!1,this.label="",this.hideLabel=!1,this.name="",this.disabled=!1,this.errorMessages=[],this.warningMessages=[],this.status=ft.default,this.focused=!1,this.additionalWarningRules=[],this.additionalErrorRules=[]}connectedCallback(){super.connectedCallback(),this.validateAtRender&&this.triggerValidation()}onBlur(){this.focused=!1,(this.validateOn===pt.blur||this.validateOn===pt.blurWithStatusResolutionOnInput)&&this.triggerValidation()}onFocus(){this.focused=!0}onInput(){(this.status!==ft.default&&this.validateOn===pt.blurWithStatusResolutionOnInput||this.validateOn===pt.input)&&this.triggerValidation()}triggerValidation(){this.errorMessages=this.processRules([...this.errorRules,...this.additionalErrorRules]),this.warningMessages=this.processRules([...this.warningRules,...this.additionalWarningRules]),this.status=this.resolveStatus(),this.dispatchEvent(new Ea(this.status))}get messagesForScreenReaderElementId(){return"sr-helper-text-list"}renderMessagesForScreenReader(){return te`
73
73
  <ul aria-live="polite" id="${this.messagesForScreenReaderElementId}"
74
74
  style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;list-style:none;">
75
75
  ${Pr(this.errorMessages,n=>te`
@@ -78,11 +78,11 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
78
78
  ${Pr(this.warningMessages,n=>te`
79
79
  <li>${n}</li>
80
80
  `)}
81
- ${Fc(!this.errorMessages.length&&!this.warningMessages.length&&this.helperText,()=>te`
81
+ ${Uc(!this.errorMessages.length&&!this.warningMessages.length&&this.helperText,()=>te`
82
82
  <li>${this.helperText}</li>
83
83
  `)}
84
84
  </ul>
85
- `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?ft.error:this.warningMessages.length?ft.warning:ft.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return Q([_()],e.prototype,"warningRules",void 0),Q([_()],e.prototype,"errorRules",void 0),Q([_()],e.prototype,"validateOn",void 0),Q([_({type:Boolean})],e.prototype,"validateAtRender",void 0),Q([_()],e.prototype,"label",void 0),Q([_({type:Boolean})],e.prototype,"hideLabel",void 0),Q([_()],e.prototype,"name",void 0),Q([_({type:Boolean})],e.prototype,"disabled",void 0),Q([_()],e.prototype,"helperText",void 0),Q([_()],e.prototype,"forceStatus",void 0),Q([_({reflect:!0})],e.prototype,"value",void 0),Q([G()],e.prototype,"errorMessages",void 0),Q([G()],e.prototype,"warningMessages",void 0),Q([G()],e.prototype,"status",void 0),Q([G()],e.prototype,"focused",void 0),Q([G()],e.prototype,"additionalWarningRules",void 0),Q([G()],e.prototype,"additionalErrorRules",void 0),e});var xr=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let n of t)n._$AO?.(e,!1),xr(n,e);return!0},Xr=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Uc=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),Ju(e)}};function qu(r){this._$AN!==void 0?(Xr(this),this._$AM=r,Uc(this)):this._$AM=r}function Yu(r,e=!1,t=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=t;i<n.length;i++)xr(n[i],!1),Xr(n[i]);else n!=null&&(xr(n,!1),Xr(n));else xr(this,r)}var Ju=r=>{r.type==xe.CHILD&&(r._$AP??=Yu,r._$AQ??=qu)},eo=class extends pe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Uc(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(xr(this,e),Xr(this))}setValue(e){if(ci(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Bc;(function(r){r.sm="sm",r.md="md",r.lg="lg",r.xl="xl"})(Bc||(Bc={}));var Qu={sm:640,md:768,lg:1024,xl:1280},Ca=class extends eo{constructor(e){super(e),this.size=0,this.onResize=()=>{let t=window.innerWidth;this.size!==t&&(this.size=t,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,[t,n,a]){return this.lastArgs=[t,n,a],this.render(t,n,a)}render(e,t,n){let a=this.resolveThreshold(e),i=n??(()=>U);return this.size>a?t():i()}resolveThreshold(e){return typeof e=="number"?e:Qu[e]}},$v=me(Ca);var wa,Aa,Ra,Ia,Xu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Ra=(Aa=(wa=window.safari)===null||wa===void 0?void 0:wa.pushNotification)===null||Aa===void 0?void 0:Aa.toString())!==null&&Ra!==void 0?Ra:"")==="[object SafariRemoteNotification]",ep="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ia=window.ftGlobals)!==null&&Ia!==void 0?Ia:{lit:Ho,litDecorators:Wo,litRepeat:zo,litClassMap:jo,litStyleMap:Go,litUnsafeHTML:Ko,wcUtils:{...tn,...Zo,...an,...ba,...sn,...cn,...pn,...en,...Rn,...Oa,...Mc,...fa,...un,...Pn,...ya,..._n,...vs,...Jo,...Dn,...fn,...Fn,...Dc,...Ss,...Un,...da,...xa,...In,...Nn,...ga,...on,isSafari:Xu,isTouchScreen:ep,setVariable:Et}};var tp={fontFamily:o.external(ir.titleFont,"Design system")},Hc=$`
85
+ `}resolveStatus(){return this.forceStatus?this.forceStatus:this.errorMessages.length?ft.error:this.warningMessages.length?ft.warning:ft.default}processRules(n){return n.map(a=>a(this.value)).filter(a=>a!==!0).map(a=>a)}}return Q([_()],e.prototype,"warningRules",void 0),Q([_()],e.prototype,"errorRules",void 0),Q([_()],e.prototype,"validateOn",void 0),Q([_({type:Boolean})],e.prototype,"validateAtRender",void 0),Q([_()],e.prototype,"label",void 0),Q([_({type:Boolean})],e.prototype,"hideLabel",void 0),Q([_()],e.prototype,"name",void 0),Q([_({type:Boolean})],e.prototype,"disabled",void 0),Q([_()],e.prototype,"helperText",void 0),Q([_()],e.prototype,"forceStatus",void 0),Q([_({reflect:!0})],e.prototype,"value",void 0),Q([G()],e.prototype,"errorMessages",void 0),Q([G()],e.prototype,"warningMessages",void 0),Q([G()],e.prototype,"status",void 0),Q([G()],e.prototype,"focused",void 0),Q([G()],e.prototype,"additionalWarningRules",void 0),Q([G()],e.prototype,"additionalErrorRules",void 0),e});var xr=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let n of t)n._$AO?.(e,!1),xr(n,e);return!0},Xr=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Bc=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),Ju(e)}};function qu(r){this._$AN!==void 0?(Xr(this),this._$AM=r,Bc(this)):this._$AM=r}function Yu(r,e=!1,t=0){let n=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(n))for(let i=t;i<n.length;i++)xr(n[i],!1),Xr(n[i]);else n!=null&&(xr(n,!1),Xr(n));else xr(this,r)}var Ju=r=>{r.type==xe.CHILD&&(r._$AP??=Yu,r._$AQ??=qu)},eo=class extends pe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Bc(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(xr(this,e),Xr(this))}setValue(e){if(ci(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Hc;(function(r){r.sm="sm",r.md="md",r.lg="lg",r.xl="xl"})(Hc||(Hc={}));var Qu={sm:640,md:768,lg:1024,xl:1280},Ca=class extends eo{constructor(e){super(e),this.size=0,this.onResize=()=>{let t=window.innerWidth;this.size!==t&&(this.size=t,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,[t,n,a]){return this.lastArgs=[t,n,a],this.render(t,n,a)}render(e,t,n){let a=this.resolveThreshold(e),i=n??(()=>U);return this.size>a?t():i()}resolveThreshold(e){return typeof e=="number"?e:Qu[e]}},$v=me(Ca);var wa,Aa,Ra,Ia,Xu=navigator.vendor&&!!navigator.vendor.match(/apple/i)||((Ra=(Aa=(wa=window.safari)===null||wa===void 0?void 0:wa.pushNotification)===null||Aa===void 0?void 0:Aa.toString())!==null&&Ra!==void 0?Ra:"")==="[object SafariRemoteNotification]",ep="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.ftGlobals=(Ia=window.ftGlobals)!==null&&Ia!==void 0?Ia:{lit:Ho,litDecorators:Wo,litRepeat:zo,litClassMap:jo,litStyleMap:Go,litUnsafeHTML:Ko,wcUtils:{...tn,...Zo,...an,...ba,...sn,...cn,...pn,...en,...Rn,...Oa,...Dc,...fa,...un,...Pn,...ya,..._n,...vs,...Jo,...Dn,...fn,...Fn,...Fc,...Ss,...Un,...da,...xa,...In,...Nn,...ga,...on,isSafari:Xu,isTouchScreen:ep,setVariable:Et}};var tp={fontFamily:o.external(ir.titleFont,"Design system")},$c=$`
86
86
  .title {
87
87
  font-family: ${tp.fontFamily};
88
88
  }
@@ -90,7 +90,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
90
90
  ft-skeleton {
91
91
  width: 150px;
92
92
  }
93
- `;var ht;(function(r){r.clusteringHelperCreated="clustering-helper-created",r.mapAttachmentsUpdate="map-attachments-update",r.visibleTopicChange="visible-topic-change"})(ht||(ht={}));var Fe;(function(r){r.FEEDBACK="FEEDBACK",r.RATING="RATING",r.PRINT="PRINT",r.BOOKMARK="BOOKMARK",r.COLLECTIONS="COLLECTIONS",r.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Fe||(Fe={}));var rp=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},Na=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Ta=Symbol("registerInterval"),op=K(Symbol("toFtReaderComponent"),function(r){var e;class t extends r{constructor(){super(...arguments),this[e]=0}setReaderStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var a;return(a=this.stateManager)===null||a===void 0?void 0:a.service}connectedCallback(){super.connectedCallback(),this[Ta]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ta]):this.dispatchEvent(new Na)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ta,rp([G()],t.prototype,"stateManager",void 0),t}),to=class extends op(ct){};var _a=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},Pa=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},La=Symbol("registerInterval"),np=K(Symbol("toFtReaderTopicComponent"),function(r){var e;class t extends r{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[e]=0}connectedCallback(){super.connectedCallback(),this[La]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[La]):this.dispatchEvent(new Pa)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=La,_a([G()],t.prototype,"tocNode",void 0),_a([G()],t.prototype,"disableContextInteractions",void 0),_a([G()],t.prototype,"headingLevelsShift",void 0),t}),ro=class extends np(to){};var Wc=Symbol.for(""),ap=r=>{if(r?.r===Wc)return r?._$litStatic$},ka=r=>({_$litStatic$:r,r:Wc});var $c=new Map,Ma=r=>(e,...t)=>{let n=t.length,a,i,s=[],l=[],d,p=0,h=!1;for(;p<n;){for(d=e[p];p<n&&(i=t[p],(a=ap(i))!==void 0);)d+=a+e[++p],h=!0;p!==n&&l.push(i),s.push(d),p++}if(p===n&&s.push(e[n]),h){let f=s.join("$$lit$$");(e=$c.get(f))===void 0&&(s.raw=s,$c.set(f,e=s)),t=l}return r(e,...t)},oo=Ma(te),W0=Ma(Mo),z0=Ma(Do);var ne={display:o.create("--ft-skeleton--display","","DISPLAY","block"),width:o.create("--ft-skeleton--width","","SIZE","100%"),height:o.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:o.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:o.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:o.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:o.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:o.external(ir.borderRadiusM,"Design system")},zc=$`
93
+ `;var ht;(function(r){r.clusteringHelperCreated="clustering-helper-created",r.mapAttachmentsUpdate="map-attachments-update",r.visibleTopicChange="visible-topic-change"})(ht||(ht={}));var Fe;(function(r){r.FEEDBACK="FEEDBACK",r.RATING="RATING",r.PRINT="PRINT",r.BOOKMARK="BOOKMARK",r.COLLECTIONS="COLLECTIONS",r.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Fe||(Fe={}));var rp=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},Na=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Ta=Symbol("registerInterval"),op=K(Symbol("toFtReaderComponent"),function(r){var e;class t extends r{constructor(){super(...arguments),this[e]=0}setReaderStateManager(a){this.clearStateManager(),this.stateManager=a,this.addStore(a.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var a;return(a=this.stateManager)===null||a===void 0?void 0:a.service}connectedCallback(){super.connectedCallback(),this[Ta]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ta]):this.dispatchEvent(new Na)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ta,rp([G()],t.prototype,"stateManager",void 0),t}),to=class extends op(ct){};var _a=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},Pa=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},La=Symbol("registerInterval"),np=K(Symbol("toFtReaderTopicComponent"),function(r){var e;class t extends r{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[e]=0}connectedCallback(){super.connectedCallback(),this[La]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[La]):this.dispatchEvent(new Pa)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=La,_a([G()],t.prototype,"tocNode",void 0),_a([G()],t.prototype,"disableContextInteractions",void 0),_a([G()],t.prototype,"headingLevelsShift",void 0),t}),ro=class extends np(to){};var zc=Symbol.for(""),ap=r=>{if(r?.r===zc)return r?._$litStatic$},ka=r=>({_$litStatic$:r,r:zc});var Wc=new Map,Ma=r=>(e,...t)=>{let n=t.length,a,i,s=[],l=[],d,p=0,h=!1;for(;p<n;){for(d=e[p];p<n&&(i=t[p],(a=ap(i))!==void 0);)d+=a+e[++p],h=!0;p!==n&&l.push(i),s.push(d),p++}if(p===n&&s.push(e[n]),h){let f=s.join("$$lit$$");(e=Wc.get(f))===void 0&&(s.raw=s,Wc.set(f,e=s)),t=l}return r(e,...t)},oo=Ma(te),W0=Ma(Mo),z0=Ma(Do);var ne={display:o.create("--ft-skeleton--display","","DISPLAY","block"),width:o.create("--ft-skeleton--width","","SIZE","100%"),height:o.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:o.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:o.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:o.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:o.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:o.external(ir.borderRadiusM,"Design system")},jc=$`
94
94
  :host {
95
95
  width: ${ne.width};
96
96
  height: ${ne.height};
@@ -118,10 +118,10 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
118
118
  }
119
119
  }
120
120
  `;var qe=class extends J{render(){return te`
121
- `}};qe.elementDefinitions={};qe.styles=zc;Ne("ft-skeleton")(qe);var ip={setTranslationDestinationLanguage:(r,e)=>{r.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(r,e)=>{r.translation.sourceLanguage=e.payload},setTranslationProfileId:(r,e)=>{r.translation.profileId=e.payload},setTranslationLoading:(r,e)=>{r.translation.isLoading=e.payload},setTranslationError:(r,e)=>{r.translation.isError=e.payload},setTopicsRating:(r,e)=>{for(let t in e.payload)r.topicsRating[t]=e.payload[t]},setLinkPreviewDialogId:(r,e)=>{r.linkPreviewDialogId=e.payload}},jc=r=>Me.get({name:"ft-reader-"+r,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:ip});var Da=class{constructor(e,t){this.mapId=e,this.paginatedToc=t,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,t,n){return e.flatMap(a=>{var i;return a.pageConfiguration&&this.registerPage(this.buildPage(a,n)),a.tocId==null?this.extractPagesToc(a.children,t,n):[{tocId:a.tocId,title:(i=a.title)!==null&&i!==void 0?i:"",untranslatedTitle:a.untranslatedTitle,depth:t,children:this.extractPagesToc(a.children,t+1,a.tocId)}]})}convertNodes(e,t,n){return e.flatMap(a=>{var i,s,l;if(a.tocId==null)return[...this.convertSectionNodes((i=a.pageToc)!==null&&i!==void 0?i:[],t,a.tocId),...this.convertNodes(a.children,t,a.tocId)];let d=(s=a.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),p={tocId:a.tocId,contentId:a.contentId,title:a.title,untranslatedTitle:a.untranslatedTitle,hasRating:a.hasRating,origin:a.origin,prettyUrl:d,depth:t,parentTocId:n,children:[]};this.register(p);let h=this.convertSectionNodes((l=a.pageToc)!==null&&l!==void 0?l:[],t+1,a.tocId),f=this.convertNodes(a.children,t+1,p.tocId);return p.children=[...h,...f],[p]})}convertSectionNodes(e,t,n){return e.flatMap(a=>{var i;let s=(i=a.prettyUrl)===null||i===void 0?void 0:i.replace(/^\//,""),l={...a,prettyUrl:s,depth:t,parentTocId:n,children:[]};return this.register(l),l.children=this.convertSectionNodes(a.children,t+1,a.tocId),[l]})}buildPage(e,t){var n,a,i,s,l,d;let p={number:this.pages.length+1,title:(n=e.title)!==null&&n!==void 0?n:"",untranslatedTitle:e.untranslatedTitle,rootTocId:(a=e.tocId)!==null&&a!==void 0?a:"root",toc:((i=e.pageToc)!==null&&i!==void 0?i:[]).map(m=>this.nodeByTocId[m.tocId]),topics:[],hiddenTopics:[],breadcrumb:t?this.buildBreadcrumb(this.nodeByTocId[t]):[]},h=(m,b)=>(b?p.topics:p.hiddenTopics).push(m),f=(l=(s=e.pageConfiguration)===null||s===void 0?void 0:s.parentsVisibility)!==null&&l!==void 0?l:[];return p.breadcrumb.forEach((m,b)=>{h(m,f[b])}),e.tocId&&h(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((d=e.pageToc)!==null&&d!==void 0?d:[])),p}registerPage(e){for(let t of[...e.topics,...e.hiddenTopics])this.pageByTocId[t]||(this.pageByTocId[t]=e);this.pages.push(e)}tocIds(e){return e.flatMap(t=>[t.tocId,...this.tocIds(t.children)])}buildBreadcrumb(e){let t=[e.tocId];for(;e?.parentTocId;)t.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return t}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},no=class{convertPaginatedToc(e,t){return new Da(e,t).build()}};var Gc=$`
122
- `;var sp="ft-app-info",we=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:e})}};we.eventName="authentication-change";var cp={session:(r,e)=>{ie(r.session,e.payload)||(r.session=e.payload,setTimeout(()=>R.dispatchEvent(new we(e.payload)),0))}},R=Me.get({name:sp,reducers:cp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var gt=class r{static get(e){let{baseUrl:t,apiIntegrationIdentifier:n}=R.getState(),a=e??n;if(t&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(t,a,!0)}static await(e){return new Promise(t=>{let n=r.get(e);if(n)t(n);else{let a=R.subscribe(()=>{n=r.get(e),n&&(a(),t(n))})}})}};var ao=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:gt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):gt.await()}};var re=class extends ao{constructor(e=!0,t){var n;super(t),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Se,this.cache=e?a.commonCache:new Se}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((t,n)=>0|31*t+n.charCodeAt(0),0))}};var io=class extends re{async listMyBookmarks(){let e=R.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Fa=class{addCommand(e,t=!1){R.commands.add(e,t)}consumeCommand(e){return R.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fa;var Kc,Wt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},lp=Symbol("clearAfterUnitTest"),so=class extends Dr(re){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Kc]=()=>{this.defaultMessages={},this.cache=new Se,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=R.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let t=e.name.toLowerCase();this.cache.setFinal(t,e),this.notify(t)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,t){var n;if(e=e.toLowerCase(),t&&Object.keys(t).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...t};ie(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var t,n;return this.fetchContext(e),(n=(t=this.cache.getNow(e))===null||t===void 0?void 0:t.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,t){let n=e.toLowerCase();return this.resolveContext(n)[t]}resolveMessage(e,t,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new hr((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(t,...n)}async fetchContext(e){let t=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),t&&await this.notify(e)}catch(a){!(a instanceof Ie)&&t&&console.error(a)}return n}subscribe(e,t){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(t),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(t)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Wt({loadedContexts:e})),this.dispatchEvent(new Wt({loadedContexts:e})),await Promise.all(e.map(t=>this.notify(t,!1)))}async notify(e,t=!0){t&&(document.body.dispatchEvent(new Wt({loadedContexts:[e]})),this.dispatchEvent(new Wt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>Mr(0).then(()=>n()).catch(()=>null)))}};Kc=lp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends so{constructor(){super(async(r,e)=>(await this.awaitApi).getFluidTopicsMessageContext(r,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends so{constructor(){super(async(r,e)=>(await this.awaitApi).getCustomMessageContext(r,e))}});var Vc=window.FluidTopicsI18nService,Ix=window.FluidTopicsCustomI18nService;var Ua=class{highlightHtml(e,t,n){fr(e,t,n)}};window.FluidTopicsHighlightHtmlService=new Ua;var co=class extends re{async listMySearches(){let{session:e}=R.getState();return De(e,W.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ba=class{isDate(e){var t,n,a,i;return(i=(a=((n=(t=R.getState().metadataConfiguration)===null||t===void 0?void 0:t.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,t){var n,a,i;return ut.format(e,(n=t?.locale)!==null&&n!==void 0?n:R.getState().uiLocale,(a=t?.longFormat)!==null&&a!==void 0?a:!1,(i=t?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ba;var Sr=class{static get(e,t){var n,a;let i=R.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ht(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,t??`${s}-${l}`)}};var Ha=class{urlToSearchRequest(e){return Sr.get().parse(e)}searchRequestToUrl(e){return Sr.get().serialize(e)}};window.FluidTopicsUrlService=new Ha;var mt=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};mt.eventName="change";var $a=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let t=sessionStorage.getItem(this.itemName(e));return t?JSON.parse(t):void 0}set(e,t){sessionStorage.setItem(this.itemName(e),JSON.stringify(t))}},Zc=new $a;var lo=class r extends Te{static build(){return new r(window.history,Zc,()=>window.location,!1)}constructor(e,t,n,a){var i,s;super(),this.history=e,this.historyStorage=t,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,t=!1){let n=t&&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),ie(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mt(this.currentItem())),0)}installProxies(){let e=t=>(n,a,[i,s,l])=>{let d=t(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let t=this.history.length-1;t>=0;t--)e?this.states[t]=this.historyStorage.get(t):setTimeout(()=>this.states[t]=this.historyStorage.get(t),this.history.length-t)}updateCurrentState(e){var t;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(t=e?.title)!==null&&t!==void 0?t:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(mt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(mt.eventName,e)}currentItem(){return er(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 er(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return er(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 t;let n=(t=this.states[e])===null||t===void 0?void 0:t.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,t;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(t=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&t!==void 0?t:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,t){var n;if(!this.hasState(e))return!1;let a=t??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=lo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});var qc=R;function Yc(r,e){var t;return qc.getState().authenticationRequired&&!(!((t=qc.getState().session)===null||t===void 0)&&t.sessionAuthenticated)?Promise.resolve(e):r()}var V=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},z=class extends J{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>gt.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Se,this.cleanSessionDebouncer=new se,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return te`
121
+ `}};qe.elementDefinitions={};qe.styles=jc;Ne("ft-skeleton")(qe);var ip={setTranslationDestinationLanguage:(r,e)=>{r.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(r,e)=>{r.translation.sourceLanguage=e.payload},setTranslationProfileId:(r,e)=>{r.translation.profileId=e.payload},setTranslationLoading:(r,e)=>{r.translation.isLoading=e.payload},setTranslationError:(r,e)=>{r.translation.isError=e.payload},setTopicsRating:(r,e)=>{for(let t in e.payload)r.topicsRating[t]=e.payload[t]},setLinkPreviewDialogId:(r,e)=>{r.linkPreviewDialogId=e.payload}},Gc=r=>Me.get({name:"ft-reader-"+r,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:ip});var Da=class{constructor(e,t){this.mapId=e,this.paginatedToc=t,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(e,t,n){return e.flatMap(a=>{var i;return a.pageConfiguration&&this.registerPage(this.buildPage(a,n)),a.tocId==null?this.extractPagesToc(a.children,t,n):[{tocId:a.tocId,title:(i=a.title)!==null&&i!==void 0?i:"",untranslatedTitle:a.untranslatedTitle,depth:t,children:this.extractPagesToc(a.children,t+1,a.tocId)}]})}convertNodes(e,t,n){return e.flatMap(a=>{var i,s,l;if(a.tocId==null)return[...this.convertSectionNodes((i=a.pageToc)!==null&&i!==void 0?i:[],t,a.tocId),...this.convertNodes(a.children,t,a.tocId)];let d=(s=a.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),p={tocId:a.tocId,contentId:a.contentId,title:a.title,untranslatedTitle:a.untranslatedTitle,hasRating:a.hasRating,origin:a.origin,prettyUrl:d,depth:t,parentTocId:n,children:[]};this.register(p);let h=this.convertSectionNodes((l=a.pageToc)!==null&&l!==void 0?l:[],t+1,a.tocId),f=this.convertNodes(a.children,t+1,p.tocId);return p.children=[...h,...f],[p]})}convertSectionNodes(e,t,n){return e.flatMap(a=>{var i;let s=(i=a.prettyUrl)===null||i===void 0?void 0:i.replace(/^\//,""),l={...a,prettyUrl:s,depth:t,parentTocId:n,children:[]};return this.register(l),l.children=this.convertSectionNodes(a.children,t+1,a.tocId),[l]})}buildPage(e,t){var n,a,i,s,l,d;let p={number:this.pages.length+1,title:(n=e.title)!==null&&n!==void 0?n:"",untranslatedTitle:e.untranslatedTitle,rootTocId:(a=e.tocId)!==null&&a!==void 0?a:"root",toc:((i=e.pageToc)!==null&&i!==void 0?i:[]).map(m=>this.nodeByTocId[m.tocId]),topics:[],hiddenTopics:[],breadcrumb:t?this.buildBreadcrumb(this.nodeByTocId[t]):[]},h=(m,b)=>(b?p.topics:p.hiddenTopics).push(m),f=(l=(s=e.pageConfiguration)===null||s===void 0?void 0:s.parentsVisibility)!==null&&l!==void 0?l:[];return p.breadcrumb.forEach((m,b)=>{h(m,f[b])}),e.tocId&&h(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((d=e.pageToc)!==null&&d!==void 0?d:[])),p}registerPage(e){for(let t of[...e.topics,...e.hiddenTopics])this.pageByTocId[t]||(this.pageByTocId[t]=e);this.pages.push(e)}tocIds(e){return e.flatMap(t=>[t.tocId,...this.tocIds(t.children)])}buildBreadcrumb(e){let t=[e.tocId];for(;e?.parentTocId;)t.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return t}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},no=class{convertPaginatedToc(e,t){return new Da(e,t).build()}};var Kc=$`
122
+ `;var sp="ft-app-info",we=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:e})}};we.eventName="authentication-change";var cp={session:(r,e)=>{ie(r.session,e.payload)||(r.session=e.payload,setTimeout(()=>R.dispatchEvent(new we(e.payload)),0))}},R=Me.get({name:sp,reducers:cp,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var gt=class r{static get(e){let{baseUrl:t,apiIntegrationIdentifier:n}=R.getState(),a=e??n;if(t&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(t,a,!0)}static await(e){return new Promise(t=>{let n=r.get(e);if(n)t(n);else{let a=R.subscribe(()=>{n=r.get(e),n&&(a(),t(n))})}})}};var ao=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:gt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):gt.await()}};var re=class extends ao{constructor(e=!0,t){var n;super(t),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new Se,this.cache=e?a.commonCache:new Se}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((t,n)=>0|31*t+n.charCodeAt(0),0))}};var io=class extends re{async listMyBookmarks(){let e=R.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var Fa=class{addCommand(e,t=!1){R.commands.add(e,t)}consumeCommand(e){return R.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fa;var Vc,Wt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},lp=Symbol("clearAfterUnitTest"),so=class extends Dr(re){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Vc]=()=>{this.defaultMessages={},this.cache=new Se,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=R.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let t=e.name.toLowerCase();this.cache.setFinal(t,e),this.notify(t)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,t){var n;if(e=e.toLowerCase(),t&&Object.keys(t).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...t};ie(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var t,n;return this.fetchContext(e),(n=(t=this.cache.getNow(e))===null||t===void 0?void 0:t.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,t){let n=e.toLowerCase();return this.resolveContext(n)[t]}resolveMessage(e,t,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new hr((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(t,...n)}async fetchContext(e){let t=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),t&&await this.notify(e)}catch(a){!(a instanceof Ie)&&t&&console.error(a)}return n}subscribe(e,t){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(t),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(t)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Wt({loadedContexts:e})),this.dispatchEvent(new Wt({loadedContexts:e})),await Promise.all(e.map(t=>this.notify(t,!1)))}async notify(e,t=!0){t&&(document.body.dispatchEvent(new Wt({loadedContexts:[e]})),this.dispatchEvent(new Wt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>Mr(0).then(()=>n()).catch(()=>null)))}};Vc=lp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends so{constructor(){super(async(r,e)=>(await this.awaitApi).getFluidTopicsMessageContext(r,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends so{constructor(){super(async(r,e)=>(await this.awaitApi).getCustomMessageContext(r,e))}});var Zc=window.FluidTopicsI18nService,Ix=window.FluidTopicsCustomI18nService;var Ua=class{highlightHtml(e,t,n){fr(e,t,n)}};window.FluidTopicsHighlightHtmlService=new Ua;var co=class extends re{async listMySearches(){let{session:e}=R.getState();return De(e,W.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Ba=class{isDate(e){var t,n,a,i;return(i=(a=((n=(t=R.getState().metadataConfiguration)===null||t===void 0?void 0:t.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,t){var n,a,i;return ut.format(e,(n=t?.locale)!==null&&n!==void 0?n:R.getState().uiLocale,(a=t?.longFormat)!==null&&a!==void 0?a:!1,(i=t?.withTime)!==null&&i!==void 0?i:!1)}};window.FluidTopicsDateService=new Ba;var Sr=class{static get(e,t){var n,a;let i=R.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Ht(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,t??`${s}-${l}`)}};var Ha=class{urlToSearchRequest(e){return Sr.get().parse(e)}searchRequestToUrl(e){return Sr.get().serialize(e)}};window.FluidTopicsUrlService=new Ha;var mt=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};mt.eventName="change";var $a=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let t=sessionStorage.getItem(this.itemName(e));return t?JSON.parse(t):void 0}set(e,t){sessionStorage.setItem(this.itemName(e),JSON.stringify(t))}},qc=new $a;var lo=class r extends Te{static build(){return new r(window.history,qc,()=>window.location,!1)}constructor(e,t,n,a){var i,s;super(),this.history=e,this.historyStorage=t,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,t=!1){let n=t&&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),ie(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new mt(this.currentItem())),0)}installProxies(){let e=t=>(n,a,[i,s,l])=>{let d=t(),p={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let t=this.history.length-1;t>=0;t--)e?this.states[t]=this.historyStorage.get(t):setTimeout(()=>this.states[t]=this.historyStorage.get(t),this.history.length-t)}updateCurrentState(e){var t;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(t=e?.title)!==null&&t!==void 0?t:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(mt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(mt.eventName,e)}currentItem(){return er(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 er(this.states[this.previousDifferentMajorPosition()])}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return er(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 t;let n=(t=this.states[e])===null||t===void 0?void 0:t.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,t;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(t=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&t!==void 0?t:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,t){var n;if(!this.hasState(e))return!1;let a=t??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=lo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)});function Yc(r,e){let{authenticationRequired:t,session:n}=R.getState();return t&&!n?.sessionAuthenticated?Promise.resolve(e):r()}var V=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},z=class extends J{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>gt.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Se,this.cleanSessionDebouncer=new se,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return te`
123
123
  <slot></slot>
124
- `}connectedCallback(){super.connectedCallback(),R.addEventListener(we.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(we.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var t,n,a,i,s,l,d;super.update(e),e.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&R.actions.noCustom(this.noCustom),e.has("editorMode")&&R.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&R.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Vc.addContext(p)),e.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(R.actions.defaultLocales((t=this.localesConfiguration)===null||t===void 0?void 0:t.defaultLocales),R.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),R.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&R.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Yc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};z.elementDefinitions={};z.styles=Gc;V([_()],z.prototype,"baseUrl",void 0);V([_()],z.prototype,"apiIntegrationIdentifier",void 0);V([_()],z.prototype,"apiIntegrationAppVersion",void 0);V([_()],z.prototype,"uiLocale",void 0);V([Be(null)],z.prototype,"availableUiLocales",void 0);V([Be(null)],z.prototype,"metadataConfiguration",void 0);V([_({type:Boolean})],z.prototype,"editorMode",void 0);V([_({type:Boolean})],z.prototype,"noCustom",void 0);V([_({type:Boolean})],z.prototype,"openExternalDocumentInNewTab",void 0);V([_({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],z.prototype,"noCustomComponent",void 0);V([_({type:Boolean})],z.prototype,"withManualResources",void 0);V([_({type:Boolean})],z.prototype,"navigatorOnline",void 0);V([_({type:Boolean})],z.prototype,"forcedOffline",void 0);V([_({type:Object})],z.prototype,"apiProvider",void 0);V([_({type:Boolean})],z.prototype,"authenticationRequired",void 0);V([Be([])],z.prototype,"messageContexts",void 0);V([Be(void 0)],z.prototype,"session",void 0);V([G()],z.prototype,"localesConfiguration",void 0);V([G()],z.prototype,"availableContentLocales",void 0);var uo=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},LS=K(Symbol("withDateFormat"),function(r){class e extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}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=>ut.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return uo([_({type:Boolean})],e.prototype,"useLongDateFormat",void 0),uo([_({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),uo([q({store:R.name,selector:t=>{var n,a;return(a=(n=t.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),uo([q({store:R.name})],e.prototype,"uiLocale",void 0),e});var po=class extends re{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var fo=class extends re{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var dp="ft-user-assets",up={setAssetCount:(r,e)=>{let{userAssetType:t,count:n}=e.payload.assetCount;r.assetCounts.allAsset[t]=n},clearAssetCount:r=>{Object.values(he).forEach(e=>{r.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(r,e)=>{let t=e.payload.mapId;r.assetCounts.bookmarkByMap[t]=e.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,e)=>{let{assetType:t,mapId:n,asset:a}=e.payload;za(r,t,[...Wa(r,t),a]),Jc(r,t,1,n),Qc(r,a)},editAsset:(r,e)=>{let{assetType:t,asset:n}=e.payload;za(r,t,Wa(r,t).map(a=>a.id===n.id?n:a)),Qc(r,n)},removeAsset:(r,e)=>{let{assetType:t,mapId:n,assetId:a}=e.payload;za(r,t,Wa(r,t).filter(i=>i.id!==a)),Jc(r,t,-1,n)}},Xc={[he.SEARCHES]:"savedSearches",[he.BOOKMARKS]:"bookmarks",[he.BOOKS]:void 0,[he.COLLECTIONS]:void 0},Wa=(r,e)=>{var t;let n=Xc[e];return n?(t=r[n])!==null&&t!==void 0?t:[]:[]},za=(r,e,t)=>{let n=Xc[e];n&&(r[n]=t)},Jc=(r,e,t,n)=>{let a=r.assetCounts.allAsset[e];if(a!==void 0&&(r.assetCounts.allAsset[e]=Math.max(0,a+t),e===he.BOOKMARKS&&n)){let i=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,i+t)}},Qc=(r,e)=>{let t=r.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!t.includes(a)).map(a=>({title:a}));r.assetLabels.push(...n)},de=Me.get({name:dp,reducers:up,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(he).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ja=class{constructor(e=new po,t=new fo){this.assetCountsService=e,this.assetLabelsService=t,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new io,this.savedSearchesService=new co,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:t}=R.getState();ie((e=this.currentSession)===null||e===void 0?void 0:e.profile,t?.profile)||(this.currentSession=t,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),de.actions.clearAssetCount(),de.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),de.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),de.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();de.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();de.actions.assetLabels(e)}async loadAssetCount(e){let t=await this.assetCountsService.getUserAssetCount(e);t&&de.actions.setAssetCount({assetCount:t})}async loadBookmarkByMapId(e){let t=await this.assetCountsService.getUserBookmarkCountByMap(e);t&&de.actions.setBookmarkCountByMap({count:t.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let t=Object.keys(de.getState().assetCounts.bookmarkByMap).length!==0;e===he.BOOKMARKS&&t&&de.actions.clearBookmarkCountByMap(),de.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 t=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;de.actions.bookmarks(t)}}},Ga=new ja;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ga);Ne("ft-app-context")(z);var ho=class extends re{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,t,n){super(!1,t),this.converter=e,this._mapId=n,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(t=>this.converter.convertPaginatedToc(e,t)))),this.cache.register("ratingSummary",()=>{var e,t;return De((t=(e=R.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&t!==void 0?t:[],"RATING_USER")?this.withMapId(a=>this.fetchMapRating(a)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,t){return e+(t?"-destinationLanguage-"+t?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(t=>this.converter.convertPaginatedToc(this.mapId,t)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,t){return(await this.getEnrichedToc(t)).nodeByTocId[e]}getTocNodeNow(e,t){var n;return(n=this.getEnrichedTocNow(t))===null||n===void 0?void 0:n.nodeByTocId[e]}getTocNodeNowByUrl(e,t){var n,a;let i=this.getMapNow(t);return i?.prettyUrl==e||`${i?.id}/root`===e?(n=this.getEnrichedTocNow(t))===null||n===void 0?void 0:n.toc[0]:(a=this.getEnrichedTocNow(t))===null||a===void 0?void 0:a.nodeByUrl[e]}async getPage(e,t){let n=await this.getEnrichedToc(t);return n.pages[e-1]||n.pages[0]}async getPageByTocId(e,t){let n=await this.getEnrichedToc(t);return n.pageByTocId[e]||n.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,t){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,t),()=>this.fetchTranslatedTopicHTMLContent(e,t))}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,t){return this.cache.get("document-relatives-"+e+"-"+t.join("-"),()=>this.fetchRelativesForDocument(e,t))}getRelativesForTopicInMap(e,t,n){return this.cache.get("topic-relatives-"+[e,t,...n].join("-"),()=>this.fetchRelativesForTopicInMap(e,t,n))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,t,n){let a=this.getNavigationData(e,t,n),i=this.getReaderLinkPrefix()+(a.prettyUrl?a.prettyUrl:`${a.mapId}/${a.tocId}`),s=new URL(i,this.api.tenantBaseUrl);return a.page!=null&&s.searchParams.set("page",`${a.page}`),a.prettyUrlDuplicated&&s.searchParams.set("tocId",a.tocId),a.section!=null&&s.searchParams.set("section",a.section),s.href}getNavigationData(e,t,n,a){var i,s;e=e||"root";let l=this.getEnrichedTocNow(a),d=l?.pageByTocId[e],p=l?.nodeByTocId[e],h=p?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(i=p?.title)!==null&&i!==void 0?i:"",untranslatedTopicTitle:p?.untranslatedTitle,page:t&&d&&d.number!==t?t:void 0,prettyUrl:h?.replace(/^r\//,""),prettyUrlDuplicated:(s=l?.duplicatedPrettyUrls.has(h??""))!==null&&s!==void 0?s:!1,section:n}}async getAccurateNavigationData(e,t,n,a){return await this.getEnrichedToc(a),this.getNavigationData(e,t,n,a)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(t=>{var n;return t?{type:t.topics.type,rating:(n=t.topics)===null||n===void 0?void 0:n.ratings.find(a=>a.tocId===e)}:void 0})}rateMap(e,t){return this.makeRateMapRequest(e,t).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,t){return this.makeMapFeedbackRequest(e,t)}rateTopic(e,t,n){return this.makeRateTopicRequest(e,t,n).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=R.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,t,n){return this.makeTopicFeedbackRequest(e,t,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,t){let n=this.getTocNodeNow(e,t),a=[{tocId:n.tocId,title:n.title,untranslatedTitle:n.untranslatedTitle}],i=this.getTocNodeNow(n.parentTocId,t);for(;i;)a.unshift({tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}),i=this.getTocNodeNow(i.parentTocId,t);return a}isFeatureAccessible(e,{session:t}){var n;if(!this.isFeatureAvailable(e))return!1;switch(e){case Fe.FEEDBACK:return De(t??[],W.FEEDBACK_USER);case Fe.RATING:return De(t??[],W.RATING_USER);case Fe.PRINT:return De(t??[],W.PRINT_USER);case Fe.BOOKMARK:return!!t?.sessionAuthenticated;case Fe.COLLECTIONS:return De(t??[],W.COLLECTION_USER);case Fe.PERSONAL_BOOKS:return De(t??[],W.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var go=class r extends ho{static async build(e){return new r(new no,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,t){let n=await this.api.getMap(e,t);return this.fingerprint=n.fingerprint,n}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,t){return await this.getMap(t),this.api.getPages(e,this.fingerprint,t)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,t){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,t)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,t){let n={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:t}}],sort:[],facets:[]};return this.api.search(n)}fetchRelativesForTopicInMap(e,t,n){let a={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:n}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(a)}makeMapFeedbackRequest(e,t){return this.api.sendMapFeedback(this.mapId,e,t)}makeRateMapRequest(e,t){return this.api.rateMap(this.mapId,e,t)}makeRateTopicRequest(e,t,n){return this.api.rateTopic(this.mapId,e,t,n)}makeTopicFeedbackRequest(e,t,n){return this.api.sendTopicFeedback(this.mapId,e,t,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var mo=class r{static build(e,t){return new r(jc(e.trim()||"context"),t??go.build)}loaded(){return qo(()=>this._loaded)}constructor(e,t,n){this.store=e,this.clusteringHelperProvider=n,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new se(10),this.initService(t)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return Qt(()=>this.service)}async navigateToTopic(e,t,n){await this.loaded();let a=await this.awaitService(),i=await(n!=null?a.getPage(n,this.getTranslationSettings()):a.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(i);let s=this.resolveValidNonRootTocId(e,i);this.store.actions.scrollTarget({tocId:s,section:t}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(e,t){var n,a,i;let s=(n=e==="root"?void 0:e)!==null&&n!==void 0?n:t.rootTocId;return t.topics.includes(s)?s:(i=(a=t.topics[0])!==null&&a!==void 0?a:t.hiddenTopics[0])!==null&&i!==void 0?i:"root"}async navigateToPage(e){await this.loaded();let n=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(n)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var t,n,a,i,s;try{e&&this.setTranslationLoading(!0);let l=d=>{throw e&&this.setTranslationError(!0),d};await Promise.all([this.loadConfiguration(),(t=this.service)===null||t===void 0?void 0:t.getMap(e).then(d=>this.store.actions.map(d)).catch(l),(n=this.service)===null||n===void 0?void 0:n.getToc(e).then(d=>this.store.actions.toc(d)).catch(l),(a=this.service)===null||a===void 0?void 0:a.getPagesToc(e).then(d=>this.store.actions.pagesToc(d)).catch(l),(i=this.service)===null||i===void 0?void 0:i.getPaginationConfiguration().then(d=>this.store.actions.paginationConfiguration(d)).catch(l),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(e).then(d=>this.setTranslationError(d))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(l){this.errorHandler&&!(l instanceof Ie)&&this.errorHandler(l)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(t=>this.store.actions.configuration(t))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}fetchRelatives(){var e,t;let n=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(a=>{var i;return a.key==((i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativePivotMetadata)}).flatMap(a=>a.values);n!==void 0&&n.length>0?(t=this.service)===null||t===void 0||t.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,n).then(a=>{let i=a.results.flatMap(s=>s.entries);this.store.actions.relatives(i),this.updateClusteringHelper()}):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(ht.clusteringHelperCreated))}createClusteringHelper(){var e,t;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let n=this.store.getState().relatives;if(n){let a=n.find(s=>{var l;return((l=s.map)===null||l===void 0?void 0:l.mapId)==this.store.getState().mapId}),i=(t=(e=R.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&t!==void 0?t:[];return new or(n,a,this.metadataForSwitchToRelatives,i)}}async navigateToRelativeTopicIfFound(e){var t,n,a;await this.loaded();let i=await Qt(()=>{var p;return(p=this.store.getState().configuration)===null||p===void 0?void 0:p.relativeTopicPivotMetadata}),s=this.store.getState().mapId,d=await(await this.awaitService()).getRelativesForTopicInMap(s,i,[e]);if(!((a=(n=(t=d?.results)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.entries)===null||a===void 0)&&a[0]){let p=d.results[0].entries[0].topic.tocId;return await this.navigateToTopic(p),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let t=this.store.getState();return t.translation.profileId&&t.translation.destinationLanguage?{profileId:t.translation.profileId,destinationLanguage:t.translation.destinationLanguage.code,sourceLanguage:(e=t.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.setLinkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var t;let n=await((t=this.service)===null||t===void 0?void 0:t.getTopicRating(e));n&&this.store.actions.setTopicsRating({[e]:n})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,t,n){return this.service.getAccurateNavigationData(e,t?.number,n?.section,this.getTranslationSettings())}buildBreadcrumb(e){var t;return(t=this.service)===null||t===void 0?void 0:t.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var t,n;let a=this.getTranslationSettings();return a?(t=this.service)===null||t===void 0?void 0:t.getTranslatedTopicContent(e,a).then(i=>(i.isTranslationError&&this.setTranslationError(!0),i.content)):(n=this.service)===null||n===void 0?void 0:n.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(ht.mapAttachmentsUpdate))}};var el=$`
124
+ `}connectedCallback(){super.connectedCallback(),R.addEventListener(we.eventName,this.reloadConfiguration)}disconnectedCallback(){R.addEventListener(we.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var t,n,a,i,s,l,d;super.update(e),e.has("baseUrl")&&(R.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&R.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&R.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&R.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&R.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&R.actions.noCustom(this.noCustom),e.has("editorMode")&&R.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&R.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&R.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Zc.addContext(p)),e.has("openExternalDocumentInNewTab")&&R.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&R.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&R.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(R.actions.defaultLocales((t=this.localesConfiguration)===null||t===void 0?void 0:t.defaultLocales),R.actions.availableUiLocales((a=(n=this.localesConfiguration)===null||n===void 0?void 0:n.availableUiLocales)!==null&&a!==void 0?a:[]),R.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&R.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&R.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>Yc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};z.elementDefinitions={};z.styles=Kc;V([_()],z.prototype,"baseUrl",void 0);V([_()],z.prototype,"apiIntegrationIdentifier",void 0);V([_()],z.prototype,"apiIntegrationAppVersion",void 0);V([_()],z.prototype,"uiLocale",void 0);V([Be(null)],z.prototype,"availableUiLocales",void 0);V([Be(null)],z.prototype,"metadataConfiguration",void 0);V([_({type:Boolean})],z.prototype,"editorMode",void 0);V([_({type:Boolean})],z.prototype,"noCustom",void 0);V([_({type:Boolean})],z.prototype,"openExternalDocumentInNewTab",void 0);V([_({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],z.prototype,"noCustomComponent",void 0);V([_({type:Boolean})],z.prototype,"withManualResources",void 0);V([_({type:Boolean})],z.prototype,"navigatorOnline",void 0);V([_({type:Boolean})],z.prototype,"forcedOffline",void 0);V([_({type:Object})],z.prototype,"apiProvider",void 0);V([_({type:Boolean})],z.prototype,"authenticationRequired",void 0);V([Be([])],z.prototype,"messageContexts",void 0);V([Be(void 0)],z.prototype,"session",void 0);V([G()],z.prototype,"localesConfiguration",void 0);V([G()],z.prototype,"availableContentLocales",void 0);var uo=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},LS=K(Symbol("withDateFormat"),function(r){class e extends r{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}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=>ut.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return uo([_({type:Boolean})],e.prototype,"useLongDateFormat",void 0),uo([_({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),uo([q({store:R.name,selector:t=>{var n,a;return(a=(n=t.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),uo([q({store:R.name})],e.prototype,"uiLocale",void 0),e});var po=class extends re{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var fo=class extends re{constructor(){super(...arguments),this.CACHE_DURATION=3*60*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var dp="ft-user-assets",up={setAssetCount:(r,e)=>{let{userAssetType:t,count:n}=e.payload.assetCount;r.assetCounts.allAsset[t]=n},clearAssetCount:r=>{Object.values(he).forEach(e=>{r.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(r,e)=>{let t=e.payload.mapId;r.assetCounts.bookmarkByMap[t]=e.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,e)=>{let{assetType:t,mapId:n,asset:a}=e.payload;za(r,t,[...Wa(r,t),a]),Jc(r,t,1,n),Qc(r,a)},editAsset:(r,e)=>{let{assetType:t,asset:n}=e.payload;za(r,t,Wa(r,t).map(a=>a.id===n.id?n:a)),Qc(r,n)},removeAsset:(r,e)=>{let{assetType:t,mapId:n,assetId:a}=e.payload;za(r,t,Wa(r,t).filter(i=>i.id!==a)),Jc(r,t,-1,n)}},Xc={[he.SEARCHES]:"savedSearches",[he.BOOKMARKS]:"bookmarks",[he.BOOKS]:void 0,[he.COLLECTIONS]:void 0},Wa=(r,e)=>{var t;let n=Xc[e];return n?(t=r[n])!==null&&t!==void 0?t:[]:[]},za=(r,e,t)=>{let n=Xc[e];n&&(r[n]=t)},Jc=(r,e,t,n)=>{let a=r.assetCounts.allAsset[e];if(a!==void 0&&(r.assetCounts.allAsset[e]=Math.max(0,a+t),e===he.BOOKMARKS&&n)){let i=r.assetCounts.bookmarkByMap[n];r.assetCounts.bookmarkByMap[n]=Math.max(0,i+t)}},Qc=(r,e)=>{let t=r.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!t.includes(a)).map(a=>({title:a}));r.assetLabels.push(...n)},de=Me.get({name:dp,reducers:up,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(he).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ja=class{constructor(e=new po,t=new fo){this.assetCountsService=e,this.assetLabelsService=t,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new io,this.savedSearchesService=new co,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:t}=R.getState();ie((e=this.currentSession)===null||e===void 0?void 0:e.profile,t?.profile)||(this.currentSession=t,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),de.actions.clearAssetCount(),de.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),de.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),de.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();de.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();de.actions.assetLabels(e)}async loadAssetCount(e){let t=await this.assetCountsService.getUserAssetCount(e);t&&de.actions.setAssetCount({assetCount:t})}async loadBookmarkByMapId(e){let t=await this.assetCountsService.getUserBookmarkCountByMap(e);t&&de.actions.setBookmarkCountByMap({count:t.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let t=Object.keys(de.getState().assetCounts.bookmarkByMap).length!==0;e===he.BOOKMARKS&&t&&de.actions.clearBookmarkCountByMap(),de.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 t=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;de.actions.bookmarks(t)}}},Ga=new ja;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ga);Ne("ft-app-context")(z);var ho=class extends re{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,t,n){super(!1,t),this.converter=e,this._mapId=n,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(t=>this.converter.convertPaginatedToc(e,t)))),this.cache.register("ratingSummary",()=>{var e,t;return De((t=(e=R.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&t!==void 0?t:[],"RATING_USER")?this.withMapId(a=>this.fetchMapRating(a)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,t){return e+(t?"-destinationLanguage-"+t?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(t=>this.converter.convertPaginatedToc(this.mapId,t)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,t){return(await this.getEnrichedToc(t)).nodeByTocId[e]}getTocNodeNow(e,t){var n;return(n=this.getEnrichedTocNow(t))===null||n===void 0?void 0:n.nodeByTocId[e]}getTocNodeNowByUrl(e,t){var n,a;let i=this.getMapNow(t);return i?.prettyUrl==e||`${i?.id}/root`===e?(n=this.getEnrichedTocNow(t))===null||n===void 0?void 0:n.toc[0]:(a=this.getEnrichedTocNow(t))===null||a===void 0?void 0:a.nodeByUrl[e]}async getPage(e,t){let n=await this.getEnrichedToc(t);return n.pages[e-1]||n.pages[0]}async getPageByTocId(e,t){let n=await this.getEnrichedToc(t);return n.pageByTocId[e]||n.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,t){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,t),()=>this.fetchTranslatedTopicHTMLContent(e,t))}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,t){return this.cache.get("document-relatives-"+e+"-"+t.join("-"),()=>this.fetchRelativesForDocument(e,t))}getRelativesForTopicInMap(e,t,n){return this.cache.get("topic-relatives-"+[e,t,...n].join("-"),()=>this.fetchRelativesForTopicInMap(e,t,n))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,t,n){let a=this.getNavigationData(e,t,n),i=this.getReaderLinkPrefix()+(a.prettyUrl?a.prettyUrl:`${a.mapId}/${a.tocId}`),s=new URL(i,this.api.tenantBaseUrl);return a.page!=null&&s.searchParams.set("page",`${a.page}`),a.prettyUrlDuplicated&&s.searchParams.set("tocId",a.tocId),a.section!=null&&s.searchParams.set("section",a.section),s.href}getNavigationData(e,t,n,a){var i,s;e=e||"root";let l=this.getEnrichedTocNow(a),d=l?.pageByTocId[e],p=l?.nodeByTocId[e],h=p?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(i=p?.title)!==null&&i!==void 0?i:"",untranslatedTopicTitle:p?.untranslatedTitle,page:t&&d&&d.number!==t?t:void 0,prettyUrl:h?.replace(/^r\//,""),prettyUrlDuplicated:(s=l?.duplicatedPrettyUrls.has(h??""))!==null&&s!==void 0?s:!1,section:n}}async getAccurateNavigationData(e,t,n,a){return await this.getEnrichedToc(a),this.getNavigationData(e,t,n,a)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(t=>{var n;return t?{type:t.topics.type,rating:(n=t.topics)===null||n===void 0?void 0:n.ratings.find(a=>a.tocId===e)}:void 0})}rateMap(e,t){return this.makeRateMapRequest(e,t).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,t){return this.makeMapFeedbackRequest(e,t)}rateTopic(e,t,n){return this.makeRateTopicRequest(e,t,n).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=R.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,t,n){return this.makeTopicFeedbackRequest(e,t,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,t){let n=this.getTocNodeNow(e,t),a=[{tocId:n.tocId,title:n.title,untranslatedTitle:n.untranslatedTitle}],i=this.getTocNodeNow(n.parentTocId,t);for(;i;)a.unshift({tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}),i=this.getTocNodeNow(i.parentTocId,t);return a}isFeatureAccessible(e,{session:t}){var n;if(!this.isFeatureAvailable(e))return!1;switch(e){case Fe.FEEDBACK:return De(t??[],W.FEEDBACK_USER);case Fe.RATING:return De(t??[],W.RATING_USER);case Fe.PRINT:return De(t??[],W.PRINT_USER);case Fe.BOOKMARK:return!!t?.sessionAuthenticated;case Fe.COLLECTIONS:return De(t??[],W.COLLECTION_USER);case Fe.PERSONAL_BOOKS:return De(t??[],W.PERSONAL_BOOK_USER)&&!(!((n=this.getMapNow())===null||n===void 0)&&n.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var go=class r extends ho{static async build(e){return new r(new no,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,t){let n=await this.api.getMap(e,t);return this.fingerprint=n.fingerprint,n}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,t){return await this.getMap(t),this.api.getPages(e,this.fingerprint,t)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,t){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,t)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,t){let n={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:t}}],sort:[],facets:[]};return this.api.search(n)}fetchRelativesForTopicInMap(e,t,n){let a={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:n}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(a)}makeMapFeedbackRequest(e,t){return this.api.sendMapFeedback(this.mapId,e,t)}makeRateMapRequest(e,t){return this.api.rateMap(this.mapId,e,t)}makeRateTopicRequest(e,t,n){return this.api.rateTopic(this.mapId,e,t,n)}makeTopicFeedbackRequest(e,t,n){return this.api.sendTopicFeedback(this.mapId,e,t,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var mo=class r{static build(e,t){return new r(Gc(e.trim()||"context"),t??go.build)}loaded(){return qo(()=>this._loaded)}constructor(e,t,n){this.store=e,this.clusteringHelperProvider=n,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new se(10),this.initService(t)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return Qt(()=>this.service)}async navigateToTopic(e,t,n){await this.loaded();let a=await this.awaitService(),i=await(n!=null?a.getPage(n,this.getTranslationSettings()):a.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(i);let s=this.resolveValidNonRootTocId(e,i);this.store.actions.scrollTarget({tocId:s,section:t}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(e,t){var n,a,i;let s=(n=e==="root"?void 0:e)!==null&&n!==void 0?n:t.rootTocId;return t.topics.includes(s)?s:(i=(a=t.topics[0])!==null&&a!==void 0?a:t.hiddenTopics[0])!==null&&i!==void 0?i:"root"}async navigateToPage(e){await this.loaded();let n=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(n)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var t,n,a,i,s;try{e&&this.setTranslationLoading(!0);let l=d=>{throw e&&this.setTranslationError(!0),d};await Promise.all([this.loadConfiguration(),(t=this.service)===null||t===void 0?void 0:t.getMap(e).then(d=>this.store.actions.map(d)).catch(l),(n=this.service)===null||n===void 0?void 0:n.getToc(e).then(d=>this.store.actions.toc(d)).catch(l),(a=this.service)===null||a===void 0?void 0:a.getPagesToc(e).then(d=>this.store.actions.pagesToc(d)).catch(l),(i=this.service)===null||i===void 0?void 0:i.getPaginationConfiguration().then(d=>this.store.actions.paginationConfiguration(d)).catch(l),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(e).then(d=>this.setTranslationError(d))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(l){this.errorHandler&&!(l instanceof Ie)&&this.errorHandler(l)}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(t=>this.store.actions.configuration(t))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}fetchRelatives(){var e,t;let n=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(a=>{var i;return a.key==((i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativePivotMetadata)}).flatMap(a=>a.values);n!==void 0&&n.length>0?(t=this.service)===null||t===void 0||t.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,n).then(a=>{let i=a.results.flatMap(s=>s.entries);this.store.actions.relatives(i),this.updateClusteringHelper()}):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(ht.clusteringHelperCreated))}createClusteringHelper(){var e,t;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let n=this.store.getState().relatives;if(n){let a=n.find(s=>{var l;return((l=s.map)===null||l===void 0?void 0:l.mapId)==this.store.getState().mapId}),i=(t=(e=R.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&t!==void 0?t:[];return new or(n,a,this.metadataForSwitchToRelatives,i)}}async navigateToRelativeTopicIfFound(e){var t,n,a;await this.loaded();let i=await Qt(()=>{var p;return(p=this.store.getState().configuration)===null||p===void 0?void 0:p.relativeTopicPivotMetadata}),s=this.store.getState().mapId,d=await(await this.awaitService()).getRelativesForTopicInMap(s,i,[e]);if(!((a=(n=(t=d?.results)===null||t===void 0?void 0:t[0])===null||n===void 0?void 0:n.entries)===null||a===void 0)&&a[0]){let p=d.results[0].entries[0].topic.tocId;return await this.navigateToTopic(p),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let t=this.store.getState();return t.translation.profileId&&t.translation.destinationLanguage?{profileId:t.translation.profileId,destinationLanguage:t.translation.destinationLanguage.code,sourceLanguage:(e=t.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.setLinkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var t;let n=await((t=this.service)===null||t===void 0?void 0:t.getTopicRating(e));n&&this.store.actions.setTopicsRating({[e]:n})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}getAccurateNavigationData(e,t,n){return this.service.getAccurateNavigationData(e,t?.number,n?.section,this.getTranslationSettings())}buildBreadcrumb(e){var t;return(t=this.service)===null||t===void 0?void 0:t.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var t,n;let a=this.getTranslationSettings();return a?(t=this.service)===null||t===void 0?void 0:t.getTranslatedTopicContent(e,a).then(i=>(i.isTranslationError&&this.setTranslationError(!0),i.content)):(n=this.service)===null||n===void 0?void 0:n.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(ht.mapAttachmentsUpdate))}};var el=$`
125
125
  `;var yo=class extends CustomEvent{constructor(e,t){super("ft-reader-map-loaded",{detail:{map:e,toc:t}})}},bo=class extends CustomEvent{constructor(e,t){super("ft-reader-visible-topics-change",{detail:{visibleTopics:t}})}},vo=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},xo=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},So=class extends Event{constructor(){super("ft-reader-map-not-found")}},Oo=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Eo=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Co=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var wo=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}};var ae=function(r,e,t,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);return a>3&&i&&Object.defineProperty(e,t,i),i},pp=r=>e=>+(e??"NaN")>0?+e:r,Z=class extends ct{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new se(5),this.navigationDebouncer=new se(10),this.mapLoadedEventDebouncer=new se(50),this.addStore(R)}render(){return te`
126
126
  ${this.importStyleIfNeeded()}
127
127
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
@@ -145,7 +145,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
145
145
  </${ka(s)}>
146
146
  </div>`}
147
147
  </section>
148
- `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.titleContainer&&fr(this.titleContainer,this.disableContextInteractions?"":this.searchInDocumentQuery,{attributes:{part:"kwicmatch"}}),this.processFocusCommand()}processFocusCommand(){var e,t;((e=this.stateManager)===null||e===void 0?void 0:e.store.commands.consume(`focus-topic-${(t=this.tocNode)===null||t===void 0?void 0:t.tocId}`))&&(this.elementToFocus={selector:".title"})}getTopicLanguage(){var e;return this.translationDestinationLanguage&&!this.translationError?this.translationDestinationLanguage.code:(e=this.map)===null||e===void 0?void 0:e.lang}onVisibleTopicChange(){this.processFocusCommand()}};ue.elementDefinitions={"ft-skeleton":qe};ue.styles=[Hc,Mn];yt([q()],ue.prototype,"map",void 0);yt([q({selector:(r,e)=>e.disableContextInteractions?"":r.searchInDocumentQuery})],ue.prototype,"searchInDocumentQuery",void 0);yt([q({selector:r=>r.translation.destinationLanguage})],ue.prototype,"translationDestinationLanguage",void 0);yt([q({selector:r=>r.translation.isLoading})],ue.prototype,"translationLoading",void 0);yt([q({selector:r=>r.translation.isError})],ue.prototype,"translationError",void 0);yt([$o("section.title")],ue.prototype,"titleContainer",void 0);yt([Bn({eventName:ht.visibleTopicChange})],ue.prototype,"onVisibleTopicChange",null);Ne("ft-reader-topic-title")(ue);})();
148
+ `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.titleContainer&&fr(this.titleContainer,this.disableContextInteractions?"":this.searchInDocumentQuery,{attributes:{part:"kwicmatch"}}),this.processFocusCommand()}processFocusCommand(){var e,t;((e=this.stateManager)===null||e===void 0?void 0:e.store.commands.consume(`focus-topic-${(t=this.tocNode)===null||t===void 0?void 0:t.tocId}`))&&(this.elementToFocus={selector:".title"})}getTopicLanguage(){var e;return this.translationDestinationLanguage&&!this.translationError?this.translationDestinationLanguage.code:(e=this.map)===null||e===void 0?void 0:e.lang}onVisibleTopicChange(){this.processFocusCommand()}};ue.elementDefinitions={"ft-skeleton":qe};ue.styles=[$c,Mn];yt([q()],ue.prototype,"map",void 0);yt([q({selector:(r,e)=>e.disableContextInteractions?"":r.searchInDocumentQuery})],ue.prototype,"searchInDocumentQuery",void 0);yt([q({selector:r=>r.translation.destinationLanguage})],ue.prototype,"translationDestinationLanguage",void 0);yt([q({selector:r=>r.translation.isLoading})],ue.prototype,"translationLoading",void 0);yt([q({selector:r=>r.translation.isError})],ue.prototype,"translationError",void 0);yt([$o("section.title")],ue.prototype,"titleContainer",void 0);yt([Bn({eventName:ht.visibleTopicChange})],ue.prototype,"onVisibleTopicChange",null);Ne("ft-reader-topic-title")(ue);})();
149
149
  /*! Bundled license information:
150
150
 
151
151
  @webcomponents/scoped-custom-element-registry/src/scoped-custom-element-registry.js: