@fluid-topics/ft-reader-feedback 1.0.52 → 1.0.53

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.
@@ -88,7 +88,7 @@
88
88
  opacity: ${p.opacityContentOnSurfacePressed};
89
89
  transform: translate(-50%, -50%) scale(1);
90
90
  }
91
- `,m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),$=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),w={fontFamily:$,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",w.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",w.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",w.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",w.textTransform,"inherit")},S={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",w.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",w.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",w.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",$),I=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",w.fontSize,"16px"),C=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",w.fontWeight,"600"),z=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",w.letterSpacing,"0.144px"),T=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",w.lineHeight,"1.5"),E=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",w.textTransform,"inherit"),O=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",$),R=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",w.fontSize,"14px"),D=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",w.fontWeight,"normal"),N=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",w.letterSpacing,"0.098px"),A=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",w.lineHeight,"1.7"),B=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",w.textTransform,"inherit"),M={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",w.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",w.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",w.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",w.textTransform,"inherit")},U=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",$),j=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",w.fontSize,"14px"),F=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",w.fontWeight,"normal"),L=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",w.letterSpacing,"0.252px"),P=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",w.lineHeight,"1.4"),Z=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",w.textTransform,"inherit"),H={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",w.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",w.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",w.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",w.textTransform,"inherit")},V=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",$),W=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",w.fontSize,"10px"),G=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",w.fontWeight,"normal"),K=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",w.letterSpacing,"0.33px"),Y=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",w.lineHeight,"1.6"),q=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",w.textTransform,"inherit"),X=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",$),J=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",w.fontSize,"10px"),Q=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",w.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",w.letterSpacing,"1.5px"),et=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",w.lineHeight,"1.6"),it=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",w.textTransform,"uppercase"),ot={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",w.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",w.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",w.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",w.textTransform,"uppercase")},st=i.css`
91
+ `,m=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),$=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),w={fontFamily:$,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},k={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-font-size",w.fontSize,"20px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",w.letterSpacing,"0.15px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-line-height",w.lineHeight,"1.2"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",w.textTransform,"inherit")},S={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",m),fontSize:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",w.letterSpacing,"0.105px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",w.lineHeight,"1.7"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",w.textTransform,"inherit")},_=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",$),I=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",w.fontSize,"16px"),C=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",w.fontWeight,"600"),z=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",w.letterSpacing,"0.144px"),T=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",w.lineHeight,"1.5"),O=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",w.textTransform,"inherit"),E=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",$),R=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",w.fontSize,"14px"),D=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",w.fontWeight,"normal"),N=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",w.letterSpacing,"0.098px"),A=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",w.lineHeight,"1.7"),B=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",w.textTransform,"inherit"),M={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",w.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",w.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",w.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",w.textTransform,"inherit")},U=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",$),j=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",w.fontSize,"14px"),F=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",w.fontWeight,"normal"),L=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",w.letterSpacing,"0.252px"),P=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",w.lineHeight,"1.4"),Z=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",w.textTransform,"inherit"),H={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",w.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",w.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",w.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",w.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",w.textTransform,"inherit")},W=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",$),V=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",w.fontSize,"10px"),G=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",w.fontWeight,"normal"),K=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",w.letterSpacing,"0.33px"),Y=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",w.lineHeight,"1.6"),q=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",w.textTransform,"inherit"),X=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",$),J=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",w.fontSize,"10px"),Q=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",w.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",w.letterSpacing,"1.5px"),et=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",w.lineHeight,"1.6"),it=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",w.textTransform,"uppercase"),ot={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",$),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",w.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",w.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",w.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",w.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",w.textTransform,"uppercase")},st=i.css`
92
92
  .ft-typography--title {
93
93
  font-family: ${k.fontFamily};
94
94
  font-size: ${k.fontSize};
@@ -113,11 +113,11 @@
113
113
  font-weight: ${C};
114
114
  letter-spacing: ${z};
115
115
  line-height: ${T};
116
- text-transform: ${E};
116
+ text-transform: ${O};
117
117
  }
118
118
  `,at=i.css`
119
119
  .ft-typography--subtitle2 {
120
- font-family: ${O};
120
+ font-family: ${E};
121
121
  font-size: ${R};
122
122
  font-weight: ${D};
123
123
  letter-spacing: ${N};
@@ -154,8 +154,8 @@
154
154
  }
155
155
  `,ft=i.css`
156
156
  .ft-typography--breadcrumb {
157
- font-family: ${V};
158
- font-size: ${W};
157
+ font-family: ${W};
158
+ font-size: ${V};
159
159
  font-weight: ${G};
160
160
  letter-spacing: ${K};
161
161
  line-height: ${Y};
@@ -437,7 +437,7 @@
437
437
  ${e.setVariable(vt.size,mt.iconSize)};
438
438
  ${e.setVariable(vt.color,"var(--ft-button-internal-color)")};
439
439
  }
440
- `,e.noTextSelect],zt={textColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceHigh),backgroundColor:e.FtCssVariableFactory.extend("--ft-switch-background-color",e.designSystemVariables.colorSurface),selectedTextColor:e.FtCssVariableFactory.extend("--ft-switch-selected-text-color",e.designSystemVariables.colorPrimary),selectedBackgroundColor:e.FtCssVariableFactory.extend("--ft-switch-selected-background-color",e.designSystemVariables.colorPrimary),borderColor:e.FtCssVariableFactory.extend("--ft-switch-border-color",e.designSystemVariables.colorOutline),borderRadius:e.FtCssVariableFactory.extend("--ft-switch-border-radius",e.designSystemVariables.borderRadiusL),fontSize:e.FtCssVariableFactory.extend("--ft-switch-font-size",ot.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceMedium),rippleColor:e.FtCssVariableFactory.extend("--ft-switch-ripple-color",e.designSystemVariables.colorPrimary),outlineColor:e.FtCssVariableFactory.extend("--ft-switch-outline-color",e.designSystemVariables.colorPrimary)},Tt={feedbackInputMinWidth:e.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","SIZE","300px"),ratedDateColor:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color",e.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color",e.designSystemVariables.colorPrimary),filledRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color",e.designSystemVariables.colorPrimary),emptyRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color",e.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:e.FtCssVariableFactory.external(k.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(S.fontSize,"Typography")},Et=i.css`
440
+ `,e.noTextSelect],zt={textColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceHigh),backgroundColor:e.FtCssVariableFactory.extend("--ft-switch-background-color",e.designSystemVariables.colorSurface),selectedTextColor:e.FtCssVariableFactory.extend("--ft-switch-selected-text-color",e.designSystemVariables.colorPrimary),selectedBackgroundColor:e.FtCssVariableFactory.extend("--ft-switch-selected-background-color",e.designSystemVariables.colorPrimary),borderColor:e.FtCssVariableFactory.extend("--ft-switch-border-color",e.designSystemVariables.colorOutline),borderRadius:e.FtCssVariableFactory.extend("--ft-switch-border-radius",e.designSystemVariables.borderRadiusL),fontSize:e.FtCssVariableFactory.extend("--ft-switch-font-size",ot.fontSize),iconSize:e.FtCssVariableFactory.create("--ft-switch-icon-size","SIZE","24px"),iconColor:e.FtCssVariableFactory.extend("--ft-switch-text-color",e.designSystemVariables.colorOnSurfaceMedium),rippleColor:e.FtCssVariableFactory.extend("--ft-switch-ripple-color",e.designSystemVariables.colorPrimary),outlineColor:e.FtCssVariableFactory.extend("--ft-switch-outline-color",e.designSystemVariables.colorPrimary)},Tt={feedbackInputMinWidth:e.FtCssVariableFactory.create("--ft-reader-feedback-input-min-width","SIZE","300px"),ratedDateColor:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-color",e.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-send-feedback-background-color",e.designSystemVariables.colorPrimary),filledRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-filled-rating-color",e.designSystemVariables.colorPrimary),emptyRatingColor:e.FtCssVariableFactory.extend("--ft-reader-feedback-empty-rating-color",e.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:e.FtCssVariableFactory.external(k.fontSize,"Typography"),sectionTitleFontSize:e.FtCssVariableFactory.external(S.fontSize,"Typography")},Ot=i.css`
441
441
  .ft-reader-feedback {
442
442
  box-sizing: border-box;
443
443
  display: flex;
@@ -515,7 +515,7 @@
515
515
  * @license
516
516
  * Copyright 2017 Google LLC
517
517
  * SPDX-License-Identifier: BSD-3-Clause
518
- */;var Ot;const Rt=window,Dt=Rt.trustedTypes,Nt=Dt?Dt.createPolicy("lit-html",{createHTML:t=>t}):void 0,At="$lit$",Bt=`lit$${(Math.random()+"").slice(9)}$`,Mt="?"+Bt,Ut=`<${Mt}>`,jt=document,Ft=()=>jt.createComment(""),Lt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Pt=Array.isArray,Zt="[ \t\n\f\r]",Ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vt=/-->/g,Wt=/>/g,Gt=RegExp(`>|${Zt}(?:([^\\s"'>=/]+)(${Zt}*=${Zt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Yt=/"/g,qt=/^(?:script|style|textarea|title)$/i,Xt=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Jt=Symbol.for("lit-noChange"),Qt=Symbol.for("lit-nothing"),te=new WeakMap,ee=jt.createTreeWalker(jt,129,null,!1),ie=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=Ht;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(r.lastIndex=h,l=r.exec(i),null!==l);)h=r.lastIndex,r===Ht?"!--"===l[1]?r=Vt:void 0!==l[1]?r=Wt:void 0!==l[2]?(qt.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=Gt):void 0!==l[3]&&(r=Gt):r===Gt?">"===l[0]?(r=null!=s?s:Ht,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Gt:'"'===l[3]?Yt:Kt):r===Yt||r===Kt?r=Gt:r===Vt||r===Wt?r=Ht:(r=Gt,s=void 0);const f=r===Gt&&t[e+1].startsWith("/>")?" ":"";n+=r===Ht?i+Ut:d>=0?(o.push(a),i.slice(0,d)+At+i.slice(d)+Bt+f):i+Bt+(-2===d?(o.push(void 0),e):f)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==Nt?Nt.createHTML(a):a,o]};class oe{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,d]=ie(t,e);if(this.el=oe.createElement(l,i),ee.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=ee.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(At)||e.startsWith(Bt)){const i=d[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+At).split(Bt),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?le:"?"===e[1]?he:"@"===e[1]?fe:ae})}else a.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(qt.test(o.tagName)){const t=o.textContent.split(Bt),e=t.length-1;if(e>0){o.textContent=Dt?Dt.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],Ft()),ee.nextNode(),a.push({type:2,index:++s});o.append(t[e],Ft())}}}else if(8===o.nodeType)if(o.data===Mt)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(Bt,t+1));)a.push({type:7,index:s}),t+=Bt.length-1}s++}}static createElement(t,e){const i=jt.createElement("template");return i.innerHTML=t,i}}function se(t,e,i=t,o){var s,n,r,a;if(e===Jt)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const d=Lt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,i,o)),void 0!==o?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=se(t,l._$AS(t,e.values),l,o)),e}class ne{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:jt).importNode(i,!0);ee.currentNode=s;let n=ee.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new re(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new pe(n,this,t)),this._$AV.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=ee.nextNode(),r++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class re{constructor(t,e,i,o){var s;this.type=2,this._$AH=Qt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=se(this,t,e),Lt(t)?t===Qt||null==t||""===t?(this._$AH!==Qt&&this._$AR(),this._$AH=Qt):t!==this._$AH&&t!==Jt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>Pt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Qt&&Lt(this._$AH)?this._$AA.nextSibling.data=t:this.$(jt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=oe.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new ne(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=te.get(t.strings);return void 0===e&&te.set(t.strings,e=new oe(t)),e}T(t){Pt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new re(this.k(Ft()),this.k(Ft()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ae{constructor(t,e,i,o,s){this.type=1,this._$AH=Qt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Qt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=se(this,t,e,0),n=!Lt(t)||t!==this._$AH&&t!==Jt,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=se(this,o[i+r],e,r),a===Jt&&(a=this._$AH[r]),n||(n=!Lt(a)||a!==this._$AH[r]),a===Qt?t=Qt:t!==Qt&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Qt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class le extends ae{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Qt?void 0:t}}const de=Dt?Dt.emptyScript:"";class he extends ae{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Qt?this.element.setAttribute(this.name,de):this.element.removeAttribute(this.name)}}class fe extends ae{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=se(this,t,e,0))&&void 0!==i?i:Qt)===Jt)return;const o=this._$AH,s=t===Qt&&o!==Qt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Qt&&(o===Qt||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pe{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){se(this,t)}}const ce=Rt.litHtmlPolyfillSupport;null==ce||ce(oe,re),(null!==(Ot=Rt.litHtmlVersions)&&void 0!==Ot?Ot:Rt.litHtmlVersions=[]).push("2.7.3");
518
+ */;var Et;const Rt=window,Dt=Rt.trustedTypes,Nt=Dt?Dt.createPolicy("lit-html",{createHTML:t=>t}):void 0,At="$lit$",Bt=`lit$${(Math.random()+"").slice(9)}$`,Mt="?"+Bt,Ut=`<${Mt}>`,jt=document,Ft=()=>jt.createComment(""),Lt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Pt=Array.isArray,Zt="[ \t\n\f\r]",Ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Vt=/>/g,Gt=RegExp(`>|${Zt}(?:([^\\s"'>=/]+)(${Zt}*=${Zt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Yt=/"/g,qt=/^(?:script|style|textarea|title)$/i,Xt=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Jt=Symbol.for("lit-noChange"),Qt=Symbol.for("lit-nothing"),te=new WeakMap,ee=jt.createTreeWalker(jt,129,null,!1),ie=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",r=Ht;for(let e=0;e<i;e++){const i=t[e];let a,l,d=-1,h=0;for(;h<i.length&&(r.lastIndex=h,l=r.exec(i),null!==l);)h=r.lastIndex,r===Ht?"!--"===l[1]?r=Wt:void 0!==l[1]?r=Vt:void 0!==l[2]?(qt.test(l[2])&&(s=RegExp("</"+l[2],"g")),r=Gt):void 0!==l[3]&&(r=Gt):r===Gt?">"===l[0]?(r=null!=s?s:Ht,d=-1):void 0===l[1]?d=-2:(d=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?Gt:'"'===l[3]?Yt:Kt):r===Yt||r===Kt?r=Gt:r===Wt||r===Vt?r=Ht:(r=Gt,s=void 0);const f=r===Gt&&t[e+1].startsWith("/>")?" ":"";n+=r===Ht?i+Ut:d>=0?(o.push(a),i.slice(0,d)+At+i.slice(d)+Bt+f):i+Bt+(-2===d?(o.push(void 0),e):f)}const a=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==Nt?Nt.createHTML(a):a,o]};class oe{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const r=t.length-1,a=this.parts,[l,d]=ie(t,e);if(this.el=oe.createElement(l,i),ee.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=ee.nextNode())&&a.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(At)||e.startsWith(Bt)){const i=d[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+At).split(Bt),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?le:"?"===e[1]?he:"@"===e[1]?fe:ae})}else a.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(qt.test(o.tagName)){const t=o.textContent.split(Bt),e=t.length-1;if(e>0){o.textContent=Dt?Dt.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],Ft()),ee.nextNode(),a.push({type:2,index:++s});o.append(t[e],Ft())}}}else if(8===o.nodeType)if(o.data===Mt)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(Bt,t+1));)a.push({type:7,index:s}),t+=Bt.length-1}s++}}static createElement(t,e){const i=jt.createElement("template");return i.innerHTML=t,i}}function se(t,e,i=t,o){var s,n,r,a;if(e===Jt)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const d=Lt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,i,o)),void 0!==o?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=se(t,l._$AS(t,e.values),l,o)),e}class ne{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:jt).importNode(i,!0);ee.currentNode=s;let n=ee.nextNode(),r=0,a=0,l=o[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new re(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new pe(n,this,t)),this._$AV.push(e),l=o[++a]}r!==(null==l?void 0:l.index)&&(n=ee.nextNode(),r++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class re{constructor(t,e,i,o){var s;this.type=2,this._$AH=Qt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=se(this,t,e),Lt(t)?t===Qt||null==t||""===t?(this._$AH!==Qt&&this._$AR(),this._$AH=Qt):t!==this._$AH&&t!==Jt&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>Pt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Qt&&Lt(this._$AH)?this._$AA.nextSibling.data=t:this.$(jt.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=oe.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new ne(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=te.get(t.strings);return void 0===e&&te.set(t.strings,e=new oe(t)),e}T(t){Pt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new re(this.k(Ft()),this.k(Ft()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ae{constructor(t,e,i,o,s){this.type=1,this._$AH=Qt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Qt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=se(this,t,e,0),n=!Lt(t)||t!==this._$AH&&t!==Jt,n&&(this._$AH=t);else{const o=t;let r,a;for(t=s[0],r=0;r<s.length-1;r++)a=se(this,o[i+r],e,r),a===Jt&&(a=this._$AH[r]),n||(n=!Lt(a)||a!==this._$AH[r]),a===Qt?t=Qt:t!==Qt&&(t+=(null!=a?a:"")+s[r+1]),this._$AH[r]=a}n&&!o&&this.j(t)}j(t){t===Qt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class le extends ae{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Qt?void 0:t}}const de=Dt?Dt.emptyScript:"";class he extends ae{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Qt?this.element.setAttribute(this.name,de):this.element.removeAttribute(this.name)}}class fe extends ae{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=se(this,t,e,0))&&void 0!==i?i:Qt)===Jt)return;const o=this._$AH,s=t===Qt&&o!==Qt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==Qt&&(o===Qt||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pe{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){se(this,t)}}const ce=Rt.litHtmlPolyfillSupport;null==ce||ce(oe,re),(null!==(Et=Rt.litHtmlVersions)&&void 0!==Et?Et:Rt.litHtmlVersions=[]).push("2.7.3");
519
519
  /**
520
520
  * @license
521
521
  * Copyright 2020 Google LLC
@@ -533,7 +533,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
533
533
  ${s.unsafeHTML(this.resolvedIcon)}
534
534
  <slot ?hidden=${e}></slot>
535
535
  </i>
536
- `}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case we.file_format:this.resolvedIcon=null!==(t=$e[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case we.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=me[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ie.elementDefinitions={},Ie.styles=xt,_e([o.property()],Ie.prototype,"variant",void 0),_e([o.property()],Ie.prototype,"value",void 0),_e([o.state()],Ie.prototype,"resolvedIcon",void 0),_e([o.query("slot")],Ie.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ie);const Ce=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),ze=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Te=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Ee=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),Oe=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Re=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),De=i.css`
536
+ `}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case we.file_format:this.resolvedIcon=null!==(t=$e[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case we.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=me[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ie.elementDefinitions={},Ie.styles=xt,_e([o.property()],Ie.prototype,"variant",void 0),_e([o.property()],Ie.prototype,"value",void 0),_e([o.state()],Ie.prototype,"resolvedIcon",void 0),_e([o.query("slot")],Ie.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ie);const Ce=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),ze=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Te=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Oe=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","100"),Ee=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Re=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),De=i.css`
537
537
  .ft-tooltip--container {
538
538
  display: block;
539
539
  }
@@ -551,12 +551,12 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
551
551
  max-width: ${Re};
552
552
  text-align: center;
553
553
  padding: ${Ce};
554
- z-index: ${Ee};
554
+ z-index: ${Oe};
555
555
  }
556
556
 
557
557
  .ft-tooltip--content {
558
558
  padding: 4px 8px;
559
- border-radius: ${Oe};
559
+ border-radius: ${Ee};
560
560
  background-color: ${Te};
561
561
  color: ${ze};
562
562
  position: relative;
@@ -580,7 +580,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
580
580
  </div>
581
581
  </div>
582
582
  </div>
583
- `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const 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"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,s=(t.offsetWidth-e)/2;let n=0,r=0;switch(this.validPosition){case"top":r=t.offsetTop-i,n=t.offsetLeft+s;break;case"bottom":r=t.offsetTop+t.offsetHeight,n=t.offsetLeft+s;break;case"left":r=t.offsetTop+o,n=t.offsetLeft-e;break;case"right":r=t.offsetTop+o,n=t.offsetLeft+t.offsetWidth}const a=this.tooltip.style;a.left=this.limitValueBetween(n,0,window.innerWidth-e)+"px",a.top=this.limitValueBetween(r,0,window.innerHeight-i)+"px",a.maxWidth=`max(${t.offsetWidth}px, ${Re})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}limitValueBetween(t,e,i){return Math.max(e,Math.min(t,i))}}Ae.elementDefinitions={"ft-typography":Se},Ae.styles=De,Ne([o.property()],Ae.prototype,"text",void 0),Ne([o.property({type:Boolean})],Ae.prototype,"manual",void 0),Ne([o.property({type:Boolean})],Ae.prototype,"inline",void 0),Ne([o.property({type:Number})],Ae.prototype,"delay",void 0),Ne([o.property()],Ae.prototype,"position",void 0),Ne([o.queryAssignedNodes("",!0)],Ae.prototype,"slotNodes",void 0),Ne([o.query(".ft-tooltip--container")],Ae.prototype,"container",void 0),Ne([o.query(".ft-tooltip")],Ae.prototype,"tooltip",void 0),Ne([o.query(".ft-tooltip--content")],Ae.prototype,"tooltipContent",void 0),Ne([o.state()],Ae.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ae);var Be=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Me extends e.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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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(null==t?void 0: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 i.html`
583
+ `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const 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"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=this.tooltip.offsetWidth,i=this.tooltip.offsetHeight,o=(t.offsetHeight-i)/2,s=(t.offsetWidth-e)/2;let n=0,r=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":r=t.offsetTop-i-this.tooltip.offsetTop,n=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"bottom":r=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+s-this.tooltip.offsetLeft;break;case"left":r=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":r=t.offsetTop+o-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const a=this.tooltip.style;a.left=n+"px",a.top=r+"px";const l=this.tooltip.getBoundingClientRect();let d=-l.x,h=l.x+l.width-window.innerWidth;a.left=n+Math.round(this.correctOutOfWindowPixels(d,h))+"px";let f=-l.y,p=l.y+l.height-window.innerHeight;a.top=r+Math.round(this.correctOutOfWindowPixels(f,p))+"px",a.maxWidth=`max(${t.offsetWidth}px, ${Re})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}Ae.elementDefinitions={"ft-typography":Se},Ae.styles=De,Ne([o.property()],Ae.prototype,"text",void 0),Ne([o.property({type:Boolean})],Ae.prototype,"manual",void 0),Ne([o.property({type:Boolean})],Ae.prototype,"inline",void 0),Ne([o.property({type:Number})],Ae.prototype,"delay",void 0),Ne([o.property()],Ae.prototype,"position",void 0),Ne([o.queryAssignedNodes("",!0)],Ae.prototype,"slotNodes",void 0),Ne([o.query(".ft-tooltip--container")],Ae.prototype,"container",void 0),Ne([o.query(".ft-tooltip")],Ae.prototype,"tooltip",void 0),Ne([o.query(".ft-tooltip--content")],Ae.prototype,"tooltipContent",void 0),Ne([o.state()],Ae.prototype,"visible",void 0),e.customElement("ft-tooltip")(Ae);var Be=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Me extends e.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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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(null==t?void 0: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 i.html`
584
584
  <style>
585
585
  .ft-ripple .ft-ripple--effect,
586
586
  .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
@@ -705,14 +705,14 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
705
705
  </ft-tooltip>
706
706
  `}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new Le(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?i.html`
707
707
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
708
- `:i.nothing}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}Ze.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-tooltip":Ae,"ft-icon":Ie},Ze.styles=[e.safariEllipsisFix,je],Fe([o.property()],Ze.prototype,"value",void 0),Fe([o.property()],Ze.prototype,"icon",void 0),Fe([o.property()],Ze.prototype,"iconVariant",void 0),Fe([o.property()],Ze.prototype,"label",void 0),Fe([o.property()],Ze.prototype,"tooltipPosition",void 0),Fe([o.property({type:Boolean,reflect:!0})],Ze.prototype,"selected",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"trailingIcon",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"unselectable",void 0),Fe([o.query(".ft-switch-option--content slot")],Ze.prototype,"slottedContent",void 0),Fe([o.query(".ft-switch-option--input")],Ze.prototype,"input",void 0);var He=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ve extends CustomEvent{constructor(t){super("change",{detail:t})}}class We extends e.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){super.updated(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return i.html`
708
+ `:i.nothing}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}Ze.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-tooltip":Ae,"ft-icon":Ie},Ze.styles=[e.safariEllipsisFix,je],Fe([o.property()],Ze.prototype,"value",void 0),Fe([o.property()],Ze.prototype,"icon",void 0),Fe([o.property()],Ze.prototype,"iconVariant",void 0),Fe([o.property()],Ze.prototype,"label",void 0),Fe([o.property()],Ze.prototype,"tooltipPosition",void 0),Fe([o.property({type:Boolean,reflect:!0})],Ze.prototype,"selected",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"trailingIcon",void 0),Fe([o.property({type:Boolean})],Ze.prototype,"unselectable",void 0),Fe([o.query(".ft-switch-option--content slot")],Ze.prototype,"slottedContent",void 0),Fe([o.query(".ft-switch-option--input")],Ze.prototype,"input",void 0);var He=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class We extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ve extends e.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){super.updated(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return i.html`
709
709
  <div @keydown=${this.onKeyDown} tabindex="0" class="${n.classMap(t)}">
710
710
  <slot @slotchange=${this.onSlotchange}
711
711
  @option-change=${this.onOptionChangeByScript}
712
712
  @option-change-by-user=${this.onOptionChangeByUser}
713
713
  ></slot>
714
714
  </div>
715
- `}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof Ze&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let e=t.target;this.onOptionChange(e)}onOptionChangeByUser(t){var e;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new Ve(null===(e=this.selectedOption)||void 0===e?void 0:e.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}We.elementDefinitions={},We.styles=i.css`
715
+ `}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof Ze&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let e=t.target;this.onOptionChange(e)}onOptionChangeByUser(t){var e;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new We(null===(e=this.selectedOption)||void 0===e?void 0:e.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}Ve.elementDefinitions={},Ve.styles=i.css`
716
716
  :host {
717
717
  display: inline-block;
718
718
  }
@@ -746,7 +746,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
746
746
  --ft-switch-internal-vertical-padding: 2px;
747
747
  --ft-switch-internal-horizontal-padding: 4px;
748
748
  }
749
- `,He([o.property({type:Boolean})],We.prototype,"dense",void 0),He([o.property({type:Boolean})],We.prototype,"unselectable",void 0),He([o.query(".ft-switch slot")],We.prototype,"slottedContent",void 0),He([o.state()],We.prototype,"selectedOption",void 0),He([o.query(".ft-switch")],We.prototype,"ftSwitchDiv",void 0),e.customElement("ft-switch")(We),e.customElement("ft-switch-option")(Ze);const Ge=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Ke=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Ye=i.css`
749
+ `,He([o.property({type:Boolean})],Ve.prototype,"dense",void 0),He([o.property({type:Boolean})],Ve.prototype,"unselectable",void 0),He([o.query(".ft-switch slot")],Ve.prototype,"slottedContent",void 0),He([o.state()],Ve.prototype,"selectedOption",void 0),He([o.query(".ft-switch")],Ve.prototype,"ftSwitchDiv",void 0),e.customElement("ft-switch")(Ve),e.customElement("ft-switch-option")(Ze);const Ge=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Ke=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Ye=i.css`
750
750
  :host {
751
751
  display: block;
752
752
  }
@@ -1086,7 +1086,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1086
1086
  <span class="ft-i18n">
1087
1087
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
1088
1088
  </span>
1089
- `:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}zi.elementDefinitions={},zi.styles=hi,Ci([e.redux()],zi.prototype,"editorMode",void 0),Ci([o.property()],zi.prototype,"context",void 0),Ci([o.property()],zi.prototype,"key",void 0),Ci([e.jsonProperty([])],zi.prototype,"args",void 0),Ci([o.property()],zi.prototype,"defaultMessage",void 0);class Ti{static build(t){return new Ti(t)}static fromGwt(t){return new Ti(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>gi.resolveMessage(this.name,e,...t)})}}const Ei=(t,e)=>(i,o)=>{var s,n;i.constructor.createProperty(o,null!=e?e:{attribute:!1,type:String});const r={...t,key:null!==(s=t.key)&&void 0!==s?s:o};i[wi]=null!==(n=i[wi])&&void 0!==n?n:new Map,i[wi].set(o,r)};e.customElement("ft-i18n")(zi);const Oi=Ti.build("integratedFeedbackComponent"),Ri={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",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"},Di=Ti.build("inDesignerFeedbackComponent"),Ni={ratingNotConfigured:"Rating unavailable: no rating configured for this content.",missingRatingRole:"Rating unavailable: missing role RATING_USER.",missingFeedbackRole:"Feedback unavailable: missing role FEEDBACK_USER.",inDesignerOnlyNotice:"This notice will not appear outside this designer.",feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."},Ai={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},Bi=i.css`
1089
+ `:this.editorMode?"Select a context and a label key.":i.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}zi.elementDefinitions={},zi.styles=hi,Ci([e.redux()],zi.prototype,"editorMode",void 0),Ci([o.property()],zi.prototype,"context",void 0),Ci([o.property()],zi.prototype,"key",void 0),Ci([e.jsonProperty([])],zi.prototype,"args",void 0),Ci([o.property()],zi.prototype,"defaultMessage",void 0);class Ti{static build(t){return new Ti(t)}static fromGwt(t){return new Ti(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>gi.resolveMessage(this.name,e,...t)})}}const Oi=(t,e)=>(i,o)=>{var s,n;i.constructor.createProperty(o,null!=e?e:{attribute:!1,type:String});const r={...t,key:null!==(s=t.key)&&void 0!==s?s:o};i[wi]=null!==(n=i[wi])&&void 0!==n?n:new Map,i[wi].set(o,r)};e.customElement("ft-i18n")(zi);const Ei=Ti.build("integratedFeedbackComponent"),Ri={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",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"},Di=Ti.build("inDesignerFeedbackComponent"),Ni={ratingNotConfigured:"Rating unavailable: no rating configured for this content.",missingRatingRole:"Rating unavailable: missing role RATING_USER.",missingFeedbackRole:"Feedback unavailable: missing role FEEDBACK_USER.",inDesignerOnlyNotice:"This notice will not appear outside this designer.",feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."},Ai={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},Bi=i.css`
1090
1090
  *:focus {
1091
1091
  outline: none;
1092
1092
  }
@@ -1330,7 +1330,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1330
1330
  <slot></slot>
1331
1331
  </ft-typography>
1332
1332
  </div>
1333
- `}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Li(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Pi.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-icon":Ie},Pi.styles=ji,Fi([o.property()],Pi.prototype,"value",void 0),Fi([o.query(".ft-text-field-suggestion")],Pi.prototype,"container",void 0),Fi([o.queryAssignedNodes()],Pi.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Ui),e.customElement("ft-text-field-suggestion")(Pi);var Zi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Hi extends(Si(h)){constructor(){super(),this.editorMode=!1,this.hideTitle=!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(Oi,Ri),this.addI18nContext(Di,Ni)}get canAccessFeedback(){return this.user&&this.user.roles.includes("FEEDBACK_USER")}get canAccessRating(){return this.userHasRatingRole&&"NO_RATING"!==this.configuredRatingType}get userHasRatingRole(){return this.user&&this.user.roles.includes("RATING_USER")}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,i;const o=null===(i=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===i?void 0:i.date;return"string"==typeof o?e.parseDate(o):o}render(){return this.editorMode||this.canAccessFeedback||this.canAccessRating?i.html`
1333
+ `}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Li(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Pi.elementDefinitions={"ft-ripple":Me,"ft-typography":Se,"ft-icon":Ie},Pi.styles=ji,Fi([o.property()],Pi.prototype,"value",void 0),Fi([o.query(".ft-text-field-suggestion")],Pi.prototype,"container",void 0),Fi([o.queryAssignedNodes()],Pi.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Ui),e.customElement("ft-text-field-suggestion")(Pi);var Zi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Hi extends(Si(h)){constructor(){super(),this.editorMode=!1,this.hideTitle=!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(Ei,Ri),this.addI18nContext(Di,Ni)}get canAccessFeedback(){return this.user&&this.user.roles.includes("FEEDBACK_USER")}get canAccessRating(){return this.userHasRatingRole&&"NO_RATING"!==this.configuredRatingType}get userHasRatingRole(){return this.user&&this.user.roles.includes("RATING_USER")}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==i?i:"NO_RATING"}get ratingValue(){var t,e,i;return null!==(i=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==i?i:-1}get ratingDate(){var t,i;const o=null===(i=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===i?void 0:i.date;return"string"==typeof o?e.parseDate(o):o}render(){return this.editorMode||this.canAccessFeedback||this.canAccessRating?i.html`
1334
1334
  <div class="ft-reader-feedback">
1335
1335
  ${this.hideTitle?i.nothing:i.html`
1336
1336
  <ft-typography variant="title" part="main-title">
@@ -1350,11 +1350,11 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1350
1350
  ${this.renderRatingDate()}
1351
1351
  </ft-typography>
1352
1352
  </div>
1353
- `:this.placeholderInEditor(this.userHasRatingRole?Di.messages.ratingNotConfigured():Di.messages.missingRatingRole())}renderRatingDate(){const t=this.ratingDate;if(null==t)return Oi.messages.notRated();if(t.getTime()>(new Date).getTime()-6e4)return Oi.messages.ratedNow();return(new Date).toLocaleDateString()===t.toLocaleDateString()?Oi.messages.ratedToday():Oi.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case"STARS":return i.html`
1353
+ `:this.placeholderInEditor(this.userHasRatingRole?Di.messages.ratingNotConfigured():Di.messages.missingRatingRole())}renderRatingDate(){const t=this.ratingDate;if(null==t)return Ei.messages.notRated();if(t.getTime()>(new Date).getTime()-6e4)return Ei.messages.ratedNow();return(new Date).toLocaleDateString()===t.toLocaleDateString()?Ei.messages.ratedToday():Ei.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case"STARS":return i.html`
1354
1354
  <div class="ft-reader-feedback--stars" part="rating rating-stars">
1355
1355
  ${r.repeat(new Array(5),((t,e)=>e),((t,e)=>{let o="STARS"===this.ratingType&&this.ratingValue>e;const s=e+1;return i.html`
1356
1356
  <ft-button round part="rating-stars-${s}"
1357
- label="${Oi.messages.starsRating(s)}"
1357
+ label="${Ei.messages.starsRating(s)}"
1358
1358
  tooltipPosition="top"
1359
1359
  .iconVariant=${this.iconVariant}
1360
1360
  icon="${o?this.filledStarIcon:this.emptyStarIcon}"
@@ -1371,13 +1371,13 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1371
1371
  ?selected=${e}
1372
1372
  .iconVariant=${this.iconVariant}
1373
1373
  icon="${e?this.filledLikeIcon:this.emptyLikeIcon}">
1374
- ${Oi.messages.like()}
1374
+ ${Ei.messages.like()}
1375
1375
  </ft-switch-option>
1376
1376
  <ft-switch-option .value=${0}
1377
1377
  ?selected=${t}
1378
1378
  .iconVariant=${this.iconVariant}
1379
1379
  icon="${t?this.filledDislikeIcon:this.emptyDislikeIcon}">
1380
- ${Oi.messages.dislike()}
1380
+ ${Ei.messages.dislike()}
1381
1381
  </ft-switch-option>
1382
1382
  </ft-switch>
1383
1383
  `;case"DICHOTOMOUS":const o="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,s="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return i.html`
@@ -1386,11 +1386,11 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1386
1386
  part="rating rating-dichotomous">
1387
1387
  <ft-switch-option .value=${1}
1388
1388
  ?selected=${s}>
1389
- ${Oi.messages.dichotomousYes()}
1389
+ ${Ei.messages.dichotomousYes()}
1390
1390
  </ft-switch-option>
1391
1391
  <ft-switch-option .value=${0}
1392
1392
  ?selected=${o}>
1393
- ${Oi.messages.dichotomousNo()}
1393
+ ${Ei.messages.dichotomousNo()}
1394
1394
  </ft-switch-option>
1395
1395
  </ft-switch>
1396
1396
  `}return i.nothing}rate(t){(null!=t?t:-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){var t,e;if(this.canAccessFeedback){const o=this.feedbackMailLinkBuilder(this.feedbackMessage);let s=i.html`
@@ -1399,7 +1399,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1399
1399
  ?disabled=${!this.feedbackMessage||!this.validFromEmail()}
1400
1400
  @click=${()=>o?this.onMailerFeedbackSent():this.sendFeedback()}
1401
1401
  part="send-feedback">
1402
- ${Oi.messages.okButton()}
1402
+ ${Ei.messages.okButton()}
1403
1403
  </ft-button>
1404
1404
  `;return o&&(s=i.html`
1405
1405
  <a class="ft-reader-feedback--feedback-link" href="${o}">
@@ -1413,15 +1413,15 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1413
1413
  ${null==(null===(t=this.user)||void 0===t?void 0:t.userId)&&(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)?i.html`
1414
1414
  <ft-text-field
1415
1415
  class="ft-reader-feedback--from-input"
1416
- label=${Oi.messages.feedbackfromEmail()}
1416
+ label=${Ei.messages.feedbackfromEmail()}
1417
1417
  @live-change=${t=>this.from=t.detail.trim()}
1418
1418
  ?error=${this.from&&!this.validFromEmail()}
1419
- helper=${this.from&&!this.validFromEmail()?Oi.messages.feedbackfromEmailInvalid():""}
1419
+ helper=${this.from&&!this.validFromEmail()?Ei.messages.feedbackfromEmailInvalid():""}
1420
1420
  />
1421
1421
  `:i.nothing}
1422
1422
  <ft-text-area outlined
1423
1423
  class="ft-reader-feedback--feedback-input" part="feedback-input"
1424
- label="${Oi.messages.feedbackInputLabel()}"
1424
+ label="${Ei.messages.feedbackInputLabel()}"
1425
1425
  @live-change=${t=>this.feedbackMessage=t.detail.trim()}
1426
1426
  ></ft-text-area>
1427
1427
  ${s}
@@ -1434,7 +1434,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1434
1434
  <ft-icon>INFO</ft-icon>
1435
1435
  </ft-tooltip>
1436
1436
  </div>
1437
- `:i.nothing}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}Hi.elementDefinitions={"ft-button":di,"ft-typography":Se,"ft-icon":Ie,"ft-tooltip":Ae,"ft-switch":We,"ft-switch-option":Ze,"ft-text-area":ri,"ft-text-field":Ui},Hi.styles=Et,Zi([o.property({type:Boolean})],Hi.prototype,"editorMode",void 0),Zi([o.property({type:Boolean})],Hi.prototype,"hideTitle",void 0),Zi([o.property({type:Boolean})],Hi.prototype,"ratingAllowed",void 0),Zi([o.property({attribute:!1})],Hi.prototype,"i18nProperties",void 0),Zi([o.property({attribute:!1})],Hi.prototype,"ratingSummary",void 0),Zi([o.property({attribute:!1})],Hi.prototype,"user",void 0),Zi([o.query(".ft-reader-feedback--feedback-input")],Hi.prototype,"feedbackInput",void 0),Zi([o.state()],Hi.prototype,"from",void 0),Zi([o.state()],Hi.prototype,"feedbackMessage",void 0),Zi([o.property()],Hi.prototype,"iconVariant",void 0),Zi([o.property()],Hi.prototype,"emptyStarIcon",void 0),Zi([o.property()],Hi.prototype,"filledStarIcon",void 0),Zi([o.property()],Hi.prototype,"emptyLikeIcon",void 0),Zi([o.property()],Hi.prototype,"filledLikeIcon",void 0),Zi([o.property()],Hi.prototype,"emptyDislikeIcon",void 0),Zi([o.property()],Hi.prototype,"filledDislikeIcon",void 0),Zi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Hi.prototype,"configuration",void 0),Zi([o.property()],Hi.prototype,"feedbackMailLinkBuilder",void 0);const Vi=Ti.fromGwt("server");class Wi{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,i,o,s){var n;this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=s,this.subjectMetadata=this.filterMetadata(i,o.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(i,null!==(n=o.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}build(t){var e,i,o;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics))||(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))return;const s=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${Vi.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(o=this.configuration)||void 0===o?void 0:o.recipients.join(",")}?subject=${s}&body=${n}`}}var Gi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ki extends(Si(h)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=we.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 Wi,this.i18nProperties={feedbackMainTitle:Oi.properties.mapFeedbackMainTitle(),ratingSectionTitle:Oi.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:Oi.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:Oi.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500),this.addStore(pi)}render(){return this.map&&(this.editorMode||this.componentVisible)?i.html`
1437
+ `:i.nothing}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}Hi.elementDefinitions={"ft-button":di,"ft-typography":Se,"ft-icon":Ie,"ft-tooltip":Ae,"ft-switch":Ve,"ft-switch-option":Ze,"ft-text-area":ri,"ft-text-field":Ui},Hi.styles=Ot,Zi([o.property({type:Boolean})],Hi.prototype,"editorMode",void 0),Zi([o.property({type:Boolean})],Hi.prototype,"hideTitle",void 0),Zi([o.property({type:Boolean})],Hi.prototype,"ratingAllowed",void 0),Zi([o.property({attribute:!1})],Hi.prototype,"i18nProperties",void 0),Zi([o.property({attribute:!1})],Hi.prototype,"ratingSummary",void 0),Zi([o.property({attribute:!1})],Hi.prototype,"user",void 0),Zi([o.query(".ft-reader-feedback--feedback-input")],Hi.prototype,"feedbackInput",void 0),Zi([o.state()],Hi.prototype,"from",void 0),Zi([o.state()],Hi.prototype,"feedbackMessage",void 0),Zi([o.property()],Hi.prototype,"iconVariant",void 0),Zi([o.property()],Hi.prototype,"emptyStarIcon",void 0),Zi([o.property()],Hi.prototype,"filledStarIcon",void 0),Zi([o.property()],Hi.prototype,"emptyLikeIcon",void 0),Zi([o.property()],Hi.prototype,"filledLikeIcon",void 0),Zi([o.property()],Hi.prototype,"emptyDislikeIcon",void 0),Zi([o.property()],Hi.prototype,"filledDislikeIcon",void 0),Zi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Hi.prototype,"configuration",void 0),Zi([o.property()],Hi.prototype,"feedbackMailLinkBuilder",void 0);const Wi=Ti.fromGwt("server");class Vi{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,i,o,s){var n;this.subject=t,this.url=e,this.configuration=o,this.isAuthenticated=s,this.subjectMetadata=this.filterMetadata(i,o.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(i,null!==(n=o.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}build(t){var e,i,o;if(0===t.length||this.isAuthenticated&&(null==this.configuration||(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopics))||(null===(i=this.configuration)||void 0===i?void 0:i.mailsSentByFluidTopicsForUnauthenticatedUsers))return;const s=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${t}\n\n_________________________________________________________________\n${Wi.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(o=this.configuration)||void 0===o?void 0:o.recipients.join(",")}?subject=${s}&body=${n}`}}var Gi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class Ki extends(Si(h)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=we.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 Vi,this.i18nProperties={feedbackMainTitle:Ei.properties.mapFeedbackMainTitle(),ratingSectionTitle:Ei.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:Ei.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:Ei.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500),this.addStore(pi)}render(){return this.map&&(this.editorMode||this.componentVisible)?i.html`
1438
1438
  <ft-reader-feedback
1439
1439
  ratingAllowed
1440
1440
  .i18nProperties=${this.i18nProperties}
@@ -1460,7 +1460,7 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1460
1460
  display: none !important;
1461
1461
  }
1462
1462
  </style>
1463
- `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.map&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var i,o,s;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(i=this.service)||void 0===i?void 0:i.unrateMap()):await(null===(o=this.service)||void 0===o?void 0:o.rateMap(null===(s=this.ratingSummary)||void 0===s?void 0:s.type,t))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Oi.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var i;try{this.editorMode?this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(i=this.service)||void 0===i?void 0:i.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Oi.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Oi.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}Ki.elementDefinitions={"ft-reader-feedback":Hi},Gi([e.redux({store:pi.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],Ki.prototype,"user",void 0),Gi([e.redux({store:"reader"})],Ki.prototype,"map",void 0),Gi([e.redux({store:pi.name})],Ki.prototype,"editorMode",void 0),Gi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Ki.prototype,"configuration",void 0),Gi([o.state()],Ki.prototype,"ratingSummary",void 0),Gi([o.property({type:Boolean})],Ki.prototype,"hideTitle",void 0),Gi([o.property()],Ki.prototype,"iconVariant",void 0),Gi([o.property()],Ki.prototype,"emptyStarIcon",void 0),Gi([o.property()],Ki.prototype,"filledStarIcon",void 0),Gi([o.property()],Ki.prototype,"emptyLikeIcon",void 0),Gi([o.property()],Ki.prototype,"filledLikeIcon",void 0),Gi([o.property()],Ki.prototype,"emptyDislikeIcon",void 0),Gi([o.property()],Ki.prototype,"filledDislikeIcon",void 0),Gi([o.query("ft-reader-feedback")],Ki.prototype,"readerFeedback",void 0),Gi([Ei(Vi.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],Ki.prototype,"mailSubject",void 0);var Yi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class qi extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const Xi=Symbol("registerInterval");class Ji extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[Xi]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[Xi]):this.dispatchEvent(new qi)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=Xi,Yi([o.state()],i.prototype,"tocNode",void 0),Yi([o.state()],i.prototype,"disableContextInteractions",void 0),i}(h)){}var Qi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class to extends(Si(Ji)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=we.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 Wi,this.i18nProperties={feedbackMainTitle:Oi.properties.topicFeedbackMainTitle(),ratingSectionTitle:Oi.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:Oi.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:Oi.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500),this.addStore(pi)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?i.html`
1463
+ `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.map&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var i,o,s;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(i=this.service)||void 0===i?void 0:i.unrateMap()):await(null===(o=this.service)||void 0===o?void 0:o.rateMap(null===(s=this.ratingSummary)||void 0===s?void 0:s.type,t))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Ei.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var i;try{this.editorMode?this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(i=this.service)||void 0===i?void 0:i.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Ei.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Ei.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}Ki.elementDefinitions={"ft-reader-feedback":Hi},Gi([e.redux({store:pi.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],Ki.prototype,"user",void 0),Gi([e.redux({store:"reader"})],Ki.prototype,"map",void 0),Gi([e.redux({store:pi.name})],Ki.prototype,"editorMode",void 0),Gi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Ki.prototype,"configuration",void 0),Gi([o.state()],Ki.prototype,"ratingSummary",void 0),Gi([o.property({type:Boolean})],Ki.prototype,"hideTitle",void 0),Gi([o.property()],Ki.prototype,"iconVariant",void 0),Gi([o.property()],Ki.prototype,"emptyStarIcon",void 0),Gi([o.property()],Ki.prototype,"filledStarIcon",void 0),Gi([o.property()],Ki.prototype,"emptyLikeIcon",void 0),Gi([o.property()],Ki.prototype,"filledLikeIcon",void 0),Gi([o.property()],Ki.prototype,"emptyDislikeIcon",void 0),Gi([o.property()],Ki.prototype,"filledDislikeIcon",void 0),Gi([o.query("ft-reader-feedback")],Ki.prototype,"readerFeedback",void 0),Gi([Oi(Wi.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],Ki.prototype,"mailSubject",void 0);var Yi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class qi extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const Xi=Symbol("registerInterval");class Ji extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[Xi]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[Xi]):this.dispatchEvent(new qi)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=Xi,Yi([o.state()],i.prototype,"tocNode",void 0),Yi([o.state()],i.prototype,"disableContextInteractions",void 0),i}(h)){}var Qi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class to extends(Si(Ji)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=we.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 Vi,this.i18nProperties={feedbackMainTitle:Ei.properties.topicFeedbackMainTitle(),ratingSectionTitle:Ei.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:Ei.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:Ei.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new e.Debouncer(100),this.sendRatingDebouncer=new e.Debouncer(500),this.addStore(pi)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?i.html`
1464
1464
  <ft-reader-feedback
1465
1465
  .i18nProperties=${this.i18nProperties}
1466
1466
  ?ratingAllowed=${this.tocNode.hasRating}
@@ -1486,4 +1486,4 @@ const ue=Symbol.for(""),ve=t=>{if((null==t?void 0:t.r)===ue)return null==t?void
1486
1486
  display: none !important;
1487
1487
  }
1488
1488
  </style>
1489
- `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var i,o,s;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(i=this.service)||void 0===i?void 0:i.unrateTopic(this.tocNode.tocId)):await(null===(o=this.service)||void 0===o?void 0:o.rateTopic(this.tocNode.tocId,null===(s=this.ratingSummary)||void 0===s?void 0:s.type,t))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Oi.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var i;try{!this.editorMode&&this.tocNode?(await(null===(i=this.service)||void 0===i?void 0:i.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Oi.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Oi.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}to.elementDefinitions={"ft-reader-feedback":Hi},Qi([e.redux({store:pi.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],to.prototype,"user",void 0),Qi([e.redux({store:"reader"})],to.prototype,"map",void 0),Qi([e.redux({store:pi.name})],to.prototype,"editorMode",void 0),Qi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],to.prototype,"configuration",void 0),Qi([o.state()],to.prototype,"ratingSummary",void 0),Qi([o.property({type:Boolean})],to.prototype,"hideTitle",void 0),Qi([o.property()],to.prototype,"iconVariant",void 0),Qi([o.property()],to.prototype,"emptyStarIcon",void 0),Qi([o.property()],to.prototype,"filledStarIcon",void 0),Qi([o.property()],to.prototype,"emptyLikeIcon",void 0),Qi([o.property()],to.prototype,"filledLikeIcon",void 0),Qi([o.property()],to.prototype,"emptyDislikeIcon",void 0),Qi([o.property()],to.prototype,"filledDislikeIcon",void 0),Qi([o.query("ft-reader-feedback")],to.prototype,"readerFeedback",void 0),Qi([Ei(Vi.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],to.prototype,"mailSubject",void 0),e.customElement("ft-reader-map-feedback")(Ki),e.customElement("ft-reader-topic-feedback")(to),t.FtReaderFeedbackCssVariables=Tt,t.FtReaderMapFeedback=Ki,t.FtReaderTopicFeedback=to,t.styles=Et}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,ftGlobals.litRepeat);
1489
+ `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,o;super.updated(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(o=this.user)||void 0===o?void 0:o.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var i,o,s;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(i=this.service)||void 0===i?void 0:i.unrateTopic(this.tocNode.tocId)):await(null===(o=this.service)||void 0===o?void 0:o.rateTopic(this.tocNode.tocId,null===(s=this.ratingSummary)||void 0===s?void 0:s.type,t))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Ei.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var i;try{!this.editorMode&&this.tocNode?(await(null===(i=this.service)||void 0===i?void 0:i.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Ei.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new e.FtNotificationEvent({type:"info",message:Di.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new e.FtNotificationEvent({type:"error",message:Ei.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}to.elementDefinitions={"ft-reader-feedback":Hi},Qi([e.redux({store:pi.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],to.prototype,"user",void 0),Qi([e.redux({store:"reader"})],to.prototype,"map",void 0),Qi([e.redux({store:pi.name})],to.prototype,"editorMode",void 0),Qi([e.redux({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],to.prototype,"configuration",void 0),Qi([o.state()],to.prototype,"ratingSummary",void 0),Qi([o.property({type:Boolean})],to.prototype,"hideTitle",void 0),Qi([o.property()],to.prototype,"iconVariant",void 0),Qi([o.property()],to.prototype,"emptyStarIcon",void 0),Qi([o.property()],to.prototype,"filledStarIcon",void 0),Qi([o.property()],to.prototype,"emptyLikeIcon",void 0),Qi([o.property()],to.prototype,"filledLikeIcon",void 0),Qi([o.property()],to.prototype,"emptyDislikeIcon",void 0),Qi([o.property()],to.prototype,"filledDislikeIcon",void 0),Qi([o.query("ft-reader-feedback")],to.prototype,"readerFeedback",void 0),Qi([Oi(Wi.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],to.prototype,"mailSubject",void 0),e.customElement("ft-reader-map-feedback")(Ki),e.customElement("ft-reader-topic-feedback")(to),t.FtReaderFeedbackCssVariables=Tt,t.FtReaderMapFeedback=Ki,t.FtReaderTopicFeedback=to,t.styles=Ot}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML,ftGlobals.litClassMap,ftGlobals.litRepeat);