@fluid-topics/ftds-combobox 2.1.19 → 2.1.21
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.
|
@@ -8,7 +8,7 @@ import { html, } from "lit";
|
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
10
|
import { numberProperty, processValidationRules, screenReaderStyles, } from "@fluid-topics/ft-wc-utils";
|
|
11
|
-
import { FtdsIcon, FtdsIcons } from "@fluid-topics/ftds-icon";
|
|
11
|
+
import { FtdsIcon, FtdsIcons, } from "@fluid-topics/ftds-icon";
|
|
12
12
|
import { ListboxItemType, } from "./ftds-base-combobox.properties";
|
|
13
13
|
import { FtdsComboboxMultiValueChangeEvent, } from "./ftds-combobox-multi-value.properties";
|
|
14
14
|
import { comboboxMultiValueStyles } from "./ftds-combobox-multi-value.styles";
|
|
@@ -2021,7 +2021,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
2021
2021
|
word-break: break-word;
|
|
2022
2022
|
}
|
|
2023
2023
|
`;var Q1=["top","right","bottom","left"],X1=["start","end"],Li=Q1.reduce((t,e)=>t.concat(e,e+"-"+X1[0],e+"-"+X1[1]),[]),Uo=Math.min,Gt=Math.max,Bo=Math.round;var mt=t=>({x:t,y:t}),b3={left:"right",right:"left",bottom:"top",top:"bottom"};function J1(t,e,r){return Gt(t,Uo(e,r))}function Pn(t,e){return typeof t=="function"?t(e):t}function Fo(t){return t.split("-")[0]}function Wt(t){return t.split("-")[1]}function Ei(t){return t==="x"?"y":"x"}function Ai(t){return t==="y"?"height":"width"}function $n(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Oi(t){return Ei($n(t))}function e2(t,e,r){r===void 0&&(r=!1);let n=Wt(t),a=Oi(t),i=Ai(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Ci(s)),[s,Ci(s)]}function t2(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Ci(t){let e=Fo(t);return b3[e]+t.slice(e.length)}function v3(t){var e,r,n,a;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(a=t.left)!=null?a:0}}function r2(t){return typeof t!="number"?v3(t):{top:t,right:t,bottom:t,left:t}}function fr(t){let{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function o2(t,e,r){let{reference:n,floating:a}=t,i=$n(e),s=Oi(e),l=Ai(s),u=Fo(e),h=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,x;switch(u){case"top":x={x:m,y:n.y-a.height};break;case"bottom":x={x:m,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:g};break;case"left":x={x:n.x-a.width,y:g};break;default:x={x:n.x,y:n.y}}let S=Wt(e);return S&&(x[s]+=y*(S==="end"?1:-1)*(r&&h?-1:1)),x}async function n2(t,e){var r;e===void 0&&(e={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:x=0}=Pn(e,t),S=r2(x),O=l[y?g==="floating"?"reference":"floating":g],w=fr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(O)))==null||r?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:u})),I=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),$=await(i.isElement==null?void 0:i.isElement(k))&&await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1},V=fr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:k,strategy:u}):I);return{top:(w.top-V.top+S.top)/$.y,bottom:(V.bottom-w.bottom+S.bottom)/$.y,left:(w.left-V.left+S.left)/$.x,right:(V.right-w.right+S.right)/$.x}}var x3=50,a2=async(t,e,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:n2},u=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:g}=o2(h,n,u),y=n,x=0,S={};for(let C=0;C<i.length;C++){let O=i[C];if(!O)continue;let{name:w,fn:I}=O,{x:k,y:$,data:V,reset:J}=await I({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:S,rects:h,platform:l,elements:{reference:t,floating:e}});m=k??m,g=$??g,S[w]={...S[w],...V},J&&x<x3&&(x++,typeof J=="object"&&(J.placement&&(y=J.placement),J.rects&&(h=J.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):J.rects),{x:m,y:g}=o2(h,y,u)),C=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:S}};function S3(t,e,r){return(t?[...r.filter(a=>Wt(a)===t),...r.filter(a=>Wt(a)!==t)]:r.filter(a=>Fo(a)===a)).filter(a=>t?Wt(a)===t||(e?t2(a)!==a:!1):!0)}var i2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:h}=e,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Li,autoAlignment:x=!0,...S}=Pn(t,e),C=g!==void 0||y===Li?S3(g||null,x,y):y,O=((r=s.autoPlacement)==null?void 0:r.index)||0,w=C[O];if(w==null)return{};if(l!==w)return{reset:{placement:C[0]}};let I=await u.detectOverflow(e,S),k=e2(w,i,await(u.isRTL==null?void 0:u.isRTL(h.floating))),$=[I[Fo(w)],I[k[0]],I[k[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:$}],J=C[O+1];if(J)return{data:{index:O+1,overflows:V},reset:{placement:J}};let ft=V.map(Pe=>{let Ge=Wt(Pe.placement);return[Pe.placement,Ge&&m?Pe.overflows.slice(0,2).reduce(($e,or)=>$e+or,0):Pe.overflows[0],Pe.overflows]}).sort((Pe,Ge)=>Pe[1]-Ge[1]),pt=((a=ft.filter(Pe=>Pe[2].slice(0,Wt(Pe[0])?2:3).every(Ge=>Ge<=0))[0])==null?void 0:a[0])||ft[0][0];return pt!==l?{data:{index:O+1,overflows:V},reset:{placement:pt}}:{}}}};var s2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:I=>{let{x:k,y:$}=I;return{x:k,y:$}}},...h}=Pn(t,e),m={x:r,y:n},g=await i.detectOverflow(e,h),y=$n(a),x=Ei(y),S=m[x],C=m[y],O=(I,k)=>J1(k+g[I==="y"?"top":"left"],k,k-g[I==="y"?"bottom":"right"]);s&&(S=O(x,S)),l&&(C=O(y,C));let w=u.fn({...e,[x]:S,[y]:C});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[x]:s,[y]:l}}}}}};function Un(){return typeof window<"u"}function hr(t){return l2(t)?(t.nodeName||"").toLowerCase():"#document"}function _e(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function wt(t){var e;return(e=(l2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function l2(t){return Un()?t instanceof Node||t instanceof _e(t).Node:!1}function at(t){return Un()?t instanceof Element||t instanceof _e(t).Element:!1}function Rt(t){return Un()?t instanceof HTMLElement||t instanceof _e(t).HTMLElement:!1}function c2(t){return!Un()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _e(t).ShadowRoot}function Ho(t){let{overflow:e,overflowX:r,overflowY:n,display:a}=it(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&a!=="inline"&&a!=="contents"}function d2(t){return/^(table|td|th)$/.test(hr(t))}function Go(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var C3=/transform|translate|scale|rotate|perspective|filter/,L3=/paint|layout|strict|content/,pr=t=>!!t&&t!=="none",wi;function Qr(t){let e=at(t)?it(t):t;return pr(e.transform)||pr(e.translate)||pr(e.scale)||pr(e.rotate)||pr(e.perspective)||!Bn()&&(pr(e.backdropFilter)||pr(e.filter))||C3.test(e.willChange||"")||L3.test(e.contain||"")}function u2(t){let e=Vt(t);for(;Rt(e)&&!Jr(e);){if(Qr(e))return e;if(Go(e))return null;e=Vt(e)}return null}function Bn(){return wi==null&&(wi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wi}function Jr(t){return/^(html|body|#document)$/.test(hr(t))}function it(t){return _e(t).getComputedStyle(t)}function Wo(t){return at(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Vt(t){if(hr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||c2(t)&&t.host||wt(t);return c2(e)?e.host:e}function f2(t){let e=Vt(t);return Jr(e)?(t.ownerDocument||t).body:Rt(e)&&Ho(e)?e:f2(e)}function Dn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=f2(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=_e(a);if(i){let l=Fn(s);return e.concat(s,s.visualViewport||[],Ho(a)?a:[],l&&r?Dn(l):[])}else return e.concat(a,Dn(a,[],r))}function Fn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function m2(t){let e=it(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,a=Rt(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:n,l=Bo(r)!==i||Bo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function g2(t){return at(t)?t:t.contextElement}function eo(t){let e=g2(t);if(!Rt(e))return mt(1);let r=e.getBoundingClientRect(),{width:n,height:a,$:i}=m2(e),s=(i?Bo(r.width):r.width)/n,l=(i?Bo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var E3=mt(0);function y2(t){let e=_e(t);return!Bn()||!e.visualViewport?E3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function A3(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===_e(t)}function Vo(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=g2(t),s=mt(1);e&&(n?at(n)&&(s=eo(n)):s=eo(t));let l=A3(i,r,n)?y2(i):mt(0),u=(a.left+l.x)/s.x,h=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i&&n){let y=_e(i),x=at(n)?_e(n):n,S=y,C=Fn(S);for(;C&&x!==S;){let O=eo(C),w=C.getBoundingClientRect(),I=it(C),k=w.left+(C.clientLeft+parseFloat(I.paddingLeft))*O.x,$=w.top+(C.clientTop+parseFloat(I.paddingTop))*O.y;u*=O.x,h*=O.y,m*=O.x,g*=O.y,u+=k,h+=$,S=_e(C),C=Fn(S)}}return fr({width:m,height:g,x:u,y:h})}function Hn(t,e){let r=Wo(t).scrollLeft;return e?e.left+r:Vo(wt(t)).left+r}function b2(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Hn(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function O3(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t,i=a==="fixed",s=wt(n),l=e?Go(e.floating):!1;if(n===s||l&&i)return r;let u={scrollLeft:0,scrollTop:0},h=mt(1),m=mt(0),g=Rt(n);if((g||!i)&&((hr(n)!=="body"||Ho(s))&&(u=Wo(n)),g)){let x=Vo(n);h=eo(n),m.x=x.x+n.clientLeft,m.y=x.y+n.clientTop}let y=s&&!g&&!i?b2(s,u):mt(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-u.scrollLeft*h.x+m.x+y.x,y:r.y*h.y-u.scrollTop*h.y+m.y+y.y}}function w3(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function R3(t){let e=Wo(t),r=t.ownerDocument.body,n=Gt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Gt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-e.scrollLeft+Hn(t),s=-e.scrollTop;return it(r).direction==="rtl"&&(i+=Gt(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:i,y:s}}var z3=25;function I3(t,e,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",a=_e(t),i=wt(t),s=a.visualViewport,l=i.clientWidth,u=i.clientHeight,h=0,m=0;if(s){let y=!Bn()||e==="fixed";n?y||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,u=s.height,y&&(h=s.offsetLeft,m=s.offsetTop))}if(Hn(i)<=0){let y=i.ownerDocument,x=y.body,S=getComputedStyle(x),C=y.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-C),w=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;w<=z3&&(l-=w)}return{width:l,height:u,x:h,y:m}}function N3(t,e){let r=Vo(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=eo(t),s=t.clientWidth*i.x,l=t.clientHeight*i.y,u=a*i.x,h=n*i.y;return{width:s,height:l,x:u,y:h}}function p2(t,e,r){let n;if(e==="viewport"||e==="layoutViewport")n=I3(t,r,e);else if(e==="document")n=R3(wt(t));else if(at(e))n=N3(e,r);else{let a=y2(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return fr(n)}function _3(t,e){let r=e.get(t);if(r)return r;let n=Dn(t,[],!1).filter(l=>at(l)&&hr(l)!=="body"),a=null,i=it(t).position==="fixed",s=i?Vt(t):t;for(;at(s)&&!Jr(s);){let l=it(s),u=Qr(s),h=a?a.position:i?"fixed":"";!u&&(h==="fixed"||h==="absolute"&&l.position==="static")?n=n.filter(g=>g!==s):a=l,s=Vt(s)}return e.set(t,n),n}function M3(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t,s=[...r==="clippingAncestors"?Go(e)?[]:_3(e,this._c):[].concat(r),n],l=p2(e,s[0],a),u=l.top,h=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let x=p2(e,s[y],a);u=Gt(x.top,u),h=Uo(x.right,h),m=Uo(x.bottom,m),g=Gt(x.left,g)}return{width:h-g,height:m-u,x:g,y:u}}function k3(t){let{width:e,height:r}=m2(t);return{width:e,height:r}}function T3(t,e,r){let n=Rt(e),a=wt(e),i=r==="fixed",s=Vo(t,!0,i,e),l={scrollLeft:0,scrollTop:0},u=mt(0);if((n||!i)&&((hr(e)!=="body"||Ho(a))&&(l=Wo(e)),n)){let y=Vo(e,!0,i,e);u.x=y.x+e.clientLeft,u.y=y.y+e.clientTop}!n&&a&&(u.x=Hn(a));let h=a&&!n&&!i?b2(a,l):mt(0),m=s.left+l.scrollLeft-u.x-h.x,g=s.top+l.scrollTop-u.y-h.y;return{x:m,y:g,width:s.width,height:s.height}}function Ri(t){return it(t).position==="static"}function h2(t,e){if(!Rt(t)||it(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return wt(t)===r&&(r=r.ownerDocument.body),r}function v2(t,e){let r=_e(t);if(Go(t))return r;if(!Rt(t)){let a=Vt(t);for(;a&&!Jr(a);){if(at(a)&&!Ri(a))return a;a=Vt(a)}return r}let n=h2(t,e);for(;n&&d2(n)&&Ri(n);)n=h2(n,e);return n&&Jr(n)&&Ri(n)&&!Qr(n)?r:n||u2(t)||r}var P3=async function(t){let e=this.getOffsetParent||v2,r=this.getDimensions,n=await r(t.floating);return{reference:T3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $3(t){return it(t).direction==="rtl"}var Gn={convertOffsetParentRelativeRectToViewportRelativeRect:O3,getDocumentElement:wt,getClippingRect:M3,getOffsetParent:v2,getElementRects:P3,getClientRects:w3,getDimensions:k3,getScale:eo,isElement:at,isRTL:$3};var x2=i2,S2=s2;var C2=(t,e,r)=>{let n=new Map,a=r??{},i={...Gn,...a.platform,_c:n};return a2(t,e,{...a,platform:i})};function L2(t){return D3(t)}function zi(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function D3(t){for(let e=t;e;e=zi(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=zi(t);e;e=zi(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Qr(r)||e.tagName==="BODY"))return e}return null}async function E2(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},C2(t,e,{strategy:n.strategy,platform:{...Gn,getOffsetParent:a=>Gn.getOffsetParent(a,L2)},middleware:[S2({crossAxis:!0}),x2({allowedPlacements:[n.placement]})]})}var ho=v(N());var ts=v(ee());var A2=v(ee(),1);var Ii=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function O2(t,e){return(0,A2.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return jo(t);try{return JSON.parse(r)}catch{return jo(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ko,...e??{}})}function U3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Wn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Wn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(t);if(r=i.length,r!==a(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!Wn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Wn(t,e){try{return U3(t,e)}catch{return!1}}function Ko(t,e){return!Wn(t,e)}function jo(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Vn(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let a=e(n);return a[t]=!0,a}}var w2=v(ee(),1);var Ni=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:Ko,attribute:!1,...e};(0,w2.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(l=>l[n]),store:e.store})}};var jn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var mr=v(ee(),1);var Kn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var z2=v(B(),1);var qn=globalThis,B3=qn.ShadowRoot&&(qn.ShadyCSS===void 0||qn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var R2=(t,e)=>{if(B3)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),a=qn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,t.appendChild(n)}};var Zn=class extends z2.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return R2(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){Ii(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function I2(t,e,...r){var n;let a=t.querySelector(e);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var ro=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},k2,N2=Symbol("constructorPrototype"),_2=Symbol("constructorName"),T2=Symbol("exportpartsDebouncer"),M2=Symbol("dynamicDependenciesLoaded"),to=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};to.eventName="exportparts-updated";var gt=class extends Zn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[k2]=new Kn(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[T2].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[_2]=this.constructor.name,this[N2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[_2]&&Object.setPrototypeOf(this,this[N2])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[M2]||(r[M2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(to.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(to.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new to)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=I2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,a;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(e){var r,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,h=e.filter(u).map(y=>y.trim());if(h.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],C=[...x,...S].filter(u).map(O=>O.trim());for(let O of C)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>h.map(x=>`${y}:${x}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};k2=T2;ro([(0,mr.property)()],gt.prototype,"exportpartsPrefix",void 0);ro([O2([])],gt.prototype,"exportpartsPrefixes",void 0);ro([(0,mr.property)({reflect:!0})],gt.prototype,"exportparts",void 0);ro([(0,mr.property)()],gt.prototype,"customStylesheet",void 0);ro([(0,mr.property)()],gt.prototype,"elementToFocus",void 0);ro([(0,mr.state)()],gt.prototype,"useAdoptedStyleSheets",void 0);function Yn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var qo=Symbol("internalReduxEventsUnsubscribers"),jt=Symbol("internalStoresUnsubscribers"),gr=Symbol("internalStores"),F3=Vn(Symbol("withRedux"),function(t){var e,r,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[gr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[gr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[gr].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[gr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[gr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[gr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let h=this.getStore(s.store);h&&(s.store?this[jt].has(s.store):this[jt].size>0)&&(this[l]=s.selector(h.getState(),this))}})}subscribeToStore(s,l){var u;this[jt].set(s,l.subscribe(()=>this.updateFromStores())),this[qo].set(s,[]),Yn(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((h,m)=>{if(typeof this[m]=="function"&&(!h.store||l.name===h.store)){let g=y=>this[m](y);l.addEventListener(h.eventName,g),this[qo].get(s).push(()=>l.removeEventListener(h.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[jt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[jt].has(s)&&this[jt].get(s)(),this[jt].delete(s),(l=this[qo].get(s))===null||l===void 0||l.forEach(u=>u()),this[qo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=jt,r=gr,n=qo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),P2=class extends F3(gt){};function je(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function zt(t){return!!t&&!!t[re]}function st(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Z3})(t)||Array.isArray(t)||!!t[G2]||!!(!((e=t.constructor)===null||e===void 0)&&e[G2])||Bi(t)||Fi(t))}function yr(t,e,r){r===void 0&&(r=!1),ao(t)===0?(r?Object.keys:no)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function ao(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Bi(t)?2:Fi(t)?3:0}function oo(t,e){return ao(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function H3(t,e){return ao(t)===2?t.get(e):t[e]}function W2(t,e,r){var n=ao(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function V2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Bi(t){return K3&&t instanceof Map}function Fi(t){return q3&&t instanceof Set}function Kt(t){return t.o||t.t}function Hi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=q2(t);delete e[re];for(var r=no(e),n=0;n<r.length;n++){var a=r[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Gi(t,e){return e===void 0&&(e=!1),Wi(t)||zt(t)||!st(t)||(ao(t)>1&&(t.set=t.add=t.clear=t.delete=G3),Object.freeze(t),e&&yr(t,(function(r,n){return Gi(n,!0)}),!0)),t}function G3(){je(2)}function Wi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function yt(t){var e=Ui[t];return e||je(18,t),e}function W3(t,e){Ui[t]||(Ui[t]=e)}function Pi(){return Yo}function _i(t,e){e&&(yt("Patches"),t.u=[],t.s=[],t.v=e)}function Xn(t){$i(t),t.p.forEach(V3),t.p=null}function $i(t){t===Yo&&(Yo=t.l)}function $2(t){return Yo={p:[],l:Yo,h:t,m:!0,_:0}}function V3(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Mi(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||yt("ES5").S(e,t,n),n?(r[re].P&&(Xn(e),je(4)),st(t)&&(t=Qn(e,t),e.l||Jn(e,t)),e.u&&yt("Patches").M(r[re].t,t,e.u,e.s)):t=Qn(e,r,[]),Xn(e),e.u&&e.v(e.u,e.s),t!==K2?t:void 0}function Qn(t,e,r){if(Wi(e))return e;var n=e[re];if(!n)return yr(e,(function(l,u){return D2(t,n,e,l,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return Jn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Hi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),yr(i,(function(l,u){return D2(t,n,a,l,u,r,s)})),Jn(t,a,!1),r&&t.u&&yt("Patches").N(n,r,t.u,t.s)}return n.o}function D2(t,e,r,n,a,i,s){if(zt(a)){var l=Qn(t,a,i&&e&&e.i!==3&&!oo(e.R,n)?i.concat(n):void 0);if(W2(r,n,l),!zt(l))return;t.m=!1}else s&&r.add(a);if(st(a)&&!Wi(a)){if(!t.h.D&&t._<1)return;Qn(t,a),e&&e.A.l||Jn(t,a)}}function Jn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Gi(e,r)}function ki(t,e){var r=t[re];return(r?Kt(r):t)[e]}function U2(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function qt(t){t.P||(t.P=!0,t.l&&qt(t.l))}function Ti(t){t.o||(t.o=Hi(t.t))}function Di(t,e,r){var n=Bi(e)?yt("MapSet").F(e,r):Fi(e)?yt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Pi(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,h=Xo;s&&(u=[l],h=Zo);var m=Proxy.revocable(u,h),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(e,r):yt("ES5").J(e,r);return(r?r.A:Pi()).p.push(n),n}function j3(t){return zt(t)||je(22,t),(function e(r){if(!st(r))return r;var n,a=r[re],i=ao(r);if(a){if(!a.P&&(a.i<4||!yt("ES5").K(a)))return a.t;a.I=!0,n=B2(r,i),a.I=!1}else n=B2(r,i);return yr(n,(function(s,l){a&&H3(a.t,s)===l||W2(n,s,e(l))})),i===3?new Set(n):n})(t)}function B2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Hi(t)}function j2(){function t(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var h=this[re];return Xo.get(h,s)},set:function(h){var m=this[re];Xo.set(m,s,h)}},u}function e(s){for(var l=s.length-1;l>=0;l--){var u=s[l][re];if(!u.P)switch(u.i){case 5:n(u)&&qt(u);break;case 4:r(u)&&qt(u)}}}function r(s){for(var l=s.t,u=s.k,h=no(u),m=h.length-1;m>=0;m--){var g=h[m];if(g!==re){var y=l[g];if(y===void 0&&!oo(l,g))return!0;var x=u[g],S=x&&x[re];if(S?S.t!==y:!V2(x,y))return!0}}var C=!!l[re];return h.length!==no(l).length+(C?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var h=0;h<l.length;h++)if(!l.hasOwnProperty(h))return!0;return!1}function a(s){s.g&&je(3,JSON.stringify(Kt(s)))}var i={};W3("ES5",{J:function(s,l){var u=Array.isArray(s),h=(function(g,y){if(g){for(var x=Array(y.length),S=0;S<y.length;S++)Object.defineProperty(x,""+S,t(S,!0));return x}var C=q2(y);delete C[re];for(var O=no(C),w=0;w<O.length;w++){var I=O[w];C[I]=t(I,g||!!C[I].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(u,s),m={i:u?5:4,A:l?l.A:Pi(),P:!1,I:!1,R:{},l,t:s,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,re,{value:m,writable:!0}),h},S:function(s,l,u){u?zt(l)&&l[re].A===s&&e(s.p):(s.u&&(function h(m){if(m&&typeof m=="object"){var g=m[re];if(g){var y=g.t,x=g.k,S=g.R,C=g.i;if(C===4)yr(x,(function($){$!==re&&(y[$]!==void 0||oo(y,$)?S[$]||h(x[$]):(S[$]=!0,qt(g)))})),yr(y,(function($){x[$]!==void 0||oo(x,$)||(S[$]=!1,qt(g))}));else if(C===5){if(n(g)&&(qt(g),S.length=!0),x.length<y.length)for(var O=x.length;O<y.length;O++)S[O]=!1;else for(var w=y.length;w<x.length;w++)S[w]=!0;for(var I=Math.min(x.length,y.length),k=0;k<I;k++)x.hasOwnProperty(k)||(S[k]=!0),S[k]===void 0&&h(x[k])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var F2,Yo,Vi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",K3=typeof Map<"u",q3=typeof Set<"u",H2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",K2=Vi?Symbol.for("immer-nothing"):((F2={})["immer-nothing"]=!0,F2),G2=Vi?Symbol.for("immer-draftable"):"__$immer_draftable",re=Vi?Symbol.for("immer-state"):"__$immer_state";var Z3=""+Object.prototype.constructor,no=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,q2=Object.getOwnPropertyDescriptors||function(t){var e={};return no(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ui={},Xo={get:function(t,e){if(e===re)return t;var r=Kt(t);if(!oo(r,e))return(function(a,i,s){var l,u=U2(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(t,r,e);var n=r[e];return t.I||!st(n)?n:n===ki(t.t,e)?(Ti(t),t.o[e]=Di(t.A.h,n,t)):n},has:function(t,e){return e in Kt(t)},ownKeys:function(t){return Reflect.ownKeys(Kt(t))},set:function(t,e,r){var n=U2(Kt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=ki(Kt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(V2(r,a)&&(r!==void 0||oo(t.t,e)))return!0;Ti(t),qt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return ki(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ti(t),qt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Kt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){je(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){je(12)}},Zo={};yr(Xo,(function(t,e){Zo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Zo.deleteProperty=function(t,e){return Zo.set.call(this,t,e,void 0)},Zo.set=function(t,e,r){return Xo.set.call(this,t[0],e,r,t[0])};var Y3=(function(){function t(r){var n=this;this.O=H2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(C){var O=this;C===void 0&&(C=l);for(var w=arguments.length,I=Array(w>1?w-1:0),k=1;k<w;k++)I[k-1]=arguments[k];return u.produce(C,(function($){var V;return(V=i).call.apply(V,[O,$].concat(I))}))}}var h;if(typeof i!="function"&&je(6),s!==void 0&&typeof s!="function"&&je(7),st(a)){var m=$2(n),g=Di(n,a,void 0),y=!0;try{h=i(g),y=!1}finally{y?Xn(m):$i(m)}return typeof Promise<"u"&&h instanceof Promise?h.then((function(C){return _i(m,s),Mi(C,m)}),(function(C){throw Xn(m),C})):(_i(m,s),Mi(h,m))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===K2&&(h=void 0),n.D&&Gi(h,!0),s){var x=[],S=[];yt("Patches").M(a,h,x,S),s(x,S)}return h}je(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(h){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(h,(function(x){return a.apply(void 0,[x].concat(g))}))};var s,l,u=n.produce(a,i,(function(h,m){s=h,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(h){return[h,s,l]})):[u,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){st(r)||je(8),zt(r)&&(r=j3(r));var n=$2(this),a=Di(this,r,void 0);return a[re].C=!0,$i(n),a},e.finishDraft=function(r,n){var a=r&&r[re],i=a.A;return _i(i,n),Mi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!H2&&je(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=yt("Patches").$;return zt(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Be=new Y3,X3=Be.produce,jy=Be.produceWithPatches.bind(Be),Ky=Be.setAutoFreeze.bind(Be),qy=Be.setUseProxies.bind(Be),Zy=Be.applyPatches.bind(Be),Yy=Be.createDraft.bind(Be),Xy=Be.finishDraft.bind(Be),ea=X3;function br(t){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},br(t)}function Z2(t,e){if(br(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(br(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Y2(t){var e=Z2(t,"string");return br(e)=="symbol"?e:e+""}function X2(t,e,r){return(e=Y2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function ji(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Q2(Object(r),!0).forEach(function(n){X2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ee(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var J2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ki=function(){return Math.random().toString(36).substring(7).split("").join(".")},ta={INIT:"@@redux/INIT"+Ki(),REPLACE:"@@redux/REPLACE"+Ki(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ki()}};function Q3(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function qi(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ee(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ee(1));return r(qi)(t,e)}if(typeof t!="function")throw new Error(Ee(2));var a=t,i=e,s=[],l=s,u=!1;function h(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(Ee(3));return i}function g(C){if(typeof C!="function")throw new Error(Ee(4));if(u)throw new Error(Ee(5));var O=!0;return h(),l.push(C),function(){if(O){if(u)throw new Error(Ee(6));O=!1,h();var I=l.indexOf(C);l.splice(I,1),s=null}}}function y(C){if(!Q3(C))throw new Error(Ee(7));if(typeof C.type>"u")throw new Error(Ee(8));if(u)throw new Error(Ee(9));try{u=!0,i=a(i,C)}finally{u=!1}for(var O=s=l,w=0;w<O.length;w++){var I=O[w];I()}return C}function x(C){if(typeof C!="function")throw new Error(Ee(10));a=C,y({type:ta.REPLACE})}function S(){var C,O=g;return C={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Ee(11));function k(){I.next&&I.next(m())}k();var $=O(k);return{unsubscribe:$}}},C[J2]=function(){return this},C}return y({type:ta.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:x},n[J2]=S,n}function J3(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:ta.INIT});if(typeof n>"u")throw new Error(Ee(12));if(typeof r(void 0,{type:ta.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ee(13))})}function ed(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{J3(r)}catch(u){l=u}return function(h,m){if(h===void 0&&(h={}),l)throw l;if(0)var g;for(var y=!1,x={},S=0;S<i.length;S++){var C=i[S],O=r[C],w=h[C],I=O(w,m);if(typeof I>"u"){var k=m&&m.type;throw new Error(Ee(14))}x[C]=I,y=y||I!==w}return y=y||i.length!==Object.keys(h).length,y?x:h}}function io(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function td(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Ee(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(u){return u(s)});return i=io.apply(void 0,l)(a.dispatch),ji(ji({},a),{},{dispatch:i})}}}function rd(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var od=rd();od.withExtraArgument=rd;var Zi=od;var cd=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),e6=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(h){return function(m){return u([h,m])}}function u(h){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=h[0]&2?a.return:h[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,h[1])).done)return i;switch(a=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,a=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){r.label=h[1];break}if(h[0]===6&&r.label<i[1]){r.label=i[1],i=h;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(h);break}i[2]&&r.ops.pop(),r.trys.pop();continue}h=e.call(t,r)}catch(m){h=[6,m],a=0}finally{n=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},so=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},t6=Object.defineProperty,r6=Object.defineProperties,o6=Object.getOwnPropertyDescriptors,nd=Object.getOwnPropertySymbols,n6=Object.prototype.hasOwnProperty,a6=Object.prototype.propertyIsEnumerable,ad=function(t,e,r){return e in t?t6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Zt=function(t,e){for(var r in e||(e={}))n6.call(e,r)&&ad(t,r,e[r]);if(nd)for(var n=0,a=nd(e);n<a.length;n++){var r=a[n];a6.call(e,r)&&ad(t,r,e[r])}return t},Yi=function(t,e){return r6(t,o6(e))},i6=function(t,e,r){return new Promise(function(n,a){var i=function(u){try{l(r.next(u))}catch(h){a(h)}},s=function(u){try{l(r.throw(u))}catch(h){a(h)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((r=r.apply(t,e)).next())})};var s6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?io:io.apply(null,arguments)},m9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function c6(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Yt(t,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return Zt(Zt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var l6=(function(t){cd(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,so([void 0],r[0].concat(this)))):new(e.bind.apply(e,so([void 0],r.concat(this))))},e})(Array),d6=(function(t){cd(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,so([void 0],r[0].concat(this)))):new(e.bind.apply(e,so([void 0],r.concat(this))))},e})(Array);function Ji(t){return st(t)?ea(t,function(){}):t}function u6(t){return typeof t=="boolean"}function f6(){return function(e){return p6(e)}}function p6(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,l=t.actionCreatorCheck,u=l===void 0?!0:l,h=new l6;if(r&&(u6(r)?h.push(Zi):h.push(Zi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return h}var Xi=!0;function ld(t){var e=f6(),r=t||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?e():i,l=r.devTools,u=l===void 0?!0:l,h=r.preloadedState,m=h===void 0?void 0:h,g=r.enhancers,y=g===void 0?void 0:g,x;if(typeof a=="function")x=a;else if(c6(a))x=ed(a);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 S=s;if(typeof S=="function"&&(S=S(e),!Xi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xi&&S.some(function($){return typeof $!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=td.apply(void 0,S),O=io;u&&(O=s6(Zt({trace:!Xi},typeof u=="object"&&u)));var w=new d6(C),I=w;Array.isArray(y)?I=so([C],y):typeof y=="function"&&(I=y(w));var k=O.apply(void 0,I);return qi(x,m,k)}function dd(t){var e={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,r,n]}function h6(t){return typeof t=="function"}function m6(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?dd(e):[e,r,n],i=a[0],s=a[1],l=a[2],u;if(h6(t))u=function(){return Ji(t())};else{var h=Ji(t);u=function(){return h}}function m(g,y){g===void 0&&(g=u());var x=so([i[y.type]],s.filter(function(S){var C=S.matcher;return C(y)}).map(function(S){var C=S.reducer;return C}));return x.filter(function(S){return!!S}).length===0&&(x=[l]),x.reduce(function(S,C){if(C)if(zt(S)){var O=S,w=C(O,y);return w===void 0?S:w}else{if(st(S))return ea(S,function(I){return C(I,y)});var w=C(S,y);if(w===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return S},g)}return m.getInitialState=u,m}function g6(t,e){return t+"/"+e}function ud(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Ji(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=g6(e,m),x,S;"reducer"in g?(x=g.reducer,S=g.prepare):x=g,i[m]=x,s[y]=x,l[m]=S?Yt(y,S):Yt(y)});function u(){var m=typeof t.extraReducers=="function"?dd(t.extraReducers):[t.extraReducers],g=m[0],y=g===void 0?{}:g,x=m[1],S=x===void 0?[]:x,C=m[2],O=C===void 0?void 0:C,w=Zt(Zt({},y),s);return m6(r,function(I){for(var k in w)I.addCase(k,w[k]);for(var $=0,V=S;$<V.length;$++){var J=V[$];I.addMatcher(J.matcher,J.reducer)}O&&I.addDefaultCase(O)})}var h;return{name:e,reducer:function(m,g){return h||(h=u()),h(m,g)},actions:l,caseReducers:i,getInitialState:function(){return h||(h=u()),h.getInitialState()}}}var y6="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",b6=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=y6[Math.random()*64|0];return e},v6=["name","message","stack","code"],Qi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),id=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),x6=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=v6;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},v9=(function(){function t(e,r,n){var a=Yt(e+"/fulfilled",function(m,g,y,x){return{payload:m,meta:Yi(Zt({},x||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=Yt(e+"/pending",function(m,g,y){return{payload:void 0,meta:Yi(Zt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Yt(e+"/rejected",function(m,g,y,x,S){return{payload:x,error:(n&&n.serializeError||x6)(m||"Rejected"),meta:Yi(Zt({},S||{}),{arg:y,requestId:g,rejectedWithValue:!!x,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function h(m){return function(g,y,x){var S=n?.idGenerator?n.idGenerator(m):b6(),C=new u,O,w=!1;function I($){O=$,C.abort()}var k=(function(){return i6(this,null,function(){var $,V,J,ft,rr,pt,Pe;return e6(this,function(Ge){switch(Ge.label){case 0:return Ge.trys.push([0,4,,5]),ft=($=n?.condition)==null?void 0:$.call(n,m,{getState:y,extra:x}),C6(ft)?[4,ft]:[3,2];case 1:ft=Ge.sent(),Ge.label=2;case 2:if(ft===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,rr=new Promise(function($e,or){return C.signal.addEventListener("abort",function(){return or({name:"AbortError",message:O||"Aborted"})})}),g(i(S,m,(V=n?.getPendingMeta)==null?void 0:V.call(n,{requestId:S,arg:m},{getState:y,extra:x}))),[4,Promise.race([rr,Promise.resolve(r(m,{dispatch:g,getState:y,extra:x,requestId:S,signal:C.signal,abort:I,rejectWithValue:function($e,or){return new Qi($e,or)},fulfillWithValue:function($e,or){return new id($e,or)}})).then(function($e){if($e instanceof Qi)throw $e;return $e instanceof id?a($e.payload,S,m,$e.meta):a($e,S,m)})])];case 3:return J=Ge.sent(),[3,5];case 4:return pt=Ge.sent(),J=pt instanceof Qi?s(null,S,m,pt.payload,pt.meta):s(pt,S,m),[3,5];case 5:return Pe=n&&!n.dispatchConditionRejection&&s.match(J)&&J.meta.condition,Pe||g(J),[2,J]}})})})();return Object.assign(k,{abort:I,requestId:S,arg:m,unwrap:function(){return k.then(S6)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function S6(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function C6(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var fd="listener",pd="completed",hd="cancelled",x9="task-"+hd,S9="task-"+pd,C9=fd+"-"+hd,L9=fd+"-"+pd;var es="listenerMiddleware";var E9=Yt(es+"/add"),A9=Yt(es+"/removeAll"),O9=Yt(es+"/remove");var sd,w9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(sd||(sd=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},L6=function(t){return function(e){setTimeout(e,t)}},R9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:L6(10);j2();var E6=Vn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),ra=class extends E6(Object){};window.ftReduxStores||(window.ftReduxStores={});var md=class t extends ra{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Yn(i))return i;if(a==null)return;let s=ud({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=ld({reducer:(u,h)=>{if(h.type==="CLEAR_FT_REDUX_STORE"){let m=jo(s.getInitialState());for(let g of h.keeping)m[g]=(u??m)[g];return m}else if(typeof h.type=="string"&&h.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...h.overwrites};return s.reducer(u,h)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new jn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,h=i[u];return h?(...m)=>{let g=h(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var oa=class{static format(e,r,n,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,r,n,a,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var na=v(N()),A6="ft-app-info",co=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};co.eventName="authentication-change";var Qo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Qo.eventName="ui-locale-changed";var O6={session:(t,e)=>{(0,na.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new co(e.payload)),0))}},F=na.FtReduxStore.get({name:A6,reducers:O6,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 gd=v(N()),aa=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},rb=(0,gd.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(F)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>oa.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return aa([(0,ts.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),aa([(0,ts.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),aa([Ni({store:F.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),aa([Ni({store:F.name})],e.prototype,"uiLocale",void 0),e});var yd;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(yd||(yd={}));var bd;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(bd||(bd={}));var vd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(vd||(vd={}));var xd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(xd||(xd={}));var Sd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Sd||(Sd={}));var Cd;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Cd||(Cd={}));var Ld;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ld||(Ld={}));var Ed;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Ed||(Ed={}));var Ad;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ad||(Ad={}));var Od;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Od||(Od={}));var wd;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(wd||(wd={}));var Rd;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Rd||(Rd={}));var zd;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(zd||(zd={}));var Id;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Id||(Id={}));var Nd;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Nd||(Nd={}));var _d;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(_d||(_d={}));var Md;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Md||(Md={}));var kd;(function(t){t.ASC="ASC",t.DESC="DESC"})(kd||(kd={}));var Td;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Td||(Td={}));var Pd;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Pd||(Pd={}));var $d;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})($d||($d={}));var Dd;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Dd||(Dd={}));var Ud;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ud||(Ud={}));var Bd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Bd||(Bd={}));var Fd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fd||(Fd={}));var Hd;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Hd||(Hd={}));var Gd;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Gd||(Gd={}));var ge;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ge||(ge={}));var Ke;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ke||(Ke={}));var Wd;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Wd||(Wd={}));var Vd;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Vd||(Vd={}));var jd;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(jd||(jd={}));var Kd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Kd||(Kd={}));var qd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(qd||(qd={}));var Zd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Zd||(Zd={}));var Yd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Yd||(Yd={}));var Xd;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Xd||(Xd={}));var Qd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Qd||(Qd={}));var Jd;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Jd||(Jd={}));var e0;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(e0||(e0={}));var t0;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(t0||(t0={}));var w6={[ge.PERSONAL_BOOK_SHARE_USER]:[ge.PERSONAL_BOOK_USER],[ge.HTML_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.PDF_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.KHUB_ADMIN]:[ge.CONTENT_PUBLISHER],[ge.ADMIN]:[ge.KHUB_ADMIN,ge.USERS_ADMIN,ge.PORTAL_ADMIN,ge.BEHAVIOR_DATA_USER],[ge.GENERATIVE_AI_EXPORT_USER]:[ge.GENERATIVE_AI_USER]};function r0(t,e){return t===e||(w6[t]??[]).some(r=>r0(r,e))}function o0(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>r0(n,e))}var da=v(N());var rs=v(N());var vr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=F.getState(),a=e??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let a=F.subscribe(()=>{n=t.get(e),n&&(a(),r(n))})}})}};var lo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:vr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):vr.await()}};var Fe=class extends lo{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new rs.CacheRegistry,this.cache=e?a.commonCache:new rs.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var ia=class extends Fe{async listMySearches(){let{session:e}=F.getState();return o0(e,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var sa=class extends Fe{async listMyBookmarks(){let e=F.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var ca=class extends Fe{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=F.getState().session;return!!e?.sessionAuthenticated}};var la=class extends Fe{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=F.getState().session;return!!e?.sessionAuthenticated}};var R6="ft-user-assets",z6={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(Ke).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:n,asset:a}=e.payload;ns(t,r,[...os(t,r),a]),n0(t,r,1,n),a0(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;ns(t,r,os(t,r).map(a=>a.id===n.id?n:a)),a0(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;ns(t,r,os(t,r).filter(i=>i.id!==a)),n0(t,r,-1,n)}},i0={[Ke.SEARCHES]:"savedSearches",[Ke.BOOKMARKS]:"bookmarks",[Ke.BOOKS]:void 0,[Ke.COLLECTIONS]:void 0},os=(t,e)=>{var r;let n=i0[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},ns=(t,e,r)=>{let n=i0[e];n&&(t[n]=r)},n0=(t,e,r,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===Ke.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},a0=(t,e)=>{let r=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},Ie=da.FtReduxStore.get({name:R6,reducers:z6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Ke).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),as=class{constructor(e=new ca,r=new la){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new sa,this.savedSearchesService=new ia,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();(0,da.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ie.actions.clearAssetCount(),Ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ie.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ie.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ie.getState().assetCounts.allAsset[e]!==r.count&&Ie.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ie.getState().assetCounts.bookmarkByMap[e]!==r.count&&Ie.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ie.getState().assetCounts.bookmarkByMap).length!==0;e===Ke.BOOKMARKS&&r&&Ie.actions.clearBookmarkCountByMap(),Ie.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;Ie.actions.bookmarks(r)}}},I6=new as;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=I6);var is=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new is;var qe=v(N());var s0,uo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},N6=Symbol("clearAfterUnitTest"),ua=class extends(0,qe.withEventBus)(Fe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[s0]=()=>{this.defaultMessages={},this.cache=new qe.CacheRegistry,this.listeners={}},this.currentUiLocale=F.getState().uiLocale,F.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=F.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 n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,qe.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new qe.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof qe.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new uo({loadedContexts:e})),this.dispatchEvent(new uo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new uo({loadedContexts:[e]})),this.dispatchEvent(new uo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,qe.delay)(0).then(()=>n()).catch(()=>null)))}};s0=N6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ua{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ua{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var fo=window.FluidTopicsI18nService,fa=window.FluidTopicsCustomI18nService;var c0=v(N()),ss=class{highlightHtml(e,r,n){(0,c0.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new ss;var l0=v(N());var cs=class{isDate(e){var r,n,a,i;return(i=(a=((n=(r=F.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var n,a,i,s;if(e==null)return"";try{return l0.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:F.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!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 cs;var d0=v(N());var Jo=class{static get(e,r){var n,a,i,s;let l=F.getState(),{lang:u,region:h}=(i=(a=(n=l.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new d0.SearchPlaceConverter(l.baseUrl,e??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${u}-${h}`)}};var ls=class{urlToSearchRequest(e){return Jo.get().parse(e)}searchRequestToUrl(e){return Jo.get().serialize(e)}};window.FluidTopicsUrlService=new ls;var It=v(N());var xr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};xr.eventName="change";var ds=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))}},u0=new ds;var pa=class t extends It.WithEventBus{static build(){return new t(window.history,u0,()=>window.location,!1)}constructor(e,r,n,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,It.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new xr(this.currentItem())),0)}installProxies(){let e=r=>(n,a,[i,s,l])=>{let u=r(),h={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[h,s,l]),this.setCurrentState(h,!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 n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(xr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(xr.eventName,e)}currentItem(){return(0,It.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,It.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,It.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,It.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}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 n;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=pa.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 f0=v(B());var p0=f0.css`
|
|
2024
|
-
`;var g0=v(B()),Me=v(ee()),Lr=v(N());var Sr=v(N());function h0(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var ha=class extends lo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var us=class t extends Sr.FtStateManager{static build(e){return new t(F,e)}constructor(e,r){super(),this.store=e,this.cache=new Sr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new ha,this.cleanSessionDebouncer=new Sr.Debouncer,this.reloadDebouncer=new Sr.Debouncer(500),this.apiProvider=r??(()=>vr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(co.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",()=>h0(()=>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(
|
|
2024
|
+
`;var g0=v(B()),Me=v(ee()),Lr=v(N());var Sr=v(N());function h0(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var ha=class extends lo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var us=class t extends Sr.FtStateManager{static build(e){return new t(F,e)}constructor(e,r){super(),this.store=e,this.cache=new Sr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new ha,this.cleanSessionDebouncer=new Sr.Debouncer,this.reloadDebouncer=new Sr.Debouncer(500),this.apiProvider=r??(()=>vr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(co.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",()=>h0(()=>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(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Qo(n)))}).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)}},m0=us.build();var Cr=class extends Event{constructor(e,r,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=a??!1}};var en=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:n}=r;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Cr(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}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 Se=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ne=class extends Lr.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=m0,this.contextRoot=new en}render(){return g0.html`
|
|
2025
2025
|
<slot></slot>
|
|
2026
2026
|
`}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(n=>fo.addContext(n)),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())}};ne.elementDefinitions={};ne.styles=p0;Se([(0,Me.property)()],ne.prototype,"baseUrl",void 0);Se([(0,Me.property)()],ne.prototype,"tenantId",void 0);Se([(0,Me.property)()],ne.prototype,"apiIntegrationIdentifier",void 0);Se([(0,Me.property)()],ne.prototype,"apiIntegrationAppVersion",void 0);Se([(0,Me.property)()],ne.prototype,"uiLocale",void 0);Se([(0,Lr.jsonProperty)(null)],ne.prototype,"availableUiLocales",void 0);Se([(0,Lr.jsonProperty)(null)],ne.prototype,"metadataConfiguration",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"editorMode",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"noCustom",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"openExternalDocumentInNewTab",void 0);Se([(0,Me.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ne.prototype,"noCustomComponent",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"withManualResources",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"navigatorOnline",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"forcedOffline",void 0);Se([(0,Me.property)({type:Boolean})],ne.prototype,"authenticationRequired",void 0);Se([(0,Lr.jsonProperty)([])],ne.prototype,"messageContexts",void 0);Se([(0,Lr.jsonProperty)(void 0)],ne.prototype,"session",void 0);var b0=v(N());var y0={"ft-app-context":ne};(0,b0.customElements)(y0);var v0=v(ee());var fs=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,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},po=new fs;var k6=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},rn=Symbol("i18nAttributes"),x0=Symbol("i18nListAttributes"),S0=Symbol("i18nProperties"),ma=Symbol("i18nContexts"),tn=Symbol("i18nUnsubs"),mo=(0,ho.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?fa:fo}i18n(i){let{context:s,key:l,message:u}=i,{custom:h,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,h);let y=m??(g?g(this):[]);return this.getI18nService(h).resolveMessage(s,l,...y)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(po.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var h;return((h=u?.context)===null||h===void 0?void 0:h.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,h=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[rn])===null||s===void 0||s.forEach((m,g)=>u[g]=h(m,g,u[g])),(l=this[x0])===null||l===void 0||l.forEach((m,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(x=>h(m,g,x))})}updateI18nProperties(i){var s;(s=this[S0])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ma].set(u,{isCustomContext:l}),this[tn].has(u)||this[tn].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[ma].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ma].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[tn].forEach(i=>i()),this[tn].clear()}}return e=ma,r=tn,k6([(0,v0.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ga=class extends mo(ho.FtLitElement){},ya=class extends mo(ho.FtLitElementRedux){};var C0=v(N());var ps=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(n=>typeof n=="string"?po.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},T6=new ps;var L0=(t,e)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:C0.hasChanged,converter:po,...e}),r[rn]=(a=r[rn])!==null&&a!==void 0?a:new Map,r[rn].set(n,t??{})};var Xt=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?fa:fo}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var E0=v(B());var A0=E0.css`
|
|
2027
2027
|
`;var ba=v(B()),va=v(ee()),xa=v(N());var on=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ct=class extends ya{constructor(){super(),this.editorMode=!1,this.addStore(F)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":ba.nothing:ba.html`
|
|
@@ -5,7 +5,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
5
5
|
.highlight-html-match {
|
|
6
6
|
background: ${u1};
|
|
7
7
|
}
|
|
8
|
-
`;function as(t,e,r){var o,a;let i=t.getAttribute("data-highlight-html-query");if((i??"")!==(e??"")){let s=new Ef(t);if(s.unmark(),e&&e.trim()){let c={className:(o=r?.className)!==null&&o!==void 0?o:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(c.each=
|
|
8
|
+
`;function as(t,e,r){var o,a;let i=t.getAttribute("data-highlight-html-query");if((i??"")!==(e??"")){let s=new Ef(t);if(s.unmark(),e&&e.trim()){let c={className:(o=r?.className)!==null&&o!==void 0?o:"highlight-html-match",acrossElements:!0};r?.attributes!=null&&(c.each=u=>{for(let g in r.attributes)u.setAttribute(g,r.attributes[g])}),s.mark(e.replace(/"[^"]+"/g,""),{...c,separateWordSearch:!0}),((a=e.match(/"[^"]+"/g))!==null&&a!==void 0?a:[]).forEach(u=>s.mark(u.replace(/"/g,""),{...c,separateWordSearch:!1}))}}t.setAttribute("data-highlight-html-query",e??"")}var cs={};Q(cs,{noTextInputDefaultClearButton:()=>Af,noTextSelect:()=>rn,safariEllipsisFix:()=>ss,wordWrap:()=>Of});var rn=T`
|
|
9
9
|
.ft-no-text-select {
|
|
10
10
|
-webkit-touch-callout: none;
|
|
11
11
|
-webkit-user-select: none;
|
|
@@ -2101,7 +2101,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2101
2101
|
word-break: break-word;
|
|
2102
2102
|
}
|
|
2103
2103
|
`;var s6="ft-app-info",_o=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_o.eventName="authentication-change";var Cn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Cn.eventName="ui-locale-changed";var c6={session:(t,e)=>{Ke(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>K.dispatchEvent(new _o(e.payload)),0))}},K=Ar.get({name:s6,reducers:c6,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 Ea=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},aE=Ie(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(K)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>wr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ea([x({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ea([x({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ea([Jr({store:K.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Ea([Jr({store:K.name})],e.prototype,"uiLocale",void 0),e});var Tr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=K.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=K.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var Io=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Tr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Tr.await()}};var Je=class extends Io{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Ct,this.cache=e?a.commonCache:new Ct}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 La=class extends Je{async listMySearches(){let{session:e}=K.getState();return Nd(e,Le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Oa=class extends Je{async listMyBookmarks(){let e=K.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Aa=class extends Je{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=K.getState().session;return!!e?.sessionAuthenticated}};var wa=class extends Je{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=K.getState().session;return!!e?.sessionAuthenticated}};var l6="ft-user-assets",d6={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(ot).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:a}=e.payload;Dc(t,r,[...$c(t,r),a]),su(t,r,1,o),cu(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Dc(t,r,$c(t,r).map(a=>a.id===o.id?o:a)),cu(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Dc(t,r,$c(t,r).filter(i=>i.id!==a)),su(t,r,-1,o)}},lu={[ot.SEARCHES]:"savedSearches",[ot.BOOKMARKS]:"bookmarks",[ot.BOOKS]:void 0,[ot.COLLECTIONS]:void 0},$c=(t,e)=>{var r;let o=lu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Dc=(t,e,r)=>{let o=lu[e];o&&(t[o]=r)},su=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===ot.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},cu=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Be=Ar.get({name:l6,reducers:d6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ot).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fc=class{constructor(e=new Aa,r=new wa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=K.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Oa,this.savedSearchesService=new La,K.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=K.getState();Ke((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(),Be.actions.clearAssetCount(),Be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Be.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Be.getState().assetCounts.allAsset[e]!==r.count&&Be.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Be.getState().assetCounts.bookmarkByMap[e]!==r.count&&Be.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Be.getState().assetCounts.bookmarkByMap).length!==0;e===ot.BOOKMARKS&&r&&Be.actions.clearBookmarkCountByMap(),Be.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;Be.actions.bookmarks(r)}}},u6=new Fc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=u6);var Uc=class{addCommand(e,r=!1){K.commands.add(e,r)}consumeCommand(e){return K.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Uc;var du,No=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},f6=Symbol("clearAfterUnitTest"),Ra=class extends Gn(Je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[du]=()=>{this.defaultMessages={},this.cache=new Ct,this.listeners={}},this.currentUiLocale=K.getState().uiLocale,K.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=K.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 a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ke(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,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 a;let i=e.toLowerCase(),s=this.resolveContext(i);return new on((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},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(a){!(a instanceof fr)&&r&&console.error(a)}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 a;return(a=this.listeners[e])===null||a===void 0?void 0:a.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=>Hn(0).then(()=>o()).catch(()=>null)))}};du=f6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Ra{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Ra{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mo=window.FluidTopicsI18nService,_a=window.FluidTopicsCustomI18nService;var Bc=class{highlightHtml(e,r,o){as(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Bc;var Hc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=K.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return wr.format(e,(o=r?.locale)!==null&&o!==void 0?o:K.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Hc;var En=class{static get(e,r){var o,a,i,s;let c=K.getState(),{lang:d,region:u}=(i=(a=(o=c.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new so(c.baseUrl,e??20,(s=c.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${d}-${u}`)}};var Gc=class{urlToSearchRequest(e){return En.get().parse(e)}searchRequestToUrl(e){return En.get().serialize(e)}};window.FluidTopicsUrlService=new Gc;var zr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};zr.eventName="change";var Wc=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))}},uu=new Wc;var Ia=class t extends zt{static build(){return new t(window.history,uu,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}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),Ke(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new zr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let 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(zr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(zr.eventName,e)}currentItem(){return st(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 st(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return st(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 st(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 a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}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 a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ia.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 fu=T`
|
|
2104
|
-
`;function pu(t,e){let{authenticationRequired:r,session:o}=K.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Na=class extends Io{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Vc=class t extends dn{static build(e){return new t(K,e)}constructor(e,r){super(),this.store=e,this.cache=new Ct,this.withManualResources=!0,this.userLocaleService=new Na,this.cleanSessionDebouncer=new Ne,this.reloadDebouncer=new Ne(500),this.apiProvider=r??(()=>Tr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(_o.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",()=>pu(()=>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(
|
|
2104
|
+
`;function pu(t,e){let{authenticationRequired:r,session:o}=K.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var Na=class extends Io{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Vc=class t extends dn{static build(e){return new t(K,e)}constructor(e,r){super(),this.store=e,this.cache=new Ct,this.withManualResources=!0,this.userLocaleService=new Na,this.cleanSessionDebouncer=new Ne,this.reloadDebouncer=new Ne(500),this.apiProvider=r??(()=>Tr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(_o.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",()=>pu(()=>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 Cn(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)}},hu=Vc.build();var kr=class extends Event{constructor(e,r,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=o,this.subscribe=a??!1}};var Ln=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:a,callbackRef:i}of o){let s=a.deref(),c=i.deref();s===void 0||c===void 0||s.dispatchEvent(new kr(e.context,s,c,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],o=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(o)||(i.add(o),a.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 ze=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ge=class extends Er{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=hu,this.contextRoot=new Ln}render(){return I`
|
|
2105
2105
|
<slot></slot>
|
|
2106
2106
|
`}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=>Mo.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())}};ge.elementDefinitions={};ge.styles=fu;ze([x()],ge.prototype,"baseUrl",void 0);ze([x()],ge.prototype,"tenantId",void 0);ze([x()],ge.prototype,"apiIntegrationIdentifier",void 0);ze([x()],ge.prototype,"apiIntegrationAppVersion",void 0);ze([x()],ge.prototype,"uiLocale",void 0);ze([Fe(null)],ge.prototype,"availableUiLocales",void 0);ze([Fe(null)],ge.prototype,"metadataConfiguration",void 0);ze([x({type:Boolean})],ge.prototype,"editorMode",void 0);ze([x({type:Boolean})],ge.prototype,"noCustom",void 0);ze([x({type:Boolean})],ge.prototype,"openExternalDocumentInNewTab",void 0);ze([x({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ge.prototype,"noCustomComponent",void 0);ze([x({type:Boolean})],ge.prototype,"withManualResources",void 0);ze([x({type:Boolean})],ge.prototype,"navigatorOnline",void 0);ze([x({type:Boolean})],ge.prototype,"forcedOffline",void 0);ze([x({type:Boolean})],ge.prototype,"authenticationRequired",void 0);ze([Fe([])],ge.prototype,"messageContexts",void 0);ze([Fe(void 0)],ge.prototype,"session",void 0);var mu={"ft-app-context":ge};ee(mu);var jc=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-]+$/)}},To=new jc;var m6=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},An=Symbol("i18nAttributes"),gu=Symbol("i18nListAttributes"),yu=Symbol("i18nProperties"),Ma=Symbol("i18nContexts"),On=Symbol("i18nUnsubs"),zo=Ie(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(i){return i??this.useCustomMessageContexts?_a:Mo}i18n(i){let{context:s,key:c,message:d}=i,{custom:u,args:g,argsProvider:m}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=g??(m?m(this):[]);return this.getI18nService(u).resolveMessage(s,c,...y)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(To.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,u=(g,m,y)=>y?.context&&y.key&&i(g,m,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...g})}:y;(s=this[An])===null||s===void 0||s.forEach((g,m)=>d[m]=u(g,m,d[m])),(c=this[gu])===null||c===void 0||c.forEach((g,m)=>{var y;return d[m]=(y=d[m])===null||y===void 0?void 0:y.map(b=>u(g,m,b))})}updateI18nProperties(i){var s;(s=this[yu])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Ma].set(d,{isCustomContext:c}),this[On].has(d)||this[On].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[Ma].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ma].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[On].forEach(i=>i()),this[On].clear()}}return e=Ma,r=On,m6([x({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Ta=class extends zo(te){},za=class extends zo(Er){};var Kc=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?To.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},g6=new Kc;var bu=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:Tt,converter:To,...e}),r[An]=(a=r[An])!==null&&a!==void 0?a:new Map,r[An].set(o,t??{})};var nr=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?_a:Mo}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var vu=T`
|
|
2107
2107
|
`;var wn=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},yt=class extends za{constructor(){super(),this.editorMode=!1,this.addStore(K)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":W:I`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ftds-combobox",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.21",
|
|
4
4
|
"description": "Single-select combobox for the Fluid Topics Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@fluid-topics/design-system-variables": "3.5.1",
|
|
23
|
-
"@fluid-topics/ft-i18n": "2.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
25
|
-
"@fluid-topics/ftds-base-input": "2.1.
|
|
26
|
-
"@fluid-topics/ftds-chip-group": "2.1.
|
|
27
|
-
"@fluid-topics/ftds-icon": "2.1.
|
|
28
|
-
"@fluid-topics/ftds-notice": "2.1.
|
|
29
|
-
"@fluid-topics/ftds-typography": "2.1.
|
|
23
|
+
"@fluid-topics/ft-i18n": "2.1.21",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.1.21",
|
|
25
|
+
"@fluid-topics/ftds-base-input": "2.1.21",
|
|
26
|
+
"@fluid-topics/ftds-chip-group": "2.1.21",
|
|
27
|
+
"@fluid-topics/ftds-icon": "2.1.21",
|
|
28
|
+
"@fluid-topics/ftds-notice": "2.1.21",
|
|
29
|
+
"@fluid-topics/ftds-typography": "2.1.21",
|
|
30
30
|
"lit": "3.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@fluid-topics/ft-wc-test-utils": "2.1.
|
|
33
|
+
"@fluid-topics/ft-wc-test-utils": "2.1.21"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "a0f619df74c0665183d73df09e75b1eddc2a2a1f"
|
|
36
36
|
}
|