@fluid-topics/ft-reader-search-in-document 2.0.9 → 2.0.11

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:i.extend("--ftds-con
45
45
  display: none;
46
46
  }
47
47
  `});var Ph={};var Gd=u(()=>{"use strict"});var Vd={};oe(Vd,{ParametrizedLabelResolver:()=>ko});var ko,Wd=u(()=>{"use strict";ko=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,n;e=this.resolvePluralKey(e,r);let a=(n=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&n!==void 0?n:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,n)=>e=e.replace(new RegExp(`\\{${n}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let n=`${String(e)}[\\=${o}]`;if(n in this.labels||n in this.defaultLabels)return n}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=n=>r?.includes("date")?e.toLocaleDateString(n):r?.includes("time")?e.toLocaleTimeString(n):e.toLocaleString(n);try{return o(document.documentElement.lang)}catch{return o()}}}});var b5,Te,v5,Ih=u(()=>{"use strict";kt();J();b5=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Te=t=>{let e=t??{};return(r,o)=>{var n;let a={hasChanged:Vt,attribute:!1,...e};h(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=e.selector)!==null&&n!==void 0?n:l=>l[o],store:e.store})}},v5=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)}});var pa,jd=u(()=>{"use strict";pa=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}}});function on(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ms=u(()=>{"use strict"});var fa,To,bi,$h,Er,zh=u(()=>{"use strict";ca();Ms();kt();fa=Symbol("internalReduxEventsUnsubscribers"),To=Symbol("internalStoresUnsubscribers"),bi=Symbol("internalStores"),$h=We(Symbol("withRedux"),function(t){var e,r,o;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=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[bi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[bi].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[bi].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[bi].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[bi].delete(l)}setupStores(){this.unsubscribeFromStores(),this[bi].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[To].has(s.store):this[To].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[To].set(s,l.subscribe(()=>this.updateFromStores())),this[fa].set(s,[]),on(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=b=>this[m](b);l.addEventListener(p.eventName,g),this[fa].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[To].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[To].has(s)&&this[To].get(s)(),this[To].delete(s),(l=this[fa].get(s))===null||l===void 0||l.forEach(d=>d()),this[fa].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=To,r=bi,o=fa,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Er=class extends $h(W){}});function sr(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function co(t){return!!t&&!!t[Ge]}function Lr(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===R5}(t)||Array.isArray(t)||!!t[Vh]||!!(!((e=t.constructor)===null||e===void 0)&&e[Vh])||tu(t)||ru(t))}function vi(t,e,r){r===void 0&&(r=!1),sn(t)===0?(r?Object.keys:an)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,n){return e(n,o,t)})}function sn(t){var e=t[Ge];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:tu(t)?2:ru(t)?3:0}function nn(t,e){return sn(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function x5(t,e){return sn(t)===2?t.get(e):t[e]}function Wh(t,e,r){var o=sn(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function jh(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function tu(t){return L5&&t instanceof Map}function ru(t){return A5&&t instanceof Set}function Mo(t){return t.o||t.t}function ou(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Zh(t);delete e[Ge];for(var r=an(e),o=0;o<r.length;o++){var n=r[o],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function iu(t,e){return e===void 0&&(e=!1),nu(t)||co(t)||!Lr(t)||(sn(t)>1&&(t.set=t.add=t.clear=t.delete=S5),Object.freeze(t),e&&vi(t,function(r,o){return iu(o,!0)},!0)),t}function S5(){sr(2)}function nu(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Br(t){var e=eu[t];return e||sr(18,t),e}function C5(t,e){eu[t]||(eu[t]=e)}function Xd(){return ma}function Kd(t,e){e&&(Br("Patches"),t.u=[],t.s=[],t.v=e)}function Ns(t){Qd(t),t.p.forEach(O5),t.p=null}function Qd(t){t===ma&&(ma=t.l)}function Dh(t){return ma={p:[],l:ma,h:t,m:!0,_:0}}function O5(t){var e=t[Ge];e.i===0||e.i===1?e.j():e.g=!0}function qd(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Br("ES5").S(e,t,o),o?(r[Ge].P&&(Ns(e),sr(4)),Lr(t)&&(t=Ps(e,t),e.l||Is(e,t)),e.u&&Br("Patches").M(r[Ge].t,t,e.u,e.s)):t=Ps(e,r,[]),Ns(e),e.u&&e.v(e.u,e.s),t!==qh?t:void 0}function Ps(t,e,r){if(nu(e))return e;var o=e[Ge];if(!o)return vi(e,function(l,d){return Bh(t,o,e,l,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return Is(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=ou(o.k):o.o,a=n,s=!1;o.i===3&&(a=new Set(n),n.clear(),s=!0),vi(a,function(l,d){return Bh(t,o,n,l,d,r,s)}),Is(t,n,!1),r&&t.u&&Br("Patches").N(o,r,t.u,t.s)}return o.o}function Bh(t,e,r,o,n,a,s){if(co(n)){var l=Ps(t,n,a&&e&&e.i!==3&&!nn(e.R,o)?a.concat(o):void 0);if(Wh(r,o,l),!co(l))return;t.m=!1}else s&&r.add(n);if(Lr(n)&&!nu(n)){if(!t.h.D&&t._<1)return;Ps(t,n),e&&e.A.l||Is(t,n)}}function Is(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&iu(e,r)}function Zd(t,e){var r=t[Ge];return(r?Mo(r):t)[e]}function Fh(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function No(t){t.P||(t.P=!0,t.l&&No(t.l))}function Yd(t){t.o||(t.o=ou(t.t))}function Jd(t,e,r){var o=tu(e)?Br("MapSet").F(e,r):ru(e)?Br("MapSet").T(e,r):t.O?function(n,a){var s=Array.isArray(n),l={i:s?1:0,A:a?a.A:Xd(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},d=l,p=ga;s&&(d=[l],p=ha);var m=Proxy.revocable(d,p),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b}(e,r):Br("ES5").J(e,r);return(r?r.A:Xd()).p.push(o),o}function E5(t){return co(t)||sr(22,t),function e(r){if(!Lr(r))return r;var o,n=r[Ge],a=sn(r);if(n){if(!n.P&&(n.i<4||!Br("ES5").K(n)))return n.t;n.I=!0,o=Uh(r,a),n.I=!1}else o=Uh(r,a);return vi(o,function(s,l){n&&x5(n.t,s)===l||Wh(o,s,e(l))}),a===3?new Set(o):o}(t)}function Uh(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ou(t)}function Kh(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[Ge];return ga.get(p,s)},set:function(p){var m=this[Ge];ga.set(m,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][Ge];if(!d.P)switch(d.i){case 5:o(d)&&No(d);break;case 4:r(d)&&No(d)}}}function r(s){for(var l=s.t,d=s.k,p=an(d),m=p.length-1;m>=0;m--){var g=p[m];if(g!==Ge){var b=l[g];if(b===void 0&&!nn(l,g))return!0;var E=d[g],L=E&&E[Ge];if(L?L.t!==b:!jh(E,b))return!0}}var N=!!l[Ge];return p.length!==an(l).length+(N?0:1)}function o(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 n(s){s.g&&sr(3,JSON.stringify(Mo(s)))}var a={};C5("ES5",{J:function(s,l){var d=Array.isArray(s),p=function(g,b){if(g){for(var E=Array(b.length),L=0;L<b.length;L++)Object.defineProperty(E,""+L,t(L,!0));return E}var N=Zh(b);delete N[Ge];for(var z=an(N),B=0;B<z.length;B++){var F=z[B];N[F]=t(F,g||!!N[F].enumerable)}return Object.create(Object.getPrototypeOf(b),N)}(d,s),m={i:d?5:4,A:l?l.A:Xd(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Ge,{value:m,writable:!0}),p},S:function(s,l,d){d?co(l)&&l[Ge].A===s&&e(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var g=m[Ge];if(g){var b=g.t,E=g.k,L=g.R,N=g.i;if(N===4)vi(E,function(A){A!==Ge&&(b[A]!==void 0||nn(b,A)?L[A]||p(E[A]):(L[A]=!0,No(g)))}),vi(b,function(A){E[A]!==void 0||nn(E,A)||(L[A]=!1,No(g))});else if(N===5){if(o(g)&&(No(g),L.length=!0),E.length<b.length)for(var z=E.length;z<b.length;z++)L[z]=!1;else for(var B=b.length;B<E.length;B++)L[B]=!0;for(var F=Math.min(E.length,b.length),k=0;k<F;k++)E.hasOwnProperty(k)||(L[k]=!0),L[k]===void 0&&p(E[k])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Hh,ma,au,L5,A5,Gh,qh,Vh,Ge,R5,an,Zh,eu,ga,ha,w5,jt,_5,hT,mT,gT,yT,bT,vT,$s,zs=u(()=>{au=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",L5=typeof Map<"u",A5=typeof Set<"u",Gh=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",qh=au?Symbol.for("immer-nothing"):((Hh={})["immer-nothing"]=!0,Hh),Vh=au?Symbol.for("immer-draftable"):"__$immer_draftable",Ge=au?Symbol.for("immer-state"):"__$immer_state",R5=""+Object.prototype.constructor,an=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Zh=Object.getOwnPropertyDescriptors||function(t){var e={};return an(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},eu={},ga={get:function(t,e){if(e===Ge)return t;var r=Mo(t);if(!nn(r,e))return function(n,a,s){var l,d=Fh(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(n.k):void 0}(t,r,e);var o=r[e];return t.I||!Lr(o)?o:o===Zd(t.t,e)?(Yd(t),t.o[e]=Jd(t.A.h,o,t)):o},has:function(t,e){return e in Mo(t)},ownKeys:function(t){return Reflect.ownKeys(Mo(t))},set:function(t,e,r){var o=Fh(Mo(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var n=Zd(Mo(t),e),a=n?.[Ge];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(jh(r,n)&&(r!==void 0||nn(t.t,e)))return!0;Yd(t),No(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Zd(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Yd(t),No(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Mo(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){sr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){sr(12)}},ha={};vi(ga,function(t,e){ha[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ha.deleteProperty=function(t,e){return ha.set.call(this,t,e,void 0)},ha.set=function(t,e,r){return ga.set.call(this,t[0],e,r,t[0])};w5=function(){function t(r){var o=this;this.O=Gh,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var l=a;a=n;var d=o;return function(N){var z=this;N===void 0&&(N=l);for(var B=arguments.length,F=Array(B>1?B-1:0),k=1;k<B;k++)F[k-1]=arguments[k];return d.produce(N,function(A){var P;return(P=a).call.apply(P,[z,A].concat(F))})}}var p;if(typeof a!="function"&&sr(6),s!==void 0&&typeof s!="function"&&sr(7),Lr(n)){var m=Dh(o),g=Jd(o,n,void 0),b=!0;try{p=a(g),b=!1}finally{b?Ns(m):Qd(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(N){return Kd(m,s),qd(N,m)},function(N){throw Ns(m),N}):(Kd(m,s),qd(p,m))}if(!n||typeof n!="object"){if((p=a(n))===void 0&&(p=n),p===qh&&(p=void 0),o.D&&iu(p,!0),s){var E=[],L=[];Br("Patches").M(n,p,E,L),s(E,L)}return p}sr(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return o.produceWithPatches(p,function(E){return n.apply(void 0,[E].concat(g))})};var s,l,d=o.produce(n,a,function(p,m){s=p,l=m});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,s,l]}):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Lr(r)||sr(8),co(r)&&(r=E5(r));var o=Dh(this),n=Jd(this,r,void 0);return n[Ge].C=!0,Qd(o),n},e.finishDraft=function(r,o){var n=r&&r[Ge],a=n.A;return Kd(a,o),qd(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Gh&&sr(20),this.O=r},e.applyPatches=function(r,o){var n;for(n=o.length-1;n>=0;n--){var a=o[n];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}n>-1&&(o=o.slice(n+1));var s=Br("Patches").$;return co(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),jt=new w5,_5=jt.produce,hT=jt.produceWithPatches.bind(jt),mT=jt.setAutoFreeze.bind(jt),gT=jt.setUseProxies.bind(jt),yT=jt.applyPatches.bind(jt),bT=jt.createDraft.bind(jt),vT=jt.finishDraft.bind(jt),$s=_5});function xi(t){"@babel/helpers - typeof";return xi=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},xi(t)}var su=u(()=>{});function Yh(t,e){if(xi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(xi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xh=u(()=>{su()});function Qh(t){var e=Yh(t,"string");return xi(e)=="symbol"?e:e+""}var Jh=u(()=>{su();Xh()});function e4(t,e,r){return(e=Qh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var t4=u(()=>{Jh()});function r4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function lu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?r4(Object(r),!0).forEach(function(o){e4(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):r4(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}var o4=u(()=>{t4()});function Ot(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}function k5(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function du(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ot(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ot(1));return r(du)(t,e)}if(typeof t!="function")throw new Error(Ot(2));var n=t,a=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function m(){if(d)throw new Error(Ot(3));return a}function g(N){if(typeof N!="function")throw new Error(Ot(4));if(d)throw new Error(Ot(5));var z=!0;return p(),l.push(N),function(){if(z){if(d)throw new Error(Ot(6));z=!1,p();var F=l.indexOf(N);l.splice(F,1),s=null}}}function b(N){if(!k5(N))throw new Error(Ot(7));if(typeof N.type>"u")throw new Error(Ot(8));if(d)throw new Error(Ot(9));try{d=!0,a=n(a,N)}finally{d=!1}for(var z=s=l,B=0;B<z.length;B++){var F=z[B];F()}return N}function E(N){if(typeof N!="function")throw new Error(Ot(10));n=N,b({type:Ds.REPLACE})}function L(){var N,z=g;return N={subscribe:function(F){if(typeof F!="object"||F===null)throw new Error(Ot(11));function k(){F.next&&F.next(m())}k();var A=z(k);return{unsubscribe:A}}},N[i4]=function(){return this},N}return b({type:Ds.INIT}),o={dispatch:b,subscribe:g,getState:m,replaceReducer:E},o[i4]=L,o}function T5(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Ds.INIT});if(typeof o>"u")throw new Error(Ot(12));if(typeof r(void 0,{type:Ds.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ot(13))})}function n4(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var n=e[o];typeof t[n]=="function"&&(r[n]=t[n])}var a=Object.keys(r),s,l;try{T5(r)}catch(d){l=d}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var b=!1,E={},L=0;L<a.length;L++){var N=a[L],z=r[N],B=p[N],F=z(B,m);if(typeof F>"u"){var k=m&&m.type;throw new Error(Ot(14))}E[N]=F,b=b||F!==B}return b=b||a.length!==Object.keys(p).length,b?E:p}}function ln(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function a4(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var n=o.apply(void 0,arguments),a=function(){throw new Error(Ot(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=ln.apply(void 0,l)(n.dispatch),lu(lu({},n),{},{dispatch:a})}}}var i4,cu,Ds,Bs=u(()=>{o4();i4=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cu=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ds={INIT:"@@redux/INIT"+cu(),REPLACE:"@@redux/REPLACE"+cu(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cu()}}});function s4(t){var e=function(o){var n=o.dispatch,a=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,a,t):s(l)}}};return e}var l4,uu,c4=u(()=>{l4=s4();l4.withExtraArgument=s4;uu=l4});function F5(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function mu(t){return Lr(t)?$s(t,function(){}):t}function G5(t){return typeof t=="boolean"}function V5(){return function(e){return W5(e)}}function W5(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,n=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,l=new U5;if(r&&(G5(r)?l.push(uu):l.push(uu.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var p}return l}function m4(t){var e=V5(),r=t||{},o=r.reducer,n=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,p=r.preloadedState,m=p===void 0?void 0:p,g=r.enhancers,b=g===void 0?void 0:g,E;if(typeof n=="function")E=n;else if(F5(n))E=n4(n);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 L=s;if(typeof L=="function"&&(L=L(e),!fu&&!Array.isArray(L)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!fu&&L.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var N=a4.apply(void 0,L),z=ln;d&&(z=B5(Po({trace:!fu},typeof d=="object"&&d)));var B=new H5(N),F=B;Array.isArray(b)?F=cn([N],b):typeof b=="function"&&(F=b(B));var k=z.apply(void 0,F);return du(E,m,k)}function Io(t,e){function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return Po(Po({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function g4(t){var e={},r=[],o,n={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,n},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return o=a,n}};return t(n),[e,r,o]}function j5(t){return typeof t=="function"}function K5(t,e,r,o){r===void 0&&(r=[]);var n=typeof e=="function"?g4(e):[e,r,o],a=n[0],s=n[1],l=n[2],d;if(j5(t))d=function(){return mu(t())};else{var p=mu(t);d=function(){return p}}function m(g,b){g===void 0&&(g=d());var E=cn([a[b.type]],s.filter(function(L){var N=L.matcher;return N(b)}).map(function(L){var N=L.reducer;return N}));return E.filter(function(L){return!!L}).length===0&&(E=[l]),E.reduce(function(L,N){if(N)if(co(L)){var z=L,B=N(z,b);return B===void 0?L:B}else{if(Lr(L))return $s(L,function(F){return N(F,b)});var B=N(L,b);if(B===void 0){if(L===null)return L;throw Error("A case reducer on a non-draftable value must not return undefined")}return B}return L},g)}return m.getInitialState=d,m}function q5(t,e){return t+"/"+e}function y4(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:mu(t.initialState),o=t.reducers||{},n=Object.keys(o),a={},s={},l={};n.forEach(function(m){var g=o[m],b=q5(e,m),E,L;"reducer"in g?(E=g.reducer,L=g.prepare):E=g,a[m]=E,s[b]=E,l[m]=L?Io(b,L):Io(b)});function d(){var m=typeof t.extraReducers=="function"?g4(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,E=m[1],L=E===void 0?[]:E,N=m[2],z=N===void 0?void 0:N,B=Po(Po({},b),s);return K5(r,function(F){for(var k in B)F.addCase(k,B[k]);for(var A=0,P=L;A<P.length;A++){var K=P[A];F.addMatcher(K.matcher,K.reducer)}z&&F.addDefaultCase(z)})}var p;return{name:e,reducer:function(m,g){return p||(p=d()),p(m,g)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}function J5(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function e7(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var h4,M5,cn,N5,P5,I5,d4,$5,z5,u4,Po,pu,D5,B5,zT,U5,H5,fu,Z5,Y5,X5,hu,p4,Q5,UT,b4,v4,x4,HT,GT,VT,WT,gu,jT,KT,qT,f4,ZT,t7,YT,S4=u(()=>{zs();Bs();Bs();Bs();c4();zs();zs();h4=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),M5=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,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(m){return d([p,m])}}function d(p){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=p[0]&2?n.return:p[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;switch(n=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,n=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(m){p=[6,m],n=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},cn=function(t,e){for(var r=0,o=e.length,n=t.length;r<o;r++,n++)t[n]=e[r];return t},N5=Object.defineProperty,P5=Object.defineProperties,I5=Object.getOwnPropertyDescriptors,d4=Object.getOwnPropertySymbols,$5=Object.prototype.hasOwnProperty,z5=Object.prototype.propertyIsEnumerable,u4=function(t,e,r){return e in t?N5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Po=function(t,e){for(var r in e||(e={}))$5.call(e,r)&&u4(t,r,e[r]);if(d4)for(var o=0,n=d4(e);o<n.length;o++){var r=n[o];z5.call(e,r)&&u4(t,r,e[r])}return t},pu=function(t,e){return P5(t,I5(e))},D5=function(t,e,r){return new Promise(function(o,n){var a=function(d){try{l(r.next(d))}catch(p){n(p)}},s=function(d){try{l(r.throw(d))}catch(p){n(p)}},l=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})},B5=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ln:ln.apply(null,arguments)},zT=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};U5=function(t){h4(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,cn([void 0],r[0].concat(this)))):new(e.bind.apply(e,cn([void 0],r.concat(this))))},e}(Array),H5=function(t){h4(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,cn([void 0],r[0].concat(this)))):new(e.bind.apply(e,cn([void 0],r.concat(this))))},e}(Array);fu=!0;Z5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Y5=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Z5[Math.random()*64|0];return e},X5=["name","message","stack","code"],hu=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),p4=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Q5=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=X5;r<o.length;r++){var n=o[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},UT=function(){function t(e,r,o){var n=Io(e+"/fulfilled",function(m,g,b,E){return{payload:m,meta:pu(Po({},E||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=Io(e+"/pending",function(m,g,b){return{payload:void 0,meta:pu(Po({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Io(e+"/rejected",function(m,g,b,E,L){return{payload:E,error:(o&&o.serializeError||Q5)(m||"Rejected"),meta:pu(Po({},L||{}),{arg:b,requestId:g,rejectedWithValue:!!E,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(g,b,E){var L=o?.idGenerator?o.idGenerator(m):Y5(),N=new d,z,B=!1;function F(A){z=A,N.abort()}var k=function(){return D5(this,null,function(){var A,P,K,te,ye,me,X;return M5(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,,5]),te=(A=o?.condition)==null?void 0:A.call(o,m,{getState:b,extra:E}),e7(te)?[4,te]:[3,2];case 1:te=C.sent(),C.label=2;case 2:if(te===!1||N.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return B=!0,ye=new Promise(function(M,Z){return N.signal.addEventListener("abort",function(){return Z({name:"AbortError",message:z||"Aborted"})})}),g(a(L,m,(P=o?.getPendingMeta)==null?void 0:P.call(o,{requestId:L,arg:m},{getState:b,extra:E}))),[4,Promise.race([ye,Promise.resolve(r(m,{dispatch:g,getState:b,extra:E,requestId:L,signal:N.signal,abort:F,rejectWithValue:function(M,Z){return new hu(M,Z)},fulfillWithValue:function(M,Z){return new p4(M,Z)}})).then(function(M){if(M instanceof hu)throw M;return M instanceof p4?n(M.payload,L,m,M.meta):n(M,L,m)})])];case 3:return K=C.sent(),[3,5];case 4:return me=C.sent(),K=me instanceof hu?s(null,L,m,me.payload,me.meta):s(me,L,m),[3,5];case 5:return X=o&&!o.dispatchConditionRejection&&s.match(K)&&K.meta.condition,X||g(K),[2,K]}})})}();return Object.assign(k,{abort:F,requestId:L,arg:m,unwrap:function(){return k.then(J5)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();b4="listener",v4="completed",x4="cancelled",HT="task-"+x4,GT="task-"+v4,VT=b4+"-"+x4,WT=b4+"-"+v4,gu="listenerMiddleware",jT=Io(gu+"/add"),KT=Io(gu+"/removeAll"),qT=Io(gu+"/remove"),ZT=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(f4||(f4=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},t7=function(t){return function(e){setTimeout(e,t)}},YT=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:t7(10);Kh()});function r7(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))on(e)&&e.clear()}var uo,C4=u(()=>{"use strict";S4();Ms();jd();Yi();kt();window.ftReduxStores||(window.ftReduxStores={});uo=class t extends so{static get(e){var r;let o=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(on(a))return a;if(n==null)return;let s=y4({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),l=m4({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=si(s.getInitialState());for(let g of p.keeping)m[g]=(d??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[n.name]=new t(s,l,n.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new pa;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,p=a[d];return p?(...m)=>{let g=p(...m.map(n));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[d]:n(m)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}});function dn(t,e,r){return new Fs(t,e,r).watch()}var Fs,O4=u(()=>{"use strict";kt();Fs=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);Vt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}}});var ya,E4=u(()=>{"use strict";ya=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}}});var yu={};oe(yu,{FtCommandQueue:()=>pa,FtLitElementRedux:()=>Er,FtReduxStore:()=>uo,FtStateManager:()=>ya,ReduxWatcher:()=>Fs,clearAllStores:()=>r7,isFtReduxStore:()=>on,redux:()=>Te,reduxEventListener:()=>v5,reduxReactive:()=>b5,watch:()=>dn,withRedux:()=>$h});var Us=u(()=>{"use strict";Ih();jd();zh();C4();Ms();O4();E4()});var Su={};oe(Su,{scrollHelper:()=>xu});var bu,Hs,vu,xu,Cu=u(()=>{"use strict";kt();Hs=new Map,vu=class{lock(e,r){if(r){let o=Hs.get(r);if(o==null||o===e)return Hs.set(r,e),r}}release(e,r){r&&Hs.get(r)===e&&Hs.delete(r)}findFirstScrollableParent(e){var r;let o,n;for(let a of Mc(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else l&&n==null&&(n=s)}return(r=o??n)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,n;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return a+((n=r?.offsetTop)!==null&&n!==void 0?n:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let n=this.getAbsoluteScrollOffset(o,e),a=n-o.clientHeight+e.clientHeight,s=n,l=ao(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(bu=window.FluidTopicsScrollHelper)!==null&&bu!==void 0?bu:new vu;xu=window.FluidTopicsScrollHelper});var A4=H8(($o,L4)=>{var Gs=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Vs=function(){function t(){this.fetch=!1,this.DOMException=Gs.DOMException}return t.prototype=Gs,new t}();(function(t){var e=function(r){var o=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},n={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function a(C){return C&&DataView.prototype.isPrototypeOf(C)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(C){return C&&s.indexOf(Object.prototype.toString.call(C))>-1};function d(C){if(typeof C!="string"&&(C=String(C)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(C)||C==="")throw new TypeError('Invalid character in header field name: "'+C+'"');return C.toLowerCase()}function p(C){return typeof C!="string"&&(C=String(C)),C}function m(C){var M={next:function(){var Z=C.shift();return{done:Z===void 0,value:Z}}};return n.iterable&&(M[Symbol.iterator]=function(){return M}),M}function g(C){this.map={},C instanceof g?C.forEach(function(M,Z){this.append(Z,M)},this):Array.isArray(C)?C.forEach(function(M){if(M.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+M.length);this.append(M[0],M[1])},this):C&&Object.getOwnPropertyNames(C).forEach(function(M){this.append(M,C[M])},this)}g.prototype.append=function(C,M){C=d(C),M=p(M);var Z=this.map[C];this.map[C]=Z?Z+", "+M:M},g.prototype.delete=function(C){delete this.map[d(C)]},g.prototype.get=function(C){return C=d(C),this.has(C)?this.map[C]:null},g.prototype.has=function(C){return this.map.hasOwnProperty(d(C))},g.prototype.set=function(C,M){this.map[d(C)]=p(M)},g.prototype.forEach=function(C,M){for(var Z in this.map)this.map.hasOwnProperty(Z)&&C.call(M,this.map[Z],Z,this)},g.prototype.keys=function(){var C=[];return this.forEach(function(M,Z){C.push(Z)}),m(C)},g.prototype.values=function(){var C=[];return this.forEach(function(M){C.push(M)}),m(C)},g.prototype.entries=function(){var C=[];return this.forEach(function(M,Z){C.push([Z,M])}),m(C)},n.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function b(C){if(!C._noBody){if(C.bodyUsed)return Promise.reject(new TypeError("Already read"));C.bodyUsed=!0}}function E(C){return new Promise(function(M,Z){C.onload=function(){M(C.result)},C.onerror=function(){Z(C.error)}})}function L(C){var M=new FileReader,Z=E(M);return M.readAsArrayBuffer(C),Z}function N(C){var M=new FileReader,Z=E(M),Ce=/charset=([A-Za-z0-9_-]+)/.exec(C.type),Ne=Ce?Ce[1]:"utf-8";return M.readAsText(C,Ne),Z}function z(C){for(var M=new Uint8Array(C),Z=new Array(M.length),Ce=0;Ce<M.length;Ce++)Z[Ce]=String.fromCharCode(M[Ce]);return Z.join("")}function B(C){if(C.slice)return C.slice(0);var M=new Uint8Array(C.byteLength);return M.set(new Uint8Array(C)),M.buffer}function F(){return this.bodyUsed=!1,this._initBody=function(C){this.bodyUsed=this.bodyUsed,this._bodyInit=C,C?typeof C=="string"?this._bodyText=C:n.blob&&Blob.prototype.isPrototypeOf(C)?this._bodyBlob=C:n.formData&&FormData.prototype.isPrototypeOf(C)?this._bodyFormData=C:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(C)?this._bodyText=C.toString():n.arrayBuffer&&n.blob&&a(C)?(this._bodyArrayBuffer=B(C.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(C)||l(C))?this._bodyArrayBuffer=B(C):this._bodyText=C=Object.prototype.toString.call(C):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof C=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(C)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var C=b(this);if(C)return C;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var C=b(this);return C||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(n.blob)return this.blob().then(L);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var C=b(this);if(C)return C;if(this._bodyBlob)return N(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(z(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function A(C){var M=C.toUpperCase();return k.indexOf(M)>-1?M:C}function P(C,M){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');M=M||{};var Z=M.body;if(C instanceof P){if(C.bodyUsed)throw new TypeError("Already read");this.url=C.url,this.credentials=C.credentials,M.headers||(this.headers=new g(C.headers)),this.method=C.method,this.mode=C.mode,this.signal=C.signal,!Z&&C._bodyInit!=null&&(Z=C._bodyInit,C.bodyUsed=!0)}else this.url=String(C);if(this.credentials=M.credentials||this.credentials||"same-origin",(M.headers||!this.headers)&&(this.headers=new g(M.headers)),this.method=A(M.method||this.method||"GET"),this.mode=M.mode||this.mode||null,this.signal=M.signal||this.signal||function(){if("AbortController"in o){var be=new AbortController;return be.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Z),(this.method==="GET"||this.method==="HEAD")&&(M.cache==="no-store"||M.cache==="no-cache")){var Ce=/([?&])_=[^&]*/;if(Ce.test(this.url))this.url=this.url.replace(Ce,"$1_="+new Date().getTime());else{var Ne=/\?/;this.url+=(Ne.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function K(C){var M=new FormData;return C.trim().split("&").forEach(function(Z){if(Z){var Ce=Z.split("="),Ne=Ce.shift().replace(/\+/g," "),be=Ce.join("=").replace(/\+/g," ");M.append(decodeURIComponent(Ne),decodeURIComponent(be))}}),M}function te(C){var M=new g,Z=C.replace(/\r?\n[\t ]+/g," ");return Z.split("\r").map(function(Ce){return Ce.indexOf(`
48
- `)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Ne=Ce.split(":"),be=Ne.shift().trim();if(be){var Ja=Ne.join(":").trim();try{M.append(be,Ja)}catch(ic){console.warn("Response "+ic.message)}}}),M}F.call(P.prototype);function ye(C,M){if(!(this instanceof ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(M||(M={}),this.type="default",this.status=M.status===void 0?200:M.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=M.statusText===void 0?"":""+M.statusText,this.headers=new g(M.headers),this.url=M.url||"",this._initBody(C)}F.call(ye.prototype),ye.prototype.clone=function(){return new ye(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},ye.error=function(){var C=new ye(null,{status:200,statusText:""});return C.ok=!1,C.status=0,C.type="error",C};var me=[301,302,303,307,308];ye.redirect=function(C,M){if(me.indexOf(M)===-1)throw new RangeError("Invalid status code");return new ye(null,{status:M,headers:{location:C}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(M,Z){this.message=M,this.name=Z;var Ce=Error(M);this.stack=Ce.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function X(C,M){return new Promise(function(Z,Ce){var Ne=new P(C,M);if(Ne.signal&&Ne.signal.aborted)return Ce(new r.DOMException("Aborted","AbortError"));var be=new XMLHttpRequest;function Ja(){be.abort()}be.onload=function(){var ft={statusText:be.statusText,headers:te(be.getAllResponseHeaders()||"")};Ne.url.indexOf("file://")===0&&(be.status<200||be.status>599)?ft.status=200:ft.status=be.status,ft.url="responseURL"in be?be.responseURL:ft.headers.get("X-Request-URL");var ei="response"in be?be.response:be.responseText;setTimeout(function(){Z(new ye(ei,ft))},0)},be.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},be.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request timed out"))},0)},be.onabort=function(){setTimeout(function(){Ce(new r.DOMException("Aborted","AbortError"))},0)};function ic(ft){try{return ft===""&&o.location.href?o.location.href:ft}catch{return ft}}if(be.open(Ne.method,ic(Ne.url),!0),Ne.credentials==="include"?be.withCredentials=!0:Ne.credentials==="omit"&&(be.withCredentials=!1),"responseType"in be&&(n.blob?be.responseType="blob":n.arrayBuffer&&(be.responseType="arraybuffer")),M&&typeof M.headers=="object"&&!(M.headers instanceof g||o.Headers&&M.headers instanceof o.Headers)){var x2=[];Object.getOwnPropertyNames(M.headers).forEach(function(ft){x2.push(d(ft)),be.setRequestHeader(ft,p(M.headers[ft]))}),Ne.headers.forEach(function(ft,ei){x2.indexOf(ei)===-1&&be.setRequestHeader(ei,ft)})}else Ne.headers.forEach(function(ft,ei){be.setRequestHeader(ei,ft)});Ne.signal&&(Ne.signal.addEventListener("abort",Ja),be.onreadystatechange=function(){be.readyState===4&&Ne.signal.removeEventListener("abort",Ja)}),be.send(typeof Ne._bodyInit>"u"?null:Ne._bodyInit)})}return X.polyfill=!0,o.fetch||(o.fetch=X,o.Headers=g,o.Request=P,o.Response=ye),r.Headers=g,r.Request=P,r.Response=ye,r.fetch=X,r}({})})(Vs);Vs.fetch.ponyfill=!0;delete Vs.fetch.polyfill;var un=Gs.fetch?Gs:Vs;$o=un.fetch;$o.default=un.fetch;$o.fetch=un.fetch;$o.Headers=un.Headers;$o.Request=un.Request;$o.Response=un.Response;L4.exports=$o});var Ou=u(()=>{});var R4,w4,_4,zo,k4,T4,Si,M4,N4,P4,I4,$4,z4,D4,Do,B4,F4,Ci,W4,U4,Ws,H4,pn,j4,Fr,fn,G4,Je,lr,V4,Eu=u(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(R4||(R4={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(w4||(w4={}));(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(_4||(_4={}));(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(zo||(zo={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(k4||(k4={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(T4||(T4={}));(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__AI_TRANSLATE="DOCUMENT__AI_TRANSLATE",t.DOCUMENT__DISPLAY="DOCUMENT__DISPLAY",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__DISPLAY="TOPIC__DISPLAY",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Si||(Si={}));(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(M4||(M4={}));(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(N4||(N4={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(P4||(P4={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(I4||(I4={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})($4||($4={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(z4||(z4={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(D4||(D4={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Do||(Do={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(B4||(B4={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(F4||(F4={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ci||(Ci={}));W4=t=>Object.keys(Ci).includes(t);(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(U4||(U4={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ws||(Ws={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(H4||(H4={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(pn||(pn={}));j4=t=>Object.keys(pn).includes(t);(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fr||(Fr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(fn||(fn={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G4||(G4={}));(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Je||(Je={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(lr||(lr={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(V4||(V4={}))});var K4,q4,Z4,Y4,X4,Q4,J4,em,tm=u(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(K4||(K4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(q4||(q4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Z4||(Z4={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Y4||(Y4={}));(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(X4||(X4={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Q4||(Q4={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(J4||(J4={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(em||(em={}))});var rm=u(()=>{Eu();tm()});function om(t,e){return t===e||(o7[t]??[]).some(r=>om(r,e))}function im(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>om(o,e))}var o7,nm=u(()=>{Eu();o7={[Je.PERSONAL_BOOK_SHARE_USER]:[Je.PERSONAL_BOOK_USER],[Je.HTML_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.PDF_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.KHUB_ADMIN]:[Je.CONTENT_PUBLISHER],[Je.ADMIN]:[Je.KHUB_ADMIN,Je.USERS_ADMIN,Je.PORTAL_ADMIN,Je.BEHAVIOR_DATA_USER],[Je.GENERATIVE_AI_EXPORT_USER]:[Je.GENERATIVE_AI_USER]}});var am=u(()=>{});var i7,Bo=u(()=>{i7=V8(A4(),1);Ou();rm();nm();am();Ou()});var Lu={};oe(Lu,{SearchPlaceConverter:()=>Fo,SearchPlaceQueryParams:()=>Re,isSearchPlaceQueryParams:()=>lm,serializeRequest:()=>a7});function n7(t){return`"${t}"`}function sm(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function a7(t,e){return new Fo(t).serialize(e)}function lm(t){return s7.has(t)}var Re,s7,Fo,Au=u(()=>{"use strict";Bo();kt();(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(Re||(Re={}));s7=new Set(Object.values(Re));Fo=class{constructor(e,r=20,o=!1,n="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=n,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,n=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return n.search=this.toURLSearchParams(e),n.toString()}toURLSearchParams(e,r=!1){var o,n,a,s,l,d,p,m,g,b,E;let L=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&L.append(Re.LOCALE,e.contentLocale):L.append(Re.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&L.append(Re.QUERY,e.query);let N=(a=(n=e.metadataFilters)===null||n===void 0?void 0:n.filter(A=>A.valueFilter&&!A.valueFilter.negative))!==null&&a!==void 0?a:[];if(N.length>0){let A=N.map(P=>{var K,te;let ye=((te=(K=P.valueFilter)===null||K===void 0?void 0:K.values)!==null&&te!==void 0?te:[]).map(me=>this.escapeFilters(me)).map(me=>n7(sm(me))).join("_");return`${P.key}~${ye}`}).join("*");L.append(Re.VALUE_FILTERS,A)}let z=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(A=>A.dateFilter))!==null&&l!==void 0?l:[];if(z.length>0){let A=z.map(P=>{var K;return`${P.key}~${(K=P.dateFilter)===null||K===void 0?void 0:K.type.toLowerCase()}`}).join("*");L.append(Re.DATE_FILTERS,A)}let B=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(A=>A.rangeFilter))!==null&&p!==void 0?p:[];if(B.length>0){let A=B.map(P=>{var K,te;return`${P.key}~${(K=P.rangeFilter)===null||K===void 0?void 0:K.from}_${(te=P.rangeFilter)===null||te===void 0?void 0:te.to}`}).join("*");L.append(Re.RANGE_FILTERS,A)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&L.append(Re.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&L.append(Re.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&L.append(Re.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((b=(g=e.paging)===null||g===void 0?void 0:g.perPage)!==null&&b!==void 0?b:this.defaultPerPage)!=this.defaultPerPage&&L.append(Re.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&L.append(Re.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let F=(E=e.otherQueryParams)!==null&&E!==void 0?E:{};for(let A in F)L.append(A,F[A]);let k=new Array;return L.forEach((A,P)=>{k.push(this.encodeQueryString(P)+"="+this.encodeQueryString(A))}),encodeURI(k.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),n=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?n:{...n,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:n.scope}}fromURLSearchParams(e){var r,o,n,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(B){console.warn("Could not decode search request query params, fallback on raw value",B)}let d=new URLSearchParams(e),p=d.get(Re.LOCALE)==="all"?void 0:d.get(Re.LOCALE),m=((r=d.get(Re.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),g=(o=d.get(Re.SORT))===null||o===void 0?void 0:o.toLowerCase(),b=(n=d.get(Re.SCOPE))!==null&&n!==void 0?n:"default",E=+((a=d.get(Re.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),L=d.get(Re.KEYWORD_MATCH),N=L?L.toUpperCase()===Do.MANDATORY?Do.MANDATORY:Do.OPTIONAL:void 0,z={};for(let B of d.keys())lm(B)||(z[B]=d.get(B));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(Re.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[b])!==null&&l!==void 0?l:"DEFAULT",virtualField:W4(m)?m:"EVERYWHERE",sortId:g,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:ao(1,isNaN(E)?this.defaultPerPage:E,1e3)},keywordMatch:N,otherQueryParams:z}}parseCompatFilters(e){var r,o,n,a,s,l;let d=[];return e.has(Re.FILTERS)&&(d=this.parseValueFilters((r=e.get(Re.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(Re.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((n=e.get(Re.PERIOD))!==null&&n!==void 0?n:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(Re.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(Re.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(Re.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(sm).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:pn[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}unescapeFilterValue(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replace(n,r);return e}parseLegacyPeriodFilter(e){if(j4(e))return[{key:"ft:lastEdition",dateFilter:{type:pn[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,n]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:n}}]}return[]}}});var _u={};oe(_u,{toFtFormComponent:()=>wu});var Ru,wu,ku=u(()=>{"use strict";kt();Ru=Symbol("elementInternals"),wu=We(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ru].form}constructor(...o){super(o),this[Ru]=this.attachInternals()}setFormValue(o){this[Ru].setFormValue(o)}}return e})});var Tu={};oe(Tu,{DateFormatter:()=>Oi});var Oi,js=u(()=>{"use strict";Oi=class{static format(e,r,o,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(e,r,o,n)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,n){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(a);if(!n)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${l}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var Nu={};oe(Nu,{ALL_KEYS_VALUE:()=>Mu,SameWindowStorageEvent:()=>hn});var Mu,hn,Pu=u(()=>{"use strict";Mu="__all__",hn=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Mu}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new hn(Mu))}})});var $u={};oe($u,{FocusMainContentEvent:()=>Iu});var Iu,zu=u(()=>{"use strict";Iu=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}}});var cm={};function l7(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function c7(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}var Du=u(()=>{"use strict";window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};document.addEventListener("keydown",l7);document.addEventListener("click",c7)});var mn,Bu=u(()=>{"use strict";I();mn=_`
48
+ `)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Ne=Ce.split(":"),be=Ne.shift().trim();if(be){var Ja=Ne.join(":").trim();try{M.append(be,Ja)}catch(ic){console.warn("Response "+ic.message)}}}),M}F.call(P.prototype);function ye(C,M){if(!(this instanceof ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(M||(M={}),this.type="default",this.status=M.status===void 0?200:M.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=M.statusText===void 0?"":""+M.statusText,this.headers=new g(M.headers),this.url=M.url||"",this._initBody(C)}F.call(ye.prototype),ye.prototype.clone=function(){return new ye(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},ye.error=function(){var C=new ye(null,{status:200,statusText:""});return C.ok=!1,C.status=0,C.type="error",C};var me=[301,302,303,307,308];ye.redirect=function(C,M){if(me.indexOf(M)===-1)throw new RangeError("Invalid status code");return new ye(null,{status:M,headers:{location:C}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(M,Z){this.message=M,this.name=Z;var Ce=Error(M);this.stack=Ce.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function X(C,M){return new Promise(function(Z,Ce){var Ne=new P(C,M);if(Ne.signal&&Ne.signal.aborted)return Ce(new r.DOMException("Aborted","AbortError"));var be=new XMLHttpRequest;function Ja(){be.abort()}be.onload=function(){var ft={statusText:be.statusText,headers:te(be.getAllResponseHeaders()||"")};Ne.url.indexOf("file://")===0&&(be.status<200||be.status>599)?ft.status=200:ft.status=be.status,ft.url="responseURL"in be?be.responseURL:ft.headers.get("X-Request-URL");var ei="response"in be?be.response:be.responseText;setTimeout(function(){Z(new ye(ei,ft))},0)},be.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},be.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request timed out"))},0)},be.onabort=function(){setTimeout(function(){Ce(new r.DOMException("Aborted","AbortError"))},0)};function ic(ft){try{return ft===""&&o.location.href?o.location.href:ft}catch{return ft}}if(be.open(Ne.method,ic(Ne.url),!0),Ne.credentials==="include"?be.withCredentials=!0:Ne.credentials==="omit"&&(be.withCredentials=!1),"responseType"in be&&(n.blob?be.responseType="blob":n.arrayBuffer&&(be.responseType="arraybuffer")),M&&typeof M.headers=="object"&&!(M.headers instanceof g||o.Headers&&M.headers instanceof o.Headers)){var x2=[];Object.getOwnPropertyNames(M.headers).forEach(function(ft){x2.push(d(ft)),be.setRequestHeader(ft,p(M.headers[ft]))}),Ne.headers.forEach(function(ft,ei){x2.indexOf(ei)===-1&&be.setRequestHeader(ei,ft)})}else Ne.headers.forEach(function(ft,ei){be.setRequestHeader(ei,ft)});Ne.signal&&(Ne.signal.addEventListener("abort",Ja),be.onreadystatechange=function(){be.readyState===4&&Ne.signal.removeEventListener("abort",Ja)}),be.send(typeof Ne._bodyInit>"u"?null:Ne._bodyInit)})}return X.polyfill=!0,o.fetch||(o.fetch=X,o.Headers=g,o.Request=P,o.Response=ye),r.Headers=g,r.Request=P,r.Response=ye,r.fetch=X,r}({})})(Vs);Vs.fetch.ponyfill=!0;delete Vs.fetch.polyfill;var un=Gs.fetch?Gs:Vs;$o=un.fetch;$o.default=un.fetch;$o.fetch=un.fetch;$o.Headers=un.Headers;$o.Request=un.Request;$o.Response=un.Response;L4.exports=$o});var Ou=u(()=>{});var R4,w4,_4,zo,k4,T4,Si,M4,N4,P4,I4,$4,z4,D4,Do,B4,F4,Ci,W4,U4,Ws,H4,pn,j4,Fr,fn,G4,Je,lr,V4,Eu=u(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(R4||(R4={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(w4||(w4={}));(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(_4||(_4={}));(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(zo||(zo={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(k4||(k4={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(T4||(T4={}));(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Si||(Si={}));(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(M4||(M4={}));(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(N4||(N4={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(P4||(P4={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(I4||(I4={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})($4||($4={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(z4||(z4={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(D4||(D4={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Do||(Do={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(B4||(B4={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(F4||(F4={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ci||(Ci={}));W4=t=>Object.keys(Ci).includes(t);(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(U4||(U4={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ws||(Ws={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(H4||(H4={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(pn||(pn={}));j4=t=>Object.keys(pn).includes(t);(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fr||(Fr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(fn||(fn={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G4||(G4={}));(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(Je||(Je={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(lr||(lr={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(V4||(V4={}))});var K4,q4,Z4,Y4,X4,Q4,J4,em,tm=u(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(K4||(K4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(q4||(q4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Z4||(Z4={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Y4||(Y4={}));(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(X4||(X4={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Q4||(Q4={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(J4||(J4={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(em||(em={}))});var rm=u(()=>{Eu();tm()});function om(t,e){return t===e||(o7[t]??[]).some(r=>om(r,e))}function im(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>om(o,e))}var o7,nm=u(()=>{Eu();o7={[Je.PERSONAL_BOOK_SHARE_USER]:[Je.PERSONAL_BOOK_USER],[Je.HTML_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.PDF_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.KHUB_ADMIN]:[Je.CONTENT_PUBLISHER],[Je.ADMIN]:[Je.KHUB_ADMIN,Je.USERS_ADMIN,Je.PORTAL_ADMIN,Je.BEHAVIOR_DATA_USER],[Je.GENERATIVE_AI_EXPORT_USER]:[Je.GENERATIVE_AI_USER]}});var am=u(()=>{});var i7,Bo=u(()=>{i7=V8(A4(),1);Ou();rm();nm();am();Ou()});var Lu={};oe(Lu,{SearchPlaceConverter:()=>Fo,SearchPlaceQueryParams:()=>Re,isSearchPlaceQueryParams:()=>lm,serializeRequest:()=>a7});function n7(t){return`"${t}"`}function sm(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function a7(t,e){return new Fo(t).serialize(e)}function lm(t){return s7.has(t)}var Re,s7,Fo,Au=u(()=>{"use strict";Bo();kt();(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(Re||(Re={}));s7=new Set(Object.values(Re));Fo=class{constructor(e,r=20,o=!1,n="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=n,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,n=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return n.search=this.toURLSearchParams(e),n.toString()}toURLSearchParams(e,r=!1){var o,n,a,s,l,d,p,m,g,b,E;let L=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&L.append(Re.LOCALE,e.contentLocale):L.append(Re.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&L.append(Re.QUERY,e.query);let N=(a=(n=e.metadataFilters)===null||n===void 0?void 0:n.filter(A=>A.valueFilter&&!A.valueFilter.negative))!==null&&a!==void 0?a:[];if(N.length>0){let A=N.map(P=>{var K,te;let ye=((te=(K=P.valueFilter)===null||K===void 0?void 0:K.values)!==null&&te!==void 0?te:[]).map(me=>this.escapeFilters(me)).map(me=>n7(sm(me))).join("_");return`${P.key}~${ye}`}).join("*");L.append(Re.VALUE_FILTERS,A)}let z=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(A=>A.dateFilter))!==null&&l!==void 0?l:[];if(z.length>0){let A=z.map(P=>{var K;return`${P.key}~${(K=P.dateFilter)===null||K===void 0?void 0:K.type.toLowerCase()}`}).join("*");L.append(Re.DATE_FILTERS,A)}let B=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(A=>A.rangeFilter))!==null&&p!==void 0?p:[];if(B.length>0){let A=B.map(P=>{var K,te;return`${P.key}~${(K=P.rangeFilter)===null||K===void 0?void 0:K.from}_${(te=P.rangeFilter)===null||te===void 0?void 0:te.to}`}).join("*");L.append(Re.RANGE_FILTERS,A)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&L.append(Re.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&L.append(Re.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&L.append(Re.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((b=(g=e.paging)===null||g===void 0?void 0:g.perPage)!==null&&b!==void 0?b:this.defaultPerPage)!=this.defaultPerPage&&L.append(Re.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&L.append(Re.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let F=(E=e.otherQueryParams)!==null&&E!==void 0?E:{};for(let A in F)L.append(A,F[A]);let k=new Array;return L.forEach((A,P)=>{k.push(this.encodeQueryString(P)+"="+this.encodeQueryString(A))}),encodeURI(k.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),n=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?n:{...n,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:n.scope}}fromURLSearchParams(e){var r,o,n,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(B){console.warn("Could not decode search request query params, fallback on raw value",B)}let d=new URLSearchParams(e),p=d.get(Re.LOCALE)==="all"?void 0:d.get(Re.LOCALE),m=((r=d.get(Re.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),g=(o=d.get(Re.SORT))===null||o===void 0?void 0:o.toLowerCase(),b=(n=d.get(Re.SCOPE))!==null&&n!==void 0?n:"default",E=+((a=d.get(Re.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),L=d.get(Re.KEYWORD_MATCH),N=L?L.toUpperCase()===Do.MANDATORY?Do.MANDATORY:Do.OPTIONAL:void 0,z={};for(let B of d.keys())lm(B)||(z[B]=d.get(B));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(Re.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[b])!==null&&l!==void 0?l:"DEFAULT",virtualField:W4(m)?m:"EVERYWHERE",sortId:g,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:ao(1,isNaN(E)?this.defaultPerPage:E,1e3)},keywordMatch:N,otherQueryParams:z}}parseCompatFilters(e){var r,o,n,a,s,l;let d=[];return e.has(Re.FILTERS)&&(d=this.parseValueFilters((r=e.get(Re.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(Re.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((n=e.get(Re.PERIOD))!==null&&n!==void 0?n:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(Re.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(Re.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(Re.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(sm).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:pn[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}unescapeFilterValue(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replace(n,r);return e}parseLegacyPeriodFilter(e){if(j4(e))return[{key:"ft:lastEdition",dateFilter:{type:pn[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,n]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:n}}]}return[]}}});var _u={};oe(_u,{toFtFormComponent:()=>wu});var Ru,wu,ku=u(()=>{"use strict";kt();Ru=Symbol("elementInternals"),wu=We(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ru].form}constructor(...o){super(o),this[Ru]=this.attachInternals()}setFormValue(o){this[Ru].setFormValue(o)}}return e})});var Tu={};oe(Tu,{DateFormatter:()=>Oi});var Oi,js=u(()=>{"use strict";Oi=class{static format(e,r,o,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(e,r,o,n)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,n){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(a);if(!n)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${l}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var Nu={};oe(Nu,{ALL_KEYS_VALUE:()=>Mu,SameWindowStorageEvent:()=>hn});var Mu,hn,Pu=u(()=>{"use strict";Mu="__all__",hn=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Mu}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new hn(Mu))}})});var $u={};oe($u,{FocusMainContentEvent:()=>Iu});var Iu,zu=u(()=>{"use strict";Iu=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}}});var cm={};function l7(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function c7(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}var Du=u(()=>{"use strict";window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};document.addEventListener("keydown",l7);document.addEventListener("click",c7)});var mn,Bu=u(()=>{"use strict";I();mn=_`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -611,7 +611,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
611
611
  position: relative;
612
612
  word-break: break-word;
613
613
  }
614
- `});var y7,_i,b7,j,Et=u(()=>{"use strict";w();y7="ft-app-info",_i=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_i.eventName="authentication-change";b7={session:(t,e)=>{it(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>j.dispatchEvent(new _i(e.payload)),0))}},j=uo.get({name:y7,reducers:b7,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 Xs,zI,Qm=u(()=>{"use strict";J();Us();js();Et();w();Xs=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},zI=We(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(j)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>Oi.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Xs([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Xs([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Xs([Te({store:j.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Xs([Te({store:j.name})],e.prototype,"uiLocale",void 0),e})});var ki,op=u(()=>{"use strict";Et();ki=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=j.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=j.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}}});var Qs,Jm=u(()=>{"use strict";op();Qs=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ki.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ki.await()}}});var Lt,Ho=u(()=>{"use strict";w();Jm();Lt=class extends Qs{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new Ir,this.cache=e?n.commonCache:new Ir}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}}});var Js,ip=u(()=>{"use strict";Et();Bo();Ho();Js=class extends Lt{async listMySearches(){let{session:e}=j.getState();return im(e,Je.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}}});var el,np=u(()=>{"use strict";Et();Ho();el=class extends Lt{async listMyBookmarks(){let e=j.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}}});var tl,e3=u(()=>{"use strict";Et();Ho();tl=class extends Lt{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=j.getState().session;return!!e?.sessionAuthenticated}}});var rl,t3=u(()=>{"use strict";Ho();Et();rl=class extends Lt{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=j.getState().session;return!!e?.sessionAuthenticated}}});var v7,x7,i3,ap,sp,r3,o3,Kt,lp,cp,ol=u(()=>{"use strict";Bo();w();ip();np();Et();e3();t3();v7="ft-user-assets",x7={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(lr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;sp(t,r,[...ap(t,r),n]),r3(t,r,1,o),o3(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;sp(t,r,ap(t,r).map(n=>n.id===o.id?o:n)),o3(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;sp(t,r,ap(t,r).filter(a=>a.id!==n)),r3(t,r,-1,o)}},i3={[lr.SEARCHES]:"savedSearches",[lr.BOOKMARKS]:"bookmarks",[lr.BOOKS]:void 0,[lr.COLLECTIONS]:void 0},ap=(t,e)=>{var r;let o=i3[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},sp=(t,e,r)=>{let o=i3[e];o&&(t[o]=r)},r3=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===lr.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},o3=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Kt=uo.get({name:v7,reducers:x7,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(lr).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),lp=class{constructor(e=new tl,r=new rl){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=j.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new el,this.savedSearchesService=new Js,j.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=j.getState();it((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Kt.actions.clearAssetCount(),Kt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Kt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Kt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Kt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Kt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Kt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Kt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Kt.getState().assetCounts.bookmarkByMap).length!==0;e===lr.BOOKMARKS&&r&&Kt.actions.clearBookmarkCountByMap(),Kt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Kt.actions.bookmarks(r)}}},cp=new lp;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cp)});var n3=u(()=>{"use strict";Bo();ol()});var dp,a3=u(()=>{"use strict";Et();dp=class{addCommand(e,r=!1){j.commands.add(e,r)}consumeCommand(e){return j.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new dp});var s3,En,S7,il,Ln,nl,l3=u(()=>{"use strict";Et();w();Ho();En=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},S7=Symbol("clearAfterUnitTest"),il=class extends hs(Lt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[s3]=()=>{this.defaultMessages={},this.cache=new Ir,this.listeners={}},this.currentUiLocale=j.getState().uiLocale,j.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=j.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};it(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new ko((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Nr)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new En({loadedContexts:e})),this.dispatchEvent(new En({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new En({loadedContexts:[e]})),this.dispatchEvent(new En({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>fs(0).then(()=>o()).catch(()=>null)))}};s3=S7;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});Ln=window.FluidTopicsI18nService,nl=window.FluidTopicsCustomI18nService});var up,c3=u(()=>{"use strict";w();up=class{highlightHtml(e,r,o){Dd(e,r,o)}};window.FluidTopicsHighlightHtmlService=new up});var pp,d3=u(()=>{"use strict";w();Et();pp=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=j.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a;if(e==null)return"";try{return Oi.format(e,(o=r?.locale)!==null&&o!==void 0?o:j.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new pp});var mo,fp=u(()=>{"use strict";w();Et();mo=class{static get(e,r){var o,n;let a=j.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Fo(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}}});var al,u3=u(()=>{"use strict";Ho();al=class extends Lt{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}sortEventArrays(e){let r=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(r),console.debug(n),o)),1e3)}}});var hp,p3=u(()=>{"use strict";fp();hp=class{urlToSearchRequest(e){return mo.get().parse(e)}searchRequestToUrl(e){return mo.get().serialize(e)}};window.FluidTopicsUrlService=new hp});var Ti,f3=u(()=>{"use strict";Ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ti.eventName="change"});var mp,h3,m3=u(()=>{"use strict";mp=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},h3=new mp});var sl,g3=u(()=>{"use strict";w();f3();m3();sl=class t extends so{static build(){return new t(window.history,h3,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),it(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ti(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Ti.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ti.eventName,e)}currentItem(){return si(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 si(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 si(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}}});var y3=u(()=>{"use strict";g3();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sl.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)})});var b3=u(()=>{"use strict";Et()});var gp=u(()=>{"use strict";np();op();a3();l3();Ho();c3();ip();d3();fp();u3();p3();y3();b3()});var v3,yp=u(()=>{"use strict";I();v3=_`
614
+ `});var y7,_i,b7,j,Et=u(()=>{"use strict";w();y7="ft-app-info",_i=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_i.eventName="authentication-change";b7={session:(t,e)=>{it(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>j.dispatchEvent(new _i(e.payload)),0))}},j=uo.get({name:y7,reducers:b7,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 Xs,zI,Qm=u(()=>{"use strict";J();Us();js();Et();w();Xs=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},zI=We(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(j)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>Oi.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Xs([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Xs([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Xs([Te({store:j.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Xs([Te({store:j.name})],e.prototype,"uiLocale",void 0),e})});var ki,op=u(()=>{"use strict";Et();ki=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=j.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=j.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}}});var Qs,Jm=u(()=>{"use strict";op();Qs=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ki.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ki.await()}}});var Lt,Ho=u(()=>{"use strict";w();Jm();Lt=class extends Qs{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new Ir,this.cache=e?n.commonCache:new Ir}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}}});var Js,ip=u(()=>{"use strict";Et();Bo();Ho();Js=class extends Lt{async listMySearches(){let{session:e}=j.getState();return im(e,Je.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}}});var el,np=u(()=>{"use strict";Et();Ho();el=class extends Lt{async listMyBookmarks(){let e=j.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}}});var tl,e3=u(()=>{"use strict";Et();Ho();tl=class extends Lt{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=j.getState().session;return!!e?.sessionAuthenticated}}});var rl,t3=u(()=>{"use strict";Ho();Et();rl=class extends Lt{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=j.getState().session;return!!e?.sessionAuthenticated}}});var v7,x7,i3,ap,sp,r3,o3,Kt,lp,cp,ol=u(()=>{"use strict";Bo();w();ip();np();Et();e3();t3();v7="ft-user-assets",x7={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(lr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;sp(t,r,[...ap(t,r),n]),r3(t,r,1,o),o3(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;sp(t,r,ap(t,r).map(n=>n.id===o.id?o:n)),o3(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;sp(t,r,ap(t,r).filter(a=>a.id!==n)),r3(t,r,-1,o)}},i3={[lr.SEARCHES]:"savedSearches",[lr.BOOKMARKS]:"bookmarks",[lr.BOOKS]:void 0,[lr.COLLECTIONS]:void 0},ap=(t,e)=>{var r;let o=i3[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},sp=(t,e,r)=>{let o=i3[e];o&&(t[o]=r)},r3=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===lr.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},o3=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Kt=uo.get({name:v7,reducers:x7,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(lr).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),lp=class{constructor(e=new tl,r=new rl){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=j.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new el,this.savedSearchesService=new Js,j.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=j.getState();it((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Kt.actions.clearAssetCount(),Kt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Kt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Kt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Kt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Kt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Kt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Kt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Kt.getState().assetCounts.bookmarkByMap).length!==0;e===lr.BOOKMARKS&&r&&Kt.actions.clearBookmarkCountByMap(),Kt.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Kt.actions.bookmarks(r)}}},cp=new lp;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cp)});var n3=u(()=>{"use strict";Bo();ol()});var dp,a3=u(()=>{"use strict";Et();dp=class{addCommand(e,r=!1){j.commands.add(e,r)}consumeCommand(e){return j.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new dp});var s3,En,S7,il,Ln,nl,l3=u(()=>{"use strict";Et();w();Ho();En=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},S7=Symbol("clearAfterUnitTest"),il=class extends hs(Lt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[s3]=()=>{this.defaultMessages={},this.cache=new Ir,this.listeners={}},this.currentUiLocale=j.getState().uiLocale,j.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=j.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};it(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new ko((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Nr)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new En({loadedContexts:e})),this.dispatchEvent(new En({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new En({loadedContexts:[e]})),this.dispatchEvent(new En({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>fs(0).then(()=>o()).catch(()=>null)))}};s3=S7;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});Ln=window.FluidTopicsI18nService,nl=window.FluidTopicsCustomI18nService});var up,c3=u(()=>{"use strict";w();up=class{highlightHtml(e,r,o){Dd(e,r,o)}};window.FluidTopicsHighlightHtmlService=new up});var pp,d3=u(()=>{"use strict";w();Et();pp=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=j.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a;if(e==null)return"";try{return Oi.format(e,(o=r?.locale)!==null&&o!==void 0?o:j.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new pp});var mo,fp=u(()=>{"use strict";w();Et();mo=class{static get(e,r){var o,n;let a=j.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Fo(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}}});var al,u3=u(()=>{"use strict";Ho();al=class extends Lt{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(r),console.debug(n),o)),1e3)}}});var hp,p3=u(()=>{"use strict";fp();hp=class{urlToSearchRequest(e){return mo.get().parse(e)}searchRequestToUrl(e){return mo.get().serialize(e)}};window.FluidTopicsUrlService=new hp});var Ti,f3=u(()=>{"use strict";Ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ti.eventName="change"});var mp,h3,m3=u(()=>{"use strict";mp=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},h3=new mp});var sl,g3=u(()=>{"use strict";w();f3();m3();sl=class t extends so{static build(){return new t(window.history,h3,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),it(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ti(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[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 r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Ti.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ti.eventName,e)}currentItem(){return si(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 si(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 si(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}}});var y3=u(()=>{"use strict";g3();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sl.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)})});var b3=u(()=>{"use strict";Et()});var gp=u(()=>{"use strict";np();op();a3();l3();Ho();c3();ip();d3();fp();u3();p3();y3();b3()});var v3,yp=u(()=>{"use strict";I();v3=_`
615
615
  `});var x3=u(()=>{"use strict"});function S3(t,e){let{authenticationRequired:r,session:o}=j.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var C3=u(()=>{"use strict";Et()});var lt,Be,bp=u(()=>{"use strict";I();J();w();yp();Et();gp();C3();lt=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Be=class extends W{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=()=>ki.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ir,this.cleanSessionDebouncer=new ge,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return S`
616
616
  <slot></slot>
617
617
  `}connectedCallback(){super.connectedCallback(),j.addEventListener(_i.eventName,this.reloadConfiguration)}disconnectedCallback(){j.addEventListener(_i.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,n,a,s,l,d;super.update(e),e.has("baseUrl")&&(j.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&j.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&j.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&j.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&j.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&j.actions.noCustom(this.noCustom),e.has("editorMode")&&j.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&j.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&j.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Ln.addContext(p)),e.has("openExternalDocumentInNewTab")&&j.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&j.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&j.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(j.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),j.actions.availableUiLocales((n=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&n!==void 0?n:[]),j.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&j.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&j.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",()=>S3(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Be.elementDefinitions={};Be.styles=v3;lt([h()],Be.prototype,"baseUrl",void 0);lt([h()],Be.prototype,"apiIntegrationIdentifier",void 0);lt([h()],Be.prototype,"apiIntegrationAppVersion",void 0);lt([h()],Be.prototype,"uiLocale",void 0);lt([Ae(null)],Be.prototype,"availableUiLocales",void 0);lt([Ae(null)],Be.prototype,"metadataConfiguration",void 0);lt([h({type:Boolean})],Be.prototype,"editorMode",void 0);lt([h({type:Boolean})],Be.prototype,"noCustom",void 0);lt([h({type:Boolean})],Be.prototype,"openExternalDocumentInNewTab",void 0);lt([h({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],Be.prototype,"noCustomComponent",void 0);lt([h({type:Boolean})],Be.prototype,"withManualResources",void 0);lt([h({type:Boolean})],Be.prototype,"navigatorOnline",void 0);lt([h({type:Boolean})],Be.prototype,"forcedOffline",void 0);lt([h({type:Object})],Be.prototype,"apiProvider",void 0);lt([h({type:Boolean})],Be.prototype,"authenticationRequired",void 0);lt([Ae([])],Be.prototype,"messageContexts",void 0);lt([Ae(void 0)],Be.prototype,"session",void 0);lt([H()],Be.prototype,"localesConfiguration",void 0);lt([H()],Be.prototype,"availableContentLocales",void 0)});var O3=u(()=>{"use strict";w();bp();G("ft-app-context")(Be)});var Wr=u(()=>{"use strict";Qm();Et();ol();n3();gp();yp();x3();bp();O3()});var vp,An,ll=u(()=>{"use strict";vp=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},An=new vp});var C7,Ea,E3,L3,cl,Oa,Dt,dl,ul,La=u(()=>{"use strict";w();Wr();J();ll();C7=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Ea=Symbol("i18nAttributes"),E3=Symbol("i18nListAttributes"),L3=Symbol("i18nProperties"),cl=Symbol("i18nContexts"),Oa=Symbol("i18nUnsubs"),Dt=We(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?nl:Ln}i18n(a){let{context:s,key:l,message:d}=a,{custom:p,args:m,argsProvider:g}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...b)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(An.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(m,g,b)=>b?.context&&b.key&&a(m,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[Ea])===null||s===void 0||s.forEach((m,g)=>d[g]=p(m,g,d[g])),(l=this[E3])===null||l===void 0||l.forEach((m,g)=>{var b;return d[g]=(b=d[g])===null||b===void 0?void 0:b.map(E=>p(m,g,E))})}updateI18nProperties(a){var s;(s=this[L3])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[cl].set(d,{isCustomContext:l}),this[Oa].has(d)||this[Oa].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[cl].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[cl].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Oa].forEach(a=>a()),this[Oa].clear()}}return e=cl,r=Oa,C7([h({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),dl=class extends Dt(W){},ul=class extends Dt(Er){}});var xp,O7,A3=u(()=>{"use strict";ll();xp=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?An.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},O7=new xp});var Rn,pl=u(()=>{"use strict";La();w();ll();A3();Rn=(t,e)=>(r,o)=>{var n;r.constructor.createProperty(o,{type:Object,hasChanged:Vt,converter:An,...e}),r[Ea]=(n=r[Ea])!==null&&n!==void 0?n:new Map,r[Ea].set(o,t??{})}});var jr,R3=u(()=>{"use strict";Wr();jr=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?nl:Ln}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,n)=>{let a=n;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...a)=>this.service.resolveMessage(this.name,n,...a)}),this.rawMessages=new Proxy({},{get:(o,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(o,n)=>()=>n}),this.attributes=new Proxy({},{get:(o,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}}});var w3=u(()=>{"use strict";La()});var _3,Sp=u(()=>{"use strict";I();_3=_`
@@ -634,7 +634,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
634
634
  </div>
635
635
  </div>
636
636
  </div>
637
- `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Ad(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${R.transitionDuration}, left ${R.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||kc(e,this.ignoreMatchingElements,this.eventsTarget)}};qe.elementDefinitions={"ft-typography":se};qe.styles=Xm;Rr([Rn()],qe.prototype,"text",void 0);Rr([h({type:Boolean})],qe.prototype,"manual",void 0);Rr([h({type:Boolean})],qe.prototype,"inline",void 0);Rr([or()],qe.prototype,"delay",void 0);Rr([h()],qe.prototype,"position",void 0);Rr([Ae([])],qe.prototype,"ignoreMatchingElements",void 0);Rr([Cc()],qe.prototype,"slotNodes",void 0);Rr([U(".ft-tooltip--container")],qe.prototype,"container",void 0);Rr([U(".ft-tooltip")],qe.prototype,"tooltip",void 0);Rr([U(".ft-tooltip--content")],qe.prototype,"tooltipContent",void 0);Rr([H()],qe.prototype,"visible",void 0)});var M3=u(()=>{"use strict"});var N3=u(()=>{"use strict";w();Op();G("ft-tooltip")(qe)});var Ep=u(()=>{"use strict";Op();rp();M3();N3()});var et,Lp=u(()=>{"use strict";(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(et||(et={}))});function fl(t,e){var r,o,n,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=E7.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(a=(n=(o=Ap.get(l))!==null&&o!==void 0?o:Ap.get(e))!==null&&n!==void 0?n:Ap.get(s))!==null&&a!==void 0?a:V.UNKNOWN}var we,V,Ap,E7,wD,Rp=u(()=>{"use strict";(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.CLOUD_SLASH="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.CLOUD="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM_REGULAR="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS_REGULAR="&#xe9bd;",t.PERSON_CHALKBOARD_REGULAR="&#xe9be;"})(we||(we={}));(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(V||(V={}));Ap=new Map([...["abw"].map(t=>[t,V.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,V.AUDIO]),...["avi"].map(t=>[t,V.AVI]),...["chm","xhs"].map(t=>[t,V.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,V.CODE]),...["csv"].map(t=>[t,V.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,V.DITA]),...["epub"].map(t=>[t,V.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,V.EXCEL]),...["flac"].map(t=>[t,V.FLAC]),...["gif"].map(t=>[t,V.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,V.GZIP]),...["html","htm","xhtml"].map(t=>[t,V.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,V.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,V.JPEG]),...["json"].map(t=>[t,V.JSON]),...["m4a","m4p"].map(t=>[t,V.M4A]),...["mov","qt"].map(t=>[t,V.MOV]),...["mp3"].map(t=>[t,V.MP3]),...["mp4","m4v"].map(t=>[t,V.MP4]),...["ogg","oga"].map(t=>[t,V.OGG]),...["pdf","ps"].map(t=>[t,V.PDF]),...["png"].map(t=>[t,V.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,V.POWERPOINT]),...["rar"].map(t=>[t,V.RAR]),...["stp"].map(t=>[t,V.STP]),...["txt","rtf","md","mdown"].map(t=>[t,V.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,V.VIDEO]),...["wav"].map(t=>[t,V.WAV]),...["wma"].map(t=>[t,V.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,V.WORD]),...["xml","xsl","rdf"].map(t=>[t,V.XML]),...["yaml","yml","x-yaml"].map(t=>[t,V.YAML]),...["zip"].map(t=>[t,V.ZIP])]),E7=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);wD={[V.ABW]:"#91ABC6",[V.AUDIO]:"#1795E3",[V.AVI]:"#E63324",[V.CHM]:"#71C3EB",[V.CODE]:"#71C3EB",[V.CSV]:"#1F7345",[V.DITA]:"#71C3EB",[V.EPUB]:"#85B926",[V.EXCEL]:"#1F7345",[V.FLAC]:"#1795E3",[V.GIF]:"#59B031",[V.GZIP]:"#F8AB36",[V.HTML]:"#71C3EB",[V.IMAGE]:"#59B031",[V.JPEG]:"#59B031",[V.JSON]:"#71C3EB",[V.M4A]:"#1795E3",[V.MOV]:"#E63324",[V.MP3]:"#1795E3",[V.MP4]:"#E63324",[V.OGG]:"#1795E3",[V.PDF]:"#E44948",[V.PNG]:"#59B031",[V.POWERPOINT]:"#B54A2B",[V.RAR]:"#F8AB36",[V.STP]:"#3764B1",[V.TEXT]:"#3162AB",[V.UNKNOWN]:"#999999",[V.VIDEO]:"#E63324",[V.WAV]:"#1795E3",[V.WMA]:"#1795E3",[V.WORD]:"#3162AB",[V.XML]:"#71C3EB",[V.YAML]:"#71C3EB",[V.ZIP]:"#F8AB36"}});var Ra,Le,wp=u(()=>{"use strict";I();J();w();qi();Rp();Ri();Lp();Ra=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Le=class extends W{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$}render(){let e=this.variant&&Object.values(et).includes(this.variant)?this.variant:et.fluid_topics,r=e!==et.material||!!this.value;return S`
637
+ `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,o;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Ad(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${R.transitionDuration}, left ${R.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||kc(e,this.ignoreMatchingElements,this.eventsTarget)}};qe.elementDefinitions={"ft-typography":se};qe.styles=Xm;Rr([Rn()],qe.prototype,"text",void 0);Rr([h({type:Boolean})],qe.prototype,"manual",void 0);Rr([h({type:Boolean})],qe.prototype,"inline",void 0);Rr([or()],qe.prototype,"delay",void 0);Rr([h()],qe.prototype,"position",void 0);Rr([Ae([])],qe.prototype,"ignoreMatchingElements",void 0);Rr([Cc()],qe.prototype,"slotNodes",void 0);Rr([U(".ft-tooltip--container")],qe.prototype,"container",void 0);Rr([U(".ft-tooltip")],qe.prototype,"tooltip",void 0);Rr([U(".ft-tooltip--content")],qe.prototype,"tooltipContent",void 0);Rr([H()],qe.prototype,"visible",void 0)});var M3=u(()=>{"use strict"});var N3=u(()=>{"use strict";w();Op();G("ft-tooltip")(qe)});var Ep=u(()=>{"use strict";Op();rp();M3();N3()});var et,Lp=u(()=>{"use strict";(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(et||(et={}))});function fl(t,e){var r,o,n,a;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,l]=(((r=E7.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(a=(n=(o=Ap.get(l))!==null&&o!==void 0?o:Ap.get(e))!==null&&n!==void 0?n:Ap.get(s))!==null&&a!==void 0?a:V.UNKNOWN}var we,V,Ap,E7,wD,Rp=u(()=>{"use strict";(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CLOUD_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM_REGULAR="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS_REGULAR="&#xe9bd;",t.PERSON_CHALKBOARD_REGULAR="&#xe9be;"})(we||(we={}));(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(V||(V={}));Ap=new Map([...["abw"].map(t=>[t,V.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,V.AUDIO]),...["avi"].map(t=>[t,V.AVI]),...["chm","xhs"].map(t=>[t,V.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,V.CODE]),...["csv"].map(t=>[t,V.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,V.DITA]),...["epub"].map(t=>[t,V.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,V.EXCEL]),...["flac"].map(t=>[t,V.FLAC]),...["gif"].map(t=>[t,V.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,V.GZIP]),...["html","htm","xhtml"].map(t=>[t,V.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,V.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,V.JPEG]),...["json"].map(t=>[t,V.JSON]),...["m4a","m4p"].map(t=>[t,V.M4A]),...["mov","qt"].map(t=>[t,V.MOV]),...["mp3"].map(t=>[t,V.MP3]),...["mp4","m4v"].map(t=>[t,V.MP4]),...["ogg","oga"].map(t=>[t,V.OGG]),...["pdf","ps"].map(t=>[t,V.PDF]),...["png"].map(t=>[t,V.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,V.POWERPOINT]),...["rar"].map(t=>[t,V.RAR]),...["stp"].map(t=>[t,V.STP]),...["txt","rtf","md","mdown"].map(t=>[t,V.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,V.VIDEO]),...["wav"].map(t=>[t,V.WAV]),...["wma"].map(t=>[t,V.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,V.WORD]),...["xml","xsl","rdf"].map(t=>[t,V.XML]),...["yaml","yml","x-yaml"].map(t=>[t,V.YAML]),...["zip"].map(t=>[t,V.ZIP])]),E7=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);wD={[V.ABW]:"#91ABC6",[V.AUDIO]:"#1795E3",[V.AVI]:"#E63324",[V.CHM]:"#71C3EB",[V.CODE]:"#71C3EB",[V.CSV]:"#1F7345",[V.DITA]:"#71C3EB",[V.EPUB]:"#85B926",[V.EXCEL]:"#1F7345",[V.FLAC]:"#1795E3",[V.GIF]:"#59B031",[V.GZIP]:"#F8AB36",[V.HTML]:"#71C3EB",[V.IMAGE]:"#59B031",[V.JPEG]:"#59B031",[V.JSON]:"#71C3EB",[V.M4A]:"#1795E3",[V.MOV]:"#E63324",[V.MP3]:"#1795E3",[V.MP4]:"#E63324",[V.OGG]:"#1795E3",[V.PDF]:"#E44948",[V.PNG]:"#59B031",[V.POWERPOINT]:"#B54A2B",[V.RAR]:"#F8AB36",[V.STP]:"#3764B1",[V.TEXT]:"#3162AB",[V.UNKNOWN]:"#999999",[V.VIDEO]:"#E63324",[V.WAV]:"#1795E3",[V.WMA]:"#1795E3",[V.WORD]:"#3162AB",[V.XML]:"#71C3EB",[V.YAML]:"#71C3EB",[V.ZIP]:"#F8AB36"}});var Ra,Le,wp=u(()=>{"use strict";I();J();w();qi();Rp();Ri();Lp();Ra=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Le=class extends W{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$}render(){let e=this.variant&&Object.values(et).includes(this.variant)?this.variant:et.fluid_topics,r=e!==et.material||!!this.value;return S`
638
638
  <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
639
639
  ${no(this.resolvedIcon)}
640
640
  <slot ?hidden=${r}></slot>
@@ -1825,7 +1825,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1825
1825
  outline: revert;
1826
1826
  }
1827
1827
  `});function gy(t){var e;return((e=rr(t))===null||e===void 0?void 0:e.openMode)===Ws.EXTERNAL}function Pl(t){return gy(t)?rr(t).originUrl:Fc(t)}function yy(t,e){return Yr(e&&gy(t)?"_blank":void 0)}var Df=u(()=>{"use strict";Bo();Da();w()});var Nn,Pn,Il,$l,zl,Fa,Ua=u(()=>{"use strict";Nn=class extends CustomEvent{constructor(e,r){super("ft-search-result-click",{detail:{result:e,rank:r},bubbles:!0,composed:!0})}},Pn=class extends CustomEvent{constructor(e,r){super("ft-search-result-open-context-menu",{detail:{result:e,rank:r},bubbles:!0,composed:!0})}},Il=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},$l=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},zl=class extends CustomEvent{constructor(e,r,o){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:o}})}},Fa=class t extends Event{constructor(){super(t.eventName)}};Fa.eventName="search-context-clear-all-filters"});var LL,Ff,Uf=u(()=>{"use strict";I();LL={},Ff=_`
1828
- `});var by=u(()=>{"use strict"});var wr,In=u(()=>{"use strict";(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(wr||(wr={}))});var AL,vy,xy=u(()=>{"use strict";w();AL={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var r;let o=+((r=e.payload)!==null&&r!==void 0?r:20);t.request.paging.perPage=isNaN(o)?20:ao(1,o,1e3)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestSortId:(t,e)=>{t.request.sortId=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]},setKeywordMatch:(t,e)=>{t.request.keywordMatch=e.payload}},vy=t=>uo.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],sortId:void 0,paging:{page:1,perPage:20},keywordMatch:void 0},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,announcements:void 0,suggestResults:void 0,configuration:void 0},reducers:AL})});var Dl,Sy=u(()=>{"use strict";Wr();Dl=class extends Lt{constructor(e){super(!0,e),this.cache.registerFinal("search-configuration",async()=>(await this.awaitApi).getSearchConfiguration())}async launchSearch(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((o,n)=>o.id.localeCompare(n.id))};return this.cache.get("search-"+this.hash(r),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(r),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}async getConfiguration(){return this.cache.get("search-configuration")}sortFilters(e){return e.map(r=>r.valueFilter==null?r:{...r,valueFilter:{...r.valueFilter,values:[...r.valueFilter.values].sort((o,n)=>o.localeCompare(n))}}).sort((r,o)=>r.key.localeCompare(o.key))}}});var Cy,Oy,$n,Hf=u(()=>{"use strict";In();w();xy();Bo();Sy();Ua();Cy=t=>t.request.virtualField===Ci.TITLE_ONLY&&t.request.scope===fn.DOCUMENTS,Oy=t=>t.request.keywordMatch==Do.MANDATORY,$n=class t extends ya{static build(e,r){return new t(vy(e.trim()||"context"),r)}constructor(e,r){super(),this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.onNewNeededRequest=o=>{o==wr.CLUSTERED_SEARCH&&this.launchSearch(this.buildSearchRequest(this.store.getState()))},this.localesDebouncer=new ge(10),this.searchDebouncer=new ge(100),this.launchSearch=o=>this.searchDebouncer.run(()=>this.fetchSearchData(o??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=o=>({...o.request,facets:this.facetIds.map(n=>({id:n}))}),this.suggestDebouncer=new ge(1e3),this.launchSuggest=o=>this.suggestDebouncer.run(()=>this.fetchSuggestData(o??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=o=>{var n;return{input:o.liveQuery,metadataFilters:o.request.metadataFilters,sort:(n=o.request.sort)!==null&&n!==void 0?n:[],sortId:o.request.sortId,contentLocale:o.request.contentLocale,scope:o.request.scope,keywordMatch:o.request.keywordMatch}},this.service=r??new Dl,this.service.cache.addEventListener("clear-cache",o=>{o.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=dn(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=dn(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.service.getConfiguration().then(e=>{this.store.actions.configuration(e),this.setSortId(this.store.getState().request.sortId)}),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var r;let o=(r=this.store.getState().locales)!==null&&r!==void 0?r:[],n=this.store.getState().request.contentLocale;if(e!=n){if(o.length>0){let a=s=>o.some(l=>l.lang==s);a(e)||(e=a(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}get sortOptions(){var e,r;return(r=(e=this.store.getState().configuration)===null||e===void 0?void 0:e.sortOptions)!==null&&r!==void 0?r:[]}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setSortId(e){var r;if(this.store.actions.setPageNumber(1),e==null||this.sortOptions.length==0)return this.store.actions.setRequestSortId(e),e;let o=(r=this.sortOptions.find(n=>n.id==e))!==null&&r!==void 0?r:this.sortOptions[0];return this.store.actions.setRequestSortId(o.id),o.id}setFilters(e){let r=e.filter(o=>!o.valueFilter||o.valueFilter.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Ci.TITLE_ONLY),this.store.actions.setRequestScope(fn.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Ci.EVERYWHERE),this.store.actions.setRequestScope(fn.DEFAULT)),this.store.actions.setPageNumber(1)}setKeywordMatch(e){this.store.actions.setKeywordMatch(e),this.store.actions.setPageNumber(1)}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return Cy(this.store.getState())}get keywordMatch(){return Oy(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Fa)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,r){let o=this.facetIds.filter(n=>n!=e);r&&o.push(r),this.facetIds=o}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(o=>o.id),...((e=r.metadataFilters)!==null&&e!==void 0?e:[]).map(o=>o.key)])]}set facetIds(e){let o=[...new Set(e)].map(n=>({id:n}));this.store.actions.setRequestFacets(o)}setFilter(e,r){this.setValueFilter(e,r)}setValueFilter(e,r){let o=this.store.getState().request.metadataFilters,n={key:e,valueFilter:{values:r,negative:!1}},a=[...o.filter(s=>!s.valueFilter),...o.filter(s=>s.valueFilter&&s.key!==n.key),n];this.setFilters(a)}setDateFilter(e,r){let o=this.store.getState().request.metadataFilters,n={key:e,dateFilter:{type:r}},a=[...o.filter(s=>!s.dateFilter),...o.filter(s=>s.dateFilter&&s.key!==n.key),n];this.setFilters(a)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,o=[...r.filter(n=>!n.dateFilter),...r.filter(n=>n.dateFilter&&n.key!==e)];this.setFilters(o)}setRangeFilter(e,r,o){let n=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:r,to:o}},s=[...n.filter(l=>!l.rangeFilter),...n.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,o=[...r.filter(n=>!n.rangeFilter),...r.filter(n=>n.rangeFilter&&n.key!==e)];this.setFilters(o)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var r,o,n,a,s;if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),!!this.isRequestNeeded(wr.CLUSTERED_SEARCH))try{if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{!((o=this.store.getState().results)===null||o===void 0)&&o.length||this.store.actions.results(void 0),this.cancelableSearch=Zi(this.service.launchSearch(e));let l=await this.cancelableSearch;if(this.store.actions.announcements(l.announcements),l.paging.currentPage<=1)this.store.actions.results(l.results),this.store.actions.facets(l.facets),this.store.actions.spellcheck(l.spellcheck);else{let d=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(l.results);this.store.actions.results(d),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(l.paging.currentPage-1)*((a=e.paging.perPage)!==null&&a!==void 0?a:20)+1}`})}this.store.actions.paging(l.paging)}}catch(l){l instanceof Nr||(console.error(l),(s=this.errorHandler)===null||s===void 0||s.call(this,l))}}async fetchSuggestData(e){var r;try{if((r=this.cancelableSuggest)===null||r===void 0||r.cancel(),e.input.length!=0&&e.input.length<3)return;this.cancelableSuggest=Zi(this.service.launchSuggest(e));let o=await this.cancelableSuggest;this.store.actions.suggestResults(o.suggestions)}catch(o){!(o instanceof Nr)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}}});var Ey,Vf,Ly,Gf,RL,wL,ur,$i=u(()=>{"use strict";w();J();In();Hf();Ey=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Vf=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ly=Symbol("registerInterval"),Gf=Symbol("registerAttempts"),RL=40,wL=We(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var n,a,s;super.willUpdate(o),o.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(a=o.get("neededSearchRequests"))!==null&&a!==void 0?a:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(o){this.clearStateManager(),this.stateManager=o,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(o.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Gf]=0,this.tryToRegisterToContext(),this[Ly]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Gf]>RL?window.clearInterval(this[Ly]):(this[Gf]++,this.dispatchEvent(new Vf))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ey([H()],e.prototype,"stateManager",void 0),Ey([H({hasChanged:Vt})],e.prototype,"neededSearchRequests",void 0),e}),ur=class extends wL(Er){}});function Ha(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Ga(t){var e,r;return t.dateFilter?{key:t.key,type:"DATE",dateValue:t.dateFilter.type}:t.rangeFilter?{key:t.key,type:"RANGE",from:t.rangeFilter.from,to:t.rangeFilter.to}:{key:t.key,values:(e=t.valueFilter)===null||e===void 0?void 0:e.values,negative:(r=t.valueFilter)===null||r===void 0?void 0:r.negative}}var Wf=u(()=>{"use strict"});var Bl,Ay=u(()=>{"use strict";w();Bo();Wr();Wf();Bl=class{constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.document=void 0,this.sendEvent=o=>{if(!this.canSendEvent()||!o)return;let n=this.store.getState().request;this.document==null?this.sendKhubSearchEvent(n,o):this.sendDocumentSearchEvent(n,o)},this.eventsService=r??new al,this.resultsWatcher=dn(e,o=>o.results,this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.document=e}setDocumentSearchFromMap(e){this.setDocumentSearch(this.convertToAnalyticsMap(e))}initAppInfo(){let{apiIntegrationIdentifier:e,apiIntegrationAppVersion:r}=j.getState();this.setAppName(e??"unknown"),this.setAppVersion(r??"unknown")}convertToAnalyticsMap(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=j.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r){let o={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Ha(e.metadataFilters),facets:e.metadataFilters.map(n=>Ga(n))}};this.eventsService.sendKhubSearchEvent(o)}sendDocumentSearchEvent(e,r){if(e.metadataFilters.find(n=>{var a;return n.key==="ft:publicationId"&&((a=n.valueFilter)===null||a===void 0?void 0:a.values[0])===this.document.id})!==void 0){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query},document:this.document};this.eventsService.sendDocumentSearchEvent(n)}}sendResultClickedEvent(e,r){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==Fr.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.SEARCH_PAGE__SELECT,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:Ha(o.metadataFilters),facets:o.metadataFilters.map(s=>Ga(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,r){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==Fr.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:Ha(o.metadataFilters),facets:o.metadataFilters.map(s=>Ga(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case Fr.MAP:return{id:e.map.mapId,title:e.map.title,type:zo.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Fr.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:zo.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Fr.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:zo.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case Fr.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:zo.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case Fr.HTML_PACKAGE_PAGE:return{id:e.htmlPackagePage.packageId,title:e.htmlPackagePage.title,type:zo.HTML_PACKAGE,metadata:e.htmlPackagePage.metadata};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var r;return(r=rr(e))===null||r===void 0?void 0:r.originUrl}}});var pt,Ue,jf=u(()=>{"use strict";I();J();w();Uf();$i();Wr();ol();Ay();Ua();pt=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Ue=class extends Er{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=$n.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new Bl(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this.addStore(j)}render(){return S`
1828
+ `});var by=u(()=>{"use strict"});var wr,In=u(()=>{"use strict";(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(wr||(wr={}))});var AL,vy,xy=u(()=>{"use strict";w();AL={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{var r;let o=+((r=e.payload)!==null&&r!==void 0?r:20);t.request.paging.perPage=isNaN(o)?20:ao(1,o,1e3)},setPageNumber:(t,e)=>{t.request.paging.page=isNaN(e.payload)?1:Math.max(1,e.payload)},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestSortId:(t,e)=>{t.request.sortId=e.payload},setRequestFilters:(t,e)=>{t.request.metadataFilters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setOtherQueryParams:(t,e)=>{t.request.otherQueryParams=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]},setKeywordMatch:(t,e)=>{t.request.keywordMatch=e.payload}},vy=t=>uo.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],sortId:void 0,paging:{page:1,perPage:20},keywordMatch:void 0},liveQuery:"",paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,announcements:void 0,suggestResults:void 0,configuration:void 0},reducers:AL})});var Dl,Sy=u(()=>{"use strict";Wr();Dl=class extends Lt{constructor(e){super(!0,e),this.cache.registerFinal("search-configuration",async()=>(await this.awaitApi).getSearchConfiguration())}async launchSearch(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((o,n)=>o.id.localeCompare(n.id))};return this.cache.get("search-"+this.hash(r),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){let r={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(r),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}async getConfiguration(){return this.cache.get("search-configuration")}sortFilters(e){return e.map(r=>r.valueFilter==null?r:{...r,valueFilter:{...r.valueFilter,values:[...r.valueFilter.values].sort((o,n)=>o.localeCompare(n))}}).sort((r,o)=>r.key.localeCompare(o.key))}}});var Cy,Oy,$n,Hf=u(()=>{"use strict";In();w();xy();Bo();Sy();Ua();Cy=t=>t.request.virtualField===Ci.TITLE_ONLY&&t.request.scope===fn.DOCUMENTS,Oy=t=>t.request.keywordMatch==Do.MANDATORY,$n=class t extends ya{static build(e,r){return new t(vy(e.trim()||"context"),r)}constructor(e,r){super(),this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.onNewNeededRequest=o=>{o==wr.CLUSTERED_SEARCH&&this.launchSearch(this.buildSearchRequest(this.store.getState()))},this.localesDebouncer=new ge(10),this.searchDebouncer=new ge(100),this.launchSearch=o=>this.searchDebouncer.run(()=>this.fetchSearchData(o??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=o=>({...o.request,facets:this.facetIds.map(n=>({id:n}))}),this.suggestDebouncer=new ge(1e3),this.launchSuggest=o=>this.suggestDebouncer.run(()=>this.fetchSuggestData(o??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=o=>{var n;return{input:o.liveQuery,metadataFilters:o.request.metadataFilters,sort:(n=o.request.sort)!==null&&n!==void 0?n:[],sortId:o.request.sortId,contentLocale:o.request.contentLocale,scope:o.request.scope,keywordMatch:o.request.keywordMatch}},this.service=r??new Dl,this.service.cache.addEventListener("clear-cache",o=>{o.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=dn(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=dn(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.service.getConfiguration().then(e=>{this.store.actions.configuration(e),this.setSortId(this.store.getState().request.sortId)}),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.liveQuery(e),this.store.actions.setPageNumber(1)}setContentLocale(e){var r;let o=(r=this.store.getState().locales)!==null&&r!==void 0?r:[],n=this.store.getState().request.contentLocale;if(e!=n){if(o.length>0){let a=s=>o.some(l=>l.lang==s);a(e)||(e=a(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([])}return e}forceContentLocale(e){this.store.actions.setRequestContentLocale(e)}setPageSize(e){this.store.actions.setPageSize(e)}setPageNumber(e){this.store.actions.setPageNumber(e)}get sortOptions(){var e,r;return(r=(e=this.store.getState().configuration)===null||e===void 0?void 0:e.sortOptions)!==null&&r!==void 0?r:[]}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1)}setSortId(e){var r;if(this.store.actions.setPageNumber(1),e==null||this.sortOptions.length==0)return this.store.actions.setRequestSortId(e),e;let o=(r=this.sortOptions.find(n=>n.id==e))!==null&&r!==void 0?r:this.sortOptions[0];return this.store.actions.setRequestSortId(o.id),o.id}setFilters(e){let r=e.filter(o=>!o.valueFilter||o.valueFilter.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1)}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e)}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(Ci.TITLE_ONLY),this.store.actions.setRequestScope(fn.DOCUMENTS)):(this.store.actions.setRequestVirtualField(Ci.EVERYWHERE),this.store.actions.setRequestScope(fn.DEFAULT)),this.store.actions.setPageNumber(1)}setKeywordMatch(e){this.store.actions.setKeywordMatch(e),this.store.actions.setPageNumber(1)}setVirtualField(e){this.store.actions.setRequestVirtualField(e)}get searchInDocumentTitlesOnly(){return Cy(this.store.getState())}get keywordMatch(){return Oy(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Fa)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,r){let o=this.facetIds.filter(n=>n!=e);r&&o.push(r),this.facetIds=o}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(o=>o.id),...((e=r.metadataFilters)!==null&&e!==void 0?e:[]).map(o=>o.key)])]}set facetIds(e){let o=[...new Set(e)].map(n=>({id:n}));this.store.actions.setRequestFacets(o)}setFilter(e,r){this.setValueFilter(e,r)}setValueFilter(e,r){let o=this.store.getState().request.metadataFilters,n={key:e,valueFilter:{values:r,negative:!1}},a=[...o.filter(s=>!s.valueFilter),...o.filter(s=>s.valueFilter&&s.key!==n.key),n];this.setFilters(a)}setDateFilter(e,r){let o=this.store.getState().request.metadataFilters,n={key:e,dateFilter:{type:r}},a=[...o.filter(s=>!s.dateFilter),...o.filter(s=>s.dateFilter&&s.key!==n.key),n];this.setFilters(a)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,o=[...r.filter(n=>!n.dateFilter),...r.filter(n=>n.dateFilter&&n.key!==e)];this.setFilters(o)}setRangeFilter(e,r,o){let n=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:r,to:o}},s=[...n.filter(l=>!l.rangeFilter),...n.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,o=[...r.filter(n=>!n.rangeFilter),...r.filter(n=>n.rangeFilter&&n.key!==e)];this.setFilters(o)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.store.actions.setRequest({...e,facets:this.store.getState().request.facets}),this.store.actions.liveQuery(e.query),this.store.actions.setPageNumber(1)}setScope(e){this.store.actions.setRequestScope(e)}setOtherQueryParams(e){this.store.actions.setOtherQueryParams(e)}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var r,o,n,a,s;if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),!!this.isRequestNeeded(wr.CLUSTERED_SEARCH))try{if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{!((o=this.store.getState().results)===null||o===void 0)&&o.length||this.store.actions.results(void 0),this.cancelableSearch=Zi(this.service.launchSearch(e));let l=await this.cancelableSearch;if(this.store.actions.announcements(l.announcements),l.paging.currentPage<=1)this.store.actions.results(l.results),this.store.actions.facets(l.facets),this.store.actions.spellcheck(l.spellcheck);else{let d=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(l.results);this.store.actions.results(d),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(l.paging.currentPage-1)*((a=e.paging.perPage)!==null&&a!==void 0?a:20)+1}`})}this.store.actions.paging(l.paging)}}catch(l){l instanceof Nr||(console.error(l),(s=this.errorHandler)===null||s===void 0||s.call(this,l))}}async fetchSuggestData(e){var r;try{if((r=this.cancelableSuggest)===null||r===void 0||r.cancel(),e.input.length!=0&&e.input.length<3)return;this.cancelableSuggest=Zi(this.service.launchSuggest(e));let o=await this.cancelableSuggest;this.store.actions.suggestResults(o.suggestions)}catch(o){!(o instanceof Nr)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}}});var Ey,Vf,Ly,Gf,RL,wL,ur,$i=u(()=>{"use strict";w();J();In();Hf();Ey=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Vf=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ly=Symbol("registerInterval"),Gf=Symbol("registerAttempts"),RL=40,wL=We(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var n,a,s;super.willUpdate(o),o.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(a=o.get("neededSearchRequests"))!==null&&a!==void 0?a:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(o){this.clearStateManager(),this.stateManager=o,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(o.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Gf]=0,this.tryToRegisterToContext(),this[Ly]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[Gf]>RL?window.clearInterval(this[Ly]):(this[Gf]++,this.dispatchEvent(new Vf))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ey([H()],e.prototype,"stateManager",void 0),Ey([H({hasChanged:Vt})],e.prototype,"neededSearchRequests",void 0),e}),ur=class extends wL(Er){}});function Ha(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Ga(t){var e,r;return t.dateFilter?{key:t.key,type:"DATE",dateValue:t.dateFilter.type}:t.rangeFilter?{key:t.key,type:"RANGE",from:t.rangeFilter.from,to:t.rangeFilter.to}:{key:t.key,values:(e=t.valueFilter)===null||e===void 0?void 0:e.values,negative:(r=t.valueFilter)===null||r===void 0?void 0:r.negative}}var Wf=u(()=>{"use strict"});var Bl,Ay=u(()=>{"use strict";w();Bo();Wr();Wf();Bl=class{constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.document=void 0,this.sendEvent=o=>{if(!this.canSendEvent()||!o)return;let n=this.store.getState().request;this.document==null?this.sendKhubSearchEvent(n,o):this.sendDocumentSearchEvent(n,o)},this.eventsService=r??new al,this.resultsWatcher=dn(e,o=>o.results,this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.document=e}setDocumentSearchFromMap(e){this.setDocumentSearch(this.eventsService.convertMapToAnalyticsDocument(e))}initAppInfo(){let{apiIntegrationIdentifier:e,apiIntegrationAppVersion:r}=j.getState();this.setAppName(e??"unknown"),this.setAppVersion(r??"unknown")}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=j.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r){let o={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Ha(e.metadataFilters),facets:e.metadataFilters.map(n=>Ga(n))}};this.eventsService.sendKhubSearchEvent(o)}sendDocumentSearchEvent(e,r){if(e.metadataFilters.find(n=>{var a;return n.key==="ft:publicationId"&&((a=n.valueFilter)===null||a===void 0?void 0:a.values[0])===this.document.id})!==void 0){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:r.length},searchQuery:{terms:e.query},document:this.document};this.eventsService.sendDocumentSearchEvent(n)}}sendResultClickedEvent(e,r){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==Fr.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.SEARCH_PAGE__SELECT,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:Ha(o.metadataFilters),facets:o.metadataFilters.map(s=>Ga(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,r){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==Fr.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Si.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:Ha(o.metadataFilters),facets:o.metadataFilters.map(s=>Ga(s))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case Fr.MAP:return{id:e.map.mapId,title:e.map.title,type:zo.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Fr.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:zo.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Fr.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:zo.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case Fr.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:zo.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case Fr.HTML_PACKAGE_PAGE:return{id:e.htmlPackagePage.packageId,title:e.htmlPackagePage.title,type:zo.HTML_PACKAGE,metadata:e.htmlPackagePage.metadata};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var r;return(r=rr(e))===null||r===void 0?void 0:r.originUrl}}});var pt,Ue,jf=u(()=>{"use strict";I();J();w();Uf();$i();Wr();ol();Ay();Ua();pt=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Ue=class extends Er{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=$n.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new Bl(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this.addStore(j)}render(){return S`
1829
1829
  <slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click=${this.onResultClicked}
1830
1830
  @ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
1831
1831
  `}willUpdate(e){super.willUpdate(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.forceContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),e.has("sortId")&&this.stateManager.setSortId(this.sortId),e.has("sort")&&this.sort!==void 0&&this.stateManager.setSort(this.sort),e.has("pageSize")&&this.pageSize!==void 0&&this.stateManager.setPageSize(this.pageSize),e.has("searchInDocumentTitlesOnly")&&this.searchInDocumentTitlesOnly!==void 0&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),e.has("keywordMatch")&&this.stateManager.setKeywordMatch(this.keywordMatch),e.has("scope")&&this.scope!==void 0&&this.stateManager.setScope(this.scope),e.has("virtualField")&&this.virtualField!==void 0&&this.stateManager.setVirtualField(this.virtualField),e.has("ignoreEmptyQuery")&&this.ignoreEmptyQuery!==void 0&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery),e.has("openExternalDocumentInNewTab")&&this.openExternalDocumentInNewTab!==void 0&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("otherQueryParams")&&this.otherQueryParams!==void 0&&this.stateManager.setOtherQueryParams(this.otherQueryParams),e.has("session")&&this.session!==void 0&&e.get("session")!=null&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.clearResults(),this.stateManager.setQuery(this.query),this.stateManager.forceContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort),this.stateManager.setOtherQueryParams(this.otherQueryParams)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.clearResults()}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new $l(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new zl(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new Il(e))}reloadSavedSearches(){cp.clearMySearches()}clear(){this.stateManager.clear()}onResultClicked(e){this.eventManager.sendResultClickedEvent(e.detail.result,e.detail.rank)}onResultContextMenuOpened(e){this.eventManager.sendResultContextMenuOpenedEvent(e.detail.result,e.detail.rank)}};Ue.elementDefinitions={};Ue.styles=Ff;pt([Te({store:j.name})],Ue.prototype,"session",void 0);pt([h()],Ue.prototype,"query",void 0);pt([h()],Ue.prototype,"contentLocale",void 0);pt([or()],Ue.prototype,"pageSize",void 0);pt([h({type:Boolean})],Ue.prototype,"searchInDocumentTitlesOnly",void 0);pt([h()],Ue.prototype,"keywordMatch",void 0);pt([h()],Ue.prototype,"scope",void 0);pt([h()],Ue.prototype,"virtualField",void 0);pt([h({type:Boolean})],Ue.prototype,"ignoreEmptyQuery",void 0);pt([Te({store:j.name})],Ue.prototype,"openExternalDocumentInNewTab",void 0);pt([Ae([])],Ue.prototype,"filters",void 0);pt([h()],Ue.prototype,"sortId",void 0);pt([Ae([])],Ue.prototype,"sort",void 0);pt([Ae({})],Ue.prototype,"otherQueryParams",void 0);pt([Te({store:"search"})],Ue.prototype,"request",void 0);pt([Te({store:"search"})],Ue.prototype,"paging",void 0);pt([Te({store:"search",selector:t=>t.spellcheck})],Ue.prototype,"autocorrect",void 0);pt([h({attribute:!1})],Ue.prototype,"searchServiceProvider",void 0)});var Ry=u(()=>{"use strict";w();jf();G("ft-search-context")(Ue)});var wy={};oe(wy,{FtSearchContext:()=>Ue,FtSearchContextCssVariables:()=>LL,FtSearchStateManager:()=>$n,convertMetadataFilterToAnalyticsFacet:()=>Ga,getAnalyticsLastUpdate:()=>Ha,keywordMatchSelector:()=>Oy,searchInDocumentTitlesOnlySelector:()=>Cy,styles:()=>Ff});var _y=u(()=>{"use strict";Uf();by();jf();Hf();Wf();Ry()});var ky=u(()=>{"use strict"});var Ko,Kf=u(()=>{"use strict";dr();Ko=jr.build("designedSearchInput")});var pr,qf=u(()=>{"use strict";(function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"})(pr||(pr={}))});var Ty,Zf=u(()=>{"use strict";I();Ty=_`