@fluid-topics/ft-reader-feedback 2.1.18 → 2.1.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.
@@ -110,7 +110,7 @@
110
110
  opacity: ${at.opacityContentOnSurfacePressed};
111
111
  transform: translate(-50%, -50%) scale(1);
112
112
  }
113
- `;var Yt=f(k()),y=f(x()),Us=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.titleFont),Ee=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.contentFont),T={fontFamily:Ee,fontSize:y.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:y.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:y.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:y.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:y.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Me={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Us),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-font-size","",T.fontSize,"20px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",T.letterSpacing,"0.15px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-line-height","",T.lineHeight,"1.2"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",T.textTransform,"inherit")},Ne={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Us),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",T.letterSpacing,"0.105px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",T.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",T.textTransform,"inherit")},Tr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",T.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",T.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",T.letterSpacing,"0.144px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",T.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",T.textTransform,"inherit")},wr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",T.letterSpacing,"0.098px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",T.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",T.textTransform,"inherit")},qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",T.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",T.letterSpacing,"0.496px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",T.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",T.textTransform,"inherit")},Cr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",T.letterSpacing,"0.252px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",T.lineHeight,"1.4"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",T.textTransform,"inherit")},Bt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",T.fontSize,"12px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",T.letterSpacing,"0.396px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",T.lineHeight,"1.33"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",T.textTransform,"inherit")},_r={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",T.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",T.letterSpacing,"0.33px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",T.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",T.textTransform,"inherit")},Rr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",T.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",T.letterSpacing,"1.5px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",T.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",T.textTransform,"uppercase")},_t={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-button-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",T.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",T.letterSpacing,"1.246px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-button-line-height","",T.lineHeight,"1.15"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",T.textTransform,"uppercase")},Fs=Yt.css`
113
+ `;var Yt=f(k()),y=f(x()),Us=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.titleFont),Ee=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.contentFont),T={fontFamily:Ee,fontSize:y.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:y.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:y.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:y.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:y.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Me={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Us),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-font-size","",T.fontSize,"20px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",T.letterSpacing,"0.15px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-line-height","",T.lineHeight,"1.2"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",T.textTransform,"inherit")},Ne={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Us),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",T.letterSpacing,"0.105px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",T.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",T.textTransform,"inherit")},Tr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",T.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",T.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",T.letterSpacing,"0.144px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",T.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",T.textTransform,"inherit")},wr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",T.letterSpacing,"0.098px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",T.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",T.textTransform,"inherit")},qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",T.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",T.letterSpacing,"0.496px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",T.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",T.textTransform,"inherit")},Cr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",T.letterSpacing,"0.252px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",T.lineHeight,"1.4"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",T.textTransform,"inherit")},Ht={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",T.fontSize,"12px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",T.letterSpacing,"0.396px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",T.lineHeight,"1.33"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",T.textTransform,"inherit")},_r={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",T.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",T.letterSpacing,"0.33px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",T.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",T.textTransform,"inherit")},Rr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",T.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",T.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",T.letterSpacing,"1.5px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",T.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",T.textTransform,"uppercase")},_t={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ee),fontSize:y.FtCssVariableFactory.extend("--ft-typography-button-font-size","",T.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",T.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",T.letterSpacing,"1.246px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-button-line-height","",T.lineHeight,"1.15"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",T.textTransform,"uppercase")},Fs=Yt.css`
114
114
  .ft-typography--title {
115
115
  font-family: ${Me.fontFamily};
116
116
  font-size: ${Me.fontSize};
@@ -167,12 +167,12 @@
167
167
  }
168
168
  `,Pi=Yt.css`
169
169
  .ft-typography--caption {
170
- font-family: ${Bt.fontFamily};
171
- font-size: ${Bt.fontSize};
172
- font-weight: ${Bt.fontWeight};
173
- letter-spacing: ${Bt.letterSpacing};
174
- line-height: ${Bt.lineHeight};
175
- text-transform: ${Bt.textTransform};
170
+ font-family: ${Ht.fontFamily};
171
+ font-size: ${Ht.fontSize};
172
+ font-weight: ${Ht.fontWeight};
173
+ letter-spacing: ${Ht.letterSpacing};
174
+ line-height: ${Ht.lineHeight};
175
+ text-transform: ${Ht.textTransform};
176
176
  }
177
177
  `,zs=Yt.css`
178
178
  .ft-typography--breadcrumb {
@@ -460,7 +460,7 @@
460
460
  ${(0,O.setVariable)(tr.size,j.iconSize)};
461
461
  ${(0,O.setVariable)(tr.color,"var(--button-internal-color)")};
462
462
  }
463
- `;var Z=f(x());var Q={textColor:Z.FtCssVariableFactory.extend("--ft-switch-text-color","",Z.designSystemVariables.colorOnSurfaceHigh),backgroundColor:Z.FtCssVariableFactory.extend("--ft-switch-background-color","",Z.designSystemVariables.colorSurface),selectedTextColor:Z.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",Z.designSystemVariables.colorPrimary),selectedBackgroundColor:Z.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",Z.designSystemVariables.colorPrimary),borderColor:Z.FtCssVariableFactory.extend("--ft-switch-border-color","",Z.designSystemVariables.colorOutline),borderRadius:Z.FtCssVariableFactory.extend("--ft-switch-border-radius","",Z.designSystemVariables.borderRadiusL),fontSize:Z.FtCssVariableFactory.extend("--ft-switch-font-size","",_t.fontSize),iconSize:Z.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:Z.FtCssVariableFactory.extend("--ft-switch-text-color","",Z.designSystemVariables.colorOnSurfaceMedium),rippleColor:Z.FtCssVariableFactory.extend("--ft-switch-ripple-color","",Z.designSystemVariables.colorPrimary),outlineColor:Z.FtCssVariableFactory.extend("--ft-switch-outline-color","",Z.designSystemVariables.colorPrimary)};var ge={feedbackInputMinWidth:V.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","","SIZE","300px"),ratedDateColor:V.FtCssVariableFactory.external(V.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color","",V.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color","",V.designSystemVariables.colorPrimary),filledRatingColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color","",V.designSystemVariables.colorPrimary),emptyRatingColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color","",V.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:V.FtCssVariableFactory.external(Me.fontSize,"Typography"),sectionTitleFontSize:V.FtCssVariableFactory.external(Ne.fontSize,"Typography"),starsBackgroundColor:V.FtCssVariableFactory.create("--ft-reader-feedback-stars-background-color","","COLOR",V.designSystemVariables.colorSurface)},ia=ra.css`
463
+ `;var Q=f(x());var J={textColor:Q.FtCssVariableFactory.extend("--ft-switch-text-color","",Q.designSystemVariables.colorOnSurfaceHigh),backgroundColor:Q.FtCssVariableFactory.extend("--ft-switch-background-color","",Q.designSystemVariables.colorSurface),selectedTextColor:Q.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",Q.designSystemVariables.colorPrimary),selectedBackgroundColor:Q.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",Q.designSystemVariables.colorPrimary),borderColor:Q.FtCssVariableFactory.extend("--ft-switch-border-color","",Q.designSystemVariables.colorOutline),borderRadius:Q.FtCssVariableFactory.extend("--ft-switch-border-radius","",Q.designSystemVariables.borderRadiusL),fontSize:Q.FtCssVariableFactory.extend("--ft-switch-font-size","",_t.fontSize),iconSize:Q.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:Q.FtCssVariableFactory.extend("--ft-switch-text-color","",Q.designSystemVariables.colorOnSurfaceMedium),rippleColor:Q.FtCssVariableFactory.extend("--ft-switch-ripple-color","",Q.designSystemVariables.colorPrimary),outlineColor:Q.FtCssVariableFactory.extend("--ft-switch-outline-color","",Q.designSystemVariables.colorPrimary)};var ge={feedbackInputMinWidth:V.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","","SIZE","300px"),ratedDateColor:V.FtCssVariableFactory.external(V.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color","",V.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color","",V.designSystemVariables.colorPrimary),filledRatingColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color","",V.designSystemVariables.colorPrimary),emptyRatingColor:V.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color","",V.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:V.FtCssVariableFactory.external(Me.fontSize,"Typography"),sectionTitleFontSize:V.FtCssVariableFactory.external(Ne.fontSize,"Typography"),starsBackgroundColor:V.FtCssVariableFactory.create("--ft-reader-feedback-stars-background-color","","COLOR",V.designSystemVariables.colorSurface)},ia=ra.css`
464
464
  .ft-reader-feedback {
465
465
  box-sizing: border-box;
466
466
  display: flex;
@@ -488,8 +488,8 @@
488
488
  .ft-reader-feedback--rating {
489
489
  ${(0,V.setVariable)(j.color,ge.emptyRatingColor)};
490
490
  ${(0,V.setVariable)(j.rippleColor,ge.filledRatingColor)};
491
- ${(0,V.setVariable)(Q.textColor,ge.emptyRatingColor)};
492
- ${(0,V.setVariable)(Q.selectedTextColor,ge.filledRatingColor)};
491
+ ${(0,V.setVariable)(J.textColor,ge.emptyRatingColor)};
492
+ ${(0,V.setVariable)(J.selectedTextColor,ge.filledRatingColor)};
493
493
  }
494
494
 
495
495
  .ft-reader-feedback--rating .ft-reader-feedback--active {
@@ -526,7 +526,7 @@
526
526
  </${go(this.element)}>
527
527
  `:yo`
528
528
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
529
- `}};tt.styles=[Fs,Bs,Hs,js,Or,Vs,Pi,zs,Ws,Ks,Gs];nl([(0,bo.property)()],tt.prototype,"element",void 0);nl([(0,bo.property)()],tt.prototype,"variant",void 0);var al=f(x());var sl={"ft-typography":tt};(0,al.customElements)(sl);var wn=f(k()),xe=f(F()),gu=f(we()),Le=f(x());var qr=f(k()),Mt=f(F()),Yr=f(x());var cl=f(k()),bt=f(F()),ul=f(we()),ni=f(x());var Pt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},$=class extends ni.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 ni.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new ni.Debouncer(10),this.moveRipple=t=>{var r,i;let{x:n,y:o}=this.getCoordinates(t),s=(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-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"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 cl.html`
529
+ `}};tt.styles=[Fs,Bs,Hs,js,Or,Vs,Pi,zs,Ws,Ks,Gs];nl([(0,bo.property)()],tt.prototype,"element",void 0);nl([(0,bo.property)()],tt.prototype,"variant",void 0);var al=f(x());var sl={"ft-typography":tt};(0,al.customElements)(sl);var wn=f(k()),xe=f(F()),gu=f(we()),Le=f(x());var qr=f(k()),Nt=f(F()),Yr=f(x());var cl=f(k()),bt=f(F()),ul=f(we()),ni=f(x());var Pt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},$=class extends ni.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 ni.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new ni.Debouncer(10),this.moveRipple=t=>{var r,i;let{x:n,y:o}=this.getCoordinates(t),s=(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-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"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 cl.html`
530
530
  <style>
531
531
  .ft-ripple .ft-ripple--effect {
532
532
  left: ${this.originX}px;
@@ -568,10 +568,10 @@
568
568
  position: relative;
569
569
  word-break: break-word;
570
570
  }
571
- `;var gl=["top","right","bottom","left"],ml=["start","end"],So=gl.reduce((e,t)=>e.concat(t,t+"-"+ml[0],t+"-"+ml[1]),[]),si=Math.min,Fe=Math.max,ai=Math.round;var ve=e=>({x:e,y:e}),Rd={left:"right",right:"left",bottom:"top",top:"bottom"};function vl(e,t,r){return Fe(e,si(t,r))}function $i(e,t){return typeof e=="function"?e(t):e}function li(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Eo(e){return e==="y"?"height":"width"}function Ui(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function To(e){return Ao(Ui(e))}function yl(e,t,r){r===void 0&&(r=!1);let i=Be(e),n=To(e),o=Eo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xo(s)),[s,xo(s)]}function bl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function xo(e){let t=li(e);return Rd[t]+e.slice(t.length)}function Od(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function xl(e){return typeof e!="number"?Od(e):{top:e,right:e,bottom:e,left:e}}function nr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function Sl(e,t,r){let{reference:i,floating:n}=e,o=Ui(t),s=To(t),a=Eo(s),l=li(t),c=o==="y",u=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,d=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}let m=Be(t);return m&&(h[s]+=d*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Al(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=$i(t,e),m=xl(h),b=a[d?p==="floating"?"reference":"floating":p],S=nr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},pt=nr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(S.top-pt.top+m.top)/I.y,bottom:(pt.bottom-S.bottom+m.bottom)/I.y,left:(S.left-pt.left+m.left)/I.x,right:(pt.right-S.right+m.right)/I.x}}var Id=50,El=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Al},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:p}=Sl(c,i,l),d=i,h=0,m={};for(let g=0;g<o.length;g++){let b=o[g];if(!b)continue;let{name:S,fn:E}=b,{x:R,y:I,data:pt,reset:st}=await E({x:u,y:p,initialPlacement:i,placement:d,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=R??u,p=I??p,m[S]={...m[S],...pt},st&&h<Id&&(h++,typeof st=="object"&&(st.placement&&(d=st.placement),st.rects&&(c=st.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):st.rects),{x:u,y:p}=Sl(c,d,l)),g=-1)}return{x:u,y:p,placement:d,strategy:n,middlewareData:m}};function Ld(e,t,r){return(e?[...r.filter(n=>Be(n)===e),...r.filter(n=>Be(n)!==e)]:r.filter(n=>li(n)===n)).filter(n=>e?Be(n)===e||(t?bl(n)!==n:!1):!0)}var Tl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:p,allowedPlacements:d=So,autoAlignment:h=!0,...m}=$i(e,t),g=p!==void 0||d===So?Ld(p||null,h,d):d,b=((r=s.autoPlacement)==null?void 0:r.index)||0,S=g[b];if(S==null)return{};if(a!==S)return{reset:{placement:g[0]}};let E=await l.detectOverflow(t,m),R=yl(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),I=[E[li(S)],E[R[0]],E[R[1]]],pt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:S,overflows:I}],st=g[b+1];if(st)return{data:{index:b+1,overflows:pt},reset:{placement:st}};let Pe=pt.map(Ut=>{let Kt=Be(Ut.placement);return[Ut.placement,Kt&&u?Ut.overflows.slice(0,2).reduce((Ft,Je)=>Ft+Je,0):Ut.overflows[0],Ut.overflows]}).sort((Ut,Kt)=>Ut[1]-Kt[1]),ke=((n=Pe.filter(Ut=>Ut[2].slice(0,Be(Ut[0])?2:3).every(Kt=>Kt<=0))[0])==null?void 0:n[0])||Pe[0][0];return ke!==a?{data:{index:b+1,overflows:pt},reset:{placement:ke}}:{}}}};var wl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:I}=E;return{x:R,y:I}}},...c}=$i(e,t),u={x:r,y:i},p=await o.detectOverflow(t,c),d=Ui(n),h=Ao(d),m=u[h],g=u[d],b=(E,R)=>vl(R+p[E==="y"?"top":"left"],R,R-p[E==="y"?"bottom":"right"]);s&&(m=b(h,m)),a&&(g=b(d,g));let S=l.fn({...t,[h]:m,[d]:g});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[d]:a}}}}}};function Bi(){return typeof window<"u"}function sr(e){return _l(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(_l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _l(e){return Bi()?e instanceof Node||e instanceof kt(e).Node:!1}function ce(e){return Bi()?e instanceof Element||e instanceof kt(e).Element:!1}function _e(e){return Bi()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Cl(e){return!Bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function ci(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Rl(e){return/^(table|td|th)$/.test(sr(e))}function ui(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pd=/transform|translate|scale|rotate|perspective|filter/,kd=/paint|layout|strict|content/,or=e=>!!e&&e!=="none",wo;function Pr(e){let t=ce(e)?ue(e):e;return or(t.transform)||or(t.translate)||or(t.scale)||or(t.rotate)||or(t.perspective)||!Hi()&&(or(t.backdropFilter)||or(t.filter))||Pd.test(t.willChange||"")||kd.test(t.contain||"")}function Ol(e){let t=He(e);for(;_e(t)&&!kr(t);){if(Pr(t))return t;if(ui(t))return null;t=He(t)}return null}function Hi(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function kr(e){return/^(html|body|#document)$/.test(sr(e))}function ue(e){return kt(e).getComputedStyle(e)}function di(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(sr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Cl(e)&&e.host||Ce(e);return Cl(t)?t.host:t}function Il(e){let t=He(e);return kr(t)?(e.ownerDocument||e).body:_e(t)&&ci(t)?t:Il(t)}function Fi(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Il(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=kt(n);if(o){let a=ji(s);return t.concat(s,s.visualViewport||[],ci(n)?n:[],a&&r?Fi(a):[])}else return t.concat(n,Fi(n,[],r))}function ji(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kl(e){let t=ue(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=_e(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=ai(r)!==o||ai(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Dl(e){return ce(e)?e:e.contextElement}function Dr(e){let t=Dl(e);if(!_e(t))return ve(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=kl(t),s=(o?ai(r.width):r.width)/i,a=(o?ai(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Dd=ve(0);function Ml(e){let t=kt(e);return!Hi()||!t.visualViewport?Dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Md(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===kt(e)}function pi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Dl(e),s=ve(1);t&&(i?ce(i)&&(s=Dr(i)):s=Dr(e));let a=Md(o,r,i)?Ml(o):ve(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&i){let d=kt(o),h=ce(i)?kt(i):i,m=d,g=ji(m);for(;g&&h!==m;){let b=Dr(g),S=g.getBoundingClientRect(),E=ue(g),R=S.left+(g.clientLeft+parseFloat(E.paddingLeft))*b.x,I=S.top+(g.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=R,c+=I,m=kt(g),g=ji(m)}}return nr({width:u,height:p,x:l,y:c})}function Vi(e,t){let r=di(e).scrollLeft;return t?t.left+r:pi(Ce(e)).left+r}function Nl(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vi(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function Nd(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=Ce(i),a=t?ui(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ve(1),u=ve(0),p=_e(i);if((p||!o)&&((sr(i)!=="body"||ci(s))&&(l=di(i)),p)){let h=pi(i);c=Dr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let d=s&&!p&&!o?Nl(s,l):ve(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-l.scrollTop*c.y+u.y+d.y}}function $d(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ud(e){let t=di(e),r=e.ownerDocument.body,i=Fe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Fe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+Vi(e),s=-t.scrollTop;return ue(r).direction==="rtl"&&(o+=Fe(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Fd=25;function Bd(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=kt(e),o=Ce(e),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let d=!Hi()||t==="fixed";i?d||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,d&&(c=s.offsetLeft,u=s.offsetTop))}if(Vi(o)<=0){let d=o.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(o.clientWidth-h.clientWidth-g),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;S<=Fd&&(a-=S)}return{width:a,height:l,x:c,y:u}}function Hd(e,t){let r=pi(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=Dr(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Ll(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=Bd(e,r,t);else if(t==="document")i=Ud(Ce(e));else if(ce(t))i=Hd(t,r);else{let n=Ml(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nr(i)}function jd(e,t){let r=t.get(e);if(r)return r;let i=Fi(e,[],!1).filter(a=>ce(a)&&sr(a)!=="body"),n=null,o=ue(e).position==="fixed",s=o?He(e):e;for(;ce(s)&&!kr(s);){let a=ue(s),l=Pr(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):n=a,s=He(s)}return t.set(e,i),i}function Vd(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?ui(t)?[]:jd(t,this._c):[].concat(r),i],a=Ll(t,s[0],n),l=a.top,c=a.right,u=a.bottom,p=a.left;for(let d=1;d<s.length;d++){let h=Ll(t,s[d],n);l=Fe(h.top,l),c=si(h.right,c),u=si(h.bottom,u),p=Fe(h.left,p)}return{width:c-p,height:u-l,x:p,y:l}}function zd(e){let{width:t,height:r}=kl(e);return{width:t,height:r}}function Wd(e,t,r){let i=_e(t),n=Ce(t),o=r==="fixed",s=pi(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=ve(0);if((i||!o)&&((sr(t)!=="body"||ci(n))&&(a=di(t)),i)){let d=pi(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!i&&n&&(l.x=Vi(n));let c=n&&!i&&!o?Nl(n,a):ve(0),u=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:u,y:p,width:s.width,height:s.height}}function Co(e){return ue(e).position==="static"}function Pl(e,t){if(!_e(e)||ue(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ce(e)===r&&(r=r.ownerDocument.body),r}function $l(e,t){let r=kt(e);if(ui(e))return r;if(!_e(e)){let n=He(e);for(;n&&!kr(n);){if(ce(n)&&!Co(n))return n;n=He(n)}return r}let i=Pl(e,t);for(;i&&Rl(i)&&Co(i);)i=Pl(i,t);return i&&kr(i)&&Co(i)&&!Pr(i)?r:i||Ol(e)||r}var Kd=async function(e){let t=this.getOffsetParent||$l,r=this.getDimensions,i=await r(e.floating);return{reference:Wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Gd(e){return ue(e).direction==="rtl"}var zi={convertOffsetParentRelativeRectToViewportRelativeRect:Nd,getDocumentElement:Ce,getClippingRect:Vd,getOffsetParent:$l,getElementRects:Kd,getClientRects:$d,getDimensions:zd,getScale:Dr,isElement:ce,isRTL:Gd};var Ul=Tl,Fl=wl;var Bl=(e,t,r)=>{let i=new Map,n=r??{},o={...zi,...n.platform,_c:i};return El(e,t,{...n,platform:o})};function Hl(e){return qd(e)}function _o(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function qd(e){for(let t=e;t;t=_o(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_o(e);t;t=_o(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Pr(r)||t.tagName==="BODY"))return t}return null}async function jl(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Bl(e,t,{strategy:i.strategy,platform:{...zi,getOffsetParent:n=>zi.getOffsetParent(n,Hl)},middleware:[Fl({crossAxis:!0}),Ul({allowedPlacements:[i.placement]})]})}var Gr=f(x());var Jo=f(F());var Vl=f(F(),1);var Ro=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function zl(e,t){return(0,Vl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return fi(e);try{return JSON.parse(r)}catch{return fi(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:hi,...t??{}})}function Yd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Wi(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Wi(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Wi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wi(e,t){try{return Yd(e,t)}catch{return!1}}function hi(e,t){return!Wi(e,t)}function fi(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Ki(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Wl=f(F(),1);var Oo=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:hi,attribute:!1,...t};(0,Wl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Gi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var ar=f(F(),1);var qi=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>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 Gl=f(k(),1);var Yi=globalThis,Xd=Yi.ShadowRoot&&(Yi.ShadyCSS===void 0||Yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Kl=(e,t)=>{if(Xd)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Xi=class extends Gl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Kl(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Ro(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function ql(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Nr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ql,Yl=Symbol("constructorPrototype"),Xl=Symbol("constructorName"),Jl=Symbol("exportpartsDebouncer"),Zl=Symbol("dynamicDependenciesLoaded"),Mr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Mr.eventName="exportparts-updated";var ye=class extends Xi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ql]=new qi(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Jl].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[Xl]=this.constructor.name,this[Yl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xl]&&Object.setPrototypeOf(this,this[Yl])}connectedCallback(){var t;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[Zl]||(r[Zl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Mr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ql(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){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(t.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(t){var r,i,n,o,s,a;let l=d=>d!=null&&d.trim().length>0,c=t.filter(l).map(d=>d.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let d of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=d.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=d.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(b=>b.trim());for(let b of g)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(d=>c.map(h=>`${d}:${h}--${d}`));this.exportparts=[...this.part,...p].join(", ")}};Ql=Jl;Nr([(0,ar.property)()],ye.prototype,"exportpartsPrefix",void 0);Nr([zl([])],ye.prototype,"exportpartsPrefixes",void 0);Nr([(0,ar.property)({reflect:!0})],ye.prototype,"exportparts",void 0);Nr([(0,ar.property)()],ye.prototype,"customStylesheet",void 0);Nr([(0,ar.property)()],ye.prototype,"elementToFocus",void 0);Nr([(0,ar.state)()],ye.prototype,"useAdoptedStyleSheets",void 0);function Zi(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var mi=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),lr=Symbol("internalStores"),Zd=Ki(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=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[lr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[lr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[lr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[lr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[lr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[lr].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[je].has(s.store):this[je].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[je].set(s,a.subscribe(()=>this.updateFromStores())),this[mi].set(s,[]),Zi(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 p=d=>this[u](d);a.addEventListener(c.eventName,p),this[mi].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[je].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[je].has(s)&&this[je].get(s)(),this[je].delete(s),(a=this[mi].get(s))===null||a===void 0||a.forEach(l=>l()),this[mi].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=je,r=lr,i=mi,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),tc=class extends Zd(ye){};function Qt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Re(e){return!!e&&!!e[G]}function de(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===op})(e)||Array.isArray(e)||!!e[ac]||!!(!((t=e.constructor)===null||t===void 0)&&t[ac])||Uo(e)||Fo(e))}function cr(e,t,r){r===void 0&&(r=!1),Fr(e)===0?(r?Object.keys:Ur)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function Fr(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Uo(e)?2:Fo(e)?3:0}function $r(e,t){return Fr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qd(e,t){return Fr(e)===2?e.get(t):e[t]}function lc(e,t,r){var i=Fr(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function cc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Uo(e){return ip&&e instanceof Map}function Fo(e){return np&&e instanceof Set}function Ve(e){return e.o||e.t}function Bo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=pc(e);delete t[G];for(var r=Ur(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Ho(e,t){return t===void 0&&(t=!1),jo(e)||Re(e)||!de(e)||(Fr(e)>1&&(e.set=e.add=e.clear=e.delete=Jd),Object.freeze(e),t&&cr(e,(function(r,i){return Ho(i,!0)}),!0)),e}function Jd(){Qt(2)}function jo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function be(e){var t=$o[e];return t||Qt(18,e),t}function tp(e,t){$o[e]||($o[e]=t)}function Do(){return vi}function Io(e,t){t&&(be("Patches"),e.u=[],e.s=[],e.v=t)}function Qi(e){Mo(e),e.p.forEach(ep),e.p=null}function Mo(e){e===vi&&(vi=e.l)}function ec(e){return vi={p:[],l:vi,h:e,m:!0,_:0}}function ep(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Lo(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||be("ES5").S(t,e,i),i?(r[G].P&&(Qi(t),Qt(4)),de(e)&&(e=Ji(t,e),t.l||tn(t,e)),t.u&&be("Patches").M(r[G].t,e,t.u,t.s)):e=Ji(t,r,[]),Qi(t),t.u&&t.v(t.u,t.s),e!==dc?e:void 0}function Ji(e,t,r){if(jo(t))return t;var i=t[G];if(!i)return cr(t,(function(a,l){return rc(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return tn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Bo(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),cr(o,(function(a,l){return rc(e,i,n,a,l,r,s)})),tn(e,n,!1),r&&e.u&&be("Patches").N(i,r,e.u,e.s)}return i.o}function rc(e,t,r,i,n,o,s){if(Re(n)){var a=Ji(e,n,o&&t&&t.i!==3&&!$r(t.R,i)?o.concat(i):void 0);if(lc(r,i,a),!Re(a))return;e.m=!1}else s&&r.add(n);if(de(n)&&!jo(n)){if(!e.h.D&&e._<1)return;Ji(e,n),t&&t.A.l||tn(e,n)}}function tn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Ho(t,r)}function Po(e,t){var r=e[G];return(r?Ve(r):e)[t]}function ic(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function ze(e){e.P||(e.P=!0,e.l&&ze(e.l))}function ko(e){e.o||(e.o=Bo(e.t))}function No(e,t,r){var i=Uo(t)?be("MapSet").F(t,r):Fo(t)?be("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Do(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=yi;s&&(l=[a],c=gi);var u=Proxy.revocable(l,c),p=u.revoke,d=u.proxy;return a.k=d,a.j=p,d})(t,r):be("ES5").J(t,r);return(r?r.A:Do()).p.push(i),i}function rp(e){return Re(e)||Qt(22,e),(function t(r){if(!de(r))return r;var i,n=r[G],o=Fr(r);if(n){if(!n.P&&(n.i<4||!be("ES5").K(n)))return n.t;n.I=!0,i=nc(r,o),n.I=!1}else i=nc(r,o);return cr(i,(function(s,a){n&&Qd(n.t,s)===a||lc(i,s,t(a))})),o===3?new Set(i):i})(e)}function nc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bo(e)}function uc(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[G];return yi.get(c,s)},set:function(c){var u=this[G];yi.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][G];if(!l.P)switch(l.i){case 5:i(l)&&ze(l);break;case 4:r(l)&&ze(l)}}}function r(s){for(var a=s.t,l=s.k,c=Ur(l),u=c.length-1;u>=0;u--){var p=c[u];if(p!==G){var d=a[p];if(d===void 0&&!$r(a,p))return!0;var h=l[p],m=h&&h[G];if(m?m.t!==d:!cc(h,d))return!0}}var g=!!a[G];return c.length!==Ur(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&Qt(3,JSON.stringify(Ve(s)))}var o={};tp("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,d){if(p){for(var h=Array(d.length),m=0;m<d.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var g=pc(d);delete g[G];for(var b=Ur(g),S=0;S<b.length;S++){var E=b[S];g[E]=e(E,p||!!g[E].enumerable)}return Object.create(Object.getPrototypeOf(d),g)})(l,s),u={i:l?5:4,A:a?a.A:Do(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,G,{value:u,writable:!0}),c},S:function(s,a,l){l?Re(a)&&a[G].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var p=u[G];if(p){var d=p.t,h=p.k,m=p.R,g=p.i;if(g===4)cr(h,(function(I){I!==G&&(d[I]!==void 0||$r(d,I)?m[I]||c(h[I]):(m[I]=!0,ze(p)))})),cr(d,(function(I){h[I]!==void 0||$r(h,I)||(m[I]=!1,ze(p))}));else if(g===5){if(i(p)&&(ze(p),m.length=!0),h.length<d.length)for(var b=h.length;b<d.length;b++)m[b]=!1;else for(var S=d.length;S<h.length;S++)m[S]=!0;for(var E=Math.min(h.length,d.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var oc,vi,Vo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ip=typeof Map<"u",np=typeof Set<"u",sc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",dc=Vo?Symbol.for("immer-nothing"):((oc={})["immer-nothing"]=!0,oc),ac=Vo?Symbol.for("immer-draftable"):"__$immer_draftable",G=Vo?Symbol.for("immer-state"):"__$immer_state";var op=""+Object.prototype.constructor,Ur=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,pc=Object.getOwnPropertyDescriptors||function(e){var t={};return Ur(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},$o={},yi={get:function(e,t){if(t===G)return e;var r=Ve(e);if(!$r(r,t))return(function(n,o,s){var a,l=ic(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!de(i)?i:i===Po(e.t,t)?(ko(e),e.o[t]=No(e.A.h,i,e)):i},has:function(e,t){return t in Ve(e)},ownKeys:function(e){return Reflect.ownKeys(Ve(e))},set:function(e,t,r){var i=ic(Ve(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=Po(Ve(e),t),o=n?.[G];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(cc(r,n)&&(r!==void 0||$r(e.t,t)))return!0;ko(e),ze(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Po(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ko(e),ze(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ve(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){Qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Qt(12)}},gi={};cr(yi,(function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gi.deleteProperty=function(e,t){return gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return yi.set.call(this,e[0],t,r,e[0])};var sp=(function(){function e(r){var i=this;this.O=sc,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var b=this;g===void 0&&(g=a);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return l.produce(g,(function(I){var pt;return(pt=o).call.apply(pt,[b,I].concat(E))}))}}var c;if(typeof o!="function"&&Qt(6),s!==void 0&&typeof s!="function"&&Qt(7),de(n)){var u=ec(i),p=No(i,n,void 0),d=!0;try{c=o(p),d=!1}finally{d?Qi(u):Mo(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Io(u,s),Lo(g,u)}),(function(g){throw Qi(u),g})):(Io(u,s),Lo(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===dc&&(c=void 0),i.D&&Ho(c,!0),s){var h=[],m=[];be("Patches").M(n,c,h,m),s(h,m)}return c}Qt(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,p=Array(u>1?u-1:0),d=1;d<u;d++)p[d-1]=arguments[d];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(p))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){de(r)||Qt(8),Re(r)&&(r=rp(r));var i=ec(this),n=No(this,r,void 0);return n[G].C=!0,Mo(i),n},t.finishDraft=function(r,i){var n=r&&r[G],o=n.A;return Io(o,i),Lo(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!sc&&Qt(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=be("Patches").$;return Re(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),Ht=new sp,ap=Ht.produce,sm=Ht.produceWithPatches.bind(Ht),am=Ht.setAutoFreeze.bind(Ht),lm=Ht.setUseProxies.bind(Ht),cm=Ht.applyPatches.bind(Ht),um=Ht.createDraft.bind(Ht),dm=Ht.finishDraft.bind(Ht),en=ap;function ur(e){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(e)}function fc(e,t){if(ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(ur(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hc(e){var t=fc(e,"string");return ur(t)=="symbol"?t:t+""}function mc(e,t,r){return(t=hc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gc(Object(r),!0).forEach(function(i){mc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function At(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var vc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Wo=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+Wo(),REPLACE:"@@redux/REPLACE"+Wo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wo()}};function lp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ko(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(At(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(At(1));return r(Ko)(e,t)}if(typeof e!="function")throw new Error(At(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(At(3));return o}function p(g){if(typeof g!="function")throw new Error(At(4));if(l)throw new Error(At(5));var b=!0;return c(),a.push(g),function(){if(b){if(l)throw new Error(At(6));b=!1,c();var E=a.indexOf(g);a.splice(E,1),s=null}}}function d(g){if(!lp(g))throw new Error(At(7));if(typeof g.type>"u")throw new Error(At(8));if(l)throw new Error(At(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var b=s=a,S=0;S<b.length;S++){var E=b[S];E()}return g}function h(g){if(typeof g!="function")throw new Error(At(10));n=g,d({type:rn.REPLACE})}function m(){var g,b=p;return g={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(At(11));function R(){E.next&&E.next(u())}R();var I=b(R);return{unsubscribe:I}}},g[vc]=function(){return this},g}return d({type:rn.INIT}),i={dispatch:d,subscribe:p,getState:u,replaceReducer:h},i[vc]=m,i}function cp(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:rn.INIT});if(typeof i>"u")throw new Error(At(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(At(13))})}function yc(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{cp(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var d=!1,h={},m=0;m<o.length;m++){var g=o[m],b=r[g],S=c[g],E=b(S,u);if(typeof E>"u"){var R=u&&u.type;throw new Error(At(14))}h[g]=E,d=d||E!==S}return d=d||o.length!==Object.keys(c).length,d?h:c}}function Br(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function bc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(At(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=Br.apply(void 0,a)(n.dispatch),zo(zo({},n),{},{dispatch:o})}}}function xc(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Sc=xc();Sc.withExtraArgument=xc;var Go=Sc;var Cc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),up=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Hr=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},dp=Object.defineProperty,pp=Object.defineProperties,fp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,hp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,Ec=function(e,t,r){return t in e?dp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},We=function(e,t){for(var r in t||(t={}))hp.call(t,r)&&Ec(e,r,t[r]);if(Ac)for(var i=0,n=Ac(t);i<n.length;i++){var r=n[i];mp.call(t,r)&&Ec(e,r,t[r])}return e},qo=function(e,t){return pp(e,fp(t))},gp=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var vp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Br:Br.apply(null,arguments)},Om=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function yp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function Ke(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return We(We({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var bp=(function(e){Cc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Hr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Hr([void 0],r.concat(this))))},t})(Array),xp=(function(e){Cc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Hr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Hr([void 0],r.concat(this))))},t})(Array);function Zo(e){return de(e)?en(e,function(){}):e}function Sp(e){return typeof e=="boolean"}function Ap(){return function(t){return Ep(t)}}function Ep(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new bp;if(r&&(Sp(r)?c.push(Go):c.push(Go.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var p;if(l)var d}return c}var Yo=!0;function _c(e){var t=Ap(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,p=r.enhancers,d=p===void 0?void 0:p,h;if(typeof n=="function")h=n;else if(yp(n))h=yc(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Yo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yo&&m.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=bc.apply(void 0,m),b=Br;l&&(b=vp(We({trace:!Yo},typeof l=="object"&&l)));var S=new xp(g),E=S;Array.isArray(d)?E=Hr([g],d):typeof d=="function"&&(E=d(S));var R=b.apply(void 0,E);return Ko(h,u,R)}function Rc(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function Tp(e){return typeof e=="function"}function wp(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?Rc(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(Tp(e))l=function(){return Zo(e())};else{var c=Zo(e);l=function(){return c}}function u(p,d){p===void 0&&(p=l());var h=Hr([o[d.type]],s.filter(function(m){var g=m.matcher;return g(d)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Re(m)){var b=m,S=g(b,d);return S===void 0?m:S}else{if(de(m))return en(m,function(E){return g(E,d)});var S=g(m,d);if(S===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return m},p)}return u.getInitialState=l,u}function Cp(e,t){return e+"/"+t}function Oc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Zo(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var p=i[u],d=Cp(t,u),h,m;"reducer"in p?(h=p.reducer,m=p.prepare):h=p,o[u]=h,s[d]=h,a[u]=m?Ke(d,m):Ke(d)});function l(){var u=typeof e.extraReducers=="function"?Rc(e.extraReducers):[e.extraReducers],p=u[0],d=p===void 0?{}:p,h=u[1],m=h===void 0?[]:h,g=u[2],b=g===void 0?void 0:g,S=We(We({},d),s);return wp(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var I=0,pt=m;I<pt.length;I++){var st=pt[I];E.addMatcher(st.matcher,st.reducer)}b&&E.addDefaultCase(b)})}var c;return{name:t,reducer:function(u,p){return c||(c=l()),c(u,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var _p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=_p[Math.random()*64|0];return t},Op=["name","message","stack","code"],Xo=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Tc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ip=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Op;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},km=(function(){function e(t,r,i){var n=Ke(t+"/fulfilled",function(u,p,d,h){return{payload:u,meta:qo(We({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),o=Ke(t+"/pending",function(u,p,d){return{payload:void 0,meta:qo(We({},d||{}),{arg:p,requestId:u,requestStatus:"pending"})}}),s=Ke(t+"/rejected",function(u,p,d,h,m){return{payload:h,error:(i&&i.serializeError||Ip)(u||"Rejected"),meta:qo(We({},m||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(p,d,h){var m=i?.idGenerator?i.idGenerator(u):Rp(),g=new l,b,S=!1;function E(I){b=I,g.abort()}var R=(function(){return gp(this,null,function(){var I,pt,st,Pe,ro,ke,Ut;return up(this,function(Kt){switch(Kt.label){case 0:return Kt.trys.push([0,4,,5]),Pe=(I=i?.condition)==null?void 0:I.call(i,u,{getState:d,extra:h}),Pp(Pe)?[4,Pe]:[3,2];case 1:Pe=Kt.sent(),Kt.label=2;case 2:if(Pe===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,ro=new Promise(function(Ft,Je){return g.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:b||"Aborted"})})}),p(o(m,u,(pt=i?.getPendingMeta)==null?void 0:pt.call(i,{requestId:m,arg:u},{getState:d,extra:h}))),[4,Promise.race([ro,Promise.resolve(r(u,{dispatch:p,getState:d,extra:h,requestId:m,signal:g.signal,abort:E,rejectWithValue:function(Ft,Je){return new Xo(Ft,Je)},fulfillWithValue:function(Ft,Je){return new Tc(Ft,Je)}})).then(function(Ft){if(Ft instanceof Xo)throw Ft;return Ft instanceof Tc?n(Ft.payload,m,u,Ft.meta):n(Ft,m,u)})])];case 3:return st=Kt.sent(),[3,5];case 4:return ke=Kt.sent(),st=ke instanceof Xo?s(null,m,u,ke.payload,ke.meta):s(ke,m,u),[3,5];case 5:return Ut=i&&!i.dispatchConditionRejection&&s.match(st)&&st.meta.condition,Ut||p(st),[2,st]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:u,unwrap:function(){return R.then(Lp)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Lp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Pp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ic="listener",Lc="completed",Pc="cancelled",Dm="task-"+Pc,Mm="task-"+Lc,Nm=Ic+"-"+Pc,$m=Ic+"-"+Lc;var Qo="listenerMiddleware";var Um=Ke(Qo+"/add"),Fm=Ke(Qo+"/removeAll"),Bm=Ke(Qo+"/remove");var wc,Hm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(wc||(wc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},kp=function(e){return function(t){setTimeout(t,e)}},jm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kp(10);uc();var Dp=Ki(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??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)}}}),nn=class extends Dp(Object){};window.ftReduxStores||(window.ftReduxStores={});var kc=class e extends nn{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(Zi(o))return o;if(n==null)return;let s=Oc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=_c({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=fi(s.getInitialState());for(let p of c.keeping)u[p]=(l??u)[p];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 e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Gi;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 p=c(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var on=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,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 t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sn=f(x()),Mp="ft-app-info",Oe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Oe.eventName="authentication-change";var bi=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bi.eventName="ui-locale-changed";var Np={session:(e,t)=>{(0,sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>A.dispatchEvent(new Oe(t.payload)),0))}},A=sn.FtReduxStore.get({name:Mp,reducers:Np,initialState:{baseUrl: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,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Dc=f(x()),an=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},gg=(0,Dc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(A)}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=>on.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return an([(0,Jo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),an([(0,Jo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),an([Oo({store:A.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),an([Oo({store:A.name})],t.prototype,"uiLocale",void 0),t});var pn=f(x());var ts=f(x());var dr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=A.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=A.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var jr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:dr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):dr.await()}};var Et=class extends jr{constructor(t=!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 ts.CacheRegistry,this.cache=t?n.commonCache:new ts.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ln=class extends Et{async listMySearches(){let{session:t}=A.getState();return Te(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var cn=class extends Et{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var un=class extends Et{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var dn=class extends Et{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 t=A.getState().session;return!!t?.sessionAuthenticated}};var $p="ft-user-assets",Up={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(Xt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;rs(e,r,[...es(e,r),n]),Mc(e,r,1,i),Nc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;rs(e,r,es(e,r).map(n=>n.id===i.id?i:n)),Nc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;rs(e,r,es(e,r).filter(o=>o.id!==n)),Mc(e,r,-1,i)}},$c={[Xt.SEARCHES]:"savedSearches",[Xt.BOOKMARKS]:"bookmarks",[Xt.BOOKS]:void 0,[Xt.COLLECTIONS]:void 0},es=(e,t)=>{var r;let i=$c[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},rs=(e,t,r)=>{let i=$c[t];i&&(e[i]=r)},Mc=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===Xt.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Nc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ot=pn.FtReduxStore.get({name:$p,reducers:Up,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Xt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),is=class{constructor(t=new un,r=new dn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new cn,this.savedSearchesService=new ln,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=A.getState();(0,pn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ot.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ot.getState().assetCounts.allAsset[t]!==r.count&&Ot.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ot.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ot.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;t===Xt.BOOKMARKS&&r&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(r)}}},ns=new is;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ns);var os=class{addCommand(t,r=!1){A.commands.add(t,r)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new os;var Jt=f(x());var Uc,Vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Fp=Symbol("clearAfterUnitTest"),fn=class extends(0,Jt.withEventBus)(Et){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Uc]=()=>{this.defaultMessages={},this.cache=new Jt.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,Jt.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new Jt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof Jt.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Vr({loadedContexts:t})),this.dispatchEvent(new Vr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Vr({loadedContexts:[t]})),this.dispatchEvent(new Vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,Jt.delay)(0).then(()=>i()).catch(()=>null)))}};Uc=Fp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var zr=window.FluidTopicsI18nService,hn=window.FluidTopicsCustomI18nService;var Fc=f(x()),ss=class{highlightHtml(t,r,i){(0,Fc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ss;var Bc=f(x());var as=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=A.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return Bc.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:A.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(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new as;var Hc=f(x());var xi=class{static get(t,r){var i,n,o,s;let a=A.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 Hc.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var mn=class extends Et{async sendDocumentStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send khub.search event")}async sendDocumentSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.search event")}async sendSearchPageSelectEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(t){let r;switch(t.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 : "+t.editorialType)}return{id:t.id,title:t.title,type:r,metadata:t.metadata}}sortEventArrays(t){let r=Object.entries(t).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(t,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(t),async()=>(await this.awaitApi).sendEvents(t).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var ls=class{urlToSearchRequest(t){return xi.get().parse(t)}searchRequestToUrl(t){return xi.get().serialize(t)}};window.FluidTopicsUrlService=new ls;var Ie=f(x());var pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};pr.eventName="change";var cs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},jc=new cs;var gn=class e extends Ie.WithEventBus{static build(){return new e(window.history,jc,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},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,Ie.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new pr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.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(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(pr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(pr.eventName,t)}currentItem(){return(0,Ie.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ie.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Ie.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ie.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wr=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var Vc=f(k());var zc=Vc.css`
572
- `;var Gc=f(k()),jt=f(F()),mr=f(x());var fr=f(x());function Wc(e,t){let{authenticationRequired:r,session:i}=A.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var vn=class extends jr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var us=class e extends fr.FtStateManager{static build(t){return new e(A,t)}constructor(t,r){super(),this.store=t,this.cache=new fr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vn,this.cleanSessionDebouncer=new fr.Debouncer,this.reloadDebouncer=new fr.Debouncer(500),this.apiProvider=r??(()=>dr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Oe.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 t=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(t)}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 t;let r=await this.cache.get("availableContentLocales",()=>Wc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new bi(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Kc=us.build();var hr=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Si=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new hr(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Tt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},J=class extends mr.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.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Kc,this.contextRoot=new Si}render(){return Gc.html`
571
+ `;var gl=["top","right","bottom","left"],ml=["start","end"],So=gl.reduce((e,t)=>e.concat(t,t+"-"+ml[0],t+"-"+ml[1]),[]),si=Math.min,Fe=Math.max,ai=Math.round;var ve=e=>({x:e,y:e}),Rd={left:"right",right:"left",bottom:"top",top:"bottom"};function vl(e,t,r){return Fe(e,si(t,r))}function $i(e,t){return typeof e=="function"?e(t):e}function li(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Eo(e){return e==="y"?"height":"width"}function Ui(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function To(e){return Ao(Ui(e))}function yl(e,t,r){r===void 0&&(r=!1);let i=Be(e),n=To(e),o=Eo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xo(s)),[s,xo(s)]}function bl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function xo(e){let t=li(e);return Rd[t]+e.slice(t.length)}function Od(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function xl(e){return typeof e!="number"?Od(e):{top:e,right:e,bottom:e,left:e}}function nr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function Sl(e,t,r){let{reference:i,floating:n}=e,o=Ui(t),s=To(t),a=Eo(s),l=li(t),c=o==="y",u=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,d=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}let m=Be(t);return m&&(h[s]+=d*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Al(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=$i(t,e),m=xl(h),b=a[d?p==="floating"?"reference":"floating":p],S=nr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},pt=nr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(S.top-pt.top+m.top)/I.y,bottom:(pt.bottom-S.bottom+m.bottom)/I.y,left:(S.left-pt.left+m.left)/I.x,right:(pt.right-S.right+m.right)/I.x}}var Id=50,El=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Al},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:p}=Sl(c,i,l),d=i,h=0,m={};for(let g=0;g<o.length;g++){let b=o[g];if(!b)continue;let{name:S,fn:E}=b,{x:R,y:I,data:pt,reset:st}=await E({x:u,y:p,initialPlacement:i,placement:d,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=R??u,p=I??p,m[S]={...m[S],...pt},st&&h<Id&&(h++,typeof st=="object"&&(st.placement&&(d=st.placement),st.rects&&(c=st.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):st.rects),{x:u,y:p}=Sl(c,d,l)),g=-1)}return{x:u,y:p,placement:d,strategy:n,middlewareData:m}};function Ld(e,t,r){return(e?[...r.filter(n=>Be(n)===e),...r.filter(n=>Be(n)!==e)]:r.filter(n=>li(n)===n)).filter(n=>e?Be(n)===e||(t?bl(n)!==n:!1):!0)}var Tl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:p,allowedPlacements:d=So,autoAlignment:h=!0,...m}=$i(e,t),g=p!==void 0||d===So?Ld(p||null,h,d):d,b=((r=s.autoPlacement)==null?void 0:r.index)||0,S=g[b];if(S==null)return{};if(a!==S)return{reset:{placement:g[0]}};let E=await l.detectOverflow(t,m),R=yl(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),I=[E[li(S)],E[R[0]],E[R[1]]],pt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:S,overflows:I}],st=g[b+1];if(st)return{data:{index:b+1,overflows:pt},reset:{placement:st}};let Pe=pt.map(Ft=>{let Kt=Be(Ft.placement);return[Ft.placement,Kt&&u?Ft.overflows.slice(0,2).reduce((Bt,Je)=>Bt+Je,0):Ft.overflows[0],Ft.overflows]}).sort((Ft,Kt)=>Ft[1]-Kt[1]),ke=((n=Pe.filter(Ft=>Ft[2].slice(0,Be(Ft[0])?2:3).every(Kt=>Kt<=0))[0])==null?void 0:n[0])||Pe[0][0];return ke!==a?{data:{index:b+1,overflows:pt},reset:{placement:ke}}:{}}}};var wl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:I}=E;return{x:R,y:I}}},...c}=$i(e,t),u={x:r,y:i},p=await o.detectOverflow(t,c),d=Ui(n),h=Ao(d),m=u[h],g=u[d],b=(E,R)=>vl(R+p[E==="y"?"top":"left"],R,R-p[E==="y"?"bottom":"right"]);s&&(m=b(h,m)),a&&(g=b(d,g));let S=l.fn({...t,[h]:m,[d]:g});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[d]:a}}}}}};function Bi(){return typeof window<"u"}function sr(e){return _l(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(_l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _l(e){return Bi()?e instanceof Node||e instanceof kt(e).Node:!1}function ce(e){return Bi()?e instanceof Element||e instanceof kt(e).Element:!1}function _e(e){return Bi()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Cl(e){return!Bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function ci(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Rl(e){return/^(table|td|th)$/.test(sr(e))}function ui(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pd=/transform|translate|scale|rotate|perspective|filter/,kd=/paint|layout|strict|content/,or=e=>!!e&&e!=="none",wo;function Pr(e){let t=ce(e)?ue(e):e;return or(t.transform)||or(t.translate)||or(t.scale)||or(t.rotate)||or(t.perspective)||!Hi()&&(or(t.backdropFilter)||or(t.filter))||Pd.test(t.willChange||"")||kd.test(t.contain||"")}function Ol(e){let t=He(e);for(;_e(t)&&!kr(t);){if(Pr(t))return t;if(ui(t))return null;t=He(t)}return null}function Hi(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function kr(e){return/^(html|body|#document)$/.test(sr(e))}function ue(e){return kt(e).getComputedStyle(e)}function di(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(sr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Cl(e)&&e.host||Ce(e);return Cl(t)?t.host:t}function Il(e){let t=He(e);return kr(t)?(e.ownerDocument||e).body:_e(t)&&ci(t)?t:Il(t)}function Fi(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Il(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=kt(n);if(o){let a=ji(s);return t.concat(s,s.visualViewport||[],ci(n)?n:[],a&&r?Fi(a):[])}else return t.concat(n,Fi(n,[],r))}function ji(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kl(e){let t=ue(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=_e(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=ai(r)!==o||ai(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Dl(e){return ce(e)?e:e.contextElement}function Dr(e){let t=Dl(e);if(!_e(t))return ve(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=kl(t),s=(o?ai(r.width):r.width)/i,a=(o?ai(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Dd=ve(0);function Ml(e){let t=kt(e);return!Hi()||!t.visualViewport?Dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Md(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===kt(e)}function pi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Dl(e),s=ve(1);t&&(i?ce(i)&&(s=Dr(i)):s=Dr(e));let a=Md(o,r,i)?Ml(o):ve(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&i){let d=kt(o),h=ce(i)?kt(i):i,m=d,g=ji(m);for(;g&&h!==m;){let b=Dr(g),S=g.getBoundingClientRect(),E=ue(g),R=S.left+(g.clientLeft+parseFloat(E.paddingLeft))*b.x,I=S.top+(g.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=R,c+=I,m=kt(g),g=ji(m)}}return nr({width:u,height:p,x:l,y:c})}function Vi(e,t){let r=di(e).scrollLeft;return t?t.left+r:pi(Ce(e)).left+r}function Nl(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vi(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function Nd(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=Ce(i),a=t?ui(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ve(1),u=ve(0),p=_e(i);if((p||!o)&&((sr(i)!=="body"||ci(s))&&(l=di(i)),p)){let h=pi(i);c=Dr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let d=s&&!p&&!o?Nl(s,l):ve(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-l.scrollTop*c.y+u.y+d.y}}function $d(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ud(e){let t=di(e),r=e.ownerDocument.body,i=Fe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Fe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+Vi(e),s=-t.scrollTop;return ue(r).direction==="rtl"&&(o+=Fe(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Fd=25;function Bd(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=kt(e),o=Ce(e),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let d=!Hi()||t==="fixed";i?d||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,d&&(c=s.offsetLeft,u=s.offsetTop))}if(Vi(o)<=0){let d=o.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(o.clientWidth-h.clientWidth-g),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;S<=Fd&&(a-=S)}return{width:a,height:l,x:c,y:u}}function Hd(e,t){let r=pi(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=Dr(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Ll(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=Bd(e,r,t);else if(t==="document")i=Ud(Ce(e));else if(ce(t))i=Hd(t,r);else{let n=Ml(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nr(i)}function jd(e,t){let r=t.get(e);if(r)return r;let i=Fi(e,[],!1).filter(a=>ce(a)&&sr(a)!=="body"),n=null,o=ue(e).position==="fixed",s=o?He(e):e;for(;ce(s)&&!kr(s);){let a=ue(s),l=Pr(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):n=a,s=He(s)}return t.set(e,i),i}function Vd(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?ui(t)?[]:jd(t,this._c):[].concat(r),i],a=Ll(t,s[0],n),l=a.top,c=a.right,u=a.bottom,p=a.left;for(let d=1;d<s.length;d++){let h=Ll(t,s[d],n);l=Fe(h.top,l),c=si(h.right,c),u=si(h.bottom,u),p=Fe(h.left,p)}return{width:c-p,height:u-l,x:p,y:l}}function zd(e){let{width:t,height:r}=kl(e);return{width:t,height:r}}function Wd(e,t,r){let i=_e(t),n=Ce(t),o=r==="fixed",s=pi(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=ve(0);if((i||!o)&&((sr(t)!=="body"||ci(n))&&(a=di(t)),i)){let d=pi(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!i&&n&&(l.x=Vi(n));let c=n&&!i&&!o?Nl(n,a):ve(0),u=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:u,y:p,width:s.width,height:s.height}}function Co(e){return ue(e).position==="static"}function Pl(e,t){if(!_e(e)||ue(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ce(e)===r&&(r=r.ownerDocument.body),r}function $l(e,t){let r=kt(e);if(ui(e))return r;if(!_e(e)){let n=He(e);for(;n&&!kr(n);){if(ce(n)&&!Co(n))return n;n=He(n)}return r}let i=Pl(e,t);for(;i&&Rl(i)&&Co(i);)i=Pl(i,t);return i&&kr(i)&&Co(i)&&!Pr(i)?r:i||Ol(e)||r}var Kd=async function(e){let t=this.getOffsetParent||$l,r=this.getDimensions,i=await r(e.floating);return{reference:Wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Gd(e){return ue(e).direction==="rtl"}var zi={convertOffsetParentRelativeRectToViewportRelativeRect:Nd,getDocumentElement:Ce,getClippingRect:Vd,getOffsetParent:$l,getElementRects:Kd,getClientRects:$d,getDimensions:zd,getScale:Dr,isElement:ce,isRTL:Gd};var Ul=Tl,Fl=wl;var Bl=(e,t,r)=>{let i=new Map,n=r??{},o={...zi,...n.platform,_c:i};return El(e,t,{...n,platform:o})};function Hl(e){return qd(e)}function _o(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function qd(e){for(let t=e;t;t=_o(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_o(e);t;t=_o(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Pr(r)||t.tagName==="BODY"))return t}return null}async function jl(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Bl(e,t,{strategy:i.strategy,platform:{...zi,getOffsetParent:n=>zi.getOffsetParent(n,Hl)},middleware:[Fl({crossAxis:!0}),Ul({allowedPlacements:[i.placement]})]})}var Gr=f(x());var Jo=f(F());var Vl=f(F(),1);var Ro=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function zl(e,t){return(0,Vl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return fi(e);try{return JSON.parse(r)}catch{return fi(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:hi,...t??{}})}function Yd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Wi(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Wi(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Wi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wi(e,t){try{return Yd(e,t)}catch{return!1}}function hi(e,t){return!Wi(e,t)}function fi(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Ki(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Wl=f(F(),1);var Oo=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:hi,attribute:!1,...t};(0,Wl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Gi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var ar=f(F(),1);var qi=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>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 Gl=f(k(),1);var Yi=globalThis,Xd=Yi.ShadowRoot&&(Yi.ShadyCSS===void 0||Yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Kl=(e,t)=>{if(Xd)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Xi=class extends Gl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Kl(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Ro(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function ql(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Nr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ql,Yl=Symbol("constructorPrototype"),Xl=Symbol("constructorName"),Jl=Symbol("exportpartsDebouncer"),Zl=Symbol("dynamicDependenciesLoaded"),Mr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Mr.eventName="exportparts-updated";var ye=class extends Xi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ql]=new qi(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Jl].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[Xl]=this.constructor.name,this[Yl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xl]&&Object.setPrototypeOf(this,this[Yl])}connectedCallback(){var t;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[Zl]||(r[Zl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Mr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ql(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){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(t.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(t){var r,i,n,o,s,a;let l=d=>d!=null&&d.trim().length>0,c=t.filter(l).map(d=>d.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let d of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=d.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=d.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(b=>b.trim());for(let b of g)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(d=>c.map(h=>`${d}:${h}--${d}`));this.exportparts=[...this.part,...p].join(", ")}};Ql=Jl;Nr([(0,ar.property)()],ye.prototype,"exportpartsPrefix",void 0);Nr([zl([])],ye.prototype,"exportpartsPrefixes",void 0);Nr([(0,ar.property)({reflect:!0})],ye.prototype,"exportparts",void 0);Nr([(0,ar.property)()],ye.prototype,"customStylesheet",void 0);Nr([(0,ar.property)()],ye.prototype,"elementToFocus",void 0);Nr([(0,ar.state)()],ye.prototype,"useAdoptedStyleSheets",void 0);function Zi(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var mi=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),lr=Symbol("internalStores"),Zd=Ki(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=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[lr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[lr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[lr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[lr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[lr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[lr].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[je].has(s.store):this[je].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[je].set(s,a.subscribe(()=>this.updateFromStores())),this[mi].set(s,[]),Zi(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 p=d=>this[u](d);a.addEventListener(c.eventName,p),this[mi].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[je].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[je].has(s)&&this[je].get(s)(),this[je].delete(s),(a=this[mi].get(s))===null||a===void 0||a.forEach(l=>l()),this[mi].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=je,r=lr,i=mi,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),tc=class extends Zd(ye){};function Qt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Re(e){return!!e&&!!e[G]}function de(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===op})(e)||Array.isArray(e)||!!e[ac]||!!(!((t=e.constructor)===null||t===void 0)&&t[ac])||Uo(e)||Fo(e))}function cr(e,t,r){r===void 0&&(r=!1),Fr(e)===0?(r?Object.keys:Ur)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function Fr(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Uo(e)?2:Fo(e)?3:0}function $r(e,t){return Fr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qd(e,t){return Fr(e)===2?e.get(t):e[t]}function lc(e,t,r){var i=Fr(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function cc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Uo(e){return ip&&e instanceof Map}function Fo(e){return np&&e instanceof Set}function Ve(e){return e.o||e.t}function Bo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=pc(e);delete t[G];for(var r=Ur(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Ho(e,t){return t===void 0&&(t=!1),jo(e)||Re(e)||!de(e)||(Fr(e)>1&&(e.set=e.add=e.clear=e.delete=Jd),Object.freeze(e),t&&cr(e,(function(r,i){return Ho(i,!0)}),!0)),e}function Jd(){Qt(2)}function jo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function be(e){var t=$o[e];return t||Qt(18,e),t}function tp(e,t){$o[e]||($o[e]=t)}function Do(){return vi}function Io(e,t){t&&(be("Patches"),e.u=[],e.s=[],e.v=t)}function Qi(e){Mo(e),e.p.forEach(ep),e.p=null}function Mo(e){e===vi&&(vi=e.l)}function ec(e){return vi={p:[],l:vi,h:e,m:!0,_:0}}function ep(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Lo(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||be("ES5").S(t,e,i),i?(r[G].P&&(Qi(t),Qt(4)),de(e)&&(e=Ji(t,e),t.l||tn(t,e)),t.u&&be("Patches").M(r[G].t,e,t.u,t.s)):e=Ji(t,r,[]),Qi(t),t.u&&t.v(t.u,t.s),e!==dc?e:void 0}function Ji(e,t,r){if(jo(t))return t;var i=t[G];if(!i)return cr(t,(function(a,l){return rc(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return tn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Bo(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),cr(o,(function(a,l){return rc(e,i,n,a,l,r,s)})),tn(e,n,!1),r&&e.u&&be("Patches").N(i,r,e.u,e.s)}return i.o}function rc(e,t,r,i,n,o,s){if(Re(n)){var a=Ji(e,n,o&&t&&t.i!==3&&!$r(t.R,i)?o.concat(i):void 0);if(lc(r,i,a),!Re(a))return;e.m=!1}else s&&r.add(n);if(de(n)&&!jo(n)){if(!e.h.D&&e._<1)return;Ji(e,n),t&&t.A.l||tn(e,n)}}function tn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Ho(t,r)}function Po(e,t){var r=e[G];return(r?Ve(r):e)[t]}function ic(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function ze(e){e.P||(e.P=!0,e.l&&ze(e.l))}function ko(e){e.o||(e.o=Bo(e.t))}function No(e,t,r){var i=Uo(t)?be("MapSet").F(t,r):Fo(t)?be("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Do(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=yi;s&&(l=[a],c=gi);var u=Proxy.revocable(l,c),p=u.revoke,d=u.proxy;return a.k=d,a.j=p,d})(t,r):be("ES5").J(t,r);return(r?r.A:Do()).p.push(i),i}function rp(e){return Re(e)||Qt(22,e),(function t(r){if(!de(r))return r;var i,n=r[G],o=Fr(r);if(n){if(!n.P&&(n.i<4||!be("ES5").K(n)))return n.t;n.I=!0,i=nc(r,o),n.I=!1}else i=nc(r,o);return cr(i,(function(s,a){n&&Qd(n.t,s)===a||lc(i,s,t(a))})),o===3?new Set(i):i})(e)}function nc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bo(e)}function uc(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[G];return yi.get(c,s)},set:function(c){var u=this[G];yi.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][G];if(!l.P)switch(l.i){case 5:i(l)&&ze(l);break;case 4:r(l)&&ze(l)}}}function r(s){for(var a=s.t,l=s.k,c=Ur(l),u=c.length-1;u>=0;u--){var p=c[u];if(p!==G){var d=a[p];if(d===void 0&&!$r(a,p))return!0;var h=l[p],m=h&&h[G];if(m?m.t!==d:!cc(h,d))return!0}}var g=!!a[G];return c.length!==Ur(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&Qt(3,JSON.stringify(Ve(s)))}var o={};tp("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,d){if(p){for(var h=Array(d.length),m=0;m<d.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var g=pc(d);delete g[G];for(var b=Ur(g),S=0;S<b.length;S++){var E=b[S];g[E]=e(E,p||!!g[E].enumerable)}return Object.create(Object.getPrototypeOf(d),g)})(l,s),u={i:l?5:4,A:a?a.A:Do(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,G,{value:u,writable:!0}),c},S:function(s,a,l){l?Re(a)&&a[G].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var p=u[G];if(p){var d=p.t,h=p.k,m=p.R,g=p.i;if(g===4)cr(h,(function(I){I!==G&&(d[I]!==void 0||$r(d,I)?m[I]||c(h[I]):(m[I]=!0,ze(p)))})),cr(d,(function(I){h[I]!==void 0||$r(h,I)||(m[I]=!1,ze(p))}));else if(g===5){if(i(p)&&(ze(p),m.length=!0),h.length<d.length)for(var b=h.length;b<d.length;b++)m[b]=!1;else for(var S=d.length;S<h.length;S++)m[S]=!0;for(var E=Math.min(h.length,d.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var oc,vi,Vo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ip=typeof Map<"u",np=typeof Set<"u",sc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",dc=Vo?Symbol.for("immer-nothing"):((oc={})["immer-nothing"]=!0,oc),ac=Vo?Symbol.for("immer-draftable"):"__$immer_draftable",G=Vo?Symbol.for("immer-state"):"__$immer_state";var op=""+Object.prototype.constructor,Ur=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,pc=Object.getOwnPropertyDescriptors||function(e){var t={};return Ur(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},$o={},yi={get:function(e,t){if(t===G)return e;var r=Ve(e);if(!$r(r,t))return(function(n,o,s){var a,l=ic(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!de(i)?i:i===Po(e.t,t)?(ko(e),e.o[t]=No(e.A.h,i,e)):i},has:function(e,t){return t in Ve(e)},ownKeys:function(e){return Reflect.ownKeys(Ve(e))},set:function(e,t,r){var i=ic(Ve(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=Po(Ve(e),t),o=n?.[G];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(cc(r,n)&&(r!==void 0||$r(e.t,t)))return!0;ko(e),ze(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Po(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ko(e),ze(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ve(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){Qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Qt(12)}},gi={};cr(yi,(function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gi.deleteProperty=function(e,t){return gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return yi.set.call(this,e[0],t,r,e[0])};var sp=(function(){function e(r){var i=this;this.O=sc,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var b=this;g===void 0&&(g=a);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return l.produce(g,(function(I){var pt;return(pt=o).call.apply(pt,[b,I].concat(E))}))}}var c;if(typeof o!="function"&&Qt(6),s!==void 0&&typeof s!="function"&&Qt(7),de(n)){var u=ec(i),p=No(i,n,void 0),d=!0;try{c=o(p),d=!1}finally{d?Qi(u):Mo(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Io(u,s),Lo(g,u)}),(function(g){throw Qi(u),g})):(Io(u,s),Lo(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===dc&&(c=void 0),i.D&&Ho(c,!0),s){var h=[],m=[];be("Patches").M(n,c,h,m),s(h,m)}return c}Qt(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,p=Array(u>1?u-1:0),d=1;d<u;d++)p[d-1]=arguments[d];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(p))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){de(r)||Qt(8),Re(r)&&(r=rp(r));var i=ec(this),n=No(this,r,void 0);return n[G].C=!0,Mo(i),n},t.finishDraft=function(r,i){var n=r&&r[G],o=n.A;return Io(o,i),Lo(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!sc&&Qt(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=be("Patches").$;return Re(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),jt=new sp,ap=jt.produce,sm=jt.produceWithPatches.bind(jt),am=jt.setAutoFreeze.bind(jt),lm=jt.setUseProxies.bind(jt),cm=jt.applyPatches.bind(jt),um=jt.createDraft.bind(jt),dm=jt.finishDraft.bind(jt),en=ap;function ur(e){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(e)}function fc(e,t){if(ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(ur(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hc(e){var t=fc(e,"string");return ur(t)=="symbol"?t:t+""}function mc(e,t,r){return(t=hc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gc(Object(r),!0).forEach(function(i){mc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Et(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var vc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Wo=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+Wo(),REPLACE:"@@redux/REPLACE"+Wo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wo()}};function lp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ko(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Et(1));return r(Ko)(e,t)}if(typeof e!="function")throw new Error(Et(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(Et(3));return o}function p(g){if(typeof g!="function")throw new Error(Et(4));if(l)throw new Error(Et(5));var b=!0;return c(),a.push(g),function(){if(b){if(l)throw new Error(Et(6));b=!1,c();var E=a.indexOf(g);a.splice(E,1),s=null}}}function d(g){if(!lp(g))throw new Error(Et(7));if(typeof g.type>"u")throw new Error(Et(8));if(l)throw new Error(Et(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var b=s=a,S=0;S<b.length;S++){var E=b[S];E()}return g}function h(g){if(typeof g!="function")throw new Error(Et(10));n=g,d({type:rn.REPLACE})}function m(){var g,b=p;return g={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(Et(11));function R(){E.next&&E.next(u())}R();var I=b(R);return{unsubscribe:I}}},g[vc]=function(){return this},g}return d({type:rn.INIT}),i={dispatch:d,subscribe:p,getState:u,replaceReducer:h},i[vc]=m,i}function cp(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:rn.INIT});if(typeof i>"u")throw new Error(Et(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Et(13))})}function yc(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{cp(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var d=!1,h={},m=0;m<o.length;m++){var g=o[m],b=r[g],S=c[g],E=b(S,u);if(typeof E>"u"){var R=u&&u.type;throw new Error(Et(14))}h[g]=E,d=d||E!==S}return d=d||o.length!==Object.keys(c).length,d?h:c}}function Br(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function bc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Et(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=Br.apply(void 0,a)(n.dispatch),zo(zo({},n),{},{dispatch:o})}}}function xc(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Sc=xc();Sc.withExtraArgument=xc;var Go=Sc;var Cc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),up=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Hr=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},dp=Object.defineProperty,pp=Object.defineProperties,fp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,hp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,Ec=function(e,t,r){return t in e?dp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},We=function(e,t){for(var r in t||(t={}))hp.call(t,r)&&Ec(e,r,t[r]);if(Ac)for(var i=0,n=Ac(t);i<n.length;i++){var r=n[i];mp.call(t,r)&&Ec(e,r,t[r])}return e},qo=function(e,t){return pp(e,fp(t))},gp=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var vp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Br:Br.apply(null,arguments)},Om=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function yp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function Ke(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return We(We({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var bp=(function(e){Cc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Hr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Hr([void 0],r.concat(this))))},t})(Array),xp=(function(e){Cc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Hr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Hr([void 0],r.concat(this))))},t})(Array);function Zo(e){return de(e)?en(e,function(){}):e}function Sp(e){return typeof e=="boolean"}function Ap(){return function(t){return Ep(t)}}function Ep(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new bp;if(r&&(Sp(r)?c.push(Go):c.push(Go.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var p;if(l)var d}return c}var Yo=!0;function _c(e){var t=Ap(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,p=r.enhancers,d=p===void 0?void 0:p,h;if(typeof n=="function")h=n;else if(yp(n))h=yc(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Yo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yo&&m.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=bc.apply(void 0,m),b=Br;l&&(b=vp(We({trace:!Yo},typeof l=="object"&&l)));var S=new xp(g),E=S;Array.isArray(d)?E=Hr([g],d):typeof d=="function"&&(E=d(S));var R=b.apply(void 0,E);return Ko(h,u,R)}function Rc(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function Tp(e){return typeof e=="function"}function wp(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?Rc(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(Tp(e))l=function(){return Zo(e())};else{var c=Zo(e);l=function(){return c}}function u(p,d){p===void 0&&(p=l());var h=Hr([o[d.type]],s.filter(function(m){var g=m.matcher;return g(d)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Re(m)){var b=m,S=g(b,d);return S===void 0?m:S}else{if(de(m))return en(m,function(E){return g(E,d)});var S=g(m,d);if(S===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return m},p)}return u.getInitialState=l,u}function Cp(e,t){return e+"/"+t}function Oc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Zo(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var p=i[u],d=Cp(t,u),h,m;"reducer"in p?(h=p.reducer,m=p.prepare):h=p,o[u]=h,s[d]=h,a[u]=m?Ke(d,m):Ke(d)});function l(){var u=typeof e.extraReducers=="function"?Rc(e.extraReducers):[e.extraReducers],p=u[0],d=p===void 0?{}:p,h=u[1],m=h===void 0?[]:h,g=u[2],b=g===void 0?void 0:g,S=We(We({},d),s);return wp(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var I=0,pt=m;I<pt.length;I++){var st=pt[I];E.addMatcher(st.matcher,st.reducer)}b&&E.addDefaultCase(b)})}var c;return{name:t,reducer:function(u,p){return c||(c=l()),c(u,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var _p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=_p[Math.random()*64|0];return t},Op=["name","message","stack","code"],Xo=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Tc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ip=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Op;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},km=(function(){function e(t,r,i){var n=Ke(t+"/fulfilled",function(u,p,d,h){return{payload:u,meta:qo(We({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),o=Ke(t+"/pending",function(u,p,d){return{payload:void 0,meta:qo(We({},d||{}),{arg:p,requestId:u,requestStatus:"pending"})}}),s=Ke(t+"/rejected",function(u,p,d,h,m){return{payload:h,error:(i&&i.serializeError||Ip)(u||"Rejected"),meta:qo(We({},m||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(p,d,h){var m=i?.idGenerator?i.idGenerator(u):Rp(),g=new l,b,S=!1;function E(I){b=I,g.abort()}var R=(function(){return gp(this,null,function(){var I,pt,st,Pe,ro,ke,Ft;return up(this,function(Kt){switch(Kt.label){case 0:return Kt.trys.push([0,4,,5]),Pe=(I=i?.condition)==null?void 0:I.call(i,u,{getState:d,extra:h}),Pp(Pe)?[4,Pe]:[3,2];case 1:Pe=Kt.sent(),Kt.label=2;case 2:if(Pe===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,ro=new Promise(function(Bt,Je){return g.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:b||"Aborted"})})}),p(o(m,u,(pt=i?.getPendingMeta)==null?void 0:pt.call(i,{requestId:m,arg:u},{getState:d,extra:h}))),[4,Promise.race([ro,Promise.resolve(r(u,{dispatch:p,getState:d,extra:h,requestId:m,signal:g.signal,abort:E,rejectWithValue:function(Bt,Je){return new Xo(Bt,Je)},fulfillWithValue:function(Bt,Je){return new Tc(Bt,Je)}})).then(function(Bt){if(Bt instanceof Xo)throw Bt;return Bt instanceof Tc?n(Bt.payload,m,u,Bt.meta):n(Bt,m,u)})])];case 3:return st=Kt.sent(),[3,5];case 4:return ke=Kt.sent(),st=ke instanceof Xo?s(null,m,u,ke.payload,ke.meta):s(ke,m,u),[3,5];case 5:return Ft=i&&!i.dispatchConditionRejection&&s.match(st)&&st.meta.condition,Ft||p(st),[2,st]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:u,unwrap:function(){return R.then(Lp)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Lp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Pp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ic="listener",Lc="completed",Pc="cancelled",Dm="task-"+Pc,Mm="task-"+Lc,Nm=Ic+"-"+Pc,$m=Ic+"-"+Lc;var Qo="listenerMiddleware";var Um=Ke(Qo+"/add"),Fm=Ke(Qo+"/removeAll"),Bm=Ke(Qo+"/remove");var wc,Hm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(wc||(wc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},kp=function(e){return function(t){setTimeout(t,e)}},jm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kp(10);uc();var Dp=Ki(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??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)}}}),nn=class extends Dp(Object){};window.ftReduxStores||(window.ftReduxStores={});var kc=class e extends nn{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(Zi(o))return o;if(n==null)return;let s=Oc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=_c({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=fi(s.getInitialState());for(let p of c.keeping)u[p]=(l??u)[p];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 e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Gi;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 p=c(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}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(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var on=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,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 t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sn=f(x()),Mp="ft-app-info",Oe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Oe.eventName="authentication-change";var bi=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bi.eventName="ui-locale-changed";var Np={session:(e,t)=>{(0,sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>A.dispatchEvent(new Oe(t.payload)),0))}},A=sn.FtReduxStore.get({name:Mp,reducers:Np,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,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Dc=f(x()),an=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},gg=(0,Dc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(A)}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=>on.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return an([(0,Jo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),an([(0,Jo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),an([Oo({store:A.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),an([Oo({store:A.name})],t.prototype,"uiLocale",void 0),t});var pn=f(x());var ts=f(x());var dr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=A.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=A.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var jr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:dr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):dr.await()}};var Tt=class extends jr{constructor(t=!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 ts.CacheRegistry,this.cache=t?n.commonCache:new ts.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ln=class extends Tt{async listMySearches(){let{session:t}=A.getState();return Te(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var cn=class extends Tt{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var un=class extends Tt{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var dn=class extends Tt{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 t=A.getState().session;return!!t?.sessionAuthenticated}};var $p="ft-user-assets",Up={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(Xt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;rs(e,r,[...es(e,r),n]),Mc(e,r,1,i),Nc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;rs(e,r,es(e,r).map(n=>n.id===i.id?i:n)),Nc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;rs(e,r,es(e,r).filter(o=>o.id!==n)),Mc(e,r,-1,i)}},$c={[Xt.SEARCHES]:"savedSearches",[Xt.BOOKMARKS]:"bookmarks",[Xt.BOOKS]:void 0,[Xt.COLLECTIONS]:void 0},es=(e,t)=>{var r;let i=$c[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},rs=(e,t,r)=>{let i=$c[t];i&&(e[i]=r)},Mc=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===Xt.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Nc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ot=pn.FtReduxStore.get({name:$p,reducers:Up,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Xt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),is=class{constructor(t=new un,r=new dn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new cn,this.savedSearchesService=new ln,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=A.getState();(0,pn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ot.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ot.getState().assetCounts.allAsset[t]!==r.count&&Ot.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ot.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ot.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;t===Xt.BOOKMARKS&&r&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(r)}}},ns=new is;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ns);var os=class{addCommand(t,r=!1){A.commands.add(t,r)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new os;var Jt=f(x());var Uc,Vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Fp=Symbol("clearAfterUnitTest"),fn=class extends(0,Jt.withEventBus)(Tt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Uc]=()=>{this.defaultMessages={},this.cache=new Jt.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,Jt.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new Jt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof Jt.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Vr({loadedContexts:t})),this.dispatchEvent(new Vr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Vr({loadedContexts:[t]})),this.dispatchEvent(new Vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,Jt.delay)(0).then(()=>i()).catch(()=>null)))}};Uc=Fp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var zr=window.FluidTopicsI18nService,hn=window.FluidTopicsCustomI18nService;var Fc=f(x()),ss=class{highlightHtml(t,r,i){(0,Fc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ss;var Bc=f(x());var as=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=A.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return Bc.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:A.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(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new as;var Hc=f(x());var xi=class{static get(t,r){var i,n,o,s;let a=A.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 Hc.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var mn=class extends Tt{async sendDocumentStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send khub.search event")}async sendDocumentSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.search event")}async sendSearchPageSelectEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(t){let r;switch(t.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 : "+t.editorialType)}return{id:t.id,title:t.title,type:r,metadata:t.metadata}}sortEventArrays(t){let r=Object.entries(t).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(t,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(t),async()=>(await this.awaitApi).sendEvents(t).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var ls=class{urlToSearchRequest(t){return xi.get().parse(t)}searchRequestToUrl(t){return xi.get().serialize(t)}};window.FluidTopicsUrlService=new ls;var Ie=f(x());var pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};pr.eventName="change";var cs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},jc=new cs;var gn=class e extends Ie.WithEventBus{static build(){return new e(window.history,jc,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},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,Ie.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new pr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.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(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(pr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(pr.eventName,t)}currentItem(){return(0,Ie.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ie.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Ie.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ie.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wr=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var Vc=f(k());var zc=Vc.css`
572
+ `;var Gc=f(k()),Dt=f(F()),mr=f(x());var fr=f(x());function Wc(e,t){let{authenticationRequired:r,session:i}=A.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var vn=class extends jr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var us=class e extends fr.FtStateManager{static build(t){return new e(A,t)}constructor(t,r){super(),this.store=t,this.cache=new fr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vn,this.cleanSessionDebouncer=new fr.Debouncer,this.reloadDebouncer=new fr.Debouncer(500),this.apiProvider=r??(()=>dr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Oe.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 t=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(t)}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 t;let r=await this.cache.get("availableContentLocales",()=>Wc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new bi(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Kc=us.build();var hr=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Si=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new hr(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var xt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},X=class extends mr.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.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Kc,this.contextRoot=new Si}render(){return Gc.html`
573
573
  <slot></slot>
574
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>zr.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};J.elementDefinitions={};J.styles=zc;Tt([(0,jt.property)()],J.prototype,"baseUrl",void 0);Tt([(0,jt.property)()],J.prototype,"apiIntegrationIdentifier",void 0);Tt([(0,jt.property)()],J.prototype,"apiIntegrationAppVersion",void 0);Tt([(0,jt.property)()],J.prototype,"uiLocale",void 0);Tt([(0,mr.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);Tt([(0,mr.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"editorMode",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"noCustom",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);Tt([(0,jt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],J.prototype,"noCustomComponent",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"withManualResources",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"authenticationRequired",void 0);Tt([(0,mr.jsonProperty)([])],J.prototype,"messageContexts",void 0);Tt([(0,mr.jsonProperty)(void 0)],J.prototype,"session",void 0);var Yc=f(x());var qc={"ft-app-context":J};(0,Yc.customElements)(qc);var Xc=f(F());var ds=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Kr=new ds;var jp=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ei=Symbol("i18nAttributes"),Zc=Symbol("i18nListAttributes"),Ti=Symbol("i18nProperties"),yn=Symbol("i18nContexts"),Ai=Symbol("i18nUnsubs"),Ge=(0,Gr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?hn:zr}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let d=u??(p?p(this):[]);return this.getI18nService(c).resolveMessage(s,a,...d)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Kr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,p,d)=>d?.context&&d.key&&o(u,p,d)?{...d,message:this.i18n({context:d.context,key:d.key,custom:d.custom,...u})}:d;(s=this[Ei])===null||s===void 0||s.forEach((u,p)=>l[p]=c(u,p,l[p])),(a=this[Zc])===null||a===void 0||a.forEach((u,p)=>{var d;return l[p]=(d=l[p])===null||d===void 0?void 0:d.map(h=>c(u,p,h))})}updateI18nProperties(o){var s;(s=this[Ti])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[yn].set(l,{isCustomContext:a}),this[Ai].has(l)||this[Ai].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[yn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[yn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach(o=>o()),this[Ai].clear()}}return t=yn,r=Ai,jp([(0,Xc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),bn=class extends Ge(Gr.FtLitElement){},xn=class extends Ge(Gr.FtLitElementRedux){};var Qc=f(x());var ps=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?Kr.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Vp=new ps;var Jc=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Qc.hasChanged,converter:Kr,...t}),r[Ei]=(n=r[Ei])!==null&&n!==void 0?n:new Map,r[Ei].set(i,e??{})};var qe=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?hn:zr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),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 Sn=(e,t)=>(r,i)=>{var n,o;r.constructor.createProperty(i,t??{attribute:!1,type:String});let s={...e,key:(n=e.key)!==null&&n!==void 0?n:i};r[Ti]=(o=r[Ti])!==null&&o!==void 0?o:new Map,r[Ti].set(i,s)};var tu=f(k());var eu=tu.css`
574
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>zr.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};X.elementDefinitions={};X.styles=zc;xt([(0,Dt.property)()],X.prototype,"baseUrl",void 0);xt([(0,Dt.property)()],X.prototype,"tenantId",void 0);xt([(0,Dt.property)()],X.prototype,"apiIntegrationIdentifier",void 0);xt([(0,Dt.property)()],X.prototype,"apiIntegrationAppVersion",void 0);xt([(0,Dt.property)()],X.prototype,"uiLocale",void 0);xt([(0,mr.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);xt([(0,mr.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"editorMode",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"noCustom",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);xt([(0,Dt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],X.prototype,"noCustomComponent",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"withManualResources",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"authenticationRequired",void 0);xt([(0,mr.jsonProperty)([])],X.prototype,"messageContexts",void 0);xt([(0,mr.jsonProperty)(void 0)],X.prototype,"session",void 0);var Yc=f(x());var qc={"ft-app-context":X};(0,Yc.customElements)(qc);var Xc=f(F());var ds=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Kr=new ds;var jp=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ei=Symbol("i18nAttributes"),Zc=Symbol("i18nListAttributes"),Ti=Symbol("i18nProperties"),yn=Symbol("i18nContexts"),Ai=Symbol("i18nUnsubs"),Ge=(0,Gr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?hn:zr}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let d=u??(p?p(this):[]);return this.getI18nService(c).resolveMessage(s,a,...d)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Kr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,p,d)=>d?.context&&d.key&&o(u,p,d)?{...d,message:this.i18n({context:d.context,key:d.key,custom:d.custom,...u})}:d;(s=this[Ei])===null||s===void 0||s.forEach((u,p)=>l[p]=c(u,p,l[p])),(a=this[Zc])===null||a===void 0||a.forEach((u,p)=>{var d;return l[p]=(d=l[p])===null||d===void 0?void 0:d.map(h=>c(u,p,h))})}updateI18nProperties(o){var s;(s=this[Ti])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[yn].set(l,{isCustomContext:a}),this[Ai].has(l)||this[Ai].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[yn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[yn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach(o=>o()),this[Ai].clear()}}return t=yn,r=Ai,jp([(0,Xc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),bn=class extends Ge(Gr.FtLitElement){},xn=class extends Ge(Gr.FtLitElementRedux){};var Qc=f(x());var ps=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?Kr.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Vp=new ps;var Jc=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Qc.hasChanged,converter:Kr,...t}),r[Ei]=(n=r[Ei])!==null&&n!==void 0?n:new Map,r[Ei].set(i,e??{})};var qe=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?hn:zr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),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 Sn=(e,t)=>(r,i)=>{var n,o;r.constructor.createProperty(i,t??{attribute:!1,type:String});let s={...e,key:(n=e.key)!==null&&n!==void 0?n:i};r[Ti]=(o=r[Ti])!==null&&o!==void 0?o:new Map,r[Ti].set(i,s)};var tu=f(k());var eu=tu.css`
575
575
  `;var An=f(k()),En=f(F()),Tn=f(x());var wi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},pe=class extends xn{constructor(){super(),this.editorMode=!1,this.addStore(A)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":An.nothing:An.html`
576
576
  <span class="ft-i18n">
577
577
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
@@ -591,12 +591,12 @@
591
591
  </div>
592
592
  </div>
593
593
  </div>
594
- `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,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(t){var r,i;t.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(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:t},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 t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&jl(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${te.designSystemVariables.transitionDuration}, left ${te.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,te.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};et.elementDefinitions={"ft-typography":tt};et.styles=hl;fe([Jc()],et.prototype,"text",void 0);fe([(0,ee.property)({type:Boolean})],et.prototype,"manual",void 0);fe([(0,ee.property)({type:Boolean})],et.prototype,"inline",void 0);fe([(0,te.numberProperty)()],et.prototype,"delay",void 0);fe([(0,ee.property)()],et.prototype,"position",void 0);fe([(0,te.jsonProperty)([])],et.prototype,"ignoreMatchingElements",void 0);fe([(0,ee.queryAssignedNodes)()],et.prototype,"slotNodes",void 0);fe([(0,ee.query)(".ft-tooltip--container")],et.prototype,"container",void 0);fe([(0,ee.query)(".ft-tooltip")],et.prototype,"tooltip",void 0);fe([(0,ee.query)(".ft-tooltip--content")],et.prototype,"tooltipContent",void 0);fe([(0,ee.state)()],et.prototype,"visible",void 0);var su=f(x());var ou={"ft-tooltip":et};(0,su.customElements)(ou);var Dt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(Dt||(Dt={}));var Ci=f(k()),Ye=f(F()),cu=f(x()),uu=f(lu());var gr;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(gr||(gr={}));var v;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(v||(v={}));var Tb=new Map([...["abw"].map(e=>[e,v.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,v.AUDIO]),...["avi"].map(e=>[e,v.AVI]),...["chm","xhs"].map(e=>[e,v.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,v.CODE]),...["csv"].map(e=>[e,v.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,v.DITA]),...["epub"].map(e=>[e,v.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,v.EXCEL]),...["flac"].map(e=>[e,v.FLAC]),...["gif"].map(e=>[e,v.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,v.GZIP]),...["html","htm","xhtml"].map(e=>[e,v.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,v.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,v.JPEG]),...["json"].map(e=>[e,v.JSON]),...["m4a","m4p"].map(e=>[e,v.M4A]),...["mov","qt"].map(e=>[e,v.MOV]),...["mp3"].map(e=>[e,v.MP3]),...["mp4","m4v"].map(e=>[e,v.MP4]),...["ogg","oga"].map(e=>[e,v.OGG]),...["pdf","ps"].map(e=>[e,v.PDF]),...["png"].map(e=>[e,v.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,v.POWERPOINT]),...["rar"].map(e=>[e,v.RAR]),...["stp"].map(e=>[e,v.STP]),...["txt","rtf","md","mdown"].map(e=>[e,v.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,v.VIDEO]),...["wav"].map(e=>[e,v.WAV]),...["wma"].map(e=>[e,v.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,v.WORD]),...["xml","xsl","rdf"].map(e=>[e,v.XML]),...["yaml","yml","x-yaml"].map(e=>[e,v.YAML]),...["zip"].map(e=>[e,v.ZIP])]);var wb={[v.ABW]:"#91ABC6",[v.AUDIO]:"#1795E3",[v.AVI]:"#E63324",[v.CHM]:"#71C3EB",[v.CODE]:"#71C3EB",[v.CSV]:"#1F7345",[v.DITA]:"#71C3EB",[v.EPUB]:"#85B926",[v.EXCEL]:"#1F7345",[v.FLAC]:"#1795E3",[v.GIF]:"#59B031",[v.GZIP]:"#F8AB36",[v.HTML]:"#71C3EB",[v.IMAGE]:"#59B031",[v.JPEG]:"#59B031",[v.JSON]:"#71C3EB",[v.M4A]:"#1795E3",[v.MOV]:"#E63324",[v.MP3]:"#1795E3",[v.MP4]:"#E63324",[v.OGG]:"#1795E3",[v.PDF]:"#E44948",[v.PNG]:"#59B031",[v.POWERPOINT]:"#B54A2B",[v.RAR]:"#F8AB36",[v.STP]:"#3764B1",[v.TEXT]:"#3162AB",[v.UNKNOWN]:"#999999",[v.VIDEO]:"#E63324",[v.WAV]:"#1795E3",[v.WMA]:"#1795E3",[v.WORD]:"#3162AB",[v.XML]:"#71C3EB",[v.YAML]:"#71C3EB",[v.ZIP]:"#F8AB36"};var _i=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},rt=class extends cu.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Ci.nothing}render(){let t=this.variant&&Object.values(Dt).includes(this.variant)?this.variant:Dt.fluid_topics,r=t!==Dt.material||!!this.value;return Ci.html`
594
+ `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,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(t){var r,i;t.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(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:t},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 t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&jl(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${te.designSystemVariables.transitionDuration}, left ${te.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,te.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};et.elementDefinitions={"ft-typography":tt};et.styles=hl;fe([Jc()],et.prototype,"text",void 0);fe([(0,ee.property)({type:Boolean})],et.prototype,"manual",void 0);fe([(0,ee.property)({type:Boolean})],et.prototype,"inline",void 0);fe([(0,te.numberProperty)()],et.prototype,"delay",void 0);fe([(0,ee.property)()],et.prototype,"position",void 0);fe([(0,te.jsonProperty)([])],et.prototype,"ignoreMatchingElements",void 0);fe([(0,ee.queryAssignedNodes)()],et.prototype,"slotNodes",void 0);fe([(0,ee.query)(".ft-tooltip--container")],et.prototype,"container",void 0);fe([(0,ee.query)(".ft-tooltip")],et.prototype,"tooltip",void 0);fe([(0,ee.query)(".ft-tooltip--content")],et.prototype,"tooltipContent",void 0);fe([(0,ee.state)()],et.prototype,"visible",void 0);var su=f(x());var ou={"ft-tooltip":et};(0,su.customElements)(ou);var Mt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(Mt||(Mt={}));var Ci=f(k()),Ye=f(F()),cu=f(x()),uu=f(lu());var gr;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(gr||(gr={}));var v;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(v||(v={}));var Tb=new Map([...["abw"].map(e=>[e,v.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,v.AUDIO]),...["avi"].map(e=>[e,v.AVI]),...["chm","xhs"].map(e=>[e,v.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,v.CODE]),...["csv"].map(e=>[e,v.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,v.DITA]),...["epub"].map(e=>[e,v.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,v.EXCEL]),...["flac"].map(e=>[e,v.FLAC]),...["gif"].map(e=>[e,v.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,v.GZIP]),...["html","htm","xhtml"].map(e=>[e,v.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,v.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,v.JPEG]),...["json"].map(e=>[e,v.JSON]),...["m4a","m4p"].map(e=>[e,v.M4A]),...["mov","qt"].map(e=>[e,v.MOV]),...["mp3"].map(e=>[e,v.MP3]),...["mp4","m4v"].map(e=>[e,v.MP4]),...["ogg","oga"].map(e=>[e,v.OGG]),...["pdf","ps"].map(e=>[e,v.PDF]),...["png"].map(e=>[e,v.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,v.POWERPOINT]),...["rar"].map(e=>[e,v.RAR]),...["stp"].map(e=>[e,v.STP]),...["txt","rtf","md","mdown"].map(e=>[e,v.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,v.VIDEO]),...["wav"].map(e=>[e,v.WAV]),...["wma"].map(e=>[e,v.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,v.WORD]),...["xml","xsl","rdf"].map(e=>[e,v.XML]),...["yaml","yml","x-yaml"].map(e=>[e,v.YAML]),...["zip"].map(e=>[e,v.ZIP])]);var wb={[v.ABW]:"#91ABC6",[v.AUDIO]:"#1795E3",[v.AVI]:"#E63324",[v.CHM]:"#71C3EB",[v.CODE]:"#71C3EB",[v.CSV]:"#1F7345",[v.DITA]:"#71C3EB",[v.EPUB]:"#85B926",[v.EXCEL]:"#1F7345",[v.FLAC]:"#1795E3",[v.GIF]:"#59B031",[v.GZIP]:"#F8AB36",[v.HTML]:"#71C3EB",[v.IMAGE]:"#59B031",[v.JPEG]:"#59B031",[v.JSON]:"#71C3EB",[v.M4A]:"#1795E3",[v.MOV]:"#E63324",[v.MP3]:"#1795E3",[v.MP4]:"#E63324",[v.OGG]:"#1795E3",[v.PDF]:"#E44948",[v.PNG]:"#59B031",[v.POWERPOINT]:"#B54A2B",[v.RAR]:"#F8AB36",[v.STP]:"#3764B1",[v.TEXT]:"#3162AB",[v.UNKNOWN]:"#999999",[v.VIDEO]:"#E63324",[v.WAV]:"#1795E3",[v.WMA]:"#1795E3",[v.WORD]:"#3162AB",[v.XML]:"#71C3EB",[v.YAML]:"#71C3EB",[v.ZIP]:"#F8AB36"};var _i=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},rt=class extends cu.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=Ci.nothing}render(){let t=this.variant&&Object.values(Mt).includes(this.variant)?this.variant:Mt.fluid_topics,r=t!==Mt.material||!!this.value;return Ci.html`
595
595
  <i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
596
596
  ${(0,uu.unsafeHTML)(this.resolvedIcon)}
597
597
  <slot ?hidden=${r}></slot>
598
598
  </i>
599
- `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let i=this.value||this.getTextContent();switch(this.variant){case Dt.file_format:this.resolvedIcon=(t=v[i.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:i;break;case Dt.material:this.resolvedIcon=this.value||Ci.nothing;break;default:this.resolvedIcon=(r=gr[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};rt.elementDefinitions={};rt.styles=Zs;_i([(0,Ye.property)()],rt.prototype,"variant",void 0);_i([(0,Ye.property)()],rt.prototype,"value",void 0);_i([(0,Ye.property)({reflect:!0,attribute:"aria-hidden"})],rt.prototype,"ariaHidden",void 0);_i([(0,Ye.state)()],rt.prototype,"resolvedIcon",void 0);_i([(0,Ye.query)("slot")],rt.prototype,"slottedContent",void 0);var pu=f(x());var du={"ft-icon":rt};(0,pu.customElements)(du);var fu=f(k()),It=f(x());var ft={borderRadiusLeft:It.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",It.designSystemVariables.borderRadiusL),borderRadiusRight:It.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",It.designSystemVariables.borderRadiusL),borderWidthLeft:It.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:It.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:It.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},hu=fu.css`
599
+ `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let i=this.value||this.getTextContent();switch(this.variant){case Mt.file_format:this.resolvedIcon=(t=v[i.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:i;break;case Mt.material:this.resolvedIcon=this.value||Ci.nothing;break;default:this.resolvedIcon=(r=gr[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};rt.elementDefinitions={};rt.styles=Zs;_i([(0,Ye.property)()],rt.prototype,"variant",void 0);_i([(0,Ye.property)()],rt.prototype,"value",void 0);_i([(0,Ye.property)({reflect:!0,attribute:"aria-hidden"})],rt.prototype,"ariaHidden",void 0);_i([(0,Ye.state)()],rt.prototype,"resolvedIcon",void 0);_i([(0,Ye.query)("slot")],rt.prototype,"slottedContent",void 0);var pu=f(x());var du={"ft-icon":rt};(0,pu.customElements)(du);var fu=f(k()),It=f(x());var ft={borderRadiusLeft:It.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",It.designSystemVariables.borderRadiusL),borderRadiusRight:It.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",It.designSystemVariables.borderRadiusL),borderWidthLeft:It.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:It.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:It.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},hu=fu.css`
600
600
  .ft-switch-option {
601
601
  position: relative;
602
602
  display: inline-block;
@@ -610,20 +610,20 @@
610
610
  }
611
611
 
612
612
  .ft-switch-option--content {
613
- --switch-option-internal-line-height: calc(${Q.fontSize} + 2px);
614
- --switch-option-internal-content-height: max(var(--switch-option-internal-line-height), ${Q.iconSize});
613
+ --switch-option-internal-line-height: calc(${J.fontSize} + 2px);
614
+ --switch-option-internal-content-height: max(var(--switch-option-internal-line-height), ${J.iconSize});
615
615
 
616
616
  border-style: solid;
617
- border-color: ${Q.borderColor};
617
+ border-color: ${J.borderColor};
618
618
  border-width: ${ft.borderWidthVertical} ${ft.borderWidthRight} ${ft.borderWidthVertical} ${ft.borderWidthLeft};
619
619
  border-radius: ${ft.borderRadiusLeft} ${ft.borderRadiusRight} ${ft.borderRadiusRight} ${ft.borderRadiusLeft};
620
620
  display: flex;
621
621
  align-items: center;
622
622
  justify-content: center;
623
623
  overflow: hidden;
624
- ${(0,It.setVariable)(Rt.size,Q.iconSize)};
624
+ ${(0,It.setVariable)(Rt.size,J.iconSize)};
625
625
  padding: var(--switch-internal-vertical-padding, 6px) var(--switch-internal-horizontal-padding, 8px);
626
- background-color: ${Q.backgroundColor};
626
+ background-color: ${J.backgroundColor};
627
627
  -webkit-mask-image: radial-gradient(white, black);
628
628
  }
629
629
 
@@ -632,7 +632,7 @@
632
632
  }
633
633
 
634
634
  .ft-switch-option--selected .ft-switch-option--content:before {
635
- background-color: ${Q.selectedBackgroundColor};
635
+ background-color: ${J.selectedBackgroundColor};
636
636
  border-radius: ${ft.borderRadiusLeft} ${ft.borderRadiusRight} ${ft.borderRadiusRight} ${ft.borderRadiusLeft};
637
637
  position: absolute;
638
638
  inset: 0;
@@ -642,22 +642,22 @@
642
642
  }
643
643
 
644
644
  .ft-switch-option--label {
645
- color: ${Q.textColor};
645
+ color: ${J.textColor};
646
646
  overflow: hidden;
647
647
  white-space: nowrap;
648
648
  text-overflow: ellipsis;
649
649
  display: block;
650
650
  margin: 0 8px;
651
- ${(0,It.setVariable)(_t.fontSize,Q.fontSize)};
651
+ ${(0,It.setVariable)(_t.fontSize,J.fontSize)};
652
652
  ${(0,It.setVariable)(_t.lineHeight,"var(--switch-option-internal-content-height)")}
653
653
  }
654
654
 
655
655
  .ft-switch-option--selected .ft-switch-option--label {
656
- color: ${Q.selectedTextColor};
656
+ color: ${J.selectedTextColor};
657
657
  }
658
658
 
659
659
  .ft-switch-option--focused {
660
- outline: 1px solid ${Q.outlineColor};
660
+ outline: 1px solid ${J.outlineColor};
661
661
  }
662
662
 
663
663
  .ft-switch-option--label[hidden] {
@@ -665,7 +665,7 @@
665
665
  }
666
666
 
667
667
  .ft-switch-option--ripple {
668
- ${(0,It.setVariable)(at.color,Q.rippleColor)};
668
+ ${(0,It.setVariable)(at.color,J.rippleColor)};
669
669
  }
670
670
 
671
671
  ft-icon, ft-ripple, ft-typography {
@@ -678,11 +678,11 @@
678
678
 
679
679
  ft-icon {
680
680
  flex-shrink: 0;
681
- color: ${Q.iconColor};
681
+ color: ${J.iconColor};
682
682
  }
683
683
 
684
684
  .ft-switch-option--selected ft-icon {
685
- color: ${Q.selectedTextColor};
685
+ color: ${J.selectedTextColor};
686
686
  }
687
687
  `;var he=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},fs=class extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}},hs=class extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}},it=class extends Yr.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1,this.isFocused=!1}focus(){this.input.focus()}update(t){super.update(t),t.has("selected")&&this.dispatchEvent(new hs(this.selected))}render(){let t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected,"ft-switch-option--focused":this.isFocused};return this.addTooltip(qr.html`
688
688
  <label part="label" for="input" class="${(0,mu.classMap)(t)}"
@@ -708,7 +708,7 @@
708
708
  </ft-tooltip>
709
709
  `}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.onFocusout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this.onFocusout)}onFocusout(){this.isFocused=!1}onChange(){this.selected=this.unselectable?!this.selected:!0,this.dispatchEvent(new fs(this.selected))}getLabel(){return this.label||this.getTextContent()}resolveIcon(){return this.icon?qr.html`
710
710
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
711
- `:qr.nothing}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};it.elementDefinitions={"ft-ripple":$,"ft-typography":tt,"ft-tooltip":et,"ft-icon":rt};it.styles=[Yr.safariEllipsisFix,hu];he([(0,Mt.property)()],it.prototype,"value",void 0);he([(0,Mt.property)()],it.prototype,"icon",void 0);he([(0,Mt.property)()],it.prototype,"iconVariant",void 0);he([(0,Mt.property)()],it.prototype,"label",void 0);he([(0,Mt.property)()],it.prototype,"tooltipPosition",void 0);he([(0,Mt.property)({type:Boolean,reflect:!0})],it.prototype,"selected",void 0);he([(0,Mt.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);he([(0,Mt.property)({type:Boolean})],it.prototype,"unselectable",void 0);he([(0,Mt.query)(".ft-switch-option--content slot")],it.prototype,"slottedContent",void 0);he([(0,Mt.query)(".ft-switch-option--input")],it.prototype,"input",void 0);he([(0,Mt.state)()],it.prototype,"isFocused",void 0);var vr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ms=class extends CustomEvent{constructor(t){super("change",{detail:t})}},Lt=class extends Le.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.displayFocusWhenUsingKeyboard=!1,this.options=[]}get value(){var t;return(t=this.selectedOption)===null||t===void 0?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach(r=>r.unselectable=this.unselectable)}render(){let t={"ft-switch":!0,"ft-switch--dense":this.dense};return wn.html`
711
+ `:qr.nothing}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};it.elementDefinitions={"ft-ripple":$,"ft-typography":tt,"ft-tooltip":et,"ft-icon":rt};it.styles=[Yr.safariEllipsisFix,hu];he([(0,Nt.property)()],it.prototype,"value",void 0);he([(0,Nt.property)()],it.prototype,"icon",void 0);he([(0,Nt.property)()],it.prototype,"iconVariant",void 0);he([(0,Nt.property)()],it.prototype,"label",void 0);he([(0,Nt.property)()],it.prototype,"tooltipPosition",void 0);he([(0,Nt.property)({type:Boolean,reflect:!0})],it.prototype,"selected",void 0);he([(0,Nt.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);he([(0,Nt.property)({type:Boolean})],it.prototype,"unselectable",void 0);he([(0,Nt.query)(".ft-switch-option--content slot")],it.prototype,"slottedContent",void 0);he([(0,Nt.query)(".ft-switch-option--input")],it.prototype,"input",void 0);he([(0,Nt.state)()],it.prototype,"isFocused",void 0);var vr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ms=class extends CustomEvent{constructor(t){super("change",{detail:t})}},Lt=class extends Le.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.displayFocusWhenUsingKeyboard=!1,this.options=[]}get value(){var t;return(t=this.selectedOption)===null||t===void 0?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach(r=>r.unselectable=this.unselectable)}render(){let t={"ft-switch":!0,"ft-switch--dense":this.dense};return wn.html`
712
712
  <div @keydown=${this.onKeyDown} tabindex="-1" class="${(0,gu.classMap)(t)}" role="radiogroup" aria-label="${this.label}">
713
713
  <slot @slotchange=${this.onSlotchange}
714
714
  @option-change=${this.onOptionChangeByScript}
@@ -721,8 +721,8 @@
721
721
  }
722
722
 
723
723
  .ft-switch {
724
- border-radius: ${Q.borderRadius};
725
- outline-color: ${Q.outlineColor};
724
+ border-radius: ${J.borderRadius};
725
+ outline-color: ${J.outlineColor};
726
726
  }
727
727
 
728
728
  .ft-switch slot {
@@ -737,12 +737,12 @@
737
737
  }
738
738
 
739
739
  .ft-switch slot::slotted(ft-switch-option:first-child) {
740
- ${(0,Le.setVariable)(ft.borderRadiusLeft,Q.borderRadius)};
740
+ ${(0,Le.setVariable)(ft.borderRadiusLeft,J.borderRadius)};
741
741
  ${(0,Le.setVariable)(ft.borderWidthLeft,"1px")};
742
742
  }
743
743
 
744
744
  .ft-switch slot::slotted(ft-switch-option:last-child) {
745
- ${(0,Le.setVariable)(ft.borderRadiusRight,Q.borderRadius)};
745
+ ${(0,Le.setVariable)(ft.borderRadiusRight,J.borderRadius)};
746
746
  }
747
747
 
748
748
  .ft-switch--dense slot::slotted(ft-switch-option) {
@@ -800,8 +800,8 @@
800
800
  transition: font-size 250ms, line-height 250ms, color 250ms;
801
801
  max-width: calc(${w.labelMaxWidth} - 2 * (${w.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
802
802
  text-overflow: ellipsis;
803
- ${(0,W.setVariable)(Bt.fontSize,w.fontSize)};
804
- ${(0,W.setVariable)(Bt.lineHeight,w.fontSize)};
803
+ ${(0,W.setVariable)(Ht.fontSize,w.fontSize)};
804
+ ${(0,W.setVariable)(Ht.lineHeight,w.fontSize)};
805
805
  }
806
806
 
807
807
  .ft-input-label--in-error .ft-input-label--text {
@@ -821,7 +821,7 @@
821
821
 
822
822
  .ft-input-label--floating-text {
823
823
  position: absolute;
824
- top: calc(50% - ${Bt.lineHeight} / 2);
824
+ top: calc(50% - ${Ht.lineHeight} / 2);
825
825
  transition: top 250ms;
826
826
  overflow: hidden;
827
827
  white-space: nowrap;
@@ -833,8 +833,8 @@
833
833
  }
834
834
 
835
835
  .ft-input-label--raised .ft-input-label--text {
836
- ${(0,W.setVariable)(Bt.fontSize,w.raisedFontSize)};
837
- ${(0,W.setVariable)(Bt.lineHeight,w.raisedFontSize)};
836
+ ${(0,W.setVariable)(Ht.fontSize,w.raisedFontSize)};
837
+ ${(0,W.setVariable)(Ht.lineHeight,w.raisedFontSize)};
838
838
  }
839
839
 
840
840
  .ft-input-label--raised .ft-input-label--floating-text {
@@ -865,7 +865,7 @@
865
865
  z-index: ${w.raisedZIndex};
866
866
  background-color: ${w.backgroundColor};
867
867
  border-radius: ${w.borderRadius};
868
- top: calc((${Bt.lineHeight} / -2) + 2px);
868
+ top: calc((${Ht.lineHeight} / -2) + 2px);
869
869
  }
870
870
 
871
871
  .ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
@@ -990,7 +990,7 @@
990
990
  [role="button"][aria-pressed="true"] ft-icon{
991
991
  color: ${Eu.colorOnSurfaceMedium};
992
992
  }
993
- `;var Se=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Cn=class extends CustomEvent{constructor(t,r){super("resize",{detail:{width:t,height:r}})}},vt=class extends Rn.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=Dt.material,this.cursor="nwse-resize",this.ariaLabel="",this.dragging=!1,this.isAriaPressed=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return _n.html`
993
+ `;var Se=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Cn=class extends CustomEvent{constructor(t,r){super("resize",{detail:{width:t,height:r}})}},vt=class extends Rn.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=Mt.material,this.cursor="nwse-resize",this.ariaLabel="",this.dragging=!1,this.isAriaPressed=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return _n.html`
994
994
  <style>
995
995
  .ft-resizer {
996
996
  cursor: ${(0,_n.unsafeCSS)(this.cursor)}
@@ -1066,7 +1066,7 @@
1066
1066
  <div></div>
1067
1067
  <div></div>
1068
1068
  </div>
1069
- `}};br.styles=Ys;var Hu=f(x());var Bu={"ft-loader":br};(0,Hu.customElements)(Bu);var Ze=f(k()),xs=f(we()),K=f(F());var Xe=e=>e??ut;var X=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},N=class extends(0,ie.toFtFormComponent)(ie.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.label="",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.addEventListener("click",t=>{var r;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var t,r,i;let n=Ze.html`
1069
+ `}};br.styles=Ys;var Hu=f(x());var Bu={"ft-loader":br};(0,Hu.customElements)(Bu);var Ze=f(k()),xs=f(we()),K=f(F());var Xe=e=>e??ut;var Z=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},N=class extends(0,ie.toFtFormComponent)(ie.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.label="",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.addEventListener("click",t=>{var r;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var t,r,i;let n=Ze.html`
1070
1070
  <ft-ripple part="ripple"
1071
1071
  ?disabled=${this.isDisabled()}
1072
1072
  ?activated=${this.activated}
@@ -1108,7 +1108,7 @@
1108
1108
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
1109
1109
  `:Ze.html`
1110
1110
  <slot part="icon" name="icon"></slot>
1111
- `}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,ie.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};N.elementDefinitions={"ft-ripple":$,"ft-tooltip":et,"ft-icon":rt,"ft-loader":br,"ft-typography":tt};N.styles=[ie.safariEllipsisFix,ea,ie.noTextSelect];X([(0,K.property)({type:Boolean})],N.prototype,"primary",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"outlined",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"dense",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"round",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"disabled",void 0);X([(0,K.property)()],N.prototype,"icon",void 0);X([(0,K.property)()],N.prototype,"iconVariant",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"trailingIcon",void 0);X([(0,K.property)()],N.prototype,"label",void 0);X([(0,K.property)()],N.prototype,"type",void 0);X([(0,K.property)()],N.prototype,"href",void 0);X([(0,K.property)()],N.prototype,"target",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"loading",void 0);X([(0,K.property)({attribute:"aria-label"})],N.prototype,"ariaLabel",void 0);X([(0,K.property)()],N.prototype,"ariaHasPopup",void 0);X([(0,K.property)({attribute:"aria-pressed"})],N.prototype,"ariaPressed",void 0);X([(0,K.property)()],N.prototype,"tooltipPosition",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"hideTooltip",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"forceTooltip",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"activated",void 0);X([(0,K.query)(".ft-button")],N.prototype,"button",void 0);X([(0,K.query)(".ft-button--label slot")],N.prototype,"slottedContent",void 0);X([(0,K.query)("[part=tooltip]")],N.prototype,"tooltip",void 0);var Vu=f(x());var ju={"ft-button":N};(0,Vu.customElements)(ju);var M=qe.build("integratedFeedbackComponent"),zu={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"};var Ln=class extends CustomEvent{constructor(t){super("live-change",{detail:t})}},Pn=class extends CustomEvent{constructor(t){super("change",{detail:t})}},kn=class extends CustomEvent{constructor(t){super("invalid",{detail:t})}};var Wu=f(k()),C=f(x());var L={fontSize:C.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:C.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:C.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:C.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:C.FtCssVariableFactory.extend("--ft-text-field-helper-color","",C.designSystemVariables.colorOnSurfaceMedium),colorPrimary:C.FtCssVariableFactory.external(C.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:C.FtCssVariableFactory.external(C.designSystemVariables.borderRadiusS,"Design system"),colorError:C.FtCssVariableFactory.external(C.designSystemVariables.colorError,"Design system"),prefixColor:C.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",C.designSystemVariables.colorOnSurfaceMedium),iconColor:C.FtCssVariableFactory.extend("--ft-text-field-icon-color","",C.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:C.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:C.FtCssVariableFactory.extend("--ft-text-field-background-color","",C.designSystemVariables.colorSurface),colorOutline:C.FtCssVariableFactory.external(C.designSystemVariables.colorOutline,"Design system"),elevation02:C.FtCssVariableFactory.external(C.designSystemVariables.elevation02,"Design system"),suggestSize:C.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},Ku=Wu.css`
1111
+ `}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,ie.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};N.elementDefinitions={"ft-ripple":$,"ft-tooltip":et,"ft-icon":rt,"ft-loader":br,"ft-typography":tt};N.styles=[ie.safariEllipsisFix,ea,ie.noTextSelect];Z([(0,K.property)({type:Boolean})],N.prototype,"primary",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"outlined",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"dense",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"round",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"disabled",void 0);Z([(0,K.property)()],N.prototype,"icon",void 0);Z([(0,K.property)()],N.prototype,"iconVariant",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"trailingIcon",void 0);Z([(0,K.property)()],N.prototype,"label",void 0);Z([(0,K.property)()],N.prototype,"type",void 0);Z([(0,K.property)()],N.prototype,"href",void 0);Z([(0,K.property)()],N.prototype,"target",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"loading",void 0);Z([(0,K.property)({attribute:"aria-label"})],N.prototype,"ariaLabel",void 0);Z([(0,K.property)()],N.prototype,"ariaHasPopup",void 0);Z([(0,K.property)({attribute:"aria-pressed"})],N.prototype,"ariaPressed",void 0);Z([(0,K.property)()],N.prototype,"tooltipPosition",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"hideTooltip",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"forceTooltip",void 0);Z([(0,K.property)({type:Boolean})],N.prototype,"activated",void 0);Z([(0,K.query)(".ft-button")],N.prototype,"button",void 0);Z([(0,K.query)(".ft-button--label slot")],N.prototype,"slottedContent",void 0);Z([(0,K.query)("[part=tooltip]")],N.prototype,"tooltip",void 0);var Vu=f(x());var ju={"ft-button":N};(0,Vu.customElements)(ju);var M=qe.build("integratedFeedbackComponent"),zu={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"};var Ln=class extends CustomEvent{constructor(t){super("live-change",{detail:t})}},Pn=class extends CustomEvent{constructor(t){super("change",{detail:t})}},kn=class extends CustomEvent{constructor(t){super("invalid",{detail:t})}};var Wu=f(k()),C=f(x());var L={fontSize:C.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:C.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:C.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:C.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:C.FtCssVariableFactory.extend("--ft-text-field-helper-color","",C.designSystemVariables.colorOnSurfaceMedium),colorPrimary:C.FtCssVariableFactory.external(C.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:C.FtCssVariableFactory.external(C.designSystemVariables.borderRadiusS,"Design system"),colorError:C.FtCssVariableFactory.external(C.designSystemVariables.colorError,"Design system"),prefixColor:C.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",C.designSystemVariables.colorOnSurfaceMedium),iconColor:C.FtCssVariableFactory.extend("--ft-text-field-icon-color","",C.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:C.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:C.FtCssVariableFactory.extend("--ft-text-field-background-color","",C.designSystemVariables.colorSurface),colorOutline:C.FtCssVariableFactory.external(C.designSystemVariables.colorOutline,"Design system"),elevation02:C.FtCssVariableFactory.external(C.designSystemVariables.elevation02,"Design system"),suggestSize:C.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},Ku=Wu.css`
1112
1112
  *:focus {
1113
1113
  outline: none;
1114
1114
  }
@@ -1394,14 +1394,14 @@
1394
1394
  .value=${this.icon}
1395
1395
  @click=${()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()}}></ft-icon>
1396
1396
  `:ht.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var r,i,n;!((r=this.input)===null||r===void 0)&&r.matches(":autofill")&&this.dispatchedValue!==((i=this.input)===null||i===void 0?void 0:i.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,r=!1){var i,n;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new Ln(t))),r&&this.dispatchedValue!==t&&(this.inputValid=(n=(i=this.input)===null||i===void 0?void 0:i.checkValidity())!==null&&n!==void 0?n:!0,this.inputValid?(this.dispatchedValue=t,this.dispatchEvent(new Pn(t))):this.dispatchEvent(new kn(this.input.validationMessage)))}handleInput(t){var r;let i=((r=this.input)===null||r===void 0?void 0:r.value)||"";this.setValue(i,t.key=="Escape"||t.key=="Enter")}catchComposingEvents(t){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var r;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let i=this.visibleSuggestions.findIndex(o=>o.matches(":focus-within")),n;t.key==="ArrowDown"?n=i<this.visibleSuggestions.length-1?i+1:0:n=i>0?i-1:this.visibleSuggestions.length-1,(r=this.visibleSuggestions[n])===null||r===void 0||r.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var r;this.setValue(t.detail,!0),(r=this.input)===null||r===void 0||r.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,r;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((r=this.input)===null||r===void 0?void 0:r.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let t=["bottom","top"];(0,Wt.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",t,"fixed","--text-field-internal-suggest-size",0).then(({x:r,y:i})=>{this.suggestionsContainer.style.left=`${r}px`,this.suggestionsContainer.style.top=`${i}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};_.elementDefinitions={"ft-input-label":zt,"ft-ripple":$,"ft-typography":tt,"ft-icon":rt,"ft-text-field-suggestion":ne};_.styles=[Or,Wt.noTextInputDefaultClearButton,Ku];D([(0,P.property)()],_.prototype,"label",void 0);D([(0,P.property)({noAccessor:!0})],_.prototype,"value",null);D([(0,P.state)()],_.prototype,"dispatchedValue",void 0);D([(0,P.property)()],_.prototype,"helper",void 0);D([(0,P.property)()],_.prototype,"suggestionsHelper",void 0);D([(0,P.property)({type:Boolean})],_.prototype,"outlined",void 0);D([(0,P.property)({type:Boolean})],_.prototype,"disabled",void 0);D([(0,P.property)({type:Boolean})],_.prototype,"error",void 0);D([(0,P.property)({type:Boolean})],_.prototype,"fixedMenuPosition",void 0);D([(0,P.property)()],_.prototype,"prefix",void 0);D([(0,P.property)()],_.prototype,"icon",void 0);D([(0,P.property)()],_.prototype,"name",void 0);D([(0,P.property)()],_.prototype,"type",void 0);D([(0,P.property)()],_.prototype,"passwordHiddenIcon",void 0);D([(0,P.property)()],_.prototype,"passwordRevealedIcon",void 0);D([(0,P.property)()],_.prototype,"iconVariant",void 0);D([(0,P.property)({type:Boolean})],_.prototype,"filterSuggestions",void 0);D([(0,Wt.numberProperty)()],_.prototype,"maxLength",void 0);D([(0,P.property)({type:Boolean})],_.prototype,"password",void 0);D([(0,P.property)({type:String})],_.prototype,"autocomplete",void 0);D([(0,P.property)({attribute:!1})],_.prototype,"suggestionsProvider",void 0);D([(0,P.state)()],_.prototype,"focused",void 0);D([(0,P.state)()],_.prototype,"inputValid",void 0);D([(0,P.state)()],_.prototype,"hidePassword",void 0);D([(0,P.state)()],_.prototype,"hideSuggestions",void 0);D([(0,P.state)()],_.prototype,"visibleSuggestions",void 0);D([(0,P.state)()],_.prototype,"providedSuggestions",void 0);D([(0,P.query)(".ft-text-field--main-panel")],_.prototype,"mainPanel",void 0);D([(0,P.query)(".ft-text-field--input")],_.prototype,"input",void 0);D([(0,P.query)(".ft-text-field-suggestion--new-value")],_.prototype,"newValueSuggestion",void 0);D([(0,P.query)(".ft-text-field--suggestions")],_.prototype,"suggestionsContainer",void 0);D([(0,P.queryAll)("ft-text-field-suggestion")],_.prototype,"providedSuggestionsInDom",void 0);D([(0,P.queryAssignedElements)({selector:"ft-text-field-suggestion"})],_.prototype,"slottedSuggestions",void 0);D([(0,Wt.ignoreComposingEvents)()],_.prototype,"handleInput",null);D([(0,Wt.ignoreComposingEvents)()],_.prototype,"catchComposingEvents",null);var td=f(x());var Ju={"ft-text-field":_,"ft-text-field-suggestion":ne};(0,td.customElements)(Ju);var ed=f(k());var rd=ed.css`
1397
- `;var Oi=f(k()),Sr=f(F()),yt=f(x());var Nt=f(x());var id=f(x()),zp={setTranslationDestinationLanguage:(e,t)=>{e.translation.destinationLanguage=t.payload},setTranslationSourceLanguage:(e,t)=>{e.translation.sourceLanguage=t.payload},setTranslationProfileId:(e,t)=>{e.translation.profileId=t.payload},setTranslationLoading:(e,t)=>{e.translation.isLoading=t.payload},setTranslationError:(e,t)=>{e.translation.isError=t.payload},setTopicsRating:(e,t)=>{for(let r in t.payload)e.topicsRating[r]=t.payload[r]}},nd=e=>id.FtReduxStore.get({name:"ft-reader-"+e,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:zp});var As=class{constructor(t,r){this.mapId=t,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(t,r,i){return t.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:"",untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(t,r,i){return t.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,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),p=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...p],[c]})}convertSectionNodes(t,r,i){return t.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(t,r){var i,n,o,s,a,l,c,u;let p=(i=t.tocId)!==null&&i!==void 0?i:(o=(n=t.pageToc)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.tocId,d={number:this.pages.length+1,title:(s=t.title)!==null&&s!==void 0?s:"",untranslatedTitle:t.untranslatedTitle,rootTocId:p??"root",toc:((a=t.pageToc)!==null&&a!==void 0?a:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],rootDepth:p?this.nodeByTocId[p].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},h=(b,S)=>(S?d.topics:d.hiddenTopics).push(b),m=(c=(l=t.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];d.breadcrumb.forEach((b,S)=>{h(b,m[S])}),t.tocId&&h(t.tocId,t.pageConfiguration.isVisible),d.topics.push(...this.tocIds((u=t.pageToc)!==null&&u!==void 0?u:[]));let g=this.resolveOverridenRootTocIdByParentForcedByPagination(d.breadcrumb,m);return d.rootTocId=g??d.rootTocId,d.rootDepth=g?this.nodeByTocId[g].depth:d.rootDepth,d}resolveOverridenRootTocIdByParentForcedByPagination(t,r){for(let i=0;i<t.length;i++)if(r[i])return t[i]}registerPage(t){for(let r of[...t.topics,...t.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=t);this.pages.push(t)}tocIds(t){return t.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(t){let r=[t.tocId];for(;t?.parentTocId;)r.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return r}register(t){t.prettyUrl&&(this.nodeByUrl[t.prettyUrl]==null?this.nodeByUrl[t.prettyUrl]=t:this.duplicatedPrettyUrls.add(t.prettyUrl)),this.nodeByUrl[`${this.mapId}/${t.tocId}`]=t,this.nodeByTocId[t.tocId]=t}},Mn=class{convertPaginatedToc(t,r){return new As(t,r).build()}};var Nn=class extends Et{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,r,i){super(!1,r),this.converter=t,this._mapId=i,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(t=>this.fetchMap(t))),this.cache.register("enrichedToc",()=>this.withMapId(t=>this.fetchPages(t).then(r=>this.converter.convertPaginatedToc(t,r)))),this.cache.register("ratingSummary",()=>{var t,r;return Te((r=(t=A.getState().session)===null||t===void 0?void 0:t.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(t=>t!=="configuration")}makeCacheKey(t,r){return t+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(t){return this.cache.get(this.makeCacheKey("map",t),()=>this.fetchMap(this.mapId,t))}getMapNow(t){return this.cache.getNow(this.makeCacheKey("map",t))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(t){return this.cache.get(this.makeCacheKey("enrichedToc",t),()=>this.fetchPages(this.mapId,t).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(t){return this.cache.getNow(this.makeCacheKey("enrichedToc",t))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(t){return(await this.getEnrichedToc(t)).toc}async getPagesToc(t){return(await this.getEnrichedToc(t)).pagesToc}async getTranslationError(t){return(await this.getEnrichedToc(t)).translationError}async getTocNode(t,r){return(await this.getEnrichedToc(r)).nodeByTocId[t]}getTocNodeNow(t,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[t]}getTocNodeNowByUrl(t,r){var i,n;let o=this.getMapNow(r);return o?.prettyUrl==t||`${o?.id}/root`===t?(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[t]}async getPage(t,r){let i=await this.getEnrichedToc(r);return i.pages[t-1]||i.pages[0]}async getPageByTocId(t,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[t]||i.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,()=>this.fetchTopicMetadata(t))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,()=>this.fetchTopicHTMLContent(t))}getTranslatedTopicContent(t,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+t.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(t,r))}async getTopicMetadataValue(t,r){let i=this.getTocNodeNow(t);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(t,r){return this.cache.get("document-relatives-"+t+"-"+r.join("-"),()=>this.fetchRelativesForDocument(t,r))}getRelativesForTopicInMap(t,r,i){return this.cache.get("topic-relatives-"+[t,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(t,r,i))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true&locationValue=reader`)}getLink(t,r,i){let n=this.getNavigationData(t,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(t,r,i,n){var o,s;t=t||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[t],c=a?.nodeByTocId[t],u=c?.prettyUrl;return{mapId:this.mapId,tocId:t,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(t,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(t,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(t=>t?.publication)}getTopicRating(t){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===t)}:void 0})}rateMap(t,r){return this.makeRateMapRequest(t,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(t,r){return this.makeMapFeedbackRequest(t,r)}rateTopic(t,r,i){return this.makeRateTopicRequest(t,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(t){return this.makeUnrateTopicRequest(t).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let t=A.getState().session;t?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,r,i){return this.makeTopicFeedbackRequest(t,r,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t,r){let i=this.getTocNodeNow(t,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(t,{session:r}){var i;if(!this.isFeatureAvailable(t))return!1;switch(t){case Gt.FEEDBACK:return Te(r??[],z.FEEDBACK_USER);case Gt.RATING:return Te(r??[],z.RATING_USER);case Gt.PRINT:return Te(r??[],z.PRINT_USER);case Gt.BOOKMARK:return!!r?.sessionAuthenticated;case Gt.COLLECTIONS:return Te(r??[],z.COLLECTION_USER);case Gt.PERSONAL_BOOKS:return Te(r??[],z.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}};var $n=class e extends Nn{static async build(t){return new e(new Mn,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t,r){let i=await this.api.getMap(t,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t,r){return await this.getMap(r),this.api.getPages(t,this.fingerprint,r)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(t,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(t,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(t,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:[t]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(t,r){return this.api.sendMapFeedback(this.mapId,t,r)}makeRateMapRequest(t,r){return this.api.rateMap(this.mapId,t,r)}makeRateTopicRequest(t,r,i){return this.api.rateTopic(this.mapId,t,r,i)}makeTopicFeedbackRequest(t,r,i){return this.api.sendTopicFeedback(this.mapId,t,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}};var Wp="topicPivot";function od(e,t){let r=new URL(e);return t?.values.forEach(i=>{r.searchParams.append(Wp,i)}),r.href}var Un=class e{static build(t,r){return new e(nd(t.trim()||"context"),r??$n.build)}loaded(){return(0,Nt.waitUntil)(()=>this._loaded)}constructor(t,r,i,n){this.store=t,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new Nt.Debouncer(10),this.analyticsEventsService=n??new mn,this.initService(r)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setRenderedTopics(t){this.store.actions.renderedTopics(t)}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return(0,Nt.waitFor)(()=>this.service)}async navigateToTopic(t,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(t??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(t,o);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(t,r){var i,n,o;let s=(i=t==="root"?void 0:t)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(t!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(Er.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(t){await this.loaded();let i=await(await this.awaitService()).getPage(t,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;!((t=this.service)===null||t===void 0)&&t.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var t;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),(t=this.service)===null||t===void 0||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(t){var r,i,n,o,s;try{t&&this.setTranslationLoading(!0);let a=l=>{throw t&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(t).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(t).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(t).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(t).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,t&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof Nt.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var t;return(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var t;return(t=this.service)===null||t===void 0||t.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var t,r;let i=(t=this.store.getState().map)===null||t===void 0?void 0:t.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(Er.clusteringHelperCreated))}createClusteringHelper(){var t,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=(t=A.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&r!==void 0?r:[];return new Nt.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(t){var r,i,n;await this.loaded();let o=await(0,Nt.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,[t]);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(t){this.store.actions.searchInDocumentQuery(t)}async setTranslationDestinationLanguage(t){this.store.actions.setTranslationDestinationLanguage(t),t&&this.sendDocumentOnDemandTranslateEvent(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(t){this.store.actions.setTranslationSourceLanguage(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(t){this.store.actions.setTranslationProfileId(t)}async setTranslationLoading(t){this.store.actions.setTranslationLoading(t)}async setTranslationError(t){this.store.actions.setTranslationError(t)}getTranslationSettings(){var t;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(t=r.map)===null||t===void 0?void 0:t.lang}:void 0}setLinkPreviewDialogId(t){this.store.actions.linkPreviewDialogId(t)}async fetchMapRating(){var t;this.store.actions.mapRating(await((t=this.service)===null||t===void 0?void 0:t.getMapRating()))}async fetchTopicRating(t){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(t));i&&this.store.actions.setTopicsRating({[t]:i})}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}getAccurateNavigationData(t,r,i){return this.service.getAccurateNavigationData(t,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(t){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(t,this.getTranslationSettings())}fetchTopicContent(t){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,t),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(t,n).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(t)}getTocNode(t){return this.service.getTocNode(t,this.getTranslationSettings())}getPage(t){return this.service.getPage(t,this.getTranslationSettings())}onMapAttachmentsUpdate(){var t;(t=this.service)===null||t===void 0||t.clearMapAttachments(),this.store.dispatchEvent(new Event(Er.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(t){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=Nt.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",t),s=(0,Nt.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=od(s,c)}}return s}sendDocumentOnDemandTranslateEvent(t){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=A.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(t.code),profileId:l,document:u,translationOrigin:ki.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(t,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=A.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 d={...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(t),breadcrumb:u.map(h=>{var m;return{tocId:h.tocId,title:(m=h.untranslatedTitle)!==null&&m!==void 0?m:h.title}}),document:d,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(t){if(!t)return;let r=t.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Fn=class extends CustomEvent{constructor(t,r){super("ft-reader-map-loaded",{detail:{map:t,toc:r}})}},Bn=class extends CustomEvent{constructor(t,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Hn=class extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}},jn=class extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}},Vn=class extends Event{constructor(){super("ft-reader-map-not-found")}},zn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Wn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Kn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var $t=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Es=class{constructor(t){this.stateManager=t}searchInDocument(t){this.stateManager.setSearchInDocumentQuery(t??"")}},mt=class extends yt.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new yt.Debouncer(5),this.navigationDebouncer=new yt.Debouncer(10),this.mapLoadedEventDebouncer=new yt.Debouncer(50),this.addStore(A)}render(){return Oi.html`
1397
+ `;var Oi=f(k()),Sr=f(F()),yt=f(x());var $t=f(x());var id=f(x()),zp={setTranslationDestinationLanguage:(e,t)=>{e.translation.destinationLanguage=t.payload},setTranslationSourceLanguage:(e,t)=>{e.translation.sourceLanguage=t.payload},setTranslationProfileId:(e,t)=>{e.translation.profileId=t.payload},setTranslationLoading:(e,t)=>{e.translation.isLoading=t.payload},setTranslationError:(e,t)=>{e.translation.isError=t.payload},setTopicsRating:(e,t)=>{for(let r in t.payload)e.topicsRating[r]=t.payload[r]}},nd=e=>id.FtReduxStore.get({name:"ft-reader-"+e,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:zp});var As=class{constructor(t,r){this.mapId=t,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(t,r,i){return t.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:"",untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(t,r,i){return t.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,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),p=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...p],[c]})}convertSectionNodes(t,r,i){return t.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(t,r){var i,n,o,s,a,l,c,u;let p=(i=t.tocId)!==null&&i!==void 0?i:(o=(n=t.pageToc)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.tocId,d={number:this.pages.length+1,title:(s=t.title)!==null&&s!==void 0?s:"",untranslatedTitle:t.untranslatedTitle,rootTocId:p??"root",toc:((a=t.pageToc)!==null&&a!==void 0?a:[]).map(b=>this.nodeByTocId[b.tocId]),topics:[],hiddenTopics:[],rootDepth:p?this.nodeByTocId[p].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},h=(b,S)=>(S?d.topics:d.hiddenTopics).push(b),m=(c=(l=t.pageConfiguration)===null||l===void 0?void 0:l.parentsVisibility)!==null&&c!==void 0?c:[];d.breadcrumb.forEach((b,S)=>{h(b,m[S])}),t.tocId&&h(t.tocId,t.pageConfiguration.isVisible),d.topics.push(...this.tocIds((u=t.pageToc)!==null&&u!==void 0?u:[]));let g=this.resolveOverridenRootTocIdByParentForcedByPagination(d.breadcrumb,m);return d.rootTocId=g??d.rootTocId,d.rootDepth=g?this.nodeByTocId[g].depth:d.rootDepth,d}resolveOverridenRootTocIdByParentForcedByPagination(t,r){for(let i=0;i<t.length;i++)if(r[i])return t[i]}registerPage(t){for(let r of[...t.topics,...t.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=t);this.pages.push(t)}tocIds(t){return t.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(t){let r=[t.tocId];for(;t?.parentTocId;)r.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return r}register(t){t.prettyUrl&&(this.nodeByUrl[t.prettyUrl]==null?this.nodeByUrl[t.prettyUrl]=t:this.duplicatedPrettyUrls.add(t.prettyUrl)),this.nodeByUrl[`${this.mapId}/${t.tocId}`]=t,this.nodeByTocId[t.tocId]=t}},Mn=class{convertPaginatedToc(t,r){return new As(t,r).build()}};var Nn=class extends Tt{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,r,i){super(!1,r),this.converter=t,this._mapId=i,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(t=>this.fetchMap(t))),this.cache.register("enrichedToc",()=>this.withMapId(t=>this.fetchPages(t).then(r=>this.converter.convertPaginatedToc(t,r)))),this.cache.register("ratingSummary",()=>{var t,r;return Te((r=(t=A.getState().session)===null||t===void 0?void 0:t.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(t=>t!=="configuration")}makeCacheKey(t,r){return t+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(t){return this.cache.get(this.makeCacheKey("map",t),()=>this.fetchMap(this.mapId,t))}getMapNow(t){return this.cache.getNow(this.makeCacheKey("map",t))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(t){return this.cache.get(this.makeCacheKey("enrichedToc",t),()=>this.fetchPages(this.mapId,t).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(t){return this.cache.getNow(this.makeCacheKey("enrichedToc",t))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(t){return(await this.getEnrichedToc(t)).toc}async getPagesToc(t){return(await this.getEnrichedToc(t)).pagesToc}async getTranslationError(t){return(await this.getEnrichedToc(t)).translationError}async getTocNode(t,r){return(await this.getEnrichedToc(r)).nodeByTocId[t]}getTocNodeNow(t,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[t]}getTocNodeNowByUrl(t,r){var i,n;let o=this.getMapNow(r);return o?.prettyUrl==t||`${o?.id}/root`===t?(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[t]}async getPage(t,r){let i=await this.getEnrichedToc(r);return i.pages[t-1]||i.pages[0]}async getPageByTocId(t,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[t]||i.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,()=>this.fetchTopicMetadata(t))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,()=>this.fetchTopicHTMLContent(t))}getTranslatedTopicContent(t,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+t.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(t,r))}async getTopicMetadataValue(t,r){let i=this.getTocNodeNow(t);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(t,r){return this.cache.get("document-relatives-"+t+"-"+r.join("-"),()=>this.fetchRelativesForDocument(t,r))}getRelativesForTopicInMap(t,r,i){return this.cache.get("topic-relatives-"+[t,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(t,r,i))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true&locationValue=reader`)}getLink(t,r,i){let n=this.getNavigationData(t,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(t,r,i,n){var o,s;t=t||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[t],c=a?.nodeByTocId[t],u=c?.prettyUrl;return{mapId:this.mapId,tocId:t,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(t,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(t,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(t=>t?.publication)}getTopicRating(t){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===t)}:void 0})}rateMap(t,r){return this.makeRateMapRequest(t,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(t,r){return this.makeMapFeedbackRequest(t,r)}rateTopic(t,r,i){return this.makeRateTopicRequest(t,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(t){return this.makeUnrateTopicRequest(t).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let t=A.getState().session;t?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,r,i){return this.makeTopicFeedbackRequest(t,r,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t,r){let i=this.getTocNodeNow(t,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(t,{session:r}){var i;if(!this.isFeatureAvailable(t))return!1;switch(t){case Gt.FEEDBACK:return Te(r??[],z.FEEDBACK_USER);case Gt.RATING:return Te(r??[],z.RATING_USER);case Gt.PRINT:return Te(r??[],z.PRINT_USER);case Gt.BOOKMARK:return!!r?.sessionAuthenticated;case Gt.COLLECTIONS:return Te(r??[],z.COLLECTION_USER);case Gt.PERSONAL_BOOKS:return Te(r??[],z.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}};var $n=class e extends Nn{static async build(t){return new e(new Mn,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t,r){let i=await this.api.getMap(t,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t,r){return await this.getMap(r),this.api.getPages(t,this.fingerprint,r)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(t,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(t,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(t,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:[t]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(t,r){return this.api.sendMapFeedback(this.mapId,t,r)}makeRateMapRequest(t,r){return this.api.rateMap(this.mapId,t,r)}makeRateTopicRequest(t,r,i){return this.api.rateTopic(this.mapId,t,r,i)}makeTopicFeedbackRequest(t,r,i){return this.api.sendTopicFeedback(this.mapId,t,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}};var Wp="topicPivot";function od(e,t){let r=new URL(e);return t?.values.forEach(i=>{r.searchParams.append(Wp,i)}),r.href}var Un=class e{static build(t,r){return new e(nd(t.trim()||"context"),r??$n.build)}loaded(){return(0,$t.waitUntil)(()=>this._loaded)}constructor(t,r,i,n){this.store=t,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new $t.Debouncer(10),this.analyticsEventsService=n??new mn,this.initService(r)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setRenderedTopics(t){this.store.actions.renderedTopics(t)}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return(0,$t.waitFor)(()=>this.service)}async navigateToTopic(t,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(t??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(t,o);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(t,r){var i,n,o;let s=(i=t==="root"?void 0:t)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(t!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(Er.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(t){await this.loaded();let i=await(await this.awaitService()).getPage(t,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;!((t=this.service)===null||t===void 0)&&t.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var t;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),(t=this.service)===null||t===void 0||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(t){var r,i,n,o,s;try{t&&this.setTranslationLoading(!0);let a=l=>{throw t&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(t).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(t).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(t).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(t).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,t&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof $t.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var t;return(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var t;return(t=this.service)===null||t===void 0||t.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var t,r;let i=(t=this.store.getState().map)===null||t===void 0?void 0:t.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(Er.clusteringHelperCreated))}createClusteringHelper(){var t,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=(t=A.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&r!==void 0?r:[];return new $t.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(t){var r,i,n;await this.loaded();let o=await(0,$t.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,[t]);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(t){this.store.actions.searchInDocumentQuery(t)}async setTranslationDestinationLanguage(t){this.store.actions.setTranslationDestinationLanguage(t),t&&this.sendDocumentOnDemandTranslateEvent(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(t){this.store.actions.setTranslationSourceLanguage(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(t){this.store.actions.setTranslationProfileId(t)}async setTranslationLoading(t){this.store.actions.setTranslationLoading(t)}async setTranslationError(t){this.store.actions.setTranslationError(t)}getTranslationSettings(){var t;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(t=r.map)===null||t===void 0?void 0:t.lang}:void 0}setLinkPreviewDialogId(t){this.store.actions.linkPreviewDialogId(t)}async fetchMapRating(){var t;this.store.actions.mapRating(await((t=this.service)===null||t===void 0?void 0:t.getMapRating()))}async fetchTopicRating(t){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(t));i&&this.store.actions.setTopicsRating({[t]:i})}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}getAccurateNavigationData(t,r,i){return this.service.getAccurateNavigationData(t,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(t){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(t,this.getTranslationSettings())}fetchTopicContent(t){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,t),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(t,n).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(t)}getTocNode(t){return this.service.getTocNode(t,this.getTranslationSettings())}getPage(t){return this.service.getPage(t,this.getTranslationSettings())}onMapAttachmentsUpdate(){var t;(t=this.service)===null||t===void 0||t.clearMapAttachments(),this.store.dispatchEvent(new Event(Er.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(t){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=$t.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",t),s=(0,$t.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=od(s,c)}}return s}sendDocumentOnDemandTranslateEvent(t){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=A.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(t.code),profileId:l,document:u,translationOrigin:ki.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(t,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=A.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 d={...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(t),breadcrumb:u.map(h=>{var m;return{tocId:h.tocId,title:(m=h.untranslatedTitle)!==null&&m!==void 0?m:h.title}}),document:d,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(t){if(!t)return;let r=t.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Fn=class extends CustomEvent{constructor(t,r){super("ft-reader-map-loaded",{detail:{map:t,toc:r}})}},Bn=class extends CustomEvent{constructor(t,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Hn=class extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}},jn=class extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}},Vn=class extends Event{constructor(){super("ft-reader-map-not-found")}},zn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Wn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Kn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var Ut=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Es=class{constructor(t){this.stateManager=t}searchInDocument(t){this.stateManager.setSearchInDocumentQuery(t??"")}},mt=class extends yt.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new yt.Debouncer(5),this.navigationDebouncer=new yt.Debouncer(10),this.mapLoadedEventDebouncer=new yt.Debouncer(50),this.addStore(A)}render(){return Oi.html`
1398
1398
  ${this.importStyleIfNeeded()}
1399
1399
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
1400
1400
  `}importStyleIfNeeded(){var t,r;let i=(t=this.stateManager.service)===null||t===void 0?void 0:t.themeStylesheet();return!i||window.location.href.startsWith((r=this.baseUrl)!==null&&r!==void 0?r:"")?Oi.nothing:Oi.html`
1401
1401
  <style>
1402
1402
  @import "${i}"
1403
1403
  </style>
1404
- `}get stateManager(){return this._stateManager==null&&(this._stateManager=Un.build(this.id||(0,yt.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(t=>{let r=t.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 Es(this.stateManager)}),A.addEventListener(Oe.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),A.addEventListener(Oe.eventName,this.updateConfiguration)}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(r=>t.has(r))&&this.mapId&&this.navigateToTarget(),t.has("session")&&this.reload()}contentAvailableCallback(t){var r,i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=t.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(o=>this.dispatchEvent(new Hn(o))))}(t.has("visibleTopics")||t.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 o=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>({tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(s.tocId)}));this.dispatchEvent(new Bn(this.map,o))})}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 Kn),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)}),this.tocId&&!this.section&&(this.stateManager.store.commands.clear(/^focus-topic-/),this.stateManager.store.commands.add({type:`focus-topic-${this.tocId}`}))}registerComponent(t){t.stopPropagation();let r=t.composedPath()[0];this.register(r)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){let r=t;r.status===401?this.dispatchEvent(new zn):r.status===403?this.dispatchEvent(new Wn):r.status===404?this.dispatchEvent(new Vn):this.dispatchEvent(new jn(t))}reloadBookmarks(){ns.reloadBookmarks()}async reloadRating(){var t,r;await((t=this.stateManager.service)===null||t===void 0?void 0:t.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new Fn(this.map,this.toc))})}};mt.styles=rd;$t([(0,yt.redux)({store:A.name})],mt.prototype,"baseUrl",void 0);$t([(0,yt.redux)({store:A.name})],mt.prototype,"session",void 0);$t([(0,Sr.property)()],mt.prototype,"mapId",void 0);$t([(0,Sr.property)()],mt.prototype,"tocId",void 0);$t([(0,Sr.property)()],mt.prototype,"section",void 0);$t([(0,Sr.property)()],mt.prototype,"topicPivot",void 0);$t([(0,Sr.property)()],mt.prototype,"searchInDocumentQuery",void 0);$t([(0,yt.numberProperty)({min:1})],mt.prototype,"page",void 0);$t([(0,yt.redux)({store:"reader"})],mt.prototype,"map",void 0);$t([(0,yt.redux)({store:"reader"})],mt.prototype,"toc",void 0);$t([(0,yt.redux)({store:"reader"})],mt.prototype,"visibleTopics",void 0);$t([(0,yt.redux)({store:"reader"})],mt.prototype,"currentPage",void 0);$t([(0,yt.redux)({store:"reader"})],mt.prototype,"scrollTarget",void 0);$t([(0,Sr.property)({attribute:!1})],mt.prototype,"readerServiceProvider",void 0);var ad=f(x());var sd={"ft-reader-context":mt};(0,ad.customElements)(sd);var Gn=class extends CustomEvent{constructor(t){super("send-feedback",{detail:t})}},qn=class extends CustomEvent{constructor(t){super("ft-reader-topic-feedback",{composed:!0,bubbles:!0,detail:t})}},Yn=class extends CustomEvent{constructor(t){super("ft-reader-feedback",{composed:!0,bubbles:!0,detail:t})}},Xn=class extends CustomEvent{constructor(t){super("ft-reader-mailer-topic-feedback",{composed:!0,bubbles:!0,detail:{topic:t}})}},Zn=class extends CustomEvent{constructor(){super("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0})}};var gt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},H=class extends Ge(De){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.addI18nContext(M,zu)}get canAccessFeedback(){var t;return(t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(Gt.FEEDBACK,{session:this.session})}get canRateThisContent(){var t;return((t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(Gt.RATING,{session:this.session}))&&this.ratingAllowed&&this.configuredRatingType!=ct.NO_RATING}get configuredRatingType(){var t,r;return(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.type)!==null&&r!==void 0?r:ct.NO_RATING}get ratingTypeOfDoneRatingOfThisContent(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.type)!==null&&i!==void 0?i:ct.NO_RATING}get ratingValue(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.value)!==null&&i!==void 0?i:-1}get ratingDate(){var t,r;let i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.date;return typeof i=="string"?(0,Qn.parseDate)(i):i}render(){return!this.canAccessFeedback&&!this.canRateThisContent?nt.nothing:nt.html`
1404
+ `}get stateManager(){return this._stateManager==null&&(this._stateManager=Un.build(this.id||(0,yt.randomId)(6),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then(t=>{let r=t.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 Es(this.stateManager)}),A.addEventListener(Oe.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),A.addEventListener(Oe.eventName,this.updateConfiguration)}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&this.searchInDocumentQuery!=null&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some(r=>t.has(r))&&this.mapId&&this.navigateToTarget(),t.has("session")&&this.reload()}contentAvailableCallback(t){var r,i;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&((r=this.scrollTarget)===null||r===void 0?void 0:r.tocId)==null){let n=t.get("scrollTarget");n?.tocId!=null&&this.scrollToTargetDebouncer.run(()=>this.stateManager.getAccurateNavigationData(n.tocId,this.currentPage,n).then(o=>this.dispatchEvent(new Hn(o))))}(t.has("visibleTopics")||t.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 o=n.filter(s=>s!=null&&s.topicTitle!=="").map(s=>({tocId:s.tocId,title:s.topicTitle,page:s.page,prettyUrl:s.prettyUrl,prettyUrlDuplicated:s.prettyUrlDuplicated,breadcrumb:this.stateManager.buildBreadcrumb(s.tocId)}));this.dispatchEvent(new Bn(this.map,o))})}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 Kn),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)}),this.tocId&&!this.section&&(this.stateManager.store.commands.clear(/^focus-topic-/),this.stateManager.store.commands.add({type:`focus-topic-${this.tocId}`}))}registerComponent(t){t.stopPropagation();let r=t.composedPath()[0];this.register(r)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){let r=t;r.status===401?this.dispatchEvent(new zn):r.status===403?this.dispatchEvent(new Wn):r.status===404?this.dispatchEvent(new Vn):this.dispatchEvent(new jn(t))}reloadBookmarks(){ns.reloadBookmarks()}async reloadRating(){var t,r;await((t=this.stateManager.service)===null||t===void 0?void 0:t.reloadRating()),(r=this.stateManager.store)===null||r===void 0||r.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run(()=>{this.map&&this.toc&&this.dispatchEvent(new Fn(this.map,this.toc))})}};mt.styles=rd;Ut([(0,yt.redux)({store:A.name})],mt.prototype,"baseUrl",void 0);Ut([(0,yt.redux)({store:A.name})],mt.prototype,"session",void 0);Ut([(0,Sr.property)()],mt.prototype,"mapId",void 0);Ut([(0,Sr.property)()],mt.prototype,"tocId",void 0);Ut([(0,Sr.property)()],mt.prototype,"section",void 0);Ut([(0,Sr.property)()],mt.prototype,"topicPivot",void 0);Ut([(0,Sr.property)()],mt.prototype,"searchInDocumentQuery",void 0);Ut([(0,yt.numberProperty)({min:1})],mt.prototype,"page",void 0);Ut([(0,yt.redux)({store:"reader"})],mt.prototype,"map",void 0);Ut([(0,yt.redux)({store:"reader"})],mt.prototype,"toc",void 0);Ut([(0,yt.redux)({store:"reader"})],mt.prototype,"visibleTopics",void 0);Ut([(0,yt.redux)({store:"reader"})],mt.prototype,"currentPage",void 0);Ut([(0,yt.redux)({store:"reader"})],mt.prototype,"scrollTarget",void 0);Ut([(0,Sr.property)({attribute:!1})],mt.prototype,"readerServiceProvider",void 0);var ad=f(x());var sd={"ft-reader-context":mt};(0,ad.customElements)(sd);var Gn=class extends CustomEvent{constructor(t){super("send-feedback",{detail:t})}},qn=class extends CustomEvent{constructor(t){super("ft-reader-topic-feedback",{composed:!0,bubbles:!0,detail:t})}},Yn=class extends CustomEvent{constructor(t){super("ft-reader-feedback",{composed:!0,bubbles:!0,detail:t})}},Xn=class extends CustomEvent{constructor(t){super("ft-reader-mailer-topic-feedback",{composed:!0,bubbles:!0,detail:{topic:t}})}},Zn=class extends CustomEvent{constructor(){super("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0})}};var gt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},H=class extends Ge(De){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.addI18nContext(M,zu)}get canAccessFeedback(){var t;return(t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(Gt.FEEDBACK,{session:this.session})}get canRateThisContent(){var t;return((t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(Gt.RATING,{session:this.session}))&&this.ratingAllowed&&this.configuredRatingType!=ct.NO_RATING}get configuredRatingType(){var t,r;return(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.type)!==null&&r!==void 0?r:ct.NO_RATING}get ratingTypeOfDoneRatingOfThisContent(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.type)!==null&&i!==void 0?i:ct.NO_RATING}get ratingValue(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.value)!==null&&i!==void 0?i:-1}get ratingDate(){var t,r;let i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.date;return typeof i=="string"?(0,Qn.parseDate)(i):i}render(){return!this.canAccessFeedback&&!this.canRateThisContent?nt.nothing:nt.html`
1405
1405
  <div class="ft-reader-feedback">
1406
1406
  ${this.hideTitle?nt.nothing:nt.html`
1407
1407
  <ft-typography variant="title" part="main-title">
@@ -1520,7 +1520,7 @@ _________________________________________________________________
1520
1520
  ${t??""}
1521
1521
 
1522
1522
  _________________________________________________________________
1523
- ${Zr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configuration)===null||r===void 0?void 0:r.recipients.join(",")}?subject=${i}&body=${n}`}};var Qe=qe.build("inDesignerFeedbackComponent"),Jn={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var xt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},q=class extends Ge(De){constructor(t=new Wr){super(),this.guestStorage=t,this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=Dt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Qr,this.i18nProperties={feedbackMainTitle:M.properties.mapFeedbackMainTitle(),ratingSectionTitle:M.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:M.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:M.properties.mapFeedbackSectionTitle()},this.loadGuestRating=()=>{let r=this.guestStorage.get(this.guestRatingKey());r&&(this.ratingSummary=r)},this.guestRatingKey=()=>{var r;return"ft-reader-map-feedback-guest-rating-"+((r=this.map)===null||r===void 0?void 0:r.id)},this.sendRatingDebouncer=new wt.Debouncer(500),this.addStore(A)}render(){return cd.html`
1523
+ ${Zr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configuration)===null||r===void 0?void 0:r.recipients.join(",")}?subject=${i}&body=${n}`}};var Qe=qe.build("inDesignerFeedbackComponent"),Jn={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var St=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},q=class extends Ge(De){constructor(t=new Wr){super(),this.guestStorage=t,this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=Mt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Qr,this.i18nProperties={feedbackMainTitle:M.properties.mapFeedbackMainTitle(),ratingSectionTitle:M.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:M.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:M.properties.mapFeedbackSectionTitle()},this.loadGuestRating=()=>{let r=this.guestStorage.get(this.guestRatingKey());r&&(this.ratingSummary=r)},this.guestRatingKey=()=>{var r;return"ft-reader-map-feedback-guest-rating-"+((r=this.map)===null||r===void 0?void 0:r.id)},this.sendRatingDebouncer=new wt.Debouncer(500),this.addStore(A)}render(){return cd.html`
1524
1524
  <ft-reader-feedback
1525
1525
  ratingAllowed
1526
1526
  .i18nProperties=${this.i18nProperties}
@@ -1542,7 +1542,7 @@ ${Zr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
1542
1542
  @mailer-feedback=${this.onMailerFeedbackSent}
1543
1543
  @open-more-options=${this.openMoreOptions}
1544
1544
  ></ft-reader-feedback>
1545
- `}willUpdate(t){var r,i,n,o,s;super.willUpdate(t),t.has("map")&&this.map&&((r=this.stateManager)===null||r===void 0||r.fetchMapRating()),t.has("editorMode")&&this.editorMode&&this.addI18nContext(Qe,Jn),["map","configuration","user","mailSubject"].some(a=>t.has(a))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(n=(i=this.service)===null||i===void 0?void 0:i.getLink())!==null&&n!==void 0?n:"",this.map.metadata,this.configuration,((s=(o=this.session)===null||o===void 0?void 0:o.profile)===null||s===void 0?void 0:s.userId)!=null),["session","map"].some(a=>t.has(a))&&this.session&&this.map&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}async fetchRatingSummary(){var t;await((t=this.stateManager)===null||t===void 0?void 0:t.fetchMapRating())}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var r,i,n,o;if(!this.editorMode&&this.ratingSummary){try{t==null?await((r=this.service)===null||r===void 0?void 0:r.unrateMap()):await((i=this.service)===null||i===void 0?void 0:i.rateMap((n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new wt.FtNotificationEvent({type:"error",message:M.messages.ratingFailure()}))}await((o=this.stateManager)===null||o===void 0?void 0:o.fetchMapRating())}else this.editorMode&&this.dispatchEvent(new wt.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var r;try{this.editorMode?this.dispatchEvent(new wt.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()})):(await((r=this.service)===null||r===void 0?void 0:r.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new wt.FtNotificationEvent({type:"info",message:M.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new wt.FtNotificationEvent({type:"error",message:M.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new Zn)}openMoreOptions(){var t,r,i;this.dispatchEvent(new Yn({mapId:this.map.id,mapTitle:this.map.title,mapMetadata:((t=this.map)===null||t===void 0?void 0:t.metadata)||[],ratingType:((r=this.ratingSummary)===null||r===void 0?void 0:r.type)||ct.NO_RATING,ratingValue:(i=this.ratingSummary)===null||i===void 0?void 0:i.rating}))}};q.elementDefinitions={"ft-reader-feedback":H};q.storedRatingIfAuthenticated=(e,t)=>{var r,i;return!((r=t.session)===null||r===void 0)&&r.sessionAuthenticated?e.mapRating:(i=t.ratingSummary)!==null&&i!==void 0?i:e.mapRating};xt([(0,wt.redux)({store:A.name})],q.prototype,"session",void 0);xt([(0,wt.redux)({store:"reader"})],q.prototype,"map",void 0);xt([(0,wt.redux)({store:A.name})],q.prototype,"editorMode",void 0);xt([(0,wt.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],q.prototype,"configuration",void 0);xt([(0,wt.redux)({store:"reader",selector:q.storedRatingIfAuthenticated})],q.prototype,"ratingSummary",void 0);xt([(0,oe.property)({type:Boolean})],q.prototype,"hideTitle",void 0);xt([(0,oe.property)({type:Boolean})],q.prototype,"withMoreOptionsButton",void 0);xt([(0,oe.property)()],q.prototype,"iconVariant",void 0);xt([(0,oe.property)()],q.prototype,"emptyStarIcon",void 0);xt([(0,oe.property)()],q.prototype,"filledStarIcon",void 0);xt([(0,oe.property)()],q.prototype,"emptyLikeIcon",void 0);xt([(0,oe.property)()],q.prototype,"filledLikeIcon",void 0);xt([(0,oe.property)()],q.prototype,"emptyDislikeIcon",void 0);xt([(0,oe.property)()],q.prototype,"filledDislikeIcon",void 0);xt([(0,oe.query)("ft-reader-feedback")],q.prototype,"readerFeedback",void 0);xt([Sn(Zr.properties["mail.map_feedback.subject"](e=>{var t;return[(t=e.map)===null||t===void 0?void 0:t.title]}))],q.prototype,"mailSubject",void 0);xt([(0,wt.reduxEventListener)({eventName:"rating-changed"})],q.prototype,"fetchRatingSummary",null);var dd=f(k()),se=f(F()),Ct=f(x());var Ii=f(F()),ud=f(x());var to=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ws=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},Ts=Symbol("registerInterval"),Kp=(0,ud.applyMixinOnce)(Symbol("toFtReaderTopicComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[Ts]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[Ts]):this.dispatchEvent(new ws)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=Ts,to([(0,Ii.state)()],r.prototype,"tocNode",void 0),to([(0,Ii.state)()],r.prototype,"disableContextInteractions",void 0),to([(0,Ii.state)()],r.prototype,"headingLevelsShift",void 0),to([(0,Ii.state)()],r.prototype,"headingStartLevel",void 0),r}),eo=class extends Kp(De){};var St=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Y=class extends Ge(eo){constructor(t=new Wr){super(),this.guestStorage=t,this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=Dt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Qr,this.i18nProperties={feedbackMainTitle:M.properties.topicFeedbackMainTitle(),ratingSectionTitle:M.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:M.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:M.properties.topicFeedbackSectionTitle()},this.loadGuestRating=()=>{let r=this.guestStorage.get(this.guestRatingKey());r&&(this.ratingSummary=r)},this.guestRatingKey=()=>{var r;return"ft-reader-topic-feedback-guest-rating-"+((r=this.tocNode)===null||r===void 0?void 0:r.tocId)},this.sendRatingDebouncer=new Ct.Debouncer(500),this.addStore(A)}render(){var t;return dd.html`
1545
+ `}willUpdate(t){var r,i,n,o,s;super.willUpdate(t),t.has("map")&&this.map&&((r=this.stateManager)===null||r===void 0||r.fetchMapRating()),t.has("editorMode")&&this.editorMode&&this.addI18nContext(Qe,Jn),["map","configuration","user","mailSubject"].some(a=>t.has(a))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(n=(i=this.service)===null||i===void 0?void 0:i.getLink())!==null&&n!==void 0?n:"",this.map.metadata,this.configuration,((s=(o=this.session)===null||o===void 0?void 0:o.profile)===null||s===void 0?void 0:s.userId)!=null),["session","map"].some(a=>t.has(a))&&this.session&&this.map&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}async fetchRatingSummary(){var t;await((t=this.stateManager)===null||t===void 0?void 0:t.fetchMapRating())}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var r,i,n,o;if(!this.editorMode&&this.ratingSummary){try{t==null?await((r=this.service)===null||r===void 0?void 0:r.unrateMap()):await((i=this.service)===null||i===void 0?void 0:i.rateMap((n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new wt.FtNotificationEvent({type:"error",message:M.messages.ratingFailure()}))}await((o=this.stateManager)===null||o===void 0?void 0:o.fetchMapRating())}else this.editorMode&&this.dispatchEvent(new wt.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var r;try{this.editorMode?this.dispatchEvent(new wt.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()})):(await((r=this.service)===null||r===void 0?void 0:r.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new wt.FtNotificationEvent({type:"info",message:M.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new wt.FtNotificationEvent({type:"error",message:M.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new Zn)}openMoreOptions(){var t,r,i;this.dispatchEvent(new Yn({mapId:this.map.id,mapTitle:this.map.title,mapMetadata:((t=this.map)===null||t===void 0?void 0:t.metadata)||[],ratingType:((r=this.ratingSummary)===null||r===void 0?void 0:r.type)||ct.NO_RATING,ratingValue:(i=this.ratingSummary)===null||i===void 0?void 0:i.rating}))}};q.elementDefinitions={"ft-reader-feedback":H};q.storedRatingIfAuthenticated=(e,t)=>{var r,i;return!((r=t.session)===null||r===void 0)&&r.sessionAuthenticated?e.mapRating:(i=t.ratingSummary)!==null&&i!==void 0?i:e.mapRating};St([(0,wt.redux)({store:A.name})],q.prototype,"session",void 0);St([(0,wt.redux)({store:"reader"})],q.prototype,"map",void 0);St([(0,wt.redux)({store:A.name})],q.prototype,"editorMode",void 0);St([(0,wt.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],q.prototype,"configuration",void 0);St([(0,wt.redux)({store:"reader",selector:q.storedRatingIfAuthenticated})],q.prototype,"ratingSummary",void 0);St([(0,oe.property)({type:Boolean})],q.prototype,"hideTitle",void 0);St([(0,oe.property)({type:Boolean})],q.prototype,"withMoreOptionsButton",void 0);St([(0,oe.property)()],q.prototype,"iconVariant",void 0);St([(0,oe.property)()],q.prototype,"emptyStarIcon",void 0);St([(0,oe.property)()],q.prototype,"filledStarIcon",void 0);St([(0,oe.property)()],q.prototype,"emptyLikeIcon",void 0);St([(0,oe.property)()],q.prototype,"filledLikeIcon",void 0);St([(0,oe.property)()],q.prototype,"emptyDislikeIcon",void 0);St([(0,oe.property)()],q.prototype,"filledDislikeIcon",void 0);St([(0,oe.query)("ft-reader-feedback")],q.prototype,"readerFeedback",void 0);St([Sn(Zr.properties["mail.map_feedback.subject"](e=>{var t;return[(t=e.map)===null||t===void 0?void 0:t.title]}))],q.prototype,"mailSubject",void 0);St([(0,wt.reduxEventListener)({eventName:"rating-changed"})],q.prototype,"fetchRatingSummary",null);var dd=f(k()),se=f(F()),Ct=f(x());var Ii=f(F()),ud=f(x());var to=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ws=class extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}},Ts=Symbol("registerInterval"),Kp=(0,ud.applyMixinOnce)(Symbol("toFtReaderTopicComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this.disableContextInteractions=!1,this.headingLevelsShift=0,this[t]=0}connectedCallback(){super.connectedCallback(),this[Ts]=window.setInterval(()=>this.tryToRegisterToTopicContext(),50)}tryToRegisterToTopicContext(){this.tocNode!=null?window.clearInterval(this[Ts]):this.dispatchEvent(new ws)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return t=Ts,to([(0,Ii.state)()],r.prototype,"tocNode",void 0),to([(0,Ii.state)()],r.prototype,"disableContextInteractions",void 0),to([(0,Ii.state)()],r.prototype,"headingLevelsShift",void 0),to([(0,Ii.state)()],r.prototype,"headingStartLevel",void 0),r}),eo=class extends Kp(De){};var At=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Y=class extends Ge(eo){constructor(t=new Wr){super(),this.guestStorage=t,this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=Mt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Qr,this.i18nProperties={feedbackMainTitle:M.properties.topicFeedbackMainTitle(),ratingSectionTitle:M.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:M.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:M.properties.topicFeedbackSectionTitle()},this.loadGuestRating=()=>{let r=this.guestStorage.get(this.guestRatingKey());r&&(this.ratingSummary=r)},this.guestRatingKey=()=>{var r;return"ft-reader-topic-feedback-guest-rating-"+((r=this.tocNode)===null||r===void 0?void 0:r.tocId)},this.sendRatingDebouncer=new Ct.Debouncer(500),this.addStore(A)}render(){var t;return dd.html`
1546
1546
  <ft-reader-feedback
1547
1547
  .i18nProperties=${this.i18nProperties}
1548
1548
  ?ratingAllowed=${(t=this.tocNode)===null||t===void 0?void 0:t.hasRating}
@@ -1564,7 +1564,7 @@ ${Zr.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
1564
1564
  @mailer-feedback=${this.onMailerFeedbackSent}
1565
1565
  @open-more-options=${this.openMoreOptions}
1566
1566
  ></ft-reader-feedback>
1567
- `}willUpdate(t){var r,i,n,o,s;super.willUpdate(t),["tocNode","user"].some(a=>t.has(a))&&this.tocNode&&((r=this.stateManager)===null||r===void 0||r.fetchTopicRating(this.tocNode.tocId)),t.has("editorMode")&&this.editorMode&&this.addI18nContext(Qe,Jn),["map","tocNode","configuration","user","mailSubject"].some(a=>t.has(a))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(n=(i=this.service)===null||i===void 0?void 0:i.getLink(this.tocNode.tocId))!==null&&n!==void 0?n:"",this.map.metadata,this.configuration,((s=(o=this.session)===null||o===void 0?void 0:o.profile)===null||s===void 0?void 0:s.userId)!=null),["session","tocNode"].some(a=>t.has(a))&&this.session&&this.tocNode&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}async fetchRatingSummary(){var t;await((t=this.stateManager)===null||t===void 0?void 0:t.fetchTopicRating(this.tocNode.tocId))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var r,i,n,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{t==null?await((r=this.service)===null||r===void 0?void 0:r.unrateTopic(this.tocNode.tocId)):await((i=this.service)===null||i===void 0?void 0:i.rateTopic(this.tocNode.tocId,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Ct.FtNotificationEvent({type:"error",message:M.messages.ratingFailure()}))}await((o=this.stateManager)===null||o===void 0?void 0:o.fetchTopicRating(this.tocNode.tocId))}else this.editorMode&&this.dispatchEvent(new Ct.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var r;try{!this.editorMode&&this.tocNode?(await((r=this.service)===null||r===void 0?void 0:r.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Ct.FtNotificationEvent({type:"info",message:M.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Ct.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Ct.FtNotificationEvent({type:"error",message:M.messages.feedbackFailure()}))}}onMailerFeedbackSent(){let t=this.tocNode;this.dispatchEvent(new Xn(t))}openMoreOptions(){var t,r,i,n,o,s,a,l;this.dispatchEvent(new qn({mapId:this.map.id,mapTitle:this.map.title,tocId:this.tocNode.tocId,topicTitle:this.tocNode.title,topicUrl:(r=(t=this.service)===null||t===void 0?void 0:t.getLink(this.tocNode.tocId))!==null&&r!==void 0?r:"",mapMetadata:((i=this.map)===null||i===void 0?void 0:i.metadata)||[],breadcrumb:((o=(n=this.stateManager)===null||n===void 0?void 0:n.service)===null||o===void 0?void 0:o.buildBreadcrumb(this.tocNode.tocId))||[],ratingType:(!((s=this.tocNode)===null||s===void 0)&&s.hasRating?(a=this.ratingSummary)===null||a===void 0?void 0:a.type:ct.NO_RATING)||ct.NO_RATING,ratingValue:(l=this.ratingSummary)===null||l===void 0?void 0:l.rating}))}};Y.elementDefinitions={"ft-reader-feedback":H};Y.storedRatingIfAuthenticated=(e,t)=>{var r,i,n,o;let s=e.topicsRating[(i=(r=t.tocNode)===null||r===void 0?void 0:r.tocId)!==null&&i!==void 0?i:""];return!((n=t.session)===null||n===void 0)&&n.sessionAuthenticated?s:(o=t.ratingSummary)!==null&&o!==void 0?o:s};St([(0,Ct.redux)({store:A.name})],Y.prototype,"session",void 0);St([(0,Ct.redux)({store:"reader"})],Y.prototype,"map",void 0);St([(0,Ct.redux)({store:A.name})],Y.prototype,"editorMode",void 0);St([(0,Ct.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],Y.prototype,"configuration",void 0);St([(0,Ct.redux)({store:"reader",selector:Y.storedRatingIfAuthenticated})],Y.prototype,"ratingSummary",void 0);St([(0,se.property)({type:Boolean})],Y.prototype,"hideTitle",void 0);St([(0,se.property)({type:Boolean})],Y.prototype,"withMoreOptionsButton",void 0);St([(0,se.property)()],Y.prototype,"iconVariant",void 0);St([(0,se.property)()],Y.prototype,"emptyStarIcon",void 0);St([(0,se.property)()],Y.prototype,"filledStarIcon",void 0);St([(0,se.property)()],Y.prototype,"emptyLikeIcon",void 0);St([(0,se.property)()],Y.prototype,"filledLikeIcon",void 0);St([(0,se.property)()],Y.prototype,"emptyDislikeIcon",void 0);St([(0,se.property)()],Y.prototype,"filledDislikeIcon",void 0);St([(0,se.query)("ft-reader-feedback")],Y.prototype,"readerFeedback",void 0);St([Sn(Zr.properties["mail.feedback.subject"](e=>{var t,r;return[(t=e.tocNode)===null||t===void 0?void 0:t.title,(r=e.map)===null||r===void 0?void 0:r.title]}))],Y.prototype,"mailSubject",void 0);St([(0,Ct.reduxEventListener)({eventName:"rating-changed"})],Y.prototype,"fetchRatingSummary",null);var pd={"ft-reader-map-feedback":q,"ft-reader-topic-feedback":Y};(0,fd.customElements)(pd);})();
1567
+ `}willUpdate(t){var r,i,n,o,s;super.willUpdate(t),["tocNode","user"].some(a=>t.has(a))&&this.tocNode&&((r=this.stateManager)===null||r===void 0||r.fetchTopicRating(this.tocNode.tocId)),t.has("editorMode")&&this.editorMode&&this.addI18nContext(Qe,Jn),["map","tocNode","configuration","user","mailSubject"].some(a=>t.has(a))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(n=(i=this.service)===null||i===void 0?void 0:i.getLink(this.tocNode.tocId))!==null&&n!==void 0?n:"",this.map.metadata,this.configuration,((s=(o=this.session)===null||o===void 0?void 0:o.profile)===null||s===void 0?void 0:s.userId)!=null),["session","tocNode"].some(a=>t.has(a))&&this.session&&this.tocNode&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}async fetchRatingSummary(){var t;await((t=this.stateManager)===null||t===void 0?void 0:t.fetchTopicRating(this.tocNode.tocId))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var r,i,n,o;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{t==null?await((r=this.service)===null||r===void 0?void 0:r.unrateTopic(this.tocNode.tocId)):await((i=this.service)===null||i===void 0?void 0:i.rateTopic(this.tocNode.tocId,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Ct.FtNotificationEvent({type:"error",message:M.messages.ratingFailure()}))}await((o=this.stateManager)===null||o===void 0?void 0:o.fetchTopicRating(this.tocNode.tocId))}else this.editorMode&&this.dispatchEvent(new Ct.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var r;try{!this.editorMode&&this.tocNode?(await((r=this.service)===null||r===void 0?void 0:r.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Ct.FtNotificationEvent({type:"info",message:M.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Ct.FtNotificationEvent({type:"info",message:Qe.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Ct.FtNotificationEvent({type:"error",message:M.messages.feedbackFailure()}))}}onMailerFeedbackSent(){let t=this.tocNode;this.dispatchEvent(new Xn(t))}openMoreOptions(){var t,r,i,n,o,s,a,l;this.dispatchEvent(new qn({mapId:this.map.id,mapTitle:this.map.title,tocId:this.tocNode.tocId,topicTitle:this.tocNode.title,topicUrl:(r=(t=this.service)===null||t===void 0?void 0:t.getLink(this.tocNode.tocId))!==null&&r!==void 0?r:"",mapMetadata:((i=this.map)===null||i===void 0?void 0:i.metadata)||[],breadcrumb:((o=(n=this.stateManager)===null||n===void 0?void 0:n.service)===null||o===void 0?void 0:o.buildBreadcrumb(this.tocNode.tocId))||[],ratingType:(!((s=this.tocNode)===null||s===void 0)&&s.hasRating?(a=this.ratingSummary)===null||a===void 0?void 0:a.type:ct.NO_RATING)||ct.NO_RATING,ratingValue:(l=this.ratingSummary)===null||l===void 0?void 0:l.rating}))}};Y.elementDefinitions={"ft-reader-feedback":H};Y.storedRatingIfAuthenticated=(e,t)=>{var r,i,n,o;let s=e.topicsRating[(i=(r=t.tocNode)===null||r===void 0?void 0:r.tocId)!==null&&i!==void 0?i:""];return!((n=t.session)===null||n===void 0)&&n.sessionAuthenticated?s:(o=t.ratingSummary)!==null&&o!==void 0?o:s};At([(0,Ct.redux)({store:A.name})],Y.prototype,"session",void 0);At([(0,Ct.redux)({store:"reader"})],Y.prototype,"map",void 0);At([(0,Ct.redux)({store:A.name})],Y.prototype,"editorMode",void 0);At([(0,Ct.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],Y.prototype,"configuration",void 0);At([(0,Ct.redux)({store:"reader",selector:Y.storedRatingIfAuthenticated})],Y.prototype,"ratingSummary",void 0);At([(0,se.property)({type:Boolean})],Y.prototype,"hideTitle",void 0);At([(0,se.property)({type:Boolean})],Y.prototype,"withMoreOptionsButton",void 0);At([(0,se.property)()],Y.prototype,"iconVariant",void 0);At([(0,se.property)()],Y.prototype,"emptyStarIcon",void 0);At([(0,se.property)()],Y.prototype,"filledStarIcon",void 0);At([(0,se.property)()],Y.prototype,"emptyLikeIcon",void 0);At([(0,se.property)()],Y.prototype,"filledLikeIcon",void 0);At([(0,se.property)()],Y.prototype,"emptyDislikeIcon",void 0);At([(0,se.property)()],Y.prototype,"filledDislikeIcon",void 0);At([(0,se.query)("ft-reader-feedback")],Y.prototype,"readerFeedback",void 0);At([Sn(Zr.properties["mail.feedback.subject"](e=>{var t,r;return[(t=e.tocNode)===null||t===void 0?void 0:t.title,(r=e.map)===null||r===void 0?void 0:r.title]}))],Y.prototype,"mailSubject",void 0);At([(0,Ct.reduxEventListener)({eventName:"rating-changed"})],Y.prototype,"fetchRatingSummary",null);var pd={"ft-reader-map-feedback":q,"ft-reader-topic-feedback":Y};(0,fd.customElements)(pd);})();
1568
1568
  /*! Bundled license information:
1569
1569
 
1570
1570
  lit-html/lit-html.js: