@fluid-topics/ft-reader-feedback 2.1.19 → 2.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-reader-feedback.js +14 -14
- package/build/ft-reader-feedback.light.js +8 -8
- package/build/ft-reader-feedback.min.js +9 -9
- package/build/ft-reader-feedback.styles.js +2 -2
- package/build/utils/InDesignerFeedbackComponentMessages.js +2 -2
- package/build/utils/IntegratedFeedbackComponentMessages.js +1 -1
- package/build/utils/ServerMessages.js +1 -1
- package/build/utils/events.js +5 -5
- package/build/utils/mail.js +4 -4
- package/package.json +6 -6
|
@@ -4,18 +4,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, nothing } from "lit";
|
|
8
|
-
import { property, query, state } from "lit/decorators.js";
|
|
7
|
+
import { html, nothing, } from "lit";
|
|
8
|
+
import { property, query, state, } from "lit/decorators.js";
|
|
9
9
|
import { parseDate, redux, } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { styles } from "./ft-reader-feedback.styles";
|
|
11
|
-
import { FtRatingType } from "@fluid-topics/public-api";
|
|
11
|
+
import { FtRatingType, } from "@fluid-topics/public-api";
|
|
12
12
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
13
|
-
import { FtSwitch, FtSwitchOption } from "@fluid-topics/ft-switch";
|
|
13
|
+
import { FtSwitch, FtSwitchOption, } from "@fluid-topics/ft-switch";
|
|
14
14
|
import { FtTextArea } from "@fluid-topics/ft-text-area";
|
|
15
15
|
import { repeat } from "lit/directives/repeat.js";
|
|
16
16
|
import { FtButton } from "@fluid-topics/ft-button";
|
|
17
|
-
import { defaultMessages, feedback } from "./utils/IntegratedFeedbackComponentMessages";
|
|
18
|
-
import { withI18n } from "@fluid-topics/ft-i18n";
|
|
17
|
+
import { defaultMessages, feedback, } from "./utils/IntegratedFeedbackComponentMessages";
|
|
18
|
+
import { withI18n, } from "@fluid-topics/ft-i18n";
|
|
19
19
|
import { FtTextField } from "@fluid-topics/ft-text-field";
|
|
20
20
|
import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
|
|
21
21
|
import { FtReaderFeatures } from "@fluid-topics/ft-reader-context";
|
|
@@ -118,7 +118,7 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
|
|
|
118
118
|
return html `
|
|
119
119
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
120
120
|
${repeat(new Array(5), (_, index) => index, (_, index) => {
|
|
121
|
-
|
|
121
|
+
const active = this.ratingTypeOfDoneRatingOfThisContent === FtRatingType.STARS && this.ratingValue > index;
|
|
122
122
|
const ratingValue = index + 1;
|
|
123
123
|
return html `
|
|
124
124
|
<ft-button round part="rating-stars-${ratingValue}"
|
|
@@ -140,7 +140,7 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
|
|
|
140
140
|
<ft-switch unselectable
|
|
141
141
|
@change=${(e) => this.rate(e.detail)}
|
|
142
142
|
part="rating rating-like"
|
|
143
|
-
label
|
|
143
|
+
label="${this.i18n(this.i18nProperties.ratingSectionTitle)}">
|
|
144
144
|
<ft-switch-option .value=${1}
|
|
145
145
|
?selected=${liked}
|
|
146
146
|
.iconVariant=${this.iconVariant}
|
|
@@ -202,12 +202,12 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
|
|
|
202
202
|
</a>
|
|
203
203
|
`;
|
|
204
204
|
}
|
|
205
|
-
|
|
205
|
+
const moreOptionsButton = this.withMoreOptionsButton && (((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.mailsSentByFluidTopics) || ((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.mailsSentByFluidTopicsForUnauthenticatedUsers))
|
|
206
206
|
? html `
|
|
207
207
|
<ft-button outlined
|
|
208
208
|
type="button" name="more-options"
|
|
209
209
|
class="ft-reader-feedback--more-options"
|
|
210
|
-
@click
|
|
210
|
+
@click=${this.onOpenMoreDetails}
|
|
211
211
|
part="more-options">
|
|
212
212
|
${feedback.messages.moreOptionsButton()}
|
|
213
213
|
</ft-button>
|
|
@@ -215,17 +215,17 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
|
|
|
215
215
|
: nothing;
|
|
216
216
|
return html `
|
|
217
217
|
<form class="ft-reader-feedback--feedback" part="feedback-container" autocomplete="on"
|
|
218
|
-
@submit
|
|
218
|
+
@submit=${(e) => this.onFormSubmitEvent(e, !!mailLink)}>
|
|
219
219
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
220
220
|
${this.i18n(this.i18nProperties.feedbackSectionTitle)}
|
|
221
221
|
</ft-typography>
|
|
222
222
|
${((_d = (_c = this.session) === null || _c === void 0 ? void 0 : _c.profile) === null || _d === void 0 ? void 0 : _d.userId) == null && ((_e = this.configuration) === null || _e === void 0 ? void 0 : _e.mailsSentByFluidTopicsForUnauthenticatedUsers) ? html `
|
|
223
223
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
224
224
|
class="ft-reader-feedback--from-input"
|
|
225
|
-
label
|
|
225
|
+
label="${feedback.messages.feedbackfromEmail()}"
|
|
226
226
|
@change=${(e) => this.from = e.detail.trim()}
|
|
227
227
|
?error=${this.from && !this.validFromEmail()}
|
|
228
|
-
helper
|
|
228
|
+
helper="${this.from && !this.validFromEmail() ? feedback.messages.feedbackfromEmailInvalid() : ""}"
|
|
229
229
|
/>
|
|
230
230
|
` : nothing}
|
|
231
231
|
<ft-text-area outlined
|
|
@@ -337,7 +337,7 @@ __decorate([
|
|
|
337
337
|
__decorate([
|
|
338
338
|
redux({
|
|
339
339
|
store: "reader",
|
|
340
|
-
selector: (state) => { var _a; return (_a = state.configuration) === null || _a === void 0 ? void 0 : _a.feedback; }
|
|
340
|
+
selector: (state) => { var _a; return (_a = state.configuration) === null || _a === void 0 ? void 0 : _a.feedback; },
|
|
341
341
|
})
|
|
342
342
|
], FtReaderFeedback.prototype, "configuration", void 0);
|
|
343
343
|
__decorate([
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
word-break: break-word;
|
|
570
570
|
}
|
|
571
571
|
`;var gl=["top","right","bottom","left"],ml=["start","end"],So=gl.reduce((e,t)=>e.concat(t,t+"-"+ml[0],t+"-"+ml[1]),[]),si=Math.min,Fe=Math.max,ai=Math.round;var ve=e=>({x:e,y:e}),Rd={left:"right",right:"left",bottom:"top",top:"bottom"};function vl(e,t,r){return Fe(e,si(t,r))}function $i(e,t){return typeof e=="function"?e(t):e}function li(e){return e.split("-")[0]}function Be(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Eo(e){return e==="y"?"height":"width"}function Ui(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function To(e){return Ao(Ui(e))}function yl(e,t,r){r===void 0&&(r=!1);let i=Be(e),n=To(e),o=Eo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xo(s)),[s,xo(s)]}function bl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function xo(e){let t=li(e);return Rd[t]+e.slice(t.length)}function Od(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function xl(e){return typeof e!="number"?Od(e):{top:e,right:e,bottom:e,left:e}}function nr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function Sl(e,t,r){let{reference:i,floating:n}=e,o=Ui(t),s=To(t),a=Eo(s),l=li(t),c=o==="y",u=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,d=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}let m=Be(t);return m&&(h[s]+=d*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Al(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:h=0}=$i(t,e),m=xl(h),b=a[d?p==="floating"?"reference":"floating":p],S=nr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},pt=nr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(S.top-pt.top+m.top)/I.y,bottom:(pt.bottom-S.bottom+m.bottom)/I.y,left:(S.left-pt.left+m.left)/I.x,right:(pt.right-S.right+m.right)/I.x}}var Id=50,El=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Al},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:p}=Sl(c,i,l),d=i,h=0,m={};for(let g=0;g<o.length;g++){let b=o[g];if(!b)continue;let{name:S,fn:E}=b,{x:R,y:I,data:pt,reset:st}=await E({x:u,y:p,initialPlacement:i,placement:d,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=R??u,p=I??p,m[S]={...m[S],...pt},st&&h<Id&&(h++,typeof st=="object"&&(st.placement&&(d=st.placement),st.rects&&(c=st.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):st.rects),{x:u,y:p}=Sl(c,d,l)),g=-1)}return{x:u,y:p,placement:d,strategy:n,middlewareData:m}};function Ld(e,t,r){return(e?[...r.filter(n=>Be(n)===e),...r.filter(n=>Be(n)!==e)]:r.filter(n=>li(n)===n)).filter(n=>e?Be(n)===e||(t?bl(n)!==n:!1):!0)}var Tl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:p,allowedPlacements:d=So,autoAlignment:h=!0,...m}=$i(e,t),g=p!==void 0||d===So?Ld(p||null,h,d):d,b=((r=s.autoPlacement)==null?void 0:r.index)||0,S=g[b];if(S==null)return{};if(a!==S)return{reset:{placement:g[0]}};let E=await l.detectOverflow(t,m),R=yl(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),I=[E[li(S)],E[R[0]],E[R[1]]],pt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:S,overflows:I}],st=g[b+1];if(st)return{data:{index:b+1,overflows:pt},reset:{placement:st}};let Pe=pt.map(Ft=>{let Kt=Be(Ft.placement);return[Ft.placement,Kt&&u?Ft.overflows.slice(0,2).reduce((Bt,Je)=>Bt+Je,0):Ft.overflows[0],Ft.overflows]}).sort((Ft,Kt)=>Ft[1]-Kt[1]),ke=((n=Pe.filter(Ft=>Ft[2].slice(0,Be(Ft[0])?2:3).every(Kt=>Kt<=0))[0])==null?void 0:n[0])||Pe[0][0];return ke!==a?{data:{index:b+1,overflows:pt},reset:{placement:ke}}:{}}}};var wl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:I}=E;return{x:R,y:I}}},...c}=$i(e,t),u={x:r,y:i},p=await o.detectOverflow(t,c),d=Ui(n),h=Ao(d),m=u[h],g=u[d],b=(E,R)=>vl(R+p[E==="y"?"top":"left"],R,R-p[E==="y"?"bottom":"right"]);s&&(m=b(h,m)),a&&(g=b(d,g));let S=l.fn({...t,[h]:m,[d]:g});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[d]:a}}}}}};function Bi(){return typeof window<"u"}function sr(e){return _l(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ce(e){var t;return(t=(_l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _l(e){return Bi()?e instanceof Node||e instanceof kt(e).Node:!1}function ce(e){return Bi()?e instanceof Element||e instanceof kt(e).Element:!1}function _e(e){return Bi()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Cl(e){return!Bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function ci(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Rl(e){return/^(table|td|th)$/.test(sr(e))}function ui(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Pd=/transform|translate|scale|rotate|perspective|filter/,kd=/paint|layout|strict|content/,or=e=>!!e&&e!=="none",wo;function Pr(e){let t=ce(e)?ue(e):e;return or(t.transform)||or(t.translate)||or(t.scale)||or(t.rotate)||or(t.perspective)||!Hi()&&(or(t.backdropFilter)||or(t.filter))||Pd.test(t.willChange||"")||kd.test(t.contain||"")}function Ol(e){let t=He(e);for(;_e(t)&&!kr(t);){if(Pr(t))return t;if(ui(t))return null;t=He(t)}return null}function Hi(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function kr(e){return/^(html|body|#document)$/.test(sr(e))}function ue(e){return kt(e).getComputedStyle(e)}function di(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(sr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Cl(e)&&e.host||Ce(e);return Cl(t)?t.host:t}function Il(e){let t=He(e);return kr(t)?(e.ownerDocument||e).body:_e(t)&&ci(t)?t:Il(t)}function Fi(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Il(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=kt(n);if(o){let a=ji(s);return t.concat(s,s.visualViewport||[],ci(n)?n:[],a&&r?Fi(a):[])}else return t.concat(n,Fi(n,[],r))}function ji(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kl(e){let t=ue(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=_e(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=ai(r)!==o||ai(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Dl(e){return ce(e)?e:e.contextElement}function Dr(e){let t=Dl(e);if(!_e(t))return ve(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=kl(t),s=(o?ai(r.width):r.width)/i,a=(o?ai(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Dd=ve(0);function Ml(e){let t=kt(e);return!Hi()||!t.visualViewport?Dd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Md(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===kt(e)}function pi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Dl(e),s=ve(1);t&&(i?ce(i)&&(s=Dr(i)):s=Dr(e));let a=Md(o,r,i)?Ml(o):ve(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&i){let d=kt(o),h=ce(i)?kt(i):i,m=d,g=ji(m);for(;g&&h!==m;){let b=Dr(g),S=g.getBoundingClientRect(),E=ue(g),R=S.left+(g.clientLeft+parseFloat(E.paddingLeft))*b.x,I=S.top+(g.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=R,c+=I,m=kt(g),g=ji(m)}}return nr({width:u,height:p,x:l,y:c})}function Vi(e,t){let r=di(e).scrollLeft;return t?t.left+r:pi(Ce(e)).left+r}function Nl(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vi(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function Nd(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=Ce(i),a=t?ui(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ve(1),u=ve(0),p=_e(i);if((p||!o)&&((sr(i)!=="body"||ci(s))&&(l=di(i)),p)){let h=pi(i);c=Dr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let d=s&&!p&&!o?Nl(s,l):ve(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:r.y*c.y-l.scrollTop*c.y+u.y+d.y}}function $d(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ud(e){let t=di(e),r=e.ownerDocument.body,i=Fe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Fe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+Vi(e),s=-t.scrollTop;return ue(r).direction==="rtl"&&(o+=Fe(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Fd=25;function Bd(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=kt(e),o=Ce(e),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let d=!Hi()||t==="fixed";i?d||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,d&&(c=s.offsetLeft,u=s.offsetTop))}if(Vi(o)<=0){let d=o.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(o.clientWidth-h.clientWidth-g),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;S<=Fd&&(a-=S)}return{width:a,height:l,x:c,y:u}}function Hd(e,t){let r=pi(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=Dr(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Ll(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=Bd(e,r,t);else if(t==="document")i=Ud(Ce(e));else if(ce(t))i=Hd(t,r);else{let n=Ml(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nr(i)}function jd(e,t){let r=t.get(e);if(r)return r;let i=Fi(e,[],!1).filter(a=>ce(a)&&sr(a)!=="body"),n=null,o=ue(e).position==="fixed",s=o?He(e):e;for(;ce(s)&&!kr(s);){let a=ue(s),l=Pr(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):n=a,s=He(s)}return t.set(e,i),i}function Vd(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?ui(t)?[]:jd(t,this._c):[].concat(r),i],a=Ll(t,s[0],n),l=a.top,c=a.right,u=a.bottom,p=a.left;for(let d=1;d<s.length;d++){let h=Ll(t,s[d],n);l=Fe(h.top,l),c=si(h.right,c),u=si(h.bottom,u),p=Fe(h.left,p)}return{width:c-p,height:u-l,x:p,y:l}}function zd(e){let{width:t,height:r}=kl(e);return{width:t,height:r}}function Wd(e,t,r){let i=_e(t),n=Ce(t),o=r==="fixed",s=pi(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=ve(0);if((i||!o)&&((sr(t)!=="body"||ci(n))&&(a=di(t)),i)){let d=pi(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!i&&n&&(l.x=Vi(n));let c=n&&!i&&!o?Nl(n,a):ve(0),u=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:u,y:p,width:s.width,height:s.height}}function Co(e){return ue(e).position==="static"}function Pl(e,t){if(!_e(e)||ue(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ce(e)===r&&(r=r.ownerDocument.body),r}function $l(e,t){let r=kt(e);if(ui(e))return r;if(!_e(e)){let n=He(e);for(;n&&!kr(n);){if(ce(n)&&!Co(n))return n;n=He(n)}return r}let i=Pl(e,t);for(;i&&Rl(i)&&Co(i);)i=Pl(i,t);return i&&kr(i)&&Co(i)&&!Pr(i)?r:i||Ol(e)||r}var Kd=async function(e){let t=this.getOffsetParent||$l,r=this.getDimensions,i=await r(e.floating);return{reference:Wd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Gd(e){return ue(e).direction==="rtl"}var zi={convertOffsetParentRelativeRectToViewportRelativeRect:Nd,getDocumentElement:Ce,getClippingRect:Vd,getOffsetParent:$l,getElementRects:Kd,getClientRects:$d,getDimensions:zd,getScale:Dr,isElement:ce,isRTL:Gd};var Ul=Tl,Fl=wl;var Bl=(e,t,r)=>{let i=new Map,n=r??{},o={...zi,...n.platform,_c:i};return El(e,t,{...n,platform:o})};function Hl(e){return qd(e)}function _o(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function qd(e){for(let t=e;t;t=_o(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_o(e);t;t=_o(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Pr(r)||t.tagName==="BODY"))return t}return null}async function jl(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Bl(e,t,{strategy:i.strategy,platform:{...zi,getOffsetParent:n=>zi.getOffsetParent(n,Hl)},middleware:[Fl({crossAxis:!0}),Ul({allowedPlacements:[i.placement]})]})}var Gr=f(x());var Jo=f(F());var Vl=f(F(),1);var Ro=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function zl(e,t){return(0,Vl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return fi(e);try{return JSON.parse(r)}catch{return fi(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:hi,...t??{}})}function Yd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Wi(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Wi(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Wi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wi(e,t){try{return Yd(e,t)}catch{return!1}}function hi(e,t){return!Wi(e,t)}function fi(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Ki(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Wl=f(F(),1);var Oo=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:hi,attribute:!1,...t};(0,Wl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Gi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var ar=f(F(),1);var qi=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Gl=f(k(),1);var Yi=globalThis,Xd=Yi.ShadowRoot&&(Yi.ShadyCSS===void 0||Yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Kl=(e,t)=>{if(Xd)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Xi=class extends Gl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return Kl(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Ro(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function ql(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Nr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ql,Yl=Symbol("constructorPrototype"),Xl=Symbol("constructorName"),Jl=Symbol("exportpartsDebouncer"),Zl=Symbol("dynamicDependenciesLoaded"),Mr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Mr.eventName="exportparts-updated";var ye=class extends Xi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ql]=new qi(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Jl].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Xl]=this.constructor.name,this[Yl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xl]&&Object.setPrototypeOf(this,this[Yl])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Zl]||(r[Zl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Mr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Mr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ql(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,i,n,o,s,a;let l=d=>d!=null&&d.trim().length>0,c=t.filter(l).map(d=>d.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let d of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=d.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=d.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(b=>b.trim());for(let b of g)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(d=>c.map(h=>`${d}:${h}--${d}`));this.exportparts=[...this.part,...p].join(", ")}};Ql=Jl;Nr([(0,ar.property)()],ye.prototype,"exportpartsPrefix",void 0);Nr([zl([])],ye.prototype,"exportpartsPrefixes",void 0);Nr([(0,ar.property)({reflect:!0})],ye.prototype,"exportparts",void 0);Nr([(0,ar.property)()],ye.prototype,"customStylesheet",void 0);Nr([(0,ar.property)()],ye.prototype,"elementToFocus",void 0);Nr([(0,ar.state)()],ye.prototype,"useAdoptedStyleSheets",void 0);function Zi(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var mi=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),lr=Symbol("internalStores"),Zd=Ki(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[lr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[lr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[lr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[lr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[lr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[lr].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[je].has(s.store):this[je].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[je].set(s,a.subscribe(()=>this.updateFromStores())),this[mi].set(s,[]),Zi(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let p=d=>this[u](d);a.addEventListener(c.eventName,p),this[mi].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[je].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[je].has(s)&&this[je].get(s)(),this[je].delete(s),(a=this[mi].get(s))===null||a===void 0||a.forEach(l=>l()),this[mi].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=je,r=lr,i=mi,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),tc=class extends Zd(ye){};function Qt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Re(e){return!!e&&!!e[G]}function de(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===op})(e)||Array.isArray(e)||!!e[ac]||!!(!((t=e.constructor)===null||t===void 0)&&t[ac])||Uo(e)||Fo(e))}function cr(e,t,r){r===void 0&&(r=!1),Fr(e)===0?(r?Object.keys:Ur)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function Fr(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Uo(e)?2:Fo(e)?3:0}function $r(e,t){return Fr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qd(e,t){return Fr(e)===2?e.get(t):e[t]}function lc(e,t,r){var i=Fr(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function cc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Uo(e){return ip&&e instanceof Map}function Fo(e){return np&&e instanceof Set}function Ve(e){return e.o||e.t}function Bo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=pc(e);delete t[G];for(var r=Ur(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Ho(e,t){return t===void 0&&(t=!1),jo(e)||Re(e)||!de(e)||(Fr(e)>1&&(e.set=e.add=e.clear=e.delete=Jd),Object.freeze(e),t&&cr(e,(function(r,i){return Ho(i,!0)}),!0)),e}function Jd(){Qt(2)}function jo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function be(e){var t=$o[e];return t||Qt(18,e),t}function tp(e,t){$o[e]||($o[e]=t)}function Do(){return vi}function Io(e,t){t&&(be("Patches"),e.u=[],e.s=[],e.v=t)}function Qi(e){Mo(e),e.p.forEach(ep),e.p=null}function Mo(e){e===vi&&(vi=e.l)}function ec(e){return vi={p:[],l:vi,h:e,m:!0,_:0}}function ep(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Lo(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||be("ES5").S(t,e,i),i?(r[G].P&&(Qi(t),Qt(4)),de(e)&&(e=Ji(t,e),t.l||tn(t,e)),t.u&&be("Patches").M(r[G].t,e,t.u,t.s)):e=Ji(t,r,[]),Qi(t),t.u&&t.v(t.u,t.s),e!==dc?e:void 0}function Ji(e,t,r){if(jo(t))return t;var i=t[G];if(!i)return cr(t,(function(a,l){return rc(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return tn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Bo(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),cr(o,(function(a,l){return rc(e,i,n,a,l,r,s)})),tn(e,n,!1),r&&e.u&&be("Patches").N(i,r,e.u,e.s)}return i.o}function rc(e,t,r,i,n,o,s){if(Re(n)){var a=Ji(e,n,o&&t&&t.i!==3&&!$r(t.R,i)?o.concat(i):void 0);if(lc(r,i,a),!Re(a))return;e.m=!1}else s&&r.add(n);if(de(n)&&!jo(n)){if(!e.h.D&&e._<1)return;Ji(e,n),t&&t.A.l||tn(e,n)}}function tn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Ho(t,r)}function Po(e,t){var r=e[G];return(r?Ve(r):e)[t]}function ic(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function ze(e){e.P||(e.P=!0,e.l&&ze(e.l))}function ko(e){e.o||(e.o=Bo(e.t))}function No(e,t,r){var i=Uo(t)?be("MapSet").F(t,r):Fo(t)?be("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Do(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=yi;s&&(l=[a],c=gi);var u=Proxy.revocable(l,c),p=u.revoke,d=u.proxy;return a.k=d,a.j=p,d})(t,r):be("ES5").J(t,r);return(r?r.A:Do()).p.push(i),i}function rp(e){return Re(e)||Qt(22,e),(function t(r){if(!de(r))return r;var i,n=r[G],o=Fr(r);if(n){if(!n.P&&(n.i<4||!be("ES5").K(n)))return n.t;n.I=!0,i=nc(r,o),n.I=!1}else i=nc(r,o);return cr(i,(function(s,a){n&&Qd(n.t,s)===a||lc(i,s,t(a))})),o===3?new Set(i):i})(e)}function nc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bo(e)}function uc(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[G];return yi.get(c,s)},set:function(c){var u=this[G];yi.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][G];if(!l.P)switch(l.i){case 5:i(l)&&ze(l);break;case 4:r(l)&&ze(l)}}}function r(s){for(var a=s.t,l=s.k,c=Ur(l),u=c.length-1;u>=0;u--){var p=c[u];if(p!==G){var d=a[p];if(d===void 0&&!$r(a,p))return!0;var h=l[p],m=h&&h[G];if(m?m.t!==d:!cc(h,d))return!0}}var g=!!a[G];return c.length!==Ur(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&Qt(3,JSON.stringify(Ve(s)))}var o={};tp("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,d){if(p){for(var h=Array(d.length),m=0;m<d.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var g=pc(d);delete g[G];for(var b=Ur(g),S=0;S<b.length;S++){var E=b[S];g[E]=e(E,p||!!g[E].enumerable)}return Object.create(Object.getPrototypeOf(d),g)})(l,s),u={i:l?5:4,A:a?a.A:Do(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,G,{value:u,writable:!0}),c},S:function(s,a,l){l?Re(a)&&a[G].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var p=u[G];if(p){var d=p.t,h=p.k,m=p.R,g=p.i;if(g===4)cr(h,(function(I){I!==G&&(d[I]!==void 0||$r(d,I)?m[I]||c(h[I]):(m[I]=!0,ze(p)))})),cr(d,(function(I){h[I]!==void 0||$r(h,I)||(m[I]=!1,ze(p))}));else if(g===5){if(i(p)&&(ze(p),m.length=!0),h.length<d.length)for(var b=h.length;b<d.length;b++)m[b]=!1;else for(var S=d.length;S<h.length;S++)m[S]=!0;for(var E=Math.min(h.length,d.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var oc,vi,Vo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ip=typeof Map<"u",np=typeof Set<"u",sc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",dc=Vo?Symbol.for("immer-nothing"):((oc={})["immer-nothing"]=!0,oc),ac=Vo?Symbol.for("immer-draftable"):"__$immer_draftable",G=Vo?Symbol.for("immer-state"):"__$immer_state";var op=""+Object.prototype.constructor,Ur=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,pc=Object.getOwnPropertyDescriptors||function(e){var t={};return Ur(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},$o={},yi={get:function(e,t){if(t===G)return e;var r=Ve(e);if(!$r(r,t))return(function(n,o,s){var a,l=ic(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!de(i)?i:i===Po(e.t,t)?(ko(e),e.o[t]=No(e.A.h,i,e)):i},has:function(e,t){return t in Ve(e)},ownKeys:function(e){return Reflect.ownKeys(Ve(e))},set:function(e,t,r){var i=ic(Ve(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=Po(Ve(e),t),o=n?.[G];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(cc(r,n)&&(r!==void 0||$r(e.t,t)))return!0;ko(e),ze(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Po(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ko(e),ze(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ve(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){Qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Qt(12)}},gi={};cr(yi,(function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gi.deleteProperty=function(e,t){return gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return yi.set.call(this,e[0],t,r,e[0])};var sp=(function(){function e(r){var i=this;this.O=sc,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var b=this;g===void 0&&(g=a);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return l.produce(g,(function(I){var pt;return(pt=o).call.apply(pt,[b,I].concat(E))}))}}var c;if(typeof o!="function"&&Qt(6),s!==void 0&&typeof s!="function"&&Qt(7),de(n)){var u=ec(i),p=No(i,n,void 0),d=!0;try{c=o(p),d=!1}finally{d?Qi(u):Mo(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Io(u,s),Lo(g,u)}),(function(g){throw Qi(u),g})):(Io(u,s),Lo(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===dc&&(c=void 0),i.D&&Ho(c,!0),s){var h=[],m=[];be("Patches").M(n,c,h,m),s(h,m)}return c}Qt(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,p=Array(u>1?u-1:0),d=1;d<u;d++)p[d-1]=arguments[d];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(p))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){de(r)||Qt(8),Re(r)&&(r=rp(r));var i=ec(this),n=No(this,r,void 0);return n[G].C=!0,Mo(i),n},t.finishDraft=function(r,i){var n=r&&r[G],o=n.A;return Io(o,i),Lo(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!sc&&Qt(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=be("Patches").$;return Re(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),jt=new sp,ap=jt.produce,sm=jt.produceWithPatches.bind(jt),am=jt.setAutoFreeze.bind(jt),lm=jt.setUseProxies.bind(jt),cm=jt.applyPatches.bind(jt),um=jt.createDraft.bind(jt),dm=jt.finishDraft.bind(jt),en=ap;function ur(e){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(e)}function fc(e,t){if(ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(ur(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hc(e){var t=fc(e,"string");return ur(t)=="symbol"?t:t+""}function mc(e,t,r){return(t=hc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gc(Object(r),!0).forEach(function(i){mc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Et(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var vc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Wo=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+Wo(),REPLACE:"@@redux/REPLACE"+Wo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wo()}};function lp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ko(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Et(1));return r(Ko)(e,t)}if(typeof e!="function")throw new Error(Et(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(Et(3));return o}function p(g){if(typeof g!="function")throw new Error(Et(4));if(l)throw new Error(Et(5));var b=!0;return c(),a.push(g),function(){if(b){if(l)throw new Error(Et(6));b=!1,c();var E=a.indexOf(g);a.splice(E,1),s=null}}}function d(g){if(!lp(g))throw new Error(Et(7));if(typeof g.type>"u")throw new Error(Et(8));if(l)throw new Error(Et(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var b=s=a,S=0;S<b.length;S++){var E=b[S];E()}return g}function h(g){if(typeof g!="function")throw new Error(Et(10));n=g,d({type:rn.REPLACE})}function m(){var g,b=p;return g={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(Et(11));function R(){E.next&&E.next(u())}R();var I=b(R);return{unsubscribe:I}}},g[vc]=function(){return this},g}return d({type:rn.INIT}),i={dispatch:d,subscribe:p,getState:u,replaceReducer:h},i[vc]=m,i}function cp(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:rn.INIT});if(typeof i>"u")throw new Error(Et(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Et(13))})}function yc(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{cp(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var d=!1,h={},m=0;m<o.length;m++){var g=o[m],b=r[g],S=c[g],E=b(S,u);if(typeof E>"u"){var R=u&&u.type;throw new Error(Et(14))}h[g]=E,d=d||E!==S}return d=d||o.length!==Object.keys(c).length,d?h:c}}function Br(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function bc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Et(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=Br.apply(void 0,a)(n.dispatch),zo(zo({},n),{},{dispatch:o})}}}function xc(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Sc=xc();Sc.withExtraArgument=xc;var Go=Sc;var Cc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),up=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Hr=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},dp=Object.defineProperty,pp=Object.defineProperties,fp=Object.getOwnPropertyDescriptors,Ac=Object.getOwnPropertySymbols,hp=Object.prototype.hasOwnProperty,mp=Object.prototype.propertyIsEnumerable,Ec=function(e,t,r){return t in e?dp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},We=function(e,t){for(var r in t||(t={}))hp.call(t,r)&&Ec(e,r,t[r]);if(Ac)for(var i=0,n=Ac(t);i<n.length;i++){var r=n[i];mp.call(t,r)&&Ec(e,r,t[r])}return e},qo=function(e,t){return pp(e,fp(t))},gp=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var vp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Br:Br.apply(null,arguments)},Om=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function yp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function Ke(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return We(We({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var bp=(function(e){Cc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Hr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Hr([void 0],r.concat(this))))},t})(Array),xp=(function(e){Cc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Hr([void 0],r[0].concat(this)))):new(t.bind.apply(t,Hr([void 0],r.concat(this))))},t})(Array);function Zo(e){return de(e)?en(e,function(){}):e}function Sp(e){return typeof e=="boolean"}function Ap(){return function(t){return Ep(t)}}function Ep(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new bp;if(r&&(Sp(r)?c.push(Go):c.push(Go.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var p;if(l)var d}return c}var Yo=!0;function _c(e){var t=Ap(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,p=r.enhancers,d=p===void 0?void 0:p,h;if(typeof n=="function")h=n;else if(yp(n))h=yc(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Yo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yo&&m.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=bc.apply(void 0,m),b=Br;l&&(b=vp(We({trace:!Yo},typeof l=="object"&&l)));var S=new xp(g),E=S;Array.isArray(d)?E=Hr([g],d):typeof d=="function"&&(E=d(S));var R=b.apply(void 0,E);return Ko(h,u,R)}function Rc(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function Tp(e){return typeof e=="function"}function wp(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?Rc(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(Tp(e))l=function(){return Zo(e())};else{var c=Zo(e);l=function(){return c}}function u(p,d){p===void 0&&(p=l());var h=Hr([o[d.type]],s.filter(function(m){var g=m.matcher;return g(d)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Re(m)){var b=m,S=g(b,d);return S===void 0?m:S}else{if(de(m))return en(m,function(E){return g(E,d)});var S=g(m,d);if(S===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return m},p)}return u.getInitialState=l,u}function Cp(e,t){return e+"/"+t}function Oc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Zo(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var p=i[u],d=Cp(t,u),h,m;"reducer"in p?(h=p.reducer,m=p.prepare):h=p,o[u]=h,s[d]=h,a[u]=m?Ke(d,m):Ke(d)});function l(){var u=typeof e.extraReducers=="function"?Rc(e.extraReducers):[e.extraReducers],p=u[0],d=p===void 0?{}:p,h=u[1],m=h===void 0?[]:h,g=u[2],b=g===void 0?void 0:g,S=We(We({},d),s);return wp(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var I=0,pt=m;I<pt.length;I++){var st=pt[I];E.addMatcher(st.matcher,st.reducer)}b&&E.addDefaultCase(b)})}var c;return{name:t,reducer:function(u,p){return c||(c=l()),c(u,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var _p="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Rp=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=_p[Math.random()*64|0];return t},Op=["name","message","stack","code"],Xo=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Tc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ip=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Op;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},km=(function(){function e(t,r,i){var n=Ke(t+"/fulfilled",function(u,p,d,h){return{payload:u,meta:qo(We({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),o=Ke(t+"/pending",function(u,p,d){return{payload:void 0,meta:qo(We({},d||{}),{arg:p,requestId:u,requestStatus:"pending"})}}),s=Ke(t+"/rejected",function(u,p,d,h,m){return{payload:h,error:(i&&i.serializeError||Ip)(u||"Rejected"),meta:qo(We({},m||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(p,d,h){var m=i?.idGenerator?i.idGenerator(u):Rp(),g=new l,b,S=!1;function E(I){b=I,g.abort()}var R=(function(){return gp(this,null,function(){var I,pt,st,Pe,ro,ke,Ft;return up(this,function(Kt){switch(Kt.label){case 0:return Kt.trys.push([0,4,,5]),Pe=(I=i?.condition)==null?void 0:I.call(i,u,{getState:d,extra:h}),Pp(Pe)?[4,Pe]:[3,2];case 1:Pe=Kt.sent(),Kt.label=2;case 2:if(Pe===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,ro=new Promise(function(Bt,Je){return g.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:b||"Aborted"})})}),p(o(m,u,(pt=i?.getPendingMeta)==null?void 0:pt.call(i,{requestId:m,arg:u},{getState:d,extra:h}))),[4,Promise.race([ro,Promise.resolve(r(u,{dispatch:p,getState:d,extra:h,requestId:m,signal:g.signal,abort:E,rejectWithValue:function(Bt,Je){return new Xo(Bt,Je)},fulfillWithValue:function(Bt,Je){return new Tc(Bt,Je)}})).then(function(Bt){if(Bt instanceof Xo)throw Bt;return Bt instanceof Tc?n(Bt.payload,m,u,Bt.meta):n(Bt,m,u)})])];case 3:return st=Kt.sent(),[3,5];case 4:return ke=Kt.sent(),st=ke instanceof Xo?s(null,m,u,ke.payload,ke.meta):s(ke,m,u),[3,5];case 5:return Ft=i&&!i.dispatchConditionRejection&&s.match(st)&&st.meta.condition,Ft||p(st),[2,st]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:u,unwrap:function(){return R.then(Lp)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Lp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Pp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ic="listener",Lc="completed",Pc="cancelled",Dm="task-"+Pc,Mm="task-"+Lc,Nm=Ic+"-"+Pc,$m=Ic+"-"+Lc;var Qo="listenerMiddleware";var Um=Ke(Qo+"/add"),Fm=Ke(Qo+"/removeAll"),Bm=Ke(Qo+"/remove");var wc,Hm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(wc||(wc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},kp=function(e){return function(t){setTimeout(t,e)}},jm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kp(10);uc();var Dp=Ki(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),nn=class extends Dp(Object){};window.ftReduxStores||(window.ftReduxStores={});var kc=class e extends nn{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(Zi(o))return o;if(n==null)return;let s=Oc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=_c({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=fi(s.getInitialState());for(let p of c.keeping)u[p]=(l??u)[p];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Gi;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let p=c(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var on=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sn=f(x()),Mp="ft-app-info",Oe=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Oe.eventName="authentication-change";var bi=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bi.eventName="ui-locale-changed";var Np={session:(e,t)=>{(0,sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>A.dispatchEvent(new Oe(t.payload)),0))}},A=sn.FtReduxStore.get({name:Mp,reducers:Np,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Dc=f(x()),an=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},gg=(0,Dc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(A)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>on.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return an([(0,Jo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),an([(0,Jo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),an([Oo({store:A.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),an([Oo({store:A.name})],t.prototype,"uiLocale",void 0),t});var pn=f(x());var ts=f(x());var dr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=A.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=A.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var jr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:dr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):dr.await()}};var Tt=class extends jr{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new ts.CacheRegistry,this.cache=t?n.commonCache:new ts.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ln=class extends Tt{async listMySearches(){let{session:t}=A.getState();return Te(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var cn=class extends Tt{async listMyBookmarks(){let t=A.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var un=class extends Tt{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var dn=class extends Tt{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var $p="ft-user-assets",Up={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(Xt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;rs(e,r,[...es(e,r),n]),Mc(e,r,1,i),Nc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;rs(e,r,es(e,r).map(n=>n.id===i.id?i:n)),Nc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;rs(e,r,es(e,r).filter(o=>o.id!==n)),Mc(e,r,-1,i)}},$c={[Xt.SEARCHES]:"savedSearches",[Xt.BOOKMARKS]:"bookmarks",[Xt.BOOKS]:void 0,[Xt.COLLECTIONS]:void 0},es=(e,t)=>{var r;let i=$c[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},rs=(e,t,r)=>{let i=$c[t];i&&(e[i]=r)},Mc=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===Xt.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Nc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ot=pn.FtReduxStore.get({name:$p,reducers:Up,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Xt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),is=class{constructor(t=new un,r=new dn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=A.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new cn,this.savedSearchesService=new ln,A.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=A.getState();(0,pn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ot.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ot.getState().assetCounts.allAsset[t]!==r.count&&Ot.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ot.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ot.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;t===Xt.BOOKMARKS&&r&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(r)}}},ns=new is;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ns);var os=class{addCommand(t,r=!1){A.commands.add(t,r)}consumeCommand(t){return A.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new os;var Jt=f(x());var Uc,Vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Fp=Symbol("clearAfterUnitTest"),fn=class extends(0,Jt.withEventBus)(Tt){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Uc]=()=>{this.defaultMessages={},this.cache=new Jt.CacheRegistry,this.listeners={}},this.currentUiLocale=A.getState().uiLocale,A.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=A.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,Jt.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new Jt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof Jt.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Vr({loadedContexts:t})),this.dispatchEvent(new Vr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Vr({loadedContexts:[t]})),this.dispatchEvent(new Vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,Jt.delay)(0).then(()=>i()).catch(()=>null)))}};Uc=Fp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var zr=window.FluidTopicsI18nService,hn=window.FluidTopicsCustomI18nService;var Fc=f(x()),ss=class{highlightHtml(t,r,i){(0,Fc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ss;var Bc=f(x());var as=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=A.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return Bc.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:A.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new as;var Hc=f(x());var xi=class{static get(t,r){var i,n,o,s;let a=A.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Hc.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var mn=class extends Tt{async sendDocumentStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send khub.search event")}async sendDocumentSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.search event")}async sendSearchPageSelectEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(t){let r;switch(t.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+t.editorialType)}return{id:t.id,title:t.title,type:r,metadata:t.metadata}}sortEventArrays(t){let r=Object.entries(t).map(([i,n])=>Array.isArray(n)?[i,n.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(t,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(t),async()=>(await this.awaitApi).sendEvents(t).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var ls=class{urlToSearchRequest(t){return xi.get().parse(t)}searchRequestToUrl(t){return xi.get().serialize(t)}};window.FluidTopicsUrlService=new ls;var Ie=f(x());var pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};pr.eventName="change";var cs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},jc=new cs;var gn=class e extends Ie.WithEventBus{static build(){return new e(window.history,jc,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ie.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new pr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(pr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(pr.eventName,t)}currentItem(){return(0,Ie.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ie.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Ie.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ie.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Wr=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=A.getState().session;return!!t?.sessionAuthenticated}};var Vc=f(k());var zc=Vc.css`
|
|
572
|
-
`;var Gc=f(k()),Dt=f(F()),mr=f(x());var fr=f(x());function Wc(e,t){let{authenticationRequired:r,session:i}=A.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var vn=class extends jr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var us=class e extends fr.FtStateManager{static build(t){return new e(A,t)}constructor(t,r){super(),this.store=t,this.cache=new fr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vn,this.cleanSessionDebouncer=new fr.Debouncer,this.reloadDebouncer=new fr.Debouncer(500),this.apiProvider=r??(()=>dr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Oe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Wc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(
|
|
572
|
+
`;var Gc=f(k()),Dt=f(F()),mr=f(x());var fr=f(x());function Wc(e,t){let{authenticationRequired:r,session:i}=A.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var vn=class extends jr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var us=class e extends fr.FtStateManager{static build(t){return new e(A,t)}constructor(t,r){super(),this.store=t,this.cache=new fr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vn,this.cleanSessionDebouncer=new fr.Debouncer,this.reloadDebouncer=new fr.Debouncer(500),this.apiProvider=r??(()=>dr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Oe.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Wc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new bi(i)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Kc=us.build();var hr=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Si=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new hr(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var xt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},X=class extends mr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Kc,this.contextRoot=new Si}render(){return Gc.html`
|
|
573
573
|
<slot></slot>
|
|
574
574
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>zr.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};X.elementDefinitions={};X.styles=zc;xt([(0,Dt.property)()],X.prototype,"baseUrl",void 0);xt([(0,Dt.property)()],X.prototype,"tenantId",void 0);xt([(0,Dt.property)()],X.prototype,"apiIntegrationIdentifier",void 0);xt([(0,Dt.property)()],X.prototype,"apiIntegrationAppVersion",void 0);xt([(0,Dt.property)()],X.prototype,"uiLocale",void 0);xt([(0,mr.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);xt([(0,mr.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"editorMode",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"noCustom",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);xt([(0,Dt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],X.prototype,"noCustomComponent",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"withManualResources",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);xt([(0,Dt.property)({type:Boolean})],X.prototype,"authenticationRequired",void 0);xt([(0,mr.jsonProperty)([])],X.prototype,"messageContexts",void 0);xt([(0,mr.jsonProperty)(void 0)],X.prototype,"session",void 0);var Yc=f(x());var qc={"ft-app-context":X};(0,Yc.customElements)(qc);var Xc=f(F());var ds=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Kr=new ds;var jp=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ei=Symbol("i18nAttributes"),Zc=Symbol("i18nListAttributes"),Ti=Symbol("i18nProperties"),yn=Symbol("i18nContexts"),Ai=Symbol("i18nUnsubs"),Ge=(0,Gr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?hn:zr}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let d=u??(p?p(this):[]);return this.getI18nService(c).resolveMessage(s,a,...d)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Kr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,p,d)=>d?.context&&d.key&&o(u,p,d)?{...d,message:this.i18n({context:d.context,key:d.key,custom:d.custom,...u})}:d;(s=this[Ei])===null||s===void 0||s.forEach((u,p)=>l[p]=c(u,p,l[p])),(a=this[Zc])===null||a===void 0||a.forEach((u,p)=>{var d;return l[p]=(d=l[p])===null||d===void 0?void 0:d.map(h=>c(u,p,h))})}updateI18nProperties(o){var s;(s=this[Ti])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[yn].set(l,{isCustomContext:a}),this[Ai].has(l)||this[Ai].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[yn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[yn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach(o=>o()),this[Ai].clear()}}return t=yn,r=Ai,jp([(0,Xc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),bn=class extends Ge(Gr.FtLitElement){},xn=class extends Ge(Gr.FtLitElementRedux){};var Qc=f(x());var ps=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?Kr.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Vp=new ps;var Jc=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Qc.hasChanged,converter:Kr,...t}),r[Ei]=(n=r[Ei])!==null&&n!==void 0?n:new Map,r[Ei].set(i,e??{})};var qe=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?hn:zr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Sn=(e,t)=>(r,i)=>{var n,o;r.constructor.createProperty(i,t??{attribute:!1,type:String});let s={...e,key:(n=e.key)!==null&&n!==void 0?n:i};r[Ti]=(o=r[Ti])!==null&&o!==void 0?o:new Map,r[Ti].set(i,s)};var tu=f(k());var eu=tu.css`
|
|
575
575
|
`;var An=f(k()),En=f(F()),Tn=f(x());var wi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},pe=class extends xn{constructor(){super(),this.editorMode=!1,this.addStore(A)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":An.nothing:An.html`
|
|
@@ -715,7 +715,7 @@
|
|
|
715
715
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
716
716
|
></slot>
|
|
717
717
|
</div>
|
|
718
|
-
`}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.
|
|
718
|
+
`}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.key==" "&&(r=this.options.indexOf(t.target)),r!=null&&(t.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],(t=this.slottedContent)===null||t===void 0||t.assignedElements().forEach(r=>{r instanceof it&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(t){var r;(r=t.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(i=>{i.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let r=t.target;this.onOptionChange(r)}onOptionChangeByUser(t){var r;t.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(t.target),this.dispatchEvent(new ms((r=this.selectedOption)===null||r===void 0?void 0:r.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(t=>{t.selected=t===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(t.isFocused=t===this.selectedOption)})}};Lt.elementDefinitions={};Lt.styles=wn.css`
|
|
719
719
|
:host {
|
|
720
720
|
display: inline-block;
|
|
721
721
|
}
|
|
@@ -1005,7 +1005,7 @@
|
|
|
1005
1005
|
@keydown=${this.initKeydownPress}>
|
|
1006
1006
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon} focusable="false" aria-hidden="true"></ft-icon>
|
|
1007
1007
|
</div>
|
|
1008
|
-
`}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter","
|
|
1008
|
+
`}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=t.currentTarget;r==="Enter"||r===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new Cn(this.fixedWidth,this.fixedHeight)))}initDrag(t,r){this.dragging=!0,this.startX=t,this.startY=r,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,r){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+r-this.startY;this.dispatchEvent(new Cn(i,n))}};vt.elementDefinitions={"ft-icon":rt};vt.styles=[Rn.noTextSelect,wu];Se([(0,Vt.property)({type:Number})],vt.prototype,"initialWidth",void 0);Se([(0,Vt.property)({type:Number})],vt.prototype,"initialHeight",void 0);Se([(0,Vt.property)()],vt.prototype,"icon",void 0);Se([(0,Vt.property)()],vt.prototype,"iconVariant",void 0);Se([(0,Vt.property)()],vt.prototype,"cursor",void 0);Se([(0,Vt.property)()],vt.prototype,"ariaLabel",void 0);Se([(0,Vt.state)()],vt.prototype,"dragging",void 0);Se([(0,Vt.state)()],vt.prototype,"isAriaPressed",void 0);Se([(0,Vt.eventOptions)({passive:!0})],vt.prototype,"initDragFromMouse",null);Se([(0,Vt.eventOptions)({passive:!0})],vt.prototype,"initDragFromTouch",null);var _u=f(x());var Cu={"ft-resizer":vt};(0,_u.customElements)(Cu);var On=f(F());var gs=f(k()),vs=f(F());function Ru(e,t,r){return e?t(e):r?.(e)}var Iu=f(we()),Lu=f(x()),Ou=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},yr=class extends Lu.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return gs.html`
|
|
1009
1009
|
<div class="${(0,Iu.classMap)(this.inputLabelClasses)}">
|
|
1010
1010
|
${Ru(this.text,()=>gs.html`
|
|
1011
1011
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1438,7 +1438,7 @@
|
|
|
1438
1438
|
<ft-switch unselectable
|
|
1439
1439
|
@change=${o=>this.rate(o.detail)}
|
|
1440
1440
|
part="rating rating-like"
|
|
1441
|
-
label
|
|
1441
|
+
label="${this.i18n(this.i18nProperties.ratingSectionTitle)}">
|
|
1442
1442
|
<ft-switch-option .value=${1}
|
|
1443
1443
|
?selected=${r}
|
|
1444
1444
|
.iconVariant=${this.iconVariant}
|
|
@@ -1483,23 +1483,23 @@
|
|
|
1483
1483
|
<ft-button outlined
|
|
1484
1484
|
type="button" name="more-options"
|
|
1485
1485
|
class="ft-reader-feedback--more-options"
|
|
1486
|
-
@click
|
|
1486
|
+
@click=${this.onOpenMoreDetails}
|
|
1487
1487
|
part="more-options">
|
|
1488
1488
|
${M.messages.moreOptionsButton()}
|
|
1489
1489
|
</ft-button>
|
|
1490
1490
|
`:nt.nothing;return nt.html`
|
|
1491
1491
|
<form class="ft-reader-feedback--feedback" part="feedback-container" autocomplete="on"
|
|
1492
|
-
@submit
|
|
1492
|
+
@submit=${c=>this.onFormSubmitEvent(c,!!s)}>
|
|
1493
1493
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
1494
1494
|
${this.i18n(this.i18nProperties.feedbackSectionTitle)}
|
|
1495
1495
|
</ft-typography>
|
|
1496
1496
|
${((n=(i=this.session)===null||i===void 0?void 0:i.profile)===null||n===void 0?void 0:n.userId)==null&&(!((o=this.configuration)===null||o===void 0)&&o.mailsSentByFluidTopicsForUnauthenticatedUsers)?nt.html`
|
|
1497
1497
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
1498
1498
|
class="ft-reader-feedback--from-input"
|
|
1499
|
-
label
|
|
1499
|
+
label="${M.messages.feedbackfromEmail()}"
|
|
1500
1500
|
@change=${c=>this.from=c.detail.trim()}
|
|
1501
1501
|
?error=${this.from&&!this.validFromEmail()}
|
|
1502
|
-
helper
|
|
1502
|
+
helper="${this.from&&!this.validFromEmail()?M.messages.feedbackfromEmailInvalid():""}"
|
|
1503
1503
|
/>
|
|
1504
1504
|
`:nt.nothing}
|
|
1505
1505
|
<ft-text-area outlined
|
|
@@ -5,7 +5,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
5
5
|
.highlight-html-match {
|
|
6
6
|
background: ${Rc};
|
|
7
7
|
}
|
|
8
|
-
`;function La(t,e,r){var o,n;let a=t.getAttribute("data-highlight-html-query");if((a??"")!==(e??"")){let s=new Gf(t);if(s.unmark(),e&&e.trim()){let l={className:(o=r?.className)!==null&&o!==void 0?o:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(l.each=
|
|
8
|
+
`;function La(t,e,r){var o,n;let a=t.getAttribute("data-highlight-html-query");if((a??"")!==(e??"")){let s=new Gf(t);if(s.unmark(),e&&e.trim()){let l={className:(o=r?.className)!==null&&o!==void 0?o:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(l.each=p=>{for(let h in r.attributes)p.setAttribute(h,r.attributes[h])}),s.mark(e.replace(/"[^"]+"/g,""),{...l,separateWordSearch:!0}),((n=e.match(/"[^"]+"/g))!==null&&n!==void 0?n:[]).forEach(p=>s.mark(p.replace(/"/g,""),{...l,separateWordSearch:!1}))}}t.setAttribute("data-highlight-html-query",e??"")}var Na={};j(Na,{noTextInputDefaultClearButton:()=>Pa,noTextSelect:()=>ur,safariEllipsisFix:()=>Po,wordWrap:()=>Kf});var ur=_`
|
|
9
9
|
.ft-no-text-select {
|
|
10
10
|
-webkit-touch-callout: none;
|
|
11
11
|
-webkit-user-select: none;
|
|
@@ -650,7 +650,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
650
650
|
word-break: break-word;
|
|
651
651
|
}
|
|
652
652
|
`;var Xh="ft-app-info",Pt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pt.eventName="authentication-change";var Go=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Go.eventName="ui-locale-changed";var Jh={session:(t,e)=>{Ve(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>I.dispatchEvent(new Pt(e.payload)),0))}},I=It.get({name:Xh,reducers:Jh,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ki=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},SO=pe(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(I)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>gr.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ki([g({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ki([g({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ki([ee({store:I.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),ki([ee({store:I.name})],e.prototype,"uiLocale",void 0),e});var xr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=I.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=I.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}};var io=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:xr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xr.await()}};var Pe=class extends io{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new gt,this.cache=e?n.commonCache:new gt}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Pi=class extends Pe{async listMySearches(){let{session:e}=I.getState();return Lt(e,oe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Ni=class extends Pe{async listMyBookmarks(){let e=I.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Di=class extends Pe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=I.getState().session;return!!e?.sessionAuthenticated}};var Mi=class extends Pe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=I.getState().session;return!!e?.sessionAuthenticated}};var Qh="ft-user-assets",em={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(Xe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;Ds(t,r,[...Ns(t,r),n]),Au(t,r,1,o),Ru(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Ds(t,r,Ns(t,r).map(n=>n.id===o.id?o:n)),Ru(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;Ds(t,r,Ns(t,r).filter(a=>a.id!==n)),Au(t,r,-1,o)}},Tu={[Xe.SEARCHES]:"savedSearches",[Xe.BOOKMARKS]:"bookmarks",[Xe.BOOKS]:void 0,[Xe.COLLECTIONS]:void 0},Ns=(t,e)=>{var r;let o=Tu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Ds=(t,e,r)=>{let o=Tu[e];o&&(t[o]=r)},Au=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===Xe.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},Ru=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Me=It.get({name:Qh,reducers:em,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Xe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ms=class{constructor(e=new Di,r=new Mi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=I.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ni,this.savedSearchesService=new Pi,I.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=I.getState();Ve((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Me.actions.clearAssetCount(),Me.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Me.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Me.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Me.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Me.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Me.getState().assetCounts.allAsset[e]!==r.count&&Me.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Me.getState().assetCounts.bookmarkByMap[e]!==r.count&&Me.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Me.getState().assetCounts.bookmarkByMap).length!==0;e===Xe.BOOKMARKS&&r&&Me.actions.clearBookmarkCountByMap(),Me.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Me.actions.bookmarks(r)}}},$s=new Ms;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=$s);var Fs=class{addCommand(e,r=!1){I.commands.add(e,r)}consumeCommand(e){return I.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Fs;var _u,no=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},tm=Symbol("clearAfterUnitTest"),$i=class extends hi(Pe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[_u]=()=>{this.defaultMessages={},this.cache=new gt,this.listeners={}},this.currentUiLocale=I.getState().uiLocale,I.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=I.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ve(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new No((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Ot)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new no({loadedContexts:e})),this.dispatchEvent(new no({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new no({loadedContexts:[e]})),this.dispatchEvent(new no({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>ui(0).then(()=>o()).catch(()=>null)))}};_u=tm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends $i{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends $i{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var ao=window.FluidTopicsI18nService,Fi=window.FluidTopicsCustomI18nService;var Us=class{highlightHtml(e,r,o){La(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Us;var Bs=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=I.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a,s;if(e==null)return"";try{return gr.format(e,(o=r?.locale)!==null&&o!==void 0?o:I.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new Bs;var jo=class{static get(e,r){var o,n,a,s;let l=I.getState(),{lang:d,region:p}=(a=(n=(o=l.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Zr(l.baseUrl,e??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${d}-${p}`)}};var Ui=class extends Pe{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(r),console.debug(n),o)),1e3)}};var Hs=class{urlToSearchRequest(e){return jo.get().parse(e)}searchRequestToUrl(e){return jo.get().serialize(e)}};window.FluidTopicsUrlService=new Hs;var Sr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Sr.eventName="change";var zs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},Iu=new zs;var Bi=class t extends At{static build(){return new t(window.history,Iu,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ve(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Sr(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Sr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Sr.eventName,e)}currentItem(){return it(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return it(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return it(r.find(o=>e(o)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return it(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Bi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var so=class{constructor(){this.storeListeners=[]}store(e,r){if(this.isAuthenticated())return;let o=JSON.stringify(r);window.localStorage.setItem(e,o),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:o,storageArea:window.localStorage}))}get(e){var r,o;if(!this.isAuthenticated())return(o=JSON.parse((r=window.localStorage.getItem(e))!==null&&r!==void 0?r:"null"))!==null&&o!==void 0?o:void 0}addStoreListener(e,r){let o=n=>{n.key===e()&&!this.isAuthenticated()&&r()};this.storeListeners.push(o),window.addEventListener("storage",o)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=I.getState().session;return!!e?.sessionAuthenticated}};var Lu=_`
|
|
653
|
-
`;function ku(t,e){let{authenticationRequired:r,session:o}=I.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Hi=class extends io{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Ws=class t extends Ho{static build(e){return new t(I,e)}constructor(e,r){super(),this.store=e,this.cache=new gt,this.withManualResources=!0,this.userLocaleService=new Hi,this.cleanSessionDebouncer=new ne,this.reloadDebouncer=new ne(500),this.apiProvider=r??(()=>xr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Pt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>ku(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(
|
|
653
|
+
`;function ku(t,e){let{authenticationRequired:r,session:o}=I.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Hi=class extends io{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Ws=class t extends Ho{static build(e){return new t(I,e)}constructor(e,r){super(),this.store=e,this.cache=new gt,this.withManualResources=!0,this.userLocaleService=new Hi,this.cleanSessionDebouncer=new ne,this.reloadDebouncer=new ne(500),this.apiProvider=r??(()=>xr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Pt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>ku(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Go(o)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},Pu=Ws.build();var Er=class extends Event{constructor(e,r,o,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=o,this.subscribe=n??!1}};var Ko=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:o}=r;for(let{elementRef:n,callbackRef:a}of o){let s=n.deref(),l=a.deref();s===void 0||l===void 0||s.dispatchEvent(new Er(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],o=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let a=n.callbacks.get(r);a===void 0&&n.callbacks.set(r,a=new WeakSet),a.has(o)||(a.add(o),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(o)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var Te=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ce=class extends lt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Pu,this.contextRoot=new Ko}render(){return w`
|
|
654
654
|
<slot></slot>
|
|
655
655
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>ao.addContext(o)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};ce.elementDefinitions={};ce.styles=Lu;Te([g()],ce.prototype,"baseUrl",void 0);Te([g()],ce.prototype,"tenantId",void 0);Te([g()],ce.prototype,"apiIntegrationIdentifier",void 0);Te([g()],ce.prototype,"apiIntegrationAppVersion",void 0);Te([g()],ce.prototype,"uiLocale",void 0);Te([We(null)],ce.prototype,"availableUiLocales",void 0);Te([We(null)],ce.prototype,"metadataConfiguration",void 0);Te([g({type:Boolean})],ce.prototype,"editorMode",void 0);Te([g({type:Boolean})],ce.prototype,"noCustom",void 0);Te([g({type:Boolean})],ce.prototype,"openExternalDocumentInNewTab",void 0);Te([g({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ce.prototype,"noCustomComponent",void 0);Te([g({type:Boolean})],ce.prototype,"withManualResources",void 0);Te([g({type:Boolean})],ce.prototype,"navigatorOnline",void 0);Te([g({type:Boolean})],ce.prototype,"forcedOffline",void 0);Te([g({type:Boolean})],ce.prototype,"authenticationRequired",void 0);Te([We([])],ce.prototype,"messageContexts",void 0);Te([We(void 0)],ce.prototype,"session",void 0);var Nu={"ft-app-context":ce};X(Nu);var Vs=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},lo=new Vs;var im=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},qo=Symbol("i18nAttributes"),Du=Symbol("i18nListAttributes"),Yo=Symbol("i18nProperties"),zi=Symbol("i18nContexts"),Zo=Symbol("i18nUnsubs"),jt=pe(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Fi:ao}i18n(a){let{context:s,key:l,message:d}=a,{custom:p,args:h,argsProvider:f}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let m=h??(f?f(this):[]);return this.getI18nService(p).resolveMessage(s,l,...m)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(lo.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(h,f,m)=>m?.context&&m.key&&a(h,f,m)?{...m,message:this.i18n({context:m.context,key:m.key,custom:m.custom,...h})}:m;(s=this[qo])===null||s===void 0||s.forEach((h,f)=>d[f]=p(h,f,d[f])),(l=this[Du])===null||l===void 0||l.forEach((h,f)=>{var m;return d[f]=(m=d[f])===null||m===void 0?void 0:m.map(y=>p(h,f,y))})}updateI18nProperties(a){var s;(s=this[Yo])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[zi].set(d,{isCustomContext:l}),this[Zo].has(d)||this[Zo].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[zi].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zi].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Zo].forEach(a=>a()),this[Zo].clear()}}return e=zi,r=Zo,im([g({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Wi=class extends jt(W){},Vi=class extends jt(lt){};var Gs=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?lo.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},nm=new Gs;var Mu=(t,e)=>(r,o)=>{var n;r.constructor.createProperty(o,{type:Object,hasChanged:wt,converter:lo,...e}),r[qo]=(n=r[qo])!==null&&n!==void 0?n:new Map,r[qo].set(o,t??{})};var Kt=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?Fi:ao}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,n)=>{let a=n;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...a)=>this.service.resolveMessage(this.name,n,...a)}),this.rawMessages=new Proxy({},{get:(o,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(o,n)=>()=>n}),this.attributes=new Proxy({},{get:(o,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Gi=(t,e)=>(r,o)=>{var n,a;r.constructor.createProperty(o,e??{attribute:!1,type:String});let s={...t,key:(n=t.key)!==null&&n!==void 0?n:o};r[Yo]=(a=r[Yo])!==null&&a!==void 0?a:new Map,r[Yo].set(o,s)};var $u=_`
|
|
656
656
|
`;var Xo=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},ut=class extends Vi{constructor(){super(),this.editorMode=!1,this.addStore(I)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":N:w`
|
|
@@ -796,7 +796,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
796
796
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
797
797
|
></slot>
|
|
798
798
|
</div>
|
|
799
|
-
`}onKeyDown(e){let r;(e.key=="ArrowDown"||e.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(e.key=="ArrowUp"||e.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),e.
|
|
799
|
+
`}onKeyDown(e){let r;(e.key=="ArrowDown"||e.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(e.key=="ArrowUp"||e.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),e.key==" "&&(r=this.options.indexOf(e.target)),r!=null&&(e.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(e){return e<0?this.options.length-1:e>this.options.length-1?0:e}onSlotchange(){var e;this.options=[],(e=this.slottedContent)===null||e===void 0||e.assignedElements().forEach(r=>{r instanceof ge&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(e){var r;(r=e.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(o=>{o.setAttribute("tabindex","-1")}),e.setAttribute("tabindex","0"),e.unselectable=this.unselectable,this.options.push(e)}onOptionChangeByScript(e){e.stopPropagation();let r=e.target;this.onOptionChange(r)}onOptionChangeByUser(e){var r;e.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(e.target),this.dispatchEvent(new Zs((r=this.selectedOption)===null||r===void 0?void 0:r.value))}onOptionChange(e){e.selected?this.selectedOption=e:this.selectedOption=this.options.find(r=>r.selected)}private(e){e.selected?this.selectedOption=e:this.selectedOption=this.options.find(r=>r.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(e=>{e.selected=e===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(e.isFocused=e===this.selectedOption)})}};$e.elementDefinitions={};$e.styles=_`
|
|
800
800
|
:host {
|
|
801
801
|
display: inline-block;
|
|
802
802
|
}
|
|
@@ -1086,7 +1086,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
1086
1086
|
@keydown=${this.initKeydownPress}>
|
|
1087
1087
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon} focusable="false" aria-hidden="true"></ft-icon>
|
|
1088
1088
|
</div>
|
|
1089
|
-
`}initDragFromMouse(e){e.detail>0&&this.initDrag(e.clientX,e.clientY)}initDragFromTouch(e){e.preventDefault(),e.stopPropagation(),this.initDrag(e.touches[0].clientX,e.touches[0].clientY)}initKeydownPress(e){let r=e.key;["Enter","
|
|
1089
|
+
`}initDragFromMouse(e){e.detail>0&&this.initDrag(e.clientX,e.clientY)}initDragFromTouch(e){e.preventDefault(),e.stopPropagation(),this.initDrag(e.touches[0].clientX,e.touches[0].clientY)}initKeydownPress(e){let r=e.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(e.preventDefault(),e.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=e.currentTarget;r==="Enter"||r===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new ji(this.fixedWidth,this.fixedHeight)))}initDrag(e,r){this.dragging=!0,this.startX=e,this.startY=r,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(e,r){let o=this.fixedWidth+e-this.startX,n=this.fixedHeight+r-this.startY;this.dispatchEvent(new ji(o,n))}};we.elementDefinitions={"ft-icon":me};we.styles=[ur,ju];Et([g({type:Number})],we.prototype,"initialWidth",void 0);Et([g({type:Number})],we.prototype,"initialHeight",void 0);Et([g()],we.prototype,"icon",void 0);Et([g()],we.prototype,"iconVariant",void 0);Et([g()],we.prototype,"cursor",void 0);Et([g()],we.prototype,"ariaLabel",void 0);Et([D()],we.prototype,"dragging",void 0);Et([D()],we.prototype,"isAriaPressed",void 0);Et([li({passive:!0})],we.prototype,"initDragFromMouse",null);Et([li({passive:!0})],we.prototype,"initDragFromTouch",null);var Ku={"ft-resizer":we};X(Ku);var Zu=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},wr=class extends W{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return w`
|
|
1090
1090
|
<div class="${Oe(this.inputLabelClasses)}">
|
|
1091
1091
|
${_i(this.text,()=>w`
|
|
1092
1092
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1519,7 +1519,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
1519
1519
|
<ft-switch unselectable
|
|
1520
1520
|
@change=${a=>this.rate(a.detail)}
|
|
1521
1521
|
part="rating rating-like"
|
|
1522
|
-
label
|
|
1522
|
+
label="${this.i18n(this.i18nProperties.ratingSectionTitle)}">
|
|
1523
1523
|
<ft-switch-option .value=${1}
|
|
1524
1524
|
?selected=${r}
|
|
1525
1525
|
.iconVariant=${this.iconVariant}
|
|
@@ -1564,23 +1564,23 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
1564
1564
|
<ft-button outlined
|
|
1565
1565
|
type="button" name="more-options"
|
|
1566
1566
|
class="ft-reader-feedback--more-options"
|
|
1567
|
-
@click
|
|
1567
|
+
@click=${this.onOpenMoreDetails}
|
|
1568
1568
|
part="more-options">
|
|
1569
1569
|
${Y.messages.moreOptionsButton()}
|
|
1570
1570
|
</ft-button>
|
|
1571
1571
|
`:N;return w`
|
|
1572
1572
|
<form class="ft-reader-feedback--feedback" part="feedback-container" autocomplete="on"
|
|
1573
|
-
@submit
|
|
1573
|
+
@submit=${p=>this.onFormSubmitEvent(p,!!s)}>
|
|
1574
1574
|
<ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
|
|
1575
1575
|
${this.i18n(this.i18nProperties.feedbackSectionTitle)}
|
|
1576
1576
|
</ft-typography>
|
|
1577
1577
|
${((n=(o=this.session)===null||o===void 0?void 0:o.profile)===null||n===void 0?void 0:n.userId)==null&&(!((a=this.configuration)===null||a===void 0)&&a.mailsSentByFluidTopicsForUnauthenticatedUsers)?w`
|
|
1578
1578
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
1579
1579
|
class="ft-reader-feedback--from-input"
|
|
1580
|
-
label
|
|
1580
|
+
label="${Y.messages.feedbackfromEmail()}"
|
|
1581
1581
|
@change=${p=>this.from=p.detail.trim()}
|
|
1582
1582
|
?error=${this.from&&!this.validFromEmail()}
|
|
1583
|
-
helper
|
|
1583
|
+
helper="${this.from&&!this.validFromEmail()?Y.messages.feedbackfromEmailInvalid():""}"
|
|
1584
1584
|
/>
|
|
1585
1585
|
`:N}
|
|
1586
1586
|
<ft-text-area outlined
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, setVariable, } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
import { FtButtonCssVariables } from "@fluid-topics/ft-button/build/ft-button.styles";
|
|
4
4
|
import { FtSwitchCssVariables } from "@fluid-topics/ft-switch/build/ft-switch.styles";
|
|
5
|
-
import { FtTypographyTitleCssVariables, FtTypographyTitleDenseCssVariables } from "@fluid-topics/ft-typography/build/ft-typography.styles";
|
|
5
|
+
import { FtTypographyTitleCssVariables, FtTypographyTitleDenseCssVariables, } from "@fluid-topics/ft-typography/build/ft-typography.styles";
|
|
6
6
|
export const FtReaderFeedbackCssVariables = {
|
|
7
7
|
feedbackInputMinWidth: FtCssVariableFactory.create("--ft-reader-feedback-input-min-width", "", "SIZE", "300px"),
|
|
8
8
|
ratedDateColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I18nMessageContext } from "@fluid-topics/ft-i18n";
|
|
1
|
+
import { I18nMessageContext, } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export const designer = I18nMessageContext.build("inDesignerFeedbackComponent");
|
|
3
3
|
export const defaultDesignerMessages = {
|
|
4
|
-
feedbackAndRatingDisabledInEditor: "Feedback and ratings performed here are not taken into account."
|
|
4
|
+
feedbackAndRatingDisabledInEditor: "Feedback and ratings performed here are not taken into account.",
|
|
5
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { I18nMessageContext } from "@fluid-topics/ft-i18n";
|
|
1
|
+
import { I18nMessageContext, } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export const server = I18nMessageContext.fromGwt("server");
|
package/build/utils/events.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class SendFeedbackEvent extends CustomEvent {
|
|
2
2
|
constructor(detail) {
|
|
3
3
|
super("send-feedback", {
|
|
4
|
-
detail
|
|
4
|
+
detail,
|
|
5
5
|
});
|
|
6
6
|
}
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ export class OpenTopicFeedbackDrawerEvent extends CustomEvent {
|
|
|
10
10
|
super("ft-reader-topic-feedback", {
|
|
11
11
|
composed: true,
|
|
12
12
|
bubbles: true,
|
|
13
|
-
detail
|
|
13
|
+
detail,
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ export class OpenMapFeedbackDrawerEvent extends CustomEvent {
|
|
|
19
19
|
super("ft-reader-feedback", {
|
|
20
20
|
composed: true,
|
|
21
21
|
bubbles: true,
|
|
22
|
-
detail
|
|
22
|
+
detail,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -28,7 +28,7 @@ export class SendMailerTopicFeedbackEvent extends CustomEvent {
|
|
|
28
28
|
super("ft-reader-mailer-topic-feedback", {
|
|
29
29
|
composed: true,
|
|
30
30
|
bubbles: true,
|
|
31
|
-
detail: { topic }
|
|
31
|
+
detail: { topic },
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -36,7 +36,7 @@ export class SendMailerMapFeedbackEvent extends CustomEvent {
|
|
|
36
36
|
constructor() {
|
|
37
37
|
super("ft-reader-mailer-map-feedback", {
|
|
38
38
|
composed: true,
|
|
39
|
-
bubbles: true
|
|
39
|
+
bubbles: true,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
package/build/utils/mail.js
CHANGED
|
@@ -14,15 +14,15 @@ export class FeedbackMailLinkBuilder {
|
|
|
14
14
|
this.configuration = configuration;
|
|
15
15
|
this.isAuthenticated = isAuthenticated;
|
|
16
16
|
this.subjectMetadata = this.filterMetadata(metadata, configuration.subjectMetadataIds)
|
|
17
|
-
.map(m => "[" + m.values[m.values.length - 1] + "]")
|
|
17
|
+
.map((m) => "[" + m.values[m.values.length - 1] + "]")
|
|
18
18
|
.join("");
|
|
19
19
|
this.bodyMetadata = this.filterMetadata(metadata, (_a = configuration.bodyMetadataIds) !== null && _a !== void 0 ? _a : [])
|
|
20
|
-
.map(m => "[" + m.values.join(", ") + "]")
|
|
20
|
+
.map((m) => "[" + m.values.join(", ") + "]")
|
|
21
21
|
.join(" ");
|
|
22
22
|
}
|
|
23
23
|
filterMetadata(metadata, metadataIds) {
|
|
24
|
-
return metadataIds.map(key => metadata.find(m => m.key === key))
|
|
25
|
-
.filter(m => m != null && m.values.length > 0);
|
|
24
|
+
return metadataIds.map((key) => metadata.find((m) => m.key === key))
|
|
25
|
+
.filter((m) => m != null && m.values.length > 0);
|
|
26
26
|
}
|
|
27
27
|
shouldUseMailer() {
|
|
28
28
|
var _a, _b;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.20",
|
|
4
4
|
"description": "Feedback forms for a map and its topics in an integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "2.1.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "2.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.1.20",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "2.1.20",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.1.20",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@fluid-topics/public-api": "1.0.
|
|
28
|
+
"@fluid-topics/public-api": "1.0.136"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "77e9f03085f977dde887e175b964bf66b862253f"
|
|
31
31
|
}
|