@fluid-topics/ft-reader-metadata 2.2.17 → 2.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-reader-metadata.d.ts +2 -0
- package/build/ft-reader-metadata.js +17 -11
- package/build/ft-reader-metadata.light.js +272 -262
- package/build/ft-reader-metadata.min.js +284 -274
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
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`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
}
|
|
@@ -18,122 +18,122 @@
|
|
|
18
18
|
all: unset;
|
|
19
19
|
position: relative;
|
|
20
20
|
}
|
|
21
|
-
`;var
|
|
22
|
-
\f\r]`,
|
|
23
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Go=/'/g,qo=/"/g,Zo=/^(?:script|style|textarea|title)$/i,Dn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Jo=Dn(1),es=Dn(2),ts=Dn(3),pr=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Yo=new WeakMap,ht=mt.createTreeWalker(mt,129);function rs(t,e){if(!Nn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return zo!==void 0?zo.createHTML(e):e}var Ru=(t,e)=>{let r=t.length-1,i=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=ur;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===ur?u[1]==="!--"?s=Ko:u[1]!==void 0?s=Wo:u[2]!==void 0?(Zo.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=ft):u[3]!==void 0&&(s=ft):s===ft?u[0]===">"?(s=n??ur,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?ft:u[3]==='"'?qo:Go):s===qo||s===Go?s=ft:s===Ko||s===Wo?s=ur:(s=ft,n=void 0);let m=s===ft&&t[a+1].startsWith("/>")?" ":"";o+=s===ur?l+Cu:d>=0?(i.push(c),l.slice(0,d)+Xo+l.slice(d)+tt+m):l+tt+(d===-2?a:m)}return[rs(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},fr=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=Ru(e,r);if(this.el=t.createElement(c,i),ht.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=ht.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(Xo)){let p=u[s++],m=n.getAttribute(d).split(tt),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:v[2],strings:m,ctor:v[1]==="."?On:v[1]==="?"?Ln:v[1]==="@"?Pn:Ht}),n.removeAttribute(d)}else d.startsWith(tt)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Zo.test(n.tagName)){let d=n.textContent.split(tt),p=d.length-1;if(p>0){n.textContent=qr?qr.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],Yr()),ht.nextNode(),l.push({type:2,index:++o});n.append(d[p],Yr())}}}else if(n.nodeType===8)if(n.data===Qo)l.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf(tt,d+1))!==-1;)l.push({type:7,index:o}),d+=tt.length-1}o++}}static createElement(e,r){let i=mt.createElement("template");return i.innerHTML=e,i}};function Bt(t,e,r=t,i){if(e===pr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=dr(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(t),n._$AT(t,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(e=Bt(t,n._$AS(t,e.values),n,i)),e}var Rn=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??mt).importNode(r,!0);ht.currentNode=n;let o=ht.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Xr(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new In(o,this,e)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=ht.nextNode(),s++)}return ht.currentNode=mt,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++}},Xr=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,n){this.type=2,this._$AH=K,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=Bt(this,e,r),dr(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==pr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):wu(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!==K&&dr(this._$AH)?this._$AA.nextSibling.data=e:this.T(mt.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=fr.createElement(rs(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new Rn(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=Yo.get(e.strings);return r===void 0&&Yo.set(e.strings,r=new fr(e)),r}k(e){Nn(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of e)n===r.length?r.push(i=new t(this.O(Yr()),this.O(Yr()),this,this.options)):i=r[n],i._$AI(o),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=jo(e).nextSibling;jo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Ht=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,n,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(e,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)e=Bt(this,e,r,0),s=!dr(e)||e!==this._$AH&&e!==pr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Bt(this,a[i+l],r,l),c===pr&&(c=this._$AH[l]),s||=!dr(c)||c!==this._$AH[l],c===K?e=K:e!==K&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(e)}j(e){e===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},On=class extends Ht{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}},Ln=class extends Ht{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}},Pn=class extends Ht{constructor(e,r,i,n,o){super(e,r,i,n,o),this.type=5}_$AI(e,r=this){if((e=Bt(this,e,r,0)??K)===pr)return;let i=this._$AH,n=e===K&&i!==K||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==K&&(i===K||n);n&&this.element.removeEventListener(this.name,this,i),o&&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)}},In=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){Bt(this,e)}};var Ou=Mn.litHtmlPolyfillSupport;Ou?.(fr,Xr),(Mn.litHtmlVersions??=[]).push("3.3.3");var ns=Symbol.for(""),Lu=t=>{if(t?.r===ns)return t?._$litStatic$},kn=t=>({_$litStatic$:t,r:ns});var is=new Map,Un=t=>(e,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=e[c];c<i&&(o=r[c],(n=Lu(o))!==void 0);)l+=n+e[++c],u=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(e[i]),u){let d=s.join("$$lit$$");(e=is.get(d))===void 0&&(s.raw=s,is.set(d,e=s)),r=a}return t(e,...r)},$n=Un(Jo),Ep=Un(es),Sp=Un(ts);var Fn=f(G()),vs=f(S());var Te;(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"})(Te||(Te={}));var Ce=f(P()),h=f(S()),os=h.FtCssVariableFactory.extend("--ft-typography-font-family","",h.designSystemVariables.titleFont),qe=h.FtCssVariableFactory.extend("--ft-typography-font-family","",h.designSystemVariables.contentFont),x={fontFamily:qe,fontSize:h.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:h.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:h.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:h.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:h.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:h.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},gt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-title-font-family","",os),fontSize:h.FtCssVariableFactory.extend("--ft-typography-title-font-size","",x.fontSize,"20px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",x.letterSpacing,"0.15px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-title-line-height","",x.lineHeight,"1.2"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",x.textDecoration,"inherit")},yt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",os),fontSize:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",x.letterSpacing,"0.105px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",x.lineHeight,"1.7"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",x.textDecoration,"inherit")},vt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",x.fontSize,"16px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",x.fontWeight,"600"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",x.letterSpacing,"0.144px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",x.lineHeight,"1.5"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",x.textDecoration,"inherit")},xt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",x.letterSpacing,"0.098px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",x.lineHeight,"1.7"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",x.textDecoration,"inherit")},bt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",x.fontSize,"16px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",x.letterSpacing,"0.496px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",x.lineHeight,"1.5"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",x.textDecoration,"inherit")},ve={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",x.letterSpacing,"0.252px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",x.lineHeight,"1.4"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",x.textDecoration,"inherit")},Et={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",x.fontSize,"12px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",x.letterSpacing,"0.396px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",x.lineHeight,"1.33"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",x.textDecoration,"inherit")},St={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",x.fontSize,"10px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",x.letterSpacing,"0.33px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",x.lineHeight,"1.6"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",x.textDecoration,"inherit")},At={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",x.fontSize,"10px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",x.letterSpacing,"1.5px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",x.lineHeight,"1.6"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",x.textTransform,"uppercase"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",x.textDecoration,"inherit")},Ie={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-button-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-button-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",x.fontWeight,"600"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",x.letterSpacing,"1.246px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-button-line-height","",x.lineHeight,"1.15"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",x.textTransform,"uppercase"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",x.textDecoration,"inherit")},ss=Ce.css`
|
|
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`
|
|
24
24
|
.ft-typography--title {
|
|
25
|
-
font-family: ${
|
|
26
|
-
font-size: ${
|
|
27
|
-
font-weight: ${
|
|
28
|
-
letter-spacing: ${
|
|
29
|
-
line-height: ${
|
|
30
|
-
text-transform: ${
|
|
31
|
-
text-decoration: ${
|
|
32
|
-
}
|
|
33
|
-
`,
|
|
25
|
+
font-family: ${Tt.fontFamily};
|
|
26
|
+
font-size: ${Tt.fontSize};
|
|
27
|
+
font-weight: ${Tt.fontWeight};
|
|
28
|
+
letter-spacing: ${Tt.letterSpacing};
|
|
29
|
+
line-height: ${Tt.lineHeight};
|
|
30
|
+
text-transform: ${Tt.textTransform};
|
|
31
|
+
text-decoration: ${Tt.textDecoration};
|
|
32
|
+
}
|
|
33
|
+
`,Fo=Me.css`
|
|
34
34
|
.ft-typography--title-dense {
|
|
35
|
-
font-family: ${
|
|
36
|
-
font-size: ${
|
|
37
|
-
font-weight: ${
|
|
38
|
-
letter-spacing: ${
|
|
39
|
-
line-height: ${
|
|
40
|
-
text-transform: ${
|
|
41
|
-
text-decoration: ${
|
|
42
|
-
}
|
|
43
|
-
`,
|
|
35
|
+
font-family: ${_t.fontFamily};
|
|
36
|
+
font-size: ${_t.fontSize};
|
|
37
|
+
font-weight: ${_t.fontWeight};
|
|
38
|
+
letter-spacing: ${_t.letterSpacing};
|
|
39
|
+
line-height: ${_t.lineHeight};
|
|
40
|
+
text-transform: ${_t.textTransform};
|
|
41
|
+
text-decoration: ${_t.textDecoration};
|
|
42
|
+
}
|
|
43
|
+
`,Uo=Me.css`
|
|
44
44
|
.ft-typography--subtitle1 {
|
|
45
|
-
font-family: ${
|
|
46
|
-
font-size: ${
|
|
47
|
-
font-weight: ${
|
|
48
|
-
letter-spacing: ${
|
|
49
|
-
line-height: ${
|
|
50
|
-
text-transform: ${
|
|
51
|
-
text-decoration: ${
|
|
52
|
-
}
|
|
53
|
-
|
|
45
|
+
font-family: ${Ct.fontFamily};
|
|
46
|
+
font-size: ${Ct.fontSize};
|
|
47
|
+
font-weight: ${Ct.fontWeight};
|
|
48
|
+
letter-spacing: ${Ct.letterSpacing};
|
|
49
|
+
line-height: ${Ct.lineHeight};
|
|
50
|
+
text-transform: ${Ct.textTransform};
|
|
51
|
+
text-decoration: ${Ct.textDecoration};
|
|
52
|
+
}
|
|
53
|
+
`,$o=Me.css`
|
|
54
54
|
.ft-typography--subtitle2 {
|
|
55
|
-
font-family: ${
|
|
56
|
-
font-size: ${
|
|
57
|
-
font-weight: ${
|
|
58
|
-
letter-spacing: ${
|
|
59
|
-
line-height: ${
|
|
60
|
-
text-transform: ${
|
|
61
|
-
text-decoration: ${
|
|
55
|
+
font-family: ${wt.fontFamily};
|
|
56
|
+
font-size: ${wt.fontSize};
|
|
57
|
+
font-weight: ${wt.fontWeight};
|
|
58
|
+
letter-spacing: ${wt.letterSpacing};
|
|
59
|
+
line-height: ${wt.lineHeight};
|
|
60
|
+
text-transform: ${wt.textTransform};
|
|
61
|
+
text-decoration: ${wt.textDecoration};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
`,
|
|
64
|
+
`,Bo=Me.css`
|
|
65
65
|
.ft-typography--body1 {
|
|
66
|
-
font-family: ${
|
|
67
|
-
font-size: ${
|
|
68
|
-
font-weight: ${
|
|
69
|
-
letter-spacing: ${
|
|
70
|
-
line-height: ${
|
|
71
|
-
text-transform: ${
|
|
72
|
-
text-decoration: ${
|
|
73
|
-
}
|
|
74
|
-
`,
|
|
66
|
+
font-family: ${Rt.fontFamily};
|
|
67
|
+
font-size: ${Rt.fontSize};
|
|
68
|
+
font-weight: ${Rt.fontWeight};
|
|
69
|
+
letter-spacing: ${Rt.letterSpacing};
|
|
70
|
+
line-height: ${Rt.lineHeight};
|
|
71
|
+
text-transform: ${Rt.textTransform};
|
|
72
|
+
text-decoration: ${Rt.textDecoration};
|
|
73
|
+
}
|
|
74
|
+
`,Ho=Me.css`
|
|
75
75
|
.ft-typography--body2 {
|
|
76
|
-
font-family: ${
|
|
77
|
-
font-size: ${
|
|
78
|
-
font-weight: ${
|
|
79
|
-
letter-spacing: ${
|
|
80
|
-
line-height: ${
|
|
81
|
-
text-transform: ${
|
|
82
|
-
text-decoration: ${
|
|
83
|
-
}
|
|
84
|
-
`,
|
|
76
|
+
font-family: ${Ae.fontFamily};
|
|
77
|
+
font-size: ${Ae.fontSize};
|
|
78
|
+
font-weight: ${Ae.fontWeight};
|
|
79
|
+
letter-spacing: ${Ae.letterSpacing};
|
|
80
|
+
line-height: ${Ae.lineHeight};
|
|
81
|
+
text-transform: ${Ae.textTransform};
|
|
82
|
+
text-decoration: ${Ae.textDecoration};
|
|
83
|
+
}
|
|
84
|
+
`,Vo=Me.css`
|
|
85
85
|
.ft-typography--caption {
|
|
86
|
-
font-family: ${
|
|
87
|
-
font-size: ${
|
|
88
|
-
font-weight: ${
|
|
89
|
-
letter-spacing: ${
|
|
90
|
-
line-height: ${
|
|
91
|
-
text-transform: ${
|
|
92
|
-
text-decoration: ${
|
|
93
|
-
}
|
|
94
|
-
`,
|
|
86
|
+
font-family: ${Ot.fontFamily};
|
|
87
|
+
font-size: ${Ot.fontSize};
|
|
88
|
+
font-weight: ${Ot.fontWeight};
|
|
89
|
+
letter-spacing: ${Ot.letterSpacing};
|
|
90
|
+
line-height: ${Ot.lineHeight};
|
|
91
|
+
text-transform: ${Ot.textTransform};
|
|
92
|
+
text-decoration: ${Ot.textDecoration};
|
|
93
|
+
}
|
|
94
|
+
`,jo=Me.css`
|
|
95
95
|
.ft-typography--breadcrumb {
|
|
96
|
-
font-family: ${
|
|
97
|
-
font-size: ${
|
|
98
|
-
font-weight: ${
|
|
99
|
-
letter-spacing: ${
|
|
100
|
-
line-height: ${
|
|
101
|
-
text-transform: ${
|
|
102
|
-
text-decoration: ${
|
|
103
|
-
}
|
|
104
|
-
`,
|
|
96
|
+
font-family: ${It.fontFamily};
|
|
97
|
+
font-size: ${It.fontSize};
|
|
98
|
+
font-weight: ${It.fontWeight};
|
|
99
|
+
letter-spacing: ${It.letterSpacing};
|
|
100
|
+
line-height: ${It.lineHeight};
|
|
101
|
+
text-transform: ${It.textTransform};
|
|
102
|
+
text-decoration: ${It.textDecoration};
|
|
103
|
+
}
|
|
104
|
+
`,zo=Me.css`
|
|
105
105
|
.ft-typography--overline {
|
|
106
|
-
font-family: ${
|
|
107
|
-
font-size: ${
|
|
108
|
-
font-weight: ${
|
|
109
|
-
letter-spacing: ${
|
|
110
|
-
line-height: ${
|
|
111
|
-
text-transform: ${
|
|
112
|
-
text-decoration: ${
|
|
113
|
-
}
|
|
114
|
-
`,
|
|
106
|
+
font-family: ${Mt.fontFamily};
|
|
107
|
+
font-size: ${Mt.fontSize};
|
|
108
|
+
font-weight: ${Mt.fontWeight};
|
|
109
|
+
letter-spacing: ${Mt.letterSpacing};
|
|
110
|
+
line-height: ${Mt.lineHeight};
|
|
111
|
+
text-transform: ${Mt.textTransform};
|
|
112
|
+
text-decoration: ${Mt.textDecoration};
|
|
113
|
+
}
|
|
114
|
+
`,qo=Me.css`
|
|
115
115
|
.ft-typography--button {
|
|
116
|
-
font-family: ${
|
|
117
|
-
font-size: ${
|
|
118
|
-
font-weight: ${
|
|
119
|
-
letter-spacing: ${
|
|
120
|
-
line-height: ${
|
|
121
|
-
text-transform: ${
|
|
122
|
-
text-decoration: ${
|
|
123
|
-
}
|
|
124
|
-
`,
|
|
116
|
+
font-family: ${$e.fontFamily};
|
|
117
|
+
font-size: ${$e.fontSize};
|
|
118
|
+
font-weight: ${$e.fontWeight};
|
|
119
|
+
letter-spacing: ${$e.letterSpacing};
|
|
120
|
+
line-height: ${$e.lineHeight};
|
|
121
|
+
text-transform: ${$e.textTransform};
|
|
122
|
+
text-decoration: ${$e.textDecoration};
|
|
123
|
+
}
|
|
124
|
+
`,Ko=Me.css`
|
|
125
125
|
.ft-typography {
|
|
126
126
|
vertical-align: inherit;
|
|
127
127
|
}
|
|
128
|
-
`;var
|
|
129
|
-
<${
|
|
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)}
|
|
130
130
|
part="text"
|
|
131
131
|
class="ft-typography ft-typography--${this.variant}">
|
|
132
132
|
<slot></slot>
|
|
133
|
-
</${
|
|
134
|
-
|
|
133
|
+
</${cs(this.element)}>
|
|
134
|
+
`:ds`
|
|
135
135
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
136
|
-
`}};
|
|
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`
|
|
137
137
|
.ft-tooltip--container {
|
|
138
138
|
display: block;
|
|
139
139
|
}
|
|
@@ -151,28 +151,28 @@
|
|
|
151
151
|
box-sizing: border-box;
|
|
152
152
|
overflow: hidden;
|
|
153
153
|
width: max-content;
|
|
154
|
-
max-width: ${
|
|
154
|
+
max-width: ${Cr.maxWidth};
|
|
155
155
|
text-align: center;
|
|
156
|
-
padding: ${
|
|
156
|
+
padding: ${Cr.distance};
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
.ft-tooltip--content {
|
|
160
160
|
padding: 4px 8px;
|
|
161
|
-
border-radius: ${
|
|
162
|
-
background-color: ${
|
|
163
|
-
color: ${
|
|
161
|
+
border-radius: ${Cr.borderRadiusS};
|
|
162
|
+
background-color: ${Cr.backgroundColor};
|
|
163
|
+
color: ${Cr.color};
|
|
164
164
|
position: relative;
|
|
165
165
|
word-break: break-word;
|
|
166
166
|
}
|
|
167
|
-
`;var _s=["top","right","bottom","left"],As=["start","end"],Hn=_s.reduce((t,e)=>t.concat(e,e+"-"+As[0],e+"-"+As[1]),[]),mr=Math.min,it=Math.max,gr=Math.round;var Fe=t=>({x:t,y:t}),Pu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ts(t,e,r){return it(t,mr(e,r))}function Qr(t,e){return typeof t=="function"?t(e):t}function yr(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function Vn(t){return t==="x"?"y":"x"}function jn(t){return t==="y"?"height":"width"}function Zr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function zn(t){return Vn(Zr(t))}function Cs(t,e,r){r===void 0&&(r=!1);let i=nt(t),n=zn(t),o=jn(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Bn(s)),[s,Bn(s)]}function ws(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Bn(t){let e=yr(t);return Pu[e]+t.slice(e.length)}function Iu(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 Rs(t){return typeof t!="number"?Iu(t):{top:t,right:t,bottom:t,left:t}}function _t(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 Os(t,e,r){let{reference:i,floating:n}=t,o=Zr(e),s=zn(e),a=jn(s),l=yr(e),c=o==="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 v=nt(e);return v&&(m[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),m}async function Ls(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=Qr(e,t),v=Rs(m),y=a[p?d==="floating"?"reference":"floating":d],_=_t(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),L=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},O=_t(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:L,offsetParent:E,strategy:l}):L);return{top:(_.top-O.top+v.top)/C.y,bottom:(O.bottom-_.bottom+v.bottom)/C.y,left:(_.left-O.left+v.left)/C.x,right:(O.right-_.right+v.right)/C.x}}var Mu=50,Ps=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ls},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Os(c,i,l),p=i,m=0,v={};for(let A=0;A<o.length;A++){let y=o[A];if(!y)continue;let{name:_,fn:L}=y,{x:E,y:C,data:O,reset:V}=await L({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:t,floating:e}});u=E??u,d=C??d,v[_]={...v[_],...O},V&&m<Mu&&(m++,typeof V=="object"&&(V.placement&&(p=V.placement),V.rects&&(c=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):V.rects),{x:u,y:d}=Os(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Nu(t,e,r){return(t?[...r.filter(n=>nt(n)===t),...r.filter(n=>nt(n)!==t)]:r.filter(n=>yr(n)===n)).filter(n=>t?nt(n)===t||(e?ws(n)!==n:!1):!0)}var Is=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=Hn,autoAlignment:m=!0,...v}=Qr(t,e),A=d!==void 0||p===Hn?Nu(d||null,m,p):p,y=((r=s.autoPlacement)==null?void 0:r.index)||0,_=A[y];if(_==null)return{};if(a!==_)return{reset:{placement:A[0]}};let L=await l.detectOverflow(e,v),E=Cs(_,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[L[yr(_)],L[E[0]],L[E[1]]],O=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:_,overflows:C}],V=A[y+1];if(V)return{data:{index:y+1,overflows:O},reset:{placement:V}};let D=O.map(_e=>{let pt=nt(_e.placement);return[_e.placement,pt&&u?_e.overflows.slice(0,2).reduce((gu,yu)=>gu+yu,0):_e.overflows[0],_e.overflows]}).sort((_e,pt)=>_e[1]-pt[1]),cr=((n=D.filter(_e=>_e[2].slice(0,nt(_e[0])?2:3).every(pt=>pt<=0))[0])==null?void 0:n[0])||D[0][0];return cr!==a?{data:{index:y+1,overflows:O},reset:{placement:cr}}:{}}}};var Ms=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:L=>{let{x:E,y:C}=L;return{x:E,y:C}}},...c}=Qr(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=Zr(n),m=Vn(p),v=u[m],A=u[p],y=(L,E)=>Ts(E+d[L==="y"?"top":"left"],E,E-d[L==="y"?"bottom":"right"]);s&&(v=y(m,v)),a&&(A=y(p,A));let _=l.fn({...e,[m]:v,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[m]:s,[p]:a}}}}}};function ei(){return typeof window<"u"}function Ct(t){return Ds(t)?(t.nodeName||"").toLowerCase():"#document"}function pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ye(t){var e;return(e=(Ds(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ds(t){return ei()?t instanceof Node||t instanceof pe(t).Node:!1}function Me(t){return ei()?t instanceof Element||t instanceof pe(t).Element:!1}function Xe(t){return ei()?t instanceof HTMLElement||t instanceof pe(t).HTMLElement:!1}function Ns(t){return!ei()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pe(t).ShadowRoot}function vr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=Ne(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ks(t){return/^(table|td|th)$/.test(Ct(t))}function xr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Du=/transform|translate|scale|rotate|perspective|filter/,ku=/paint|layout|strict|content/,Tt=t=>!!t&&t!=="none",Kn;function Vt(t){let e=Me(t)?Ne(t):t;return Tt(e.transform)||Tt(e.translate)||Tt(e.scale)||Tt(e.rotate)||Tt(e.perspective)||!ti()&&(Tt(e.backdropFilter)||Tt(e.filter))||Du.test(e.willChange||"")||ku.test(e.contain||"")}function Us(t){let e=ot(t);for(;Xe(e)&&!jt(e);){if(Vt(e))return e;if(xr(e))return null;e=ot(e)}return null}function ti(){return Kn==null&&(Kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kn}function jt(t){return/^(html|body|#document)$/.test(Ct(t))}function Ne(t){return pe(t).getComputedStyle(t)}function br(t){return Me(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ns(t)&&t.host||Ye(t);return Ns(e)?e.host:e}function $s(t){let e=ot(t);return jt(e)?(t.ownerDocument||t).body:Xe(e)&&vr(e)?e:$s(e)}function Jr(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=$s(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=pe(n);if(o){let a=ri(s);return e.concat(s,s.visualViewport||[],vr(n)?n:[],a&&r?Jr(a):[])}else return e.concat(n,Jr(n,[],r))}function ri(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hs(t){let e=Ne(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=Xe(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=gr(r)!==o||gr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Vs(t){return Me(t)?t:t.contextElement}function zt(t){let e=Vs(t);if(!Xe(e))return Fe(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=Hs(e),s=(o?gr(r.width):r.width)/i,a=(o?gr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Uu=Fe(0);function js(t){let e=pe(t);return!ti()||!e.visualViewport?Uu:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $u(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===pe(t)}function Er(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=Vs(t),s=Fe(1);e&&(i?Me(i)&&(s=zt(i)):s=zt(t));let a=$u(o,r,i)?js(o):Fe(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o&&i){let p=pe(o),m=Me(i)?pe(i):i,v=p,A=ri(v);for(;A&&m!==v;){let y=zt(A),_=A.getBoundingClientRect(),L=Ne(A),E=_.left+(A.clientLeft+parseFloat(L.paddingLeft))*y.x,C=_.top+(A.clientTop+parseFloat(L.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=E,c+=C,v=pe(A),A=ri(v)}}return _t({width:u,height:d,x:l,y:c})}function ii(t,e){let r=br(t).scrollLeft;return e?e.left+r:Er(Ye(t)).left+r}function zs(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ii(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Fu(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=Ye(i),a=e?xr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Fe(1),u=Fe(0),d=Xe(i);if((d||!o)&&((Ct(i)!=="body"||vr(s))&&(l=br(i)),d)){let m=Er(i);c=zt(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=s&&!d&&!o?zs(s,l):Fe(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 Bu(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Hu(t){let e=br(t),r=t.ownerDocument.body,i=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+ii(t),s=-e.scrollTop;return Ne(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Vu=25;function ju(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=pe(t),o=Ye(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!ti()||e==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(ii(o)<=0){let p=o.ownerDocument,m=p.body,v=getComputedStyle(m),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(o.clientWidth-m.clientWidth-A),_=getComputedStyle(o).scrollbarGutter==="stable both-edges"?y/2:y;_<=Vu&&(a-=_)}return{width:a,height:l,x:c,y:u}}function zu(t,e){let r=Er(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=zt(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Fs(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=ju(t,r,e);else if(e==="document")i=Hu(Ye(t));else if(Me(e))i=zu(e,r);else{let n=js(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return _t(i)}function Ku(t,e){let r=e.get(t);if(r)return r;let i=Jr(t,[],!1).filter(a=>Me(a)&&Ct(a)!=="body"),n=null,o=Ne(t).position==="fixed",s=o?ot(t):t;for(;Me(s)&&!jt(s);){let a=Ne(s),l=Vt(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(d=>d!==s):n=a,s=ot(s)}return e.set(t,i),i}function Wu(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?xr(e)?[]:Ku(e,this._c):[].concat(r),i],a=Fs(e,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let m=Fs(e,s[p],n);l=it(m.top,l),c=mr(m.right,c),u=mr(m.bottom,u),d=it(m.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Gu(t){let{width:e,height:r}=Hs(t);return{width:e,height:r}}function qu(t,e,r){let i=Xe(e),n=Ye(e),o=r==="fixed",s=Er(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Fe(0);if((i||!o)&&((Ct(e)!=="body"||vr(n))&&(a=br(e)),i)){let p=Er(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=ii(n));let c=n&&!i&&!o?zs(n,a):Fe(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Wn(t){return Ne(t).position==="static"}function Bs(t,e){if(!Xe(t)||Ne(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ye(t)===r&&(r=r.ownerDocument.body),r}function Ks(t,e){let r=pe(t);if(xr(t))return r;if(!Xe(t)){let n=ot(t);for(;n&&!jt(n);){if(Me(n)&&!Wn(n))return n;n=ot(n)}return r}let i=Bs(t,e);for(;i&&ks(i)&&Wn(i);)i=Bs(i,e);return i&&jt(i)&&Wn(i)&&!Vt(i)?r:i||Us(t)||r}var Yu=async function(t){let e=this.getOffsetParent||Ks,r=this.getDimensions,i=await r(t.floating);return{reference:qu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Xu(t){return Ne(t).direction==="rtl"}var ni={convertOffsetParentRelativeRectToViewportRelativeRect:Fu,getDocumentElement:Ye,getClippingRect:Wu,getOffsetParent:Ks,getElementRects:Yu,getClientRects:Bu,getDimensions:Gu,getScale:zt,isElement:Me,isRTL:Xu};var Ws=Is,Gs=Ms;var qs=(t,e,r)=>{let i=new Map,n=r??{},o={...ni,...n.platform,_c:i};return Ps(t,e,{...n,platform:o})};function Ys(t){return Qu(t)}function Gn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Qu(t){for(let e=t;e;e=Gn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Gn(t);e;e=Gn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Vt(r)||e.tagName==="BODY"))return e}return null}async function oi(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},qs(t,e,{strategy:i.strategy,platform:{...ni,getOffsetParent:n=>ni.getOffsetParent(n,Ys)},middleware:[Gs({crossAxis:!0}),Ws({allowedPlacements:[i.placement]})]})}var er=f(S());var go=f(G());var Xs=f(G(),1);var qn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Qs(t,e){return(0,Xs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Sr(t);try{return JSON.parse(r)}catch{return Sr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...e??{}})}function Zu(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(!Kt(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(!Kt(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=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Kt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Kt(t,e){try{return Zu(t,e)}catch{return!1}}function Ar(t,e){return!Kt(t,e)}function Sr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function si(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 Zs=f(G(),1);var Yn=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Ar,attribute:!1,...e};(0,Zs.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var ai=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 wt=f(G(),1);var li=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),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ea=f(P(),1);var ci=globalThis,Ju=ci.ShadowRoot&&(ci.ShadyCSS===void 0||ci.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Js=(t,e)=>{if(Ju)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=ci.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var ui=class extends ea.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 Js(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){qn(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 ta(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Gt=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},oa,ra=Symbol("constructorPrototype"),ia=Symbol("constructorName"),sa=Symbol("exportpartsDebouncer"),na=Symbol("dynamicDependenciesLoaded"),Wt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Wt.eventName="exportparts-updated";var Be=class extends ui{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oa]=new li(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[sa].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[ia]=this.constructor.name,this[ra]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ia]&&Object.setPrototypeOf(this,this[ra])}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(Wt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Wt.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 Wt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ta(this.shadowRoot,...o)}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(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,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(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let m=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(y=>y.split(":")[1]))!==null&&a!==void 0?a:[],A=[...m,...v].filter(l).map(y=>y.trim());for(let y of A)u.add(y)}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(", ")}};oa=sa;Gt([(0,wt.property)()],Be.prototype,"exportpartsPrefix",void 0);Gt([Qs([])],Be.prototype,"exportpartsPrefixes",void 0);Gt([(0,wt.property)({reflect:!0})],Be.prototype,"exportparts",void 0);Gt([(0,wt.property)()],Be.prototype,"customStylesheet",void 0);Gt([(0,wt.property)()],Be.prototype,"elementToFocus",void 0);Gt([(0,wt.state)()],Be.prototype,"useAdoptedStyleSheets",void 0);function di(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _r=Symbol("internalReduxEventsUnsubscribers"),st=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),ed=si(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(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Rt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Rt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Rt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[st].has(s.store):this[st].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[st].set(s,a.subscribe(()=>this.updateFromStores())),this[_r].set(s,[]),di(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[_r].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[st].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[st].has(s)&&this[st].get(s)(),this[st].delete(s),(a=this[_r].get(s))===null||a===void 0||a.forEach(l=>l()),this[_r].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=st,r=Rt,i=_r,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),aa=class extends ed(Be){};function J(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 td=typeof Symbol=="function"&&Symbol.observable||"@@observable",la=td,Xn=()=>Math.random().toString(36).substring(7).split("").join("."),rd={INIT:`@@redux/INIT${Xn()}`,REPLACE:`@@redux/REPLACE${Xn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xn()}`},pi=rd;function fi(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 Qn(t,e,r){if(typeof t!="function")throw new Error(J(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(J(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(J(1));return r(Qn)(t,e)}let i=t,n=e,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((y,_)=>{s.set(_,y)}))}function u(){if(l)throw new Error(J(3));return n}function d(y){if(typeof y!="function")throw new Error(J(4));if(l)throw new Error(J(5));let _=!0;c();let L=a++;return s.set(L,y),function(){if(_){if(l)throw new Error(J(6));_=!1,c(),s.delete(L),o=null}}}function p(y){if(!fi(y))throw new Error(J(7));if(typeof y.type>"u")throw new Error(J(8));if(typeof y.type!="string")throw new Error(J(17));if(l)throw new Error(J(9));try{l=!0,n=i(n,y)}finally{l=!1}return(o=s).forEach(L=>{L()}),y}function m(y){if(typeof y!="function")throw new Error(J(10));i=y,p({type:pi.REPLACE})}function v(){let y=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(J(11));function L(){let C=_;C.next&&C.next(u())}return L(),{unsubscribe:y(L)}},[la](){return this}}}return p({type:pi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[la]:v}}function id(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:pi.INIT})>"u")throw new Error(J(12));if(typeof r(void 0,{type:pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(J(13))})}function ca(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),n,o;try{id(r)}catch(s){o=s}return function(a={},l){if(o)throw o;let c=!1,u={};for(let d=0;d<i.length;d++){let p=i[d],m=r[p],v=a[p],A=m(v,l);if(typeof A>"u"){let y=l&&l.type;throw new Error(J(14))}u[p]=A,c=c||A!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Tr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function ua(...t){return e=>(r,i)=>{let n=e(r,i),o=()=>{throw new Error(J(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Tr(...a)(n.dispatch),{...n,dispatch:o}}}function da(t){return fi(t)&&"type"in t&&typeof t.type=="string"}var ba=Symbol.for("immer-nothing"),pa=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function De(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var xe=Object,Yt=xe.getPrototypeOf,yi="constructor",Ai="prototype",to="configurable",vi="enumerable",mi="writable",Cr="value",He=t=>!!t&&!!t[ie];function be(t){return t?Ea(t)||Ti(t)||!!t[pa]||!!t[yi]?.[pa]||Ci(t)||wi(t):!1}var nd=xe[Ai][yi].toString(),fa=new WeakMap;function Ea(t){if(!t||!co(t))return!1;let e=Yt(t);if(e===null||e===xe[Ai])return!0;let r=xe.hasOwnProperty.call(e,yi)&&e[yi];if(r===Object)return!0;if(!qt(r))return!1;let i=fa.get(r);return i===void 0&&(i=Function.toString.call(r),fa.set(r,i)),i===nd}function _i(t,e,r=!0){Or(t)===0?(r?Reflect.ownKeys(t):xe.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Or(t){let e=t[ie];return e?e.type_:Ti(t)?1:Ci(t)?2:wi(t)?3:0}var Zn=(t,e,r=Or(t))=>r===2?t.has(e):xe[Ai].hasOwnProperty.call(t,e),ro=(t,e,r=Or(t))=>r===2?t.get(e):t[e],xi=(t,e,r,i=Or(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function od(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Ti=Array.isArray,Ci=t=>t instanceof Map,wi=t=>t instanceof Set,co=t=>typeof t=="object",qt=t=>typeof t=="function",Jn=t=>typeof t=="boolean";function sd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Qe=t=>t.copy_||t.base_;var uo=t=>t.modified_?t.copy_:t.base_;function io(t,e){if(Ci(t))return new Map(t);if(wi(t))return new Set(t);if(Ti(t))return Array[Ai].slice.call(t);let r=Ea(t);if(e===!0||e==="class_only"&&!r){let i=xe.getOwnPropertyDescriptors(t);delete i[ie];let n=Reflect.ownKeys(i);for(let o=0;o<n.length;o++){let s=n[o],a=i[s];a[mi]===!1&&(a[mi]=!0,a[to]=!0),(a.get||a.set)&&(i[s]={[to]:!0,[mi]:!0,[vi]:a[vi],[Cr]:t[s]})}return xe.create(Yt(t),i)}else{let i=Yt(t);if(i!==null&&r)return{...t};let n=xe.create(i);return xe.assign(n,t)}}function po(t,e=!1){return Ri(t)||He(t)||!be(t)||(Or(t)>1&&xe.defineProperties(t,{set:hi,add:hi,clear:hi,delete:hi}),xe.freeze(t),e&&_i(t,(r,i)=>{po(i,!0)},!1)),t}function ad(){De(2)}var hi={[Cr]:ad};function Ri(t){return t===null||!co(t)?!0:xe.isFrozen(t)}var bi="MapSet",no="Patches",ha="ArrayMethods",Sa={};function Ot(t){let e=Sa[t];return e||De(0,t),e}var ma=t=>!!Sa[t];var wr,Aa=()=>wr,ld=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ma(bi)?Ot(bi):void 0,arrayMethodsPlugin_:ma(ha)?Ot(ha):void 0});function ga(t,e){e&&(t.patchPlugin_=Ot(no),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function oo(t){so(t),t.drafts_.forEach(cd),t.drafts_=null}function so(t){t===wr&&(wr=t.parent_)}var ya=t=>wr=ld(wr,t);function cd(t){let e=t[ie];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function va(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ie].modified_&&(oo(e),De(4)),be(t)&&(t=xa(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ie].base_,t,e)}else t=xa(e,r);return ud(e,t,!0),oo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ba?t:void 0}function xa(t,e){if(Ri(e))return e;let r=e[ie];if(!r)return Ei(e,t.handledSet_,t);if(!Oi(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);Ca(r,t)}return r.copy_}function ud(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&po(e,r)}function _a(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Oi=(t,e)=>t.scope_===e,dd=[];function Ta(t,e,r,i){let n=Qe(t),o=t.type_;if(i!==void 0&&ro(n,i,o)===e){xi(n,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;_i(n,(l,c)=>{if(He(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??dd;for(let a of s)xi(n,a,r,o)}function pd(t,e,r){t.callbacks_.push(function(n){let o=e;if(!o||!Oi(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=uo(o);Ta(t,o.draft_??o,s,r),Ca(o,n)})}function Ca(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)}_a(t)}}function fd(t,e,r){let{scope_:i}=t;if(He(r)){let n=r[ie];Oi(n,i)&&n.callbacks_.push(function(){gi(t);let s=uo(n);Ta(t,r,s,e)})}else be(r)&&t.callbacks_.push(function(){let o=Qe(t);t.type_===3?o.has(r)&&Ei(r,i.handledSet_,i):ro(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ei(ro(t.copy_,e,t.type_),i.handledSet_,i)})}function Ei(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||He(t)||e.has(t)||!be(t)||Ri(t)||(e.add(t),_i(t,(i,n)=>{if(He(n)){let o=n[ie];if(Oi(o,r)){let s=uo(o);xi(t,i,s,t.type_),_a(o)}}else be(n)&&Ei(n,e,r)})),t}function hd(t,e){let r=Ti(t),i={type_:r?1:0,scope_:e?e.scope_:Aa(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=i,o=Si;r&&(n=[i],o=Rr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return i.draft_=a,i.revoke_=s,[a,i]}var Si={get(t,e){if(e===ie)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=Qe(t);if(!Zn(n,e,t.type_))return gd(t,n,e);let o=n[e];if(t.finalized_||!be(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&sd(e))return o;if(o===eo(t.base_,e)||md(t,e,o)){gi(t);let s=t.type_===1?+e:e,a=lo(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Qe(t)},ownKeys(t){return Reflect.ownKeys(Qe(t))},set(t,e,r){let i=wa(Qe(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=eo(Qe(t),e),o=n?.[ie];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(od(r,n)&&(r!==void 0||Zn(t.base_,e,t.type_)))return!0;gi(t),ao(t)}return t.copy_[e]===r&&(r!==void 0||Zn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),fd(t,e,r)),!0},deleteProperty(t,e){return gi(t),eo(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ao(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Qe(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[mi]:!0,[to]:t.type_!==1||e!=="length",[vi]:i[vi],[Cr]:r[e]}},defineProperty(){De(11)},getPrototypeOf(t){return Yt(t.base_)},setPrototypeOf(){De(12)}},Rr={};for(let t in Si){let e=Si[t];Rr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Rr.deleteProperty=function(t,e){return Rr.set.call(this,t,e,void 0)};Rr.set=function(t,e,r){return Si.set.call(this,t[0],e,r,t[0])};function eo(t,e){let r=t[ie];return(r?Qe(r):t)[e]}function md(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!be(r)||r[ie]?!1:t.baseRefs_.has(r)}function gd(t,e,r){let i=wa(e,r);return i?Cr in i?i[Cr]:i.get?.call(t.draft_):void 0}function wa(t,e){if(!(e in t))return;let r=Yt(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Yt(r)}}function ao(t){t.modified_||(t.modified_=!0,t.parent_&&ao(t.parent_))}function gi(t){t.copy_||(t.assigned_=new Map,t.copy_=io(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var yd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(qt(e)&&!qt(r)){let o=r;r=e;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}qt(r)||De(6),i!==void 0&&!qt(i)&&De(7);let n;if(be(e)){let o=ya(this),s=lo(o,e,void 0),a=!0;try{n=r(s),a=!1}finally{a?oo(o):so(o)}return ga(o,i),va(n,o)}else if(!e||!co(e)){if(n=r(e),n===void 0&&(n=e),n===ba&&(n=void 0),this.autoFreeze_&&po(n,!0),i){let o=[],s=[];Ot(no).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),i(o,s)}return n}else De(1,e)},this.produceWithPatches=(e,r)=>{if(qt(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let i,n;return[this.produce(e,r,(s,a)=>{i=s,n=a}),i,n]},Jn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Jn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Jn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){be(t)||De(8),He(t)&&(t=Ra(t));let e=ya(this),r=lo(e,t,void 0);return r[ie].isManual_=!0,so(e),r}finishDraft(t,e){let r=t&&t[ie];(!r||!r.isManual_)&&De(9);let{scope_:i}=r;return ga(i,e),va(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=Ot(no).applyPatches_;return He(t)?i(t,e):this.produce(t,n=>i(n,e))}};function lo(t,e,r,i){let[n,o]=Ci(e)?Ot(bi).proxyMap_(e,r):wi(e)?Ot(bi).proxySet_(e,r):hd(e,r);return(r?.scope_??Aa()).drafts_.push(n),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?pd(r,o,i):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),n}function Ra(t){return He(t)||De(10,t),Oa(t)}function Oa(t){if(!be(t)||Ri(t))return t;let e=t[ie],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=io(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=io(t,!0);return _i(r,(n,o)=>{xi(r,n,Oa(o))},i),e&&(e.finalized_=!1),r}var vd=globalThis.Iterator,Ff=typeof vd?.from=="function";var xd=new yd,fo=xd.produce;function La(t){return({dispatch:r,getState:i})=>n=>o=>typeof o=="function"?o(r,i,t):n(o)}var Pa=La(),Ia=La;var bd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Wf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Ed=t=>t&&typeof t.match=="function";function at(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Ze(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=>da(i)&&i.type===t,r}var Ua=class Lr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Lr.prototype)}static get[Symbol.species](){return Lr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Lr(...e[0].concat(this)):new Lr(...e.concat(this))}};function Ma(t){return be(t)?fo(t,()=>{}):t}function Li(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Sd(t){return typeof t=="boolean"}var Ad=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new Ua;return r&&(Sd(r)?s.push(Pa):s.push(Ia(r.extraArgument))),s},_d="RTK_autoBatch";var Na=t=>e=>{setTimeout(e,t)},Td=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=t(n),s=setTimeout(n,e)},Cd=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Td(window.requestAnimationFrame,100):Na(10):t.type==="callback"?t.queueNotification:Na(t.timeout),c=()=>{s=!1,o&&(o=!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?.[_d],o=!n,o&&(s||(s=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},wd=t=>function(r){let{autoBatch:i=!0}=r??{},n=new Ua(t);return i&&n.push(Cd(typeof i=="object"?i:void 0)),n};function $a(t){let e=Ad(),{reducer:r=void 0,middleware:i,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(fi(r))l=ca(r);else throw new Error(Ze(1));let c;typeof i=="function"?c=i(e):c=e();let u=Tr;n&&(u=bd({trace:!1,...typeof n=="object"&&n}));let d=ua(...c),p=wd(d),m=typeof a=="function"?a(p):p(),v=u(...m);return Qn(l,s,v)}function Fa(t){let e={},r=[],i,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Ze(28));if(a in e)throw new Error(Ze(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase(o){return i=o,n}};return t(n),[e,r,i]}function Rd(t){return typeof t=="function"}function Od(t,e){let[r,i,n]=Fa(e),o;if(Rd(t))o=()=>Ma(t());else{let a=Ma(t);o=()=>a}function s(a=o(),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(He(u)){let m=d(u,l);return m===void 0?u:m}else{if(be(u))return fo(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 s.getInitialState=o,s}var Ld=(t,e)=>Ed(t)?t.match(e):t(e);function Pd(...t){return e=>t.some(r=>Ld(r,e))}var Id="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Md=(t=21)=>{let e="",r=t;for(;r--;)e+=Id[Math.random()*64|0];return e},Nd=["name","message","stack","code"],ho=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Da=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Dd=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Nd)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},ka="External signal was aborted",kd=(()=>{function t(e,r,i){let n=at(e+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=at(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=at(e+"/rejected",(l,c,u,d,p)=>({payload:d,error:(i&&i.serializeError||Dd)(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):Md(),v=new AbortController,A,y;function _(E){y=E,v.abort()}c&&(c.aborted?_(ka):c.addEventListener("abort",()=>_(ka),{once:!0}));let L=(async function(){let E;try{let O=i?.condition?.(l,{getState:d,extra:p});if($d(O)&&(O=await O),O===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let V=new Promise((D,j)=>{A=()=>{j({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",A,{once:!0})});u(o(m,l,i?.getPendingMeta?.({requestId:m,arg:l},{getState:d,extra:p}))),E=await Promise.race([V,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:_,rejectWithValue:((D,j)=>new ho(D,j)),fulfillWithValue:((D,j)=>new Da(D,j))})).then(D=>{if(D instanceof ho)throw D;return D instanceof Da?n(D.payload,m,l,D.meta):n(D,m,l)})])}catch(O){E=O instanceof ho?s(null,m,l,O.payload,O.meta):s(O,m,l)}finally{A&&v.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&s.match(E)&&E.meta.condition||u(E),E})();return Object.assign(L,{abort:_,requestId:m,arg:l,unwrap(){return L.then(Ud)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Pd(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Ud(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function $d(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ba=Symbol.for("rtk-slice-createasyncthunk"),qf={[Ba]:kd};function Fd(t,e){return`${t}/${e}`}function Bd({creators:t}={}){let e=t?.asyncThunk?.[Ba];return function(i){let{name:n,reducerPath:o=n}=i;if(!n)throw new Error(Ze(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(Vd()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(E,C){let O=typeof E=="string"?E:E.type;if(!O)throw new Error(Ze(12));if(O in l.sliceCaseReducersByType)throw new Error(Ze(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=s[E],O={reducerName:E,type:Fd(n,E),createNotation:typeof i.reducers=="function"};zd(C)?Wd(O,C,c,e):jd(O,C,c)});function u(){let[E={},C=[],O=void 0]=typeof i.extraReducers=="function"?Fa(i.extraReducers):[i.extraReducers],V={...E,...l.sliceCaseReducersByType};return Od(i.initialState,D=>{for(let j in V)D.addCase(j,V[j]);for(let j of l.sliceMatchers)D.addMatcher(j.matcher,j.reducer);for(let j of C)D.addMatcher(j.matcher,j.reducer);O&&D.addDefaultCase(O)})}let d=E=>E,p=new Map,m=new WeakMap,v;function A(E,C){return v||(v=u()),v(E,C)}function y(){return v||(v=u()),v.getInitialState()}function _(E,C=!1){function O(D){let j=D[E];return typeof j>"u"&&C&&(j=Li(m,O,y)),j}function V(D=d){let j=Li(p,C,()=>new WeakMap);return Li(j,D,()=>{let cr={};for(let[_e,pt]of Object.entries(i.selectors??{}))cr[_e]=Hd(pt,D,()=>Li(m,D,y),C);return cr})}return{reducerPath:E,getSelectors:V,get selectors(){return V(O)},selectSlice:O}}let L={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,..._(o),injectInto(E,{reducerPath:C,...O}={}){let V=C??o;return E.inject({reducerPath:V,reducer:A},O),{...L,..._(V,!0)}}};return L}}function Hd(t,e,r,i){function n(o,...s){let a=e(o);return typeof a>"u"&&i&&(a=r()),t(a,...s)}return n.unwrapped=t,n}var Ha=Bd();function Vd(){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 jd({type:t,reducerName:e,createNotation:r},i,n){let o,s;if("reducer"in i){if(r&&!Kd(i))throw new Error(Ze(17));o=i.reducer,s=i.prepare}else o=i;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?at(t,s):at(t))}function zd(t){return t._reducerDefinitionType==="asyncThunk"}function Kd(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Wd({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Ze(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=r,d=n(t,o,u);i.exposeAction(e,d),s&&i.addCase(d.fulfilled,s),a&&i.addCase(d.pending,a),l&&i.addCase(d.rejected,l),c&&i.addMatcher(d.settled,c),i.exposeCaseReducer(e,{fulfilled:s||Pi,pending:a||Pi,rejected:l||Pi,settled:c||Pi})}function Pi(){}var Va="listener",ja="completed",za="cancelled",Yf=`task-${za}`,Xf=`task-${ja}`,Qf=`${Va}-${za}`,Zf=`${Va}-${ja}`;var{assign:Ka}=Object;var mo="listenerMiddleware";var Gd=Ka(at(`${mo}/add`),{withTypes:()=>Gd}),Jf=at(`${mo}/removeAll`),qd=Ka(at(`${mo}/remove`),{withTypes:()=>qd});function Ze(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 Yd=si(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)}}}),Ii=class extends Yd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Wa=class t extends Ii{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(di(o))return o;if(n==null)return;let s=Ha({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=$a({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Sr(s.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 s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new ai,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{let d=l,p=this.getState()[d];Kt(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 Mi=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?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 Ni=f(S()),Xd="ft-app-info",Ve=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ve.eventName="authentication-change";var Pr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pr.eventName="ui-locale-changed";var Qd={session:(t,e)=>{(0,Ni.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.dispatchEvent(new Ve(e.payload)),0))}},b=Ni.FtReduxStore.get({name:Xd,reducers:Qd,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 Ga=f(S()),Di=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},qa=(0,Ga.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(b)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>Mi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Di([(0,go.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Di([(0,go.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Di([Yn({store:b.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),Di([Yn({store:b.name})],e.prototype,"uiLocale",void 0),e});var Ya;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ya||(Ya={}));var Xa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Xa||(Xa={}));var Qa;(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"})(Qa||(Qa={}));var Za;(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"})(Za||(Za={}));var Ja;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ja||(Ja={}));var el;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(el||(el={}));var ki;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(ki||(ki={}));var tl;(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"})(tl||(tl={}));var rl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(rl||(rl={}));var il;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(il||(il={}));var nl;(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"})(nl||(nl={}));var ol;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ol||(ol={}));var sl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(sl||(sl={}));var al;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(al||(al={}));var ll;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ll||(ll={}));var cl;(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"})(cl||(cl={}));var ul;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ul||(ul={}));var dl;(function(t){t.ASC="ASC",t.DESC="DESC"})(dl||(dl={}));var pl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(pl||(pl={}));var fl;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fl||(fl={}));var hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var Ui;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ui||(Ui={}));var ml;(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"})(ml||(ml={}));var gl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(gl||(gl={}));var yl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(yl||(yl={}));var vl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(vl||(vl={}));var xl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xl||(xl={}));var N;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(N||(N={}));var we;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(we||(we={}));var bl;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(bl||(bl={}));var El;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(El||(El={}));var Sl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Sl||(Sl={}));var Al;(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"})(Al||(Al={}));var _l;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(_l||(_l={}));var Tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Tl||(Tl={}));var Cl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Cl||(Cl={}));var wl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(wl||(wl={}));var Rl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Rl||(Rl={}));var Ol;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Ol||(Ol={}));var Ll;(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"})(Ll||(Ll={}));var Pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pl||(Pl={}));var Zd={[N.PERSONAL_BOOK_SHARE_USER]:[N.PERSONAL_BOOK_USER],[N.HTML_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.PDF_EXPORT_USER]:[N.PERSONAL_BOOK_USER],[N.KHUB_ADMIN]:[N.CONTENT_PUBLISHER],[N.ADMIN]:[N.KHUB_ADMIN,N.USERS_ADMIN,N.PORTAL_ADMIN,N.BEHAVIOR_DATA_USER],[N.GENERATIVE_AI_EXPORT_USER]:[N.GENERATIVE_AI_USER]};function Il(t,e){return t===e||(Zd[t]??[]).some(r=>Il(r,e))}function je(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=>Il(i,e))}function Ml(t,...e){return t==null?!1:e.some(r=>je(t,r))}var Vi=f(S());var yo=f(S());var Lt=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=b.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=b.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var Xt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Lt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Lt.await()}};var ne=class extends Xt{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new yo.CacheRegistry,this.cache=e?n.commonCache:new yo.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 $i=class extends ne{async listMySearches(){let{session:e}=b.getState();return je(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Fi=class extends ne{async listMyBookmarks(){let e=b.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Bi=class extends ne{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=b.getState().session;return!!e?.sessionAuthenticated}};var Hi=class extends ne{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=b.getState().session;return!!e?.sessionAuthenticated}};var Jd="ft-user-assets",ep={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(we).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;xo(t,r,[...vo(t,r),n]),Nl(t,r,1,i),Dl(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;xo(t,r,vo(t,r).map(n=>n.id===i.id?i:n)),Dl(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;xo(t,r,vo(t,r).filter(o=>o.id!==n)),Nl(t,r,-1,i)}},kl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},vo=(t,e)=>{var r;let i=kl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},xo=(t,e,r)=>{let i=kl[e];i&&(t[i]=r)},Nl=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===we.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Dl=(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)},le=Vi.FtReduxStore.get({name:Jd,reducers:ep,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(we).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),bo=class{constructor(e=new Bi,r=new Hi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Fi,this.savedSearchesService=new $i,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,Vi.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(),le.actions.clearAssetCount(),le.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),le.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),le.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();le.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();le.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&le.getState().assetCounts.allAsset[e]!==r.count&&le.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&le.getState().assetCounts.bookmarkByMap[e]!==r.count&&le.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(le.getState().assetCounts.bookmarkByMap).length!==0;e===we.BOOKMARKS&&r&&le.actions.clearBookmarkCountByMap(),le.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;le.actions.bookmarks(r)}}},Eo=new bo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Eo);var So=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new So;var Re=f(S());var Ul,Qt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},tp=Symbol("clearAfterUnitTest"),ji=class extends(0,Re.withEventBus)(ne){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ul]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=b.getState().uiLocale,b.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=b.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,Re.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 o=e.toLowerCase(),s=this.resolveContext(o);return new Re.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).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 Re.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 Qt({loadedContexts:e})),this.dispatchEvent(new Qt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Qt({loadedContexts:[e]})),this.dispatchEvent(new Qt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Re.delay)(0).then(()=>i()).catch(()=>null)))}};Ul=tp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Zt=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var $l=f(S()),Ao=class{highlightHtml(e,r,i){(0,$l.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ao;var Fl=f(S());var _o=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=b.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return Fl.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:b.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new _o;var Bl=f(S());var Ir=class{static get(e,r){var i,n,o,s;let a=b.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 Bl.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Ki=class extends ne{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(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]: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 To=class{urlToSearchRequest(e){return Ir.get().parse(e)}searchRequestToUrl(e){return Ir.get().serialize(e)}};window.FluidTopicsUrlService=new To;var Je=f(S());var Pt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Pt.eventName="before-location-change";var It=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};It.eventName="change";var Co=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))}},Hl=new Co;var Wi=class t extends Je.WithEventBus{static build(){return new t(window.history,Hl,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let 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,Je.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new It(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=new Pt(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,...o,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,s,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(Pt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Pt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(It.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(It.eventName,e)}currentItem(){return(0,Je.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,Je.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Je.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,Je.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,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;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,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Wi.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 Vl=f(P());var jl=Vl.css`
|
|
168
|
-
`;var
|
|
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`
|
|
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=>
|
|
171
|
-
`;var
|
|
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`
|
|
172
172
|
<span class="ft-i18n">
|
|
173
173
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
174
174
|
</span>
|
|
175
|
-
`}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};
|
|
175
|
+
`}update(e){var r;super.update(e),["context","key","defaultMessage"].some(i=>e.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};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`
|
|
176
176
|
<div part="container"
|
|
177
177
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
178
178
|
<slot part="slot"></slot>
|
|
@@ -181,13 +181,13 @@
|
|
|
181
181
|
popover="manual">
|
|
182
182
|
<div part="tooltip-content" class="ft-tooltip--content">
|
|
183
183
|
<slot name="text"></slot>
|
|
184
|
-
<ft-typography variant="${
|
|
184
|
+
<ft-typography variant="${Ie.caption}" ?hidden=${!(!((e=this.text)===null||e===void 0)&&e.message)}>
|
|
185
185
|
${(r=this.text)===null||r===void 0?void 0:r.message}
|
|
186
186
|
</ft-typography>
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
189
189
|
</div>
|
|
190
|
-
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,i;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:e},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&
|
|
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`
|
|
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: ${
|
|
203
|
+
border-radius: ${me.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: ${
|
|
237
|
+
background-color: ${me.backgroundColor};
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
.ft-ripple .ft-ripple--effect {
|
|
241
|
-
background-color: ${
|
|
241
|
+
background-color: ${me.color};
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
245
|
-
background-color: ${
|
|
245
|
+
background-color: ${kc.backgroundColor};
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
249
|
-
background-color: ${
|
|
249
|
+
background-color: ${kc.color};
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
253
|
-
background-color: ${
|
|
253
|
+
background-color: ${Nc.backgroundColor};
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
257
|
-
background-color: ${
|
|
257
|
+
background-color: ${Nc.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: ${
|
|
287
|
+
opacity: ${me.opacityContentOnSurfaceHover};
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
291
|
-
opacity: ${
|
|
291
|
+
opacity: ${me.opacityContentOnSurfaceSelected};
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
295
|
-
opacity: ${
|
|
295
|
+
opacity: ${me.opacityContentOnSurfaceFocused};
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
299
|
-
opacity: ${
|
|
299
|
+
opacity: ${me.opacityContentOnSurfacePressed};
|
|
300
300
|
transform: translate(-50%, -50%) scale(1);
|
|
301
301
|
}
|
|
302
|
-
`;var
|
|
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`
|
|
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,
|
|
309
|
+
<div class="${(0,Bc.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"),
|
|
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`
|
|
314
314
|
:host, i.ft-icon {
|
|
315
315
|
display: inline-flex;
|
|
316
316
|
align-items: center;
|
|
@@ -319,14 +319,14 @@
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
:host {
|
|
322
|
-
width: ${
|
|
323
|
-
height: ${
|
|
322
|
+
width: ${we.size};
|
|
323
|
+
height: ${we.size};
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
i.ft-icon {
|
|
327
327
|
width: 100%;
|
|
328
328
|
height: 100%;
|
|
329
|
-
font-size: ${
|
|
329
|
+
font-size: ${we.size};
|
|
330
330
|
line-height: 1;
|
|
331
331
|
font-weight: normal;
|
|
332
332
|
text-transform: none;
|
|
@@ -337,33 +337,33 @@
|
|
|
337
337
|
text-rendering: auto;
|
|
338
338
|
-webkit-font-smoothing: antialiased;
|
|
339
339
|
-moz-osx-font-smoothing: grayscale;
|
|
340
|
-
vertical-align: ${
|
|
340
|
+
vertical-align: ${we.verticalAlign};
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
i.ft-icon.ft-icon--fluid-topics {
|
|
344
|
-
font-family: ${
|
|
344
|
+
font-family: ${we.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
345
345
|
|
|
346
346
|
/* Ugly fix because font is broken */
|
|
347
|
-
font-size: calc(0.75 * ${
|
|
348
|
-
line-height: ${
|
|
347
|
+
font-size: calc(0.75 * ${we.size});
|
|
348
|
+
line-height: ${we.size};
|
|
349
349
|
position: relative;
|
|
350
350
|
top: -4%;
|
|
351
351
|
justify-content: center;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
.ft-icon--file-format {
|
|
355
|
-
font-family: ${
|
|
355
|
+
font-family: ${we.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
.ft-icon--material {
|
|
359
|
-
font-family: ${
|
|
359
|
+
font-family: ${we.materialFontFamily}, "Material Icons", sans-serif;
|
|
360
360
|
}
|
|
361
|
-
`,
|
|
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="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM="",t.HYPHEN_SOLID="",t.CROSSHAIRS="",t.PERSON_CHALKBOARD="",t.CIRCLE_ARROW_DOWN_SLASH="",t.BOOK_OPEN_COVER="",t.LIGHTBULB="",t.MESSAGE_BOT_AGENTIC_SOLID="",t.CHART_LINE_USER="",t.SERVER_CIRCLE_ARROW_DOWN="",t.EYE="",t.SHARE="󨃱"})(bn||(bn={}));var g;(function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""})(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`
|
|
362
362
|
<i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
|
|
363
|
-
${(0,
|
|
363
|
+
${(0,Gc.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
|
|
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`
|
|
367
367
|
:host {
|
|
368
368
|
line-height: 0;
|
|
369
369
|
}
|
|
@@ -372,8 +372,8 @@
|
|
|
372
372
|
display: inline-block;
|
|
373
373
|
position: relative;
|
|
374
374
|
|
|
375
|
-
width: ${
|
|
376
|
-
height: ${
|
|
375
|
+
width: ${qt.size};
|
|
376
|
+
height: ${qt.size};
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
.ft-loader div {
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
width: 25%;
|
|
383
383
|
height: 25%;
|
|
384
384
|
border-radius: 50%;
|
|
385
|
-
background: ${
|
|
385
|
+
background: ${qt.color};
|
|
386
386
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
387
387
|
}
|
|
388
388
|
|
|
@@ -429,17 +429,17 @@
|
|
|
429
429
|
transform: translate(0, 0);
|
|
430
430
|
}
|
|
431
431
|
100% {
|
|
432
|
-
transform: translate(calc(0.35 * ${
|
|
432
|
+
transform: translate(calc(0.35 * ${qt.size}), 0);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
`;var
|
|
435
|
+
`;var Zc=h(I()),eu=h(b());var Kt=class extends eu.FtLitElement{render(){return Zc.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
|
-
`}};
|
|
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`
|
|
443
443
|
:host {
|
|
444
444
|
display: inline-block;
|
|
445
445
|
max-width: 100%;
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
box-shadow: 0px 0px 0px transparent;
|
|
451
451
|
border: 0px solid transparent;
|
|
452
452
|
text-shadow: 0px 0px 0px transparent;
|
|
453
|
-
font-size: ${
|
|
453
|
+
font-size: ${B.fontSize};
|
|
454
454
|
text-decoration: none;
|
|
455
455
|
}
|
|
456
456
|
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
.ft-button:focus-visible {
|
|
473
|
-
outline: 2px solid ${
|
|
473
|
+
outline: 2px solid ${_.designSystemVariables.colorPrimary};
|
|
474
474
|
outline-offset: 2px;
|
|
475
475
|
}
|
|
476
476
|
|
|
@@ -484,31 +484,31 @@
|
|
|
484
484
|
border: none;
|
|
485
485
|
pointer-events: auto;
|
|
486
486
|
|
|
487
|
-
--button-internal-line-height: max(calc(${
|
|
488
|
-
--button-internal-color: ${
|
|
489
|
-
${(0,
|
|
490
|
-
${(0,
|
|
491
|
-
${(0,
|
|
487
|
+
--button-internal-line-height: max(calc(${B.fontSize} + 2px), ${B.iconSize});
|
|
488
|
+
--button-internal-color: ${B.color};
|
|
489
|
+
${(0,_.setVariable)(we.size,B.iconSize)};
|
|
490
|
+
${(0,_.setVariable)(me.color,B.rippleColor)};
|
|
491
|
+
${(0,_.setVariable)(me.borderRadius,B.borderRadius)};
|
|
492
492
|
|
|
493
|
-
border-radius: ${
|
|
494
|
-
padding: ${
|
|
495
|
-
background-color: ${
|
|
493
|
+
border-radius: ${B.borderRadius};
|
|
494
|
+
padding: ${B.verticalPadding} ${B.horizontalPadding};
|
|
495
|
+
background-color: ${B.backgroundColor};
|
|
496
496
|
color: var(--button-internal-color);
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
.ft-button.ft-button--outlined {
|
|
500
500
|
border: 1px solid var(--button-internal-color);
|
|
501
|
-
padding: calc(${
|
|
501
|
+
padding: calc(${B.verticalPadding} - 1px) calc(${B.horizontalPadding} - 1px);
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
.ft-button.ft-button--dense {
|
|
505
|
-
padding: ${
|
|
506
|
-
border-radius: ${
|
|
507
|
-
${(0,
|
|
505
|
+
padding: ${Xe.verticalPadding} ${Xe.horizontalPadding};
|
|
506
|
+
border-radius: ${Xe.borderRadius};
|
|
507
|
+
${(0,_.setVariable)(me.borderRadius,Xe.borderRadius)};
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
511
|
-
padding: calc(${
|
|
511
|
+
padding: calc(${Xe.verticalPadding} - 1px) calc(${Xe.horizontalPadding} - 1px);
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
.ft-button:not([disabled]):hover {
|
|
@@ -516,22 +516,22 @@
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
.ft-button--round {
|
|
519
|
-
border-radius: calc(var(--button-internal-line-height) / 2 + ${
|
|
519
|
+
border-radius: calc(var(--button-internal-line-height) / 2 + ${B.verticalPadding});
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.ft-button--round.ft-button--dense {
|
|
523
|
-
border-radius: calc(var(--button-internal-line-height) / 2 + ${
|
|
523
|
+
border-radius: calc(var(--button-internal-line-height) / 2 + ${Xe.verticalPadding});
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
.ft-button[disabled] {
|
|
527
527
|
filter: grayscale(1);
|
|
528
|
-
opacity: ${
|
|
528
|
+
opacity: ${B.opacityDisabled};
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
.ft-button.ft-button--primary {
|
|
532
|
-
background-color: ${
|
|
533
|
-
--button-internal-color: ${
|
|
534
|
-
${(0,
|
|
532
|
+
background-color: ${ro.backgroundColor};
|
|
533
|
+
--button-internal-color: ${ro.color};
|
|
534
|
+
${(0,_.setVariable)(me.color,ro.rippleColor)};
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
.ft-button--label {
|
|
@@ -540,13 +540,13 @@
|
|
|
540
540
|
white-space: nowrap;
|
|
541
541
|
text-overflow: ellipsis;
|
|
542
542
|
display: block;
|
|
543
|
-
margin: 0 ${
|
|
544
|
-
${(0,
|
|
545
|
-
${(0,
|
|
543
|
+
margin: 0 ${B.iconPadding};
|
|
544
|
+
${(0,_.setVariable)($e.fontSize,"1em")};
|
|
545
|
+
${(0,_.setVariable)($e.lineHeight,"var(--button-internal-line-height)")};
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
.ft-button--dense .ft-button--label {
|
|
549
|
-
margin: 0 ${
|
|
549
|
+
margin: 0 ${Xe.iconPadding};
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
.ft-button--label.ft-button--label-no-text {
|
|
@@ -559,13 +559,13 @@
|
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
.ft-button--label[hidden] + [part="icon"] {
|
|
562
|
-
margin: 0 calc(${
|
|
563
|
-
padding: 0 ${
|
|
562
|
+
margin: 0 calc(${B.horizontalPadding} * -1);
|
|
563
|
+
padding: 0 ${B.verticalPadding};
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
.ft-button--dense .ft-button--label[hidden] + [part="icon"] {
|
|
567
|
-
margin: 0 calc(${
|
|
568
|
-
padding: 0 ${
|
|
567
|
+
margin: 0 calc(${Xe.horizontalPadding} * -1);
|
|
568
|
+
padding: 0 ${Xe.verticalPadding};
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
.ft-button:not(.ft-button--trailing-icon) [part="label"] {
|
|
@@ -573,51 +573,51 @@
|
|
|
573
573
|
}
|
|
574
574
|
|
|
575
575
|
ft-loader {
|
|
576
|
-
${(0,
|
|
577
|
-
${(0,
|
|
576
|
+
${(0,_.setVariable)(qt.size,B.iconSize)};
|
|
577
|
+
${(0,_.setVariable)(qt.color,"var(--button-internal-color)")};
|
|
578
578
|
}
|
|
579
|
-
`;var
|
|
579
|
+
`;var F=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},R=class t extends(0,Je.toFtFormComponent)(Je.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",e=>{var r;this.isDisabled()?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var e,r,i;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":Je.isSafari,"ft-button--label-no-text":!this.hasTextContent},s=yt.html`
|
|
580
580
|
<ft-ripple part="ripple"
|
|
581
581
|
?disabled=${this.isDisabled()}
|
|
582
582
|
?activated=${this.activated}
|
|
583
583
|
></ft-ripple>
|
|
584
584
|
<ft-typography part="label"
|
|
585
|
-
variant="${
|
|
585
|
+
variant="${Ie.button}"
|
|
586
586
|
element="span"
|
|
587
|
-
class="${(0,
|
|
587
|
+
class="${(0,Sn.classMap)(n)}">
|
|
588
588
|
<slot></slot>
|
|
589
589
|
</ft-typography>
|
|
590
590
|
${this.resolveIcon()}
|
|
591
|
-
`,
|
|
592
|
-
<a href="${
|
|
591
|
+
`,o=this.href!=null&&this.href.trim().length>0?this.href:void 0;return this.addTooltipIfNeeded(o?yt.html`
|
|
592
|
+
<a href="${o}"
|
|
593
593
|
target="${(e=this.target)!==null&&e!==void 0?e:"_self"}"
|
|
594
594
|
part="button"
|
|
595
|
-
class="${(0,
|
|
596
|
-
aria-label="${
|
|
595
|
+
class="${(0,Sn.classMap)(this.buttonClasses)}"
|
|
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,
|
|
603
|
-
aria-label="${
|
|
604
|
-
aria-haspopup="${
|
|
605
|
-
aria-pressed="${
|
|
602
|
+
class="${(0,Sn.classMap)(this.buttonClasses)}"
|
|
603
|
+
aria-label="${mr((i=this.ariaLabel)!==null&&i!==void 0?i:this.label)}"
|
|
604
|
+
aria-haspopup="${mr(this.ariaHasPopup)}"
|
|
605
|
+
aria-pressed="${mr(this.ariaPressed)}"
|
|
606
606
|
?disabled=${this.isDisabled()}>
|
|
607
|
-
${
|
|
607
|
+
${s}
|
|
608
608
|
</button>
|
|
609
|
-
`)}addTooltipIfNeeded(e){return this.label&&this.label.trim().length>0&&(this.forceTooltip||!this.hasTextContent&&!this.hideTooltip)?
|
|
609
|
+
`)}addTooltipIfNeeded(e){return this.label&&this.label.trim().length>0&&(this.forceTooltip||!this.hasTextContent&&!this.hideTooltip)?yt.html`
|
|
610
610
|
<ft-tooltip part="tooltip"
|
|
611
611
|
text="${this.label}"
|
|
612
612
|
position="${this.tooltipPosition}">
|
|
613
613
|
${e}
|
|
614
614
|
</ft-tooltip>
|
|
615
|
-
`:e}resolveIcon(){return this.loading?
|
|
616
|
-
<ft-loader part="loader icon"></ft-loader> `:this.icon?
|
|
615
|
+
`:e}resolveIcon(){return this.loading?yt.html`
|
|
616
|
+
<ft-loader part="loader icon"></ft-loader> `:this.icon?yt.html`
|
|
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":
|
|
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`
|
|
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: ${
|
|
637
|
-
--chip-internal-font-weight: ${
|
|
636
|
+
--chip-internal-font-size: ${be.fontSize};
|
|
637
|
+
--chip-internal-font-weight: ${be.fontWeight};
|
|
638
638
|
--chip-internal-line-height: max(20px, calc(var(--chip-internal-font-size) + 2px));
|
|
639
|
-
${(0,w.setVariable)(
|
|
640
|
-
--chip-internal-vertical-padding: ${
|
|
641
|
-
--chip-internal-horizontal-padding: ${
|
|
639
|
+
${(0,w.setVariable)(we.size,be.iconSize)};
|
|
640
|
+
--chip-internal-vertical-padding: ${be.verticalPadding};
|
|
641
|
+
--chip-internal-horizontal-padding: ${be.horizontalPadding};
|
|
642
642
|
--chip-internal-icon-padding: 3px;
|
|
643
|
-
--chip-internal-content-height: max(var(--chip-internal-line-height), ${
|
|
643
|
+
--chip-internal-content-height: max(var(--chip-internal-line-height), ${be.iconSize});
|
|
644
644
|
|
|
645
|
-
border: 1px solid ${
|
|
646
|
-
color: ${
|
|
647
|
-
${(0,w.setVariable)(
|
|
648
|
-
border-radius: var(${(0,
|
|
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)));
|
|
649
649
|
padding: calc(var(--chip-internal-vertical-padding) - 1px) calc(var(--chip-internal-horizontal-padding) - 1px);
|
|
650
|
-
background-color: ${
|
|
650
|
+
background-color: ${be.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: ${
|
|
661
|
-
--chip-internal-horizontal-padding: ${
|
|
660
|
+
--chip-internal-vertical-padding: ${du.verticalPadding};
|
|
661
|
+
--chip-internal-horizontal-padding: ${du.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: ${
|
|
666
|
+
--chip-internal-horizontal-padding: ${be.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: ${
|
|
673
|
+
opacity: ${be.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: ${
|
|
680
|
-
${(0,w.setVariable)(
|
|
681
|
-
color: ${
|
|
679
|
+
background-color: ${io.backgroundColor};
|
|
680
|
+
${(0,w.setVariable)(me.color,io.rippleColor)};
|
|
681
|
+
color: ${io.color};
|
|
682
682
|
}
|
|
683
683
|
|
|
684
684
|
.ft-chip--clickable {
|
|
@@ -709,9 +709,9 @@
|
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
.ft-chip--icon-button {
|
|
712
|
-
${(0,w.setVariable)(
|
|
713
|
-
${(0,w.setVariable)(
|
|
714
|
-
${(0,w.setVariable)(
|
|
712
|
+
${(0,w.setVariable)(B.iconSize,be.iconSize)};
|
|
713
|
+
${(0,w.setVariable)(B.horizontalPadding,"var(--chip-internal-icon-padding)")};
|
|
714
|
+
${(0,w.setVariable)(B.verticalPadding,"var(--chip-internal-icon-padding)")};
|
|
715
715
|
margin: calc((-1) * var(--chip-internal-icon-padding));
|
|
716
716
|
}
|
|
717
717
|
|
|
@@ -719,9 +719,9 @@
|
|
|
719
719
|
vertical-align: bottom;
|
|
720
720
|
display: block;
|
|
721
721
|
margin: 0 var(--chip-internal-horizontal-padding);
|
|
722
|
-
${(0,w.setVariable)(
|
|
723
|
-
${(0,w.setVariable)(
|
|
724
|
-
${(0,w.setVariable)(
|
|
722
|
+
${(0,w.setVariable)(Ae.fontSize,"var(--chip-internal-font-size)")};
|
|
723
|
+
${(0,w.setVariable)(Ae.fontWeight,"var(--chip-internal-font-weight)")};
|
|
724
|
+
${(0,w.setVariable)(Ae.lineHeight,"var(--chip-internal-content-height)")};
|
|
725
725
|
}
|
|
726
726
|
|
|
727
727
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -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
|
|
761
|
-
<div class="${(0,
|
|
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)}"
|
|
762
762
|
aria-label="${this.getLabel()}"
|
|
763
763
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
764
764
|
@keyup=${this.onKeyUp}
|
|
@@ -769,7 +769,7 @@
|
|
|
769
769
|
</ft-typography>
|
|
770
770
|
${this.internalIcon?this.renderIcon():null}
|
|
771
771
|
</div>
|
|
772
|
-
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?
|
|
772
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?En.html`
|
|
773
773
|
<ft-button round
|
|
774
774
|
class="ft-chip--icon-button"
|
|
775
775
|
@click=${this.onIconClick}
|
|
@@ -780,11 +780,11 @@
|
|
|
780
780
|
part="icon-button"
|
|
781
781
|
?hideTooltip=${this.hideIconTooltip}
|
|
782
782
|
></ft-button>
|
|
783
|
-
`:
|
|
783
|
+
`:En.html`
|
|
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
|
|
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`
|
|
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: ${
|
|
807
|
+
color: ${Bp.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
|
|
823
|
-
<div class="${(0,
|
|
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)}"
|
|
824
824
|
tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
|
|
825
825
|
aria-disabled="${this.disabled}"
|
|
826
826
|
@keydown=${e=>this.onKeyDown(e)}
|
|
@@ -828,16 +828,16 @@
|
|
|
828
828
|
<ft-ripple
|
|
829
829
|
?disabled=${this.disabled}
|
|
830
830
|
></ft-ripple>
|
|
831
|
-
${this.icon?
|
|
831
|
+
${this.icon?ti.html`
|
|
832
832
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
833
|
-
`:
|
|
834
|
-
<ft-typography variant="${
|
|
833
|
+
`:ti.nothing}
|
|
834
|
+
<ft-typography variant="${Ie.body2}">
|
|
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
|
|
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`
|
|
839
839
|
.ft-floating-menu {
|
|
840
|
-
color: ${
|
|
840
|
+
color: ${vt.textColor};
|
|
841
841
|
display: contents;
|
|
842
842
|
}
|
|
843
843
|
|
|
@@ -854,20 +854,20 @@
|
|
|
854
854
|
display: none;
|
|
855
855
|
position: relative;
|
|
856
856
|
overflow: auto;
|
|
857
|
-
max-width: ${
|
|
858
|
-
max-height: ${
|
|
859
|
-
box-shadow: ${
|
|
860
|
-
background-color: ${
|
|
861
|
-
border-radius: ${
|
|
862
|
-
color: ${
|
|
863
|
-
z-index: ${
|
|
857
|
+
max-width: ${vt.maxWidth};
|
|
858
|
+
max-height: ${vt.maxHeight};
|
|
859
|
+
box-shadow: ${vt.menuElevation};
|
|
860
|
+
background-color: ${vt.colorSurface};
|
|
861
|
+
border-radius: ${vt.borderRadiusS};
|
|
862
|
+
color: ${vt.textColor};
|
|
863
|
+
z-index: ${vt.zIndex};
|
|
864
864
|
}
|
|
865
865
|
|
|
866
866
|
.ft-floating-menu--open .ft-floating-menu--options {
|
|
867
867
|
display: block;
|
|
868
868
|
}
|
|
869
|
-
`;var
|
|
870
|
-
<div part="container" class="${(0,
|
|
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}>
|
|
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
|
|
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`
|
|
901
901
|
.ft-floating-menu-label {
|
|
902
902
|
padding: 4px 8px;
|
|
903
903
|
}
|
|
@@ -908,34 +908,44 @@
|
|
|
908
908
|
width: max-content;
|
|
909
909
|
text-overflow: ellipsis;
|
|
910
910
|
overflow: hidden;
|
|
911
|
-
color: ${
|
|
911
|
+
color: ${Hp.color}
|
|
912
912
|
}
|
|
913
|
-
`;var
|
|
913
|
+
`;var _u=h(I()),Cu=h(b());var xt=class extends Cu.FtLitElement{render(){return _u.html`
|
|
914
914
|
<div class="ft-floating-menu-label">
|
|
915
|
-
<ft-typography variant="${
|
|
915
|
+
<ft-typography variant="${Ie.caption}">
|
|
916
916
|
<slot></slot>
|
|
917
917
|
</ft-typography>
|
|
918
918
|
</div>
|
|
919
|
-
`}};
|
|
920
|
-
`;var zr=f(P()),$t=f(G()),Q=f(S());var me=f(S());var cu=f(S()),cp={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]}},uu=t=>cu.FtReduxStore.get({name:"ft-reader-"+t,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:cp});var No=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}}extractPagesToc(e,r,i){return e.flatMap(n=>{var o;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(o=n.title)!==null&&o!==void 0?o:"",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 o,s,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 o;let s=(o=n.prettyUrl)===null||o===void 0?void 0:o.replace(/^\//,""),a={...n,prettyUrl:s,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,o,s,a,l,c,u;let d=(i=e.tocId)!==null&&i!==void 0?i:(o=(n=e.pageToc)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.tocId,p={number:this.pages.length+1,title:(s=e.title)!==null&&s!==void 0?s:"",untranslatedTitle:e.untranslatedTitle,rootTocId:d??"root",toc:((a=e.pageToc)!==null&&a!==void 0?a:[]).map(y=>this.nodeByTocId[y.tocId]),topics:[],hiddenTopics:[],rootDepth:d?this.nodeByTocId[d].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},m=(y,_)=>(_?p.topics:p.hiddenTopics).push(y),v=(c=(l=e.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];p.breadcrumb.forEach((y,_)=>{m(y,v[_])}),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,v);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}},pn=class{convertPaginatedToc(e,r){return new No(e,r).build()}};var fn=class extends ne{get mapId(){return this._mapId}set mapId(e){e!==this._mapId&&this.clear(),this._mapId=e}constructor(e,r,i){super(!1,r),this.converter=e,this._mapId=i,this.initCache()}async withMapId(e){return this._mapId?e(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(e=>this.fetchMap(e))),this.cache.register("enrichedToc",()=>this.withMapId(e=>this.fetchPages(e).then(r=>this.converter.convertPaginatedToc(e,r)))),this.cache.register("ratingSummary",()=>{var e,r;return je((r=(e=b.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){return e+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(e){return this.cache.get(this.makeCacheKey("map",e),()=>this.fetchMap(this.mapId,e))}getMapNow(e){return this.cache.getNow(this.makeCacheKey("map",e))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(e){return this.cache.get(this.makeCacheKey("enrichedToc",e),()=>this.fetchPages(this.mapId,e).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(e){return this.cache.getNow(this.makeCacheKey("enrichedToc",e))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(e){return(await this.getEnrichedToc(e)).toc}async getPagesToc(e){return(await this.getEnrichedToc(e)).pagesToc}async getTranslationError(e){return(await this.getEnrichedToc(e)).translationError}async getTocNode(e,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 o=this.getMapNow(r);return o?.prettyUrl==e||`${o?.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(o=>o.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){let n=this.getNavigationData(e,r,i),o=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(o,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(e,r,i,n){var o,s;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:(o=c?.title)!==null&&o!==void 0?o:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(s=a?.duplicatedPrettyUrls.has(u??""))!==null&&s!==void 0?s:!1,section:i}}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=b.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),n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],o=this.getTocNodeNow(i.parentTocId,r);for(;o;)n.unshift({tocId:o.tocId,title:o.title,untranslatedTitle:o.untranslatedTitle}),o=this.getTocNodeNow(o.parentTocId,r);return n}isFeatureAccessible(e,{session:r}){var i;if(!this.isFeatureAvailable(e))return!1;switch(e){case Ge.FEEDBACK:return je(r??[],N.FEEDBACK_USER);case Ge.RATING:return je(r??[],N.RATING_USER);case Ge.PRINT:return je(r??[],N.PRINT_USER);case Ge.BOOKMARK:return!!r?.sessionAuthenticated;case Ge.COLLECTIONS:return je(r??[],N.COLLECTION_USER);case Ge.PERSONAL_BOOKS:return je(r??[],N.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(e){return this.api.makeAbsolute(e)}};var hn=class t extends fn{static async build(e){return new t(new pn,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){return await this.getMap(r),this.api.getPages(e,this.fingerprint,r)}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 up="topicPivot";function mn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(up,i)}),r.href}var gn=class t{static build(e,r){return new t(uu(e.trim()||"context"),r??hn.build)}loaded(){return(0,me.waitUntil)(()=>this._loaded)}constructor(e,r,i,n){this.store=e,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new me.Debouncer(10),this.analyticsEventsService=n??new Ki,this.initService(r)}async initService(e){return this.service=await e(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(e){e!==this.store.getState().mapId&&(this.store.actions.mapId(e),this.service&&(this.service.mapId=e),await this.reload())}setRenderedTopics(e){this.store.actions.renderedTopics(e)}setVisibleTopics(e){this.store.actions.visibleTopics(e)}async awaitService(){return(0,me.waitFor)(()=>this.service)}async navigateToTopic(e,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(e??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(e,o);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}`}))}resolveValidNonRootTocId(e,r){var i,n,o;let s=(i=e==="root"?void 0:e)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(e!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(et.requestedTopicNotFound,{detail:{tocId:s}})),(o=(n=r.topics[0])!==null&&n!==void 0?n:r.hiddenTopics[0])!==null&&o!==void 0?o:"root")}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(this.getTranslationSettings()))}clear(){var e;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(e=this.service)===null||e===void 0||e.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(e){var r,i,n,o,s;try{e&&this.setTranslationLoading(!0);let a=l=>{throw e&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(e).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(e).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(e).then(l=>this.store.actions.pagesToc(l)).catch(a),(o=this.service)===null||o===void 0?void 0:o.getPaginationConfiguration().then(l=>this.store.actions.paginationConfiguration(l)).catch(a),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(e).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,e&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof me.CanceledPromiseError)&&this.errorHandler(a)}}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 o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.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)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(et.clusteringHelperCreated))}createClusteringHelper(){var e,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var a;return((a=s.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),o=(r=(e=b.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&r!==void 0?r:[];return new me.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(e){var r,i,n;await this.loaded();let o=await(0,me.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),s=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(s,o,[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(this.getTranslationSettings()))}async setTranslationSourceLanguage(e){this.store.actions.setTranslationSourceLanguage(e),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(e){this.store.actions.setTranslationProfileId(e)}async setTranslationLoading(e){this.store.actions.setTranslationLoading(e)}async setTranslationError(e){this.store.actions.setTranslationError(e)}getTranslationSettings(){var e;let 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()}getAccurateNavigationData(e,r,i){return 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(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(e)}getTocNode(e){return this.service.getTocNode(e,this.getTranslationSettings())}getPage(e){return this.service.getPage(e,this.getTranslationSettings())}onMapAttachmentsUpdate(){var e;(e=this.service)===null||e===void 0||e.clearMapAttachments(),this.store.dispatchEvent(new Event(et.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(e){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=me.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",e),s=(0,me.accessResultUrl)(o);if(s){let a=this.store.getState().visibleTopics[0],l=(i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativeTopicPivotMetadata;if(l&&a){let c=await((n=this.service)===null||n===void 0?void 0:n.getTopicMetadataValue(a,l));s=mn(s,c)}}return s}sendDocumentOnDemandTranslateEvent(e){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=b.getState(),s=this.store.getState(),a=s.map,l=s.translation.profileId;if(!(i||!a||!n||!o||!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:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e.code),profileId:l,document:u,translationOrigin:ki.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(e,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=b.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!o||!s||!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:o,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(e),breadcrumb:u.map(m=>{var v;return{tocId:m.tocId,title:(v=m.untranslatedTitle)!==null&&v!==void 0?v: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 yn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},vn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},xn=class extends CustomEvent{constructor(e){super("ft-reader-navigation-done",{detail:e})}},bn=class extends CustomEvent{constructor(e){super("ft-reader-load-error",{detail:e})}},En=class extends Event{constructor(){super("ft-reader-map-not-found")}},Sn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},An=class extends Event{constructor(){super("ft-reader-map-forbidden")}},_n=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var ge=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Do=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},Y=class extends Q.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Q.Debouncer(5),this.navigationDebouncer=new Q.Debouncer(10),this.mapLoadedEventDebouncer=new Q.Debouncer(50),this.addStore(b)}render(){return zr.html`
|
|
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`
|
|
922
|
+
<slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click=${this.onResultClicked}
|
|
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`
|
|
921
925
|
${this.importStyleIfNeeded()}
|
|
922
|
-
<
|
|
923
|
-
|
|
926
|
+
<ft-toc-filtering-search-context
|
|
927
|
+
registrationId="reader-toc-filtering"
|
|
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:[])}} }
|
|
930
|
+
>
|
|
931
|
+
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
932
|
+
</ft-toc-filtering-search-context>
|
|
933
|
+
`}importStyleIfNeeded(){var e,r;let i=(e=this.stateManager.service)===null||e===void 0?void 0:e.themeStylesheet();return!i||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?ai.nothing:ai.html`
|
|
924
934
|
<style>
|
|
925
935
|
@import "${i}"
|
|
926
936
|
</style>
|
|
927
|
-
`}get stateManager(){return this._stateManager==null&&(this._stateManager=
|
|
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`
|
|
928
938
|
${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
|
|
929
939
|
${this.hideIfEmpty()}
|
|
930
|
-
`}renderSwitchToRelatives(){return
|
|
940
|
+
`}renderSwitchToRelatives(){return Se.html`
|
|
931
941
|
<div part="floating-menu-container" class="ft-reader-metadata--container">
|
|
932
942
|
<ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
|
|
933
943
|
${this.renderChip(!0)}
|
|
934
944
|
<ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
|
|
935
|
-
${(0,
|
|
945
|
+
${(0,Ku.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
|
|
936
946
|
</ft-floating-menu>
|
|
937
947
|
</div>
|
|
938
|
-
`}renderChip(e=!1){var r,i,n,o,
|
|
948
|
+
`}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`
|
|
939
949
|
<ft-chip part="chip"
|
|
940
950
|
exportpartsPrefix="chip"
|
|
941
951
|
label="${c}"
|
|
@@ -943,37 +953,37 @@
|
|
|
943
953
|
trailingIcon icon="${e?"thin_arrow":""}"
|
|
944
954
|
?clickable=${e}
|
|
945
955
|
?multiLine=${this.multiLine}>
|
|
946
|
-
${this.displayLabel?
|
|
956
|
+
${this.displayLabel?Se.html`
|
|
947
957
|
<span part="label">${(a=(s=this.metadata)===null||s===void 0?void 0:s.label)!==null&&a!==void 0?a:this.key}: </span>
|
|
948
|
-
`:
|
|
949
|
-
${this.metadataValue.length===0?
|
|
958
|
+
`:Se.nothing}
|
|
959
|
+
${this.metadataValue.length===0?Se.nothing:Se.html`
|
|
950
960
|
<span part="values">${this.metadataValue}</span>
|
|
951
961
|
`}
|
|
952
|
-
</ft-chip>`;return l?u:
|
|
962
|
+
</ft-chip>`;return l?u:Se.html`
|
|
953
963
|
<ft-tooltip part="tooltip"
|
|
954
964
|
slot="${e?"toggle":""}"
|
|
955
965
|
class="${this.multiLine?"ft-reader-metadata-multi-line":""}"
|
|
956
966
|
text="${c}">
|
|
957
967
|
${u}
|
|
958
968
|
</ft-tooltip>
|
|
959
|
-
`}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
|
|
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`
|
|
960
970
|
<a part="relative-item-link"
|
|
961
|
-
href="${
|
|
962
|
-
@click=${
|
|
971
|
+
href="${no(e,this.metadataFilters)}"
|
|
972
|
+
@click=${o=>this.addTopicPivotParam(o,e)}>
|
|
963
973
|
<ft-ripple part="relative-item-ripple"></ft-ripple>
|
|
964
|
-
<ft-floating-menu-item part="relative-item" value="${
|
|
965
|
-
${
|
|
966
|
-
<ft-tooltip part="relative-item-tooltip" text="${
|
|
974
|
+
<ft-floating-menu-item part="relative-item" value="${s.value}" notFocusable>
|
|
975
|
+
${s.value==null||s.value===s.displayValue?s.displayValue:Se.html`
|
|
976
|
+
<ft-tooltip part="relative-item-tooltip" text="${s.value}">${s.displayValue}</ft-tooltip>
|
|
967
977
|
`}
|
|
968
978
|
</ft-floating-menu-item>
|
|
969
979
|
</a>
|
|
970
|
-
`}hideIfEmpty(){let e=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&e?
|
|
980
|
+
`}hideIfEmpty(){let e=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&e?Se.html`
|
|
971
981
|
<style>
|
|
972
982
|
:host {
|
|
973
983
|
display: none !important;
|
|
974
984
|
}
|
|
975
985
|
</style>
|
|
976
|
-
`:
|
|
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);})();
|
|
977
987
|
/*! Bundled license information:
|
|
978
988
|
|
|
979
989
|
lit-html/lit-html.js:
|