@fluid-topics/ft-reader-metadata 2.2.20 → 2.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var Xu=Object.create;var po=Object.defineProperty;var Ju=Object.getOwnPropertyDescriptor;var Zu=Object.getOwnPropertyNames;var ed=Object.getPrototypeOf,td=Object.prototype.hasOwnProperty;var Wt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var rd=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Zu(e))!td.call(t,n)&&n!==r&&po(t,n,{get:()=>e[n],enumerable:!(i=Ju(e,n))||i.enumerable});return t};var h=(t,e,r)=>(r=t!=null?Xu(ed(t)):{},rd(e||!t||!t.__esModule?po(r,"default",{value:t,enumerable:!0}):r,t));var b=Wt((Xp,ho)=>{ho.exports=ftGlobals.wcUtils});var I=Wt((Jp,fo)=>{fo.exports=ftGlobals.lit});var W=Wt((Zp,mo)=>{mo.exports=ftGlobals.litDecorators});var fr=Wt((kv,Mc)=>{Mc.exports=ftGlobals.litClassMap});var Kc=Wt((Yv,qc)=>{qc.exports=ftGlobals.litUnsafeHTML});var Iu=Wt((Jb,Ou)=>{Ou.exports=ftGlobals.litRepeat});var Gu=h(b());var Se=h(I()),qe=h(W()),Ee=h(b());var go=h(I());var yo=go.css`
1
+ "use strict";(()=>{var Gu=Object.create;var uo=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&&uo(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?uo(r,"default",{value:t,enumerable:!0}):r,t));var b=Wt((Wp,po)=>{po.exports=ftGlobals.wcUtils});var I=Wt((Gp,ho)=>{ho.exports=ftGlobals.lit});var W=Wt((Qp,fo)=>{fo.exports=ftGlobals.litDecorators});var fr=Wt((Iv,Rc)=>{Rc.exports=ftGlobals.litClassMap});var jc=Wt((zv,Vc)=>{Vc.exports=ftGlobals.litUnsafeHTML});var wu=Wt((Kb,Cu)=>{Cu.exports=ftGlobals.litRepeat});var qu=h(b());var Se=h(I()),qe=h(W()),le=h(b());var mo=h(I());var go=mo.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 di=h(b()),vo=h(W());var Ze;(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"})(Ze||(Ze={}));var ci=class extends CustomEvent{constructor(e){super(Ze.requestedTopicFiltered,{detail:e})}},et;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(et||(et={}));var id=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},Zn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Jn=Symbol("registerInterval"),nd=(0,di.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[Jn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Jn]):this.dispatchEvent(new Zn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Jn,id([(0,vo.state)()],r.prototype,"stateManager",void 0),r}),ui=class extends nd(di.FtLitElementRedux){};var Rc=h(I()),Fe=h(W()),ke=h(b());var os=globalThis,xo=t=>t,pi=os.trustedTypes,bo=pi?pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Co="$lit$",lt=`lit$${Math.random().toFixed(9).slice(2)}$`,wo="?"+lt,sd=`<${wo}>`,At=document,hi=()=>At.createComment(""),Ar=t=>t===null||typeof t!="object"&&typeof t!="function",as=Array.isArray,od=t=>as(t)||typeof t?.[Symbol.iterator]=="function",es=`[
22
- \f\r]`,Er=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,So=/-->/g,Eo=/>/g,St=RegExp(`>|${es}(?:([^\\s"'>=/]+)(${es}*=${es}*(?:[^
23
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ao=/'/g,To=/"/g,Ro=/^(?:script|style|textarea|title)$/i,ls=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Oo=ls(1),Io=ls(2),Mo=ls(3),Tr=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),_o=new WeakMap,Et=At.createTreeWalker(At,129);function Lo(t,e){if(!as(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(e):e}var ad=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":e===3?"<math>":"",o=Er;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===Er?u[1]==="!--"?o=So:u[1]!==void 0?o=Eo:u[2]!==void 0?(Ro.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=St):u[3]!==void 0&&(o=St):o===St?u[0]===">"?(o=n??Er,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?St:u[3]==='"'?To:Ao):o===To||o===Ao?o=St:o===So||o===Eo?o=Er:(o=St,n=void 0);let m=o===St&&t[a+1].startsWith("/>")?" ":"";s+=o===Er?l+sd:d>=0?(i.push(c),l.slice(0,d)+Co+l.slice(d)+lt+m):l+lt+(d===-2?a:m)}return[Lo(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]=ad(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(Co)){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]==="."?rs:x[1]==="?"?is:x[1]==="@"?ns:Qt}),n.removeAttribute(d)}else d.startsWith(lt)&&(l.push({type:6,index:s}),n.removeAttribute(d));if(Ro.test(n.tagName)){let d=n.textContent.split(lt),p=d.length-1;if(p>0){n.textContent=pi?pi.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],hi()),Et.nextNode(),l.push({type:2,index:++s});n.append(d[p],hi())}}}else if(n.nodeType===8)if(n.data===wo)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=At.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 ts=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??At).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 fi(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new ss(s,this,e)),this._$AV.push(c),l=i[++a]}o!==l?.index&&(s=Et.nextNode(),o++)}return Et.currentNode=At,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++}},fi=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=X,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===X||e==null||e===""?(this._$AH!==X&&this._$AR(),this._$AH=X):e!==this._$AH&&e!==Tr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):od(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!==X&&Ar(this._$AH)?this._$AA.nextSibling.data=e:this.T(At.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(Lo(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let s=new ts(n,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=_o.get(e.strings);return r===void 0&&_o.set(e.strings,r=new _r(e)),r}k(e){as(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(hi()),this.O(hi()),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=xo(e).nextSibling;xo(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=X,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=X}_$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===X?e=X:e!==X&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!n&&this.j(e)}j(e){e===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},rs=class extends Qt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===X?void 0:e}},is=class extends Qt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==X)}},ns=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)??X)===Tr)return;let i=this._$AH,n=e===X&&i!==X||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==X&&(i===X||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)}},ss=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 ld=os.litHtmlPolyfillSupport;ld?.(_r,fi),(os.litHtmlVersions??=[]).push("3.3.3");var No=Symbol.for(""),cd=t=>{if(t?.r===No)return t?._$litStatic$},cs=t=>({_$litStatic$:t,r:No});var Po=new Map,us=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=cd(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=Po.get(d))===void 0&&(o.raw=o,Po.set(d,e=o)),r=a}return t(e,...r)},ds=us(Oo),oh=us(Io),ah=us(Mo);var ps=h(W()),Go=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()),Do=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.titleFont),tt=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.contentFont),S={fontFamily:tt,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")},Tt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Do),fontSize:f.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",S.textDecoration,"inherit")},_t={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Do),fontSize:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",S.textDecoration,"inherit")},Ct={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",S.textDecoration,"inherit")},wt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",S.textDecoration,"inherit")},Rt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",S.textDecoration,"inherit")},Ae={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",S.textDecoration,"inherit")},Ot={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",S.textDecoration,"inherit")},It={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",S.textDecoration,"inherit")},Mt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",S.textDecoration,"inherit")},$e={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-button-font-family","",tt),fontSize:f.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:f.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:f.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:f.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:f.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase"),textDecoration:f.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",S.textDecoration,"inherit")},ko=Me.css`
21
+ `;var ui=h(b()),yo=h(W());var Ze;(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"})(Ze||(Ze={}));var li=class extends CustomEvent{constructor(e){super(Ze.requestedTopicFiltered,{detail:e})}},et;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(et||(et={}));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},Jn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Xn=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[Xn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Xn]):this.dispatchEvent(new Jn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Xn,ed([(0,yo.state)()],r.prototype,"stateManager",void 0),r}),ci=class extends td(ui.FtLitElementRedux){};var _c=h(I()),Fe=h(W()),ke=h(b());var ss=globalThis,vo=t=>t,di=ss.trustedTypes,xo=di?di.createPolicy("lit-html",{createHTML:t=>t}):void 0,_o="$lit$",lt=`lit$${Math.random().toFixed(9).slice(2)}$`,Co="?"+lt,rd=`<${Co}>`,At=document,pi=()=>At.createComment(""),Ar=t=>t===null||typeof t!="object"&&typeof t!="function",os=Array.isArray,id=t=>os(t)||typeof t?.[Symbol.iterator]=="function",Zn=`[
22
+ \f\r]`,Sr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bo=/-->/g,Eo=/>/g,Et=RegExp(`>|${Zn}(?:([^\\s"'>=/]+)(${Zn}*=${Zn}*(?:[^
23
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),So=/'/g,Ao=/"/g,wo=/^(?:script|style|textarea|title)$/i,as=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Ro=as(1),Oo=as(2),Io=as(3),Tr=Symbol.for("lit-noChange"),X=Symbol.for("lit-nothing"),To=new WeakMap,St=At.createTreeWalker(At,129);function Mo(t,e){if(!os(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return xo!==void 0?xo.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=bo:u[1]!==void 0?o=Eo:u[2]!==void 0?(wo.test(u[2])&&(n=RegExp("</"+u[2],"g")),o=Et):u[3]!==void 0&&(o=Et):o===Et?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?Et:u[3]==='"'?Ao:So):o===Ao||o===So?o=Et:o===bo||o===Eo?o=Sr:(o=Et,n=void 0);let m=o===Et&&t[a+1].startsWith("/>")?" ":"";s+=o===Sr?l+rd:d>=0?(i.push(c),l.slice(0,d)+_o+l.slice(d)+lt+m):l+lt+(d===-2?a:m)}return[Mo(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),St.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=St.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(_o)){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]==="."?ts:x[1]==="?"?rs:x[1]==="@"?is:Qt}),n.removeAttribute(d)}else d.startsWith(lt)&&(l.push({type:6,index:s}),n.removeAttribute(d));if(wo.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()),St.nextNode(),l.push({type:2,index:++s});n.append(d[p],pi())}}}else if(n.nodeType===8)if(n.data===Co)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=At.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 es=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??At).importNode(r,!0);St.currentNode=n;let s=St.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 ns(s,this,e)),this._$AV.push(c),l=i[++a]}o!==l?.index&&(s=St.nextNode(),o++)}return St.currentNode=At,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=X,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===X||e==null||e===""?(this._$AH!==X&&this._$AR(),this._$AH=X):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!==X&&Ar(this._$AH)?this._$AA.nextSibling.data=e:this.T(At.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(Mo(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let s=new es(n,this),o=s.u(this.options);s.p(r),this.T(o),this._$AH=s}}_$AC(e){let r=To.get(e.strings);return r===void 0&&To.set(e.strings,r=new _r(e)),r}k(e){os(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=vo(e).nextSibling;vo(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=X,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=X}_$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===X?e=X:e!==X&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!n&&this.j(e)}j(e){e===X?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ts=class extends Qt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===X?void 0:e}},rs=class extends Qt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==X)}},is=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)??X)===Tr)return;let i=this._$AH,n=e===X&&i!==X||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==X&&(i===X||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)}},ns=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=ss.litHtmlPolyfillSupport;sd?.(_r,hi),(ss.litHtmlVersions??=[]).push("3.3.3");var Lo=Symbol.for(""),od=t=>{if(t?.r===Lo)return t?._$litStatic$},ls=t=>({_$litStatic$:t,r:Lo});var Po=new Map,cs=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=Po.get(d))===void 0&&(o.raw=o,Po.set(d,e=o)),r=a}return t(e,...r)},us=cs(Ro),rh=cs(Oo),ih=cs(Io);var ds=h(W()),Wo=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()),No=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.titleFont),tt=f.FtCssVariableFactory.extend("--ft-typography-font-family","",f.designSystemVariables.contentFont),E={fontFamily:tt,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")},Tt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-font-family","",No),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")},_t={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",No),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")},Ct={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",tt),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")},wt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",tt),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")},Rt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",tt),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","",tt),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")},Ot={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",tt),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")},It={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",tt),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")},Mt={fontFamily:f.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",tt),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","",tt),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")},Do=Me.css`
24
24
  .ft-typography--title {
25
25
  font-family: ${Tt.fontFamily};
26
26
  font-size: ${Tt.fontSize};
@@ -30,7 +30,7 @@
30
30
  text-transform: ${Tt.textTransform};
31
31
  text-decoration: ${Tt.textDecoration};
32
32
  }
33
- `,Fo=Me.css`
33
+ `,ko=Me.css`
34
34
  .ft-typography--title-dense {
35
35
  font-family: ${_t.fontFamily};
36
36
  font-size: ${_t.fontSize};
@@ -40,7 +40,7 @@
40
40
  text-transform: ${_t.textTransform};
41
41
  text-decoration: ${_t.textDecoration};
42
42
  }
43
- `,Uo=Me.css`
43
+ `,Fo=Me.css`
44
44
  .ft-typography--subtitle1 {
45
45
  font-family: ${Ct.fontFamily};
46
46
  font-size: ${Ct.fontSize};
@@ -50,7 +50,7 @@
50
50
  text-transform: ${Ct.textTransform};
51
51
  text-decoration: ${Ct.textDecoration};
52
52
  }
53
- `,$o=Me.css`
53
+ `,Uo=Me.css`
54
54
  .ft-typography--subtitle2 {
55
55
  font-family: ${wt.fontFamily};
56
56
  font-size: ${wt.fontSize};
@@ -61,7 +61,7 @@
61
61
  text-decoration: ${wt.textDecoration};
62
62
  }
63
63
 
64
- `,Bo=Me.css`
64
+ `,$o=Me.css`
65
65
  .ft-typography--body1 {
66
66
  font-family: ${Rt.fontFamily};
67
67
  font-size: ${Rt.fontSize};
@@ -71,7 +71,7 @@
71
71
  text-transform: ${Rt.textTransform};
72
72
  text-decoration: ${Rt.textDecoration};
73
73
  }
74
- `,Ho=Me.css`
74
+ `,Bo=Me.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
- `,Vo=Me.css`
84
+ `,Ho=Me.css`
85
85
  .ft-typography--caption {
86
86
  font-family: ${Ot.fontFamily};
87
87
  font-size: ${Ot.fontSize};
@@ -91,7 +91,7 @@
91
91
  text-transform: ${Ot.textTransform};
92
92
  text-decoration: ${Ot.textDecoration};
93
93
  }
94
- `,jo=Me.css`
94
+ `,Vo=Me.css`
95
95
  .ft-typography--breadcrumb {
96
96
  font-family: ${It.fontFamily};
97
97
  font-size: ${It.fontSize};
@@ -101,7 +101,7 @@
101
101
  text-transform: ${It.textTransform};
102
102
  text-decoration: ${It.textDecoration};
103
103
  }
104
- `,zo=Me.css`
104
+ `,jo=Me.css`
105
105
  .ft-typography--overline {
106
106
  font-family: ${Mt.fontFamily};
107
107
  font-size: ${Mt.fontSize};
@@ -111,7 +111,7 @@
111
111
  text-transform: ${Mt.textTransform};
112
112
  text-decoration: ${Mt.textDecoration};
113
113
  }
114
- `,qo=Me.css`
114
+ `,zo=Me.css`
115
115
  .ft-typography--button {
116
116
  font-family: ${$e.fontFamily};
117
117
  font-size: ${$e.fontSize};
@@ -121,19 +121,19 @@
121
121
  text-transform: ${$e.textTransform};
122
122
  text-decoration: ${$e.textDecoration};
123
123
  }
124
- `,Ko=Me.css`
124
+ `,qo=Me.css`
125
125
  .ft-typography {
126
126
  vertical-align: inherit;
127
127
  }
128
- `;var Wo=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 Go.FtLitElement{constructor(){super(...arguments),this.variant=Ie.body1}render(){return this.element?ds`
129
- <${cs(this.element)}
128
+ `;var Ko=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 Wo.FtLitElement{constructor(){super(...arguments),this.variant=Ie.body1}render(){return this.element?us`
129
+ <${ls(this.element)}
130
130
  part="text"
131
131
  class="ft-typography ft-typography--${this.variant}">
132
132
  <slot></slot>
133
- </${cs(this.element)}>
134
- `:ds`
133
+ </${ls(this.element)}>
134
+ `:us`
135
135
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
136
- `}};re.styles=[ko,Fo,Uo,$o,Bo,Ho,Vo,jo,zo,qo,Ko];Wo([(0,ps.property)()],re.prototype,"element",void 0);Wo([(0,ps.property)()],re.prototype,"variant",void 0);var Yo=h(b());var Qo={"ft-typography":re};(0,Yo.customElements)(Qo);var Xo=h(I()),ct=h(b()),Cr={distance:ct.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:ct.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:ct.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:ct.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",ct.designSystemVariables.borderRadiusS),maxWidth:ct.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Jo=Xo.css`
136
+ `}};re.styles=[Do,ko,Fo,Uo,$o,Bo,Ho,Vo,jo,zo,qo];Ko([(0,ds.property)()],re.prototype,"element",void 0);Ko([(0,ds.property)()],re.prototype,"variant",void 0);var Qo=h(b());var Go={"ft-typography":re};(0,Qo.customElements)(Go);var Yo=h(I()),ct=h(b()),Cr={distance:ct.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:ct.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:ct.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:ct.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",ct.designSystemVariables.borderRadiusS),maxWidth:ct.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Xo=Yo.css`
137
137
  .ft-tooltip--container {
138
138
  display: block;
139
139
  }
@@ -164,15 +164,15 @@
164
164
  position: relative;
165
165
  word-break: break-word;
166
166
  }
167
- `;var ea=["top","right","bottom","left"],Zo=["start","end"],fs=ea.reduce((t,e)=>t.concat(e,e+"-"+Zo[0],e+"-"+Zo[1]),[]),wr=Math.min,ut=Math.max,Rr=Math.round;var Ke=t=>({x:t,y:t}),ud={left:"right",right:"left",bottom:"top",top:"bottom"};function ta(t,e,r){return ut(t,wr(e,r))}function mi(t,e){return typeof t=="function"?t(e):t}function Or(t){return t.split("-")[0]}function dt(t){return t.split("-")[1]}function ms(t){return t==="x"?"y":"x"}function gs(t){return t==="y"?"height":"width"}function gi(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function ys(t){return ms(gi(t))}function ra(t,e,r){r===void 0&&(r=!1);let i=dt(t),n=ys(t),s=gs(n),o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=hs(o)),[o,hs(o)]}function ia(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function hs(t){let e=Or(t);return ud[e]+t.slice(e.length)}function dd(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 na(t){return typeof t!="number"?dd(t):{top:t,right:t,bottom:t,left:t}}function Lt(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 sa(t,e,r){let{reference:i,floating:n}=t,s=gi(e),o=ys(e),a=gs(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 oa(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}=mi(e,t),x=na(m),v=a[p?d==="floating"?"reference":"floating":d],T=Lt(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,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},O=Lt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:E,strategy:l}):M);return{top:(T.top-O.top+x.top)/C.y,bottom:(O.bottom-T.bottom+x.bottom)/C.y,left:(T.left-O.left+x.left)/C.x,right:(O.right-T.right+x.right)/C.x}}var pd=50,aa=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:oa},l=await(o.isRTL==null?void 0:o.isRTL(e)),c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=sa(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:T,fn:M}=v,{x:E,y:C,data:O,reset:q}=await M({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:x,rects:c,platform:a,elements:{reference:t,floating:e}});u=E??u,d=C??d,x[T]={...x[T],...O},q&&m<pd&&(m++,typeof q=="object"&&(q.placement&&(p=q.placement),q.rects&&(c=q.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):q.rects),{x:u,y:d}=sa(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:x}};function hd(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?ia(n)!==n:!1):!0)}var la=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=fs,autoAlignment:m=!0,...x}=mi(t,e),A=d!==void 0||p===fs?hd(d||null,m,p):p,v=((r=o.autoPlacement)==null?void 0:r.index)||0,T=A[v];if(T==null)return{};if(a!==T)return{reset:{placement:A[0]}};let M=await l.detectOverflow(e,x),E=ra(T,s,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[M[Or(T)],M[E[0]],M[E[1]]],O=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:T,overflows:C}],q=A[v+1];if(q)return{data:{index:v+1,overflows:O},reset:{placement:q}};let k=O.map(Oe=>{let bt=dt(Oe.placement);return[Oe.placement,bt&&u?Oe.overflows.slice(0,2).reduce((Qu,Yu)=>Qu+Yu,0):Oe.overflows[0],Oe.overflows]}).sort((Oe,bt)=>Oe[1]-bt[1]),Sr=((n=k.filter(Oe=>Oe[2].slice(0,dt(Oe[0])?2:3).every(bt=>bt<=0))[0])==null?void 0:n[0])||k[0][0];return Sr!==a?{data:{index:v+1,overflows:O},reset:{placement:Sr}}:{}}}};var ca=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:E,y:C}=M;return{x:E,y:C}}},...c}=mi(t,e),u={x:r,y:i},d=await s.detectOverflow(e,c),p=gi(n),m=ms(p),x=u[m],A=u[p],v=(M,E)=>ta(E+d[M==="y"?"top":"left"],E,E-d[M==="y"?"bottom":"right"]);o&&(x=v(m,x)),a&&(A=v(p,A));let T=l.fn({...e,[m]:x,[p]:A});return{...T,data:{x:T.x-r,y:T.y-i,enabled:{[m]:o,[p]:a}}}}}};function vi(){return typeof window<"u"}function Nt(t){return da(t)?(t.nodeName||"").toLowerCase():"#document"}function ve(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rt(t){var e;return(e=(da(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function da(t){return vi()?t instanceof Node||t instanceof ve(t).Node:!1}function Be(t){return vi()?t instanceof Element||t instanceof ve(t).Element:!1}function it(t){return vi()?t instanceof HTMLElement||t instanceof ve(t).HTMLElement:!1}function ua(t){return!vi()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ve(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 pa(t){return/^(table|td|th)$/.test(Nt(t))}function Mr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var fd=/transform|translate|scale|rotate|perspective|filter/,md=/paint|layout|strict|content/,Pt=t=>!!t&&t!=="none",vs;function Yt(t){let e=Be(t)?He(t):t;return Pt(e.transform)||Pt(e.translate)||Pt(e.scale)||Pt(e.rotate)||Pt(e.perspective)||!xi()&&(Pt(e.backdropFilter)||Pt(e.filter))||fd.test(e.willChange||"")||md.test(e.contain||"")}function ha(t){let e=pt(t);for(;it(e)&&!Xt(e);){if(Yt(e))return e;if(Mr(e))return null;e=pt(e)}return null}function xi(){return vs==null&&(vs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vs}function Xt(t){return/^(html|body|#document)$/.test(Nt(t))}function He(t){return ve(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(Nt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ua(t)&&t.host||rt(t);return ua(e)?e.host:e}function fa(t){let e=pt(t);return Xt(e)?(t.ownerDocument||t).body:it(e)&&Ir(e)?e:fa(e)}function yi(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=fa(t),s=n===((i=t.ownerDocument)==null?void 0:i.body),o=ve(n);if(s){let a=bi(o);return e.concat(o,o.visualViewport||[],Ir(n)?n:[],a&&r?yi(a):[])}else return e.concat(n,yi(n,[],r))}function bi(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ya(t){let e=He(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=it(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 va(t){return Be(t)?t:t.contextElement}function Jt(t){let e=va(t);if(!it(e))return Ke(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:s}=ya(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 gd=Ke(0);function xa(t){let e=ve(t);return!xi()||!e.visualViewport?gd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function yd(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===ve(t)}function Pr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),s=va(t),o=Ke(1);e&&(i?Be(i)&&(o=Jt(i)):o=Jt(t));let a=yd(s,r,i)?xa(s):Ke(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=ve(s),m=Be(i)?ve(i):i,x=p,A=bi(x);for(;A&&m!==x;){let v=Jt(A),T=A.getBoundingClientRect(),M=He(A),E=T.left+(A.clientLeft+parseFloat(M.paddingLeft))*v.x,C=T.top+(A.clientTop+parseFloat(M.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=E,c+=C,x=ve(A),A=bi(x)}}return Lt({width:u,height:d,x:l,y:c})}function Si(t,e){let r=Lr(t).scrollLeft;return e?e.left+r:Pr(rt(t)).left+r}function ba(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-Si(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function vd(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,s=n==="fixed",o=rt(i),a=e?Mr(e.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Ke(1),u=Ke(0),d=it(i);if((d||!s)&&((Nt(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?ba(o,l):Ke(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 xd(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function bd(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+Si(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 Sd=25;function Ed(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=ve(t),s=rt(t),o=n.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(o){let p=!xi()||e==="fixed";i?p||(c=-o.offsetLeft,u=-o.offsetTop):(a=o.width,l=o.height,p&&(c=o.offsetLeft,u=o.offsetTop))}if(Si(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),T=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;T<=Sd&&(a-=T)}return{width:a,height:l,x:c,y:u}}function Ad(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 ma(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Ed(t,r,e);else if(e==="document")i=bd(rt(t));else if(Be(e))i=Ad(e,r);else{let n=xa(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Lt(i)}function Td(t,e){let r=e.get(t);if(r)return r;let i=yi(t,[],!1).filter(a=>Be(a)&&Nt(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 _d(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,o=[...r==="clippingAncestors"?Mr(e)?[]:Td(e,this._c):[].concat(r),i],a=ma(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=ma(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 Cd(t){let{width:e,height:r}=ya(t);return{width:e,height:r}}function wd(t,e,r){let i=it(e),n=rt(e),s=r==="fixed",o=Pr(t,!0,s,e),a={scrollLeft:0,scrollTop:0},l=Ke(0);if((i||!s)&&((Nt(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=Si(n));let c=n&&!i&&!s?ba(n,a):Ke(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 xs(t){return He(t).position==="static"}function ga(t,e){if(!it(t)||He(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return rt(t)===r&&(r=r.ownerDocument.body),r}function Sa(t,e){let r=ve(t);if(Mr(t))return r;if(!it(t)){let n=pt(t);for(;n&&!Xt(n);){if(Be(n)&&!xs(n))return n;n=pt(n)}return r}let i=ga(t,e);for(;i&&pa(i)&&xs(i);)i=ga(i,e);return i&&Xt(i)&&xs(i)&&!Yt(i)?r:i||ha(t)||r}var Rd=async function(t){let e=this.getOffsetParent||Sa,r=this.getDimensions,i=await r(t.floating);return{reference:wd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Od(t){return He(t).direction==="rtl"}var Ei={convertOffsetParentRelativeRectToViewportRelativeRect:vd,getDocumentElement:rt,getClippingRect:_d,getOffsetParent:Sa,getElementRects:Rd,getClientRects:xd,getDimensions:Cd,getScale:Jt,isElement:Be,isRTL:Od};var Ea=la,Aa=ca;var Ta=(t,e,r)=>{let i=new Map,n=r??{},s={...Ei,...n.platform,_c:i};return aa(t,e,{...n,platform:s})};function _a(t){return Id(t)}function bs(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Id(t){for(let e=t;e;e=bs(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=bs(t);e;e=bs(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 Ai(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},Ta(t,e,{strategy:i.strategy,platform:{...Ei,getOffsetParent:n=>Ei.getOffsetParent(n,_a)},middleware:[Aa({crossAxis:!0}),Ea({allowedPlacements:[i.placement]})]})}var dr=h(b());var Vs=h(W());var Ca=h(W(),1);var Ss=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Md=t=>({fromAttribute:e=>{if(e==null)return Nr(t);try{return JSON.parse(e)}catch{return Nr(t)}},toAttribute:e=>JSON.stringify(e)});function wa(t,e){return(0,Ca.property)({type:Object,converter:Md(t),hasChanged:Dr,...e??{}})}function Ld(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 Ld(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 Ti(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 Ra=h(W(),1);var Es=t=>{let e=t??{};return(r,i)=>{var n;let s={hasChanged:Dr,attribute:!1,...e};(0,Ra.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 _i=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 Dt=h(W(),1);var Ci=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 Ia=h(I(),1);var wi=globalThis,Pd=wi.ShadowRoot&&(wi.ShadyCSS===void 0||wi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Oa=(t,e)=>{if(Pd)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=wi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var Ri=class extends Ia.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 Oa(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 Ma(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},Da,La=Symbol("constructorPrototype"),Pa=Symbol("constructorName"),ka=Symbol("exportpartsDebouncer"),Na=Symbol("dynamicDependenciesLoaded"),er=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};er.eventName="exportparts-updated";var We=class extends Ri{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Da]=new Ci(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[ka].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[Pa]=this.constructor.name,this[La]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Pa]&&Object.setPrototypeOf(this,this[La])}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[Na]||(r[Na]=!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=Ma(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(", ")}};Da=ka;tr([(0,Dt.property)()],We.prototype,"exportpartsPrefix",void 0);tr([wa([])],We.prototype,"exportpartsPrefixes",void 0);tr([(0,Dt.property)({reflect:!0})],We.prototype,"exportparts",void 0);tr([(0,Dt.property)()],We.prototype,"customStylesheet",void 0);tr([(0,Dt.property)()],We.prototype,"elementToFocus",void 0);tr([(0,Dt.state)()],We.prototype,"useAdoptedStyleSheets",void 0);function Oi(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var kr=Symbol("internalReduxEventsUnsubscribers"),ht=Symbol("internalStoresUnsubscribers"),kt=Symbol("internalStores"),Nd=Ti(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[kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[kt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[kt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[kt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[kt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[kt].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;this[ht].set(o,a.subscribe(()=>this.updateFromStores())),this[kr].set(o,[]),Oi(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[kr].get(o).push(()=>a.removeEventListener(c.eventName,d))}})),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=kt,i=kr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Fa=class extends Nd(We){};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 Dd=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ua=Dd,As=()=>Math.random().toString(36).substring(7).split("").join("."),kd={INIT:`@@redux/INIT${As()}`,REPLACE:`@@redux/REPLACE${As()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${As()}`},Ii=kd;function Mi(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 Ts(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(Ts)(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,T)=>{o.set(T,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 T=!0;c();let M=a++;return o.set(M,v),function(){if(T){if(l)throw new Error(ie(6));T=!1,c(),o.delete(M),s=null}}}function p(v){if(!Mi(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:Ii.REPLACE})}function x(){let v=d;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(ie(11));function M(){let C=T;C.next&&C.next(u())}return M(),{unsubscribe:v(M)}},[Ua](){return this}}}return p({type:Ii.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Ua]:x}}function Fd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:Ii.INIT})>"u")throw new Error(ie(12));if(typeof r(void 0,{type:Ii.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ie(13))})}function $a(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{Fd(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 Ba(...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 Ha(t){return Mi(t)&&"type"in t&&typeof t.type=="string"}var Ya=Symbol.for("immer-nothing"),Va=Symbol.for("immer-draftable"),ce=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,Di="constructor",Hi="prototype",Rs="configurable",ki="enumerable",Pi="writable",Ur="value",Ge=t=>!!t&&!!t[ce];function _e(t){return t?Xa(t)||ji(t)||!!t[Va]||!!t[Di]?.[Va]||zi(t)||qi(t):!1}var Ud=Te[Hi][Di].toString(),ja=new WeakMap;function Xa(t){if(!t||!ks(t))return!1;let e=ir(t);if(e===null||e===Te[Hi])return!0;let r=Te.hasOwnProperty.call(e,Di)&&e[Di];if(r===Object)return!0;if(!rr(r))return!1;let i=ja.get(r);return i===void 0&&(i=Function.toString.call(r),ja.set(r,i)),i===Ud}function Vi(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[ce];return e?e.type_:ji(t)?1:zi(t)?2:qi(t)?3:0}var _s=(t,e,r=Hr(t))=>r===2?t.has(e):Te[Hi].hasOwnProperty.call(t,e),Os=(t,e,r=Hr(t))=>r===2?t.get(e):t[e],Fi=(t,e,r,i=Hr(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function $d(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var ji=Array.isArray,zi=t=>t instanceof Map,qi=t=>t instanceof Set,ks=t=>typeof t=="object",rr=t=>typeof t=="function",Cs=t=>typeof t=="boolean";function Bd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var nt=t=>t.copy_||t.base_;var Fs=t=>t.modified_?t.copy_:t.base_;function Is(t,e){if(zi(t))return new Map(t);if(qi(t))return new Set(t);if(ji(t))return Array[Hi].slice.call(t);let r=Xa(t);if(e===!0||e==="class_only"&&!r){let i=Te.getOwnPropertyDescriptors(t);delete i[ce];let n=Reflect.ownKeys(i);for(let s=0;s<n.length;s++){let o=n[s],a=i[o];a[Pi]===!1&&(a[Pi]=!0,a[Rs]=!0),(a.get||a.set)&&(i[o]={[Rs]:!0,[Pi]:!0,[ki]:a[ki],[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 Us(t,e=!1){return Ki(t)||Ge(t)||!_e(t)||(Hr(t)>1&&Te.defineProperties(t,{set:Li,add:Li,clear:Li,delete:Li}),Te.freeze(t),e&&Vi(t,(r,i)=>{Us(i,!0)},!1)),t}function Hd(){Ve(2)}var Li={[Ur]:Hd};function Ki(t){return t===null||!ks(t)?!0:Te.isFrozen(t)}var Ui="MapSet",Ms="Patches",za="ArrayMethods",Ja={};function Ft(t){let e=Ja[t];return e||Ve(0,t),e}var qa=t=>!!Ja[t];var $r,Za=()=>$r,Vd=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qa(Ui)?Ft(Ui):void 0,arrayMethodsPlugin_:qa(za)?Ft(za):void 0});function Ka(t,e){e&&(t.patchPlugin_=Ft(Ms),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Ls(t){Ps(t),t.drafts_.forEach(jd),t.drafts_=null}function Ps(t){t===$r&&($r=t.parent_)}var Wa=t=>$r=Vd($r,t);function jd(t){let e=t[ce];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ga(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ce].modified_&&(Ls(e),Ve(4)),_e(t)&&(t=Qa(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ce].base_,t,e)}else t=Qa(e,r);return zd(e,t,!0),Ls(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Ya?t:void 0}function Qa(t,e){if(Ki(e))return e;let r=e[ce];if(!r)return $i(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);rl(r,t)}return r.copy_}function zd(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Us(e,r)}function el(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Wi=(t,e)=>t.scope_===e,qd=[];function tl(t,e,r,i){let n=nt(t),s=t.type_;if(i!==void 0&&Os(n,i,s)===e){Fi(n,i,r,s);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Vi(n,(l,c)=>{if(Ge(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let o=t.draftLocations_.get(e)??qd;for(let a of o)Fi(n,a,r,s)}function Kd(t,e,r){t.callbacks_.push(function(n){let s=e;if(!s||!Wi(s,n))return;n.mapSetPlugin_?.fixSetContents(s);let o=Fs(s);tl(t,s.draft_??s,o,r),rl(s,n)})}function rl(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)}el(t)}}function Wd(t,e,r){let{scope_:i}=t;if(Ge(r)){let n=r[ce];Wi(n,i)&&n.callbacks_.push(function(){Ni(t);let o=Fs(n);tl(t,r,o,e)})}else _e(r)&&t.callbacks_.push(function(){let s=nt(t);t.type_===3?s.has(r)&&$i(r,i.handledSet_,i):Os(s,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&$i(Os(t.copy_,e,t.type_),i.handledSet_,i)})}function $i(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ge(t)||e.has(t)||!_e(t)||Ki(t)||(e.add(t),Vi(t,(i,n)=>{if(Ge(n)){let s=n[ce];if(Wi(s,r)){let o=Fs(s);Fi(t,i,o,t.type_),el(s)}}else _e(n)&&$i(n,e,r)})),t}function Gd(t,e){let r=ji(t),i={type_:r?1:0,scope_:e?e.scope_:Za(),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=Bi;r&&(n=[i],s=Br);let{revoke:o,proxy:a}=Proxy.revocable(n,s);return i.draft_=a,i.revoke_=o,[a,i]}var Bi={get(t,e){if(e===ce)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=nt(t);if(!_s(n,e,t.type_))return Yd(t,n,e);let s=n[e];if(t.finalized_||!_e(s)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&Bd(e))return s;if(s===ws(t.base_,e)||Qd(t,e,s)){Ni(t);let o=t.type_===1?+e:e,a=Ds(t.scope_,s,t,o);return t.copy_[o]=a}return s},has(t,e){return e in nt(t)},ownKeys(t){return Reflect.ownKeys(nt(t))},set(t,e,r){let i=il(nt(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=ws(nt(t),e),s=n?.[ce];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if($d(r,n)&&(r!==void 0||_s(t.base_,e,t.type_)))return!0;Ni(t),Ns(t)}return t.copy_[e]===r&&(r!==void 0||_s(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),Wd(t,e,r)),!0},deleteProperty(t,e){return Ni(t),ws(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Ns(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=nt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[Pi]:!0,[Rs]:t.type_!==1||e!=="length",[ki]:i[ki],[Ur]:r[e]}},defineProperty(){Ve(11)},getPrototypeOf(t){return ir(t.base_)},setPrototypeOf(){Ve(12)}},Br={};for(let t in Bi){let e=Bi[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 Bi.set.call(this,t[0],e,r,t[0])};function ws(t,e){let r=t[ce];return(r?nt(r):t)[e]}function Qd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!_e(r)||r[ce]?!1:t.baseRefs_.has(r)}function Yd(t,e,r){let i=il(e,r);return i?Ur in i?i[Ur]:i.get?.call(t.draft_):void 0}function il(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 Ns(t){t.modified_||(t.modified_=!0,t.parent_&&Ns(t.parent_))}function Ni(t){t.copy_||(t.assigned_=new Map,t.copy_=Is(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Xd=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=Wa(this),o=Ds(s,e,void 0),a=!0;try{n=r(o),a=!1}finally{a?Ls(s):Ps(s)}return Ka(s,i),Ga(n,s)}else if(!e||!ks(e)){if(n=r(e),n===void 0&&(n=e),n===Ya&&(n=void 0),this.autoFreeze_&&Us(n,!0),i){let s=[],o=[];Ft(Ms).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]},Cs(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Cs(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Cs(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){_e(t)||Ve(8),Ge(t)&&(t=nl(t));let e=Wa(this),r=Ds(e,t,void 0);return r[ce].isManual_=!0,Ps(e),r}finishDraft(t,e){let r=t&&t[ce];(!r||!r.isManual_)&&Ve(9);let{scope_:i}=r;return Ka(i,e),Ga(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=Ft(Ms).applyPatches_;return Ge(t)?i(t,e):this.produce(t,n=>i(n,e))}};function Ds(t,e,r,i){let[n,s]=zi(e)?Ft(Ui).proxyMap_(e,r):qi(e)?Ft(Ui).proxySet_(e,r):Gd(e,r);return(r?.scope_??Za()).drafts_.push(n),s.callbacks_=r?.callbacks_??[],s.key_=i,r&&i!==void 0?Kd(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 nl(t){return Ge(t)||Ve(10,t),sl(t)}function sl(t){if(!_e(t)||Ki(t))return t;let e=t[ce],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Is(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Is(t,!0);return Vi(r,(n,s)=>{Fi(r,n,sl(s))},i),e&&(e.finalized_=!1),r}var Jd=globalThis.Iterator,Tf=typeof Jd?.from=="function";var Zd=new Xd,$s=Zd.produce;function ol(t){return({dispatch:r,getState:i})=>n=>s=>typeof s=="function"?s(r,i,t):n(s)}var al=ol(),ll=ol;var ep=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)},Mf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},tp=t=>t&&typeof t.match=="function";function ft(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(st(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=>Ha(i)&&i.type===t,r}var hl=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 cl(t){return _e(t)?$s(t,()=>{}):t}function Gi(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function rp(t){return typeof t=="boolean"}var ip=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:s=!0}=e??{},o=new hl;return r&&(rp(r)?o.push(al):o.push(ll(r.extraArgument))),o},np="RTK_autoBatch";var ul=t=>e=>{setTimeout(e,t)},sp=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(s),clearTimeout(o),r())},s=t(n),o=setTimeout(n,e)},op=(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?sp(window.requestAnimationFrame,100):ul(10):t.type==="callback"?t.queueNotification:ul(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?.[np],s=!n,s&&(o||(o=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},ap=t=>function(r){let{autoBatch:i=!0}=r??{},n=new hl(t);return i&&n.push(op(typeof i=="object"?i:void 0)),n};function fl(t){let e=ip(),{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(Mi(r))l=$a(r);else throw new Error(st(1));let c;typeof i=="function"?c=i(e):c=e();let u=Fr;n&&(u=ep({trace:!1,...typeof n=="object"&&n}));let d=Ba(...c),p=ap(d),m=typeof a=="function"?a(p):p(),x=u(...m);return Ts(l,o,x)}function ml(t){let e={},r=[],i,n={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(st(28));if(a in e)throw new Error(st(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 lp(t){return typeof t=="function"}function cp(t,e){let[r,i,n]=ml(e),s;if(lp(t))s=()=>cl(t());else{let a=cl(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(Ge(u)){let m=d(u,l);return m===void 0?u:m}else{if(_e(u))return $s(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return o.getInitialState=s,o}var up=(t,e)=>tp(t)?t.match(e):t(e);function dp(...t){return e=>t.some(r=>up(r,e))}var pp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hp=(t=21)=>{let e="",r=t;for(;r--;)e+=pp[Math.random()*64|0];return e},fp=["name","message","stack","code"],Bs=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},dl=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},mp=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of fp)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},pl="External signal was aborted",gp=(()=>{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||mp)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,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):hp(),x=new AbortController,A,v;function T(E){v=E,x.abort()}c&&(c.aborted?T(pl):c.addEventListener("abort",()=>T(pl),{once:!0}));let M=(async function(){let E;try{let O=i?.condition?.(l,{getState:d,extra:p});if(vp(O)&&(O=await O),O===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let q=new Promise((k,K)=>{A=()=>{K({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}))),E=await Promise.race([q,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:x.signal,abort:T,rejectWithValue:((k,K)=>new Bs(k,K)),fulfillWithValue:((k,K)=>new dl(k,K))})).then(k=>{if(k instanceof Bs)throw k;return k instanceof dl?n(k.payload,m,l,k.meta):n(k,m,l)})])}catch(O){E=O instanceof Bs?o(null,m,l,O.payload,O.meta):o(O,m,l)}finally{A&&x.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&o.match(E)&&E.meta.condition||u(E),E})();return Object.assign(M,{abort:T,requestId:m,arg:l,unwrap(){return M.then(yp)}})}}return Object.assign(a,{pending:s,rejected:o,fulfilled:n,settled:dp(o,n),typePrefix:e})}return t.withTypes=()=>t,t})();function yp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function vp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var gl=Symbol.for("rtk-slice-createasyncthunk"),Pf={[gl]:gp};function xp(t,e){return`${t}/${e}`}function bp({creators:t}={}){let e=t?.asyncThunk?.[gl];return function(i){let{name:n,reducerPath:s=n}=i;if(!n)throw new Error(st(11));typeof process<"u";let o=(typeof i.reducers=="function"?i.reducers(Ep()):i.reducers)||{},a=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(E,C){let O=typeof E=="string"?E:E.type;if(!O)throw new Error(st(12));if(O in l.sliceCaseReducersByType)throw new Error(st(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(E,C){return l.sliceMatchers.push({matcher:E,reducer:C}),c},exposeAction(E,C){return l.actionCreators[E]=C,c},exposeCaseReducer(E,C){return l.sliceCaseReducersByName[E]=C,c}};a.forEach(E=>{let C=o[E],O={reducerName:E,type:xp(n,E),createNotation:typeof i.reducers=="function"};Tp(C)?Cp(O,C,c,e):Ap(O,C,c)});function u(){let[E={},C=[],O=void 0]=typeof i.extraReducers=="function"?ml(i.extraReducers):[i.extraReducers],q={...E,...l.sliceCaseReducersByType};return cp(i.initialState,k=>{for(let K in q)k.addCase(K,q[K]);for(let K of l.sliceMatchers)k.addMatcher(K.matcher,K.reducer);for(let K of C)k.addMatcher(K.matcher,K.reducer);O&&k.addDefaultCase(O)})}let d=E=>E,p=new Map,m=new WeakMap,x;function A(E,C){return x||(x=u()),x(E,C)}function v(){return x||(x=u()),x.getInitialState()}function T(E,C=!1){function O(k){let K=k[E];return typeof K>"u"&&C&&(K=Gi(m,O,v)),K}function q(k=d){let K=Gi(p,C,()=>new WeakMap);return Gi(K,k,()=>{let Sr={};for(let[Oe,bt]of Object.entries(i.selectors??{}))Sr[Oe]=Sp(bt,k,()=>Gi(m,k,v),C);return Sr})}return{reducerPath:E,getSelectors:q,get selectors(){return q(O)},selectSlice:O}}let M={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...T(s),injectInto(E,{reducerPath:C,...O}={}){let q=C??s;return E.inject({reducerPath:q,reducer:A},O),{...M,...T(q,!0)}}};return M}}function Sp(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 yl=bp();function Ep(){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 Ap({type:t,reducerName:e,createNotation:r},i,n){let s,o;if("reducer"in i){if(r&&!_p(i))throw new Error(st(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 Tp(t){return t._reducerDefinitionType==="asyncThunk"}function _p(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Cp({type:t,reducerName:e},r,i,n){if(!n)throw new Error(st(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 vl="listener",xl="completed",bl="cancelled",Nf=`task-${bl}`,Df=`task-${xl}`,kf=`${vl}-${bl}`,Ff=`${vl}-${xl}`;var{assign:Sl}=Object;var Hs="listenerMiddleware";var wp=Sl(ft(`${Hs}/add`),{withTypes:()=>wp}),Uf=ft(`${Hs}/removeAll`),Rp=Sl(ft(`${Hs}/remove`),{withTypes:()=>Rp});function st(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 Op=Ti(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 Op(Object){};window.ftReduxStores||(window.ftReduxStores={});var El=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(Oi(s))return s;if(n==null)return;let o=yl({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=fl({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)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new _i,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let n=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let l=o,c=s[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Zt(p,u)||this.setState({[d]:n(u)})}}}),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()),Ip="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 Mp={session:(t,e)=>{(0,Ji.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>y.dispatchEvent(new Ce(e.payload)),0))}},y=Ji.FtReduxStore.get({name:Ip,reducers:Mp,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 Al=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},Tl=(0,Al.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(y)}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,Vs.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Zi([(0,Vs.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Zi([Es({store:y.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([Es({store:y.name})],e.prototype,"uiLocale",void 0),e});var _l;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(_l||(_l={}));var Cl;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Cl||(Cl={}));var wl;(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"})(wl||(wl={}));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 Rl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Rl||(Rl={}));var Ol;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ol||(Ol={}));var en;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(en||(en={}));var Ut;(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"})(Ut||(Ut={}));var Il;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Il||(Il={}));var Ml;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Ml||(Ml={}));var Ll;(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"})(Ll||(Ll={}));var Pl;(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"})(Pl||(Pl={}));var Nl;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Nl||(Nl={}));var Dl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Dl||(Dl={}));var kl;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(kl||(kl={}));var Fl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Fl||(Fl={}));var Ul;(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"})(Ul||(Ul={}));var tn;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(tn||(tn={}));var $l;(function(t){t.ASC="ASC",t.DESC="DESC"})($l||($l={}));var Bl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Bl||(Bl={}));var nr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(nr||(nr={}));var Hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Hl||(Hl={}));var rn;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rn||(rn={}));var Vl;(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"})(Vl||(Vl={}));var jl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(jl||(jl={}));var Qe;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Qe||(Qe={}));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 zl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(zl||(zl={}));var P;(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"})(P||(P={}));var Le;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Le||(Le={}));var ql;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(ql||(ql={}));var Kl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Kl||(Kl={}));var Wl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Wl||(Wl={}));var Gl;(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"})(Gl||(Gl={}));var Ql;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Ql||(Ql={}));var Yl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Yl||(Yl={}));var Xl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Xl||(Xl={}));var Jl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Jl||(Jl={}));var Zl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Zl||(Zl={}));var ec;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ec||(ec={}));var tc;(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"})(tc||(tc={}));var rc;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(rc||(rc={}));var Lp={[P.PERSONAL_BOOK_SHARE_USER]:[P.PERSONAL_BOOK_USER],[P.HTML_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.PDF_EXPORT_USER]:[P.PERSONAL_BOOK_USER],[P.KHUB_ADMIN]:[P.CONTENT_PUBLISHER],[P.ADMIN]:[P.KHUB_ADMIN,P.USERS_ADMIN,P.PORTAL_ADMIN,P.BEHAVIOR_DATA_USER],[P.GENERATIVE_AI_EXPORT_USER]:[P.GENERATIVE_AI_USER]};function ic(t,e){return t===e||(Lp[t]??[]).some(r=>ic(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=>ic(i,e))}function nc(t,...e){return t==null?!1:e.some(r=>Pe(t,r))}var ln=h(b());var js=h(b());var $t=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=y.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=y.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:$t.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$t.await()}};var ee=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 js.CacheRegistry,this.cache=e?n.commonCache:new js.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 ee{async listMySearches(){let{session:e}=y.getState();return Pe(e,P.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var sn=class extends ee{async listMyBookmarks(){let e=y.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var on=class extends ee{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=y.getState().session;return!!e?.sessionAuthenticated}};var an=class extends ee{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=y.getState().session;return!!e?.sessionAuthenticated}};var Pp="ft-user-assets",Np={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;qs(t,r,[...zs(t,r),n]),sc(t,r,1,i),oc(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;qs(t,r,zs(t,r).map(n=>n.id===i.id?i:n)),oc(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;qs(t,r,zs(t,r).filter(s=>s.id!==n)),sc(t,r,-1,i)}},ac={[Le.SEARCHES]:"savedSearches",[Le.BOOKMARKS]:"bookmarks",[Le.BOOKS]:void 0,[Le.COLLECTIONS]:void 0},zs=(t,e)=>{var r;let i=ac[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},qs=(t,e,r)=>{let i=ac[e];i&&(t[i]=r)},sc=(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)}},oc=(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)},he=ln.FtReduxStore.get({name:Pp,reducers:Np,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Le).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ks=class{constructor(e=new on,r=new an){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=y.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sn,this.savedSearchesService=new nn,y.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=y.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(),he.actions.clearAssetCount(),he.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),he.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),he.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();he.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();he.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&he.getState().assetCounts.allAsset[e]!==r.count&&he.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&he.getState().assetCounts.bookmarkByMap[e]!==r.count&&he.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(he.getState().assetCounts.bookmarkByMap).length!==0;e===Le.BOOKMARKS&&r&&he.actions.clearBookmarkCountByMap(),he.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;he.actions.bookmarks(r)}}},Ws=new Ks;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ws);var Gs=class{addCommand(e,r=!1){y.commands.add(e,r)}consumeCommand(e){return y.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Gs;var Ne=h(b());var lc,ar=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Dp=Symbol("clearAfterUnitTest"),cn=class extends(0,Ne.withEventBus)(ee){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[lc]=()=>{this.defaultMessages={},this.cache=new Ne.CacheRegistry,this.listeners={}},this.currentUiLocale=y.getState().uiLocale,y.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=y.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)))}};lc=Dp;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 cc=h(b()),Qs=class{highlightHtml(e,r,i){(0,cc.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Qs;var uc=h(b());var Ys=class{isDate(e){var r,i,n,s;return(s=(i=((n=(r=y.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 uc.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:y.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 Ys;var dc=h(b());var zr=class{static get(e,r){var i,n,s,o;let a=y.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new dc.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var cr=class extends ee{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 Xs=class{urlToSearchRequest(e){return zr.get().parse(e)}searchRequestToUrl(e){return zr.get().serialize(e)}};window.FluidTopicsUrlService=new Xs;var ot=h(b());var Bt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Bt.eventName="before-location-change";var Ht=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ht.eventName="change";var Js=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))}},pc=new Js;var dn=class t extends ot.WithEventBus{static build(){return new t(window.history,pc,()=>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 Ht(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[s,o,a])=>{let l=new Bt(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(Bt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Bt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Ht.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ht.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 hc=h(I());var fc=hc.css`
168
- `;var gc=h(I()),fe=h(W()),zt=h(b());var Vt=h(b());function mc(t,e){let{authenticationRequired:r,session:i}=y.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var pn=class extends or{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Zs=class t extends Vt.FtStateManager{static build(e){return new t(y,e)}constructor(e,r){super(),this.store=e,this.cache=new Vt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new pn,this.cleanSessionDebouncer=new Vt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Vt.Debouncer(500),this.apiProvider=r??(()=>$t.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",()=>mc(()=>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 nc(y.getState().session,...e)}},qr=Zs.build();var jt=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 Kr=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 jt(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 te=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 zt.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=qr,this.contextRoot=new Kr}render(){return gc.html`
167
+ `;var Zo=["top","right","bottom","left"],Jo=["start","end"],hs=Zo.reduce((t,e)=>t.concat(e,e+"-"+Jo[0],e+"-"+Jo[1]),[]),wr=Math.min,ut=Math.max,Rr=Math.round;var Ke=t=>({x:t,y:t}),ad={left:"right",right:"left",bottom:"top",top:"bottom"};function ea(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 fs(t){return t==="x"?"y":"x"}function ms(t){return t==="y"?"height":"width"}function mi(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function gs(t){return fs(mi(t))}function ta(t,e,r){r===void 0&&(r=!1);let i=dt(t),n=gs(t),s=ms(n),o=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ps(o)),[o,ps(o)]}function ra(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function ps(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 ia(t){return typeof t!="number"?ld(t):{top:t,right:t,bottom:t,left:t}}function Pt(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 na(t,e,r){let{reference:i,floating:n}=t,s=mi(e),o=gs(e),a=ms(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 sa(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=ia(m),v=a[p?d==="floating"?"reference":"floating":d],T=Pt(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)),C=await(s.isElement==null?void 0:s.isElement(S))&&await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1},O=Pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:S,strategy:l}):M);return{top:(T.top-O.top+x.top)/C.y,bottom:(O.bottom-T.bottom+x.bottom)/C.y,left:(T.left-O.left+x.left)/C.x,right:(O.right-T.right+x.right)/C.x}}var cd=50,oa=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:s=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:sa},l=await(o.isRTL==null?void 0:o.isRTL(e)),c=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=na(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:T,fn:M}=v,{x:S,y:C,data:O,reset:q}=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=C??d,x[T]={...x[T],...O},q&&m<cd&&(m++,typeof q=="object"&&(q.placement&&(p=q.placement),q.rects&&(c=q.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:n}):q.rects),{x:u,y:d}=na(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?ra(n)!==n:!1):!0)}var aa=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=hs,autoAlignment:m=!0,...x}=fi(t,e),A=d!==void 0||p===hs?ud(d||null,m,p):p,v=((r=o.autoPlacement)==null?void 0:r.index)||0,T=A[v];if(T==null)return{};if(a!==T)return{reset:{placement:A[0]}};let M=await l.detectOverflow(e,x),S=ta(T,s,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[M[Or(T)],M[S[0]],M[S[1]]],O=[...((i=o.autoPlacement)==null?void 0:i.overflows)||[],{placement:T,overflows:C}],q=A[v+1];if(q)return{data:{index:v+1,overflows:O},reset:{placement:q}};let k=O.map(Oe=>{let bt=dt(Oe.placement);return[Oe.placement,bt&&u?Oe.overflows.slice(0,2).reduce((Ku,Wu)=>Ku+Wu,0):Oe.overflows[0],Oe.overflows]}).sort((Oe,bt)=>Oe[1]-bt[1]),Er=((n=k.filter(Oe=>Oe[2].slice(0,dt(Oe[0])?2:3).every(bt=>bt<=0))[0])==null?void 0:n[0])||k[0][0];return Er!==a?{data:{index:v+1,overflows:O},reset:{placement:Er}}:{}}}};var la=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:C}=M;return{x:S,y:C}}},...c}=fi(t,e),u={x:r,y:i},d=await s.detectOverflow(e,c),p=mi(n),m=fs(p),x=u[m],A=u[p],v=(M,S)=>ea(S+d[M==="y"?"top":"left"],S,S-d[M==="y"?"bottom":"right"]);o&&(x=v(m,x)),a&&(A=v(p,A));let T=l.fn({...e,[m]:x,[p]:A});return{...T,data:{x:T.x-r,y:T.y-i,enabled:{[m]:o,[p]:a}}}}}};function yi(){return typeof window<"u"}function Nt(t){return ua(t)?(t.nodeName||"").toLowerCase():"#document"}function xe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rt(t){var e;return(e=(ua(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ua(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 it(t){return yi()?t instanceof HTMLElement||t instanceof xe(t).HTMLElement:!1}function ca(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 da(t){return/^(table|td|th)$/.test(Nt(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",ys;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 pa(t){let e=pt(t);for(;it(e)&&!Xt(e);){if(Yt(e))return e;if(Mr(e))return null;e=pt(e)}return null}function vi(){return ys==null&&(ys=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ys}function Xt(t){return/^(html|body|#document)$/.test(Nt(t))}function He(t){return xe(t).getComputedStyle(t)}function Pr(t){return Be(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function pt(t){if(Nt(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ca(t)&&t.host||rt(t);return ca(e)?e.host:e}function ha(t){let e=pt(t);return Xt(e)?(t.ownerDocument||t).body:it(e)&&Ir(e)?e:ha(e)}function gi(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=ha(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 ga(t){let e=He(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=it(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 ya(t){return Be(t)?t:t.contextElement}function Jt(t){let e=ya(t);if(!it(e))return Ke(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:s}=ga(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=Ke(0);function va(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 Lr(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),s=ya(t),o=Ke(1);e&&(i?Be(i)&&(o=Jt(i)):o=Jt(t));let a=fd(s,r,i)?va(s):Ke(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),T=A.getBoundingClientRect(),M=He(A),S=T.left+(A.clientLeft+parseFloat(M.paddingLeft))*v.x,C=T.top+(A.clientTop+parseFloat(M.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=S,c+=C,x=xe(A),A=xi(x)}}return Pt({width:u,height:d,x:l,y:c})}function bi(t,e){let r=Pr(t).scrollLeft;return e?e.left+r:Lr(rt(t)).left+r}function xa(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=rt(i),a=e?Mr(e.floating):!1;if(i===o||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Ke(1),u=Ke(0),d=it(i);if((d||!s)&&((Nt(i)!=="body"||Ir(o))&&(l=Pr(i)),d)){let m=Lr(i);c=Jt(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=o&&!d&&!s?xa(o,l):Ke(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=Pr(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=rt(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),T=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;T<=vd&&(a-=T)}return{width:a,height:l,x:c,y:u}}function bd(t,e){let r=Lr(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 fa(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=xd(t,r,e);else if(e==="document")i=yd(rt(t));else if(Be(e))i=bd(e,r);else{let n=va(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Pt(i)}function Ed(t,e){let r=e.get(t);if(r)return r;let i=gi(t,[],!1).filter(a=>Be(a)&&Nt(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=fa(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=fa(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}=ga(t);return{width:e,height:r}}function Td(t,e,r){let i=it(e),n=rt(e),s=r==="fixed",o=Lr(t,!0,s,e),a={scrollLeft:0,scrollTop:0},l=Ke(0);if((i||!s)&&((Nt(e)!=="body"||Ir(n))&&(a=Pr(e)),i)){let p=Lr(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?xa(n,a):Ke(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 vs(t){return He(t).position==="static"}function ma(t,e){if(!it(t)||He(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return rt(t)===r&&(r=r.ownerDocument.body),r}function ba(t,e){let r=xe(t);if(Mr(t))return r;if(!it(t)){let n=pt(t);for(;n&&!Xt(n);){if(Be(n)&&!vs(n))return n;n=pt(n)}return r}let i=ma(t,e);for(;i&&da(i)&&vs(i);)i=ma(i,e);return i&&Xt(i)&&vs(i)&&!Yt(i)?r:i||pa(t)||r}var _d=async function(t){let e=this.getOffsetParent||ba,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:rt,getClippingRect:Sd,getOffsetParent:ba,getElementRects:_d,getClientRects:gd,getDimensions:Ad,getScale:Jt,isElement:Be,isRTL:Cd};var Ea=aa,Sa=la;var Aa=(t,e,r)=>{let i=new Map,n=r??{},s={...Ei,...n.platform,_c:i};return oa(t,e,{...n,platform:s})};function Ta(t){return wd(t)}function xs(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function wd(t){for(let e=t;e;e=xs(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=xs(t);e;e=xs(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},Aa(t,e,{strategy:i.strategy,platform:{...Ei,getOffsetParent:n=>Ei.getOffsetParent(n,Ta)},middleware:[Sa({crossAxis:!0}),Ea({allowedPlacements:[i.placement]})]})}var dr=h(b());var Hs=h(W());var _a=h(W(),1);var bs=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 Ca(t,e){return(0,_a.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 wa=h(W(),1);var Es=t=>{let e=t??{};return(r,i)=>{var n;let s={hasChanged:Dr,attribute:!1,...e};(0,wa.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 Dt=h(W(),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){bs(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 Ra(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},Pa,Oa=Symbol("constructorPrototype"),Ia=Symbol("constructorName"),La=Symbol("exportpartsDebouncer"),Ma=Symbol("dynamicDependenciesLoaded"),er=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};er.eventName="exportparts-updated";var We=class extends Ci{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Pa]=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[La].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[Ia]=this.constructor.name,this[Oa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ia]&&Object.setPrototypeOf(this,this[Oa])}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[Ma]||(r[Ma]=!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=Ra(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(", ")}};Pa=La;tr([(0,Dt.property)()],We.prototype,"exportpartsPrefix",void 0);tr([Ca([])],We.prototype,"exportpartsPrefixes",void 0);tr([(0,Dt.property)({reflect:!0})],We.prototype,"exportparts",void 0);tr([(0,Dt.property)()],We.prototype,"customStylesheet",void 0);tr([(0,Dt.property)()],We.prototype,"elementToFocus",void 0);tr([(0,Dt.state)()],We.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"),kt=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[kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[kt].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[kt].get(o)}addStore(o,a){var l;a=(l=a??o.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[kt].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[kt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[kt].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;this[ht].set(o,a.subscribe(()=>this.updateFromStores())),this[kr].set(o,[]),Ri(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[kr].get(o).push(()=>a.removeEventListener(c.eventName,d))}})),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=kt,i=kr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Na=class extends Id(We){};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",Da=Md,Ss=()=>Math.random().toString(36).substring(7).split("").join("."),Pd={INIT:`@@redux/INIT${Ss()}`,REPLACE:`@@redux/REPLACE${Ss()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ss()}`},Oi=Pd;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 As(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(As)(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,T)=>{o.set(T,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 T=!0;c();let M=a++;return o.set(M,v),function(){if(T){if(l)throw new Error(ie(6));T=!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(T){if(typeof T!="object"||T===null)throw new Error(ie(11));function M(){let C=T;C.next&&C.next(u())}return M(),{unsubscribe:v(M)}},[Da](){return this}}}return p({type:Oi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Da]:x}}function Ld(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 ka(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{Ld(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 Fa(...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 Ua(t){return Ii(t)&&"type"in t&&typeof t.type=="string"}var Wa=Symbol.for("immer-nothing"),$a=Symbol.for("immer-draftable"),ue=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",ws="configurable",Di="enumerable",Pi="writable",Ur="value",Ge=t=>!!t&&!!t[ue];function _e(t){return t?Ga(t)||Vi(t)||!!t[$a]||!!t[Ni]?.[$a]||ji(t)||zi(t):!1}var Nd=Te[Bi][Ni].toString(),Ba=new WeakMap;function Ga(t){if(!t||!Ds(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=Ba.get(r);return i===void 0&&(i=Function.toString.call(r),Ba.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[ue];return e?e.type_:Vi(t)?1:ji(t)?2:zi(t)?3:0}var Ts=(t,e,r=Hr(t))=>r===2?t.has(e):Te[Bi].hasOwnProperty.call(t,e),Rs=(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,Ds=t=>typeof t=="object",rr=t=>typeof t=="function",_s=t=>typeof t=="boolean";function kd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var nt=t=>t.copy_||t.base_;var ks=t=>t.modified_?t.copy_:t.base_;function Os(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=Ga(t);if(e===!0||e==="class_only"&&!r){let i=Te.getOwnPropertyDescriptors(t);delete i[ue];let n=Reflect.ownKeys(i);for(let s=0;s<n.length;s++){let o=n[s],a=i[o];a[Pi]===!1&&(a[Pi]=!0,a[ws]=!0),(a.get||a.set)&&(i[o]={[ws]:!0,[Pi]:!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 Fs(t,e=!1){return qi(t)||Ge(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)=>{Fs(i,!0)},!1)),t}function Fd(){Ve(2)}var Mi={[Ur]:Fd};function qi(t){return t===null||!Ds(t)?!0:Te.isFrozen(t)}var Fi="MapSet",Is="Patches",Ha="ArrayMethods",Qa={};function Ft(t){let e=Qa[t];return e||Ve(0,t),e}var Va=t=>!!Qa[t];var $r,Ya=()=>$r,Ud=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Va(Fi)?Ft(Fi):void 0,arrayMethodsPlugin_:Va(Ha)?Ft(Ha):void 0});function ja(t,e){e&&(t.patchPlugin_=Ft(Is),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Ms(t){Ps(t),t.drafts_.forEach($d),t.drafts_=null}function Ps(t){t===$r&&($r=t.parent_)}var za=t=>$r=Ud($r,t);function $d(t){let e=t[ue];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function qa(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ue].modified_&&(Ms(e),Ve(4)),_e(t)&&(t=Ka(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ue].base_,t,e)}else t=Ka(e,r);return Bd(e,t,!0),Ms(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Wa?t:void 0}function Ka(t,e){if(qi(e))return e;let r=e[ue];if(!r)return Ui(e,t.handledSet_,t);if(!Ki(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);Za(r,t)}return r.copy_}function Bd(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Fs(e,r)}function Xa(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Ki=(t,e)=>t.scope_===e,Hd=[];function Ja(t,e,r,i){let n=nt(t),s=t.type_;if(i!==void 0&&Rs(n,i,s)===e){ki(n,i,r,s);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Hi(n,(l,c)=>{if(Ge(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||!Ki(s,n))return;n.mapSetPlugin_?.fixSetContents(s);let o=ks(s);Ja(t,s.draft_??s,o,r),Za(s,n)})}function Za(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)}Xa(t)}}function jd(t,e,r){let{scope_:i}=t;if(Ge(r)){let n=r[ue];Ki(n,i)&&n.callbacks_.push(function(){Li(t);let o=ks(n);Ja(t,r,o,e)})}else _e(r)&&t.callbacks_.push(function(){let s=nt(t);t.type_===3?s.has(r)&&Ui(r,i.handledSet_,i):Rs(s,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ui(Rs(t.copy_,e,t.type_),i.handledSet_,i)})}function Ui(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ge(t)||e.has(t)||!_e(t)||qi(t)||(e.add(t),Hi(t,(i,n)=>{if(Ge(n)){let s=n[ue];if(Ki(s,r)){let o=ks(s);ki(t,i,o,t.type_),Xa(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_:Ya(),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===ue)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=nt(t);if(!Ts(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===Cs(t.base_,e)||qd(t,e,s)){Li(t);let o=t.type_===1?+e:e,a=Ns(t.scope_,s,t,o);return t.copy_[o]=a}return s},has(t,e){return e in nt(t)},ownKeys(t){return Reflect.ownKeys(nt(t))},set(t,e,r){let i=el(nt(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=Cs(nt(t),e),s=n?.[ue];if(s&&s.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(Dd(r,n)&&(r!==void 0||Ts(t.base_,e,t.type_)))return!0;Li(t),Ls(t)}return t.copy_[e]===r&&(r!==void 0||Ts(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 Li(t),Cs(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Ls(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=nt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[Pi]:!0,[ws]: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 Cs(t,e){let r=t[ue];return(r?nt(r):t)[e]}function qd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!_e(r)||r[ue]?!1:t.baseRefs_.has(r)}function Kd(t,e,r){let i=el(e,r);return i?Ur in i?i[Ur]:i.get?.call(t.draft_):void 0}function el(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 Ls(t){t.modified_||(t.modified_=!0,t.parent_&&Ls(t.parent_))}function Li(t){t.copy_||(t.assigned_=new Map,t.copy_=Os(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=za(this),o=Ns(s,e,void 0),a=!0;try{n=r(o),a=!1}finally{a?Ms(s):Ps(s)}return ja(s,i),qa(n,s)}else if(!e||!Ds(e)){if(n=r(e),n===void 0&&(n=e),n===Wa&&(n=void 0),this.autoFreeze_&&Fs(n,!0),i){let s=[],o=[];Ft(Is).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]},_s(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),_s(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),_s(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){_e(t)||Ve(8),Ge(t)&&(t=tl(t));let e=za(this),r=Ns(e,t,void 0);return r[ue].isManual_=!0,Ps(e),r}finishDraft(t,e){let r=t&&t[ue];(!r||!r.isManual_)&&Ve(9);let{scope_:i}=r;return ja(i,e),qa(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=Ft(Is).applyPatches_;return Ge(t)?i(t,e):this.produce(t,n=>i(n,e))}};function Ns(t,e,r,i){let[n,s]=ji(e)?Ft(Fi).proxyMap_(e,r):zi(e)?Ft(Fi).proxySet_(e,r):zd(e,r);return(r?.scope_??Ya()).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 tl(t){return Ge(t)||Ve(10,t),rl(t)}function rl(t){if(!_e(t)||qi(t))return t;let e=t[ue],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Os(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=Os(t,!0);return Hi(r,(n,s)=>{ki(r,n,rl(s))},i),e&&(e.finalized_=!1),r}var Gd=globalThis.Iterator,vf=typeof Gd?.from=="function";var Qd=new Wd,Us=Qd.produce;function il(t){return({dispatch:r,getState:i})=>n=>s=>typeof s=="function"?s(r,i,t):n(s)}var nl=il(),sl=il;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)},_f=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},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(st(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=>Ua(i)&&i.type===t,r}var ul=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 ol(t){return _e(t)?Us(t,()=>{}):t}function Wi(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 ul;return r&&(Jd(r)?o.push(nl):o.push(sl(r.extraArgument))),o},ep="RTK_autoBatch";var al=t=>e=>{setTimeout(e,t)},tp=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(s),clearTimeout(o),r())},s=t(n),o=setTimeout(n,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):al(10):t.type==="callback"?t.queueNotification:al(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 ul(t);return i&&n.push(rp(typeof i=="object"?i:void 0)),n};function dl(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=ka(r);else throw new Error(st(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=Fa(...c),p=ip(d),m=typeof a=="function"?a(p):p(),x=u(...m);return As(l,o,x)}function pl(t){let e={},r=[],i,n={addCase(s,o){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(st(28));if(a in e)throw new Error(st(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]=pl(e),s;if(np(t))s=()=>ol(t());else{let a=ol(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(Ge(u)){let m=d(u,l);return m===void 0?u:m}else{if(_e(u))return Us(u,p=>d(p,l));{let p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}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"],$s=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},ll=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},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)}},cl="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,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 T(S){v=S,x.abort()}c&&(c.aborted?T(cl):c.addEventListener("abort",()=>T(cl),{once:!0}));let M=(async function(){let S;try{let O=i?.condition?.(l,{getState:d,extra:p});if(fp(O)&&(O=await O),O===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let q=new Promise((k,K)=>{A=()=>{K({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([q,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:x.signal,abort:T,rejectWithValue:((k,K)=>new $s(k,K)),fulfillWithValue:((k,K)=>new ll(k,K))})).then(k=>{if(k instanceof $s)throw k;return k instanceof ll?n(k.payload,m,l,k.meta):n(k,m,l)})])}catch(O){S=O instanceof $s?o(null,m,l,O.payload,O.meta):o(O,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:T,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 hl=Symbol.for("rtk-slice-createasyncthunk"),wf={[hl]:pp};function mp(t,e){return`${t}/${e}`}function gp({creators:t}={}){let e=t?.asyncThunk?.[hl];return function(i){let{name:n,reducerPath:s=n}=i;if(!n)throw new Error(st(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,C){let O=typeof S=="string"?S:S.type;if(!O)throw new Error(st(12));if(O in l.sliceCaseReducersByType)throw new Error(st(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(S,C){return l.sliceMatchers.push({matcher:S,reducer:C}),c},exposeAction(S,C){return l.actionCreators[S]=C,c},exposeCaseReducer(S,C){return l.sliceCaseReducersByName[S]=C,c}};a.forEach(S=>{let C=o[S],O={reducerName:S,type:mp(n,S),createNotation:typeof i.reducers=="function"};bp(C)?Sp(O,C,c,e):xp(O,C,c)});function u(){let[S={},C=[],O=void 0]=typeof i.extraReducers=="function"?pl(i.extraReducers):[i.extraReducers],q={...S,...l.sliceCaseReducersByType};return sp(i.initialState,k=>{for(let K in q)k.addCase(K,q[K]);for(let K of l.sliceMatchers)k.addMatcher(K.matcher,K.reducer);for(let K of C)k.addMatcher(K.matcher,K.reducer);O&&k.addDefaultCase(O)})}let d=S=>S,p=new Map,m=new WeakMap,x;function A(S,C){return x||(x=u()),x(S,C)}function v(){return x||(x=u()),x.getInitialState()}function T(S,C=!1){function O(k){let K=k[S];return typeof K>"u"&&C&&(K=Wi(m,O,v)),K}function q(k=d){let K=Wi(p,C,()=>new WeakMap);return Wi(K,k,()=>{let Er={};for(let[Oe,bt]of Object.entries(i.selectors??{}))Er[Oe]=yp(bt,k,()=>Wi(m,k,v),C);return Er})}return{reducerPath:S,getSelectors:q,get selectors(){return q(O)},selectSlice:O}}let M={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...T(s),injectInto(S,{reducerPath:C,...O}={}){let q=C??s;return S.inject({reducerPath:q,reducer:A},O),{...M,...T(q,!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 fl=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(st(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(st(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||Gi,pending:a||Gi,rejected:l||Gi,settled:c||Gi})}function Gi(){}var ml="listener",gl="completed",yl="cancelled",Rf=`task-${yl}`,Of=`task-${gl}`,If=`${ml}-${yl}`,Mf=`${ml}-${gl}`;var{assign:vl}=Object;var Bs="listenerMiddleware";var Ap=vl(ft(`${Bs}/add`),{withTypes:()=>Ap}),Pf=ft(`${Bs}/removeAll`),Tp=vl(ft(`${Bs}/remove`),{withTypes:()=>Tp});function st(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)}}}),Qi=class extends _p(Object){};window.ftReduxStores||(window.ftReduxStores={});var xl=class t extends Qi{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=fl({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=dl({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)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Ti,this.injectInto=(s,o)=>this.reduxSlice.injectInto(s,o),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let n=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,o,a)=>{let l=o,c=s[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Zt(p,u)||this.setState({[d]:n(u)})}}}),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 Yi=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 Xi=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,Xi.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>y.dispatchEvent(new Ce(e.payload)),0))}},y=Xi.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 bl=h(b()),Ji=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},El=(0,bl.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(y)}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=>Yi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ji([(0,Hs.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ji([(0,Hs.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ji([Es({store:y.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),Ji([Es({store:y.name})],e.prototype,"uiLocale",void 0),e});var Sl;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Sl||(Sl={}));var Al;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Al||(Al={}));var Tl;(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"})(Tl||(Tl={}));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 _l;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(_l||(_l={}));var Cl;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Cl||(Cl={}));var Zi;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Zi||(Zi={}));var Ut;(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"})(Ut||(Ut={}));var wl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(wl||(wl={}));var Rl;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Rl||(Rl={}));var Ol;(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"})(Ol||(Ol={}));var Il;(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"})(Il||(Il={}));var Ml;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ml||(Ml={}));var Pl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pl||(Pl={}));var Ll;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Ll||(Ll={}));var Nl;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Nl||(Nl={}));var Dl;(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"})(Dl||(Dl={}));var en;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(en||(en={}));var kl;(function(t){t.ASC="ASC",t.DESC="DESC"})(kl||(kl={}));var Fl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fl||(Fl={}));var nr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(nr||(nr={}));var Ul;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ul||(Ul={}));var tn;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(tn||(tn={}));var $l;(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"})($l||($l={}));var Bl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bl||(Bl={}));var Qe;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Qe||(Qe={}));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 Hl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Hl||(Hl={}));var L;(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"})(L||(L={}));var Pe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Pe||(Pe={}));var Vl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Vl||(Vl={}));var jl;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(jl||(jl={}));var zl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(zl||(zl={}));var ql;(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"})(ql||(ql={}));var Kl;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Kl||(Kl={}));var Wl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Wl||(Wl={}));var Gl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Gl||(Gl={}));var Ql;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Ql||(Ql={}));var Yl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Yl||(Yl={}));var Xl;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Xl||(Xl={}));var Jl;(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"})(Jl||(Jl={}));var Zl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Zl||(Zl={}));var Rp={[L.PERSONAL_BOOK_SHARE_USER]:[L.PERSONAL_BOOK_USER],[L.HTML_EXPORT_USER]:[L.PERSONAL_BOOK_USER],[L.PDF_EXPORT_USER]:[L.PERSONAL_BOOK_USER],[L.KHUB_ADMIN]:[L.CONTENT_PUBLISHER],[L.ADMIN]:[L.KHUB_ADMIN,L.USERS_ADMIN,L.PORTAL_ADMIN,L.BEHAVIOR_DATA_USER],[L.GENERATIVE_AI_EXPORT_USER]:[L.GENERATIVE_AI_USER]};function ec(t,e){return t===e||(Rp[t]??[]).some(r=>ec(r,e))}function Le(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=>ec(i,e))}function tc(t,...e){return t==null?!1:e.some(r=>Le(t,r))}var an=h(b());var Vs=h(b());var $t=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=y.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=y.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:$t.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$t.await()}};var ee=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 Vs.CacheRegistry,this.cache=e?n.commonCache:new Vs.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 rn=class extends ee{async listMySearches(){let{session:e}=y.getState();return Le(e,L.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var nn=class extends ee{async listMyBookmarks(){let e=y.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var sn=class extends ee{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=y.getState().session;return!!e?.sessionAuthenticated}};var on=class extends ee{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=y.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;zs(t,r,[...js(t,r),n]),rc(t,r,1,i),ic(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;zs(t,r,js(t,r).map(n=>n.id===i.id?i:n)),ic(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;zs(t,r,js(t,r).filter(s=>s.id!==n)),rc(t,r,-1,i)}},nc={[Pe.SEARCHES]:"savedSearches",[Pe.BOOKMARKS]:"bookmarks",[Pe.BOOKS]:void 0,[Pe.COLLECTIONS]:void 0},js=(t,e)=>{var r;let i=nc[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},zs=(t,e,r)=>{let i=nc[e];i&&(t[i]=r)},rc=(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)}},ic=(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)},fe=an.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:[]}}),qs=class{constructor(e=new sn,r=new on){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=y.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new nn,this.savedSearchesService=new rn,y.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=y.getState();(0,an.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(),fe.actions.clearAssetCount(),fe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),fe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),fe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();fe.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();fe.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&fe.getState().assetCounts.allAsset[e]!==r.count&&fe.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&fe.getState().assetCounts.bookmarkByMap[e]!==r.count&&fe.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(fe.getState().assetCounts.bookmarkByMap).length!==0;e===Pe.BOOKMARKS&&r&&fe.actions.clearBookmarkCountByMap(),fe.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;fe.actions.bookmarks(r)}}},Ks=new qs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ks);var Ws=class{addCommand(e,r=!1){y.commands.add(e,r)}consumeCommand(e){return y.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Ws;var Ne=h(b());var sc,ar=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Mp=Symbol("clearAfterUnitTest"),ln=class extends(0,Ne.withEventBus)(ee){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[sc]=()=>{this.defaultMessages={},this.cache=new Ne.CacheRegistry,this.listeners={}},this.currentUiLocale=y.getState().uiLocale,y.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=y.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)))}};sc=Mp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ln{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ln{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var lr=window.FluidTopicsI18nService,cn=window.FluidTopicsCustomI18nService;var oc=h(b()),Gs=class{highlightHtml(e,r,i){(0,oc.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Gs;var ac=h(b());var Qs=class{isDate(e){var r,i,n,s;return(s=(i=((n=(r=y.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 ac.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:y.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 Qs;var lc=h(b());var zr=class{static get(e,r){var i,n,s,o;let a=y.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new lc.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var cr=class extends ee{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 Ys=class{urlToSearchRequest(e){return zr.get().parse(e)}searchRequestToUrl(e){return zr.get().serialize(e)}};window.FluidTopicsUrlService=new Ys;var ot=h(b());var Bt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Bt.eventName="before-location-change";var Ht=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ht.eventName="change";var Xs=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))}},cc=new Xs;var un=class t extends ot.WithEventBus{static build(){return new t(window.history,cc,()=>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 Ht(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[s,o,a])=>{let l=new Bt(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(Bt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Bt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Ht.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ht.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=un.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 uc=h(I());var dc=uc.css`
168
+ `;var hc=h(I()),me=h(W()),zt=h(b());var Vt=h(b());function pc(t,e){let{authenticationRequired:r,session:i}=y.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var dn=class extends or{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Js=class t extends Vt.FtStateManager{static build(e){return new t(y,e)}constructor(e,r){super(),this.store=e,this.cache=new Vt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new dn,this.cleanSessionDebouncer=new Vt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Vt.Debouncer(500),this.apiProvider=r??(()=>$t.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",()=>pc(()=>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 tc(y.getState().session,...e)}},qr=Js.build();var jt=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 Kr=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 jt(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 te=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 zt.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=qr,this.contextRoot=new Kr}render(){return hc.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=fc;te([(0,fe.property)()],U.prototype,"baseUrl",void 0);te([(0,fe.property)()],U.prototype,"tenantId",void 0);te([(0,fe.property)()],U.prototype,"apiIntegrationIdentifier",void 0);te([(0,fe.property)()],U.prototype,"apiIntegrationAppVersion",void 0);te([(0,fe.property)()],U.prototype,"uiLocale",void 0);te([(0,zt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);te([(0,zt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"editorMode",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"noCustom",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);te([(0,fe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);te([(0,fe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"withManualResources",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);te([(0,fe.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);te([(0,zt.jsonProperty)([])],U.prototype,"messageContexts",void 0);te([(0,zt.jsonProperty)(void 0)],U.prototype,"session",void 0);var vc=h(b());var yc={"ft-app-context":U};(0,vc.customElements)(yc);var xc=h(W());var eo=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 eo;var Up=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},Gr=Symbol("i18nAttributes"),bc=Symbol("i18nListAttributes"),Qr=Symbol("i18nProperties"),hn=Symbol("i18nContexts"),Wr=Symbol("i18nUnsubs"),gn=(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[Gr])===null||o===void 0||o.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[bc])===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[Qr])===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[hn].set(l,{isCustomContext:a}),this[Wr].has(l)||this[Wr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,o)}hasI18nContext(s){return this[hn].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[hn].forEach((s,o)=>this.addI18nContext(o,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Wr].forEach(s=>s()),this[Wr].clear()}}return e=hn,r=Wr,Up([(0,xc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),fn=class extends gn(dr.FtLitElement){},mn=class extends gn(dr.FtLitElementRedux){};var Sc=h(b());var to=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)}},$p=new to;var Ec=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Sc.hasChanged,converter:ur,...e}),r[Gr]=(n=r[Gr])!==null&&n!==void 0?n:new Map,r[Gr].set(i,t??{})};var yn=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 Ac=(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[Qr]=(s=r[Qr])!==null&&s!==void 0?s:new Map,r[Qr].set(i,o)};var Tc=h(I());var _c=Tc.css`
171
- `;var vn=h(I()),hr=h(W()),xn=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},De=class extends mn{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(y)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:vn.nothing:vn.html`
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=dc;te([(0,me.property)()],U.prototype,"baseUrl",void 0);te([(0,me.property)()],U.prototype,"tenantId",void 0);te([(0,me.property)()],U.prototype,"apiIntegrationIdentifier",void 0);te([(0,me.property)()],U.prototype,"apiIntegrationAppVersion",void 0);te([(0,me.property)()],U.prototype,"uiLocale",void 0);te([(0,zt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);te([(0,zt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"editorMode",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"noCustom",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);te([(0,me.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);te([(0,me.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"withManualResources",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);te([(0,me.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);te([(0,zt.jsonProperty)([])],U.prototype,"messageContexts",void 0);te([(0,zt.jsonProperty)(void 0)],U.prototype,"session",void 0);var mc=h(b());var fc={"ft-app-context":U};(0,mc.customElements)(fc);var gc=h(W());var Zs=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 Zs;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},Gr=Symbol("i18nAttributes"),yc=Symbol("i18nListAttributes"),Qr=Symbol("i18nProperties"),pn=Symbol("i18nContexts"),Wr=Symbol("i18nUnsubs"),mn=(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?cn: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[Gr])===null||o===void 0||o.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[yc])===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[Qr])===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[pn].set(l,{isCustomContext:a}),this[Wr].has(l)||this[Wr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,o)}hasI18nContext(s){return this[pn].has(s.toLowerCase())}connectedCallback(){super.connectedCallback(),this[pn].forEach((s,o)=>this.addI18nContext(o,void 0,s.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Wr].forEach(s=>s()),this[Wr].clear()}}return e=pn,r=Wr,Np([(0,gc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),hn=class extends mn(dr.FtLitElement){},fn=class extends mn(dr.FtLitElementRedux){};var vc=h(b());var eo=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 eo;var xc=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:vc.hasChanged,converter:ur,...e}),r[Gr]=(n=r[Gr])!==null&&n!==void 0?n:new Map,r[Gr].set(i,t??{})};var gn=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?cn: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 bc=(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[Qr]=(s=r[Qr])!==null&&s!==void 0?s:new Map,r[Qr].set(i,o)};var Ec=h(I());var Sc=Ec.css`
171
+ `;var yn=h(I()),hr=h(W()),vn=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},De=class extends fn{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(y)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:yn.nothing:yn.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:""})}};De.elementDefinitions={};De.styles=_c;pr([(0,xn.redux)()],De.prototype,"editorMode",void 0);pr([(0,hr.property)()],De.prototype,"context",void 0);pr([(0,hr.property)()],De.prototype,"key",void 0);pr([(0,xn.jsonProperty)([])],De.prototype,"args",void 0);pr([(0,hr.property)()],De.prototype,"defaultMessage",void 0);pr([(0,hr.state)()],De.prototype,"editorMessage",void 0);var wc=h(b());var Cc={"ft-i18n":De};(0,wc.customElements)(Cc);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},G=class extends fn{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 ke.Debouncer,this.revealDebouncer=new ke.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 Rc.html`
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:""})}};De.elementDefinitions={};De.styles=Sc;pr([(0,vn.redux)()],De.prototype,"editorMode",void 0);pr([(0,hr.property)()],De.prototype,"context",void 0);pr([(0,hr.property)()],De.prototype,"key",void 0);pr([(0,vn.jsonProperty)([])],De.prototype,"args",void 0);pr([(0,hr.property)()],De.prototype,"defaultMessage",void 0);pr([(0,hr.state)()],De.prototype,"editorMessage",void 0);var Tc=h(b());var Ac={"ft-i18n":De};(0,Tc.customElements)(Ac);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},G=class extends hn{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 ke.Debouncer,this.revealDebouncer=new ke.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 _c.html`
176
176
  <div part="container"
177
177
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
178
178
  <slot part="slot"></slot>
@@ -187,7 +187,7 @@
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&&Ai(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 ${ke.designSystemVariables.transitionDuration}, left ${ke.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,ke.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};G.elementDefinitions={"ft-typography":re};G.styles=Jo;je([Ec()],G.prototype,"text",void 0);je([(0,Fe.property)({type:Boolean})],G.prototype,"manual",void 0);je([(0,Fe.property)({type:Boolean})],G.prototype,"inline",void 0);je([(0,ke.numberProperty)()],G.prototype,"delay",void 0);je([(0,Fe.property)()],G.prototype,"position",void 0);je([(0,ke.jsonProperty)([])],G.prototype,"ignoreMatchingElements",void 0);je([(0,Fe.queryAssignedNodes)()],G.prototype,"slotNodes",void 0);je([(0,Fe.query)(".ft-tooltip--container")],G.prototype,"container",void 0);je([(0,Fe.query)(".ft-tooltip")],G.prototype,"tooltip",void 0);je([(0,Fe.query)(".ft-tooltip--content")],G.prototype,"tooltipContent",void 0);je([(0,Fe.state)()],G.prototype,"visible",void 0);var Ic=h(b());var Oc={"ft-tooltip":G};(0,Ic.customElements)(Oc);var En=h(I()),oe=h(W()),hu=h(fr()),gr=h(b());var $c=h(I()),ne=h(W()),Bc=h(fr()),Yr=h(b());var Fc=h(I()),J=h(b()),Lc=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorContent),me={color:Lc,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",Lc),opacityContentOnSurfacePressed:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:J.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Pc=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorPrimary),Nc={color:Pc,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",Pc)},Dc=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorSecondary),kc={color:Dc,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",Dc)},Uc=Fc.css`
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 ${ke.designSystemVariables.transitionDuration}, left ${ke.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,ke.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};G.elementDefinitions={"ft-typography":re};G.styles=Xo;je([xc()],G.prototype,"text",void 0);je([(0,Fe.property)({type:Boolean})],G.prototype,"manual",void 0);je([(0,Fe.property)({type:Boolean})],G.prototype,"inline",void 0);je([(0,ke.numberProperty)()],G.prototype,"delay",void 0);je([(0,Fe.property)()],G.prototype,"position",void 0);je([(0,ke.jsonProperty)([])],G.prototype,"ignoreMatchingElements",void 0);je([(0,Fe.queryAssignedNodes)()],G.prototype,"slotNodes",void 0);je([(0,Fe.query)(".ft-tooltip--container")],G.prototype,"container",void 0);je([(0,Fe.query)(".ft-tooltip")],G.prototype,"tooltip",void 0);je([(0,Fe.query)(".ft-tooltip--content")],G.prototype,"tooltipContent",void 0);je([(0,Fe.state)()],G.prototype,"visible",void 0);var wc=h(b());var Cc={"ft-tooltip":G};(0,wc.customElements)(Cc);var En=h(I()),oe=h(W()),uu=h(fr()),gr=h(b());var kc=h(I()),ne=h(W()),Fc=h(fr()),Yr=h(b());var Nc=h(I()),J=h(b()),Oc=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorContent),ge={color:Oc,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",Oc),opacityContentOnSurfacePressed:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:J.FtCssVariableFactory.external(J.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:J.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ic=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorPrimary),Mc={color:Ic,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ic)},Pc=J.FtCssVariableFactory.extend("--ft-ripple-color","",J.designSystemVariables.colorSecondary),Lc={color:Pc,backgroundColor:J.FtCssVariableFactory.extend("--ft-ripple-background-color","",Pc)},Dc=Nc.css`
191
191
  :host {
192
192
  display: contents;
193
193
  }
@@ -200,7 +200,7 @@
200
200
 
201
201
  .ft-ripple:not(.ft-ripple--unbounded) {
202
202
  overflow: hidden;
203
- border-radius: ${me.borderRadius};
203
+ border-radius: ${ge.borderRadius};
204
204
  }
205
205
 
206
206
  .ft-ripple .ft-ripple--background,
@@ -234,27 +234,27 @@
234
234
  }
235
235
 
236
236
  .ft-ripple .ft-ripple--background {
237
- background-color: ${me.backgroundColor};
237
+ background-color: ${ge.backgroundColor};
238
238
  }
239
239
 
240
240
  .ft-ripple .ft-ripple--effect {
241
- background-color: ${me.color};
241
+ background-color: ${ge.color};
242
242
  }
243
243
 
244
244
  .ft-ripple.ft-ripple--secondary .ft-ripple--background {
245
- background-color: ${kc.backgroundColor};
245
+ background-color: ${Lc.backgroundColor};
246
246
  }
247
247
 
248
248
  .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
249
- background-color: ${kc.color};
249
+ background-color: ${Lc.color};
250
250
  }
251
251
 
252
252
  .ft-ripple.ft-ripple--primary .ft-ripple--background {
253
- background-color: ${Nc.backgroundColor};
253
+ background-color: ${Mc.backgroundColor};
254
254
  }
255
255
 
256
256
  .ft-ripple.ft-ripple--primary .ft-ripple--effect {
257
- background-color: ${Nc.color};
257
+ background-color: ${Mc.color};
258
258
  }
259
259
 
260
260
  .ft-ripple .ft-ripple--background {
@@ -284,33 +284,33 @@
284
284
  }
285
285
 
286
286
  .ft-ripple.ft-ripple--hovered .ft-ripple--background {
287
- opacity: ${me.opacityContentOnSurfaceHover};
287
+ opacity: ${ge.opacityContentOnSurfaceHover};
288
288
  }
289
289
 
290
290
  .ft-ripple.ft-ripple--selected .ft-ripple--background {
291
- opacity: ${me.opacityContentOnSurfaceSelected};
291
+ opacity: ${ge.opacityContentOnSurfaceSelected};
292
292
  }
293
293
 
294
294
  .ft-ripple.ft-ripple--focused .ft-ripple--background {
295
- opacity: ${me.opacityContentOnSurfaceFocused};
295
+ opacity: ${ge.opacityContentOnSurfaceFocused};
296
296
  }
297
297
 
298
298
  .ft-ripple.ft-ripple--pressed .ft-ripple--effect {
299
- opacity: ${me.opacityContentOnSurfacePressed};
299
+ opacity: ${ge.opacityContentOnSurfacePressed};
300
300
  transform: translate(-50%, -50%) scale(1);
301
301
  }
302
- `;var xe=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},N=class extends Yr.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Yr.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Yr.Debouncer(10),this.moveRipple=e=>{var r,i;let{x:n,y:s}=this.getCoordinates(e),o=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-o.x:o.width/2),this.originY=Math.round(s!=null?s-o.y:o.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return $c.html`
302
+ `;var be=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},N=class extends Yr.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Yr.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Yr.Debouncer(10),this.moveRipple=e=>{var r,i;let{x:n,y:s}=this.getCoordinates(e),o=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-o.x:o.width/2),this.originY=Math.round(s!=null?s-o.y:o.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return kc.html`
303
303
  <style>
304
304
  .ft-ripple .ft-ripple--effect {
305
305
  left: ${this.originX}px;
306
306
  top: ${this.originY}px;
307
307
  }
308
308
  </style>
309
- <div class="${(0,Bc.classMap)(e)}">
309
+ <div class="${(0,Fc.classMap)(e)}">
310
310
  <div class="ft-ripple--background"></div>
311
311
  <div class="ft-ripple--effect"></div>
312
312
  </div>
313
- `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,i;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let i=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),s=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},o={passive:!0};e.addEventListener("mouseover",this.startHover,o),e.addEventListener("mousemove",this.moveRipple,o),e.addEventListener("mouseleave",this.endHover,o),e.addEventListener("mousedown",i,o),e.addEventListener("touchstart",n,o),e.addEventListener("touchmove",this.moveRipple,o),e.addEventListener("keydown",s,o),e.addEventListener("focus",this.startFocus,o),e.addEventListener("blur",this.endFocus,o),e.addEventListener("focusin",this.startFocus,o),e.addEventListener("focusout",this.endFocus,o),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,o),e.removeEventListener("mousemove",this.moveRipple,o),e.removeEventListener("mouseleave",this.endHover,o),e.removeEventListener("mousedown",i,o),e.removeEventListener("touchstart",n,o),e.removeEventListener("touchmove",this.moveRipple,o),e.removeEventListener("keydown",s,o),e.removeEventListener("focus",this.startFocus,o),e.removeEventListener("blur",this.endFocus,o),e.removeEventListener("focusin",this.startFocus,o),e.removeEventListener("focusout",this.endFocus,o),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,i=e,n,s;return r.x!=null?{x:n,y:s}=r:i.touches!=null&&(n=i.touches[0].clientX,s=i.touches[0].clientY),{x:n,y:s}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};N.elementDefinitions={};N.styles=Uc;xe([(0,ne.property)({type:Boolean})],N.prototype,"primary",void 0);xe([(0,ne.property)({type:Boolean})],N.prototype,"secondary",void 0);xe([(0,ne.property)({type:Boolean})],N.prototype,"unbounded",void 0);xe([(0,ne.property)({type:Boolean})],N.prototype,"activated",void 0);xe([(0,ne.property)({type:Boolean})],N.prototype,"selected",void 0);xe([(0,ne.property)({type:Boolean})],N.prototype,"disabled",void 0);xe([(0,ne.state)()],N.prototype,"hovered",void 0);xe([(0,ne.state)()],N.prototype,"focused",void 0);xe([(0,ne.state)()],N.prototype,"pressed",void 0);xe([(0,ne.state)()],N.prototype,"rippling",void 0);xe([(0,ne.state)()],N.prototype,"originX",void 0);xe([(0,ne.state)()],N.prototype,"originY",void 0);xe([(0,ne.query)(".ft-ripple")],N.prototype,"ripple",void 0);xe([(0,ne.query)(".ft-ripple--effect")],N.prototype,"rippleEffect",void 0);var Vc=h(b());var Hc={"ft-ripple":N};(0,Vc.customElements)(Hc);var jc=h(I()),ze=h(b()),we={size:ze.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:ze.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",ze.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:ze.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",ze.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:ze.FtCssVariableFactory.extend("--ft-icon-material-font-family","",ze.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:ze.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},zc=[jc.css`
313
+ `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,i;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let i=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),s=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},o={passive:!0};e.addEventListener("mouseover",this.startHover,o),e.addEventListener("mousemove",this.moveRipple,o),e.addEventListener("mouseleave",this.endHover,o),e.addEventListener("mousedown",i,o),e.addEventListener("touchstart",n,o),e.addEventListener("touchmove",this.moveRipple,o),e.addEventListener("keydown",s,o),e.addEventListener("focus",this.startFocus,o),e.addEventListener("blur",this.endFocus,o),e.addEventListener("focusin",this.startFocus,o),e.addEventListener("focusout",this.endFocus,o),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,o),e.removeEventListener("mousemove",this.moveRipple,o),e.removeEventListener("mouseleave",this.endHover,o),e.removeEventListener("mousedown",i,o),e.removeEventListener("touchstart",n,o),e.removeEventListener("touchmove",this.moveRipple,o),e.removeEventListener("keydown",s,o),e.removeEventListener("focus",this.startFocus,o),e.removeEventListener("blur",this.endFocus,o),e.removeEventListener("focusin",this.startFocus,o),e.removeEventListener("focusout",this.endFocus,o),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,i=e,n,s;return r.x!=null?{x:n,y:s}=r:i.touches!=null&&(n=i.touches[0].clientX,s=i.touches[0].clientY),{x:n,y:s}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};N.elementDefinitions={};N.styles=Dc;be([(0,ne.property)({type:Boolean})],N.prototype,"primary",void 0);be([(0,ne.property)({type:Boolean})],N.prototype,"secondary",void 0);be([(0,ne.property)({type:Boolean})],N.prototype,"unbounded",void 0);be([(0,ne.property)({type:Boolean})],N.prototype,"activated",void 0);be([(0,ne.property)({type:Boolean})],N.prototype,"selected",void 0);be([(0,ne.property)({type:Boolean})],N.prototype,"disabled",void 0);be([(0,ne.state)()],N.prototype,"hovered",void 0);be([(0,ne.state)()],N.prototype,"focused",void 0);be([(0,ne.state)()],N.prototype,"pressed",void 0);be([(0,ne.state)()],N.prototype,"rippling",void 0);be([(0,ne.state)()],N.prototype,"originX",void 0);be([(0,ne.state)()],N.prototype,"originY",void 0);be([(0,ne.query)(".ft-ripple")],N.prototype,"ripple",void 0);be([(0,ne.query)(".ft-ripple--effect")],N.prototype,"rippleEffect",void 0);var $c=h(b());var Uc={"ft-ripple":N};(0,$c.customElements)(Uc);var Bc=h(I()),ze=h(b()),we={size:ze.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:ze.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",ze.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:ze.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",ze.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:ze.FtCssVariableFactory.extend("--ft-icon-material-font-family","",ze.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:ze.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Hc=[Bc.css`
314
314
  :host, i.ft-icon {
315
315
  display: inline-flex;
316
316
  align-items: center;
@@ -358,12 +358,12 @@
358
358
  .ft-icon--material {
359
359
  font-family: ${we.materialFontFamily}, "Material Icons", sans-serif;
360
360
  }
361
- `,ze.noTextSelect];var Ye;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ye||(Ye={}));var Xr=h(I()),gt=h(W()),Wc=h(b()),Gc=h(Kc());var bn;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(bn||(bn={}));var g;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(g||(g={}));var Xv=new Map([...["abw"].map(t=>[t,g.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,g.AUDIO]),...["avi"].map(t=>[t,g.AVI]),...["chm","xhs"].map(t=>[t,g.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,g.CODE]),...["csv"].map(t=>[t,g.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,g.DITA]),...["epub"].map(t=>[t,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,g.EXCEL]),...["flac"].map(t=>[t,g.FLAC]),...["gif"].map(t=>[t,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,g.GZIP]),...["html","htm","xhtml"].map(t=>[t,g.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,g.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,g.JPEG]),...["json"].map(t=>[t,g.JSON]),...["m4a","m4p"].map(t=>[t,g.M4A]),...["mov","qt"].map(t=>[t,g.MOV]),...["mp3"].map(t=>[t,g.MP3]),...["mp4","m4v"].map(t=>[t,g.MP4]),...["ogg","oga"].map(t=>[t,g.OGG]),...["pdf","ps"].map(t=>[t,g.PDF]),...["png"].map(t=>[t,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,g.POWERPOINT]),...["rar"].map(t=>[t,g.RAR]),...["stp"].map(t=>[t,g.STP]),...["txt","rtf","md","mdown"].map(t=>[t,g.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,g.VIDEO]),...["wav"].map(t=>[t,g.WAV]),...["wma"].map(t=>[t,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,g.WORD]),...["xml","xsl","rdf"].map(t=>[t,g.XML]),...["yaml","yml","x-yaml"].map(t=>[t,g.YAML]),...["zip"].map(t=>[t,g.ZIP])]);var Jv={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Jr=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},se=class extends Wc.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Xr.nothing}render(){let e=this.variant&&Object.values(Ye).includes(this.variant)?this.variant:Ye.fluid_topics,r=e!==Ye.material||!!this.value;return Xr.html`
361
+ `,ze.noTextSelect];var Ye;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ye||(Ye={}));var Xr=h(I()),gt=h(W()),zc=h(b()),qc=h(jc());var xn;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(xn||(xn={}));var g;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(g||(g={}));var qv=new Map([...["abw"].map(t=>[t,g.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,g.AUDIO]),...["avi"].map(t=>[t,g.AVI]),...["chm","xhs"].map(t=>[t,g.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,g.CODE]),...["csv"].map(t=>[t,g.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,g.DITA]),...["epub"].map(t=>[t,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,g.EXCEL]),...["flac"].map(t=>[t,g.FLAC]),...["gif"].map(t=>[t,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,g.GZIP]),...["html","htm","xhtml"].map(t=>[t,g.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,g.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,g.JPEG]),...["json"].map(t=>[t,g.JSON]),...["m4a","m4p"].map(t=>[t,g.M4A]),...["mov","qt"].map(t=>[t,g.MOV]),...["mp3"].map(t=>[t,g.MP3]),...["mp4","m4v"].map(t=>[t,g.MP4]),...["ogg","oga"].map(t=>[t,g.OGG]),...["pdf","ps"].map(t=>[t,g.PDF]),...["png"].map(t=>[t,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,g.POWERPOINT]),...["rar"].map(t=>[t,g.RAR]),...["stp"].map(t=>[t,g.STP]),...["txt","rtf","md","mdown"].map(t=>[t,g.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,g.VIDEO]),...["wav"].map(t=>[t,g.WAV]),...["wma"].map(t=>[t,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,g.WORD]),...["xml","xsl","rdf"].map(t=>[t,g.XML]),...["yaml","yml","x-yaml"].map(t=>[t,g.YAML]),...["zip"].map(t=>[t,g.ZIP])]);var Kv={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Jr=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},se=class extends zc.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Xr.nothing}render(){let e=this.variant&&Object.values(Ye).includes(this.variant)?this.variant:Ye.fluid_topics,r=e!==Ye.material||!!this.value;return Xr.html`
362
362
  <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
363
- ${(0,Gc.unsafeHTML)(this.resolvedIcon)}
363
+ ${(0,qc.unsafeHTML)(this.resolvedIcon)}
364
364
  <slot ?hidden=${r}></slot>
365
365
  </i>
366
- `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let i=this.value||this.getTextContent();switch(this.variant){case Ye.file_format:this.resolvedIcon=(e=g[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case Ye.material:this.resolvedIcon=this.value||Xr.nothing;break;default:this.resolvedIcon=(r=bn[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};se.elementDefinitions={};se.styles=zc;Jr([(0,gt.property)()],se.prototype,"variant",void 0);Jr([(0,gt.property)()],se.prototype,"value",void 0);Jr([(0,gt.property)({reflect:!0,attribute:"aria-hidden"})],se.prototype,"ariaHidden",void 0);Jr([(0,gt.state)()],se.prototype,"resolvedIcon",void 0);Jr([(0,gt.query)("slot")],se.prototype,"slottedContent",void 0);var Yc=h(b());var Qc={"ft-icon":se};(0,Yc.customElements)(Qc);var ei=h(I()),w=h(b());var Je=h(b());var Xc=h(I()),Zr=h(b()),qt={color:Zr.FtCssVariableFactory.extend("--ft-loader-color","",Zr.designSystemVariables.colorPrimary),size:Zr.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Jc=Xc.css`
366
+ `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let i=this.value||this.getTextContent();switch(this.variant){case Ye.file_format:this.resolvedIcon=(e=g[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case Ye.material:this.resolvedIcon=this.value||Xr.nothing;break;default:this.resolvedIcon=(r=xn[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};se.elementDefinitions={};se.styles=Hc;Jr([(0,gt.property)()],se.prototype,"variant",void 0);Jr([(0,gt.property)()],se.prototype,"value",void 0);Jr([(0,gt.property)({reflect:!0,attribute:"aria-hidden"})],se.prototype,"ariaHidden",void 0);Jr([(0,gt.state)()],se.prototype,"resolvedIcon",void 0);Jr([(0,gt.query)("slot")],se.prototype,"slottedContent",void 0);var Wc=h(b());var Kc={"ft-icon":se};(0,Wc.customElements)(Kc);var ei=h(I()),w=h(b());var Je=h(b());var Gc=h(I()),Zr=h(b()),qt={color:Zr.FtCssVariableFactory.extend("--ft-loader-color","",Zr.designSystemVariables.colorPrimary),size:Zr.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Qc=Gc.css`
367
367
  :host {
368
368
  line-height: 0;
369
369
  }
@@ -432,14 +432,14 @@
432
432
  transform: translate(calc(0.35 * ${qt.size}), 0);
433
433
  }
434
434
  }
435
- `;var Zc=h(I()),eu=h(b());var Kt=class extends eu.FtLitElement{render(){return Zc.html`
435
+ `;var Yc=h(I()),Xc=h(b());var Kt=class extends Xc.FtLitElement{render(){return Yc.html`
436
436
  <div class="ft-loader">
437
437
  <div></div>
438
438
  <div></div>
439
439
  <div></div>
440
440
  <div></div>
441
441
  </div>
442
- `}};Kt.styles=Jc;var ru=h(b());var tu={"ft-loader":Kt};(0,ru.customElements)(tu);var yt=h(I()),Sn=h(fr()),D=h(W());var mr=t=>t??X;var su=h(I()),_=h(b());var iu=_.FtCssVariableFactory.extend("--ft-button-color","",_.designSystemVariables.colorPrimary),B={backgroundColor:_.FtCssVariableFactory.extend("--ft-button-background-color","",_.designSystemVariables.colorSurface),borderRadius:_.FtCssVariableFactory.extend("--ft-button-border-radius","",_.designSystemVariables.borderRadiusL),color:iu,fontSize:_.FtCssVariableFactory.extend("--ft-button-font-size","",$e.fontSize),iconSize:_.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:_.FtCssVariableFactory.extend("--ft-button-ripple-color","",iu),verticalPadding:_.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:_.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:_.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:_.FtCssVariableFactory.external(_.designSystemVariables.colorOpacityDisabled,"Design system")},nu=_.FtCssVariableFactory.extend("--ft-button-primary-color","",_.FtCssVariableFactory.extend("--ft-button-color","",_.designSystemVariables.colorOnPrimary)),ro={backgroundColor:_.FtCssVariableFactory.extend("--ft-button-primary-background-color","",_.FtCssVariableFactory.extend("--ft-button-background-color","",_.designSystemVariables.colorPrimary)),color:nu,rippleColor:_.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",nu)},Xe={borderRadius:_.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",_.FtCssVariableFactory.extend("--ft-button-border-radius","",_.designSystemVariables.borderRadiusM)),verticalPadding:_.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:_.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:_.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},ou=su.css`
442
+ `}};Kt.styles=Qc;var Zc=h(b());var Jc={"ft-loader":Kt};(0,Zc.customElements)(Jc);var yt=h(I()),bn=h(fr()),D=h(W());var mr=t=>t??X;var ru=h(I()),_=h(b());var eu=_.FtCssVariableFactory.extend("--ft-button-color","",_.designSystemVariables.colorPrimary),B={backgroundColor:_.FtCssVariableFactory.extend("--ft-button-background-color","",_.designSystemVariables.colorSurface),borderRadius:_.FtCssVariableFactory.extend("--ft-button-border-radius","",_.designSystemVariables.borderRadiusL),color:eu,fontSize:_.FtCssVariableFactory.extend("--ft-button-font-size","",$e.fontSize),iconSize:_.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:_.FtCssVariableFactory.extend("--ft-button-ripple-color","",eu),verticalPadding:_.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:_.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:_.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:_.FtCssVariableFactory.external(_.designSystemVariables.colorOpacityDisabled,"Design system")},tu=_.FtCssVariableFactory.extend("--ft-button-primary-color","",_.FtCssVariableFactory.extend("--ft-button-color","",_.designSystemVariables.colorOnPrimary)),to={backgroundColor:_.FtCssVariableFactory.extend("--ft-button-primary-background-color","",_.FtCssVariableFactory.extend("--ft-button-background-color","",_.designSystemVariables.colorPrimary)),color:tu,rippleColor:_.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",tu)},Xe={borderRadius:_.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",_.FtCssVariableFactory.extend("--ft-button-border-radius","",_.designSystemVariables.borderRadiusM)),verticalPadding:_.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:_.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:_.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},iu=ru.css`
443
443
  :host {
444
444
  display: inline-block;
445
445
  max-width: 100%;
@@ -487,8 +487,8 @@
487
487
  --button-internal-line-height: max(calc(${B.fontSize} + 2px), ${B.iconSize});
488
488
  --button-internal-color: ${B.color};
489
489
  ${(0,_.setVariable)(we.size,B.iconSize)};
490
- ${(0,_.setVariable)(me.color,B.rippleColor)};
491
- ${(0,_.setVariable)(me.borderRadius,B.borderRadius)};
490
+ ${(0,_.setVariable)(ge.color,B.rippleColor)};
491
+ ${(0,_.setVariable)(ge.borderRadius,B.borderRadius)};
492
492
 
493
493
  border-radius: ${B.borderRadius};
494
494
  padding: ${B.verticalPadding} ${B.horizontalPadding};
@@ -504,7 +504,7 @@
504
504
  .ft-button.ft-button--dense {
505
505
  padding: ${Xe.verticalPadding} ${Xe.horizontalPadding};
506
506
  border-radius: ${Xe.borderRadius};
507
- ${(0,_.setVariable)(me.borderRadius,Xe.borderRadius)};
507
+ ${(0,_.setVariable)(ge.borderRadius,Xe.borderRadius)};
508
508
  }
509
509
 
510
510
  .ft-button.ft-button--dense.ft-button--outlined {
@@ -529,9 +529,9 @@
529
529
  }
530
530
 
531
531
  .ft-button.ft-button--primary {
532
- background-color: ${ro.backgroundColor};
533
- --button-internal-color: ${ro.color};
534
- ${(0,_.setVariable)(me.color,ro.rippleColor)};
532
+ background-color: ${to.backgroundColor};
533
+ --button-internal-color: ${to.color};
534
+ ${(0,_.setVariable)(ge.color,to.rippleColor)};
535
535
  }
536
536
 
537
537
  .ft-button--label {
@@ -584,7 +584,7 @@
584
584
  <ft-typography part="label"
585
585
  variant="${Ie.button}"
586
586
  element="span"
587
- class="${(0,Sn.classMap)(n)}">
587
+ class="${(0,bn.classMap)(n)}">
588
588
  <slot></slot>
589
589
  </ft-typography>
590
590
  ${this.resolveIcon()}
@@ -592,14 +592,14 @@
592
592
  <a href="${o}"
593
593
  target="${(e=this.target)!==null&&e!==void 0?e:"_self"}"
594
594
  part="button"
595
- class="${(0,Sn.classMap)(this.buttonClasses)}"
595
+ class="${(0,bn.classMap)(this.buttonClasses)}"
596
596
  aria-label="${mr((r=this.ariaLabel)!==null&&r!==void 0?r:this.label)}"
597
597
  ?disabled=${this.isDisabled()}>
598
598
  ${s}
599
599
  </a>
600
600
  `:yt.html`
601
601
  <button part="button"
602
- class="${(0,Sn.classMap)(this.buttonClasses)}"
602
+ class="${(0,bn.classMap)(this.buttonClasses)}"
603
603
  aria-label="${mr((i=this.ariaLabel)!==null&&i!==void 0?i:this.label)}"
604
604
  aria-haspopup="${mr(this.ariaHasPopup)}"
605
605
  aria-pressed="${mr(this.ariaPressed)}"
@@ -617,7 +617,7 @@
617
617
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
618
618
  `:yt.html`
619
619
  <slot part="icon" name="icon"></slot>
620
- `}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":N,"ft-tooltip":G,"ft-icon":se,"ft-loader":Kt,"ft-typography":re};R.styles=[Je.safariEllipsisFix,ou,Je.noTextSelect];R.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let r=e.target.getRootNode();r.host?r.host.hasTextContent=e.boundingClientRect.width>0:R.labelsObserver.unobserve(e.target)}});F([(0,D.property)({type:Boolean})],R.prototype,"primary",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"outlined",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"dense",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"round",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"disabled",void 0);F([(0,D.property)()],R.prototype,"icon",void 0);F([(0,D.property)()],R.prototype,"iconVariant",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);F([(0,D.property)()],R.prototype,"label",void 0);F([(0,D.property)()],R.prototype,"type",void 0);F([(0,D.property)()],R.prototype,"href",void 0);F([(0,D.property)()],R.prototype,"target",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"loading",void 0);F([(0,D.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);F([(0,D.property)()],R.prototype,"ariaHasPopup",void 0);F([(0,D.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);F([(0,D.property)()],R.prototype,"tooltipPosition",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"activated",void 0);F([(0,D.query)(".ft-button")],R.prototype,"button",void 0);F([(0,D.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);F([(0,D.state)()],R.prototype,"hasTextContent",void 0);F([(0,D.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);F([(0,D.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var lu=h(b());var au={"ft-button":R};(0,lu.customElements)(au);var cu=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),be={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:cu,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","",cu),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")},uu=w.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnPrimary)),io={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorPrimary)),color:uu,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",uu)},du={horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},pu=[w.noTextSelect,ei.css`
620
+ `}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":N,"ft-tooltip":G,"ft-icon":se,"ft-loader":Kt,"ft-typography":re};R.styles=[Je.safariEllipsisFix,iu,Je.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,D.property)({type:Boolean})],R.prototype,"primary",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"outlined",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"dense",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"round",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"disabled",void 0);F([(0,D.property)()],R.prototype,"icon",void 0);F([(0,D.property)()],R.prototype,"iconVariant",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);F([(0,D.property)()],R.prototype,"label",void 0);F([(0,D.property)()],R.prototype,"type",void 0);F([(0,D.property)()],R.prototype,"href",void 0);F([(0,D.property)()],R.prototype,"target",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"loading",void 0);F([(0,D.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);F([(0,D.property)()],R.prototype,"ariaHasPopup",void 0);F([(0,D.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);F([(0,D.property)()],R.prototype,"tooltipPosition",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);F([(0,D.property)({type:Boolean})],R.prototype,"activated",void 0);F([(0,D.query)(".ft-button")],R.prototype,"button",void 0);F([(0,D.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);F([(0,D.state)()],R.prototype,"hasTextContent",void 0);F([(0,D.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);F([(0,D.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)),ro={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,ei.css`
621
621
  :host {
622
622
  display: inline-block;
623
623
  max-width: 100%;
@@ -633,21 +633,21 @@
633
633
  box-sizing: border-box;
634
634
  pointer-events: auto;
635
635
 
636
- --chip-internal-font-size: ${be.fontSize};
637
- --chip-internal-font-weight: ${be.fontWeight};
636
+ --chip-internal-font-size: ${Ee.fontSize};
637
+ --chip-internal-font-weight: ${Ee.fontWeight};
638
638
  --chip-internal-line-height: max(20px, calc(var(--chip-internal-font-size) + 2px));
639
- ${(0,w.setVariable)(we.size,be.iconSize)};
640
- --chip-internal-vertical-padding: ${be.verticalPadding};
641
- --chip-internal-horizontal-padding: ${be.horizontalPadding};
639
+ ${(0,w.setVariable)(we.size,Ee.iconSize)};
640
+ --chip-internal-vertical-padding: ${Ee.verticalPadding};
641
+ --chip-internal-horizontal-padding: ${Ee.horizontalPadding};
642
642
  --chip-internal-icon-padding: 3px;
643
- --chip-internal-content-height: max(var(--chip-internal-line-height), ${be.iconSize});
643
+ --chip-internal-content-height: max(var(--chip-internal-line-height), ${Ee.iconSize});
644
644
 
645
- border: 1px solid ${be.borderColor};
646
- color: ${be.color};
647
- ${(0,w.setVariable)(me.color,be.rippleColor)};
648
- border-radius: var(${(0,ei.unsafeCSS)(be.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
645
+ border: 1px solid ${Ee.borderColor};
646
+ color: ${Ee.color};
647
+ ${(0,w.setVariable)(ge.color,Ee.rippleColor)};
648
+ border-radius: var(${(0,ei.unsafeCSS)(Ee.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
649
649
  padding: calc(var(--chip-internal-vertical-padding) - 1px) calc(var(--chip-internal-horizontal-padding) - 1px);
650
- background-color: ${be.backgroundColor};
650
+ background-color: ${Ee.backgroundColor};
651
651
  line-height: var(--chip-internal-content-height);
652
652
  }
653
653
 
@@ -657,28 +657,28 @@
657
657
 
658
658
  .ft-chip--dense {
659
659
  --chip-internal-icon-padding: 3px;
660
- --chip-internal-vertical-padding: ${du.verticalPadding};
661
- --chip-internal-horizontal-padding: ${du.horizontalPadding};
660
+ --chip-internal-vertical-padding: ${lu.verticalPadding};
661
+ --chip-internal-horizontal-padding: ${lu.horizontalPadding};
662
662
  --chip-internal-line-height: max(16px, calc(var(--chip-internal-font-size) + 2px));
663
663
  }
664
664
 
665
665
  .ft-chip--no-content {
666
- --chip-internal-horizontal-padding: ${be.horizontalPadding.get(ei.css`var(--chip-internal-vertical-padding)`)};
666
+ --chip-internal-horizontal-padding: ${Ee.horizontalPadding.get(ei.css`var(--chip-internal-vertical-padding)`)};
667
667
  }
668
668
 
669
669
  .ft-chip--disabled {
670
670
  cursor: default;
671
671
  pointer-events: none;
672
672
  filter: grayscale(1);
673
- opacity: ${be.opacityDisabled};
673
+ opacity: ${Ee.opacityDisabled};
674
674
  }
675
675
 
676
676
  .ft-chip--highlighted {
677
677
  border: none;
678
678
  padding: var(--chip-internal-vertical-padding) var(--chip-internal-horizontal-padding);
679
- background-color: ${io.backgroundColor};
680
- ${(0,w.setVariable)(me.color,io.rippleColor)};
681
- color: ${io.color};
679
+ background-color: ${ro.backgroundColor};
680
+ ${(0,w.setVariable)(ge.color,ro.rippleColor)};
681
+ color: ${ro.color};
682
682
  }
683
683
 
684
684
  .ft-chip--clickable {
@@ -709,7 +709,7 @@
709
709
  }
710
710
 
711
711
  .ft-chip--icon-button {
712
- ${(0,w.setVariable)(B.iconSize,be.iconSize)};
712
+ ${(0,w.setVariable)(B.iconSize,Ee.iconSize)};
713
713
  ${(0,w.setVariable)(B.horizontalPadding,"var(--chip-internal-icon-padding)")};
714
714
  ${(0,w.setVariable)(B.verticalPadding,"var(--chip-internal-icon-padding)")};
715
715
  margin: calc((-1) * var(--chip-internal-icon-padding));
@@ -757,8 +757,8 @@
757
757
  .ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
758
758
  order: -1;
759
759
  }
760
- `];var ge=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},An=class extends CustomEvent{constructor(){super("icon-click")}},H=class extends gr.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var e;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":gr.isSafari};return En.html`
761
- <div class="${(0,hu.classMap)(r)}"
760
+ `];var ye=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},Sn=class extends CustomEvent{constructor(){super("icon-click")}},H=class extends gr.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var e;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":gr.isSafari};return En.html`
761
+ <div class="${(0,uu.classMap)(r)}"
762
762
  aria-label="${this.getLabel()}"
763
763
  tabindex="${this.interactionsOnChip?0:-1}"
764
764
  @keyup=${this.onKeyUp}
@@ -784,7 +784,7 @@
784
784
  <div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
785
785
  <ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
786
786
  </div>
787
- `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new An))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new An))}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)}};H.elementDefinitions={"ft-ripple":N,"ft-typography":re,"ft-icon":se,"ft-button":R};H.styles=pu;ge([(0,oe.property)({type:Boolean})],H.prototype,"highlighted",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"removable",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"disabled",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"clickable",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"iconClickable",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"dense",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"multiLine",void 0);ge([(0,oe.property)()],H.prototype,"label",void 0);ge([(0,oe.property)()],H.prototype,"iconLabel",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"hideIconTooltip",void 0);ge([(0,oe.property)()],H.prototype,"icon",void 0);ge([(0,oe.property)()],H.prototype,"iconVariant",void 0);ge([(0,oe.property)({type:Boolean})],H.prototype,"trailingIcon",void 0);ge([(0,oe.property)()],H.prototype,"typographyVariant",void 0);ge([(0,oe.query)("ft-typography slot")],H.prototype,"slottedContent",void 0);var mu=h(b());var fu={"ft-chip":H};(0,mu.customElements)(fu);var Su=h(I()),Z=h(W()),xr=h(b());var Eu=h(fr());var ti=h(I()),vr=h(W()),Cn=h(b());var gu=h(I()),Tn=h(b()),Bp={iconColor:Tn.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",Tn.designSystemVariables.colorOnSurfaceMedium)},yu=gu.css`
787
+ `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Sn))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Sn))}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)}};H.elementDefinitions={"ft-ripple":N,"ft-typography":re,"ft-icon":se,"ft-button":R};H.styles=cu;ye([(0,oe.property)({type:Boolean})],H.prototype,"highlighted",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"removable",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"disabled",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"clickable",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"iconClickable",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"dense",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"multiLine",void 0);ye([(0,oe.property)()],H.prototype,"label",void 0);ye([(0,oe.property)()],H.prototype,"iconLabel",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"hideIconTooltip",void 0);ye([(0,oe.property)()],H.prototype,"icon",void 0);ye([(0,oe.property)()],H.prototype,"iconVariant",void 0);ye([(0,oe.property)({type:Boolean})],H.prototype,"trailingIcon",void 0);ye([(0,oe.property)()],H.prototype,"typographyVariant",void 0);ye([(0,oe.query)("ft-typography slot")],H.prototype,"slottedContent",void 0);var pu=h(b());var du={"ft-chip":H};(0,pu.customElements)(du);var vu=h(I()),Z=h(W()),xr=h(b());var xu=h(fr());var ti=h(I()),vr=h(W()),_n=h(b());var hu=h(I()),An=h(b()),kp={iconColor:An.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",An.designSystemVariables.colorOnSurfaceMedium)},fu=hu.css`
788
788
  .ft-floating-menu-item {
789
789
  cursor: pointer;
790
790
  display: flex;
@@ -804,7 +804,7 @@
804
804
  }
805
805
 
806
806
  .ft-floating-menu-item ft-icon {
807
- color: ${Bp.iconColor};
807
+ color: ${kp.iconColor};
808
808
  margin-left: 0;
809
809
  flex-shrink: 0;
810
810
  flex-grow: 0;
@@ -819,8 +819,8 @@
819
819
  word-break: break-word;
820
820
  hyphens: auto;
821
821
  }
822
- `;var vu=h(fr()),yr=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},_n=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},ue=class extends Cn.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return ti.html`
823
- <div class="${(0,vu.classMap)(this.floatingClasses)}"
822
+ `;var mu=h(fr()),yr=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},Tn=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},de=class extends _n.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return ti.html`
823
+ <div class="${(0,mu.classMap)(this.floatingClasses)}"
824
824
  tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
825
825
  aria-disabled="${this.disabled}"
826
826
  @keydown=${e=>this.onKeyDown(e)}
@@ -835,7 +835,7 @@
835
835
  <slot></slot>
836
836
  </ft-typography>
837
837
  </div>
838
- `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new _n(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new _n(this.value)))}};ue.elementDefinitions={"ft-icon":se,"ft-ripple":N,"ft-typography":re};ue.styles=yu;yr([(0,vr.property)()],ue.prototype,"iconVariant",void 0);yr([(0,vr.property)()],ue.prototype,"icon",void 0);yr([(0,vr.property)()],ue.prototype,"value",void 0);yr([(0,vr.property)({type:Boolean})],ue.prototype,"notFocusable",void 0);yr([(0,vr.property)({type:Boolean})],ue.prototype,"disabled",void 0);yr([(0,Cn.ignoreComposingEvents)()],ue.prototype,"onKeyDown",null);var xu=h(I()),Re=h(b()),vt={zIndex:Re.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Re.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Re.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Re.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Re.designSystemVariables.colorOnSurfaceHigh),colorSurface:Re.FtCssVariableFactory.external(Re.designSystemVariables.colorSurface,"Design system"),menuElevation:Re.FtCssVariableFactory.external(Re.designSystemVariables.elevation02,"Design system"),borderRadiusS:Re.FtCssVariableFactory.external(Re.designSystemVariables.borderRadiusS,"Design system")},bu=xu.css`
838
+ `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new Tn(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new Tn(this.value)))}};de.elementDefinitions={"ft-icon":se,"ft-ripple":N,"ft-typography":re};de.styles=fu;yr([(0,vr.property)()],de.prototype,"iconVariant",void 0);yr([(0,vr.property)()],de.prototype,"icon",void 0);yr([(0,vr.property)()],de.prototype,"value",void 0);yr([(0,vr.property)({type:Boolean})],de.prototype,"notFocusable",void 0);yr([(0,vr.property)({type:Boolean})],de.prototype,"disabled",void 0);yr([(0,_n.ignoreComposingEvents)()],de.prototype,"onKeyDown",null);var gu=h(I()),Re=h(b()),vt={zIndex:Re.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Re.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Re.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Re.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Re.designSystemVariables.colorOnSurfaceHigh),colorSurface:Re.FtCssVariableFactory.external(Re.designSystemVariables.colorSurface,"Design system"),menuElevation:Re.FtCssVariableFactory.external(Re.designSystemVariables.elevation02,"Design system"),borderRadiusS:Re.FtCssVariableFactory.external(Re.designSystemVariables.borderRadiusS,"Design system")},yu=gu.css`
839
839
  .ft-floating-menu {
840
840
  color: ${vt.textColor};
841
841
  display: contents;
@@ -866,8 +866,8 @@
866
866
  .ft-floating-menu--open .ft-floating-menu--options {
867
867
  display: block;
868
868
  }
869
- `;var de=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},wn=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var Rn=class extends CustomEvent{constructor(e){super("select",{detail:e})}},$=class extends xr.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=Ye.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=e=>{this.menuOpen=this.menuOpen&&e.composedPath().includes(this.container)}}updated(e){super.updated(e),e.has("menuOpen")&&this.dispatchEvent(new wn(this.menuOpen))}render(){let e={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Su.html`
870
- <div part="container" class="${(0,Eu.classMap)(e)}" @keydown=${this.onKeyDown}>
869
+ `;var pe=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},Cn=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var wn=class extends CustomEvent{constructor(e){super("select",{detail:e})}},$=class extends xr.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=Ye.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=e=>{this.menuOpen=this.menuOpen&&e.composedPath().includes(this.container)}}updated(e){super.updated(e),e.has("menuOpen")&&this.dispatchEvent(new Cn(this.menuOpen))}render(){let e={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return vu.html`
870
+ <div part="container" class="${(0,xu.classMap)(e)}" @keydown=${this.onKeyDown}>
871
871
  <slot name="toggle"
872
872
  part="toggle"
873
873
  @click=${this.toggleMenu}
@@ -897,7 +897,7 @@
897
897
  </div>
898
898
  </div>
899
899
  </div>
900
- `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new Rn(e.detail)),this.closeMenu()}onContentClick(e){(0,xr.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await Ai(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};$.elementDefinitions={"ft-floating-menu-item":ue,"ft-button":R};$.styles=bu;de([(0,Z.property)()],$.prototype,"horizontalAlignment",void 0);de([(0,Z.property)()],$.prototype,"verticalAlignment",void 0);de([(0,xr.jsonProperty)([])],$.prototype,"closeMenuMatchers",void 0);de([(0,Z.property)({type:Boolean})],$.prototype,"primary",void 0);de([(0,Z.property)()],$.prototype,"label",void 0);de([(0,Z.property)()],$.prototype,"tooltipPosition",void 0);de([(0,Z.property)()],$.prototype,"icon",void 0);de([(0,Z.property)()],$.prototype,"iconVariant",void 0);de([(0,Z.property)()],$.prototype,"text",void 0);de([(0,Z.property)({type:Boolean})],$.prototype,"disabled",void 0);de([(0,Z.state)()],$.prototype,"menuOpen",void 0);de([(0,Z.state)()],$.prototype,"forceMenuOpen",void 0);de([(0,Z.query)(".ft-floating-menu")],$.prototype,"container",void 0);de([(0,Z.query)(".ft-floating-menu--wrapper")],$.prototype,"menuWrapper",void 0);de([(0,Z.query)("#actions-button")],$.prototype,"actionButton",void 0);de([(0,Z.queryAssignedElements)({slot:"toggle"})],$.prototype,"customToggle",void 0);var Au=h(I()),On=h(b()),Hp={color:On.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",On.designSystemVariables.colorOnSurfaceMedium)},Tu=Au.css`
900
+ `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new wn(e.detail)),this.closeMenu()}onContentClick(e){(0,xr.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await Si(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};$.elementDefinitions={"ft-floating-menu-item":de,"ft-button":R};$.styles=yu;pe([(0,Z.property)()],$.prototype,"horizontalAlignment",void 0);pe([(0,Z.property)()],$.prototype,"verticalAlignment",void 0);pe([(0,xr.jsonProperty)([])],$.prototype,"closeMenuMatchers",void 0);pe([(0,Z.property)({type:Boolean})],$.prototype,"primary",void 0);pe([(0,Z.property)()],$.prototype,"label",void 0);pe([(0,Z.property)()],$.prototype,"tooltipPosition",void 0);pe([(0,Z.property)()],$.prototype,"icon",void 0);pe([(0,Z.property)()],$.prototype,"iconVariant",void 0);pe([(0,Z.property)()],$.prototype,"text",void 0);pe([(0,Z.property)({type:Boolean})],$.prototype,"disabled",void 0);pe([(0,Z.state)()],$.prototype,"menuOpen",void 0);pe([(0,Z.state)()],$.prototype,"forceMenuOpen",void 0);pe([(0,Z.query)(".ft-floating-menu")],$.prototype,"container",void 0);pe([(0,Z.query)(".ft-floating-menu--wrapper")],$.prototype,"menuWrapper",void 0);pe([(0,Z.query)("#actions-button")],$.prototype,"actionButton",void 0);pe([(0,Z.queryAssignedElements)({slot:"toggle"})],$.prototype,"customToggle",void 0);var bu=h(I()),Rn=h(b()),Fp={color:Rn.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",Rn.designSystemVariables.colorOnSurfaceMedium)},Eu=bu.css`
901
901
  .ft-floating-menu-label {
902
902
  padding: 4px 8px;
903
903
  }
@@ -908,25 +908,27 @@
908
908
  width: max-content;
909
909
  text-overflow: ellipsis;
910
910
  overflow: hidden;
911
- color: ${Hp.color}
911
+ color: ${Fp.color}
912
912
  }
913
- `;var _u=h(I()),Cu=h(b());var xt=class extends Cu.FtLitElement{render(){return _u.html`
913
+ `;var Su=h(I()),Au=h(b());var xt=class extends Au.FtLitElement{render(){return Su.html`
914
914
  <div class="ft-floating-menu-label">
915
915
  <ft-typography variant="${Ie.caption}">
916
916
  <slot></slot>
917
917
  </ft-typography>
918
918
  </div>
919
- `}};xt.elementDefinitions={"ft-typography":re};xt.styles=Tu;var Ru=h(b());var wu={"ft-floating-menu":$,"ft-floating-menu-item":ue,"ft-floating-menu-label":xt};(0,Ru.customElements)(wu);var ri=h(b());function Vp(t){var e;return((e=(0,ri.accessResult)(t))===null||e===void 0?void 0:e.openMode)===rn.EXTERNAL}function no(t,e){return Vp(t)?(0,ri.accessResult)(t).originUrl:(0,ri.accessResultUrl)(t,e)}var Ku=h(Iu());var so=yn.build("designedReaderMapMetadata");var Mu=h(I());var Lu=Mu.css`
920
- `;var ai=h(I()),at=h(W()),Y=h(b());var ae=h(b());var Pu=h(b()),jp={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]}},Nu=t=>Pu.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:jp});var oo=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,T)=>(T?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,T)=>{m(v,x[T])}),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}},In=class{convertPaginatedToc(e,r){return new oo(e,r).build()}};var Ln=h(b()),Mn=class extends ee{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=y.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){return(await this.getEnrichedToc(e)).filteredTocNodes}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=Ln.SearchPlaceConverter.serializeValueFilters(s.metadataFilters);l&&a.searchParams.set(Ln.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=y.getState().session;e?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(e,r,i){return this.makeTopicFeedbackRequest(e,r,i)}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 et.FEEDBACK:return Pe(r??[],P.FEEDBACK_USER);case et.RATING:return Pe(r??[],P.RATING_USER);case et.PRINT:return Pe(r??[],P.PRINT_USER);case et.BOOKMARK:return!!r?.sessionAuthenticated;case et.COLLECTIONS:return Pe(r??[],P.COLLECTION_USER);case et.PERSONAL_BOOKS:return Pe(r??[],P.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var Pn=class t extends Mn{static async build(e){return new t(new In,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){return this.api.sendTopicFeedback(this.mapId,e,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(e){return this.api.unrateTopic(this.mapId,e)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(e){return!0}};var zp="topicPivot";function Nn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(zp,i)}),r.href}var Dn=class t{static build(e,r){return new t(Nu(e.trim()||"context"),r??Pn.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;let s=await this.awaitService();if(r)return s.getPage(r,this.getTranslationSettings());if(!e)return s.getPageByTocId("root",this.getTranslationSettings());let o=this.store.getState().filteredTocNodes[e],a=((i=this.service)===null||i===void 0?void 0:i.getTocNodeNow(e))!=null;return o&&o.reason!=="ACCESS_RIGHTS_FILTER"&&!a?s.getPageByTocId((n=o.closestParent)!==null&&n!==void 0?n:"root",this.getTranslationSettings()):s.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 ci(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(Ze.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(Ze.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=y.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(Ze.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=Nn(o,c)}}return o}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:s}=y.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}=y.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 kn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},Fn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Un=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},$n=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},Bn=class extends Event{constructor(){super("ft-reader-map-not-found")}},Hn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Vn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},jn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Du=h(I());var ku=Du.css`
921
- `;var Hu=h(I()),Ue=h(W()),ye=h(b());var br=h(b()),oi=h(W());var ii;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(ii||(ii={}));var j=h(b());var Fu=h(b()),qp={setRequest:(t,e)=>{t.request=e.payload}},Uu=t=>Fu.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:qp});var zn=class extends ee{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 getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}async getConfiguration(){return this.cache.get("search-configuration")}sortFilters(e){return e.map(r=>r.valueFilter==null?r:{...r,valueFilter:{...r.valueFilter,values:[...r.valueFilter.values].sort((i,n)=>i.localeCompare(n))}}).sort((r,i)=>r.key.localeCompare(i.key))}};var qn=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e,composed:!0,bubbles:!0})}},Kn=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e,composed:!0,bubbles:!0})}},Wn=class extends CustomEvent{constructor(e,r,i){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:i},composed:!0,bubbles:!0})}},ni=class t extends Event{constructor(){super(t.eventName)}};ni.eventName="search-context-clear-all-filters";var Kp=t=>t.request.virtualField===nr.TITLE_ONLY&&t.request.scope===sr.DOCUMENTS,Wp=t=>t.request.keywordMatch==tn.MANDATORY,si=class t extends j.FtStateManager{static build(e,r){return new t(Uu(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==ii.CLUSTERED_SEARCH&&this.launchSearch()},this.onStorageEvent=i=>{i.key===this.taruqaConfigStorageKey&&this.loadTaruqaTemplate()},this.loadTaruqaTemplate=()=>{var i;let n;if(Pe(y.getState().session,P.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.localesDebouncer=new j.Debouncer(10),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=y.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=y.getState().stickyFilters)===null||n===void 0?void 0:n.id:void 0}},this.service=r??new zn,this.service.cache.addEventListener("clear-cache",i=>{i.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=new j.ReduxWatcher(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=new j.ReduxWatcher(e,this.buildSuggestRequest,this.launchSuggest),this.stickyFiltersIdWatcher=new j.ReduxWatcher(y,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),y.addEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.watch(),this.suggestWatcher.watch(),this.stickyFiltersIdWatcher.watch(),this.history.enable(y.getState().tenantId+"-ft-recent-queries")}removeListeners(){window.removeEventListener("storage",this.onStorageEvent),y.removeEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.stop(),this.suggestWatcher.stop(),this.stickyFiltersIdWatcher.stop(),this.history.disable()}get taruqaConfigStorageKey(){return y.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,i;let n=(i=this.store.getState().locales)!==null&&i!==void 0?i:[],s=this.store.getState().request.contentLocale;if(e!=s){if(n.length>0){let o=a=>n.some(l=>l.lang==a);o(e)||(e=o(s)?s:n[0].lang)}this.updateSearchRequest({contentLocale:e,metadataFilters:[]},!0),this.canUpdateUiLocale&&(!((r=qr.store.getState().localesConfiguration)===null||r===void 0)&&r.searchLanguageSetsUiLanguage)&&e&&qr.requestUiLocaleUpdate(e,e)}return e}forceContentLocale(e){this.updateSearchRequest({contentLocale: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 Kp(this.store.getState())}get keywordMatch(){return Wp(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new ni)}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)}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var r,i,n,s,o;if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),!!this.isRequestNeeded(ii.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 ao=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},co=class extends CustomEvent{constructor(e){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:e}})}},$u=Symbol("registerInterval"),lo=Symbol("registerAttempts"),Gp=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[lo]=0,this.tryToRegisterToContext(),this[$u]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[lo]>Gp?window.clearInterval(this[$u]):(this[lo]++,this.dispatchEvent(new co(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return ao([(0,oi.state)()],e.prototype,"stateManager",void 0),ao([(0,oi.state)({hasChanged:br.hasChanged})],e.prototype,"neededSearchRequests",void 0),ao([(0,oi.property)()],e.prototype,"searchRegistrationId",void 0),e}),Bu=class extends Qp(br.FtLitElementRedux){};var Xn=h(b());function Gn(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Qn(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 Yn=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,Xn.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}=y.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}=y.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r,i){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ut.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:i.totalClustersCount},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Gn(e.metadataFilters),facets:e.metadataFilters.map(s=>Qn(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:Ut.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==Qe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ut.SEARCH_PAGE__SELECT,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Gn(i.metadataFilters),facets:i.metadataFilters.map(o=>Qn(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==Qe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ut.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Gn(i.metadataFilters),facets:i.metadataFilters.map(o=>Qn(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 Qe.MAP:return{id:e.map.mapId,title:e.map.title,type:mt.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Qe.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:mt.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Qe.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:mt.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case Qe.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:mt.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case Qe.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,Xn.accessResult)(e))===null||r===void 0?void 0:r.originUrl}};var Q=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 ye.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=si.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 Yn(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(y)}render(){return Hu.html`
919
+ `}};xt.elementDefinitions={"ft-typography":re};xt.styles=Eu;var _u=h(b());var Tu={"ft-floating-menu":$,"ft-floating-menu-item":de,"ft-floating-menu-label":xt};(0,_u.customElements)(Tu);var ri=h(b());function Up(t){var e;return((e=(0,ri.accessResult)(t))===null||e===void 0?void 0:e.openMode)===tn.EXTERNAL}function io(t,e){return Up(t)?(0,ri.accessResult)(t).originUrl:(0,ri.accessResultUrl)(t,e)}var ju=h(wu());var no=gn.build("designedReaderMapMetadata");var Ru=h(I());var Ou=Ru.css`
920
+ `;var ai=h(I()),at=h(W()),Y=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 so=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,T)=>(T?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,T)=>{m(v,x[T])}),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}},On=class{convertPaginatedToc(e,r){return new so(e,r).build()}};var Mn=h(b()),In=class extends ee{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 Le((r=(e=y.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=Mn.SearchPlaceConverter.serializeValueFilters(s.metadataFilters);l&&a.searchParams.set(Mn.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=y.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 et.FEEDBACK:return Le(r??[],L.FEEDBACK_USER);case et.RATING:return Le(r??[],L.RATING_USER);case et.PRINT:return Le(r??[],L.PRINT_USER);case et.BOOKMARK:return!!r?.sessionAuthenticated;case et.COLLECTIONS:return Le(r??[],L.COLLECTION_USER);case et.PERSONAL_BOOKS:return Le(r??[],L.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var Pn=class t extends In{static async build(e){return new t(new On,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 Ln(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(Bp,i)}),r.href}var Nn=class t{static build(e,r){return new t(Mu(e.trim()||"context"),r??Pn.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(Ze.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(Ze.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=y.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(Ze.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=Ln(o,c)}}return o}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:s}=y.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:Zi.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}=y.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 Dn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},kn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Fn=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},Un=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},$n=class extends Event{constructor(){super("ft-reader-map-not-found")}},Bn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Hn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Vn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Pu=h(I());var Lu=Pu.css`
921
+ `;var Uu=h(I()),Ue=h(W()),ve=h(b());var br=h(b()),oi=h(W());var ii;(function(t){t.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(ii||(ii={}));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});var jn=class extends ee{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 getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}async getConfiguration(){return this.cache.get("search-configuration")}sortFilters(e){return e.map(r=>r.valueFilter==null?r:{...r,valueFilter:{...r.valueFilter,values:[...r.valueFilter.values].sort((i,n)=>i.localeCompare(n))}}).sort((r,i)=>r.key.localeCompare(i.key))}};var zn=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e,composed:!0,bubbles:!0})}},qn=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e,composed:!0,bubbles:!0})}},Kn=class extends CustomEvent{constructor(e,r,i){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:i},composed:!0,bubbles:!0})}},ni=class t extends Event{constructor(){super(t.eventName)}};ni.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==en.MANDATORY,si=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==ii.CLUSTERED_SEARCH&&this.launchSearch()},this.onStorageEvent=i=>{i.key===this.taruqaConfigStorageKey&&this.loadTaruqaTemplate()},this.loadTaruqaTemplate=()=>{var i;let n;if(Le(y.getState().session,L.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.localesDebouncer=new j.Debouncer(10),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=y.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=y.getState().stickyFilters)===null||n===void 0?void 0:n.id:void 0}},this.service=r??new jn,this.service.cache.addEventListener("clear-cache",i=>{i.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=new j.ReduxWatcher(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=new j.ReduxWatcher(e,this.buildSuggestRequest,this.launchSuggest),this.stickyFiltersIdWatcher=new j.ReduxWatcher(y,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),y.addEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.watch(),this.suggestWatcher.watch(),this.stickyFiltersIdWatcher.watch(),this.history.enable(y.getState().tenantId+"-ft-recent-queries")}removeListeners(){window.removeEventListener("storage",this.onStorageEvent),y.removeEventListener(Ce.eventName,this.loadTaruqaTemplate),this.searchWatcher.stop(),this.suggestWatcher.stop(),this.stickyFiltersIdWatcher.stop(),this.history.disable()}get taruqaConfigStorageKey(){return y.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,i;let n=(i=this.store.getState().locales)!==null&&i!==void 0?i:[],s=this.store.getState().request.contentLocale;if(e!=s){if(n.length>0){let o=a=>n.some(l=>l.lang==a);o(e)||(e=o(s)?s:n[0].lang)}this.updateSearchRequest({contentLocale:e,metadataFilters:[]},!0),this.canUpdateUiLocale&&(!((r=qr.store.getState().localesConfiguration)===null||r===void 0)&&r.searchLanguageSetsUiLanguage)&&e&&qr.requestUiLocaleUpdate(e,e)}return e}forceContentLocale(e){this.updateSearchRequest({contentLocale: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 ni)}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)}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var r,i,n,s,o;if((r=this.cancelableSearch)===null||r===void 0||r.cancel(),!!this.isRequestNeeded(ii.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 oo=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},lo=class extends CustomEvent{constructor(e){super("register-ft-search-component",{bubbles:!0,composed:!0,detail:{registrationId:e}})}},ku=Symbol("registerInterval"),ao=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[ao]=0,this.tryToRegisterToContext(),this[ku]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[ao]>zp?window.clearInterval(this[ku]):(this[ao]++,this.dispatchEvent(new lo(this.searchRegistrationId)))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return oo([(0,oi.state)()],e.prototype,"stateManager",void 0),oo([(0,oi.state)({hasChanged:br.hasChanged})],e.prototype,"neededSearchRequests",void 0),oo([(0,oi.property)()],e.prototype,"searchRegistrationId",void 0),e}),Fu=class extends qp(br.FtLitElementRedux){};var Yn=h(b());function Wn(t){return t.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Gn(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 Qn=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,Yn.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}=y.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}=y.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,r,i){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ut.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:i.totalClustersCount},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:Wn(e.metadataFilters),facets:e.metadataFilters.map(s=>Gn(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:Ut.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==Qe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ut.SEARCH_PAGE__SELECT,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Wn(i.metadataFilters),facets:i.metadataFilters.map(o=>Gn(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==Qe.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let s={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Ut.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:i.query,searchType:i.virtualField,lastUpdate:Wn(i.metadataFilters),facets:i.metadataFilters.map(o=>Gn(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 Qe.MAP:return{id:e.map.mapId,title:e.map.title,type:mt.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case Qe.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:mt.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case Qe.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:mt.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case Qe.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:mt.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case Qe.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,Yn.accessResult)(e))===null||r===void 0?void 0:r.originUrl}};var Q=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},P=class extends ve.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=si.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 Qn(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(y)}render(){return Uu.html`
922
922
  <slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click=${this.onResultClicked}
923
923
  @ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
924
- `}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 Kn(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Wn(this.request,this.paging,this.spellcheckAutocorrect))}registerComponent(e){if(e.stopPropagation(),e.detail.registrationId==this.registrationId){let r=e.composedPath()[0];this.register(r)}}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new qn(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=ku;Q([(0,ye.redux)({store:y.name})],L.prototype,"session",void 0);Q([(0,Ue.property)()],L.prototype,"query",void 0);Q([(0,Ue.property)()],L.prototype,"contentLocale",void 0);Q([(0,ye.numberProperty)()],L.prototype,"pageSize",void 0);Q([(0,Ue.property)({type:Boolean})],L.prototype,"searchInDocumentTitlesOnly",void 0);Q([(0,Ue.property)()],L.prototype,"keywordMatch",void 0);Q([(0,Ue.property)()],L.prototype,"scope",void 0);Q([(0,Ue.property)()],L.prototype,"virtualField",void 0);Q([(0,Ue.property)()],L.prototype,"registrationId",void 0);Q([(0,Ue.property)({type:Boolean})],L.prototype,"ignoreEmptyQuery",void 0);Q([(0,Ue.property)({type:Boolean})],L.prototype,"applyStickyFilters",void 0);Q([(0,ye.redux)({store:y.name})],L.prototype,"openExternalDocumentInNewTab",void 0);Q([(0,ye.jsonProperty)([])],L.prototype,"filters",void 0);Q([(0,Ue.property)()],L.prototype,"sortId",void 0);Q([(0,ye.jsonProperty)([])],L.prototype,"sort",void 0);Q([(0,ye.jsonProperty)({})],L.prototype,"otherQueryParams",void 0);Q([(0,ye.redux)({store:"search"})],L.prototype,"request",void 0);Q([(0,ye.redux)({store:"search"})],L.prototype,"paging",void 0);Q([(0,ye.redux)({store:"search",selector:t=>t.spellcheck})],L.prototype,"spellcheckAutocorrect",void 0);Q([(0,ye.redux)({store:y.name,selector:t=>t.apiIntegrationIdentifier!==void 0&&t.apiIntegrationAppVersion!==void 0})],L.prototype,"_appIntegrationInfoReady",void 0);Q([(0,Ue.property)({attribute:!1})],L.prototype,"searchServiceProvider",void 0);var ju=h(b());var Vu={"ft-search-context":L};(0,ju.customElements)(Vu);var pe=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{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},z=class extends Y.FtLitElementRedux{constructor(){super(),this.metadataFilters=[],this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Y.Debouncer(5),this.navigationDebouncer=new Y.Debouncer(10),this.mapLoadedEventDebouncer=new Y.Debouncer(50),this.addStore(y)}render(){return ai.html`
924
+ `}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 qn(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Kn(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 zn(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)}};P.elementDefinitions={};P.styles=Lu;Q([(0,ve.redux)({store:y.name})],P.prototype,"session",void 0);Q([(0,Ue.property)()],P.prototype,"query",void 0);Q([(0,Ue.property)()],P.prototype,"contentLocale",void 0);Q([(0,ve.numberProperty)()],P.prototype,"pageSize",void 0);Q([(0,Ue.property)({type:Boolean})],P.prototype,"searchInDocumentTitlesOnly",void 0);Q([(0,Ue.property)()],P.prototype,"keywordMatch",void 0);Q([(0,Ue.property)()],P.prototype,"scope",void 0);Q([(0,Ue.property)()],P.prototype,"virtualField",void 0);Q([(0,Ue.property)()],P.prototype,"registrationId",void 0);Q([(0,Ue.property)({type:Boolean})],P.prototype,"ignoreEmptyQuery",void 0);Q([(0,Ue.property)({type:Boolean})],P.prototype,"applyStickyFilters",void 0);Q([(0,ve.redux)({store:y.name})],P.prototype,"openExternalDocumentInNewTab",void 0);Q([(0,ve.jsonProperty)([])],P.prototype,"filters",void 0);Q([(0,Ue.property)()],P.prototype,"sortId",void 0);Q([(0,ve.jsonProperty)([])],P.prototype,"sort",void 0);Q([(0,ve.jsonProperty)({})],P.prototype,"otherQueryParams",void 0);Q([(0,ve.redux)({store:"search"})],P.prototype,"request",void 0);Q([(0,ve.redux)({store:"search"})],P.prototype,"paging",void 0);Q([(0,ve.redux)({store:"search",selector:t=>t.spellcheck})],P.prototype,"spellcheckAutocorrect",void 0);Q([(0,ve.redux)({store:y.name,selector:t=>t.apiIntegrationIdentifier!==void 0&&t.apiIntegrationAppVersion!==void 0})],P.prototype,"_appIntegrationInfoReady",void 0);Q([(0,Ue.property)({attribute:!1})],P.prototype,"searchServiceProvider",void 0);var Bu=h(b());var $u={"ft-search-context":P};(0,Bu.customElements)($u);var he=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},co=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},z=class extends Y.FtLitElementRedux{constructor(){super(),this.metadataFilters=[],this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Y.Debouncer(5),this.navigationDebouncer=new Y.Debouncer(10),this.mapLoadedEventDebouncer=new Y.Debouncer(50),this.addStore(y)}render(){return ai.html`
925
925
  ${this.importStyleIfNeeded()}
926
926
  <ft-toc-filtering-search-context
927
927
  registrationId="reader-toc-filtering"
928
928
  .filters=${this.filters}
929
- @ft-search-request-change=${e=>{var r;e.target===this.tocFilteringContext&&this.stateManager.setFilters((r=e.detail.metadataFilters.filter(i=>i.key!="ft:publicationId"))!==null&&r!==void 0?r:[])}} }
929
+ @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:[])}}
930
+ @ft-search-results-change=${e=>e.stopPropagation()}
931
+ @search-context-clear-all-filters=${e=>e.stopPropagation()}
930
932
  >
931
933
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
932
934
  </ft-toc-filtering-search-context>
@@ -934,7 +936,7 @@
934
936
  <style>
935
937
  @import "${i}"
936
938
  </style>
937
- `}get stateManager(){return this._stateManager==null&&(this._stateManager=Dn.build(this.id||(0,Y.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 uo(this.stateManager)}),y.addEventListener(Ce.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),y.addEventListener(Ce.eventName,this.updateConfiguration)}update(e){var r;super.update(e),e.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),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);let i=e.has("metadataFilters")&&e.get("metadataFilters")!=null;i&&this.stateManager.setFilters((r=this.metadataFilters)!==null&&r!==void 0?r:[]),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 Un(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 Fn(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 jn),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 Hn):r.status===403?this.dispatchEvent(new Vn):r.status===404?this.dispatchEvent(new Bn):this.dispatchEvent(new $n(e))}reloadBookmarks(){Ws.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 kn(this.map,this.toc))})}};z.elementDefinitions={"ft-toc-filtering-search-context":L};z.styles=Lu;pe([(0,Y.redux)({store:y.name})],z.prototype,"baseUrl",void 0);pe([(0,Y.redux)({store:y.name})],z.prototype,"session",void 0);pe([(0,at.property)()],z.prototype,"mapId",void 0);pe([(0,at.property)()],z.prototype,"tocId",void 0);pe([(0,at.property)()],z.prototype,"section",void 0);pe([(0,at.property)()],z.prototype,"topicPivot",void 0);pe([(0,at.property)()],z.prototype,"searchInDocumentQuery",void 0);pe([(0,Y.redux)({store:"reader",converter:(0,Y.jsonPropertyConverter)([]),attribute:!0})],z.prototype,"metadataFilters",void 0);pe([(0,Y.numberProperty)({min:1})],z.prototype,"page",void 0);pe([(0,Y.redux)({store:"reader"})],z.prototype,"map",void 0);pe([(0,Y.redux)({store:"reader"})],z.prototype,"toc",void 0);pe([(0,Y.redux)({store:"reader"})],z.prototype,"visibleTopics",void 0);pe([(0,Y.redux)({store:"reader"})],z.prototype,"currentPage",void 0);pe([(0,Y.redux)({store:"reader"})],z.prototype,"scrollTarget",void 0);pe([(0,at.property)({attribute:!1})],z.prototype,"readerServiceProvider",void 0);pe([(0,at.query)("ft-toc-filtering-search-context")],z.prototype,"tocFilteringContext",void 0);var qu=h(b());var zu={"ft-reader-context":z};(0,qu.customElements)(zu);var li=class{constructor(e){this.contentLocales=e}localize(e){var r,i;return e?.key!=="ft:locale"?e:{...e,displayValue:(r=this.findLocaleValue(e))!==null&&r!==void 0?r:e.displayValue,displayTooltipValue:(i=this.findLocaleValue(e))!==null&&i!==void 0?i:e.displayTooltipValue}}findLocaleValue(e){var r;return(r=this.contentLocales.find(i=>i.lang===e.value))===null||r===void 0?void 0:r.label}};var le=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 Tl(gn(ui)){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(so)}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`
939
+ `}get stateManager(){return this._stateManager==null&&(this._stateManager=Nn.build(this.id||(0,Y.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 co(this.stateManager)}),y.addEventListener(Ce.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),y.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 Fn(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 kn(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 Vn),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 Bn):r.status===403?this.dispatchEvent(new Hn):r.status===404?this.dispatchEvent(new $n):this.dispatchEvent(new Un(e))}reloadBookmarks(){Ks.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 Dn(this.map,this.toc))})}};z.elementDefinitions={"ft-toc-filtering-search-context":P};z.styles=Ou;he([(0,Y.redux)({store:y.name})],z.prototype,"baseUrl",void 0);he([(0,Y.redux)({store:y.name})],z.prototype,"session",void 0);he([(0,at.property)()],z.prototype,"mapId",void 0);he([(0,at.property)()],z.prototype,"tocId",void 0);he([(0,at.property)()],z.prototype,"section",void 0);he([(0,at.property)()],z.prototype,"topicPivot",void 0);he([(0,at.property)()],z.prototype,"searchInDocumentQuery",void 0);he([(0,Y.redux)({store:"reader",converter:(0,Y.jsonPropertyConverter)([]),attribute:!0})],z.prototype,"metadataFilters",void 0);he([(0,Y.numberProperty)({min:1})],z.prototype,"page",void 0);he([(0,Y.redux)({store:"reader"})],z.prototype,"map",void 0);he([(0,Y.redux)({store:"reader"})],z.prototype,"toc",void 0);he([(0,Y.redux)({store:"reader"})],z.prototype,"visibleTopics",void 0);he([(0,Y.redux)({store:"reader"})],z.prototype,"currentPage",void 0);he([(0,Y.redux)({store:"reader"})],z.prototype,"scrollTarget",void 0);he([(0,at.property)({attribute:!1})],z.prototype,"readerServiceProvider",void 0);he([(0,at.query)("ft-toc-filtering-search-context")],z.prototype,"tocFilteringContext",void 0);var Vu=h(b());var Hu={"ft-reader-context":z};(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 El(mn(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(no)}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`
938
940
  ${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
939
941
  ${this.hideIfEmpty()}
940
942
  `}renderSwitchToRelatives(){return Se.html`
@@ -942,7 +944,7 @@
942
944
  <ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
943
945
  ${this.renderChip(!0)}
944
946
  <ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
945
- ${(0,Ku.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
947
+ ${(0,ju.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
946
948
  </ft-floating-menu>
947
949
  </div>
948
950
  `}renderChip(e=!1){var r,i,n,s,o,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((i=this.flatMetadata)===null||i===void 0?void 0:i.displayValue),c=`${this.metadataLabel}: ${(o=(n=this.flatMetadata)===null||n===void 0?void 0:n.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,u=Se.html`
@@ -966,9 +968,9 @@
966
968
  text="${c}">
967
969
  ${u}
968
970
  </ft-tooltip>
969
- `}get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}renderRelativeItem(e,r){var i,n;let s=this.translateValues&&(n=new li((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r;return Se.html`
971
+ `}get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}renderRelativeItem(e,r){var i,n;let s=this.translateValues&&(n=new le.MetadataValueLocalizer((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r;return Se.html`
970
972
  <a part="relative-item-link"
971
- href="${no(e,this.metadataFilters)}"
973
+ href="${io(e,this.metadataFilters)}"
972
974
  @click=${o=>this.addTopicPivotParam(o,e)}>
973
975
  <ft-ripple part="relative-item-ripple"></ft-ripple>
974
976
  <ft-floating-menu-item part="relative-item" value="${s.value}" notFocusable>
@@ -983,51 +985,44 @@
983
985
  display: none !important;
984
986
  }
985
987
  </style>
986
- `: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=Nn((s=no(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?Ee.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new li((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":H,"ft-floating-menu":$,"ft-floating-menu-item":ue,"ft-floating-menu-label":xt,"ft-ripple":N,"ft-tooltip":G};V.styles=yo;le([(0,qe.property)(),(0,Ee.reduxReactive)()],V.prototype,"key",void 0);le([(0,qe.property)({type:Boolean})],V.prototype,"multiLine",void 0);le([(0,qe.property)({type:Boolean})],V.prototype,"useForSwitchingToRelatives",void 0);le([(0,qe.property)({type:Boolean})],V.prototype,"displayLabel",void 0);le([(0,Ee.numberProperty)()],V.prototype,"hierarchicalValueTruncatingLevel",void 0);le([(0,qe.property)({type:Boolean})],V.prototype,"forceTooltip",void 0);le([(0,qe.property)({attribute:!1})],V.prototype,"editorMode",void 0);le([(0,qe.property)({type:Boolean})],V.prototype,"translateValues",void 0);le([(0,Ee.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);le([(0,qe.state)()],V.prototype,"flatMetadata",void 0);le([(0,Ee.redux)({store:"reader"})],V.prototype,"map",void 0);le([(0,Ee.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],V.prototype,"relativeTopicPivotMetadata",void 0);le([(0,qe.state)()],V.prototype,"relatives",void 0);le([(0,Ee.redux)({store:y.name})],V.prototype,"availableContentLocales",void 0);le([(0,Ee.redux)({store:"reader"})],V.prototype,"metadataFilters",void 0);le([Ac(so.properties.itemWithNoValueForSwitchToRelatives())],V.prototype,"noValueMessage",void 0);le([(0,Ee.reduxEventListener)({eventName:Ze.clusteringHelperCreated})],V.prototype,"updateRelatives",null);var Wu={"ft-reader-metadata":V};(0,Gu.customElements)(Wu);})();
988
+ `: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=Ln((s=io(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":H,"ft-floating-menu":$,"ft-floating-menu-item":de,"ft-floating-menu-label":xt,"ft-ripple":N,"ft-tooltip":G};V.styles=go;ce([(0,qe.property)(),(0,le.reduxReactive)()],V.prototype,"key",void 0);ce([(0,qe.property)({type:Boolean})],V.prototype,"multiLine",void 0);ce([(0,qe.property)({type:Boolean})],V.prototype,"useForSwitchingToRelatives",void 0);ce([(0,qe.property)({type:Boolean})],V.prototype,"displayLabel",void 0);ce([(0,le.numberProperty)()],V.prototype,"hierarchicalValueTruncatingLevel",void 0);ce([(0,qe.property)({type:Boolean})],V.prototype,"forceTooltip",void 0);ce([(0,qe.property)({attribute:!1})],V.prototype,"editorMode",void 0);ce([(0,qe.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,qe.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,qe.state)()],V.prototype,"relatives",void 0);ce([(0,le.redux)({store:y.name})],V.prototype,"availableContentLocales",void 0);ce([(0,le.redux)({store:"reader"})],V.prototype,"metadataFilters",void 0);ce([bc(no.properties.itemWithNoValueForSwitchToRelatives())],V.prototype,"noValueMessage",void 0);ce([(0,le.reduxEventListener)({eventName:Ze.clusteringHelperCreated})],V.prototype,"updateRelatives",null);var zu={"ft-reader-metadata":V};(0,qu.customElements)(zu);})();
987
989
  /*! Bundled license information:
988
990
 
989
- lit-html/lit-html.js:
990
- @lit/context/lib/decorators/provide.js:
991
+ .store/lit-html-npm-3.3.3-0f054b825a/package/lit-html.js:
992
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/decorators/provide.js:
991
993
  (**
992
994
  * @license
993
995
  * Copyright 2017 Google LLC
994
996
  * SPDX-License-Identifier: BSD-3-Clause
995
997
  *)
996
998
 
997
- lit-html/static.js:
999
+ .store/lit-html-npm-3.3.3-0f054b825a/package/static.js:
998
1000
  (**
999
1001
  * @license
1000
1002
  * Copyright 2020 Google LLC
1001
1003
  * SPDX-License-Identifier: BSD-3-Clause
1002
1004
  *)
1003
1005
 
1004
- @lit/reactive-element/css-tag.js:
1005
- (**
1006
- * @license
1007
- * Copyright 2019 Google LLC
1008
- * SPDX-License-Identifier: BSD-3-Clause
1009
- *)
1010
-
1011
- @lit/context/lib/context-request-event.js:
1012
- @lit/context/lib/create-context.js:
1013
- @lit/context/lib/controllers/context-consumer.js:
1014
- @lit/context/lib/value-notifier.js:
1015
- @lit/context/lib/controllers/context-provider.js:
1016
- @lit/context/lib/context-root.js:
1006
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/context-request-event.js:
1007
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/create-context.js:
1008
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/controllers/context-consumer.js:
1009
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/value-notifier.js:
1010
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/controllers/context-provider.js:
1011
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/context-root.js:
1017
1012
  (**
1018
1013
  * @license
1019
1014
  * Copyright 2021 Google LLC
1020
1015
  * SPDX-License-Identifier: BSD-3-Clause
1021
1016
  *)
1022
1017
 
1023
- @lit/context/lib/decorators/consume.js:
1018
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/decorators/consume.js:
1024
1019
  (**
1025
1020
  * @license
1026
1021
  * Copyright 2022 Google LLC
1027
1022
  * SPDX-License-Identifier: BSD-3-Clause
1028
1023
  *)
1029
1024
 
1030
- lit-html/directives/if-defined.js:
1025
+ .store/lit-html-npm-3.3.3-0f054b825a/package/directives/if-defined.js:
1031
1026
  (**
1032
1027
  * @license
1033
1028
  * Copyright 2018 Google LLC