@fluid-topics/ft-reader-metadata 2.2.27 → 2.2.29
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.
- package/build/ft-reader-metadata.light.js +34 -33
- package/build/ft-reader-metadata.min.js +85 -84
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Gu=Object.create;var ho=Object.defineProperty;var Qu=Object.getOwnPropertyDescriptor;var Yu=Object.getOwnPropertyNames;var Xu=Object.getPrototypeOf,Ju=Object.prototype.hasOwnProperty;var Wt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Zu=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Yu(e))!Ju.call(t,n)&&n!==r&&ho(t,n,{get:()=>e[n],enumerable:!(i=Qu(e,n))||i.enumerable});return t};var h=(t,e,r)=>(r=t!=null?Gu(Xu(t)):{},Zu(e||!t||!t.__esModule?ho(r,"default",{value:t,enumerable:!0}):r,t));var b=Wt((Wp,fo)=>{fo.exports=ftGlobals.wcUtils});var I=Wt((Gp,mo)=>{mo.exports=ftGlobals.lit});var
|
|
1
|
+
"use strict";(()=>{var Gu=Object.create;var ho=Object.defineProperty;var Qu=Object.getOwnPropertyDescriptor;var Yu=Object.getOwnPropertyNames;var Xu=Object.getPrototypeOf,Ju=Object.prototype.hasOwnProperty;var Wt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Zu=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Yu(e))!Ju.call(t,n)&&n!==r&&ho(t,n,{get:()=>e[n],enumerable:!(i=Qu(e,n))||i.enumerable});return t};var h=(t,e,r)=>(r=t!=null?Gu(Xu(t)):{},Zu(e||!t||!t.__esModule?ho(r,"default",{value:t,enumerable:!0}):r,t));var b=Wt((Wp,fo)=>{fo.exports=ftGlobals.wcUtils});var I=Wt((Gp,mo)=>{mo.exports=ftGlobals.lit});var K=Wt((Qp,go)=>{go.exports=ftGlobals.litDecorators});var fr=Wt((Ov,Oc)=>{Oc.exports=ftGlobals.litClassMap});var zc=Wt((jv,jc)=>{jc.exports=ftGlobals.litUnsafeHTML});var wu=Wt((qb,Cu)=>{Cu.exports=ftGlobals.litRepeat});var qu=h(b());var Se=h(I()),Ke=h(K()),le=h(b());var yo=h(I());var vo=yo.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
}
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
all: unset;
|
|
19
19
|
position: relative;
|
|
20
20
|
}
|
|
21
|
-
`;var ui=h(b()),xo=h(
|
|
21
|
+
`;var ui=h(b()),xo=h(K());var et;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found",t.requestedTopicFiltered="requested-topic-filtered"})(et||(et={}));var li=class extends CustomEvent{constructor(e){super(et.requestedTopicFiltered,{detail:e})}},tt;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(tt||(tt={}));var ed=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},es=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Zn=Symbol("registerInterval"),td=(0,ui.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[Zn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Zn]):this.dispatchEvent(new es)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Zn,ed([(0,xo.state)()],r.prototype,"stateManager",void 0),r}),ci=class extends td(ui.FtLitElementRedux){};var Cc=h(I()),Ue=h(K()),Fe=h(b());var as=globalThis,bo=t=>t,di=as.trustedTypes,Eo=di?di.createPolicy("lit-html",{createHTML:t=>t}):void 0,wo="$lit$",lt=`lit$${Math.random().toFixed(9).slice(2)}$`,Ro="?"+lt,rd=`<${Ro}>`,St=document,pi=()=>St.createComment(""),Ar=t=>t===null||typeof t!="object"&&typeof t!="function",ls=Array.isArray,id=t=>ls(t)||typeof t?.[Symbol.iterator]=="function",ts=`[
|
|
22
22
|
\f\r]`,Sr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,So=/-->/g,Ao=/>/g,bt=RegExp(`>|${ts}(?:([^\\s"'>=/]+)(${ts}*=${ts}*(?:[^
|
|
23
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),To=/'/g,_o=/"/g,Oo=/^(?:script|style|textarea|title)$/i,cs=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Io=cs(1),Mo=cs(2),Lo=cs(3),Tr=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),Co=new WeakMap,Et=St.createTreeWalker(St,129);function Po(t,e){if(!ls(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Eo!==void 0?Eo.createHTML(e):e}var nd=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":e===3?"<math>":"",o=Sr;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(o.lastIndex=p,u=o.exec(l),u!==null);)p=o.lastIndex,o===Sr?u[1]==="!--"?o=So:u[1]!==void 0?o=Ao:u[2]!==void 0?(Oo.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=bt):u[3]!==void 0&&(o=bt):o===bt?u[0]===">"?(o=n??Sr,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?bt:u[3]==='"'?_o:To):o===_o||o===To?o=bt:o===So||o===Ao?o=Sr:(o=bt,n=void 0);let m=o===bt&&t[a+1].startsWith("/>")?" ":"";s+=o===Sr?l+rd:d>=0?(i.push(c),l.slice(0,d)+wo+l.slice(d)+lt+m):l+lt+(d===-2?a:m)}return[Po(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},_r=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,o=0,a=e.length-1,l=this.parts,[c,u]=nd(e,r);if(this.el=t.createElement(c,i),Et.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=Et.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(wo)){let p=u[o++],m=n.getAttribute(d).split(lt),x=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:x[2],strings:m,ctor:x[1]==="."?is:x[1]==="?"?ns:x[1]==="@"?ss:Qt}),n.removeAttribute(d)}else d.startsWith(lt)&&(l.push({type:6,index:s}),n.removeAttribute(d));if(Oo.test(n.tagName)){let d=n.textContent.split(lt),p=d.length-1;if(p>0){n.textContent=di?di.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],pi()),Et.nextNode(),l.push({type:2,index:++s});n.append(d[p],pi())}}}else if(n.nodeType===8)if(n.data===Ro)l.push({type:2,index:s});else{let d=-1;for(;(d=n.data.indexOf(lt,d+1))!==-1;)l.push({type:7,index:s}),d+=lt.length-1}s++}}static createElement(e,r){let i=St.createElement("template");return i.innerHTML=e,i}};function Gt(t,e,r=t,i){if(e===Tr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,s=Ar(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Gt(t,n._$AS(t,e.values),n,i)),e}var rs=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,n=(e?.creationScope??St).importNode(r,!0);Et.currentNode=n;let s=Et.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new hi(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new os(s,this,e)),this._$AV.push(c),l=i[++a]}o!==l?.index&&(s=Et.nextNode(),o++)}return Et.currentNode=St,n}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},hi=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Gt(this,e,r),Ar(e)?e===Q||e==null||e===""?(this._$AH!==Q&&this._$AR(),this._$AH=Q):e!==this._$AH&&e!==Tr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):id(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Q&&Ar(this._$AH)?this._$AA.nextSibling.data=e:this.T(St.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=_r.createElement(Po(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let s=new rs(n,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=Co.get(e.strings);return r===void 0&&Co.set(e.strings,r=new _r(e)),r}k(e){ls(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.O(pi()),this.O(pi()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=bo(e).nextSibling;bo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Qt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,s){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Q}_$AI(e,r=this,i,n){let s=this.strings,o=!1;if(s===void 0)e=Gt(this,e,r,0),o=!Ar(e)||e!==this._$AH&&e!==Tr,o&&(this._$AH=e);else{let a=e,l,c;for(e=s[0],l=0;l<s.length-1;l++)c=Gt(this,a[i+l],r,l),c===Tr&&(c=this._$AH[l]),o||=!Ar(c)||c!==this._$AH[l],c===Q?e=Q:e!==Q&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!n&&this.j(e)}j(e){e===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},is=class extends Qt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Q?void 0:e}},ns=class extends Qt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Q)}},ss=class extends Qt{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){if((e=Gt(this,e,r,0)??Q)===Tr)return;let i=this._$AH,n=e===Q&&i!==Q||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==Q&&(i===Q||n);n&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},os=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Gt(this,e)}};var sd=as.litHtmlPolyfillSupport;sd?.(_r,hi),(as.litHtmlVersions??=[]).push("3.3.3");var Do=Symbol.for(""),od=t=>{if(t?.r===Do)return t?._$litStatic$},us=t=>({_$litStatic$:t,r:Do});var No=new Map,ds=t=>(e,...r)=>{let i=r.length,n,s,o=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=e[c];c<i&&(s=r[c],(n=od(s))!==void 0);)l+=n+e[++c],u=!0;c!==i&&a.push(s),o.push(l),c++}if(c===i&&o.push(e[i]),u){let d=o.join("$$lit$$");(e=No.get(d))===void 0&&(o.raw=o,No.set(d,e=o)),r=a}return t(e,...r)},ps=ds(Io),rh=ds(Mo),ih=ds(Lo);var hs=h(q()),Qo=h(b());var Ie;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(Ie||(Ie={}));var Me=h(I()),f=h(b()),ko=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.titleFont),rt=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.contentFont),E={fontFamily:rt,fontSize:f.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:f.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:f.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:f.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:f.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:f.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},At={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ko),fontSize:f.FtCssVariableFactory.extend("--ft-typography-title-font-size","",E.fontSize,"20px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",E.letterSpacing,"0.15px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-title-line-height","",E.lineHeight,"1.2"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",E.textDecoration,"inherit")},Tt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ko),fontSize:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",E.letterSpacing,"0.105px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",E.lineHeight,"1.7"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",E.textDecoration,"inherit")},_t={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",E.fontSize,"16px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",E.fontWeight,"600"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",E.letterSpacing,"0.144px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",E.lineHeight,"1.5"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",E.textDecoration,"inherit")},Ct={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",E.letterSpacing,"0.098px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",E.lineHeight,"1.7"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",E.textDecoration,"inherit")},wt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",E.fontSize,"16px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",E.letterSpacing,"0.496px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",E.lineHeight,"1.5"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",E.textDecoration,"inherit")},Ae={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",E.letterSpacing,"0.252px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",E.lineHeight,"1.4"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",E.textDecoration,"inherit")},Rt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",E.fontSize,"12px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",E.letterSpacing,"0.396px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",E.lineHeight,"1.33"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",E.textDecoration,"inherit")},Ot={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",E.fontSize,"10px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",E.letterSpacing,"0.33px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",E.lineHeight,"1.6"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",E.textDecoration,"inherit")},It={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",E.fontSize,"10px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",E.letterSpacing,"1.5px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",E.lineHeight,"1.6"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",E.textTransform,"uppercase"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",E.textDecoration,"inherit")},$e={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-button-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-button-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",E.fontWeight,"600"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",E.letterSpacing,"1.246px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-button-line-height","",E.lineHeight,"1.15"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",E.textTransform,"uppercase"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",E.textDecoration,"inherit")},Fo=Me.css`
|
|
23
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),To=/'/g,_o=/"/g,Oo=/^(?:script|style|textarea|title)$/i,cs=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Io=cs(1),Mo=cs(2),Lo=cs(3),Tr=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),Co=new WeakMap,Et=St.createTreeWalker(St,129);function Po(t,e){if(!ls(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Eo!==void 0?Eo.createHTML(e):e}var nd=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":e===3?"<math>":"",o=Sr;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(o.lastIndex=p,u=o.exec(l),u!==null);)p=o.lastIndex,o===Sr?u[1]==="!--"?o=So:u[1]!==void 0?o=Ao:u[2]!==void 0?(Oo.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=bt):u[3]!==void 0&&(o=bt):o===bt?u[0]===">"?(o=n??Sr,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?bt:u[3]==='"'?_o:To):o===_o||o===To?o=bt:o===So||o===Ao?o=Sr:(o=bt,n=void 0);let m=o===bt&&t[a+1].startsWith("/>")?" ":"";s+=o===Sr?l+rd:d>=0?(i.push(c),l.slice(0,d)+wo+l.slice(d)+lt+m):l+lt+(d===-2?a:m)}return[Po(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},_r=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,o=0,a=e.length-1,l=this.parts,[c,u]=nd(e,r);if(this.el=t.createElement(c,i),Et.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=Et.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(wo)){let p=u[o++],m=n.getAttribute(d).split(lt),x=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:x[2],strings:m,ctor:x[1]==="."?is:x[1]==="?"?ns:x[1]==="@"?ss:Qt}),n.removeAttribute(d)}else d.startsWith(lt)&&(l.push({type:6,index:s}),n.removeAttribute(d));if(Oo.test(n.tagName)){let d=n.textContent.split(lt),p=d.length-1;if(p>0){n.textContent=di?di.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],pi()),Et.nextNode(),l.push({type:2,index:++s});n.append(d[p],pi())}}}else if(n.nodeType===8)if(n.data===Ro)l.push({type:2,index:s});else{let d=-1;for(;(d=n.data.indexOf(lt,d+1))!==-1;)l.push({type:7,index:s}),d+=lt.length-1}s++}}static createElement(e,r){let i=St.createElement("template");return i.innerHTML=e,i}};function Gt(t,e,r=t,i){if(e===Tr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,s=Ar(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Gt(t,n._$AS(t,e.values),n,i)),e}var rs=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,n=(e?.creationScope??St).importNode(r,!0);Et.currentNode=n;let s=Et.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new hi(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new os(s,this,e)),this._$AV.push(c),l=i[++a]}o!==l?.index&&(s=Et.nextNode(),o++)}return Et.currentNode=St,n}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},hi=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Gt(this,e,r),Ar(e)?e===Q||e==null||e===""?(this._$AH!==Q&&this._$AR(),this._$AH=Q):e!==this._$AH&&e!==Tr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):id(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Q&&Ar(this._$AH)?this._$AA.nextSibling.data=e:this.T(St.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=_r.createElement(Po(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let s=new rs(n,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=Co.get(e.strings);return r===void 0&&Co.set(e.strings,r=new _r(e)),r}k(e){ls(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.O(pi()),this.O(pi()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=bo(e).nextSibling;bo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Qt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,s){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Q}_$AI(e,r=this,i,n){let s=this.strings,o=!1;if(s===void 0)e=Gt(this,e,r,0),o=!Ar(e)||e!==this._$AH&&e!==Tr,o&&(this._$AH=e);else{let a=e,l,c;for(e=s[0],l=0;l<s.length-1;l++)c=Gt(this,a[i+l],r,l),c===Tr&&(c=this._$AH[l]),o||=!Ar(c)||c!==this._$AH[l],c===Q?e=Q:e!==Q&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!n&&this.j(e)}j(e){e===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},is=class extends Qt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Q?void 0:e}},ns=class extends Qt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Q)}},ss=class extends Qt{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){if((e=Gt(this,e,r,0)??Q)===Tr)return;let i=this._$AH,n=e===Q&&i!==Q||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==Q&&(i===Q||n);n&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},os=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Gt(this,e)}};var sd=as.litHtmlPolyfillSupport;sd?.(_r,hi),(as.litHtmlVersions??=[]).push("3.3.3");var Do=Symbol.for(""),od=t=>{if(t?.r===Do)return t?._$litStatic$},us=t=>({_$litStatic$:t,r:Do});var No=new Map,ds=t=>(e,...r)=>{let i=r.length,n,s,o=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=e[c];c<i&&(s=r[c],(n=od(s))!==void 0);)l+=n+e[++c],u=!0;c!==i&&a.push(s),o.push(l),c++}if(c===i&&o.push(e[i]),u){let d=o.join("$$lit$$");(e=No.get(d))===void 0&&(o.raw=o,No.set(d,e=o)),r=a}return t(e,...r)},ps=ds(Io),rh=ds(Mo),ih=ds(Lo);var hs=h(K()),Qo=h(b());var Me;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(Me||(Me={}));var Le=h(I()),f=h(b()),ko=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.titleFont),rt=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.contentFont),E={fontFamily:rt,fontSize:f.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:f.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:f.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:f.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:f.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:f.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},At={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ko),fontSize:f.FtCssVariableFactory.extend("--ft-typography-title-font-size","",E.fontSize,"20px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",E.letterSpacing,"0.15px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-title-line-height","",E.lineHeight,"1.2"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",E.textDecoration,"inherit")},Tt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ko),fontSize:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",E.letterSpacing,"0.105px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",E.lineHeight,"1.7"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",E.textDecoration,"inherit")},_t={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",E.fontSize,"16px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",E.fontWeight,"600"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",E.letterSpacing,"0.144px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",E.lineHeight,"1.5"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",E.textDecoration,"inherit")},Ct={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",E.letterSpacing,"0.098px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",E.lineHeight,"1.7"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",E.textDecoration,"inherit")},wt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",E.fontSize,"16px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",E.letterSpacing,"0.496px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",E.lineHeight,"1.5"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",E.textDecoration,"inherit")},Ae={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",E.letterSpacing,"0.252px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",E.lineHeight,"1.4"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",E.textDecoration,"inherit")},Rt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",E.fontSize,"12px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",E.letterSpacing,"0.396px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",E.lineHeight,"1.33"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",E.textDecoration,"inherit")},Ot={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",E.fontSize,"10px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",E.letterSpacing,"0.33px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",E.lineHeight,"1.6"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",E.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",E.textDecoration,"inherit")},It={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",E.fontSize,"10px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",E.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",E.letterSpacing,"1.5px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",E.lineHeight,"1.6"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",E.textTransform,"uppercase"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",E.textDecoration,"inherit")},$e={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-button-font-family","",rt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-button-font-size","",E.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",E.fontWeight,"600"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",E.letterSpacing,"1.246px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-button-line-height","",E.lineHeight,"1.15"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",E.textTransform,"uppercase"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",E.textDecoration,"inherit")},Fo=Le.css`
|
|
24
24
|
.ft-typography--title {
|
|
25
25
|
font-family: ${At.fontFamily};
|
|
26
26
|
font-size: ${At.fontSize};
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
text-transform: ${At.textTransform};
|
|
31
31
|
text-decoration: ${At.textDecoration};
|
|
32
32
|
}
|
|
33
|
-
`,Uo=
|
|
33
|
+
`,Uo=Le.css`
|
|
34
34
|
.ft-typography--title-dense {
|
|
35
35
|
font-family: ${Tt.fontFamily};
|
|
36
36
|
font-size: ${Tt.fontSize};
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
text-transform: ${Tt.textTransform};
|
|
41
41
|
text-decoration: ${Tt.textDecoration};
|
|
42
42
|
}
|
|
43
|
-
`,$o=
|
|
43
|
+
`,$o=Le.css`
|
|
44
44
|
.ft-typography--subtitle1 {
|
|
45
45
|
font-family: ${_t.fontFamily};
|
|
46
46
|
font-size: ${_t.fontSize};
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
text-transform: ${_t.textTransform};
|
|
51
51
|
text-decoration: ${_t.textDecoration};
|
|
52
52
|
}
|
|
53
|
-
`,Bo=
|
|
53
|
+
`,Bo=Le.css`
|
|
54
54
|
.ft-typography--subtitle2 {
|
|
55
55
|
font-family: ${Ct.fontFamily};
|
|
56
56
|
font-size: ${Ct.fontSize};
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
text-decoration: ${Ct.textDecoration};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
`,Ho=
|
|
64
|
+
`,Ho=Le.css`
|
|
65
65
|
.ft-typography--body1 {
|
|
66
66
|
font-family: ${wt.fontFamily};
|
|
67
67
|
font-size: ${wt.fontSize};
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
text-transform: ${wt.textTransform};
|
|
72
72
|
text-decoration: ${wt.textDecoration};
|
|
73
73
|
}
|
|
74
|
-
`,Vo=
|
|
74
|
+
`,Vo=Le.css`
|
|
75
75
|
.ft-typography--body2 {
|
|
76
76
|
font-family: ${Ae.fontFamily};
|
|
77
77
|
font-size: ${Ae.fontSize};
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
text-transform: ${Ae.textTransform};
|
|
82
82
|
text-decoration: ${Ae.textDecoration};
|
|
83
83
|
}
|
|
84
|
-
`,jo=
|
|
84
|
+
`,jo=Le.css`
|
|
85
85
|
.ft-typography--caption {
|
|
86
86
|
font-family: ${Rt.fontFamily};
|
|
87
87
|
font-size: ${Rt.fontSize};
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
text-transform: ${Rt.textTransform};
|
|
92
92
|
text-decoration: ${Rt.textDecoration};
|
|
93
93
|
}
|
|
94
|
-
`,zo=
|
|
94
|
+
`,zo=Le.css`
|
|
95
95
|
.ft-typography--breadcrumb {
|
|
96
96
|
font-family: ${Ot.fontFamily};
|
|
97
97
|
font-size: ${Ot.fontSize};
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
text-transform: ${Ot.textTransform};
|
|
102
102
|
text-decoration: ${Ot.textDecoration};
|
|
103
103
|
}
|
|
104
|
-
`,qo=
|
|
104
|
+
`,qo=Le.css`
|
|
105
105
|
.ft-typography--overline {
|
|
106
106
|
font-family: ${It.fontFamily};
|
|
107
107
|
font-size: ${It.fontSize};
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
text-transform: ${It.textTransform};
|
|
112
112
|
text-decoration: ${It.textDecoration};
|
|
113
113
|
}
|
|
114
|
-
`,Ko=
|
|
114
|
+
`,Ko=Le.css`
|
|
115
115
|
.ft-typography--button {
|
|
116
116
|
font-family: ${$e.fontFamily};
|
|
117
117
|
font-size: ${$e.fontSize};
|
|
@@ -121,11 +121,11 @@
|
|
|
121
121
|
text-transform: ${$e.textTransform};
|
|
122
122
|
text-decoration: ${$e.textDecoration};
|
|
123
123
|
}
|
|
124
|
-
`,Wo=
|
|
124
|
+
`,Wo=Le.css`
|
|
125
125
|
.ft-typography {
|
|
126
126
|
vertical-align: inherit;
|
|
127
127
|
}
|
|
128
|
-
`;var Go=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},re=class extends Qo.FtLitElement{constructor(){super(...arguments),this.variant=
|
|
128
|
+
`;var Go=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},re=class extends Qo.FtLitElement{constructor(){super(...arguments),this.variant=Me.body1}render(){return this.element?ps`
|
|
129
129
|
<${us(this.element)}
|
|
130
130
|
part="text"
|
|
131
131
|
class="ft-typography ft-typography--${this.variant}">
|
|
@@ -164,15 +164,15 @@
|
|
|
164
164
|
position: relative;
|
|
165
165
|
word-break: break-word;
|
|
166
166
|
}
|
|
167
|
-
`;var ta=["top","right","bottom","left"],ea=["start","end"],ms=ta.reduce((t,e)=>t.concat(e,e+"-"+ea[0],e+"-"+ea[1]),[]),wr=Math.min,ut=Math.max,Rr=Math.round;var We=t=>({x:t,y:t}),ad={left:"right",right:"left",bottom:"top",top:"bottom"};function ra(t,e,r){return ut(t,wr(e,r))}function fi(t,e){return typeof t=="function"?t(e):t}function Or(t){return t.split("-")[0]}function dt(t){return t.split("-")[1]}function gs(t){return t==="x"?"y":"x"}function ys(t){return t==="y"?"height":"width"}function mi(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function vs(t){return gs(mi(t))}function ia(t,e,r){r===void 0&&(r=!1);let i=dt(t),n=vs(t),s=ys(n),o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=fs(o)),[o,fs(o)]}function na(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function fs(t){let e=Or(t);return ad[e]+t.slice(e.length)}function ld(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function sa(t){return typeof t!="number"?ld(t):{top:t,right:t,bottom:t,left:t}}function Mt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function oa(t,e,r){let{reference:i,floating:n}=t,s=mi(e),o=vs(e),a=ys(o),l=Or(e),c=s==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,m;switch(l){case"top":m={x:u,y:i.y-n.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-n.width,y:d};break;default:m={x:i.x,y:i.y}}let x=dt(e);return x&&(m[o]+=p*(x==="end"?1:-1)*(r&&c?-1:1)),m}async function aa(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=fi(e,t),x=sa(m),v=a[p?d==="floating"?"reference":"floating":d],_=Mt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),M=d==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(S))&&await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1},P=Mt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:S,strategy:l}):M);return{top:(_.top-P.top+x.top)/T.y,bottom:(P.bottom-_.bottom+x.bottom)/T.y,left:(_.left-P.left+x.left)/T.x,right:(P.right-_.right+x.right)/T.x}}var cd=50,la=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:aa},l=await(o.isRTL==null?void 0:o.isRTL(e)),c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=oa(c,i,l),p=i,m=0,x={};for(let A=0;A<s.length;A++){let v=s[A];if(!v)continue;let{name:_,fn:M}=v,{x:S,y:T,data:P,reset:O}=await M({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:x,rects:c,platform:a,elements:{reference:t,floating:e}});u=S??u,d=T??d,x[_]={...x[_],...P},O&&m<cd&&(m++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):O.rects),{x:u,y:d}=oa(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:x}};function ud(t,e,r){return(t?[...r.filter(n=>dt(n)===t),...r.filter(n=>dt(n)!==t)]:r.filter(n=>Or(n)===n)).filter(n=>t?dt(n)===t||(e?na(n)!==n:!1):!0)}var ca=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:s,middlewareData:o,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=ms,autoAlignment:m=!0,...x}=fi(t,e),A=d!==void 0||p===ms?ud(d||null,m,p):p,v=((r=o.autoPlacement)==null?void 0:r.index)||0,_=A[v];if(_==null)return{};if(a!==_)return{reset:{placement:A[0]}};let M=await l.detectOverflow(e,x),S=ia(_,s,await(l.isRTL==null?void 0:l.isRTL(c.floating))),T=[M[Or(_)],M[S[0]],M[S[1]]],P=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:_,overflows:T}],O=A[v+1];if(O)return{data:{index:v+1,overflows:P},reset:{placement:O}};let X=P.map(Oe=>{let Er=dt(Oe.placement);return[Oe.placement,Er&&u?Oe.overflows.slice(0,2).reduce((Ku,Wu)=>Ku+Wu,0):Oe.overflows[0],Oe.overflows]}).sort((Oe,Er)=>Oe[1]-Er[1]),ai=((n=X.filter(Oe=>Oe[2].slice(0,dt(Oe[0])?2:3).every(Er=>Er<=0))[0])==null?void 0:n[0])||X[0][0];return ai!==a?{data:{index:v+1,overflows:P},reset:{placement:ai}}:{}}}};var ua=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:M=>{let{x:S,y:T}=M;return{x:S,y:T}}},...c}=fi(t,e),u={x:r,y:i},d=await s.detectOverflow(e,c),p=mi(n),m=gs(p),x=u[m],A=u[p],v=(M,S)=>ra(S+d[M==="y"?"top":"left"],S,S-d[M==="y"?"bottom":"right"]);o&&(x=v(m,x)),a&&(A=v(p,A));let _=l.fn({...e,[m]:x,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[m]:o,[p]:a}}}}}};function yi(){return typeof window<"u"}function Pt(t){return pa(t)?(t.nodeName||"").toLowerCase():"#document"}function xe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function it(t){var e;return(e=(pa(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pa(t){return yi()?t instanceof Node||t instanceof xe(t).Node:!1}function Be(t){return yi()?t instanceof Element||t instanceof xe(t).Element:!1}function nt(t){return yi()?t instanceof HTMLElement||t instanceof xe(t).HTMLElement:!1}function da(t){return!yi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xe(t).ShadowRoot}function Ir(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=He(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ha(t){return/^(table|td|th)$/.test(Pt(t))}function Mr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var dd=/transform|translate|scale|rotate|perspective|filter/,pd=/paint|layout|strict|content/,Lt=t=>!!t&&t!=="none",xs;function Yt(t){let e=Be(t)?He(t):t;return Lt(e.transform)||Lt(e.translate)||Lt(e.scale)||Lt(e.rotate)||Lt(e.perspective)||!vi()&&(Lt(e.backdropFilter)||Lt(e.filter))||dd.test(e.willChange||"")||pd.test(e.contain||"")}function fa(t){let e=pt(t);for(;nt(e)&&!Xt(e);){if(Yt(e))return e;if(Mr(e))return null;e=pt(e)}return null}function vi(){return xs==null&&(xs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xs}function Xt(t){return/^(html|body|#document)$/.test(Pt(t))}function He(t){return xe(t).getComputedStyle(t)}function Lr(t){return Be(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pt(t){if(Pt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||da(t)&&t.host||it(t);return da(e)?e.host:e}function ma(t){let e=pt(t);return Xt(e)?(t.ownerDocument||t).body:nt(e)&&Ir(e)?e:ma(e)}function gi(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=ma(t),s=n===((i=t.ownerDocument)==null?void 0:i.body),o=xe(n);if(s){let a=xi(o);return e.concat(o,o.visualViewport||[],Ir(n)?n:[],a&&r?gi(a):[])}else return e.concat(n,gi(n,[],r))}function xi(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function va(t){let e=He(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=nt(t),s=n?t.offsetWidth:r,o=n?t.offsetHeight:i,a=Rr(r)!==s||Rr(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function xa(t){return Be(t)?t:t.contextElement}function Jt(t){let e=xa(t);if(!nt(e))return We(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:s}=va(e),o=(s?Rr(r.width):r.width)/i,a=(s?Rr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var hd=We(0);function ba(t){let e=xe(t);return!vi()||!e.visualViewport?hd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function fd(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===xe(t)}function Pr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),s=xa(t),o=We(1);e&&(i?Be(i)&&(o=Jt(i)):o=Jt(t));let a=fd(s,r,i)?ba(s):We(0),l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(s&&i){let p=xe(s),m=Be(i)?xe(i):i,x=p,A=xi(x);for(;A&&m!==x;){let v=Jt(A),_=A.getBoundingClientRect(),M=He(A),S=_.left+(A.clientLeft+parseFloat(M.paddingLeft))*v.x,T=_.top+(A.clientTop+parseFloat(M.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=S,c+=T,x=xe(A),A=xi(x)}}return Mt({width:u,height:d,x:l,y:c})}function bi(t,e){let r=Lr(t).scrollLeft;return e?e.left+r:Pr(it(t)).left+r}function Ea(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-bi(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function md(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,s=n==="fixed",o=it(i),a=e?Mr(e.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=We(1),u=We(0),d=nt(i);if((d||!s)&&((Pt(i)!=="body"||Ir(o))&&(l=Lr(i)),d)){let m=Pr(i);c=Jt(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=o&&!d&&!s?Ea(o,l):We(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function gd(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function yd(t){let e=Lr(t),r=t.ownerDocument.body,i=ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-e.scrollLeft+bi(t),o=-e.scrollTop;return He(r).direction==="rtl"&&(s+=ut(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:o}}var vd=25;function xd(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=xe(t),s=it(t),o=n.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(o){let p=!vi()||e==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(bi(s)<=0){let p=s.ownerDocument,m=p.body,x=getComputedStyle(m),A=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,v=Math.abs(s.clientWidth-m.clientWidth-A),_=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;_<=vd&&(a-=_)}return{width:a,height:l,x:c,y:u}}function bd(t,e){let r=Pr(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,s=Jt(t),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=n*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function ga(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=xd(t,r,e);else if(e==="document")i=yd(it(t));else if(Be(e))i=bd(e,r);else{let n=ba(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Mt(i)}function Ed(t,e){let r=e.get(t);if(r)return r;let i=gi(t,[],!1).filter(a=>Be(a)&&Pt(a)!=="body"),n=null,s=He(t).position==="fixed",o=s?pt(t):t;for(;Be(o)&&!Xt(o);){let a=He(o),l=Yt(o),c=n?n.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==o):n=a,o=pt(o)}return e.set(t,i),i}function Sd(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,o=[...r==="clippingAncestors"?Mr(e)?[]:Ed(e,this._c):[].concat(r),i],a=ga(e,o[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<o.length;p++){let m=ga(e,o[p],n);l=ut(m.top,l),c=wr(m.right,c),u=wr(m.bottom,u),d=ut(m.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Ad(t){let{width:e,height:r}=va(t);return{width:e,height:r}}function Td(t,e,r){let i=nt(e),n=it(e),s=r==="fixed",o=Pr(t,!0,s,e),a={scrollLeft:0,scrollTop:0},l=We(0);if((i||!s)&&((Pt(e)!=="body"||Ir(n))&&(a=Lr(e)),i)){let p=Pr(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=bi(n));let c=n&&!i&&!s?Ea(n,a):We(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function bs(t){return He(t).position==="static"}function ya(t,e){if(!nt(t)||He(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return it(t)===r&&(r=r.ownerDocument.body),r}function Sa(t,e){let r=xe(t);if(Mr(t))return r;if(!nt(t)){let n=pt(t);for(;n&&!Xt(n);){if(Be(n)&&!bs(n))return n;n=pt(n)}return r}let i=ya(t,e);for(;i&&ha(i)&&bs(i);)i=ya(i,e);return i&&Xt(i)&&bs(i)&&!Yt(i)?r:i||fa(t)||r}var _d=async function(t){let e=this.getOffsetParent||Sa,r=this.getDimensions,i=await r(t.floating);return{reference:Td(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cd(t){return He(t).direction==="rtl"}var Ei={convertOffsetParentRelativeRectToViewportRelativeRect:md,getDocumentElement:it,getClippingRect:Sd,getOffsetParent:Sa,getElementRects:_d,getClientRects:gd,getDimensions:Ad,getScale:Jt,isElement:Be,isRTL:Cd};var Aa=ca,Ta=ua;var _a=(t,e,r)=>{let i=new Map,n=r??{},s={...Ei,...n.platform,_c:i};return la(t,e,{...n,platform:s})};function Ca(t){return wd(t)}function Es(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function wd(t){for(let e=t;e;e=Es(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Es(t);e;e=Es(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Yt(r)||e.tagName==="BODY"))return e}return null}async function Si(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},_a(t,e,{strategy:i.strategy,platform:{...Ei,getOffsetParent:n=>Ei.getOffsetParent(n,Ca)},middleware:[Ta({crossAxis:!0}),Aa({allowedPlacements:[i.placement]})]})}var dr=h(b());var js=h(q());var wa=h(q(),1);var Ss=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Rd=t=>({fromAttribute:e=>{if(e==null)return Nr(t);try{return JSON.parse(e)}catch{return Nr(t)}},toAttribute:e=>JSON.stringify(e)});function Ra(t,e){return(0,wa.property)({type:Object,converter:Rd(t),hasChanged:Dr,...e??{}})}function Od(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Zt(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Zt(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=o=>Object.keys(o).filter(a=>o[a]!=null),s=n(t);if(r=s.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=r;i--!==0;){let o=s[i];if(!Zt(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Zt(t,e){try{return Od(t,e)}catch{return!1}}function Dr(t,e){return!Zt(t,e)}function Nr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Ai(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var Oa=h(q(),1);var As=t=>{let e=t??{};return(r,i)=>{var n;let s={hasChanged:Dr,attribute:!1,...e};(0,Oa.property)(s)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var Ti=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Nt=h(q(),1);var _i=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){n(a);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wi=h(I(),1);var Ci=class extends wi.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return(0,wi.adoptStyles)(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){Ss(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ia(t,e,...r){var i;let n=t.querySelector(e);for(let s of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(s);return n}var tr=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},Na,Ma=Symbol("constructorPrototype"),La=Symbol("constructorName"),Da=Symbol("exportpartsDebouncer"),Pa=Symbol("dynamicDependenciesLoaded"),er=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};er.eventName="exportparts-updated";var Ge=class extends Ci{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Na]=new _i(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Da].run(()=>{var n,s;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[La]=this.constructor.name,this[Ma]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[La]&&Object.setPrototypeOf(this,this[Ma])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Pa]||(r[Pa]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(er.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(er.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new er)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let s=[...n??[],i];r=Ia(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(e){var r,i,n,s,o,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(s=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let m=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],x=(a=(n=p.getAttribute("exportparts"))===null||n===void 0?void 0:n.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],A=[...m,...x].filter(l).map(v=>v.trim());for(let v of A)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Na=Da;tr([(0,Nt.property)()],Ge.prototype,"exportpartsPrefix",void 0);tr([Ra([])],Ge.prototype,"exportpartsPrefixes",void 0);tr([(0,Nt.property)({reflect:!0})],Ge.prototype,"exportparts",void 0);tr([(0,Nt.property)()],Ge.prototype,"customStylesheet",void 0);tr([(0,Nt.property)()],Ge.prototype,"elementToFocus",void 0);tr([(0,Nt.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Ri(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var kr=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),Dt=Symbol("internalStores"),Id=Ai(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Dt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Dt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Dt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Dt].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[ht].has(o.store):this[ht].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l,c;this[ht].set(o,a.subscribe(()=>this.updateFromStores())),this[kr].set(o,[]),Ri(a)&&(!((l=a.deprecatedKeys)===null||l===void 0)&&l.length&&this.reduxConstructor.reduxProperties.forEach((u,d)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(d)&&console.warn("Element",this,"is subscribed to deprecated key",d,"in store",a.name)}),a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,d)=>{if(typeof this[d]=="function"&&(!u.store||a.name===u.store)){let p=m=>this[d](m);a.addEventListener(u.eventName,p),this[kr].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ht].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ht].has(o)&&this[ht].get(o)(),this[ht].delete(o),(a=this[kr].get(o))===null||a===void 0||a.forEach(l=>l()),this[kr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ht,r=Dt,i=kr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),ka=class extends Id(Ge){};function ie(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Md=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fa=Md,Ts=()=>Math.random().toString(36).substring(7).split("").join("."),Ld={INIT:`@@redux/INIT${Ts()}`,REPLACE:`@@redux/REPLACE${Ts()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ts()}`},Oi=Ld;function Ii(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function _s(t,e,r){if(typeof t!="function")throw new Error(ie(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ie(1));return r(_s)(t,e)}let i=t,n=e,s=new Map,o=s,a=0,l=!1;function c(){o===s&&(o=new Map,s.forEach((v,_)=>{o.set(_,v)}))}function u(){if(l)throw new Error(ie(3));return n}function d(v){if(typeof v!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));let _=!0;c();let M=a++;return o.set(M,v),function(){if(_){if(l)throw new Error(ie(6));_=!1,c(),o.delete(M),s=null}}}function p(v){if(!Ii(v))throw new Error(ie(7));if(typeof v.type>"u")throw new Error(ie(8));if(typeof v.type!="string")throw new Error(ie(17));if(l)throw new Error(ie(9));try{l=!0,n=i(n,v)}finally{l=!1}return(s=o).forEach(M=>{M()}),v}function m(v){if(typeof v!="function")throw new Error(ie(10));i=v,p({type:Oi.REPLACE})}function x(){let v=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ie(11));function M(){let T=_;T.next&&T.next(u())}return M(),{unsubscribe:v(M)}},[Fa](){return this}}}return p({type:Oi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Fa]:x}}function Pd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Oi.INIT})>"u")throw new Error(ie(12));if(typeof r(void 0,{type:Oi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function Cs(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),n,s;try{Pd(r)}catch(o){s=o}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],m=r[p],x=a[p],A=m(x,l);if(typeof A>"u"){let v=l&&l.type;throw new Error(ie(14))}u[p]=A,c=c||A!==x}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Fr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function Ua(...t){return e=>(r,i)=>{let n=e(r,i),s=()=>{throw new Error(ie(15))},o={getState:n.getState,dispatch:(l,...c)=>s(l,...c)},a=t.map(l=>l(o));return s=Fr(...a)(n.dispatch),{...n,dispatch:s}}}function $a(t){return Ii(t)&&"type"in t&&typeof t.type=="string"}var Ga=Symbol.for("immer-nothing"),Ba=Symbol.for("immer-draftable"),de=Symbol.for("immer-state");function Ve(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Te=Object,ir=Te.getPrototypeOf,Ni="constructor",Bi="prototype",Is="configurable",Di="enumerable",Li="writable",Ur="value",Qe=t=>!!t&&!!t[de];function _e(t){return t?Qa(t)||Vi(t)||!!t[Ba]||!!t[Ni]?.[Ba]||ji(t)||zi(t):!1}var Nd=Te[Bi][Ni].toString(),Ha=new WeakMap;function Qa(t){if(!t||!Us(t))return!1;let e=ir(t);if(e===null||e===Te[Bi])return!0;let r=Te.hasOwnProperty.call(e,Ni)&&e[Ni];if(r===Object)return!0;if(!rr(r))return!1;let i=Ha.get(r);return i===void 0&&(i=Function.toString.call(r),Ha.set(r,i)),i===Nd}function Hi(t,e,r=!0){Hr(t)===0?(r?Reflect.ownKeys(t):Te.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Hr(t){let e=t[de];return e?e.type_:Vi(t)?1:ji(t)?2:zi(t)?3:0}var ws=(t,e,r=Hr(t))=>r===2?t.has(e):Te[Bi].hasOwnProperty.call(t,e),Ms=(t,e,r=Hr(t))=>r===2?t.get(e):t[e],ki=(t,e,r,i=Hr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function Dd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Vi=Array.isArray,ji=t=>t instanceof Map,zi=t=>t instanceof Set,Us=t=>typeof t=="object",rr=t=>typeof t=="function",Rs=t=>typeof t=="boolean";function kd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var st=t=>t.copy_||t.base_;var $s=t=>t.modified_?t.copy_:t.base_;function Ls(t,e){if(ji(t))return new Map(t);if(zi(t))return new Set(t);if(Vi(t))return Array[Bi].slice.call(t);let r=Qa(t);if(e===!0||e==="class_only"&&!r){let i=Te.getOwnPropertyDescriptors(t);delete i[de];let n=Reflect.ownKeys(i);for(let s=0;s<n.length;s++){let o=n[s],a=i[o];a[Li]===!1&&(a[Li]=!0,a[Is]=!0),(a.get||a.set)&&(i[o]={[Is]:!0,[Li]:!0,[Di]:a[Di],[Ur]:t[o]})}return Te.create(ir(t),i)}else{let i=ir(t);if(i!==null&&r)return{...t};let n=Te.create(i);return Te.assign(n,t)}}function qi(t,e=!1){return Ki(t)||Qe(t)||!_e(t)||(Hr(t)>1&&Te.defineProperties(t,{set:Mi,add:Mi,clear:Mi,delete:Mi}),Te.freeze(t),e&&Hi(t,(r,i)=>{qi(i,!0)},!1)),t}function Fd(){Ve(2)}var Mi={[Ur]:Fd};function Ki(t){return t===null||!Us(t)?!0:Te.isFrozen(t)}var Fi="MapSet",Ps="Patches",Va="ArrayMethods",Ya={};function kt(t){let e=Ya[t];return e||Ve(0,t),e}var ja=t=>!!Ya[t];var $r,Xa=()=>$r,Ud=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ja(Fi)?kt(Fi):void 0,arrayMethodsPlugin_:ja(Va)?kt(Va):void 0});function za(t,e){e&&(t.patchPlugin_=kt(Ps),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Ns(t){Ds(t),t.drafts_.forEach($d),t.drafts_=null}function Ds(t){t===$r&&($r=t.parent_)}var qa=t=>$r=Ud($r,t);function $d(t){let e=t[de];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ka(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[de].modified_&&(Ns(e),Ve(4)),_e(t)&&(t=Wa(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[de].base_,t,e)}else t=Wa(e,r);return Bd(e,t,!0),Ns(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Ga?t:void 0}function Wa(t,e){if(Ki(e))return e;let r=e[de];if(!r)return Ui(e,t.handledSet_,t);if(!Wi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);el(r,t)}return r.copy_}function Bd(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&qi(e,r)}function Ja(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Wi=(t,e)=>t.scope_===e,Hd=[];function Za(t,e,r,i){let n=st(t),s=t.type_;if(i!==void 0&&Ms(n,i,s)===e){ki(n,i,r,s);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Hi(n,(l,c)=>{if(Qe(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=t.draftLocations_.get(e)??Hd;for(let a of o)ki(n,a,r,s)}function Vd(t,e,r){t.callbacks_.push(function(n){let s=e;if(!s||!Wi(s,n))return;n.mapSetPlugin_?.fixSetContents(s);let o=$s(s);Za(t,s.draft_??s,o,r),el(s,n)})}function el(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let n=i.getPath(t);n&&i.generatePatches_(t,n,e)}Ja(t)}}function jd(t,e,r){let{scope_:i}=t;if(Qe(r)){let n=r[de];Wi(n,i)&&n.callbacks_.push(function(){Pi(t);let o=$s(n);Za(t,r,o,e)})}else _e(r)&&t.callbacks_.push(function(){let s=st(t);t.type_===3?s.has(r)&&Ui(r,i.handledSet_,i):Ms(s,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ui(Ms(t.copy_,e,t.type_),i.handledSet_,i)})}function Ui(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Qe(t)||e.has(t)||!_e(t)||Ki(t)||(e.add(t),Hi(t,(i,n)=>{if(Qe(n)){let s=n[de];if(Wi(s,r)){let o=$s(s);ki(t,i,o,t.type_),Ja(s)}}else _e(n)&&Ui(n,e,r)})),t}function zd(t,e){let r=Vi(t),i={type_:r?1:0,scope_:e?e.scope_:Xa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,s=$i;r&&(n=[i],s=Br);let{revoke:o,proxy:a}=Proxy.revocable(n,s);return i.draft_=a,i.revoke_=o,[a,i]}var $i={get(t,e){if(e===de)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let n=st(t);if(!ws(n,e,t.type_))return Kd(t,n,e);let s=n[e];if(t.finalized_||!_e(s)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&kd(e))return s;if(s===Os(t.base_,e)||qd(t,e,s)){Pi(t);let o=t.type_===1?+e:e,a=Fs(t.scope_,s,t,o);return t.copy_[o]=a}return s},has(t,e){return e in st(t)},ownKeys(t){return Reflect.ownKeys(st(t))},set(t,e,r){let i=tl(st(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=Os(st(t),e),s=n?.[de];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(Dd(r,n)&&(r!==void 0||ws(t.base_,e,t.type_)))return!0;Pi(t),ks(t)}return t.copy_[e]===r&&(r!==void 0||ws(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),jd(t,e,r)),!0},deleteProperty(t,e){return Pi(t),Os(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ks(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=st(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[Li]:!0,[Is]:t.type_!==1||e!=="length",[Di]:i[Di],[Ur]:r[e]}},defineProperty(){Ve(11)},getPrototypeOf(t){return ir(t.base_)},setPrototypeOf(){Ve(12)}},Br={};for(let t in $i){let e=$i[t];Br[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Br.deleteProperty=function(t,e){return Br.set.call(this,t,e,void 0)};Br.set=function(t,e,r){return $i.set.call(this,t[0],e,r,t[0])};function Os(t,e){let r=t[de];return(r?st(r):t)[e]}function qd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!_e(r)||r[de]?!1:t.baseRefs_.has(r)}function Kd(t,e,r){let i=tl(e,r);return i?Ur in i?i[Ur]:i.get?.call(t.draft_):void 0}function tl(t,e){if(!(e in t))return;let r=ir(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=ir(r)}}function ks(t){t.modified_||(t.modified_=!0,t.parent_&&ks(t.parent_))}function Pi(t){t.copy_||(t.assigned_=new Map,t.copy_=Ls(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Wd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(rr(e)&&!rr(r)){let s=r;r=e;let o=this;return function(l=s,...c){return o.produce(l,u=>r.call(this,u,...c))}}rr(r)||Ve(6),i!==void 0&&!rr(i)&&Ve(7);let n;if(_e(e)){let s=qa(this),o=Fs(s,e,void 0),a=!0;try{n=r(o),a=!1}finally{a?Ns(s):Ds(s)}return za(s,i),Ka(n,s)}else if(!e||!Us(e)){if(n=r(e),n===void 0&&(n=e),n===Ga&&(n=void 0),this.autoFreeze_&&qi(n,!0),i){let s=[],o=[];kt(Ps).generateReplacementPatches_(e,n,{patches_:s,inversePatches_:o}),i(s,o)}return n}else Ve(1,e)},this.produceWithPatches=(e,r)=>{if(rr(e))return(o,...a)=>this.produceWithPatches(o,l=>e(l,...a));let i,n;return[this.produce(e,r,(o,a)=>{i=o,n=a}),i,n]},Rs(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Rs(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Rs(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){_e(t)||Ve(8),Qe(t)&&(t=rl(t));let e=qa(this),r=Fs(e,t,void 0);return r[de].isManual_=!0,Ds(e),r}finishDraft(t,e){let r=t&&t[de];(!r||!r.isManual_)&&Ve(9);let{scope_:i}=r;return za(i,e),Ka(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let n=e[r];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}r>-1&&(e=e.slice(r+1));let i=kt(Ps).applyPatches_;return Qe(t)?i(t,e):this.produce(t,n=>i(n,e))}};function Fs(t,e,r,i){let[n,s]=ji(e)?kt(Fi).proxyMap_(e,r):zi(e)?kt(Fi).proxySet_(e,r):zd(e,r);return(r?.scope_??Xa()).drafts_.push(n),s.callbacks_=r?.callbacks_??[],s.key_=i,r&&i!==void 0?Vd(r,s,i):s.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:c}=l;s.modified_&&c&&c.generatePatches_(s,[],l)}),n}function rl(t){return Qe(t)||Ve(10,t),il(t)}function il(t){if(!_e(t)||Ki(t))return t;let e=t[de],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Ls(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Ls(t,!0);return Hi(r,(n,s)=>{ki(r,n,il(s))},i),e&&(e.finalized_=!1),r}var Gd=globalThis.Iterator,vf=typeof Gd?.from=="function";var Qd=new Wd,Bs=Qd.produce;function nl(t){return({dispatch:r,getState:i})=>n=>s=>typeof s=="function"?s(r,i,t):n(s)}var sl=nl(),ol=nl;var Yd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Fr:Fr.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Xd=t=>t&&typeof t.match=="function";function ft(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Ye(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>$a(i)&&i.type===t,r}var dl=class Vr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Vr.prototype)}static get[Symbol.species](){return Vr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Vr(...e[0].concat(this)):new Vr(...e.concat(this))}};function al(t){return _e(t)?Bs(t,()=>{}):t}function Gi(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Jd(t){return typeof t=="boolean"}var Zd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:s=!0}=e??{},o=new dl;return r&&(Jd(r)?o.push(sl):o.push(ol(r.extraArgument))),o},ep="RTK_autoBatch";var ll=t=>e=>{setTimeout(e,t)},tp=(t,e)=>r=>{let i=!1,n,s,o=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(s),r())};n=t(o),s=setTimeout(o,e)},rp=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),n=!0,s=!1,o=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?tp(window.requestAnimationFrame,100):ll(10):t.type==="callback"?t.queueNotification:ll(t.timeout),c=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[ep],s=!n,s&&(o||(o=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},ip=t=>function(r){let{autoBatch:i=!0}=r??{},n=new dl(t);return i&&n.push(rp(typeof i=="object"?i:void 0)),n};function pl(t){let e=Zd(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(Ii(r))l=Cs(r);else throw new Error(Ye(1));let c;typeof i=="function"?c=i(e):c=e();let u=Fr;n&&(u=Yd({trace:!1,...typeof n=="object"&&n}));let d=Ua(...c),p=ip(d),m=typeof a=="function"?a(p):p(),x=u(...m);return _s(l,o,x)}function hl(t){let e={},r=[],i,n={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(Ye(28));if(a in e)throw new Error(Ye(29));return e[a]=o,n},addAsyncThunk(s,o){return o.pending&&(e[s.pending.type]=o.pending),o.rejected&&(e[s.rejected.type]=o.rejected),o.fulfilled&&(e[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),n},addMatcher(s,o){return r.push({matcher:s,reducer:o}),n},addDefaultCase(s){return i=s,n}};return t(n),[e,r,i]}function np(t){return typeof t=="function"}function sp(t,e){let[r,i,n]=hl(e),s;if(np(t))s=()=>al(t());else{let a=al(t);s=()=>a}function o(a=s(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Qe(u)){let p=d(u,l);return p===void 0?u:p}else{if(_e(u))return Bs(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw new Error(Ye(9))}return p}}return u},a)}return o.getInitialState=s,o}var op=(t,e)=>Xd(t)?t.match(e):t(e);function ap(...t){return e=>t.some(r=>op(r,e))}var lp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cp=(t=21)=>{let e="",r=t;for(;r--;)e+=lp[Math.random()*64|0];return e},up=["name","message","stack","code"],Hs=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},cl=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},dp=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of up)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},ul="External signal was aborted",pp=(()=>{function t(e,r,i){let n=ft(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),s=ft(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=ft(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||dp)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:d!==void 0,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let m=i?.idGenerator?i.idGenerator(l):cp(),x=new AbortController,A,v;function _(S){v=S,x.abort()}c&&(c.aborted?_(ul):c.addEventListener("abort",()=>_(ul),{once:!0}));let M=(async function(){let S;try{let T=i?.condition?.(l,{getState:d,extra:p});if(fp(T)&&(T=await T),T===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(x.signal.aborted)throw{name:"AbortError",message:v||"Aborted"};let P=new Promise((O,X)=>{A=()=>{X({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",A,{once:!0})});u(s(m,l,i?.getPendingMeta?.({requestId:m,arg:l},{getState:d,extra:p}))),S=await Promise.race([P,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:x.signal,abort:_,rejectWithValue:((O,X)=>new Hs(O,X)),fulfillWithValue:((O,X)=>new cl(O,X))})).then(O=>{if(O instanceof Hs)throw O;return O instanceof cl?n(O.payload,m,l,O.meta):n(O,m,l)})])}catch(T){S=T instanceof Hs?o(null,m,l,T.payload,T.meta):o(T,m,l)}finally{A&&x.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(M,{abort:_,requestId:m,arg:l,unwrap(){return M.then(hp)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:n,settled:ap(o,n),typePrefix:e})}return t.withTypes=()=>t,t})();function hp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function fp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var fl=Symbol.for("rtk-slice-createasyncthunk"),Cf={[fl]:pp};function mp(t,e){return`${t}/${e}`}function gp({creators:t}={}){let e=t?.asyncThunk?.[fl];return function(i){let{name:n,reducerPath:s=n}=i;if(!n)throw new Error(Ye(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(vp()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(S,T){let P=typeof S=="string"?S:S.type;if(!P)throw new Error(Ye(12));if(P in l.sliceCaseReducersByType)throw new Error(Ye(13));return l.sliceCaseReducersByType[P]=T,c},addMatcher(S,T){return l.sliceMatchers.push({matcher:S,reducer:T}),c},exposeAction(S,T){return l.actionCreators[S]=T,c},exposeCaseReducer(S,T){return l.sliceCaseReducersByName[S]=T,c}};a.forEach(S=>{let T=o[S],P={reducerName:S,type:mp(n,S),createNotation:typeof i.reducers=="function"};bp(T)?Sp(P,T,c,e):xp(P,T,c)});function u(){let[S={},T=[],P=void 0]=typeof i.extraReducers=="function"?hl(i.extraReducers):[i.extraReducers],O={...S,...l.sliceCaseReducersByType};return sp(i.initialState,X=>{for(let ue in O)X.addCase(ue,O[ue]);for(let ue of l.sliceMatchers)X.addMatcher(ue.matcher,ue.reducer);for(let ue of T)X.addMatcher(ue.matcher,ue.reducer);P&&X.addDefaultCase(P)})}let d=S=>S,p=new Map,m=new WeakMap,x;function A(S,T){return x||(x=u()),x(S,T)}function v(){return x||(x=u()),x.getInitialState()}function _(S,T=!1){function P(X){let ue=X[S];return typeof ue>"u"&&T&&(ue=Gi(m,P,v)),ue}function O(X=d){return Gi(Gi(p,T,()=>new WeakMap),X,()=>{let ue={};for(let[ai,Oe]of Object.entries(i.selectors??{}))ue[ai]=yp(Oe,X,()=>Gi(m,X,v),T);return ue})}return{reducerPath:S,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let M={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,..._(s),injectInto(S,{reducerPath:T,...P}={}){let O=T??s;return S.inject({reducerPath:O,reducer:A},P),{...M,..._(O,!0)}}};return M}}function yp(t,e,r,i){function n(s,...o){let a=e(s);return typeof a>"u"&&i&&(a=r()),t(a,...o)}return n.unwrapped=t,n}var ml=gp();function vp(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function xp({type:t,reducerName:e,createNotation:r},i,n){let s,o;if("reducer"in i){if(r&&!Ep(i))throw new Error(Ye(17));s=i.reducer,o=i.prepare}else s=i;n.addCase(t,s).exposeCaseReducer(e,s).exposeAction(e,o?ft(t,o):ft(t))}function bp(t){return t._reducerDefinitionType==="asyncThunk"}function Ep(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Sp({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Ye(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,d=n(t,s,u);i.exposeAction(e,d),o&&i.addCase(d.fulfilled,o),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(e,{fulfilled:o||Qi,pending:a||Qi,rejected:l||Qi,settled:c||Qi})}function Qi(){}var gl="listener",yl="completed",vl="cancelled",wf=`task-${vl}`,Rf=`task-${yl}`,Of=`${gl}-${vl}`,If=`${gl}-${yl}`;var{assign:xl}=Object;var Vs="listenerMiddleware";var Ap=xl(ft(`${Vs}/add`),{withTypes:()=>Ap}),Mf=ft(`${Vs}/removeAll`),Tp=xl(ft(`${Vs}/remove`),{withTypes:()=>Tp});function Ye(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var _p=Ai(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Yi=class extends _p(Object){};window.ftReduxStores||(window.ftReduxStores={});var bl=class t extends Yi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,s=window.ftReduxStores[i];if(Ri(s))return s;if(n==null)return;let o=ml({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=pl({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Nr(o.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return o.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(o,a,n.eventBus,n.deprecatedKeys)}constructor(e,r,i,n){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=n,this.isFtReduxStore=!0,this.commands=new Ti,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let s=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,l)=>{let c=a,u=o[c];return u?(...d)=>{let p=u(...d.map(s));return this.reduxStore.dispatch(p),p}:d=>{let p=c,m=this.getState()[p];Zt(m,d)||this.setState({[p]:s(d)})}}}),this.eventBus=i??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Xi=class{static format(e,r,i,n,s){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!s)):this.getIntlDateTime(e,r,i,n,!!s)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,s){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ji=h(b()),Cp="ft-app-info",Ce=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ce.eventName="authentication-change";var jr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};jr.eventName="ui-locale-changed";var wp={session:(t,e)=>{(0,Ji.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>g.dispatchEvent(new Ce(e.payload)),0))}},g=Ji.FtReduxStore.get({name:Cp,reducers:wp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var El=h(b()),Zi=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},Sl=(0,El.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(g)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,s;return((s=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1)?a=>Xi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Zi([(0,js.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Zi([(0,js.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Zi([As({store:g.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Zi([As({store:g.name})],e.prototype,"uiLocale",void 0),e});var Al;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Al||(Al={}));var Tl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Tl||(Tl={}));var _l;(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"})(_l||(_l={}));var mt;(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"})(mt||(mt={}));var Cl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cl||(Cl={}));var wl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wl||(wl={}));var en;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(en||(en={}));var Ft;(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"})(Ft||(Ft={}));var Rl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Rl||(Rl={}));var Ol;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ol||(Ol={}));var Il;(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"})(Il||(Il={}));var Ml;(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"})(Ml||(Ml={}));var Ll;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ll||(Ll={}));var Pl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var Nl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Nl||(Nl={}));var Dl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Dl||(Dl={}));var kl;(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"})(kl||(kl={}));var tn;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(tn||(tn={}));var Fl;(function(t){t.ASC="ASC",t.DESC="DESC"})(Fl||(Fl={}));var Ul;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ul||(Ul={}));var nr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(nr||(nr={}));var $l;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})($l||($l={}));var rn;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rn||(rn={}));var Bl;(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"})(Bl||(Bl={}));var Hl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Hl||(Hl={}));var Xe;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Xe||(Xe={}));var sr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(sr||(sr={}));var Vl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vl||(Vl={}));var N;(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"})(N||(N={}));var Le;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Le||(Le={}));var jl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(jl||(jl={}));var zl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(zl||(zl={}));var ql;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ql||(ql={}));var Kl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Kl||(Kl={}));var Wl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Wl||(Wl={}));var Gl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Gl||(Gl={}));var Ql;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ql||(Ql={}));var Yl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Yl||(Yl={}));var Xl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Xl||(Xl={}));var Jl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Jl||(Jl={}));var Zl;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Zl||(Zl={}));var ec;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ec||(ec={}));var Rp={[N.PERSONAL_BOOK_SHARE_USER]:[N.PERSONAL_BOOK_USER],[N.HTML_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.PDF_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.KHUB_ADMIN]:[N.CONTENT_PUBLISHER],[N.ADMIN]:[N.KHUB_ADMIN,N.USERS_ADMIN,N.PORTAL_ADMIN,N.BEHAVIOR_DATA_USER],[N.GENERATIVE_AI_EXPORT_USER]:[N.GENERATIVE_AI_USER]};function tc(t,e){return t===e||(Rp[t]??[]).some(r=>tc(r,e))}function Pe(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(i=>tc(i,e))}function rc(t,...e){return t==null?!1:e.some(r=>Pe(t,r))}var ln=h(b());var zs=h(b());var Ut=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=g.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=g.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var or=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ut.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ut.await()}};var Z=class extends or{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(s,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new zs.CacheRegistry,this.cache=e?n.commonCache:new zs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var nn=class extends Z{async listMySearches(){let{session:e}=g.getState();return Pe(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var sn=class extends Z{async listMyBookmarks(){let e=g.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var on=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=g.getState().session;return!!e?.sessionAuthenticated}};var an=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=g.getState().session;return!!e?.sessionAuthenticated}};var Op="ft-user-assets",Ip={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Le).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:i,asset:n}=e.payload;Ks(t,r,[...qs(t,r),n]),ic(t,r,1,i),nc(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Ks(t,r,qs(t,r).map(n=>n.id===i.id?i:n)),nc(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;Ks(t,r,qs(t,r).filter(s=>s.id!==n)),ic(t,r,-1,i)}},sc={[Le.SEARCHES]:"savedSearches",[Le.BOOKMARKS]:"bookmarks",[Le.BOOKS]:void 0,[Le.COLLECTIONS]:void 0},qs=(t,e)=>{var r;let i=sc[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Ks=(t,e,r)=>{let i=sc[e];i&&(t[i]=r)},ic=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===Le.BOOKMARKS&&i)){let s=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,s+r)}},nc=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},ge=ln.FtReduxStore.get({name:Op,reducers:Ip,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Le).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ws=class{constructor(e=new on,r=new an){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=g.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sn,this.savedSearchesService=new nn,g.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=g.getState();(0,ln.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ge.actions.clearAssetCount(),ge.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ge.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ge.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ge.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ge.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ge.getState().assetCounts.allAsset[e]!==r.count&&ge.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ge.getState().assetCounts.bookmarkByMap[e]!==r.count&&ge.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ge.getState().assetCounts.bookmarkByMap).length!==0;e===Le.BOOKMARKS&&r&&ge.actions.clearBookmarkCountByMap(),ge.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;ge.actions.bookmarks(r)}}},Gs=new Ws;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Gs);var Qs=class{addCommand(e,r=!1){g.commands.add(e,r)}consumeCommand(e){return g.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Qs;var Ne=h(b());var oc,ar=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Mp=Symbol("clearAfterUnitTest"),cn=class extends(0,Ne.withEventBus)(Z){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[oc]=()=>{this.defaultMessages={},this.cache=new Ne.CacheRegistry,this.listeners={}},this.currentUiLocale=g.getState().uiLocale,g.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=g.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 i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,Ne.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let s=e.toLowerCase(),o=this.resolveContext(s);return new Ne.ParametrizedLabelResolver((n=this.defaultMessages[s])!==null&&n!==void 0?n:{},o).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Ne.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i: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 ar({loadedContexts:e})),this.dispatchEvent(new ar({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ar({loadedContexts:[e]})),this.dispatchEvent(new ar({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Ne.delay)(0).then(()=>i()).catch(()=>null)))}};oc=Mp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var lr=window.FluidTopicsI18nService,un=window.FluidTopicsCustomI18nService;var ac=h(b()),Ys=class{highlightHtml(e,r,i){(0,ac.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ys;var lc=h(b());var Xs=class{isDate(e){var r,i,n,s;return(s=(i=((n=(r=g.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(e,r){var i,n,s,o;if(e==null)return"";try{return lc.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:g.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Xs;var cc=h(b());var zr=class{static get(e,r,{baseUrl:i,localesConfiguration:n,availableContentLocales:s}=g.getState()){var o;if(!r||s.length>0&&!s.some(a=>a.lang===r)){let a=n?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=s[0])===null||o===void 0?void 0:o.lang}return new cc.SearchPlaceConverter(i,e??20,n?.allLanguagesAllowed,r,s)}};var cr=class extends Z{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 sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_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(([i,n])=>Array.isArray(n)?[i,n.map(s=>typeof s=="object"&&s!=null&&!Array.isArray(s)?this.sortEventArrays(s):s).sort((s,o)=>typeof s=="object"&&s!==null&&"key"in s?s.key.localeCompare(o.key):typeof s=="string"&&typeof o=="string"?s.localeCompare(o):String(s).localeCompare(String(o)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var Js=class{urlToSearchRequest(e){return zr.get().parse(e)}searchRequestToUrl(e){return zr.get().serialize(e)}};window.FluidTopicsUrlService=new Js;var ot=h(b());var $t=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};$t.eventName="before-location-change";var Bt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Bt.eventName="change";var Zs=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))}},uc=new Zs;var dn=class t extends ot.WithEventBus{static build(){return new t(window.history,uc,()=>window.location,!1)}constructor(e,r,i,n){var s,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(s=e.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Bt(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[s,o,a])=>{let l=new $t(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...s,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener($t.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener($t.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Bt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Bt.eventName,e)}currentItem(){return(0,ot.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,ot.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,ot.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,s=e+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,i);)this.hasState(s)&&(n=s),s++;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 i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,s=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return s==null||s!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=dn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var dc=h(I());var pc=dc.css`
|
|
168
|
-
`;var fc=h(I()),ye=h(
|
|
167
|
+
`;var ta=["top","right","bottom","left"],ea=["start","end"],ms=ta.reduce((t,e)=>t.concat(e,e+"-"+ea[0],e+"-"+ea[1]),[]),wr=Math.min,ut=Math.max,Rr=Math.round;var We=t=>({x:t,y:t}),ad={left:"right",right:"left",bottom:"top",top:"bottom"};function ra(t,e,r){return ut(t,wr(e,r))}function fi(t,e){return typeof t=="function"?t(e):t}function Or(t){return t.split("-")[0]}function dt(t){return t.split("-")[1]}function gs(t){return t==="x"?"y":"x"}function ys(t){return t==="y"?"height":"width"}function mi(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function vs(t){return gs(mi(t))}function ia(t,e,r){r===void 0&&(r=!1);let i=dt(t),n=vs(t),s=ys(n),o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=fs(o)),[o,fs(o)]}function na(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function fs(t){let e=Or(t);return ad[e]+t.slice(e.length)}function ld(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function sa(t){return typeof t!="number"?ld(t):{top:t,right:t,bottom:t,left:t}}function Mt(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function oa(t,e,r){let{reference:i,floating:n}=t,s=mi(e),o=vs(e),a=ys(o),l=Or(e),c=s==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,m;switch(l){case"top":m={x:u,y:i.y-n.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-n.width,y:d};break;default:m={x:i.x,y:i.y}}let x=dt(e);return x&&(m[o]+=p*(x==="end"?1:-1)*(r&&c?-1:1)),m}async function aa(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=fi(e,t),x=sa(m),v=a[p?d==="floating"?"reference":"floating":d],_=Mt(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(v)))==null||r?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),M=d==="floating"?{x:i,y:n,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(S))&&await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1},P=Mt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:S,strategy:l}):M);return{top:(_.top-P.top+x.top)/T.y,bottom:(P.bottom-_.bottom+x.bottom)/T.y,left:(_.left-P.left+x.left)/T.x,right:(P.right-_.right+x.right)/T.x}}var cd=50,la=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:aa},l=await(o.isRTL==null?void 0:o.isRTL(e)),c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=oa(c,i,l),p=i,m=0,x={};for(let A=0;A<s.length;A++){let v=s[A];if(!v)continue;let{name:_,fn:M}=v,{x:S,y:T,data:P,reset:O}=await M({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:x,rects:c,platform:a,elements:{reference:t,floating:e}});u=S??u,d=T??d,x[_]={...x[_],...P},O&&m<cd&&(m++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(c=O.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):O.rects),{x:u,y:d}=oa(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:x}};function ud(t,e,r){return(t?[...r.filter(n=>dt(n)===t),...r.filter(n=>dt(n)!==t)]:r.filter(n=>Or(n)===n)).filter(n=>t?dt(n)===t||(e?na(n)!==n:!1):!0)}var ca=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:s,middlewareData:o,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=ms,autoAlignment:m=!0,...x}=fi(t,e),A=d!==void 0||p===ms?ud(d||null,m,p):p,v=((r=o.autoPlacement)==null?void 0:r.index)||0,_=A[v];if(_==null)return{};if(a!==_)return{reset:{placement:A[0]}};let M=await l.detectOverflow(e,x),S=ia(_,s,await(l.isRTL==null?void 0:l.isRTL(c.floating))),T=[M[Or(_)],M[S[0]],M[S[1]]],P=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:_,overflows:T}],O=A[v+1];if(O)return{data:{index:v+1,overflows:P},reset:{placement:O}};let X=P.map(Ie=>{let Er=dt(Ie.placement);return[Ie.placement,Er&&u?Ie.overflows.slice(0,2).reduce((Ku,Wu)=>Ku+Wu,0):Ie.overflows[0],Ie.overflows]}).sort((Ie,Er)=>Ie[1]-Er[1]),ai=((n=X.filter(Ie=>Ie[2].slice(0,dt(Ie[0])?2:3).every(Er=>Er<=0))[0])==null?void 0:n[0])||X[0][0];return ai!==a?{data:{index:v+1,overflows:P},reset:{placement:ai}}:{}}}};var ua=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:M=>{let{x:S,y:T}=M;return{x:S,y:T}}},...c}=fi(t,e),u={x:r,y:i},d=await s.detectOverflow(e,c),p=mi(n),m=gs(p),x=u[m],A=u[p],v=(M,S)=>ra(S+d[M==="y"?"top":"left"],S,S-d[M==="y"?"bottom":"right"]);o&&(x=v(m,x)),a&&(A=v(p,A));let _=l.fn({...e,[m]:x,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[m]:o,[p]:a}}}}}};function yi(){return typeof window<"u"}function Pt(t){return pa(t)?(t.nodeName||"").toLowerCase():"#document"}function xe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function it(t){var e;return(e=(pa(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pa(t){return yi()?t instanceof Node||t instanceof xe(t).Node:!1}function Be(t){return yi()?t instanceof Element||t instanceof xe(t).Element:!1}function nt(t){return yi()?t instanceof HTMLElement||t instanceof xe(t).HTMLElement:!1}function da(t){return!yi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof xe(t).ShadowRoot}function Ir(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=He(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ha(t){return/^(table|td|th)$/.test(Pt(t))}function Mr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var dd=/transform|translate|scale|rotate|perspective|filter/,pd=/paint|layout|strict|content/,Lt=t=>!!t&&t!=="none",xs;function Yt(t){let e=Be(t)?He(t):t;return Lt(e.transform)||Lt(e.translate)||Lt(e.scale)||Lt(e.rotate)||Lt(e.perspective)||!vi()&&(Lt(e.backdropFilter)||Lt(e.filter))||dd.test(e.willChange||"")||pd.test(e.contain||"")}function fa(t){let e=pt(t);for(;nt(e)&&!Xt(e);){if(Yt(e))return e;if(Mr(e))return null;e=pt(e)}return null}function vi(){return xs==null&&(xs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xs}function Xt(t){return/^(html|body|#document)$/.test(Pt(t))}function He(t){return xe(t).getComputedStyle(t)}function Lr(t){return Be(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pt(t){if(Pt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||da(t)&&t.host||it(t);return da(e)?e.host:e}function ma(t){let e=pt(t);return Xt(e)?(t.ownerDocument||t).body:nt(e)&&Ir(e)?e:ma(e)}function gi(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=ma(t),s=n===((i=t.ownerDocument)==null?void 0:i.body),o=xe(n);if(s){let a=xi(o);return e.concat(o,o.visualViewport||[],Ir(n)?n:[],a&&r?gi(a):[])}else return e.concat(n,gi(n,[],r))}function xi(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function va(t){let e=He(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=nt(t),s=n?t.offsetWidth:r,o=n?t.offsetHeight:i,a=Rr(r)!==s||Rr(i)!==o;return a&&(r=s,i=o),{width:r,height:i,$:a}}function xa(t){return Be(t)?t:t.contextElement}function Jt(t){let e=xa(t);if(!nt(e))return We(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:s}=va(e),o=(s?Rr(r.width):r.width)/i,a=(s?Rr(r.height):r.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var hd=We(0);function ba(t){let e=xe(t);return!vi()||!e.visualViewport?hd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function fd(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===xe(t)}function Pr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),s=xa(t),o=We(1);e&&(i?Be(i)&&(o=Jt(i)):o=Jt(t));let a=fd(s,r,i)?ba(s):We(0),l=(n.left+a.x)/o.x,c=(n.top+a.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(s&&i){let p=xe(s),m=Be(i)?xe(i):i,x=p,A=xi(x);for(;A&&m!==x;){let v=Jt(A),_=A.getBoundingClientRect(),M=He(A),S=_.left+(A.clientLeft+parseFloat(M.paddingLeft))*v.x,T=_.top+(A.clientTop+parseFloat(M.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=S,c+=T,x=xe(A),A=xi(x)}}return Mt({width:u,height:d,x:l,y:c})}function bi(t,e){let r=Lr(t).scrollLeft;return e?e.left+r:Pr(it(t)).left+r}function Ea(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-bi(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function md(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,s=n==="fixed",o=it(i),a=e?Mr(e.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=We(1),u=We(0),d=nt(i);if((d||!s)&&((Pt(i)!=="body"||Ir(o))&&(l=Lr(i)),d)){let m=Pr(i);c=Jt(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=o&&!d&&!s?Ea(o,l):We(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function gd(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function yd(t){let e=Lr(t),r=t.ownerDocument.body,i=ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-e.scrollLeft+bi(t),o=-e.scrollTop;return He(r).direction==="rtl"&&(s+=ut(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:o}}var vd=25;function xd(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=xe(t),s=it(t),o=n.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(o){let p=!vi()||e==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(bi(s)<=0){let p=s.ownerDocument,m=p.body,x=getComputedStyle(m),A=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,v=Math.abs(s.clientWidth-m.clientWidth-A),_=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;_<=vd&&(a-=_)}return{width:a,height:l,x:c,y:u}}function bd(t,e){let r=Pr(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,s=Jt(t),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=n*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function ga(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=xd(t,r,e);else if(e==="document")i=yd(it(t));else if(Be(e))i=bd(e,r);else{let n=ba(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Mt(i)}function Ed(t,e){let r=e.get(t);if(r)return r;let i=gi(t,[],!1).filter(a=>Be(a)&&Pt(a)!=="body"),n=null,s=He(t).position==="fixed",o=s?pt(t):t;for(;Be(o)&&!Xt(o);){let a=He(o),l=Yt(o),c=n?n.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==o):n=a,o=pt(o)}return e.set(t,i),i}function Sd(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,o=[...r==="clippingAncestors"?Mr(e)?[]:Ed(e,this._c):[].concat(r),i],a=ga(e,o[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<o.length;p++){let m=ga(e,o[p],n);l=ut(m.top,l),c=wr(m.right,c),u=wr(m.bottom,u),d=ut(m.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Ad(t){let{width:e,height:r}=va(t);return{width:e,height:r}}function Td(t,e,r){let i=nt(e),n=it(e),s=r==="fixed",o=Pr(t,!0,s,e),a={scrollLeft:0,scrollTop:0},l=We(0);if((i||!s)&&((Pt(e)!=="body"||Ir(n))&&(a=Lr(e)),i)){let p=Pr(e,!0,s,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=bi(n));let c=n&&!i&&!s?Ea(n,a):We(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function bs(t){return He(t).position==="static"}function ya(t,e){if(!nt(t)||He(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return it(t)===r&&(r=r.ownerDocument.body),r}function Sa(t,e){let r=xe(t);if(Mr(t))return r;if(!nt(t)){let n=pt(t);for(;n&&!Xt(n);){if(Be(n)&&!bs(n))return n;n=pt(n)}return r}let i=ya(t,e);for(;i&&ha(i)&&bs(i);)i=ya(i,e);return i&&Xt(i)&&bs(i)&&!Yt(i)?r:i||fa(t)||r}var _d=async function(t){let e=this.getOffsetParent||Sa,r=this.getDimensions,i=await r(t.floating);return{reference:Td(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cd(t){return He(t).direction==="rtl"}var Ei={convertOffsetParentRelativeRectToViewportRelativeRect:md,getDocumentElement:it,getClippingRect:Sd,getOffsetParent:Sa,getElementRects:_d,getClientRects:gd,getDimensions:Ad,getScale:Jt,isElement:Be,isRTL:Cd};var Aa=ca,Ta=ua;var _a=(t,e,r)=>{let i=new Map,n=r??{},s={...Ei,...n.platform,_c:i};return la(t,e,{...n,platform:s})};function Ca(t){return wd(t)}function Es(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function wd(t){for(let e=t;e;e=Es(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Es(t);e;e=Es(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Yt(r)||e.tagName==="BODY"))return e}return null}async function Si(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},_a(t,e,{strategy:i.strategy,platform:{...Ei,getOffsetParent:n=>Ei.getOffsetParent(n,Ca)},middleware:[Ta({crossAxis:!0}),Aa({allowedPlacements:[i.placement]})]})}var dr=h(b());var js=h(K());var wa=h(K(),1);var Ss=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Rd=t=>({fromAttribute:e=>{if(e==null)return Nr(t);try{return JSON.parse(e)}catch{return Nr(t)}},toAttribute:e=>JSON.stringify(e)});function Ra(t,e){return(0,wa.property)({type:Object,converter:Rd(t),hasChanged:Dr,...e??{}})}function Od(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Zt(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Zt(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=o=>Object.keys(o).filter(a=>o[a]!=null),s=n(t);if(r=s.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[i]))return!1;for(i=r;i--!==0;){let o=s[i];if(!Zt(t[o],e[o]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Zt(t,e){try{return Od(t,e)}catch{return!1}}function Dr(t,e){return!Zt(t,e)}function Nr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Ai(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var Oa=h(K(),1);var As=t=>{let e=t??{};return(r,i)=>{var n;let s={hasChanged:Dr,attribute:!1,...e};(0,Oa.property)(s)(r,i);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var Ti=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Nt=h(K(),1);var _i=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),s=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of i)try{await o()}catch(a){n(a);return}s(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var wi=h(I(),1);var Ci=class extends wi.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return(0,wi.adoptStyles)(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){Ss(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ia(t,e,...r){var i;let n=t.querySelector(e);for(let s of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(s);return n}var tr=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},Na,Ma=Symbol("constructorPrototype"),La=Symbol("constructorName"),Da=Symbol("exportpartsDebouncer"),Pa=Symbol("dynamicDependenciesLoaded"),er=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};er.eventName="exportparts-updated";var Ge=class extends Ci{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Na]=new _i(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Da].run(()=>{var n,s;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((s=this.exportpartsPrefixes)===null||s===void 0?void 0:s.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[La]=this.constructor.name,this[Ma]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[La]&&Object.setPrototypeOf(this,this[Ma])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Pa]||(r[Pa]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(er.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(er.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new er)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let s=[...n??[],i];r=Ia(this.shadowRoot,...s)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(s=>s.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(s){console.error(s,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let s=document.createElement("style");s.classList.add("ft-lit-element--custom-stylesheet"),s.innerHTML=this.customStylesheet,this.shadowRoot.append(s)}}setExportpartsAttribute(e){var r,i,n,s,o,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(s=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&s!==void 0?s:[]){let m=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],x=(a=(n=p.getAttribute("exportparts"))===null||n===void 0?void 0:n.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],A=[...m,...x].filter(l).map(v=>v.trim());for(let v of A)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};Na=Da;tr([(0,Nt.property)()],Ge.prototype,"exportpartsPrefix",void 0);tr([Ra([])],Ge.prototype,"exportpartsPrefixes",void 0);tr([(0,Nt.property)({reflect:!0})],Ge.prototype,"exportparts",void 0);tr([(0,Nt.property)()],Ge.prototype,"customStylesheet",void 0);tr([(0,Nt.property)()],Ge.prototype,"elementToFocus",void 0);tr([(0,Nt.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Ri(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var kr=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),Dt=Symbol("internalStores"),Id=Ai(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Dt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Dt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Dt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Dt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Dt].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(o.store);c&&(o.store?this[ht].has(o.store):this[ht].size>0)&&(this[a]=o.selector(c.getState(),this))}})}subscribeToStore(o,a){var l,c;this[ht].set(o,a.subscribe(()=>this.updateFromStores())),this[kr].set(o,[]),Ri(a)&&(!((l=a.deprecatedKeys)===null||l===void 0)&&l.length&&this.reduxConstructor.reduxProperties.forEach((u,d)=>{this.getStore(u.store)===a&&a.deprecatedKeys.includes(d)&&console.warn("Element",this,"is subscribed to deprecated key",d,"in store",a.name)}),a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((u,d)=>{if(typeof this[d]=="function"&&(!u.store||a.name===u.store)){let p=m=>this[d](m);a.addEventListener(u.eventName,p),this[kr].get(o).push(()=>a.removeEventListener(u.eventName,p))}}))),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ht].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ht].has(o)&&this[ht].get(o)(),this[ht].delete(o),(a=this[kr].get(o))===null||a===void 0||a.forEach(l=>l()),this[kr].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ht,r=Dt,i=kr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),ka=class extends Id(Ge){};function ie(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Md=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fa=Md,Ts=()=>Math.random().toString(36).substring(7).split("").join("."),Ld={INIT:`@@redux/INIT${Ts()}`,REPLACE:`@@redux/REPLACE${Ts()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ts()}`},Oi=Ld;function Ii(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function _s(t,e,r){if(typeof t!="function")throw new Error(ie(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ie(1));return r(_s)(t,e)}let i=t,n=e,s=new Map,o=s,a=0,l=!1;function c(){o===s&&(o=new Map,s.forEach((v,_)=>{o.set(_,v)}))}function u(){if(l)throw new Error(ie(3));return n}function d(v){if(typeof v!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));let _=!0;c();let M=a++;return o.set(M,v),function(){if(_){if(l)throw new Error(ie(6));_=!1,c(),o.delete(M),s=null}}}function p(v){if(!Ii(v))throw new Error(ie(7));if(typeof v.type>"u")throw new Error(ie(8));if(typeof v.type!="string")throw new Error(ie(17));if(l)throw new Error(ie(9));try{l=!0,n=i(n,v)}finally{l=!1}return(s=o).forEach(M=>{M()}),v}function m(v){if(typeof v!="function")throw new Error(ie(10));i=v,p({type:Oi.REPLACE})}function x(){let v=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ie(11));function M(){let T=_;T.next&&T.next(u())}return M(),{unsubscribe:v(M)}},[Fa](){return this}}}return p({type:Oi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Fa]:x}}function Pd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Oi.INIT})>"u")throw new Error(ie(12));if(typeof r(void 0,{type:Oi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function Cs(t){let e=Object.keys(t),r={};for(let o=0;o<e.length;o++){let a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),n,s;try{Pd(r)}catch(o){s=o}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],m=r[p],x=a[p],A=m(x,l);if(typeof A>"u"){let v=l&&l.type;throw new Error(ie(14))}u[p]=A,c=c||A!==x}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Fr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function Ua(...t){return e=>(r,i)=>{let n=e(r,i),s=()=>{throw new Error(ie(15))},o={getState:n.getState,dispatch:(l,...c)=>s(l,...c)},a=t.map(l=>l(o));return s=Fr(...a)(n.dispatch),{...n,dispatch:s}}}function $a(t){return Ii(t)&&"type"in t&&typeof t.type=="string"}var Ga=Symbol.for("immer-nothing"),Ba=Symbol.for("immer-draftable"),de=Symbol.for("immer-state");function Ve(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Te=Object,ir=Te.getPrototypeOf,Ni="constructor",Bi="prototype",Is="configurable",Di="enumerable",Li="writable",Ur="value",Qe=t=>!!t&&!!t[de];function _e(t){return t?Qa(t)||Vi(t)||!!t[Ba]||!!t[Ni]?.[Ba]||ji(t)||zi(t):!1}var Nd=Te[Bi][Ni].toString(),Ha=new WeakMap;function Qa(t){if(!t||!Us(t))return!1;let e=ir(t);if(e===null||e===Te[Bi])return!0;let r=Te.hasOwnProperty.call(e,Ni)&&e[Ni];if(r===Object)return!0;if(!rr(r))return!1;let i=Ha.get(r);return i===void 0&&(i=Function.toString.call(r),Ha.set(r,i)),i===Nd}function Hi(t,e,r=!0){Hr(t)===0?(r?Reflect.ownKeys(t):Te.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Hr(t){let e=t[de];return e?e.type_:Vi(t)?1:ji(t)?2:zi(t)?3:0}var ws=(t,e,r=Hr(t))=>r===2?t.has(e):Te[Bi].hasOwnProperty.call(t,e),Ms=(t,e,r=Hr(t))=>r===2?t.get(e):t[e],ki=(t,e,r,i=Hr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function Dd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Vi=Array.isArray,ji=t=>t instanceof Map,zi=t=>t instanceof Set,Us=t=>typeof t=="object",rr=t=>typeof t=="function",Rs=t=>typeof t=="boolean";function kd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var st=t=>t.copy_||t.base_;var $s=t=>t.modified_?t.copy_:t.base_;function Ls(t,e){if(ji(t))return new Map(t);if(zi(t))return new Set(t);if(Vi(t))return Array[Bi].slice.call(t);let r=Qa(t);if(e===!0||e==="class_only"&&!r){let i=Te.getOwnPropertyDescriptors(t);delete i[de];let n=Reflect.ownKeys(i);for(let s=0;s<n.length;s++){let o=n[s],a=i[o];a[Li]===!1&&(a[Li]=!0,a[Is]=!0),(a.get||a.set)&&(i[o]={[Is]:!0,[Li]:!0,[Di]:a[Di],[Ur]:t[o]})}return Te.create(ir(t),i)}else{let i=ir(t);if(i!==null&&r)return{...t};let n=Te.create(i);return Te.assign(n,t)}}function qi(t,e=!1){return Ki(t)||Qe(t)||!_e(t)||(Hr(t)>1&&Te.defineProperties(t,{set:Mi,add:Mi,clear:Mi,delete:Mi}),Te.freeze(t),e&&Hi(t,(r,i)=>{qi(i,!0)},!1)),t}function Fd(){Ve(2)}var Mi={[Ur]:Fd};function Ki(t){return t===null||!Us(t)?!0:Te.isFrozen(t)}var Fi="MapSet",Ps="Patches",Va="ArrayMethods",Ya={};function kt(t){let e=Ya[t];return e||Ve(0,t),e}var ja=t=>!!Ya[t];var $r,Xa=()=>$r,Ud=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ja(Fi)?kt(Fi):void 0,arrayMethodsPlugin_:ja(Va)?kt(Va):void 0});function za(t,e){e&&(t.patchPlugin_=kt(Ps),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Ns(t){Ds(t),t.drafts_.forEach($d),t.drafts_=null}function Ds(t){t===$r&&($r=t.parent_)}var qa=t=>$r=Ud($r,t);function $d(t){let e=t[de];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ka(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[de].modified_&&(Ns(e),Ve(4)),_e(t)&&(t=Wa(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[de].base_,t,e)}else t=Wa(e,r);return Bd(e,t,!0),Ns(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Ga?t:void 0}function Wa(t,e){if(Ki(e))return e;let r=e[de];if(!r)return Ui(e,t.handledSet_,t);if(!Wi(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);el(r,t)}return r.copy_}function Bd(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&qi(e,r)}function Ja(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Wi=(t,e)=>t.scope_===e,Hd=[];function Za(t,e,r,i){let n=st(t),s=t.type_;if(i!==void 0&&Ms(n,i,s)===e){ki(n,i,r,s);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Hi(n,(l,c)=>{if(Qe(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=t.draftLocations_.get(e)??Hd;for(let a of o)ki(n,a,r,s)}function Vd(t,e,r){t.callbacks_.push(function(n){let s=e;if(!s||!Wi(s,n))return;n.mapSetPlugin_?.fixSetContents(s);let o=$s(s);Za(t,s.draft_??s,o,r),el(s,n)})}function el(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let n=i.getPath(t);n&&i.generatePatches_(t,n,e)}Ja(t)}}function jd(t,e,r){let{scope_:i}=t;if(Qe(r)){let n=r[de];Wi(n,i)&&n.callbacks_.push(function(){Pi(t);let o=$s(n);Za(t,r,o,e)})}else _e(r)&&t.callbacks_.push(function(){let s=st(t);t.type_===3?s.has(r)&&Ui(r,i.handledSet_,i):Ms(s,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ui(Ms(t.copy_,e,t.type_),i.handledSet_,i)})}function Ui(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Qe(t)||e.has(t)||!_e(t)||Ki(t)||(e.add(t),Hi(t,(i,n)=>{if(Qe(n)){let s=n[de];if(Wi(s,r)){let o=$s(s);ki(t,i,o,t.type_),Ja(s)}}else _e(n)&&Ui(n,e,r)})),t}function zd(t,e){let r=Vi(t),i={type_:r?1:0,scope_:e?e.scope_:Xa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,s=$i;r&&(n=[i],s=Br);let{revoke:o,proxy:a}=Proxy.revocable(n,s);return i.draft_=a,i.revoke_=o,[a,i]}var $i={get(t,e){if(e===de)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let n=st(t);if(!ws(n,e,t.type_))return Kd(t,n,e);let s=n[e];if(t.finalized_||!_e(s)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&kd(e))return s;if(s===Os(t.base_,e)||qd(t,e,s)){Pi(t);let o=t.type_===1?+e:e,a=Fs(t.scope_,s,t,o);return t.copy_[o]=a}return s},has(t,e){return e in st(t)},ownKeys(t){return Reflect.ownKeys(st(t))},set(t,e,r){let i=tl(st(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=Os(st(t),e),s=n?.[de];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_.delete(e),!0;if(Dd(r,n)&&(r!==void 0||ws(t.base_,e,t.type_)))return!0;Pi(t),ks(t)}return t.copy_[e]===r&&(r!==void 0||ws(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),jd(t,e,r)),!0},deleteProperty(t,e){return Pi(t),Os(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ks(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=st(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[Li]:!0,[Is]:t.type_!==1||e!=="length",[Di]:i[Di],[Ur]:r[e]}},defineProperty(){Ve(11)},getPrototypeOf(t){return ir(t.base_)},setPrototypeOf(){Ve(12)}},Br={};for(let t in $i){let e=$i[t];Br[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Br.deleteProperty=function(t,e){return Br.set.call(this,t,e,void 0)};Br.set=function(t,e,r){return $i.set.call(this,t[0],e,r,t[0])};function Os(t,e){let r=t[de];return(r?st(r):t)[e]}function qd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!_e(r)||r[de]?!1:t.baseRefs_.has(r)}function Kd(t,e,r){let i=tl(e,r);return i?Ur in i?i[Ur]:i.get?.call(t.draft_):void 0}function tl(t,e){if(!(e in t))return;let r=ir(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=ir(r)}}function ks(t){t.modified_||(t.modified_=!0,t.parent_&&ks(t.parent_))}function Pi(t){t.copy_||(t.assigned_=new Map,t.copy_=Ls(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Wd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(rr(e)&&!rr(r)){let s=r;r=e;let o=this;return function(l=s,...c){return o.produce(l,u=>r.call(this,u,...c))}}rr(r)||Ve(6),i!==void 0&&!rr(i)&&Ve(7);let n;if(_e(e)){let s=qa(this),o=Fs(s,e,void 0),a=!0;try{n=r(o),a=!1}finally{a?Ns(s):Ds(s)}return za(s,i),Ka(n,s)}else if(!e||!Us(e)){if(n=r(e),n===void 0&&(n=e),n===Ga&&(n=void 0),this.autoFreeze_&&qi(n,!0),i){let s=[],o=[];kt(Ps).generateReplacementPatches_(e,n,{patches_:s,inversePatches_:o}),i(s,o)}return n}else Ve(1,e)},this.produceWithPatches=(e,r)=>{if(rr(e))return(o,...a)=>this.produceWithPatches(o,l=>e(l,...a));let i,n;return[this.produce(e,r,(o,a)=>{i=o,n=a}),i,n]},Rs(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Rs(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Rs(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){_e(t)||Ve(8),Qe(t)&&(t=rl(t));let e=qa(this),r=Fs(e,t,void 0);return r[de].isManual_=!0,Ds(e),r}finishDraft(t,e){let r=t&&t[de];(!r||!r.isManual_)&&Ve(9);let{scope_:i}=r;return za(i,e),Ka(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let n=e[r];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}r>-1&&(e=e.slice(r+1));let i=kt(Ps).applyPatches_;return Qe(t)?i(t,e):this.produce(t,n=>i(n,e))}};function Fs(t,e,r,i){let[n,s]=ji(e)?kt(Fi).proxyMap_(e,r):zi(e)?kt(Fi).proxySet_(e,r):zd(e,r);return(r?.scope_??Xa()).drafts_.push(n),s.callbacks_=r?.callbacks_??[],s.key_=i,r&&i!==void 0?Vd(r,s,i):s.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:c}=l;s.modified_&&c&&c.generatePatches_(s,[],l)}),n}function rl(t){return Qe(t)||Ve(10,t),il(t)}function il(t){if(!_e(t)||Ki(t))return t;let e=t[de],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Ls(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Ls(t,!0);return Hi(r,(n,s)=>{ki(r,n,il(s))},i),e&&(e.finalized_=!1),r}var Gd=globalThis.Iterator,vf=typeof Gd?.from=="function";var Qd=new Wd,Bs=Qd.produce;function nl(t){return({dispatch:r,getState:i})=>n=>s=>typeof s=="function"?s(r,i,t):n(s)}var sl=nl(),ol=nl;var Yd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Fr:Fr.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Xd=t=>t&&typeof t.match=="function";function ft(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Ye(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>$a(i)&&i.type===t,r}var dl=class Vr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Vr.prototype)}static get[Symbol.species](){return Vr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Vr(...e[0].concat(this)):new Vr(...e.concat(this))}};function al(t){return _e(t)?Bs(t,()=>{}):t}function Gi(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Jd(t){return typeof t=="boolean"}var Zd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:s=!0}=e??{},o=new dl;return r&&(Jd(r)?o.push(sl):o.push(ol(r.extraArgument))),o},ep="RTK_autoBatch";var ll=t=>e=>{setTimeout(e,t)},tp=(t,e)=>r=>{let i=!1,n,s,o=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(s),r())};n=t(o),s=setTimeout(o,e)},rp=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),n=!0,s=!1,o=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?tp(window.requestAnimationFrame,100):ll(10):t.type==="callback"?t.queueNotification:ll(t.timeout),c=()=>{o=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let d=()=>n&&u(),p=i.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[ep],s=!n,s&&(o||(o=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},ip=t=>function(r){let{autoBatch:i=!0}=r??{},n=new dl(t);return i&&n.push(rp(typeof i=="object"?i:void 0)),n};function pl(t){let e=Zd(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:s=!0,preloadedState:o=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(Ii(r))l=Cs(r);else throw new Error(Ye(1));let c;typeof i=="function"?c=i(e):c=e();let u=Fr;n&&(u=Yd({trace:!1,...typeof n=="object"&&n}));let d=Ua(...c),p=ip(d),m=typeof a=="function"?a(p):p(),x=u(...m);return _s(l,o,x)}function hl(t){let e={},r=[],i,n={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(Ye(28));if(a in e)throw new Error(Ye(29));return e[a]=o,n},addAsyncThunk(s,o){return o.pending&&(e[s.pending.type]=o.pending),o.rejected&&(e[s.rejected.type]=o.rejected),o.fulfilled&&(e[s.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:s.settled,reducer:o.settled}),n},addMatcher(s,o){return r.push({matcher:s,reducer:o}),n},addDefaultCase(s){return i=s,n}};return t(n),[e,r,i]}function np(t){return typeof t=="function"}function sp(t,e){let[r,i,n]=hl(e),s;if(np(t))s=()=>al(t());else{let a=al(t);s=()=>a}function o(a=s(),l){let c=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[n]),c.reduce((u,d)=>{if(d)if(Qe(u)){let p=d(u,l);return p===void 0?u:p}else{if(_e(u))return Bs(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw new Error(Ye(9))}return p}}return u},a)}return o.getInitialState=s,o}var op=(t,e)=>Xd(t)?t.match(e):t(e);function ap(...t){return e=>t.some(r=>op(r,e))}var lp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cp=(t=21)=>{let e="",r=t;for(;r--;)e+=lp[Math.random()*64|0];return e},up=["name","message","stack","code"],Hs=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},cl=class{payload;meta;_type;constructor(t,e){this.payload=t,this.meta=e}},dp=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of up)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},ul="External signal was aborted",pp=(()=>{function t(e,r,i){let n=ft(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),s=ft(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),o=ft(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||dp)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:d!==void 0,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{let m=i?.idGenerator?i.idGenerator(l):cp(),x=new AbortController,A,v;function _(S){v=S,x.abort()}c&&(c.aborted?_(ul):c.addEventListener("abort",()=>_(ul),{once:!0}));let M=(async function(){let S;try{let T=i?.condition?.(l,{getState:d,extra:p});if(fp(T)&&(T=await T),T===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(x.signal.aborted)throw{name:"AbortError",message:v||"Aborted"};let P=new Promise((O,X)=>{A=()=>{X({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",A,{once:!0})});u(s(m,l,i?.getPendingMeta?.({requestId:m,arg:l},{getState:d,extra:p}))),S=await Promise.race([P,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:x.signal,abort:_,rejectWithValue:((O,X)=>new Hs(O,X)),fulfillWithValue:((O,X)=>new cl(O,X))})).then(O=>{if(O instanceof Hs)throw O;return O instanceof cl?n(O.payload,m,l,O.meta):n(O,m,l)})])}catch(T){S=T instanceof Hs?o(null,m,l,T.payload,T.meta):o(T,m,l)}finally{A&&x.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(M,{abort:_,requestId:m,arg:l,unwrap(){return M.then(hp)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:n,settled:ap(o,n),typePrefix:e})}return t.withTypes=()=>t,t})();function hp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function fp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var fl=Symbol.for("rtk-slice-createasyncthunk"),Cf={[fl]:pp};function mp(t,e){return`${t}/${e}`}function gp({creators:t}={}){let e=t?.asyncThunk?.[fl];return function(i){let{name:n,reducerPath:s=n}=i;if(!n)throw new Error(Ye(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(vp()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(S,T){let P=typeof S=="string"?S:S.type;if(!P)throw new Error(Ye(12));if(P in l.sliceCaseReducersByType)throw new Error(Ye(13));return l.sliceCaseReducersByType[P]=T,c},addMatcher(S,T){return l.sliceMatchers.push({matcher:S,reducer:T}),c},exposeAction(S,T){return l.actionCreators[S]=T,c},exposeCaseReducer(S,T){return l.sliceCaseReducersByName[S]=T,c}};a.forEach(S=>{let T=o[S],P={reducerName:S,type:mp(n,S),createNotation:typeof i.reducers=="function"};bp(T)?Sp(P,T,c,e):xp(P,T,c)});function u(){let[S={},T=[],P=void 0]=typeof i.extraReducers=="function"?hl(i.extraReducers):[i.extraReducers],O={...S,...l.sliceCaseReducersByType};return sp(i.initialState,X=>{for(let ue in O)X.addCase(ue,O[ue]);for(let ue of l.sliceMatchers)X.addMatcher(ue.matcher,ue.reducer);for(let ue of T)X.addMatcher(ue.matcher,ue.reducer);P&&X.addDefaultCase(P)})}let d=S=>S,p=new Map,m=new WeakMap,x;function A(S,T){return x||(x=u()),x(S,T)}function v(){return x||(x=u()),x.getInitialState()}function _(S,T=!1){function P(X){let ue=X[S];return typeof ue>"u"&&T&&(ue=Gi(m,P,v)),ue}function O(X=d){return Gi(Gi(p,T,()=>new WeakMap),X,()=>{let ue={};for(let[ai,Ie]of Object.entries(i.selectors??{}))ue[ai]=yp(Ie,X,()=>Gi(m,X,v),T);return ue})}return{reducerPath:S,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let M={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,..._(s),injectInto(S,{reducerPath:T,...P}={}){let O=T??s;return S.inject({reducerPath:O,reducer:A},P),{...M,..._(O,!0)}}};return M}}function yp(t,e,r,i){function n(s,...o){let a=e(s);return typeof a>"u"&&i&&(a=r()),t(a,...o)}return n.unwrapped=t,n}var ml=gp();function vp(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function xp({type:t,reducerName:e,createNotation:r},i,n){let s,o;if("reducer"in i){if(r&&!Ep(i))throw new Error(Ye(17));s=i.reducer,o=i.prepare}else s=i;n.addCase(t,s).exposeCaseReducer(e,s).exposeAction(e,o?ft(t,o):ft(t))}function bp(t){return t._reducerDefinitionType==="asyncThunk"}function Ep(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Sp({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Ye(18));let{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:c,options:u}=r,d=n(t,s,u);i.exposeAction(e,d),o&&i.addCase(d.fulfilled,o),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(e,{fulfilled:o||Qi,pending:a||Qi,rejected:l||Qi,settled:c||Qi})}function Qi(){}var gl="listener",yl="completed",vl="cancelled",wf=`task-${vl}`,Rf=`task-${yl}`,Of=`${gl}-${vl}`,If=`${gl}-${yl}`;var{assign:xl}=Object;var Vs="listenerMiddleware";var Ap=xl(ft(`${Vs}/add`),{withTypes:()=>Ap}),Mf=ft(`${Vs}/removeAll`),Tp=xl(ft(`${Vs}/remove`),{withTypes:()=>Tp});function Ye(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var _p=Ai(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Yi=class extends _p(Object){};window.ftReduxStores||(window.ftReduxStores={});var bl=class t extends Yi{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,s=window.ftReduxStores[i];if(Ri(s))return s;if(n==null)return;let o=ml({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=pl({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Nr(o.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return o.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(o,a,n.eventBus,n.deprecatedKeys)}constructor(e,r,i,n){super(),this.reduxSlice=e,this.reduxStore=r,this.deprecatedKeys=n,this.isFtReduxStore=!0,this.commands=new Ti,this.injectInto=(o,a)=>this.reduxSlice.injectInto(o,a),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let s=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,a,l)=>{let c=a,u=o[c];return u?(...d)=>{let p=u(...d.map(s));return this.reduxStore.dispatch(p),p}:d=>{let p=c,m=this.getState()[p];Zt(m,d)||this.setState({[p]:s(d)})}}}),this.eventBus=i??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Xi=class{static format(e,r,i,n,s){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!s)):this.getIntlDateTime(e,r,i,n,!!s)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,s){let o=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(o),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return s?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Ji=h(b()),Cp="ft-app-info",Ce=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ce.eventName="authentication-change";var jr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};jr.eventName="ui-locale-changed";var wp={session:(t,e)=>{(0,Ji.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>g.dispatchEvent(new Ce(e.payload)),0))}},g=Ji.FtReduxStore.get({name:Cp,reducers:wp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var El=h(b()),Zi=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},Sl=(0,El.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(g)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,s;return((s=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&s!==void 0?s:!1)?a=>Xi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Zi([(0,js.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Zi([(0,js.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Zi([As({store:g.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Zi([As({store:g.name})],e.prototype,"uiLocale",void 0),e});var Al;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Al||(Al={}));var Tl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Tl||(Tl={}));var _l;(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"})(_l||(_l={}));var mt;(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"})(mt||(mt={}));var Cl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cl||(Cl={}));var wl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wl||(wl={}));var en;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(en||(en={}));var Ft;(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"})(Ft||(Ft={}));var Rl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Rl||(Rl={}));var Ol;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ol||(Ol={}));var Il;(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"})(Il||(Il={}));var Ml;(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"})(Ml||(Ml={}));var Ll;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ll||(Ll={}));var Pl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var Nl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Nl||(Nl={}));var Dl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Dl||(Dl={}));var kl;(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"})(kl||(kl={}));var tn;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(tn||(tn={}));var Fl;(function(t){t.ASC="ASC",t.DESC="DESC"})(Fl||(Fl={}));var Ul;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Ul||(Ul={}));var nr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(nr||(nr={}));var $l;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})($l||($l={}));var rn;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rn||(rn={}));var Bl;(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"})(Bl||(Bl={}));var Hl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Hl||(Hl={}));var Xe;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Xe||(Xe={}));var sr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(sr||(sr={}));var Vl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vl||(Vl={}));var N;(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"})(N||(N={}));var Pe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Pe||(Pe={}));var jl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(jl||(jl={}));var zl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(zl||(zl={}));var ql;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ql||(ql={}));var Kl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Kl||(Kl={}));var Wl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Wl||(Wl={}));var Gl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Gl||(Gl={}));var Ql;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Ql||(Ql={}));var Yl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Yl||(Yl={}));var Xl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Xl||(Xl={}));var Jl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Jl||(Jl={}));var Zl;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Zl||(Zl={}));var ec;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(ec||(ec={}));var Rp={[N.PERSONAL_BOOK_SHARE_USER]:[N.PERSONAL_BOOK_USER],[N.HTML_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.PDF_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.KHUB_ADMIN]:[N.CONTENT_PUBLISHER],[N.ADMIN]:[N.KHUB_ADMIN,N.USERS_ADMIN,N.PORTAL_ADMIN,N.BEHAVIOR_DATA_USER],[N.GENERATIVE_AI_EXPORT_USER]:[N.GENERATIVE_AI_USER]};function tc(t,e){return t===e||(Rp[t]??[]).some(r=>tc(r,e))}function Ne(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(i=>tc(i,e))}function rc(t,...e){return t==null?!1:e.some(r=>Ne(t,r))}var ln=h(b());var zs=h(b());var Ut=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=g.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=g.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var or=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ut.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ut.await()}};var Z=class extends or{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(s,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new zs.CacheRegistry,this.cache=e?n.commonCache:new zs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var nn=class extends Z{async listMySearches(){let{session:e}=g.getState();return Ne(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var sn=class extends Z{async listMyBookmarks(){let e=g.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var on=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=g.getState().session;return!!e?.sessionAuthenticated}};var an=class extends Z{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=g.getState().session;return!!e?.sessionAuthenticated}};var Op="ft-user-assets",Ip={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(Pe).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:i,asset:n}=e.payload;Ks(t,r,[...qs(t,r),n]),ic(t,r,1,i),nc(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Ks(t,r,qs(t,r).map(n=>n.id===i.id?i:n)),nc(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;Ks(t,r,qs(t,r).filter(s=>s.id!==n)),ic(t,r,-1,i)}},sc={[Pe.SEARCHES]:"savedSearches",[Pe.BOOKMARKS]:"bookmarks",[Pe.BOOKS]:void 0,[Pe.COLLECTIONS]:void 0},qs=(t,e)=>{var r;let i=sc[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Ks=(t,e,r)=>{let i=sc[e];i&&(t[i]=r)},ic=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===Pe.BOOKMARKS&&i)){let s=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,s+r)}},nc=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},ge=ln.FtReduxStore.get({name:Op,reducers:Ip,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Pe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ws=class{constructor(e=new on,r=new an){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=g.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sn,this.savedSearchesService=new nn,g.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=g.getState();(0,ln.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ge.actions.clearAssetCount(),ge.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ge.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ge.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ge.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ge.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ge.getState().assetCounts.allAsset[e]!==r.count&&ge.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ge.getState().assetCounts.bookmarkByMap[e]!==r.count&&ge.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ge.getState().assetCounts.bookmarkByMap).length!==0;e===Pe.BOOKMARKS&&r&&ge.actions.clearBookmarkCountByMap(),ge.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;ge.actions.bookmarks(r)}}},Gs=new Ws;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Gs);var Qs=class{addCommand(e,r=!1){g.commands.add(e,r)}consumeCommand(e){return g.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Qs;var De=h(b());var oc,ar=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Mp=Symbol("clearAfterUnitTest"),cn=class extends(0,De.withEventBus)(Z){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[oc]=()=>{this.defaultMessages={},this.cache=new De.CacheRegistry,this.listeners={}},this.currentUiLocale=g.getState().uiLocale,g.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=g.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 i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,De.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let s=e.toLowerCase(),o=this.resolveContext(s);return new De.ParametrizedLabelResolver((n=this.defaultMessages[s])!==null&&n!==void 0?n:{},o).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof De.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i: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 ar({loadedContexts:e})),this.dispatchEvent(new ar({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ar({loadedContexts:[e]})),this.dispatchEvent(new ar({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,De.delay)(0).then(()=>i()).catch(()=>null)))}};oc=Mp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends cn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var lr=window.FluidTopicsI18nService,un=window.FluidTopicsCustomI18nService;var ac=h(b()),Ys=class{highlightHtml(e,r,i){(0,ac.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ys;var lc=h(b());var Xs=class{isDate(e){var r,i,n,s;return(s=(i=((n=(r=g.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&s!==void 0?s:!1}format(e,r){var i,n,s,o;if(e==null)return"";try{return lc.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:g.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(s=r?.withTime)!==null&&s!==void 0?s:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Xs;var cc=h(b());var zr=class{static get(e,r,{baseUrl:i,localesConfiguration:n,availableContentLocales:s}=g.getState()){var o;if(!r||s.length>0&&!s.some(a=>a.lang===r)){let a=n?.defaultLocales.defaultContentLocale;r=a?`${a.lang}-${a.region}`:(o=s[0])===null||o===void 0?void 0:o.lang}return new cc.SearchPlaceConverter(i,e??20,n?.allLanguagesAllowed,r,s)}};var cr=class extends Z{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 sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_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(([i,n])=>Array.isArray(n)?[i,n.map(s=>typeof s=="object"&&s!=null&&!Array.isArray(s)?this.sortEventArrays(s):s).sort((s,o)=>typeof s=="object"&&s!==null&&"key"in s?s.key.localeCompare(o.key):typeof s=="string"&&typeof o=="string"?s.localeCompare(o):String(s).localeCompare(String(o)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(e,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var Js=class{urlToSearchRequest(e){return zr.get().parse(e)}searchRequestToUrl(e){return zr.get().serialize(e)}};window.FluidTopicsUrlService=new Js;var ot=h(b());var $t=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};$t.eventName="before-location-change";var Bt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Bt.eventName="change";var Zs=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))}},uc=new Zs;var dn=class t extends ot.WithEventBus{static build(){return new t(window.history,uc,()=>window.location,!1)}constructor(e,r,i,n){var s,o;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(o=(s=e.state)===null||s===void 0?void 0:s.index)!==null&&o!==void 0?o:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,ot.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Bt(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[s,o,a])=>{let l=new $t(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...s,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener($t.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener($t.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Bt.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Bt.eventName,e)}currentItem(){return(0,ot.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ot.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,ot.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,ot.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,s=e+1;for(;this.states.length>s&&!this.isDifferentMajorState(s,i);)this.hasState(s)&&(n=s),s++;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 i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,s=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return s==null||s!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=dn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var dc=h(I());var pc=dc.css`
|
|
168
|
+
`;var fc=h(I()),ye=h(K()),jt=h(b());var Ht=h(b());function hc(t,e){let{authenticationRequired:r,session:i}=g.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var pn=class extends or{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var eo=class t extends Ht.FtStateManager{static build(e){return new t(g,e)}constructor(e,r){super(),this.store=e,this.cache=new Ht.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new pn,this.cleanSessionDebouncer=new Ht.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Ht.Debouncer(500),this.apiProvider=r??(()=>Ut.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ce.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ce.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>hc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new jr(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return rc(g.getState().session,...e)}},hn=eo.build();var Vt=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var qr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:s}of i){let o=n.deref(),a=s.deref();o===void 0||a===void 0||o.dispatchEvent(new Vt(e.context,o,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let s=n.callbacks.get(r);s===void 0&&n.callbacks.set(r,s=new WeakSet),s.has(i)||(s.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var ee=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},U=class extends jt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=hn,this.contextRoot=new qr}render(){return fc.html`
|
|
169
169
|
<slot></slot>
|
|
170
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>lr.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};U.elementDefinitions={};U.styles=pc;ee([(0,ye.property)()],U.prototype,"baseUrl",void 0);ee([(0,ye.property)()],U.prototype,"tenantId",void 0);ee([(0,ye.property)()],U.prototype,"apiIntegrationIdentifier",void 0);ee([(0,ye.property)()],U.prototype,"apiIntegrationAppVersion",void 0);ee([(0,ye.property)()],U.prototype,"uiLocale",void 0);ee([(0,jt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);ee([(0,jt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"editorMode",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"noCustom",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);ee([(0,ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);ee([(0,ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"withManualResources",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);ee([(0,jt.jsonProperty)([])],U.prototype,"messageContexts",void 0);ee([(0,jt.jsonProperty)(void 0)],U.prototype,"session",void 0);var gc=h(b());var mc={"ft-app-context":U};(0,gc.customElements)(mc);var yc=h(
|
|
171
|
-
`;var xn=h(I()),hr=h(
|
|
170
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>lr.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};U.elementDefinitions={};U.styles=pc;ee([(0,ye.property)()],U.prototype,"baseUrl",void 0);ee([(0,ye.property)()],U.prototype,"tenantId",void 0);ee([(0,ye.property)()],U.prototype,"apiIntegrationIdentifier",void 0);ee([(0,ye.property)()],U.prototype,"apiIntegrationAppVersion",void 0);ee([(0,ye.property)()],U.prototype,"uiLocale",void 0);ee([(0,jt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);ee([(0,jt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"editorMode",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"noCustom",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);ee([(0,ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);ee([(0,ye.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"withManualResources",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);ee([(0,ye.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);ee([(0,jt.jsonProperty)([])],U.prototype,"messageContexts",void 0);ee([(0,jt.jsonProperty)(void 0)],U.prototype,"session",void 0);var gc=h(b());var mc={"ft-app-context":U};(0,gc.customElements)(mc);var yc=h(K());var to=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,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},ur=new to;var Np=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},Wr=Symbol("i18nAttributes"),vc=Symbol("i18nListAttributes"),Gr=Symbol("i18nProperties"),fn=Symbol("i18nContexts"),Kr=Symbol("i18nUnsubs"),yn=(0,dr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(s){return s??this.useCustomMessageContexts?un:lr}i18n(s){let{context:o,key:a,message:l}=s,{custom:c,args:u,argsProvider:d}=s;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(o,a,...p)}return l}async awaitI18n(s){let{context:o,custom:a}=s;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(s)}customI18n(s,o){if(ur.isI18nKey(s)){let[a,l]=s.split(".");return this.i18n({custom:!0,context:a,key:l,...o})||s}return s}firstUpdated(s){super.firstUpdated(s),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(s){super.update(s),this.updateI18nAttributes((o,a,l)=>s.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(s){this.updateI18nAttributes((o,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===s}),this.updateI18nProperties(o=>o.context.toLowerCase()===s),this.requestUpdate()}updateI18nAttributes(s){var o,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&s(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(o=this[Wr])===null||o===void 0||o.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[vc])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(m=>c(u,d,m))})}updateI18nProperties(s){var o;(o=this[Gr])===null||o===void 0||o.forEach((a,l)=>{s(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(s,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(s,o,a)}addI18nContext(s,o,a){let l=(typeof s=="string"?s:s.name).toLowerCase();a=typeof s=="string"?a:s.custom,this[fn].set(l,{isCustomContext:a}),this[Kr].has(l)||this[Kr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,o)}hasI18nContext(s){return this[fn].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[fn].forEach((s,o)=>this.addI18nContext(o,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Kr].forEach(s=>s()),this[Kr].clear()}}return e=fn,r=Kr,Np([(0,yc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),mn=class extends yn(dr.FtLitElement){},gn=class extends yn(dr.FtLitElementRedux){};var xc=h(b());var ro=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?ur.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Dp=new ro;var bc=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:xc.hasChanged,converter:ur,...e}),r[Wr]=(n=r[Wr])!==null&&n!==void 0?n:new Map,r[Wr].set(i,t??{})};var vn=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?un:lr}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let s=n;return o=>({context:this.name,key:s,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...s)=>this.service.resolveMessage(this.name,n,...s)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Ec=(t,e)=>(r,i)=>{var n,s;r.constructor.createProperty(i,e??{attribute:!1,type:String});let o={...t,key:(n=t.key)!==null&&n!==void 0?n:i};r[Gr]=(s=r[Gr])!==null&&s!==void 0?s:new Map,r[Gr].set(i,o)};var Sc=h(I());var Ac=Sc.css`
|
|
171
|
+
`;var xn=h(I()),hr=h(K()),bn=h(b());var pr=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},ke=class extends gn{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(g)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:xn.nothing:xn.html`
|
|
172
172
|
<span class="ft-i18n">
|
|
173
173
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
174
174
|
</span>
|
|
175
|
-
`}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};
|
|
175
|
+
`}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};ke.elementDefinitions={};ke.styles=Ac;pr([(0,bn.redux)()],ke.prototype,"editorMode",void 0);pr([(0,hr.property)()],ke.prototype,"context",void 0);pr([(0,hr.property)()],ke.prototype,"key",void 0);pr([(0,bn.jsonProperty)([])],ke.prototype,"args",void 0);pr([(0,hr.property)()],ke.prototype,"defaultMessage",void 0);pr([(0,hr.state)()],ke.prototype,"editorMessage",void 0);var _c=h(b());var Tc={"ft-i18n":ke};(0,_c.customElements)(Tc);var je=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},W=class extends mn{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new Fe.Debouncer,this.revealDebouncer=new Fe.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return Cc.html`
|
|
176
176
|
<div part="container"
|
|
177
177
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
178
178
|
<slot part="slot"></slot>
|
|
@@ -181,13 +181,13 @@
|
|
|
181
181
|
popover="manual">
|
|
182
182
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
183
183
|
<slot name="text"></slot>
|
|
184
|
-
<ft-typography variant="${
|
|
184
|
+
<ft-typography variant="${Me.caption}" ?hidden=${!(!((e=this.text)===null||e===void 0)&&e.message)}>
|
|
185
185
|
${(r=this.text)===null||r===void 0?void 0:r.message}
|
|
186
186
|
</ft-typography>
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
</div>
|
|
190
|
-
`}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,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.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 i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}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&&Si(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 ${
|
|
190
|
+
`}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,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.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 i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}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&&Si(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 ${Fe.designSystemVariables.transitionDuration}, left ${Fe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Fe.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};W.elementDefinitions={"ft-typography":re};W.styles=Zo;je([bc()],W.prototype,"text",void 0);je([(0,Ue.property)({type:Boolean})],W.prototype,"manual",void 0);je([(0,Ue.property)({type:Boolean})],W.prototype,"inline",void 0);je([(0,Fe.numberProperty)()],W.prototype,"delay",void 0);je([(0,Ue.property)()],W.prototype,"position",void 0);je([(0,Fe.jsonProperty)([])],W.prototype,"ignoreMatchingElements",void 0);je([(0,Ue.queryAssignedNodes)()],W.prototype,"slotNodes",void 0);je([(0,Ue.query)(".ft-tooltip--container")],W.prototype,"container",void 0);je([(0,Ue.query)(".ft-tooltip")],W.prototype,"tooltip",void 0);je([(0,Ue.query)(".ft-tooltip--content")],W.prototype,"tooltipContent",void 0);je([(0,Ue.state)()],W.prototype,"visible",void 0);var Rc=h(b());var wc={"ft-tooltip":W};(0,Rc.customElements)(wc);var Kt=h(I()),te=h(K()),uu=h(fr()),gr=h(b());var Fc=h(I()),se=h(K()),Uc=h(fr()),Qr=h(b());var Dc=h(I()),Y=h(b()),Ic=Y.FtCssVariableFactory.extend("--ft-ripple-color","",Y.designSystemVariables.colorContent),ne={color:Ic,backgroundColor:Y.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ic),opacityContentOnSurfacePressed:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Y.FtCssVariableFactory.external(Y.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Y.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Mc=Y.FtCssVariableFactory.extend("--ft-ripple-color","",Y.designSystemVariables.colorPrimary),Lc={color:Mc,backgroundColor:Y.FtCssVariableFactory.extend("--ft-ripple-background-color","",Mc)},Pc=Y.FtCssVariableFactory.extend("--ft-ripple-color","",Y.designSystemVariables.colorSecondary),Nc={color:Pc,backgroundColor:Y.FtCssVariableFactory.extend("--ft-ripple-background-color","",Pc)},kc=Dc.css`
|
|
191
191
|
:host {
|
|
192
192
|
display: contents;
|
|
193
193
|
}
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
.ft-icon--material {
|
|
359
359
|
font-family: ${we.materialFontFamily}, "Material Icons", sans-serif;
|
|
360
360
|
}
|
|
361
|
-
`,ze.noTextSelect];var Je;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Je||(Je={}));var Yr=h(I()),gt=h(
|
|
361
|
+
`,ze.noTextSelect];var Je;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Je||(Je={}));var Yr=h(I()),gt=h(K()),qc=h(b()),Kc=h(zc());var En;(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM="",t.HYPHEN_SOLID="",t.CROSSHAIRS="",t.PERSON_CHALKBOARD="",t.CIRCLE_ARROW_DOWN_SLASH="",t.BOOK_OPEN_COVER="",t.LIGHTBULB="",t.MESSAGE_BOT_AGENTIC_SOLID="",t.CHART_LINE_USER="",t.SERVER_CIRCLE_ARROW_DOWN="",t.EYE="",t.SHARE="󨃱"})(En||(En={}));var y;(function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""})(y||(y={}));var zv=new Map([...["abw"].map(t=>[t,y.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,y.AUDIO]),...["avi"].map(t=>[t,y.AVI]),...["chm","xhs"].map(t=>[t,y.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,y.CODE]),...["csv"].map(t=>[t,y.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,y.DITA]),...["epub"].map(t=>[t,y.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,y.EXCEL]),...["flac"].map(t=>[t,y.FLAC]),...["gif"].map(t=>[t,y.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,y.GZIP]),...["html","htm","xhtml"].map(t=>[t,y.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,y.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,y.JPEG]),...["json"].map(t=>[t,y.JSON]),...["m4a","m4p"].map(t=>[t,y.M4A]),...["mov","qt"].map(t=>[t,y.MOV]),...["mp3"].map(t=>[t,y.MP3]),...["mp4","m4v"].map(t=>[t,y.MP4]),...["ogg","oga"].map(t=>[t,y.OGG]),...["pdf","ps"].map(t=>[t,y.PDF]),...["png"].map(t=>[t,y.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,y.POWERPOINT]),...["rar"].map(t=>[t,y.RAR]),...["stp"].map(t=>[t,y.STP]),...["txt","rtf","md","mdown"].map(t=>[t,y.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,y.VIDEO]),...["wav"].map(t=>[t,y.WAV]),...["wma"].map(t=>[t,y.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,y.WORD]),...["xml","xsl","rdf"].map(t=>[t,y.XML]),...["yaml","yml","x-yaml"].map(t=>[t,y.YAML]),...["zip"].map(t=>[t,y.ZIP])]);var qv={[y.ABW]:"#91ABC6",[y.AUDIO]:"#1795E3",[y.AVI]:"#E63324",[y.CHM]:"#71C3EB",[y.CODE]:"#71C3EB",[y.CSV]:"#1F7345",[y.DITA]:"#71C3EB",[y.EPUB]:"#85B926",[y.EXCEL]:"#1F7345",[y.FLAC]:"#1795E3",[y.GIF]:"#59B031",[y.GZIP]:"#F8AB36",[y.HTML]:"#71C3EB",[y.IMAGE]:"#59B031",[y.JPEG]:"#59B031",[y.JSON]:"#71C3EB",[y.M4A]:"#1795E3",[y.MOV]:"#E63324",[y.MP3]:"#1795E3",[y.MP4]:"#E63324",[y.OGG]:"#1795E3",[y.PDF]:"#E44948",[y.PNG]:"#59B031",[y.POWERPOINT]:"#B54A2B",[y.RAR]:"#F8AB36",[y.STP]:"#3764B1",[y.TEXT]:"#3162AB",[y.UNKNOWN]:"#999999",[y.VIDEO]:"#E63324",[y.WAV]:"#1795E3",[y.WMA]:"#1795E3",[y.WORD]:"#3162AB",[y.XML]:"#71C3EB",[y.YAML]:"#71C3EB",[y.ZIP]:"#F8AB36"};var Xr=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},oe=class extends qc.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Yr.nothing}render(){let e=this.variant&&Object.values(Je).includes(this.variant)?this.variant:Je.fluid_topics,r=e!==Je.material||!!this.value;return Yr.html`
|
|
362
362
|
<i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
|
|
363
363
|
${(0,Kc.unsafeHTML)(this.resolvedIcon)}
|
|
364
364
|
<slot ?hidden=${r}></slot>
|
|
@@ -439,7 +439,7 @@
|
|
|
439
439
|
<div></div>
|
|
440
440
|
<div></div>
|
|
441
441
|
</div>
|
|
442
|
-
`}};qt.styles=Yc;var eu=h(b());var Zc={"ft-loader":qt};(0,eu.customElements)(Zc);var yt=h(I()),An=h(fr()),k=h(
|
|
442
|
+
`}};qt.styles=Yc;var eu=h(b());var Zc={"ft-loader":qt};(0,eu.customElements)(Zc);var yt=h(I()),An=h(fr()),k=h(K());var mr=t=>t??Q;var Sn=h(I()),C=h(b());var tu=C.FtCssVariableFactory.extend("--ft-button-color","",C.designSystemVariables.colorPrimary),$={backgroundColor:C.FtCssVariableFactory.extend("--ft-button-background-color","",C.designSystemVariables.colorSurface),borderRadius:C.FtCssVariableFactory.extend("--ft-button-border-radius","",C.designSystemVariables.borderRadiusL),color:tu,fontSize:C.FtCssVariableFactory.extend("--ft-button-font-size","",$e.fontSize),iconSize:C.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:C.FtCssVariableFactory.extend("--ft-button-ripple-color","",tu),verticalPadding:C.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:C.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:C.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:C.FtCssVariableFactory.external(C.designSystemVariables.colorOpacityDisabled,"Design system")},ru=C.FtCssVariableFactory.extend("--ft-button-primary-color","",C.FtCssVariableFactory.extend("--ft-button-color","",C.designSystemVariables.colorOnPrimary)),io={backgroundColor:C.FtCssVariableFactory.extend("--ft-button-primary-background-color","",C.FtCssVariableFactory.extend("--ft-button-background-color","",C.designSystemVariables.colorPrimary)),color:ru,rippleColor:C.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",ru)},qe={borderRadius:C.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",C.FtCssVariableFactory.extend("--ft-button-border-radius","",C.designSystemVariables.borderRadiusM)),verticalPadding:C.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:C.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:C.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},iu=Sn.css`
|
|
443
443
|
:host {
|
|
444
444
|
display: inline-block;
|
|
445
445
|
max-width: 100%;
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
?activated=${this.activated}
|
|
588
588
|
></ft-ripple>
|
|
589
589
|
<ft-typography part="label"
|
|
590
|
-
variant="${
|
|
590
|
+
variant="${Me.button}"
|
|
591
591
|
element="span"
|
|
592
592
|
class="${(0,An.classMap)(n)}">
|
|
593
593
|
<slot></slot>
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
623
623
|
`:yt.html`
|
|
624
624
|
<slot part="icon" name="icon"></slot>
|
|
625
|
-
`}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(e,r)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};R.elementDefinitions={"ft-ripple":D,"ft-tooltip":
|
|
625
|
+
`}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(e,r)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};R.elementDefinitions={"ft-ripple":D,"ft-tooltip":W,"ft-icon":oe,"ft-loader":qt,"ft-typography":re};R.styles=[Ze.safariEllipsisFix,iu,Ze.noTextSelect];R.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let r=e.target.getRootNode();r instanceof ShadowRoot&&r.host?r.host.hasTextContent=e.boundingClientRect.width>0:R.labelsObserver.unobserve(e.target)}});F([(0,k.property)({type:Boolean})],R.prototype,"primary",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"outlined",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"dense",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"round",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"disabled",void 0);F([(0,k.property)()],R.prototype,"icon",void 0);F([(0,k.property)()],R.prototype,"iconVariant",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);F([(0,k.property)()],R.prototype,"label",void 0);F([(0,k.property)()],R.prototype,"type",void 0);F([(0,k.property)()],R.prototype,"href",void 0);F([(0,k.property)()],R.prototype,"target",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"loading",void 0);F([(0,k.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);F([(0,k.property)()],R.prototype,"ariaHasPopup",void 0);F([(0,k.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);F([(0,k.property)()],R.prototype,"tooltipPosition",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);F([(0,k.property)({type:Boolean})],R.prototype,"activated",void 0);F([(0,k.query)(".ft-button")],R.prototype,"button",void 0);F([(0,k.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);F([(0,k.state)()],R.prototype,"hasTextContent",void 0);F([(0,k.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);F([(0,k.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var su=h(b());var nu={"ft-button":R};(0,su.customElements)(nu);var ou=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),Ee={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:ou,fontSize:w.FtCssVariableFactory.extend("--ft-chip-font-size","",Ae.fontSize),fontWeight:w.FtCssVariableFactory.extend("--ft-chip-font-weight","",Ae.fontWeight),iconSize:w.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:w.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:w.FtCssVariableFactory.extend("--ft-chip-ripple-color","",ou),horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:w.FtCssVariableFactory.extend("--ft-chip-border-color","",w.designSystemVariables.colorOutline),opacityDisabled:w.FtCssVariableFactory.external(w.designSystemVariables.colorOpacityDisabled,"Design system")},au=w.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnPrimary)),no={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorPrimary)),color:au,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",au)},lu={horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},cu=[w.noTextSelect,Zr.css`
|
|
626
626
|
:host {
|
|
627
627
|
display: inline-block;
|
|
628
628
|
max-width: 100%;
|
|
@@ -790,7 +790,7 @@
|
|
|
790
790
|
<div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
|
|
791
791
|
<ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
|
|
792
792
|
</div>
|
|
793
|
-
`}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Tn))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Tn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,gr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};B.elementDefinitions={"ft-ripple":D,"ft-typography":re,"ft-icon":oe,"ft-button":R};B.styles=cu;pe([(0,te.property)({type:Boolean})],B.prototype,"highlighted",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"removable",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"disabled",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"clickable",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"iconClickable",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"dense",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"multiLine",void 0);pe([(0,te.property)()],B.prototype,"label",void 0);pe([(0,te.property)()],B.prototype,"iconLabel",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"hideIconTooltip",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"accessibleLabelOnIcon",void 0);pe([(0,te.property)()],B.prototype,"icon",void 0);pe([(0,te.property)()],B.prototype,"iconVariant",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"trailingIcon",void 0);pe([(0,te.property)()],B.prototype,"typographyVariant",void 0);pe([(0,te.query)("ft-typography slot")],B.prototype,"slottedContent",void 0);var pu=h(b());var du={"ft-chip":B};(0,pu.customElements)(du);var vu=h(I()),J=h(
|
|
793
|
+
`}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Tn))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Tn))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,gr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};B.elementDefinitions={"ft-ripple":D,"ft-typography":re,"ft-icon":oe,"ft-button":R};B.styles=cu;pe([(0,te.property)({type:Boolean})],B.prototype,"highlighted",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"removable",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"disabled",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"clickable",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"iconClickable",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"dense",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"multiLine",void 0);pe([(0,te.property)()],B.prototype,"label",void 0);pe([(0,te.property)()],B.prototype,"iconLabel",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"hideIconTooltip",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"accessibleLabelOnIcon",void 0);pe([(0,te.property)()],B.prototype,"icon",void 0);pe([(0,te.property)()],B.prototype,"iconVariant",void 0);pe([(0,te.property)({type:Boolean})],B.prototype,"trailingIcon",void 0);pe([(0,te.property)()],B.prototype,"typographyVariant",void 0);pe([(0,te.query)("ft-typography slot")],B.prototype,"slottedContent",void 0);var pu=h(b());var du={"ft-chip":B};(0,pu.customElements)(du);var vu=h(I()),J=h(K()),xr=h(b());var xu=h(fr());var ei=h(I()),vr=h(K()),wn=h(b());var hu=h(I()),_n=h(b()),kp={iconColor:_n.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",_n.designSystemVariables.colorOnSurfaceMedium)},fu=hu.css`
|
|
794
794
|
.ft-floating-menu-item {
|
|
795
795
|
cursor: pointer;
|
|
796
796
|
display: flex;
|
|
@@ -837,7 +837,7 @@
|
|
|
837
837
|
${this.icon?ei.html`
|
|
838
838
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
839
839
|
`:ei.nothing}
|
|
840
|
-
<ft-typography variant="${
|
|
840
|
+
<ft-typography variant="${Me.body2}">
|
|
841
841
|
<slot></slot>
|
|
842
842
|
</ft-typography>
|
|
843
843
|
</div>
|
|
@@ -918,18 +918,19 @@
|
|
|
918
918
|
}
|
|
919
919
|
`;var Su=h(I()),Au=h(b());var xt=class extends Au.FtLitElement{render(){return Su.html`
|
|
920
920
|
<div class="ft-floating-menu-label">
|
|
921
|
-
<ft-typography variant="${
|
|
921
|
+
<ft-typography variant="${Me.caption}">
|
|
922
922
|
<slot></slot>
|
|
923
923
|
</ft-typography>
|
|
924
924
|
</div>
|
|
925
925
|
`}};xt.elementDefinitions={"ft-typography":re};xt.styles=Eu;var _u=h(b());var Tu={"ft-floating-menu":H,"ft-floating-menu-item":he,"ft-floating-menu-label":xt};(0,_u.customElements)(Tu);var ti=h(b());function Up(t){var e;return((e=(0,ti.accessResult)(t))===null||e===void 0?void 0:e.openMode)===rn.EXTERNAL}function so(t,e){return Up(t)?(0,ti.accessResult)(t).originUrl:(0,ti.accessResultUrl)(t,e)}var ju=h(wu());var oo=vn.build("designedReaderMapMetadata");var Ru=h(I());var Ou=Ru.css`
|
|
926
|
-
`;var oi=h(I()),at=h(q()),G=h(b());var ae=h(b());var Iu=h(b()),$p={setTranslationDestinationLanguage:(t,e)=>{t.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(t,e)=>{t.translation.sourceLanguage=e.payload},setTranslationProfileId:(t,e)=>{t.translation.profileId=e.payload},setTranslationLoading:(t,e)=>{t.translation.isLoading=e.payload},setTranslationError:(t,e)=>{t.translation.isError=e.payload},setTopicsRating:(t,e)=>{for(let r in e.payload)t.topicsRating[r]=e.payload[r]}},Mu=t=>Iu.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,filteredTocNodes:{},paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0,metadataFilters:[]},reducers:$p});var ao=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError,filteredTocNodes:this.paginatedToc.filteredTocNodes}}extractPagesToc(e,r,i){return e.flatMap(n=>{var s;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(s=n.title)!==null&&s!==void 0?s:"",contentTag:n.contentTag,contentClass:n.contentClass,untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(e,r,i){return e.flatMap(n=>{var s,o,a;if(n.tocId==null)return[...this.convertSectionNodes((o=n.pageToc)!==null&&o!==void 0?o:[],r,n.tocId),...this.convertNodes(n.children,r,n.tocId)];let l=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:n.tocId,contentId:n.contentId,title:n.title,contentTag:n.contentTag,contentClass:n.contentClass,untranslatedTitle:n.untranslatedTitle,hasRating:n.hasRating,origin:n.origin,prettyUrl:l,depth:r,parentTocId:i,children:[]};this.register(c);let u=this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],r+1,n.tocId),d=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...d],[c]})}convertSectionNodes(e,r,i){return e.flatMap(n=>{var s;let o=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),a={...n,prettyUrl:o,depth:r,parentTocId:i,children:[]};return this.register(a),a.children=this.convertSectionNodes(n.children,r+1,n.tocId),[a]})}buildPage(e,r){var i,n,s,o,a,l,c,u;let d=(o=e.tocId)!==null&&o!==void 0?o:(n=(i=e.pageToc)===null||i===void 0?void 0:i[0])===null||n===void 0?void 0:n.tocId,p={number:this.pages.length+1,title:(a=e.title)!==null&&a!==void 0?a:"",untranslatedTitle:e.untranslatedTitle,rootTocId:d??"root",toc:((l=e.pageToc)!==null&&l!==void 0?l:[]).map(v=>this.nodeByTocId[v.tocId]),topics:[],hiddenTopics:[],rootDepth:d?this.nodeByTocId[d].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},m=(v,_)=>(_?p.topics:p.hiddenTopics).push(v),x=(c=(s=e.pageConfiguration)===null||s===void 0?void 0:s.parentsVisibility)!==null&&c!==void 0?c:[];p.breadcrumb.forEach((v,_)=>{m(v,x[_])}),e.tocId&&m(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=e.pageToc)!==null&&u!==void 0?u:[]));let A=this.resolveOverridenRootTocIdByParentForcedByPagination(p.breadcrumb,x);return p.rootTocId=A??p.rootTocId,p.rootDepth=A?this.nodeByTocId[A].depth:p.rootDepth,p}resolveOverridenRootTocIdByParentForcedByPagination(e,r){for(let i=0;i<e.length;i++)if(r[i])return e[i]}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},Mn=class{convertPaginatedToc(e,r){return new ao(e,r).build()}};var Pn=h(b()),Ln=class extends Z{get metadataFilters(){return this._metadataFilters}set metadataFilters(e){this._metadataFilters=e}get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,i,n){super(!1,r),this.converter=e,this._mapId=i,this._metadataFilters=n,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register(this.makeCacheKey("enrichedToc",void 0,this.metadataFilters),()=>this.withMapId(e=>this.fetchPages(e,this._metadataFilters).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return Pe((r=(e=g.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r,i){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")+(!i||i.length==0?"":"-metadataFilters-"+this.hash(i))}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e,this.metadataFilters),()=>this.fetchPages(this.mapId,this.metadataFilters,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e,this.metadataFilters))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getFilteredTocNodes(e){var r;return(r=(await this.getEnrichedToc(e)).filteredTocNodes)!==null&&r!==void 0?r:{}}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var i,n;let s=this.getMapNow(r);return s?.prettyUrl==e||`${s?.id}/root`===e?(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.toc[0]:(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByUrl[e]}async getPage(e,r){let i=await this.getEnrichedToc(r);return i.pages[e-1]||i.pages[0]}async getPageByTocId(e,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[e]||i.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let i=this.getTocNodeNow(e);if(!i)return;let n=await this.getTopicInfo(i);return n?.metadata.find(s=>s.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,i){return this.cache.get("topic-relatives-"+[e,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,i))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,i,n){let s=this.getNavigationData(e,r,i),o=this.getReaderLinkPrefix()+(s.prettyUrl?s.prettyUrl:`${s.mapId}/${s.tocId}`),a=new URL(o,this.api.tenantBaseUrl);if(s.page!=null&&a.searchParams.set("page",`${s.page}`),s.prettyUrlDuplicated&&a.searchParams.set("tocId",s.tocId),s.section!=null&&a.searchParams.set("section",s.section),n&&s.metadataFilters){let l=Pn.SearchPlaceConverter.serializeValueFilters(s.metadataFilters);l&&a.searchParams.set(Pn.SearchPlaceQueryParams.VALUE_FILTERS,l)}return a.href}getLinkWithFilter(e,r,i){return this.getLink(e,r,i,!0)}getNavigationData(e,r,i,n){var s,o;e=e||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[e],c=a?.nodeByTocId[e],u=c?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(s=c?.title)!==null&&s!==void 0?s:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(o=a?.duplicatedPrettyUrls.has(u??""))!==null&&o!==void 0?o:!1,section:i,metadataFilters:this.metadataFilters}}async getAccurateNavigationData(e,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(e,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var i;return r?{type:r.topics.type,rating:(i=r.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,i){return this.makeRateTopicRequest(e,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=g.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,i,n){return this.makeTopicFeedbackRequest(e,r,i,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let i=this.getTocNodeNow(e,r);if(!i)return[];let n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],s=this.getTocNodeNow(i.parentTocId,r);for(;s;)n.unshift({tocId:s.tocId,title:s.title,untranslatedTitle:s.untranslatedTitle}),s=this.getTocNodeNow(s.parentTocId,r);return n}isFeatureAccessible(e,{session:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case tt.FEEDBACK:return Pe(r??[],N.FEEDBACK_USER);case tt.RATING:return Pe(r??[],N.RATING_USER);case tt.PRINT:return Pe(r??[],N.PRINT_USER);case tt.BOOKMARK:return!!r?.sessionAuthenticated;case tt.COLLECTIONS:return Pe(r??[],N.COLLECTION_USER);case tt.PERSONAL_BOOKS:return Pe(r??[],N.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var Nn=class t extends Ln{static async build(e){return new t(new Mn,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let i=await this.api.getMap(e,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r,i){return await this.getMap(i),r?.length?this.api.getFilteredPages(e,i,r):this.api.getPages(e,this.fingerprint,i)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(e,r,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,i){return this.api.rateTopic(this.mapId,e,r,i)}makeTopicFeedbackRequest(e,r,i,n){return this.api.sendTopicFeedback(this.mapId,e,r,i,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var Bp="topicPivot";function Dn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(Bp,i)}),r.href}var kn=class t{static build(e,r){return new t(Mu(e.trim()||"context"),r??Nn.build)}loaded(){return(0,ae.waitUntil)(()=>this._loaded)}constructor(e,r,i,n){this.store=e,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ae.Debouncer(10),this.analyticsEventsService=n??new cr,this.initService(r)}async initService(e){this.service=await e();let{mapId:r,metadataFilters:i}=this.store.getState();return this.service.mapId=r,this.service.metadataFilters=i,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async setFilters(e){(0,ae.deepEqual)(e,this.store.getState().metadataFilters)||(this.store.actions.metadataFilters(e),this.service&&(this.service.metadataFilters=e))}async awaitService(){return(0,ae.waitFor)(()=>this.service)}async navigateToTopic(e,r,i){await this.loaded();let n=await this.resolvePage(e,i);this.store.actions.currentPage(n);let s=this.resolveValidNonRootTocId(e,n);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([]),e&&!r&&(this.store.commands.clear(/^focus-topic-/),this.store.commands.add({type:`focus-topic-${e}`}))}async resolvePage(e,r){var i,n,s;let o=await this.awaitService();if(r)return o.getPage(r,this.getTranslationSettings());if(!e)return o.getPageByTocId("root",this.getTranslationSettings());let a=(i=this.store.getState().filteredTocNodes)===null||i===void 0?void 0:i[e],l=((n=this.service)===null||n===void 0?void 0:n.getTocNodeNow(e))!=null;return a&&a.reason!=="ACCESS_RIGHTS_FILTER"&&!l?o.getPageByTocId((s=a.closestParent)!==null&&s!==void 0?s:"root",this.getTranslationSettings()):o.getPageByTocId(e,this.getTranslationSettings())}resolveValidNonRootTocId(e,r){var i,n,s,o,a;let l=(n=e==="root"?void 0:e)!==null&&n!==void 0?n:r.rootTocId;if(!r.topics.includes(l)){if(e!="root"&&!r.hiddenTopics.includes(l)){let c=this.store.getState().filteredTocNodes[l];if(c){this.store.dispatchEvent(new li(c));let u=((i=this.service)===null||i===void 0?void 0:i.getTocNodeNow(c.tocId))!=null;return c.reason==="ACCESS_RIGHTS_FILTER"||u?c.tocId:(s=c.closestParent)!==null&&s!==void 0?s:"root"}this.store.dispatchEvent(new CustomEvent(et.requestedTopicNotFound))}return(a=(o=r.topics[0])!==null&&o!==void 0?o:r.hiddenTopics[0])!==null&&a!==void 0?a:"root"}return l}async navigateToPage(e){await this.loaded();let i=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData())}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}clearFromFilter(){this._loaded=!1,this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0)}async reloadFromFilter(e,r){var i,n,s;this.clearFromFilter();let{scrollTarget:o,visibleTopics:a,currentPage:l}=this.store.getState(),c=(s=(n=(i=o?.tocId)!==null&&i!==void 0?i:a?.[0])!==null&&n!==void 0?n:l?.rootTocId)!==null&&s!==void 0?s:"root";await this.fetchDataFromFilter(),this.navigateToTopic(c,e,r)}async fetchDataFromFilter(){var e,r,i,n;let s=this.getTranslationSettings();try{await Promise.all([(e=this.service)===null||e===void 0?void 0:e.getToc(s).then(o=>this.store.actions.toc(o)),(r=this.service)===null||r===void 0?void 0:r.getPagesToc(s).then(o=>this.store.actions.pagesToc(o)),(i=this.service)===null||i===void 0?void 0:i.getFilteredTocNodes(s).then(o=>this.store.actions.filteredTocNodes(o))]),this._loaded=!0}catch(o){if(!(o instanceof ae.CanceledPromiseError))throw s&&this.setTranslationError(!0),(n=this.errorHandler)===null||n===void 0||n.call(this,o),o}}async fetchData(){var e,r,i,n,s,o,a;let l=this.getTranslationSettings();try{l&&this.setTranslationLoading(!0),await Promise.all([this.loadConfiguration(),(e=this.service)===null||e===void 0?void 0:e.getMap(l).then(c=>this.store.actions.map(c)),(r=this.service)===null||r===void 0?void 0:r.getToc(l).then(c=>this.store.actions.toc(c)),(i=this.service)===null||i===void 0?void 0:i.getPagesToc(l).then(c=>this.store.actions.pagesToc(c)),(n=this.service)===null||n===void 0?void 0:n.getPaginationConfiguration().then(c=>this.store.actions.paginationConfiguration(c)),(s=this.service)===null||s===void 0?void 0:s.getFilteredTocNodes(l).then(c=>this.store.actions.filteredTocNodes(c)),(o=this.service)===null||o===void 0?void 0:o.getTranslationError(l).then(c=>this.setTranslationError(c))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,l&&this.setTranslationLoading(!1)}catch(c){if(!(c instanceof ae.CanceledPromiseError))throw l&&this.setTranslationError(!0),(a=this.errorHandler)===null||a===void 0||a.call(this,c),c}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let i=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(n=>{var s;return n.key==((s=this.store.getState().configuration)===null||s===void 0?void 0:s.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),s=n?.results.flatMap(o=>o.entries);this.store.actions.relatives(s)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(et.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(o=>{var a;return((a=o.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),s=(r=(e=g.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new ae.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,s)}}async navigateToRelativeTopicIfFound(e){var r,i,n;await this.loaded();let s=await(0,ae.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),o=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(o,s,[e]);if(!((n=(i=(r=l?.results)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData())}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData())}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));i&&this.store.actions.setTopicsRating({[e]:i})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}async getAccurateNavigationData(e,r,i){return await this.awaitService(),this.service.getAccurateNavigationData(e,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,n).then(s=>(s.isTranslationError&&this.setTranslationError(!0),s.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(et.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let s=ae.ClusteringHelper.findResultWithMetadataValue((n=this.store.getState().relatives)!==null&&n!==void 0?n:[],"ft:locale",e),o=(0,ae.accessResultUrl)(s);if(o){let a=this.store.getState().visibleTopics[0],l=(r=this.store.getState().configuration)===null||r===void 0?void 0:r.relativeTopicPivotMetadata;if(l&&a){let c=await((i=this.service)===null||i===void 0?void 0:i.getTopicMetadataValue(a,l));o=Dn(o,c)}}return o}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:s}=g.getState(),o=this.store.getState(),a=o.map,l=o.translation.profileId;if(!(i||!a||!n||!s||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:l,document:u,translationOrigin:en.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(e,r){var i;let{editorMode:n,apiIntegrationIdentifier:s,apiIntegrationAppVersion:o}=g.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!s||!o||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let p={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(i=l.untranslatedTitle)!==null&&i!==void 0?i:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:s,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:u.map(m=>{var x;return{tocId:m.tocId,title:(x=m.untranslatedTitle)!==null&&x!==void 0?x:m.title}}),document:p,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Fn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},Un=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},$n=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},Bn=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},Hn=class extends Event{constructor(){super("ft-reader-map-not-found")}},Vn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},jn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},zn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Lu=h(I());var Pu=Lu.css`
|
|
927
|
-
`;var Uu=h(I()),Ue=h(q()),ve=h(b());var br=h(b()),si=h(q());var ri;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(ri||(ri={}));var j=h(b());var Nu=h(b()),Hp={setRequest:(t,e)=>{t.request=e.payload}},Du=t=>Nu.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],sortId:void 0,paging:{page:1,perPage:20},keywordMatch:void 0},liveQuery:"",recentQueries:[],paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,announcements:void 0,suggestResults:void 0,configuration:void 0,propagatedFacets:[]},reducers:Hp,deprecatedKeys:["locales"]});var qn=class extends Z{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((i,n)=>i.id.localeCompare(n.id))};return this.cache.get("search-"+this.hash(r),async()=>(await this.awaitApi).search(e),120*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),120*1e3)}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((i,n)=>i.localeCompare(n))}}).sort((r,i)=>r.key.localeCompare(i.key))}};var Kn=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e,composed:!0,bubbles:!0})}},Wn=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e,composed:!0,bubbles:!0})}},Gn=class extends CustomEvent{constructor(e,r,i){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:i},composed:!0,bubbles:!0})}},ii=class t extends Event{constructor(){super(t.eventName)}};ii.eventName="search-context-clear-all-filters";var Vp=t=>t.request.virtualField===nr.TITLE_ONLY&&t.request.scope===sr.DOCUMENTS,jp=t=>t.request.keywordMatch==tn.MANDATORY,ni=class t extends j.FtStateManager{static build(e,r){return new t(Du(e.trim()||"context"),r)}constructor(e,r){super(),this.store=e,this.ignoreEmptyQuery=!1,this.canUpdateUiLocale=!1,this.openExternalDocumentInNewTab=!1,this.applyStickyFilters=!1,this.history=new j.QueryHistoryStorage(this.store.actions.recentQueries),this.onNewNeededRequest=i=>{i==ri.CLUSTERED_SEARCH&&this.launchSearch()},this.onStorageEvent=i=>{i.key===this.taruqaConfigStorageKey&&this.loadTaruqaTemplate()},this.loadTaruqaTemplate=()=>{var i;let n;if(Pe(g.getState().session,N.DEBUG_USER)){let s=JSON.parse((i=window.localStorage.getItem(this.taruqaConfigStorageKey))!==null&&i!==void 0?i:"{}");n=s.overrideEnabled?s.template:void 0}this.updateSearchRequest({taruqaTemplateOverride:n,changedByConfiguration:!0})},this.updateLocales=(i=g.getState().availableContentLocales)=>{this.store.actions.locales(i),i.length>0&&this.forceContentLocale(this.store.getState().request.contentLocale)},this.searchDebouncer=new j.Debouncer(100),this.launchSearch=i=>this.searchDebouncer.run(()=>this.fetchSearchData(i??this.buildSearchRequest())),this.buildSearchRequest=(i=this.store.getState())=>{var n;return{...i.request,facets:this.facetIds.map(s=>({id:s})),stickyFiltersId:this.applyStickyFilters?(n=g.getState().stickyFilters)===null||n===void 0?void 0:n.id:void 0}},this.suggestDebouncer=new j.Debouncer(1e3),this.launchSuggest=i=>this.suggestDebouncer.run(()=>this.fetchSuggestData(i??this.buildSuggestRequest())),this.buildSuggestRequest=(i=this.store.getState())=>{var n,s;return{input:i.liveQuery,metadataFilters:i.request.metadataFilters,sort:(s=i.request.sort)!==null&&s!==void 0?s:[],sortId:i.request.sortId,contentLocale:i.request.contentLocale,scope:i.request.scope,keywordMatch:i.request.keywordMatch,stickyFiltersId:this.applyStickyFilters?(n=g.getState().stickyFilters)===null||n===void 0?void 0:n.id:void 0}},this.service=r??new qn,this.searchWatcher=new j.ReduxWatcher(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=new j.ReduxWatcher(e,this.buildSuggestRequest,this.launchSuggest),this.localesWatcher=new j.ReduxWatcher(g,i=>i.availableContentLocales,this.updateLocales),this.stickyFiltersIdWatcher=new j.ReduxWatcher(g,i=>{var n;return(n=i.stickyFilters)===null||n===void 0?void 0:n.id},()=>{this.applyStickyFilters&&(this.launchSearch(),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.loadTaruqaTemplate(),this.launchSearch()}addListeners(){window.addEventListener("storage",this.onStorageEvent),g.addEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.watch(),this.suggestWatcher.watch(),this.localesWatcher.watch(),this.stickyFiltersIdWatcher.watch(),this.history.enable(g.getState().tenantId+"-ft-recent-queries")}removeListeners(){window.removeEventListener("storage",this.onStorageEvent),g.removeEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.stop(),this.suggestWatcher.stop(),this.localesWatcher.stop(),this.stickyFiltersIdWatcher.stop(),this.history.disable()}get taruqaConfigStorageKey(){return g.getState().tenantId+"-taruqa-experiment-conf"}updateSearchRequest(e,r=!1){let i=(0,j.deepCopy)(this.store.getState().request);delete i.changedByConfiguration,this.store.actions.setRequest({...i,paging:{perPage:i.paging.perPage,page:r?1:i.paging.page},...e})}setQuery(e){this.updateSearchRequest({query:e},!0),this.setLiveQuery(e)}setContentLocale(e){var r;let i=this.store.getState().request.contentLocale;return e!==i&&(e=t.findKnownContentLocale(e,i),this.updateSearchRequest({contentLocale:e,metadataFilters:[]},!0),this.canUpdateUiLocale&&(!((r=g.getState().localesConfiguration)===null||r===void 0)&&r.searchLanguageSetsUiLanguage)&&e&&hn.requestUiLocaleUpdate(e,e)),e}static findKnownContentLocale(...e){let{availableContentLocales:r,localesConfiguration:i}=g.getState();if(r.length===0)return e[0];let n=o=>r.some(a=>a.lang==o);for(let o of e)if(n(o))return o;let s=i?.defaultLocales.defaultContentLocale;return s?`${s.lang}-${s.region}`:r[0].lang}forceContentLocale(e){this.updateSearchRequest({contentLocale:t.findKnownContentLocale(e)})}setPageSize(e){let r=this.store.getState().request;this.updateSearchRequest({paging:{...r.paging,perPage:isNaN(e)?20:(0,j.minmax)(1,e,1e3)}})}setPageNumber(e){let r=this.store.getState().request;this.updateSearchRequest({paging:{...r.paging,page:isNaN(e)?1:Math.max(1,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.updateSearchRequest({sort:e},!0)}setSortId(e,r=!1){var i;let n=r?{changedByConfiguration:!0}:{};if(e==null||this.sortOptions.length==0)return this.updateSearchRequest({sortId:e,...n},!0),e;let s=(i=this.sortOptions.find(o=>o.id==e))!==null&&i!==void 0?i:this.sortOptions[0];return this.updateSearchRequest({sortId:s.id,...n},!0),s.id}setFilters(e){let r=e.filter(i=>!i.valueFilter||i.valueFilter.values.length>0);this.updateSearchRequest({metadataFilters:r},!0)}setClusterSortCriterion(e){this.updateSearchRequest({clusterSortCriterions:e})}setSearchInDocumentTitlesOnly(e){e?this.updateSearchRequest({virtualField:nr.TITLE_ONLY,scope:sr.DOCUMENTS},!0):this.updateSearchRequest({virtualField:nr.EVERYWHERE,scope:sr.DEFAULT},!0)}setKeywordMatch(e){this.updateSearchRequest({keywordMatch:e},!0)}setVirtualField(e){this.updateSearchRequest({virtualField:e},!0)}get searchInDocumentTitlesOnly(){return Vp(this.store.getState())}get keywordMatch(){return jp(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new ii)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,r){let i=this.facetIds.filter(n=>n!=e);r&&i.push(r),this.facetIds=i}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(i=>i.id),...((e=r.metadataFilters)!==null&&e!==void 0?e:[]).map(i=>i.key)])]}set facetIds(e){let i=[...new Set(e)].map(n=>({id:n}));this.updateSearchRequest({facets:i})}addPropagatedFacet(e){let r=new Set(this.store.getState().propagatedFacets);r.add(e),this.store.actions.propagatedFacets([...r])}setFilter(e,r){this.setValueFilter(e,r)}setValueFilter(e,r){let i=this.store.getState().request.metadataFilters,n={key:e,valueFilter:{values:r,negative:!1}},s=[...i.filter(o=>!o.valueFilter),...i.filter(o=>o.valueFilter&&o.key!==n.key),n];this.setFilters(s)}setDateFilter(e,r){let i=this.store.getState().request.metadataFilters,n={key:e,dateFilter:{type:r}},s=[...i.filter(o=>!o.dateFilter),...i.filter(o=>o.dateFilter&&o.key!==n.key),n];this.setFilters(s)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,i=[...r.filter(n=>!n.dateFilter),...r.filter(n=>n.dateFilter&&n.key!==e)];this.setFilters(i)}setRangeFilter(e,r,i){let n=this.store.getState().request.metadataFilters,s={key:e,rangeFilter:{from:r,to:i}},o=[...n.filter(a=>!a.rangeFilter),...n.filter(a=>a.rangeFilter&&a.key!==s.key),s];this.setFilters(o)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,i=[...r.filter(n=>!n.rangeFilter),...r.filter(n=>n.rangeFilter&&n.key!==e)];this.setFilters(i)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.updateSearchRequest({...e,facets:this.store.getState().request.facets},!0),this.setLiveQuery(e.query)}setScope(e){this.updateSearchRequest({scope:e})}setOtherQueryParams(e){this.updateSearchRequest({otherQueryParams:e})}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setCanUpdateUiLocale(e){this.canUpdateUiLocale=e}setApplyStickyFilters(e){this.applyStickyFilters=e,this.launchSearch(),this.launchSuggest()}addRecentQuery(e){this.history.addRecentQuery(e)}removeRecentQuery(e){this.history.removeRecentQuery(e)}async fetchSearchData(e){var r,i,n,s,o;if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),!!this.isRequestNeeded(ri.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{!((i=this.store.getState().results)===null||i===void 0)&&i.length||this.store.actions.results(void 0),this.cancelableSearch=(0,j.cancelable)(this.service.launchSearch(e));let a=await this.cancelableSearch;if(this.store.actions.announcements(a.announcements),a.paging.currentPage<=1)this.store.actions.results(a.results),this.store.actions.facets(a.facets),this.store.actions.spellcheck(a.spellcheck);else{let l=((s=this.store.getState().results)!==null&&s!==void 0?s:[]).concat(a.results);this.store.actions.results(l),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(a.paging.currentPage-1)*((o=e.paging.perPage)!==null&&o!==void 0?o:20)+1}`})}this.store.actions.paging(a.paging)}}catch(a){a instanceof j.CanceledPromiseError||(console.error(a),(n=this.errorHandler)===null||n===void 0||n.call(this,a))}}async fetchSuggestData(e){var r;try{if((r=this.cancelableSuggest)===null||r===void 0||r.cancel(),e.input.length<3){this.store.actions.suggestResults([]);return}this.cancelableSuggest=(0,j.cancelable)(this.service.launchSuggest(e));let i=await this.cancelableSuggest;this.store.actions.suggestResults(i.suggestions)}catch(i){!(i instanceof j.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(i)}}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 lo=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},uo=class extends CustomEvent{constructor(e){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:e}})}},ku=Symbol("registerInterval"),co=Symbol("registerAttempts"),zp=40,qp=(0,br.applyMixinOnce)(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(i){var n,s,o;super.willUpdate(i),i.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(o=i.get("neededSearchRequests"))!==null&&o!==void 0?o:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[co]=0,this.tryToRegisterToContext(),this[ku]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[co]>zp?window.clearInterval(this[ku]):(this[co]++,this.dispatchEvent(new uo(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return lo([(0,si.state)()],e.prototype,"stateManager",void 0),lo([(0,si.state)({hasChanged:br.hasChanged})],e.prototype,"neededSearchRequests",void 0),lo([(0,si.property)()],e.prototype,"searchRegistrationId",void 0),e}),Fu=class extends qp(br.FtLitElementRedux){};var Jn=h(b());function Qn(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Yn(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 Xn=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=([i,n])=>{if(!this.canSendEvent()||!i||!n)return;let s=this.store.getState().request;this.document==null?this.sendKhubSearchEvent(s,i,n):this.sendDocumentSearchEvent(s,i,n)},this.eventsService=r??new cr,this.resultsWatcher=(0,Jn.watch)(e,i=>[i.results,i.paging],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}=g.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}=g.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r,i){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:i.totalClustersCount},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Qn(e.metadataFilters),facets:e.metadataFilters.map(s=>Yn(s))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,r,i){if(e.metadataFilters.find(s=>{var o;return s.key==="ft:publicationId"&&((o=s.valueFilter)===null||o===void 0?void 0:o.values[0])===this.document.id})!==void 0){let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:i.totalClustersCount},searchQuery:{terms:e.query},document:this.document};this.eventsService.sendDocumentSearchEvent(s)}}sendResultClickedEvent(e,r){if(!this.canSendEvent())return;let i=this.store.getState().request,n;e.type==Xe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.SEARCH_PAGE__SELECT,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Qn(i.metadataFilters),facets:i.metadataFilters.map(o=>Yn(o))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(s)}sendResultContextMenuOpenedEvent(e,r){if(!this.canSendEvent())return;let i=this.store.getState().request,n;e.type==Xe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Qn(i.metadataFilters),facets:i.metadataFilters.map(o=>Yn(o))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(s)}convertDocument(e){switch(e.type){case Xe.MAP:return{id:e.map.mapId,title:e.map.title,type:mt.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Xe.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:mt.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Xe.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:mt.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case Xe.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:mt.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case Xe.HTML_PACKAGE_PAGE:return{id:e.htmlPackagePage.packageId,title:e.htmlPackagePage.title,type:mt.HTML_PACKAGE,metadata:e.htmlPackagePage.metadata};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var r;return(r=(0,Jn.accessResult)(e))===null||r===void 0?void 0:r.originUrl}};var W=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},L=class extends ve.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=ni.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 Xn(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.applyStickyFilters=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this._appIntegrationInfoReady=!1,this.addStore(g)}render(){return Uu.html`
|
|
926
|
+
`;var oi=h(I()),at=h(K()),G=h(b());var ae=h(b());var Iu=h(b()),$p={setTranslationDestinationLanguage:(t,e)=>{t.translation.destinationLanguage=e.payload},setTranslationSourceLanguage:(t,e)=>{t.translation.sourceLanguage=e.payload},setTranslationProfileId:(t,e)=>{t.translation.profileId=e.payload},setTranslationLoading:(t,e)=>{t.translation.isLoading=e.payload},setTranslationError:(t,e)=>{t.translation.isError=e.payload},setTopicsRating:(t,e)=>{for(let r in e.payload)t.topicsRating[r]=e.payload[r]}},Mu=t=>Iu.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,filteredTocNodes:{},paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0,metadataFilters:[]},reducers:$p});var ao=class{constructor(e,r){this.mapId=e,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError,filteredTocNodes:this.paginatedToc.filteredTocNodes}}extractPagesToc(e,r,i){return e.flatMap(n=>{var s;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(s=n.title)!==null&&s!==void 0?s:"",contentTag:n.contentTag,contentClass:n.contentClass,untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(e,r,i){return e.flatMap(n=>{var s,o,a;if(n.tocId==null)return[...this.convertSectionNodes((o=n.pageToc)!==null&&o!==void 0?o:[],r,n.tocId),...this.convertNodes(n.children,r,n.tocId)];let l=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:n.tocId,contentId:n.contentId,title:n.title,contentTag:n.contentTag,contentClass:n.contentClass,untranslatedTitle:n.untranslatedTitle,hasRating:n.hasRating,origin:n.origin,prettyUrl:l,depth:r,parentTocId:i,children:[]};this.register(c);let u=this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],r+1,n.tocId),d=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...d],[c]})}convertSectionNodes(e,r,i){return e.flatMap(n=>{var s;let o=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),a={...n,prettyUrl:o,depth:r,parentTocId:i,children:[]};return this.register(a),a.children=this.convertSectionNodes(n.children,r+1,n.tocId),[a]})}buildPage(e,r){var i,n,s,o,a,l,c,u;let d=(o=e.tocId)!==null&&o!==void 0?o:(n=(i=e.pageToc)===null||i===void 0?void 0:i[0])===null||n===void 0?void 0:n.tocId,p={number:this.pages.length+1,title:(a=e.title)!==null&&a!==void 0?a:"",untranslatedTitle:e.untranslatedTitle,rootTocId:d??"root",toc:((l=e.pageToc)!==null&&l!==void 0?l:[]).map(v=>this.nodeByTocId[v.tocId]),topics:[],hiddenTopics:[],rootDepth:d?this.nodeByTocId[d].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},m=(v,_)=>(_?p.topics:p.hiddenTopics).push(v),x=(c=(s=e.pageConfiguration)===null||s===void 0?void 0:s.parentsVisibility)!==null&&c!==void 0?c:[];p.breadcrumb.forEach((v,_)=>{m(v,x[_])}),e.tocId&&m(e.tocId,e.pageConfiguration.isVisible),p.topics.push(...this.tocIds((u=e.pageToc)!==null&&u!==void 0?u:[]));let A=this.resolveOverridenRootTocIdByParentForcedByPagination(p.breadcrumb,x);return p.rootTocId=A??p.rootTocId,p.rootDepth=A?this.nodeByTocId[A].depth:p.rootDepth,p}resolveOverridenRootTocIdByParentForcedByPagination(e,r){for(let i=0;i<e.length;i++)if(r[i])return e[i]}registerPage(e){for(let r of[...e.topics,...e.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=e);this.pages.push(e)}tocIds(e){return e.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(e){let r=[e.tocId];for(;e?.parentTocId;)r.unshift(e.parentTocId),e=this.nodeByTocId[e.parentTocId];return r}register(e){e.prettyUrl&&(this.nodeByUrl[e.prettyUrl]==null?this.nodeByUrl[e.prettyUrl]=e:this.duplicatedPrettyUrls.add(e.prettyUrl)),this.nodeByUrl[`${this.mapId}/${e.tocId}`]=e,this.nodeByTocId[e.tocId]=e}},Mn=class{convertPaginatedToc(e,r){return new ao(e,r).build()}};var Pn=h(b()),Ln=class extends Z{get metadataFilters(){return this._metadataFilters}set metadataFilters(e){this._metadataFilters=e}get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,i,n){super(!1,r),this.converter=e,this._mapId=i,this._metadataFilters=n,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register(this.makeCacheKey("enrichedToc",void 0,this.metadataFilters),()=>this.withMapId(e=>this.fetchPages(e,this._metadataFilters).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return Ne((r=(e=g.getState().session)===null||e===void 0?void 0:e.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(e=>e!=="configuration")}makeCacheKey(e,r,i){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")+(!i||i.length==0?"":"-metadataFilters-"+this.hash(i))}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e,this.metadataFilters),()=>this.fetchPages(this.mapId,this.metadataFilters,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e,this.metadataFilters))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getFilteredTocNodes(e){var r;return(r=(await this.getEnrichedToc(e)).filteredTocNodes)!==null&&r!==void 0?r:{}}async getTocNode(e,r){return(await this.getEnrichedToc(r)).nodeByTocId[e]}getTocNodeNow(e,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[e]}getTocNodeNowByUrl(e,r){var i,n;let s=this.getMapNow(r);return s?.prettyUrl==e||`${s?.id}/root`===e?(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.toc[0]:(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByUrl[e]}async getPage(e,r){let i=await this.getEnrichedToc(r);return i.pages[e-1]||i.pages[0]}async getPageByTocId(e,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[e]||i.pages[0]}getTopicInfo(e){return this.cache.get("topic-"+e.tocId,()=>this.fetchTopicMetadata(e))}getTopicContent(e){return this.cache.get("topic-content-"+e.tocId,()=>this.fetchTopicHTMLContent(e))}getTranslatedTopicContent(e,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+e.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(e,r))}async getTopicMetadataValue(e,r){let i=this.getTocNodeNow(e);if(!i)return;let n=await this.getTopicInfo(i);return n?.metadata.find(s=>s.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(e,r){return this.cache.get("document-relatives-"+e+"-"+r.join("-"),()=>this.fetchRelativesForDocument(e,r))}getRelativesForTopicInMap(e,r,i){return this.cache.get("topic-relatives-"+[e,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(e,r,i))}getAttachmentDownloadLink(e){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(e).content}?download=true&locationValue=reader`)}getLink(e,r,i,n){let s=this.getNavigationData(e,r,i),o=this.getReaderLinkPrefix()+(s.prettyUrl?s.prettyUrl:`${s.mapId}/${s.tocId}`),a=new URL(o,this.api.tenantBaseUrl);if(s.page!=null&&a.searchParams.set("page",`${s.page}`),s.prettyUrlDuplicated&&a.searchParams.set("tocId",s.tocId),s.section!=null&&a.searchParams.set("section",s.section),n&&s.metadataFilters){let l=Pn.SearchPlaceConverter.serializeValueFilters(s.metadataFilters);l&&a.searchParams.set(Pn.SearchPlaceQueryParams.VALUE_FILTERS,l)}return a.href}getLinkWithFilter(e,r,i){return this.getLink(e,r,i,!0)}getNavigationData(e,r,i,n){var s,o;e=e||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[e],c=a?.nodeByTocId[e],u=c?.prettyUrl;return{mapId:this.mapId,tocId:e,topicTitle:(s=c?.title)!==null&&s!==void 0?s:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(o=a?.duplicatedPrettyUrls.has(u??""))!==null&&o!==void 0?o:!1,section:i,metadataFilters:this.metadataFilters}}async getAccurateNavigationData(e,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(e,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(e=>e?.publication)}getTopicRating(e){return this.getRatingSummary().then(r=>{var i;return r?{type:r.topics.type,rating:(i=r.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===e)}:void 0})}rateMap(e,r){return this.makeRateMapRequest(e,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(e,r){return this.makeMapFeedbackRequest(e,r)}rateTopic(e,r,i){return this.makeRateTopicRequest(e,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(e){return this.makeUnrateTopicRequest(e).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let e=g.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,i,n){return this.makeTopicFeedbackRequest(e,r,i,n)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(e,r){let i=this.getTocNodeNow(e,r);if(!i)return[];let n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],s=this.getTocNodeNow(i.parentTocId,r);for(;s;)n.unshift({tocId:s.tocId,title:s.title,untranslatedTitle:s.untranslatedTitle}),s=this.getTocNodeNow(s.parentTocId,r);return n}isFeatureAccessible(e,{session:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case tt.FEEDBACK:return Ne(r??[],N.FEEDBACK_USER);case tt.RATING:return Ne(r??[],N.RATING_USER);case tt.PRINT:return Ne(r??[],N.PRINT_USER);case tt.BOOKMARK:return!!r?.sessionAuthenticated;case tt.COLLECTIONS:return Ne(r??[],N.COLLECTION_USER);case tt.PERSONAL_BOOKS:return Ne(r??[],N.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var Nn=class t extends Ln{static async build(e){return new t(new Mn,void 0,e)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(e,r){let i=await this.api.getMap(e,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(e){return this.api.getMapRating(e)}async fetchPages(e,r,i){return await this.getMap(i),r?.length?this.api.getFilteredPages(e,i,r):this.api.getPages(e,this.fingerprint,i)}fetchTopicHTMLContent(e){return this.api.getTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(e,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,e.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(e){return this.api.getTopic(this.mapId,e.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(e,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(e,r,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[e]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(e,r){return this.api.sendMapFeedback(this.mapId,e,r)}makeRateMapRequest(e,r){return this.api.rateMap(this.mapId,e,r)}makeRateTopicRequest(e,r,i){return this.api.rateTopic(this.mapId,e,r,i)}makeTopicFeedbackRequest(e,r,i,n){return this.api.sendTopicFeedback(this.mapId,e,r,i,n)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var Bp="topicPivot";function Dn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(Bp,i)}),r.href}var kn=class t{static build(e,r){return new t(Mu(e.trim()||"context"),r??Nn.build)}loaded(){return(0,ae.waitUntil)(()=>this._loaded)}constructor(e,r,i,n){this.store=e,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new ae.Debouncer(10),this.analyticsEventsService=n??new cr,this.initService(r)}async initService(e){this.service=await e();let{mapId:r,metadataFilters:i}=this.store.getState();return this.service.mapId=r,this.service.metadataFilters=i,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async setFilters(e){(0,ae.deepEqual)(e,this.store.getState().metadataFilters)||(this.store.actions.metadataFilters(e),this.service&&(this.service.metadataFilters=e))}async awaitService(){return(0,ae.waitFor)(()=>this.service)}async navigateToTopic(e,r,i){await this.loaded();let n=await this.resolvePage(e,i);this.store.actions.currentPage(n);let s=this.resolveValidNonRootTocId(e,n);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([]),e&&!r&&(this.store.commands.clear(/^focus-topic-/),this.store.commands.add({type:`focus-topic-${e}`}))}async resolvePage(e,r){var i,n,s;let o=await this.awaitService();if(r)return o.getPage(r,this.getTranslationSettings());if(!e)return o.getPageByTocId("root",this.getTranslationSettings());let a=(i=this.store.getState().filteredTocNodes)===null||i===void 0?void 0:i[e],l=((n=this.service)===null||n===void 0?void 0:n.getTocNodeNow(e))!=null;return a&&a.reason!=="ACCESS_RIGHTS_FILTER"&&!l?o.getPageByTocId((s=a.closestParent)!==null&&s!==void 0?s:"root",this.getTranslationSettings()):o.getPageByTocId(e,this.getTranslationSettings())}resolveValidNonRootTocId(e,r){var i,n,s,o,a;let l=(n=e==="root"?void 0:e)!==null&&n!==void 0?n:r.rootTocId;if(!r.topics.includes(l)){if(e!="root"&&!r.hiddenTopics.includes(l)){let c=this.store.getState().filteredTocNodes[l];if(c){this.store.dispatchEvent(new li(c));let u=((i=this.service)===null||i===void 0?void 0:i.getTocNodeNow(c.tocId))!=null;return c.reason==="ACCESS_RIGHTS_FILTER"||u?c.tocId:(s=c.closestParent)!==null&&s!==void 0?s:"root"}this.store.dispatchEvent(new CustomEvent(et.requestedTopicNotFound))}return(a=(o=r.topics[0])!==null&&o!==void 0?o:r.hiddenTopics[0])!==null&&a!==void 0?a:"root"}return l}async navigateToPage(e){await this.loaded();let i=await(await this.awaitService()).getPage(e,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var e;!((e=this.service)===null||e===void 0)&&e.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData())}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}clearFromFilter(){this._loaded=!1,this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0)}async reloadFromFilter(e,r){var i,n,s;this.clearFromFilter();let{scrollTarget:o,visibleTopics:a,currentPage:l}=this.store.getState(),c=(s=(n=(i=o?.tocId)!==null&&i!==void 0?i:a?.[0])!==null&&n!==void 0?n:l?.rootTocId)!==null&&s!==void 0?s:"root";await this.fetchDataFromFilter(),this.navigateToTopic(c,e,r)}async fetchDataFromFilter(){var e,r,i,n;let s=this.getTranslationSettings();try{await Promise.all([(e=this.service)===null||e===void 0?void 0:e.getToc(s).then(o=>this.store.actions.toc(o)),(r=this.service)===null||r===void 0?void 0:r.getPagesToc(s).then(o=>this.store.actions.pagesToc(o)),(i=this.service)===null||i===void 0?void 0:i.getFilteredTocNodes(s).then(o=>this.store.actions.filteredTocNodes(o))]),this._loaded=!0}catch(o){if(!(o instanceof ae.CanceledPromiseError))throw s&&this.setTranslationError(!0),(n=this.errorHandler)===null||n===void 0||n.call(this,o),o}}async fetchData(){var e,r,i,n,s,o,a;let l=this.getTranslationSettings();try{l&&this.setTranslationLoading(!0),await Promise.all([this.loadConfiguration(),(e=this.service)===null||e===void 0?void 0:e.getMap(l).then(c=>this.store.actions.map(c)),(r=this.service)===null||r===void 0?void 0:r.getToc(l).then(c=>this.store.actions.toc(c)),(i=this.service)===null||i===void 0?void 0:i.getPagesToc(l).then(c=>this.store.actions.pagesToc(c)),(n=this.service)===null||n===void 0?void 0:n.getPaginationConfiguration().then(c=>this.store.actions.paginationConfiguration(c)),(s=this.service)===null||s===void 0?void 0:s.getFilteredTocNodes(l).then(c=>this.store.actions.filteredTocNodes(c)),(o=this.service)===null||o===void 0?void 0:o.getTranslationError(l).then(c=>this.setTranslationError(c))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,l&&this.setTranslationLoading(!1)}catch(c){if(!(c instanceof ae.CanceledPromiseError))throw l&&this.setTranslationError(!0),(a=this.errorHandler)===null||a===void 0||a.call(this,c),c}}loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var e;return(e=this.service)===null||e===void 0||e.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var e,r;let i=(e=this.store.getState().map)===null||e===void 0?void 0:e.metadata.filter(n=>{var s;return n.key==((s=this.store.getState().configuration)===null||s===void 0?void 0:s.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),s=n?.results.flatMap(o=>o.entries);this.store.actions.relatives(s)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(et.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(o=>{var a;return((a=o.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),s=(r=(e=g.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new ae.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,s)}}async navigateToRelativeTopicIfFound(e){var r,i,n;await this.loaded();let s=await(0,ae.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),o=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(o,s,[e]);if(!((n=(i=(r=l?.results)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(e){this.store.actions.searchInDocumentQuery(e)}async setTranslationDestinationLanguage(e){this.store.actions.setTranslationDestinationLanguage(e),e&&this.sendDocumentOnDemandTranslateEvent(e),await this.loadDebouncer.run(()=>this.fetchData())}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData())}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(e=r.map)===null||e===void 0?void 0:e.lang}:void 0}setLinkPreviewDialogId(e){this.store.actions.linkPreviewDialogId(e)}async fetchMapRating(){var e;this.store.actions.mapRating(await((e=this.service)===null||e===void 0?void 0:e.getMapRating()))}async fetchTopicRating(e){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(e));i&&this.store.actions.setTopicsRating({[e]:i})}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}async getAccurateNavigationData(e,r,i){return await this.awaitService(),this.service.getAccurateNavigationData(e,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(e){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(e,this.getTranslationSettings())}fetchTopicContent(e){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,e),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(e,n).then(s=>(s.isTranslationError&&this.setTranslationError(!0),s.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(et.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let s=ae.ClusteringHelper.findResultWithMetadataValue((n=this.store.getState().relatives)!==null&&n!==void 0?n:[],"ft:locale",e),o=(0,ae.accessResultUrl)(s);if(o){let a=this.store.getState().visibleTopics[0],l=(r=this.store.getState().configuration)===null||r===void 0?void 0:r.relativeTopicPivotMetadata;if(l&&a){let c=await((i=this.service)===null||i===void 0?void 0:i.getTopicMetadataValue(a,l));o=Dn(o,c)}}return o}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:s}=g.getState(),o=this.store.getState(),a=o.map,l=o.translation.profileId;if(!(i||!a||!n||!s||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:l,document:u,translationOrigin:en.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(e,r){var i;let{editorMode:n,apiIntegrationIdentifier:s,apiIntegrationAppVersion:o}=g.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!s||!o||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let p={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(i=l.untranslatedTitle)!==null&&i!==void 0?i:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:s,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:u.map(m=>{var x;return{tocId:m.tocId,title:(x=m.untranslatedTitle)!==null&&x!==void 0?x:m.title}}),document:p,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(e){if(!e)return;let r=e.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Fn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},Un=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},$n=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},Bn=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},Hn=class extends Event{constructor(){super("ft-reader-map-not-found")}},Vn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},jn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},zn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Lu=h(I());var Pu=Lu.css`
|
|
927
|
+
`;var Uu=h(I()),Oe=h(K()),ve=h(b());var br=h(b()),si=h(K());var ri;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(ri||(ri={}));var j=h(b());var Nu=h(b()),Hp={setRequest:(t,e)=>{t.request=e.payload}},Du=t=>Nu.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],sortId:void 0,paging:{page:1,perPage:20},keywordMatch:void 0},liveQuery:"",recentQueries:[],paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,announcements:void 0,suggestResults:void 0,configuration:void 0,propagatedFacets:[]},reducers:Hp,deprecatedKeys:["locales"]});var qn=class extends Z{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((i,n)=>i.id.localeCompare(n.id))};return this.cache.get("search-"+this.hash(r),async()=>(await this.awaitApi).search(e),120*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),120*1e3)}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((i,n)=>i.localeCompare(n))}}).sort((r,i)=>r.key.localeCompare(i.key))}};var Kn=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e,composed:!0,bubbles:!0})}},Wn=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e,composed:!0,bubbles:!0})}},Gn=class extends CustomEvent{constructor(e,r,i){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:i},composed:!0,bubbles:!0})}},ii=class t extends Event{constructor(){super(t.eventName)}};ii.eventName="search-context-clear-all-filters";var Vp=t=>t.request.virtualField===nr.TITLE_ONLY&&t.request.scope===sr.DOCUMENTS,jp=t=>t.request.keywordMatch==tn.MANDATORY,ni=class t extends j.FtStateManager{static build(e,r){return new t(Du(e.trim()||"context"),r)}constructor(e,r){super(),this.store=e,this.ignoreEmptyQuery=!1,this.canUpdateUiLocale=!1,this.openExternalDocumentInNewTab=!1,this.applyStickyFilters=!1,this.history=new j.QueryHistoryStorage(this.store.actions.recentQueries),this.onNewNeededRequest=i=>{i==ri.CLUSTERED_SEARCH&&this.launchSearch()},this.onStorageEvent=i=>{i.key===this.taruqaConfigStorageKey&&this.loadTaruqaTemplate()},this.loadTaruqaTemplate=()=>{var i;let n;if(Ne(g.getState().session,N.DEBUG_USER)){let s=JSON.parse((i=window.localStorage.getItem(this.taruqaConfigStorageKey))!==null&&i!==void 0?i:"{}");n=s.overrideEnabled?s.template:void 0}this.updateSearchRequest({taruqaTemplateOverride:n,changedByConfiguration:!0})},this.updateLocales=(i=g.getState().availableContentLocales)=>{this.store.actions.locales(i),i.length>0&&this.forceContentLocale(this.store.getState().request.contentLocale)},this.searchDebouncer=new j.Debouncer(100),this.launchSearch=i=>this.searchDebouncer.run(()=>this.fetchSearchData(i??this.buildSearchRequest())),this.buildSearchRequest=(i=this.store.getState())=>{var n;return{...i.request,facets:this.facetIds.map(s=>({id:s})),stickyFiltersId:this.applyStickyFilters?(n=g.getState().stickyFilters)===null||n===void 0?void 0:n.id:void 0}},this.suggestDebouncer=new j.Debouncer(1e3),this.launchSuggest=i=>this.suggestDebouncer.run(()=>this.fetchSuggestData(i??this.buildSuggestRequest())),this.buildSuggestRequest=(i=this.store.getState())=>{var n,s;return{input:i.liveQuery,metadataFilters:i.request.metadataFilters,sort:(s=i.request.sort)!==null&&s!==void 0?s:[],sortId:i.request.sortId,contentLocale:i.request.contentLocale,scope:i.request.scope,keywordMatch:i.request.keywordMatch,stickyFiltersId:this.applyStickyFilters?(n=g.getState().stickyFilters)===null||n===void 0?void 0:n.id:void 0}},this.service=r??new qn,this.searchWatcher=new j.ReduxWatcher(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=new j.ReduxWatcher(e,this.buildSuggestRequest,this.launchSuggest),this.localesWatcher=new j.ReduxWatcher(g,i=>i.availableContentLocales,this.updateLocales),this.stickyFiltersIdWatcher=new j.ReduxWatcher(g,i=>{var n;return(n=i.stickyFilters)===null||n===void 0?void 0:n.id},()=>{this.applyStickyFilters&&(this.launchSearch(),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.loadTaruqaTemplate(),this.launchSearch()}addListeners(){window.addEventListener("storage",this.onStorageEvent),g.addEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.watch(),this.suggestWatcher.watch(),this.localesWatcher.watch(),this.stickyFiltersIdWatcher.watch(),this.history.enable(g.getState().tenantId+"-ft-recent-queries")}removeListeners(){window.removeEventListener("storage",this.onStorageEvent),g.removeEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.stop(),this.suggestWatcher.stop(),this.localesWatcher.stop(),this.stickyFiltersIdWatcher.stop(),this.history.disable()}get taruqaConfigStorageKey(){return g.getState().tenantId+"-taruqa-experiment-conf"}updateSearchRequest(e,r=!1){let i=(0,j.deepCopy)(this.store.getState().request);delete i.changedByConfiguration,this.store.actions.setRequest({...i,paging:{perPage:i.paging.perPage,page:r?1:i.paging.page},...e})}setQuery(e){this.updateSearchRequest({query:e},!0),this.setLiveQuery(e)}setContentLocale(e){var r;let i=this.store.getState().request.contentLocale;return e!==i&&(e=t.findKnownContentLocale(e,i),this.updateSearchRequest({contentLocale:e,metadataFilters:[]},!0),this.canUpdateUiLocale&&(!((r=g.getState().localesConfiguration)===null||r===void 0)&&r.searchLanguageSetsUiLanguage)&&e&&hn.requestUiLocaleUpdate(e,e)),e}static findKnownContentLocale(...e){let{availableContentLocales:r,localesConfiguration:i}=g.getState();if(r.length===0)return e[0];let n=o=>r.some(a=>a.lang==o);for(let o of e)if(n(o))return o;let s=i?.defaultLocales.defaultContentLocale;return s?`${s.lang}-${s.region}`:r[0].lang}forceContentLocale(e){this.updateSearchRequest({contentLocale:t.findKnownContentLocale(e)})}setPageSize(e){let r=this.store.getState().request;this.updateSearchRequest({paging:{...r.paging,perPage:isNaN(e)?20:(0,j.minmax)(1,e,1e3)}})}setPageNumber(e){let r=this.store.getState().request;this.updateSearchRequest({paging:{...r.paging,page:isNaN(e)?1:Math.max(1,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.updateSearchRequest({sort:e},!0)}setSortId(e,r=!1){var i;let n=r?{changedByConfiguration:!0}:{};if(e==null||this.sortOptions.length==0)return this.updateSearchRequest({sortId:e,...n},!0),e;let s=(i=this.sortOptions.find(o=>o.id==e))!==null&&i!==void 0?i:this.sortOptions[0];return this.updateSearchRequest({sortId:s.id,...n},!0),s.id}setFilters(e){let r=e.filter(i=>!i.valueFilter||i.valueFilter.values.length>0);this.updateSearchRequest({metadataFilters:r},!0)}setClusterSortCriterion(e){this.updateSearchRequest({clusterSortCriterions:e})}setSearchInDocumentTitlesOnly(e){e?this.updateSearchRequest({virtualField:nr.TITLE_ONLY,scope:sr.DOCUMENTS},!0):this.updateSearchRequest({virtualField:nr.EVERYWHERE,scope:sr.DEFAULT},!0)}setKeywordMatch(e){this.updateSearchRequest({keywordMatch:e},!0)}setVirtualField(e){this.updateSearchRequest({virtualField:e},!0)}get searchInDocumentTitlesOnly(){return Vp(this.store.getState())}get keywordMatch(){return jp(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new ii)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,r){let i=this.facetIds.filter(n=>n!=e);r&&i.push(r),this.facetIds=i}get facetIds(){var e;let r=this.store.getState().request;return[...new Set([...r.facets.map(i=>i.id),...((e=r.metadataFilters)!==null&&e!==void 0?e:[]).map(i=>i.key)])]}set facetIds(e){let i=[...new Set(e)].map(n=>({id:n}));this.updateSearchRequest({facets:i})}addPropagatedFacet(e){let r=new Set(this.store.getState().propagatedFacets);r.add(e),this.store.actions.propagatedFacets([...r])}setFilter(e,r){this.setValueFilter(e,r)}setValueFilter(e,r){let i=this.store.getState().request.metadataFilters,n={key:e,valueFilter:{values:r,negative:!1}},s=[...i.filter(o=>!o.valueFilter),...i.filter(o=>o.valueFilter&&o.key!==n.key),n];this.setFilters(s)}setDateFilter(e,r){let i=this.store.getState().request.metadataFilters,n={key:e,dateFilter:{type:r}},s=[...i.filter(o=>!o.dateFilter),...i.filter(o=>o.dateFilter&&o.key!==n.key),n];this.setFilters(s)}removeDateFilter(e){let r=this.store.getState().request.metadataFilters,i=[...r.filter(n=>!n.dateFilter),...r.filter(n=>n.dateFilter&&n.key!==e)];this.setFilters(i)}setRangeFilter(e,r,i){let n=this.store.getState().request.metadataFilters,s={key:e,rangeFilter:{from:r,to:i}},o=[...n.filter(a=>!a.rangeFilter),...n.filter(a=>a.rangeFilter&&a.key!==s.key),s];this.setFilters(o)}removeRangeFilter(e){let r=this.store.getState().request.metadataFilters,i=[...r.filter(n=>!n.rangeFilter),...r.filter(n=>n.rangeFilter&&n.key!==e)];this.setFilters(i)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.updateSearchRequest({...e,facets:this.store.getState().request.facets},!0),this.setLiveQuery(e.query)}setScope(e){this.updateSearchRequest({scope:e})}setOtherQueryParams(e){this.updateSearchRequest({otherQueryParams:e})}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setCanUpdateUiLocale(e){this.canUpdateUiLocale=e}setApplyStickyFilters(e){this.applyStickyFilters=e,this.launchSearch(),this.launchSuggest()}addRecentQuery(e){this.history.addRecentQuery(e)}removeRecentQuery(e){this.history.removeRecentQuery(e)}async fetchSearchData(e){var r,i,n,s,o;if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),!!this.isRequestNeeded(ri.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{!((i=this.store.getState().results)===null||i===void 0)&&i.length||this.store.actions.results(void 0),this.cancelableSearch=(0,j.cancelable)(this.service.launchSearch(e));let a=await this.cancelableSearch;if(this.store.actions.announcements(a.announcements),a.paging.currentPage<=1)this.store.actions.results(a.results),this.store.actions.facets(a.facets),this.store.actions.spellcheck(a.spellcheck);else{let l=((s=this.store.getState().results)!==null&&s!==void 0?s:[]).concat(a.results);this.store.actions.results(l),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(a.paging.currentPage-1)*((o=e.paging.perPage)!==null&&o!==void 0?o:20)+1}`})}this.store.actions.paging(a.paging)}}catch(a){a instanceof j.CanceledPromiseError||(console.error(a),(n=this.errorHandler)===null||n===void 0||n.call(this,a))}}async fetchSuggestData(e){var r;try{if((r=this.cancelableSuggest)===null||r===void 0||r.cancel(),e.input.length<3){this.store.actions.suggestResults([]);return}this.cancelableSuggest=(0,j.cancelable)(this.service.launchSuggest(e));let i=await this.cancelableSuggest;this.store.actions.suggestResults(i.suggestions)}catch(i){!(i instanceof j.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(i)}}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 lo=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},uo=class extends CustomEvent{constructor(e){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:e}})}},ku=Symbol("registerInterval"),co=Symbol("registerAttempts"),zp=40,qp=(0,br.applyMixinOnce)(Symbol("toFtSearchComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(i){var n,s,o;super.willUpdate(i),i.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(o=i.get("neededSearchRequests"))!==null&&o!==void 0?o:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[co]=0,this.tryToRegisterToContext(),this[ku]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[co]>zp?window.clearInterval(this[ku]):(this[co]++,this.dispatchEvent(new uo(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return lo([(0,si.state)()],e.prototype,"stateManager",void 0),lo([(0,si.state)({hasChanged:br.hasChanged})],e.prototype,"neededSearchRequests",void 0),lo([(0,si.property)()],e.prototype,"searchRegistrationId",void 0),e}),Fu=class extends qp(br.FtLitElementRedux){};var Jn=h(b());function Qn(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Yn(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 Xn=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=([i,n])=>{if(!this.canSendEvent()||!i||!n)return;let s=this.store.getState().request;this.document==null?this.sendKhubSearchEvent(s,i,n):this.sendDocumentSearchEvent(s,i,n)},this.eventsService=r??new cr,this.resultsWatcher=(0,Jn.watch)(e,i=>[i.results,i.paging],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}=g.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}=g.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r,i){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:i.totalClustersCount},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Qn(e.metadataFilters),facets:e.metadataFilters.map(s=>Yn(s))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,r,i){if(e.metadataFilters.find(s=>{var o;return s.key==="ft:publicationId"&&((o=s.valueFilter)===null||o===void 0?void 0:o.values[0])===this.document.id})!==void 0){let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:i.totalClustersCount},searchQuery:{terms:e.query},document:this.document};this.eventsService.sendDocumentSearchEvent(s)}}sendResultClickedEvent(e,r){if(!this.canSendEvent())return;let i=this.store.getState().request,n;e.type==Xe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.SEARCH_PAGE__SELECT,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Qn(i.metadataFilters),facets:i.metadataFilters.map(o=>Yn(o))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(s)}sendResultContextMenuOpenedEvent(e,r){if(!this.canSendEvent())return;let i=this.store.getState().request,n;e.type==Xe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ft.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Qn(i.metadataFilters),facets:i.metadataFilters.map(o=>Yn(o))},searchResult:{rank:r,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(s)}convertDocument(e){switch(e.type){case Xe.MAP:return{id:e.map.mapId,title:e.map.title,type:mt.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Xe.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:mt.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Xe.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:mt.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case Xe.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:mt.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case Xe.HTML_PACKAGE_PAGE:return{id:e.htmlPackagePage.packageId,title:e.htmlPackagePage.title,type:mt.HTML_PACKAGE,metadata:e.htmlPackagePage.metadata};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var r;return(r=(0,Jn.accessResult)(e))===null||r===void 0?void 0:r.originUrl}};var z=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},L=class extends ve.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=ni.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 Xn(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.applyStickyFilters=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this._appIntegrationInfoReady=!1,this.disableAnalyticsEvents=!1,this.addStore(g)}render(){return Uu.html`
|
|
928
928
|
<slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click=${this.onResultClicked}
|
|
929
929
|
@ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
|
|
930
|
-
`}willUpdate(e){super.willUpdate(e),e.has("_appIntegrationInfoReady")&&this._appIntegrationInfoReady&&this.eventManager.initAppInfo(),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("applyStickyFilters")&&this.stateManager.setApplyStickyFilters(this.applyStickyFilters),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),this.stateManager.addListeners()}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.stateManager.clearResults()}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new Wn(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Gn(this.request,this.paging,this.spellcheckAutocorrect))}registerComponent(e){var r;if(e.stopPropagation(),((r=e.detail)===null||r===void 0?void 0:r.registrationId)==this.registrationId){let i=e.composedPath()[0];this.register(i)}}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new Kn(e))}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)}};L.elementDefinitions={};L.styles=Pu;
|
|
930
|
+
`}willUpdate(e){super.willUpdate(e),e.has("_appIntegrationInfoReady")&&this._appIntegrationInfoReady&&this.eventManager.initAppInfo(),e.has("disableAnalyticsEvents")&&this.eventManager.setEnableAnalyticsEvents(!this.disableAnalyticsEvents),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("applyStickyFilters")&&this.stateManager.setApplyStickyFilters(this.applyStickyFilters),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),this.stateManager.addListeners()}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.stateManager.clearResults()}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new Wn(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Gn(this.request,this.paging,this.spellcheckAutocorrect))}registerComponent(e){var r;if(e.stopPropagation(),((r=e.detail)===null||r===void 0?void 0:r.registrationId)==this.registrationId){let i=e.composedPath()[0];this.register(i)}}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new Kn(e))}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)}};L.elementDefinitions={};L.styles=Pu;z([(0,ve.redux)({store:g.name})],L.prototype,"session",void 0);z([(0,Oe.property)()],L.prototype,"query",void 0);z([(0,Oe.property)()],L.prototype,"contentLocale",void 0);z([(0,ve.numberProperty)()],L.prototype,"pageSize",void 0);z([(0,Oe.property)({type:Boolean})],L.prototype,"searchInDocumentTitlesOnly",void 0);z([(0,Oe.property)()],L.prototype,"keywordMatch",void 0);z([(0,Oe.property)()],L.prototype,"scope",void 0);z([(0,Oe.property)()],L.prototype,"virtualField",void 0);z([(0,Oe.property)()],L.prototype,"registrationId",void 0);z([(0,Oe.property)({type:Boolean})],L.prototype,"ignoreEmptyQuery",void 0);z([(0,Oe.property)({type:Boolean})],L.prototype,"applyStickyFilters",void 0);z([(0,ve.redux)({store:g.name})],L.prototype,"openExternalDocumentInNewTab",void 0);z([(0,ve.jsonProperty)([])],L.prototype,"filters",void 0);z([(0,Oe.property)()],L.prototype,"sortId",void 0);z([(0,ve.jsonProperty)([])],L.prototype,"sort",void 0);z([(0,ve.jsonProperty)({})],L.prototype,"otherQueryParams",void 0);z([(0,ve.redux)({store:"search"})],L.prototype,"request",void 0);z([(0,ve.redux)({store:"search"})],L.prototype,"paging",void 0);z([(0,ve.redux)({store:"search",selector:t=>t.spellcheck})],L.prototype,"spellcheckAutocorrect",void 0);z([(0,ve.redux)({store:g.name,selector:t=>t.apiIntegrationIdentifier!==void 0&&t.apiIntegrationAppVersion!==void 0})],L.prototype,"_appIntegrationInfoReady",void 0);z([(0,Oe.property)({attribute:!1})],L.prototype,"searchServiceProvider",void 0);z([(0,Oe.property)({type:Boolean})],L.prototype,"disableAnalyticsEvents",void 0);var Bu=h(b());var $u={"ft-search-context":L};(0,Bu.customElements)($u);var me=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},po=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},q=class extends G.FtLitElementRedux{constructor(){super(),this.metadataFilters=[],this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new G.Debouncer(5),this.navigationDebouncer=new G.Debouncer(10),this.mapLoadedEventDebouncer=new G.Debouncer(50),this.addStore(g)}render(){return oi.html`
|
|
931
931
|
${this.importStyleIfNeeded()}
|
|
932
932
|
<ft-toc-filtering-search-context
|
|
933
|
+
disableAnalyticsEvents
|
|
933
934
|
registrationId="reader-toc-filtering"
|
|
934
935
|
.filters=${this.filters}
|
|
935
936
|
@ft-search-request-change=${e=>{var r;e.stopPropagation(),e.target===this.tocFilteringContext&&this.stateManager.setFilters((r=e.detail.metadataFilters.filter(i=>i.key!="ft:publicationId"))!==null&&r!==void 0?r:[])}}
|
|
@@ -942,7 +943,7 @@
|
|
|
942
943
|
<style>
|
|
943
944
|
@import "${i}"
|
|
944
945
|
</style>
|
|
945
|
-
`}get stateManager(){return this._stateManager==null&&(this._stateManager=kn.build(this.id||(0,G.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=e=>this.handleLoadError(e),this.addStore(this.stateManager.store,"reader")),this._stateManager}get filters(){return[{key:"ft:publicationId",valueFilter:{negative:!1,values:[this.mapId]}},...this.metadataFilters]}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(e=>{let r=e.fontsStylesheet();if(r&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${r}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),document.head.append(i)}window.FluidTopicsReaderService=new po(this.stateManager)}),g.addEventListener(Ce.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),g.addEventListener(Ce.eventName,this.updateConfiguration)}update(e){var r;super.update(e),e.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider);let i=e.has("metadataFilters")&&e.get("metadataFilters")!=null;i&&this.stateManager.setFilters((r=this.metadataFilters)!==null&&r!==void 0?r:[]),e.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),e.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),e.has("session")?this.reload():i?this.stateManager.reloadFromFilter(this.section,this.page):["tocId","section","page","mapId","topicPivot"].some(n=>e.has(n))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),(e.has("map")||e.has("toc"))&&this.sendLoadedEventIfLoaded(),e.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=e.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(s=>this.dispatchEvent(new $n(s))))}(e.has("visibleTopics")||e.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>this.stateManager.getAccurateNavigationData(n,this.currentPage))).then(n=>{let s=n.filter(o=>o!=null&&o.topicTitle!=="").map(o=>({tocId:o.tocId,title:o.topicTitle,page:o.page,prettyUrl:o.prettyUrl,prettyUrlDuplicated:o.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(o.tocId)}));this.dispatchEvent(new Un(this.map,s))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.loaded(),await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new zn),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)})}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setReaderStateManager(this.stateManager)}handleLoadError(e){let r=e;r.status===401?this.dispatchEvent(new Vn):r.status===403?this.dispatchEvent(new jn):r.status===404?this.dispatchEvent(new Hn):this.dispatchEvent(new Bn(e))}reloadBookmarks(){Gs.reloadBookmarks()}async reloadRating(){var e,r;await((e=this.stateManager.service)===null||e===void 0?void 0:e.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new Fn(this.map,this.toc))})}};
|
|
946
|
+
`}get stateManager(){return this._stateManager==null&&(this._stateManager=kn.build(this.id||(0,G.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=e=>this.handleLoadError(e),this.addStore(this.stateManager.store,"reader")),this._stateManager}get filters(){return[{key:"ft:publicationId",valueFilter:{negative:!1,values:[this.mapId]}},...this.metadataFilters]}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(e=>{let r=e.fontsStylesheet();if(r&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${r}"]`)){let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",r),document.head.append(i)}window.FluidTopicsReaderService=new po(this.stateManager)}),g.addEventListener(Ce.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),g.addEventListener(Ce.eventName,this.updateConfiguration)}update(e){var r;super.update(e),e.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider);let i=e.has("metadataFilters")&&e.get("metadataFilters")!=null;i&&this.stateManager.setFilters((r=this.metadataFilters)!==null&&r!==void 0?r:[]),e.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),e.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),e.has("session")?this.reload():i?this.stateManager.reloadFromFilter(this.section,this.page):["tocId","section","page","mapId","topicPivot"].some(n=>e.has(n))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),(e.has("map")||e.has("toc"))&&this.sendLoadedEventIfLoaded(),e.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=e.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(s=>this.dispatchEvent(new $n(s))))}(e.has("visibleTopics")||e.has("scrollTarget"))&&((i=this.scrollTarget)===null||i===void 0?void 0:i.tocId)==null&&Promise.all(this.visibleTopics.map(n=>this.stateManager.getAccurateNavigationData(n,this.currentPage))).then(n=>{let s=n.filter(o=>o!=null&&o.topicTitle!=="").map(o=>({tocId:o.tocId,title:o.topicTitle,page:o.page,prettyUrl:o.prettyUrl,prettyUrlDuplicated:o.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(o.tocId)}));this.dispatchEvent(new Un(this.map,s))})}clear(){this.stateManager.clear()}async reload(){await this.stateManager.reload(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.loaded(),await this.navigationDebouncer.run(async()=>{this.topicPivot!=null?!await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)&&this.lastNotifiedNotFoundRelative!==this.mapId+this.topicPivot?(this.dispatchEvent(new zn),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot):this.lastNotifiedNotFoundRelative=void 0:this.tocId!=null?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):this.page!=null&&await this.stateManager.navigateToPage(this.page)})}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setReaderStateManager(this.stateManager)}handleLoadError(e){let r=e;r.status===401?this.dispatchEvent(new Vn):r.status===403?this.dispatchEvent(new jn):r.status===404?this.dispatchEvent(new Hn):this.dispatchEvent(new Bn(e))}reloadBookmarks(){Gs.reloadBookmarks()}async reloadRating(){var e,r;await((e=this.stateManager.service)===null||e===void 0?void 0:e.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new Fn(this.map,this.toc))})}};q.elementDefinitions={"ft-toc-filtering-search-context":L};q.styles=Ou;me([(0,G.redux)({store:g.name})],q.prototype,"baseUrl",void 0);me([(0,G.redux)({store:g.name})],q.prototype,"session",void 0);me([(0,at.property)()],q.prototype,"mapId",void 0);me([(0,at.property)()],q.prototype,"tocId",void 0);me([(0,at.property)()],q.prototype,"section",void 0);me([(0,at.property)()],q.prototype,"topicPivot",void 0);me([(0,at.property)()],q.prototype,"searchInDocumentQuery",void 0);me([(0,G.redux)({store:"reader",converter:(0,G.jsonPropertyConverter)([]),attribute:!0})],q.prototype,"metadataFilters",void 0);me([(0,G.numberProperty)({min:1})],q.prototype,"page",void 0);me([(0,G.redux)({store:"reader"})],q.prototype,"map",void 0);me([(0,G.redux)({store:"reader"})],q.prototype,"toc",void 0);me([(0,G.redux)({store:"reader"})],q.prototype,"visibleTopics",void 0);me([(0,G.redux)({store:"reader"})],q.prototype,"currentPage",void 0);me([(0,G.redux)({store:"reader"})],q.prototype,"scrollTarget",void 0);me([(0,at.property)({attribute:!1})],q.prototype,"readerServiceProvider",void 0);me([(0,at.query)("ft-toc-filtering-search-context")],q.prototype,"tocFilteringContext",void 0);var Vu=h(b());var Hu={"ft-reader-context":q};(0,Vu.customElements)(Hu);var ce=function(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},V=class extends Sl(yn(ci)){constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(oo)}setReaderStateManager(e){super.setReaderStateManager(e),this.key&&this.useForSwitchingToRelatives&&e.registerMetadataForSwitchToRelatives(this.key)}updateRelatives(){var e,r,i,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((i=this.map)===null||i===void 0?void 0:i.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return Se.html`
|
|
946
947
|
${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
|
|
947
948
|
${this.hideIfEmpty()}
|
|
948
949
|
`}renderSwitchToRelatives(){return Se.html`
|
|
@@ -991,7 +992,7 @@
|
|
|
991
992
|
display: none !important;
|
|
992
993
|
}
|
|
993
994
|
</style>
|
|
994
|
-
`:Se.nothing}addTopicPivotParam(e,r){let i=this.stateManager.store.getState().visibleTopics[0];i&&r.type=="MAP"&&this.relativeTopicPivotMetadata&&(e.stopPropagation(),e.preventDefault(),this.service.getTopicMetadataValue(i,this.relativeTopicPivotMetadata).then(n=>{var s;let o=Dn((s=so(r,this.metadataFilters))!==null&&s!==void 0?s:"",n),a=document.createElement("a");a.href=o,(e.ctrlKey||e.metaKey)&&(a.target="_blank"),this.append(a),a.click()}))}willUpdate(e){var r,i,n,s,o;super.willUpdate(e),e.has("key")&&this.useForSwitchingToRelatives&&(e.get("key")&&((r=this.stateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(e.get("key"))),this.key&&((i=this.stateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),e.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.stateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(s=this.stateManager)===null||s===void 0||s.unregisterMetadataForSwitchToRelatives(this.key)),(e.has("translateValues")||e.has("metadata")||e.has("hierarchicalValueTruncatingLevel")||e.has("availableContentLocales")||this.dateFormatOptionsChanged(e))&&(this.flatMetadata=this.metadata?le.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new le.MetadataValueLocalizer((o=this.availableContentLocales)!==null&&o!==void 0?o:[]).localize(this.flatMetadata)))}get metadataLabel(){var e,r,i,n,s,o;return this.metadata?this.metadata.label:(o=(s=(i=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&s!==void 0?s:(n=this.relatives.find(a=>a.metadata.value))===null||n===void 0?void 0:n.metadata.label)!==null&&o!==void 0?o:this.key}};V.elementDefinitions={"ft-chip":B,"ft-floating-menu":H,"ft-floating-menu-item":he,"ft-floating-menu-label":xt,"ft-ripple":D,"ft-tooltip":
|
|
995
|
+
`:Se.nothing}addTopicPivotParam(e,r){let i=this.stateManager.store.getState().visibleTopics[0];i&&r.type=="MAP"&&this.relativeTopicPivotMetadata&&(e.stopPropagation(),e.preventDefault(),this.service.getTopicMetadataValue(i,this.relativeTopicPivotMetadata).then(n=>{var s;let o=Dn((s=so(r,this.metadataFilters))!==null&&s!==void 0?s:"",n),a=document.createElement("a");a.href=o,(e.ctrlKey||e.metaKey)&&(a.target="_blank"),this.append(a),a.click()}))}willUpdate(e){var r,i,n,s,o;super.willUpdate(e),e.has("key")&&this.useForSwitchingToRelatives&&(e.get("key")&&((r=this.stateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(e.get("key"))),this.key&&((i=this.stateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),e.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.stateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(s=this.stateManager)===null||s===void 0||s.unregisterMetadataForSwitchToRelatives(this.key)),(e.has("translateValues")||e.has("metadata")||e.has("hierarchicalValueTruncatingLevel")||e.has("availableContentLocales")||this.dateFormatOptionsChanged(e))&&(this.flatMetadata=this.metadata?le.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new le.MetadataValueLocalizer((o=this.availableContentLocales)!==null&&o!==void 0?o:[]).localize(this.flatMetadata)))}get metadataLabel(){var e,r,i,n,s,o;return this.metadata?this.metadata.label:(o=(s=(i=(r=(e=this.stateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&s!==void 0?s:(n=this.relatives.find(a=>a.metadata.value))===null||n===void 0?void 0:n.metadata.label)!==null&&o!==void 0?o:this.key}};V.elementDefinitions={"ft-chip":B,"ft-floating-menu":H,"ft-floating-menu-item":he,"ft-floating-menu-label":xt,"ft-ripple":D,"ft-tooltip":W};V.styles=vo;ce([(0,Ke.property)(),(0,le.reduxReactive)()],V.prototype,"key",void 0);ce([(0,Ke.property)({type:Boolean})],V.prototype,"multiLine",void 0);ce([(0,Ke.property)({type:Boolean})],V.prototype,"useForSwitchingToRelatives",void 0);ce([(0,Ke.property)({type:Boolean})],V.prototype,"displayLabel",void 0);ce([(0,le.numberProperty)()],V.prototype,"hierarchicalValueTruncatingLevel",void 0);ce([(0,Ke.property)({type:Boolean})],V.prototype,"forceTooltip",void 0);ce([(0,Ke.property)({attribute:!1})],V.prototype,"editorMode",void 0);ce([(0,Ke.property)({type:Boolean})],V.prototype,"translateValues",void 0);ce([(0,le.redux)({store:"reader",selector:(t,e)=>{var r,i;return(i=(r=t.map)===null||r===void 0?void 0:r.metadata)===null||i===void 0?void 0:i.find(n=>n.key===e.key)}})],V.prototype,"metadata",void 0);ce([(0,Ke.state)()],V.prototype,"flatMetadata",void 0);ce([(0,le.redux)({store:"reader"})],V.prototype,"map",void 0);ce([(0,le.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],V.prototype,"relativeTopicPivotMetadata",void 0);ce([(0,Ke.state)()],V.prototype,"relatives",void 0);ce([(0,le.redux)({store:g.name})],V.prototype,"availableContentLocales",void 0);ce([(0,le.redux)({store:"reader"})],V.prototype,"metadataFilters",void 0);ce([Ec(oo.properties.itemWithNoValueForSwitchToRelatives())],V.prototype,"noValueMessage",void 0);ce([(0,le.reduxEventListener)({eventName:et.clusteringHelperCreated})],V.prototype,"updateRelatives",null);var zu={"ft-reader-metadata":V};(0,qu.customElements)(zu);})();
|
|
995
996
|
/*! Bundled license information:
|
|
996
997
|
|
|
997
998
|
.store/lit-html-npm-3.3.3-0f054b825a/package/lit-html.js:
|