@fluid-topics/ft-viewer 2.1.18 → 2.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- "use strict";(()=>{var su=Object.create;var Uo=Object.defineProperty;var au=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames;var cu=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty;var Nt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var du=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lu(t))!uu.call(e,i)&&i!==r&&Uo(e,i,{get:()=>t[i],enumerable:!(n=au(t,i))||n.enumerable});return e};var f=(e,t,r)=>(r=e!=null?su(cu(e)):{},du(t||!e||!e.__esModule?Uo(r,"default",{value:e,enumerable:!0}):r,e));var A=Nt((Fd,$o)=>{$o.exports=ftGlobals.wcUtils});var N=Nt((Wd,Ho)=>{Ho.exports=ftGlobals.litDecorators});var T=Nt((mp,Fo)=>{Fo.exports=ftGlobals.lit});var eo=Nt((Sv,za)=>{za.exports=ftGlobals.litRepeat});var mo=Nt((rg,Tl)=>{Tl.exports=ftGlobals.litUnsafeHTML});var Io=Nt((Ab,Uc)=>{Uc.exports=ftGlobals.litClassMap});var ou=f(A());var Bo=f(A()),Vo=f(N());var De=class extends Event{constructor(t,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Pt=class{constructor(t,r,n,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,s)),this.unsubscribe=s},this.host=t,r.context!==void 0){let o=r;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=r,this.callback=n,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new De(this.context,this.host,this.t,this.subscribe))}};var Yr=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,r=!1){let n=r||!Object.is(t,this.o);this.o=t,n&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[r,{disposer:n}]of this.subscriptions)r(this.o,n)},t!==void 0&&(this.value=t)}addCallback(t,r,n){if(!n)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:r});let{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var vi=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}},Mt=class extends Yr{constructor(t,r,n){super(r.context!==void 0?r.initialValue:n),this.onContextRequest=i=>{if(i.context!==this.context)return;let o=i.contextTarget??i.composedPath()[0];o!==this.host&&(i.stopPropagation(),this.addCallback(i.callback,o,i.subscribe))},this.onProviderRequest=i=>{if(i.context!==this.context||(i.contextTarget??i.composedPath()[0])===this.host)return;let o=new Set;for(let[s,{consumerHost:a}]of this.subscriptions)o.has(s)||(o.add(s),a.dispatchEvent(new De(this.context,a,s,!0)));i.stopPropagation()},this.host=t,r.context!==void 0?this.context=r.context:this.context=r,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new vi(this.context,this.host))}};var gr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new De(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,i=this.pendingContextRequests.get(t.context);i===void 0&&this.pendingContextRequests.set(t.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function yr({context:e}){return(t,r)=>{let n=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(i){return n.get(this).setValue(i),t.set.call(this,i)},init(i){return n.set(this,new Mt(this,{context:e,initialValue:i})),i}};{t.constructor.addInitializer((s=>{n.set(s,new Mt(s,{context:e}))}));let i=Object.getOwnPropertyDescriptor(t,r),o;if(i===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){n.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=i.set;o={...i,set(a){n.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(t,r,o)}}}function xr({context:e,subscribe:t}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new Pt(this,{context:e,callback:i=>{r.set.call(this,i)},subscribe:t})})):r.constructor.addInitializer((i=>{new Pt(i,{context:e,callback:o=>{i[n]=o},subscribe:t})}))}}var pu=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},gi=Symbol("asset-viewer-state-manager"),oe=(0,Bo.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(e){class t extends e{willUpdate(n){super.willUpdate(n),n.has("viewerStateManager")&&(this.viewerStateManager?this.addStore(this.viewerStateManager.store,"viewer"):this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.viewerStateManager&&this.addStore(this.viewerStateManager.store,"viewer")}disconnectedCallback(){super.disconnectedCallback(),this.removeStore("viewer")}}return pu([xr({context:gi,subscribe:!0}),(0,Vo.state)()],t.prototype,"viewerStateManager",void 0),t});var ja=f(T()),zt=f(A());var Wo=f(A()),fu={setZoom:(e,t)=>{e.contentModifiers.zoom=t.payload},setRotation:(e,t)=>{e.contentModifiers.rotation=t.payload}},Xr=e=>Wo.FtReduxStore.get({name:"ft-viewer-"+e,initialState:{documentId:void 0,unstructuredDocument:void 0,document:void 0,assetId:void 0,origin:void 0,descriptor:void 0,contentModifiers:{zoom:void 0,rotation:0},watermark:void 0},reducers:fu});var zo=f(A()),Dt=class extends zo.FtStateManager{constructor(t){super(),this.store=t}setZoom(t){this.store.actions.setZoom(t)}setRotation(t){this.store.actions.setRotation(t)}};var Fi=f(N());var Ko=f(N(),1);var yi=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Go(e,t){return(0,Ko.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return br(e);try{return JSON.parse(r)}catch{return br(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...t??{}})}function hu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Zr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Zr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(e);if(r=o.length,r!==i(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Zr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Zr(e,t){try{return hu(e,t)}catch{return!1}}function Ar(e,t){return!Zr(e,t)}function br(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Jr(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let i=t(n);return i[e]=!0,i}}var qo=f(N(),1);var xi=e=>{let t=e??{};return(r,n)=>{var i;let o={hasChanged:Ar,attribute:!1,...t};(0,qo.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=t.selector)!==null&&i!==void 0?i:(a=>a[n]),store:t.store})}};var Qr=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var ut=f(N(),1);var en=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let i=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Xo=f(T(),1);var tn=globalThis,mu=tn.ShadowRoot&&(tn.ShadyCSS===void 0||tn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Yo=(e,t)=>{if(mu)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),i=tn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,e.appendChild(n)}};var rn=class extends Xo.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Yo(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){yi(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Zo(e,t,...r){var n;let i=e.querySelector(t);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var kt=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},ts,Jo=Symbol("constructorPrototype"),Qo=Symbol("constructorName"),rs=Symbol("exportpartsDebouncer"),es=Symbol("dynamicDependenciesLoaded"),It=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};It.eventName="exportparts-updated";var Oe=class extends rn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ts]=new en(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[rs].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Qo]=this.constructor.name,this[Jo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Qo]&&Object.setPrototypeOf(this,this[Jo])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[es]||(r[es]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(It.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(It.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new It)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Zo(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};ts=rs;kt([(0,ut.property)()],Oe.prototype,"exportpartsPrefix",void 0);kt([Go([])],Oe.prototype,"exportpartsPrefixes",void 0);kt([(0,ut.property)({reflect:!0})],Oe.prototype,"exportparts",void 0);kt([(0,ut.property)()],Oe.prototype,"customStylesheet",void 0);kt([(0,ut.property)()],Oe.prototype,"elementToFocus",void 0);kt([(0,ut.state)()],Oe.prototype,"useAdoptedStyleSheets",void 0);function nn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),Ge=Symbol("internalStoresUnsubscribers"),dt=Symbol("internalStores"),vu=Jr(Symbol("withRedux"),function(e){var t,r,n;class i extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[dt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[dt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[dt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[dt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Ge].has(s.store):this[Ge].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Ge].set(s,a.subscribe(()=>this.updateFromStores())),this[Er].set(s,[]),nn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Er].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ge].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Ge].has(s)&&this[Ge].get(s)(),this[Ge].delete(s),(a=this[Er].get(s))===null||a===void 0||a.forEach(l=>l()),this[Er].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=Ge,r=dt,n=Er,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ns=class extends vu(Oe){};function se(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(0)var i,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ie(e){return!!e&&!!e[_]}function me(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===wu})(e)||Array.isArray(e)||!!e[us]||!!(!((t=e.constructor)===null||t===void 0)&&t[us])||_i(e)||Ri(e))}function pt(e,t,r){r===void 0&&(r=!1),Ht(e)===0?(r?Object.keys:$t)(e).forEach((function(n){r&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,i){return t(i,n,e)}))}function Ht(e){var t=e[_];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_i(e)?2:Ri(e)?3:0}function Ut(e,t){return Ht(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gu(e,t){return Ht(e)===2?e.get(t):e[t]}function ds(e,t,r){var n=Ht(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ps(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function _i(e){return Eu&&e instanceof Map}function Ri(e){return Su&&e instanceof Set}function qe(e){return e.o||e.t}function Li(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ms(e);delete t[_];for(var r=$t(t),n=0;n<r.length;n++){var i=r[n],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Ni(e,t){return t===void 0&&(t=!1),Pi(e)||Ie(e)||!me(e)||(Ht(e)>1&&(e.set=e.add=e.clear=e.delete=yu),Object.freeze(e),t&&pt(e,(function(r,n){return Ni(n,!0)}),!0)),e}function yu(){se(2)}function Pi(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Te(e){var t=Ti[e];return t||se(18,e),t}function xu(e,t){Ti[e]||(Ti[e]=t)}function wi(){return wr}function bi(e,t){t&&(Te("Patches"),e.u=[],e.s=[],e.v=t)}function on(e){Ci(e),e.p.forEach(bu),e.p=null}function Ci(e){e===wr&&(wr=e.l)}function is(e){return wr={p:[],l:wr,h:e,m:!0,_:0}}function bu(e){var t=e[_];t.i===0||t.i===1?t.j():t.g=!0}function Ai(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Te("ES5").S(t,e,n),n?(r[_].P&&(on(t),se(4)),me(e)&&(e=sn(t,e),t.l||an(t,e)),t.u&&Te("Patches").M(r[_].t,e,t.u,t.s)):e=sn(t,r,[]),on(t),t.u&&t.v(t.u,t.s),e!==hs?e:void 0}function sn(e,t,r){if(Pi(t))return t;var n=t[_];if(!n)return pt(t,(function(a,l){return os(e,n,t,a,l,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return an(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Li(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),pt(o,(function(a,l){return os(e,n,i,a,l,r,s)})),an(e,i,!1),r&&e.u&&Te("Patches").N(n,r,e.u,e.s)}return n.o}function os(e,t,r,n,i,o,s){if(Ie(i)){var a=sn(e,i,o&&t&&t.i!==3&&!Ut(t.R,n)?o.concat(n):void 0);if(ds(r,n,a),!Ie(a))return;e.m=!1}else s&&r.add(i);if(me(i)&&!Pi(i)){if(!e.h.D&&e._<1)return;sn(e,i),t&&t.A.l||an(e,i)}}function an(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Ni(t,r)}function Ei(e,t){var r=e[_];return(r?qe(r):e)[t]}function ss(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Ye(e){e.P||(e.P=!0,e.l&&Ye(e.l))}function Si(e){e.o||(e.o=Li(e.t))}function Oi(e,t,r){var n=_i(t)?Te("MapSet").F(t,r):Ri(t)?Te("MapSet").T(t,r):e.O?(function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:wi(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Cr;s&&(l=[a],c=Sr);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(t,r):Te("ES5").J(t,r);return(r?r.A:wi()).p.push(n),n}function Au(e){return Ie(e)||se(22,e),(function t(r){if(!me(r))return r;var n,i=r[_],o=Ht(r);if(i){if(!i.P&&(i.i<4||!Te("ES5").K(i)))return i.t;i.I=!0,n=as(r,o),i.I=!1}else n=as(r,o);return pt(n,(function(s,a){i&&gu(i.t,s)===a||ds(n,s,t(a))})),o===3?new Set(n):n})(e)}function as(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Li(e)}function fs(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[_];return Cr.get(c,s)},set:function(c){var u=this[_];Cr.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][_];if(!l.P)switch(l.i){case 5:n(l)&&Ye(l);break;case 4:r(l)&&Ye(l)}}}function r(s){for(var a=s.t,l=s.k,c=$t(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==_){var p=a[d];if(p===void 0&&!Ut(a,d))return!0;var h=l[d],m=h&&h[_];if(m?m.t!==p:!ps(h,p))return!0}}var v=!!a[_];return c.length!==$t(a).length+(v?0:1)}function n(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&se(3,JSON.stringify(qe(s)))}var o={};xu("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var v=ms(p);delete v[_];for(var x=$t(v),b=0;b<x.length;b++){var E=x[b];v[E]=e(E,d||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:wi(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,_,{value:u,writable:!0}),c},S:function(s,a,l){l?Ie(a)&&a[_].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[_];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)pt(h,(function(O){O!==_&&(p[O]!==void 0||Ut(p,O)?m[O]||c(h[O]):(m[O]=!0,Ye(d)))})),pt(p,(function(O){h[O]!==void 0||Ut(h,O)||(m[O]=!1,Ye(d))}));else if(v===5){if(n(d)&&(Ye(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var b=p.length;b<h.length;b++)m[b]=!0;for(var E=Math.min(h.length,p.length),C=0;C<E;C++)h.hasOwnProperty(C)||(m[C]=!0),m[C]===void 0&&c(h[C])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var ls,wr,Mi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Eu=typeof Map<"u",Su=typeof Set<"u",cs=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hs=Mi?Symbol.for("immer-nothing"):((ls={})["immer-nothing"]=!0,ls),us=Mi?Symbol.for("immer-draftable"):"__$immer_draftable",_=Mi?Symbol.for("immer-state"):"__$immer_state";var wu=""+Object.prototype.constructor,$t=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ms=Object.getOwnPropertyDescriptors||function(e){var t={};return $t(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Ti={},Cr={get:function(e,t){if(t===_)return e;var r=qe(e);if(!Ut(r,t))return(function(i,o,s){var a,l=ss(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0})(e,r,t);var n=r[t];return e.I||!me(n)?n:n===Ei(e.t,t)?(Si(e),e.o[t]=Oi(e.A.h,n,e)):n},has:function(e,t){return t in qe(e)},ownKeys:function(e){return Reflect.ownKeys(qe(e))},set:function(e,t,r){var n=ss(qe(e),t);if(n?.set)return n.set.call(e.k,r),!0;if(!e.P){var i=Ei(qe(e),t),o=i?.[_];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(ps(r,i)&&(r!==void 0||Ut(e.t,t)))return!0;Si(e),Ye(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ei(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Si(e),Ye(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=qe(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){se(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){se(12)}},Sr={};pt(Cr,(function(e,t){Sr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Sr.deleteProperty=function(e,t){return Sr.set.call(this,e,t,void 0)},Sr.set=function(e,t,r){return Cr.set.call(this,e[0],t,r,e[0])};var Cu=(function(){function e(r){var n=this;this.O=cs,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=n;return function(v){var x=this;v===void 0&&(v=a);for(var b=arguments.length,E=Array(b>1?b-1:0),C=1;C<b;C++)E[C-1]=arguments[C];return l.produce(v,(function(O){var k;return(k=o).call.apply(k,[x,O].concat(E))}))}}var c;if(typeof o!="function"&&se(6),s!==void 0&&typeof s!="function"&&se(7),me(i)){var u=is(n),d=Oi(n,i,void 0),p=!0;try{c=o(d),p=!1}finally{p?on(u):Ci(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return bi(u,s),Ai(v,u)}),(function(v){throw on(u),v})):(bi(u,s),Ai(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===hs&&(c=void 0),n.D&&Ni(c,!0),s){var h=[],m=[];Te("Patches").M(i,c,h,m),s(h,m)}return c}se(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return n.produceWithPatches(c,(function(h){return i.apply(void 0,[h].concat(d))}))};var s,a,l=n.produce(i,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){me(r)||se(8),Ie(r)&&(r=Au(r));var n=is(this),i=Oi(this,r,void 0);return i[_].C=!0,Ci(n),i},t.finishDraft=function(r,n){var i=r&&r[_],o=i.A;return bi(o,n),Ai(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!cs&&se(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=Te("Patches").$;return Ie(r)?s(r,n):this.produce(r,(function(a){return s(a,n)}))},e})(),te=new Cu,Ou=te.produce,Vp=te.produceWithPatches.bind(te),Fp=te.setAutoFreeze.bind(te),Wp=te.setUseProxies.bind(te),zp=te.applyPatches.bind(te),Kp=te.createDraft.bind(te),Gp=te.finishDraft.bind(te),ln=Ou;function ft(e){"@babel/helpers - typeof";return ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(e)}function vs(e,t){if(ft(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gs(e){var t=vs(e,"string");return ft(t)=="symbol"?t:t+""}function ys(e,t,r){return(t=gs(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Di(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xs(Object(r),!0).forEach(function(n){ys(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var bs=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ii=function(){return Math.random().toString(36).substring(7).split("").join(".")},cn={INIT:"@@redux/INIT"+Ii(),REPLACE:"@@redux/REPLACE"+Ii(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ii()}};function Tu(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ki(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(K(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(K(1));return r(ki)(e,t)}if(typeof e!="function")throw new Error(K(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(K(3));return o}function d(v){if(typeof v!="function")throw new Error(K(4));if(l)throw new Error(K(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(K(6));x=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function p(v){if(!Tu(v))throw new Error(K(7));if(typeof v.type>"u")throw new Error(K(8));if(l)throw new Error(K(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var x=s=a,b=0;b<x.length;b++){var E=x[b];E()}return v}function h(v){if(typeof v!="function")throw new Error(K(10));i=v,p({type:cn.REPLACE})}function m(){var v,x=d;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(K(11));function C(){E.next&&E.next(u())}C();var O=x(C);return{unsubscribe:O}}},v[bs]=function(){return this},v}return p({type:cn.INIT}),n={dispatch:p,subscribe:d,getState:u,replaceReducer:h},n[bs]=m,n}function _u(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:cn.INIT});if(typeof n>"u")throw new Error(K(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(K(13))})}function As(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];typeof e[i]=="function"&&(r[i]=e[i])}var o=Object.keys(r),s,a;try{_u(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],b=c[v],E=x(b,u);if(typeof E>"u"){var C=u&&u.type;throw new Error(K(14))}h[v]=E,p=p||E!==b}return p=p||o.length!==Object.keys(c).length,p?h:c}}function jt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Es(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(K(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=jt.apply(void 0,a)(i.dispatch),Di(Di({},i),{},{dispatch:o})}}}function Ss(e){var t=function(n){var i=n.dispatch,o=n.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,e):s(a)}}};return t}var ws=Ss();ws.withExtraArgument=Ss;var Ui=ws;var Rs=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ru=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Bt=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},Lu=Object.defineProperty,Nu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertySymbols,Mu=Object.prototype.hasOwnProperty,Du=Object.prototype.propertyIsEnumerable,Os=function(e,t,r){return t in e?Lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Xe=function(e,t){for(var r in t||(t={}))Mu.call(t,r)&&Os(e,r,t[r]);if(Cs)for(var n=0,i=Cs(t);n<i.length;n++){var r=i[n];Du.call(t,r)&&Os(e,r,t[r])}return e},$i=function(e,t){return Nu(e,Pu(t))},Iu=function(e,t,r){return new Promise(function(n,i){var o=function(l){try{a(r.next(l))}catch(c){i(c)}},s=function(l){try{a(r.throw(l))}catch(c){i(c)}},a=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var ku=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jt:jt.apply(null,arguments)},pf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Uu(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function Ze(e,t){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return Xe(Xe({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(n){return n.type===e},r}var $u=(function(e){Rs(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,Bt([void 0],r[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],r.concat(this))))},t})(Array),Hu=(function(e){Rs(t,e);function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.prototype.concat.apply(this,r)},t.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(t.bind.apply(t,Bt([void 0],r[0].concat(this)))):new(t.bind.apply(t,Bt([void 0],r.concat(this))))},t})(Array);function Bi(e){return me(e)?ln(e,function(){}):e}function ju(e){return typeof e=="boolean"}function Bu(){return function(t){return Vu(t)}}function Vu(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,n=e.immutableCheck,i=n===void 0?!0:n,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new $u;if(r&&(ju(r)?c.push(Ui):c.push(Ui.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var d;if(l)var p}return c}var Hi=!0;function Ls(e){var t=Bu(),r=e||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof i=="function")h=i;else if(Uu(i))h=As(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Hi&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hi&&m.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Es.apply(void 0,m),x=jt;l&&(x=ku(Xe({trace:!Hi},typeof l=="object"&&l)));var b=new Hu(v),E=b;Array.isArray(p)?E=Bt([v],p):typeof p=="function"&&(E=p(b));var C=x.apply(void 0,E);return ki(h,u,C)}function Ns(e){var t={},r=[],n,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,i},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return n=o,i}};return e(i),[t,r,n]}function Fu(e){return typeof e=="function"}function Wu(e,t,r,n){r===void 0&&(r=[]);var i=typeof t=="function"?Ns(t):[t,r,n],o=i[0],s=i[1],a=i[2],l;if(Fu(e))l=function(){return Bi(e())};else{var c=Bi(e);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=Bt([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(Ie(m)){var x=m,b=v(x,p);return b===void 0?m:b}else{if(me(m))return ln(m,function(E){return v(E,p)});var b=v(m,p);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}return m},d)}return u.getInitialState=l,u}function zu(e,t){return e+"/"+t}function Ps(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Bi(e.initialState),n=e.reducers||{},i=Object.keys(n),o={},s={},a={};i.forEach(function(u){var d=n[u],p=zu(t,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Ze(p,m):Ze(p)});function l(){var u=typeof e.extraReducers=="function"?Ns(e.extraReducers):[e.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],x=v===void 0?void 0:v,b=Xe(Xe({},p),s);return Wu(r,function(E){for(var C in b)E.addCase(C,b[C]);for(var O=0,k=m;O<k.length;O++){var M=k[O];E.addMatcher(M.matcher,M.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:t,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Ku="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gu=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Ku[Math.random()*64|0];return t},qu=["name","message","stack","code"],ji=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Ts=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Yu=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,n=qu;r<n.length;r++){var i=n[r];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},vf=(function(){function e(t,r,n){var i=Ze(t+"/fulfilled",function(u,d,p,h){return{payload:u,meta:$i(Xe({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Ze(t+"/pending",function(u,d,p){return{payload:void 0,meta:$i(Xe({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Ze(t+"/rejected",function(u,d,p,h,m){return{payload:h,error:(n&&n.serializeError||Yu)(u||"Rejected"),meta:$i(Xe({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=n?.idGenerator?n.idGenerator(u):Gu(),v=new l,x,b=!1;function E(O){x=O,v.abort()}var C=(function(){return Iu(this,null,function(){var O,k,M,ze,mi,Ke,Q;return Ru(this,function(ie){switch(ie.label){case 0:return ie.trys.push([0,4,,5]),ze=(O=n?.condition)==null?void 0:O.call(n,u,{getState:p,extra:h}),Zu(ze)?[4,ze]:[3,2];case 1:ze=ie.sent(),ie.label=2;case 2:if(ze===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=!0,mi=new Promise(function(ee,ct){return v.signal.addEventListener("abort",function(){return ct({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(k=n?.getPendingMeta)==null?void 0:k.call(n,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([mi,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(ee,ct){return new ji(ee,ct)},fulfillWithValue:function(ee,ct){return new Ts(ee,ct)}})).then(function(ee){if(ee instanceof ji)throw ee;return ee instanceof Ts?i(ee.payload,m,u,ee.meta):i(ee,m,u)})])];case 3:return M=ie.sent(),[3,5];case 4:return Ke=ie.sent(),M=Ke instanceof ji?s(null,m,u,Ke.payload,Ke.meta):s(Ke,m,u),[3,5];case 5:return Q=n&&!n.dispatchConditionRejection&&s.match(M)&&M.meta.condition,Q||d(M),[2,M]}})})})();return Object.assign(C,{abort:E,requestId:m,arg:u,unwrap:function(){return C.then(Xu)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e})();function Xu(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Zu(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ms="listener",Ds="completed",Is="cancelled",gf="task-"+Is,yf="task-"+Ds,xf=Ms+"-"+Is,bf=Ms+"-"+Ds;var Vi="listenerMiddleware";var Af=Ze(Vi+"/add"),Ef=Ze(Vi+"/removeAll"),Sf=Ze(Vi+"/remove");var _s,wf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(_s||(_s=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ju=function(e){return function(t){setTimeout(t,e)}},Cf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ju(10);fs();var Qu=Jr(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),un=class extends Qu(Object){};window.ftReduxStores||(window.ftReduxStores={});var ks=class e extends un{static get(t){var r;let n=typeof t=="string"?t:t.name,i=typeof t=="string"?void 0:t,o=window.ftReduxStores[n];if(nn(o))return o;if(i==null)return;let s=Ps({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=Ls({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new e(s,a,i.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Qr;let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:i(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var dn=class{static format(t,r,n,i,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(t,r,n,i,!!o)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,i,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var pn=f(A()),ed="ft-app-info",_e=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};_e.eventName="authentication-change";var Or=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Or.eventName="ui-locale-changed";var td={session:(e,t)=>{(0,pn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new _e(t.payload)),0))}},w=pn.FtReduxStore.get({name:ed,reducers:td,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Us=f(A()),fn=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Qf=(0,Us.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>dn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return fn([(0,Fi.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),fn([(0,Fi.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),fn([xi({store:w.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],t.prototype,"metadataDescriptors",void 0),fn([xi({store:w.name})],t.prototype,"uiLocale",void 0),t});var $s;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})($s||($s={}));var Hs;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Hs||(Hs={}));var js;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(js||(js={}));var Bs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Bs||(Bs={}));var Vs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Vs||(Vs={}));var Fs;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Fs||(Fs={}));var Ws;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ws||(Ws={}));var zs;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(zs||(zs={}));var Ks;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ks||(Ks={}));var Gs;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Gs||(Gs={}));var qs;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(qs||(qs={}));var Ys;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ys||(Ys={}));var Xs;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Xs||(Xs={}));var Zs;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Zs||(Zs={}));var Js;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(Js||(Js={}));var Qs;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(Qs||(Qs={}));var ea;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ea||(ea={}));var ta;(function(e){e.ASC="ASC",e.DESC="DESC"})(ta||(ta={}));var ra;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(ra||(ra={}));var na;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(na||(na={}));var ia;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ia||(ia={}));var oa;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(oa||(oa={}));var sa;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(sa||(sa={}));var aa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(aa||(aa={}));var la;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(la||(la={}));var ca;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ca||(ca={}));var ua;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ua||(ua={}));var D;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(D||(D={}));var ae;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ae||(ae={}));var da;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(da||(da={}));var pa;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(pa||(pa={}));var fa;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(fa||(fa={}));var ha;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(ha||(ha={}));var ma;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ma||(ma={}));var va;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(va||(va={}));var ga;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(ga||(ga={}));var ya;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(ya||(ya={}));var xa;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(xa||(xa={}));var ba;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(ba||(ba={}));var Aa;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Aa||(Aa={}));var hn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hn||(hn={}));var rd={[D.PERSONAL_BOOK_SHARE_USER]:[D.PERSONAL_BOOK_USER],[D.HTML_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.PDF_EXPORT_USER]:[D.PERSONAL_BOOK_USER],[D.KHUB_ADMIN]:[D.CONTENT_PUBLISHER],[D.ADMIN]:[D.KHUB_ADMIN,D.USERS_ADMIN,D.PORTAL_ADMIN,D.BEHAVIOR_DATA_USER],[D.GENERATIVE_AI_EXPORT_USER]:[D.GENERATIVE_AI_USER]};function Ea(e,t){return e===t||(rd[e]??[]).some(r=>Ea(r,t))}function Sa(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Ea(n,t))}var xn=f(A());var Wi=f(A());var le=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=w.getState(),i=t??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let i=w.subscribe(()=>{n=e.get(t),n&&(i(),r(n))})}})}};var Vt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):le.await()}};var B=class extends Vt{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Wi.CacheRegistry,this.cache=t?i.commonCache:new Wi.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var mn=class extends B{async listMySearches(){let{session:t}=w.getState();return Sa(t,D.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var vn=class extends B{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var gn=class extends B{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var yn=class extends B{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var nd="ft-user-assets",id={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(ae).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:i}=t.payload;Ki(e,r,[...zi(e,r),i]),wa(e,r,1,n),Ca(e,i)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Ki(e,r,zi(e,r).map(i=>i.id===n.id?n:i)),Ca(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:i}=t.payload;Ki(e,r,zi(e,r).filter(o=>o.id!==i)),wa(e,r,-1,n)}},Oa={[ae.SEARCHES]:"savedSearches",[ae.BOOKMARKS]:"bookmarks",[ae.BOOKS]:void 0,[ae.COLLECTIONS]:void 0},zi=(e,t)=>{var r;let n=Oa[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Ki=(e,t,r)=>{let n=Oa[t];n&&(e[n]=r)},wa=(e,t,r,n)=>{let i=e.assetCounts.allAsset[t];if(i!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,i+r),t===ae.BOOKMARKS&&n)){let o=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},Ca=(e,t)=>{let r=e.assetLabels.map(i=>i.title),n=t.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));e.assetLabels.push(...n)},q=xn.FtReduxStore.get({name:nd,reducers:id,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ae).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gi=class{constructor(t=new gn,r=new yn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new vn,this.savedSearchesService=new mn,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,xn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),q.actions.clearAssetCount(),q.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),q.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),q.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();q.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();q.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&q.getState().assetCounts.allAsset[t]!==r.count&&q.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&q.getState().assetCounts.bookmarkByMap[t]!==r.count&&q.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(q.getState().assetCounts.bookmarkByMap).length!==0;t===ae.BOOKMARKS&&r&&q.actions.clearBookmarkCountByMap(),q.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;q.actions.bookmarks(r)}}},od=new Gi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=od);var qi=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new qi;var ce=f(A());var Ta,Ft=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},sd=Symbol("clearAfterUnitTest"),bn=class extends(0,ce.withEventBus)(B){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ta]=()=>{this.defaultMessages={},this.cache=new ce.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let i={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,ce.deepEqual)(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var i;let o=t.toLowerCase(),s=this.resolveContext(o);return new ce.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},s).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(i){!(i instanceof ce.CanceledPromiseError)&&r&&console.error(i)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var i;return(i=this.listeners[t])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Ft({loadedContexts:t})),this.dispatchEvent(new Ft({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Ft({loadedContexts:[t]})),this.dispatchEvent(new Ft({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,ce.delay)(0).then(()=>n()).catch(()=>null)))}};Ta=sd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends bn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends bn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Wt=window.FluidTopicsI18nService,An=window.FluidTopicsCustomI18nService;var _a=f(A()),Yi=class{highlightHtml(t,r,n){(0,_a.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Yi;var Ra=f(A());var Xi=class{isDate(t){var r,n,i,o;return(o=(i=((n=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===t))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(t,r){var n,i,o,s;if(t==null)return"";try{return Ra.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Xi;var La=f(A());var Tr=class{static get(t,r){var n,i,o,s;let a=w.getState(),{lang:l,region:c}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new La.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Zi=class{urlToSearchRequest(t){return Tr.get().parse(t)}searchRequestToUrl(t){return Tr.get().serialize(t)}};window.FluidTopicsUrlService=new Zi;var ke=f(A());var ht=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};ht.eventName="change";var Ji=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Na=new Ji;var En=class e extends ke.WithEventBus{static build(){return new e(window.history,Na,()=>window.location,!1)}constructor(t,r,n,i){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},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,ke.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ht(this.currentItem())),0)}installProxies(){let t=r=>(n,i,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(i,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(ht.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(ht.eventName,t)}currentItem(){return(0,ke.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,ke.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ke.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,ke.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let i=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let i=r??this.currentState.majorStateId,o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=En.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Pa=f(T());var Ma=Pa.css`
2
- `;var ka=f(T()),re=f(N()),vt=f(A());var mt=f(A());function Da(e,t){let{authenticationRequired:r,session:n}=w.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Sn=class extends Vt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Qi=class e extends mt.FtStateManager{static build(t){return new e(w,t)}constructor(t,r){super(),this.store=t,this.cache=new mt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Sn,this.cleanSessionDebouncer=new mt.Debouncer,this.reloadDebouncer=new mt.Debouncer(500),this.apiProvider=r??(()=>le.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(_e.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Da(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Or(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Ia=Qi.build();var G=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},R=class extends vt.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=Ia,this.contextRoot=new gr}render(){return ka.html`
1
+ "use strict";(()=>{var su=Object.create;var Uo=Object.defineProperty;var au=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames;var cu=Object.getPrototypeOf,uu=Object.prototype.hasOwnProperty;var Nt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var du=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of lu(e))!uu.call(t,i)&&i!==r&&Uo(t,i,{get:()=>e[i],enumerable:!(n=au(e,i))||n.enumerable});return t};var f=(t,e,r)=>(r=t!=null?su(cu(t)):{},du(e||!t||!t.__esModule?Uo(r,"default",{value:t,enumerable:!0}):r,t));var A=Nt((Fd,$o)=>{$o.exports=ftGlobals.wcUtils});var N=Nt((Wd,Ho)=>{Ho.exports=ftGlobals.litDecorators});var T=Nt((mp,Fo)=>{Fo.exports=ftGlobals.lit});var eo=Nt((Sv,za)=>{za.exports=ftGlobals.litRepeat});var mo=Nt((rg,Tl)=>{Tl.exports=ftGlobals.litUnsafeHTML});var Do=Nt((Ab,Uc)=>{Uc.exports=ftGlobals.litClassMap});var ou=f(A());var Bo=f(A()),Vo=f(N());var Ie=class extends Event{constructor(e,r,n,i){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=i??!1}};var Pt=class{constructor(e,r,n,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,s)),this.unsubscribe=s},this.host=e,r.context!==void 0){let o=r;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=r,this.callback=n,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Ie(this.context,this.host,this.t,this.subscribe))}};var Yr=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,r=!1){let n=r||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[r,{disposer:n}]of this.subscriptions)r(this.o,n)},e!==void 0&&(this.value=e)}addCallback(e,r,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:r});let{disposer:i}=this.subscriptions.get(e);e(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var vi=class extends Event{constructor(e,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r}},Mt=class extends Yr{constructor(e,r,n){super(r.context!==void 0?r.initialValue:n),this.onContextRequest=i=>{if(i.context!==this.context)return;let o=i.contextTarget??i.composedPath()[0];o!==this.host&&(i.stopPropagation(),this.addCallback(i.callback,o,i.subscribe))},this.onProviderRequest=i=>{if(i.context!==this.context||(i.contextTarget??i.composedPath()[0])===this.host)return;let o=new Set;for(let[s,{consumerHost:a}]of this.subscriptions)o.has(s)||(o.add(s),a.dispatchEvent(new Ie(this.context,a,s,!0)));i.stopPropagation()},this.host=e,r.context!==void 0?this.context=r.context:this.context=r,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new vi(this.context,this.host))}};var gr=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:i,callbackRef:o}of n){let s=i.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Ie(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,i=this.pendingContextRequests.get(e.context);i===void 0&&this.pendingContextRequests.set(e.context,i={callbacks:new WeakMap,requests:[]});let o=i.callbacks.get(r);o===void 0&&i.callbacks.set(r,o=new WeakSet),o.has(n)||(o.add(n),i.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)}};function yr({context:t}){return(e,r)=>{let n=new WeakMap;if(typeof r=="object")return{get(){return e.get.call(this)},set(i){return n.get(this).setValue(i),e.set.call(this,i)},init(i){return n.set(this,new Mt(this,{context:t,initialValue:i})),i}};{e.constructor.addInitializer((s=>{n.set(s,new Mt(s,{context:t}))}));let i=Object.getOwnPropertyDescriptor(e,r),o;if(i===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){n.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=i.set;o={...i,set(a){n.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(e,r,o)}}}function xr({context:t,subscribe:e}){return(r,n)=>{typeof n=="object"?n.addInitializer((function(){new Pt(this,{context:t,callback:i=>{r.set.call(this,i)},subscribe:e})})):r.constructor.addInitializer((i=>{new Pt(i,{context:t,callback:o=>{i[n]=o},subscribe:e})}))}}var pu=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},gi=Symbol("asset-viewer-state-manager"),oe=(0,Bo.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(t){class e extends t{willUpdate(n){super.willUpdate(n),n.has("viewerStateManager")&&(this.viewerStateManager?this.addStore(this.viewerStateManager.store,"viewer"):this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.viewerStateManager&&this.addStore(this.viewerStateManager.store,"viewer")}disconnectedCallback(){super.disconnectedCallback(),this.removeStore("viewer")}}return pu([xr({context:gi,subscribe:!0}),(0,Vo.state)()],e.prototype,"viewerStateManager",void 0),e});var ja=f(T()),zt=f(A());var Wo=f(A()),fu={setZoom:(t,e)=>{t.contentModifiers.zoom=e.payload},setRotation:(t,e)=>{t.contentModifiers.rotation=e.payload}},Xr=t=>Wo.FtReduxStore.get({name:"ft-viewer-"+t,initialState:{documentId:void 0,unstructuredDocument:void 0,document:void 0,assetId:void 0,origin:void 0,descriptor:void 0,contentModifiers:{zoom:void 0,rotation:0},watermark:void 0},reducers:fu});var zo=f(A()),It=class extends zo.FtStateManager{constructor(e){super(),this.store=e}setZoom(e){this.store.actions.setZoom(e)}setRotation(e){this.store.actions.setRotation(e)}};var Fi=f(N());var Ko=f(N(),1);var yi=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Go(t,e){return(0,Ko.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return br(t);try{return JSON.parse(r)}catch{return br(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...e??{}})}function hu(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(!Zr(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(!Zr(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 i=s=>Object.keys(s).filter(a=>s[a]!=null),o=i(t);if(r=o.length,r!==i(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=r;n--!==0;){let s=o[n];if(!Zr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Zr(t,e){try{return hu(t,e)}catch{return!1}}function Ar(t,e){return!Zr(t,e)}function br(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Jr(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let i=e(n);return i[t]=!0,i}}var qo=f(N(),1);var xi=t=>{let e=t??{};return(r,n)=>{var i;let o={hasChanged:Ar,attribute:!1,...e};(0,qo.property)(o)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(i=e.selector)!==null&&i!==void 0?i:(a=>a[n]),store:e.store})}};var Qr=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 ut=f(N(),1);var en=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 i=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(a){i(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Xo=f(T(),1);var tn=globalThis,mu=tn.ShadowRoot&&(tn.ShadyCSS===void 0||tn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Yo=(t,e)=>{if(mu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),i=tn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}};var rn=class extends Xo.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 Yo(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){yi(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 Zo(t,e,...r){var n;let i=t.querySelector(e);for(let o of r)i=(n=i?.shadowRoot)===null||n===void 0?void 0:n.querySelector(o);return i}var kt=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},ts,Jo=Symbol("constructorPrototype"),Qo=Symbol("constructorName"),rs=Symbol("exportpartsDebouncer"),es=Symbol("dynamicDependenciesLoaded"),Dt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Dt.eventName="exportparts-updated";var Oe=class extends rn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[ts]=new en(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[rs].run(()=>{var i,o;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Qo]=this.constructor.name,this[Jo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Qo]&&Object.setPrototypeOf(this,this[Jo])}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[es]||(r[es]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Dt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Dt.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 Dt)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:i}=this.elementToFocus;if(n!=null){let o=[...i??[],n];r=Zo(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,i;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,n,i,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=e.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let h=(o=(i=p.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};ts=rs;kt([(0,ut.property)()],Oe.prototype,"exportpartsPrefix",void 0);kt([Go([])],Oe.prototype,"exportpartsPrefixes",void 0);kt([(0,ut.property)({reflect:!0})],Oe.prototype,"exportparts",void 0);kt([(0,ut.property)()],Oe.prototype,"customStylesheet",void 0);kt([(0,ut.property)()],Oe.prototype,"elementToFocus",void 0);kt([(0,ut.state)()],Oe.prototype,"useAdoptedStyleSheets",void 0);function nn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Er=Symbol("internalReduxEventsUnsubscribers"),Ge=Symbol("internalStoresUnsubscribers"),dt=Symbol("internalStores"),vu=Jr(Symbol("withRedux"),function(t){var e,r,n;class i 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(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[dt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[dt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[dt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[dt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[dt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[dt].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Ge].has(s.store):this[Ge].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Ge].set(s,a.subscribe(()=>this.updateFromStores())),this[Er].set(s,[]),nn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[Er].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Ge].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Ge].has(s)&&this[Ge].get(s)(),this[Ge].delete(s),(a=this[Er].get(s))===null||a===void 0||a.forEach(l=>l()),this[Er].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Ge,r=dt,n=Er,i.reduxProperties=new Map,i.reduxReactiveProperties=new Set,i.reduxEventListeners=new Map,i}),ns=class extends vu(Oe){};function se(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 i,o;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 De(t){return!!t&&!!t[_]}function me(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 i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===wu})(t)||Array.isArray(t)||!!t[us]||!!(!((e=t.constructor)===null||e===void 0)&&e[us])||_i(t)||Ri(t))}function pt(t,e,r){r===void 0&&(r=!1),Ht(t)===0?(r?Object.keys:$t)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,i){return e(i,n,t)}))}function Ht(t){var e=t[_];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:_i(t)?2:Ri(t)?3:0}function Ut(t,e){return Ht(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function gu(t,e){return Ht(t)===2?t.get(e):t[e]}function ds(t,e,r){var n=Ht(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function ps(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function _i(t){return Eu&&t instanceof Map}function Ri(t){return Su&&t instanceof Set}function qe(t){return t.o||t.t}function Li(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ms(t);delete e[_];for(var r=$t(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Ni(t,e){return e===void 0&&(e=!1),Pi(t)||De(t)||!me(t)||(Ht(t)>1&&(t.set=t.add=t.clear=t.delete=yu),Object.freeze(t),e&&pt(t,(function(r,n){return Ni(n,!0)}),!0)),t}function yu(){se(2)}function Pi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Te(t){var e=Ti[t];return e||se(18,t),e}function xu(t,e){Ti[t]||(Ti[t]=e)}function wi(){return wr}function bi(t,e){e&&(Te("Patches"),t.u=[],t.s=[],t.v=e)}function on(t){Ci(t),t.p.forEach(bu),t.p=null}function Ci(t){t===wr&&(wr=t.l)}function is(t){return wr={p:[],l:wr,h:t,m:!0,_:0}}function bu(t){var e=t[_];e.i===0||e.i===1?e.j():e.g=!0}function Ai(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||Te("ES5").S(e,t,n),n?(r[_].P&&(on(e),se(4)),me(t)&&(t=sn(e,t),e.l||an(e,t)),e.u&&Te("Patches").M(r[_].t,t,e.u,e.s)):t=sn(e,r,[]),on(e),e.u&&e.v(e.u,e.s),t!==hs?t:void 0}function sn(t,e,r){if(Pi(e))return e;var n=e[_];if(!n)return pt(e,(function(a,l){return os(t,n,e,a,l,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return an(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Li(n.k):n.o,o=i,s=!1;n.i===3&&(o=new Set(i),i.clear(),s=!0),pt(o,(function(a,l){return os(t,n,i,a,l,r,s)})),an(t,i,!1),r&&t.u&&Te("Patches").N(n,r,t.u,t.s)}return n.o}function os(t,e,r,n,i,o,s){if(De(i)){var a=sn(t,i,o&&e&&e.i!==3&&!Ut(e.R,n)?o.concat(n):void 0);if(ds(r,n,a),!De(a))return;t.m=!1}else s&&r.add(i);if(me(i)&&!Pi(i)){if(!t.h.D&&t._<1)return;sn(t,i),e&&e.A.l||an(t,i)}}function an(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Ni(e,r)}function Ei(t,e){var r=t[_];return(r?qe(r):t)[e]}function ss(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 Ye(t){t.P||(t.P=!0,t.l&&Ye(t.l))}function Si(t){t.o||(t.o=Li(t.t))}function Oi(t,e,r){var n=_i(e)?Te("MapSet").F(e,r):Ri(e)?Te("MapSet").T(e,r):t.O?(function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:wi(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=Cr;s&&(l=[a],c=Sr);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(e,r):Te("ES5").J(e,r);return(r?r.A:wi()).p.push(n),n}function Au(t){return De(t)||se(22,t),(function e(r){if(!me(r))return r;var n,i=r[_],o=Ht(r);if(i){if(!i.P&&(i.i<4||!Te("ES5").K(i)))return i.t;i.I=!0,n=as(r,o),i.I=!1}else n=as(r,o);return pt(n,(function(s,a){i&&gu(i.t,s)===a||ds(n,s,e(a))})),o===3?new Set(n):n})(t)}function as(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Li(t)}function fs(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[_];return Cr.get(c,s)},set:function(c){var u=this[_];Cr.set(u,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][_];if(!l.P)switch(l.i){case 5:n(l)&&Ye(l);break;case 4:r(l)&&Ye(l)}}}function r(s){for(var a=s.t,l=s.k,c=$t(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==_){var p=a[d];if(p===void 0&&!Ut(a,d))return!0;var h=l[d],m=h&&h[_];if(m?m.t!==p:!ps(h,p))return!0}}var v=!!a[_];return c.length!==$t(a).length+(v?0:1)}function n(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function i(s){s.g&&se(3,JSON.stringify(qe(s)))}var o={};xu("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var v=ms(p);delete v[_];for(var x=$t(v),b=0;b<x.length;b++){var E=x[b];v[E]=t(E,d||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(p),v)})(l,s),u={i:l?5:4,A:a?a.A:wi(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,_,{value:u,writable:!0}),c},S:function(s,a,l){l?De(a)&&a[_].A===s&&e(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[_];if(d){var p=d.t,h=d.k,m=d.R,v=d.i;if(v===4)pt(h,(function(O){O!==_&&(p[O]!==void 0||Ut(p,O)?m[O]||c(h[O]):(m[O]=!0,Ye(d)))})),pt(p,(function(O){h[O]!==void 0||Ut(h,O)||(m[O]=!1,Ye(d))}));else if(v===5){if(n(d)&&(Ye(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var b=p.length;b<h.length;b++)m[b]=!0;for(var E=Math.min(h.length,p.length),C=0;C<E;C++)h.hasOwnProperty(C)||(m[C]=!0),m[C]===void 0&&c(h[C])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var ls,wr,Mi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Eu=typeof Map<"u",Su=typeof Set<"u",cs=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",hs=Mi?Symbol.for("immer-nothing"):((ls={})["immer-nothing"]=!0,ls),us=Mi?Symbol.for("immer-draftable"):"__$immer_draftable",_=Mi?Symbol.for("immer-state"):"__$immer_state";var wu=""+Object.prototype.constructor,$t=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ms=Object.getOwnPropertyDescriptors||function(t){var e={};return $t(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ti={},Cr={get:function(t,e){if(e===_)return t;var r=qe(t);if(!Ut(r,e))return(function(i,o,s){var a,l=ss(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0})(t,r,e);var n=r[e];return t.I||!me(n)?n:n===Ei(t.t,e)?(Si(t),t.o[e]=Oi(t.A.h,n,t)):n},has:function(t,e){return e in qe(t)},ownKeys:function(t){return Reflect.ownKeys(qe(t))},set:function(t,e,r){var n=ss(qe(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var i=Ei(qe(t),e),o=i?.[_];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(ps(r,i)&&(r!==void 0||Ut(t.t,e)))return!0;Si(t),Ye(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 Ei(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Si(t),Ye(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=qe(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){se(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){se(12)}},Sr={};pt(Cr,(function(t,e){Sr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Sr.deleteProperty=function(t,e){return Sr.set.call(this,t,e,void 0)},Sr.set=function(t,e,r){return Cr.set.call(this,t[0],e,r,t[0])};var Cu=(function(){function t(r){var n=this;this.O=cs,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=n;return function(v){var x=this;v===void 0&&(v=a);for(var b=arguments.length,E=Array(b>1?b-1:0),C=1;C<b;C++)E[C-1]=arguments[C];return l.produce(v,(function(O){var k;return(k=o).call.apply(k,[x,O].concat(E))}))}}var c;if(typeof o!="function"&&se(6),s!==void 0&&typeof s!="function"&&se(7),me(i)){var u=is(n),d=Oi(n,i,void 0),p=!0;try{c=o(d),p=!1}finally{p?on(u):Ci(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return bi(u,s),Ai(v,u)}),(function(v){throw on(u),v})):(bi(u,s),Ai(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===hs&&(c=void 0),n.D&&Ni(c,!0),s){var h=[],m=[];Te("Patches").M(i,c,h,m),s(h,m)}return c}se(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return n.produceWithPatches(c,(function(h){return i.apply(void 0,[h].concat(d))}))};var s,a,l=n.produce(i,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){me(r)||se(8),De(r)&&(r=Au(r));var n=is(this),i=Oi(this,r,void 0);return i[_].C=!0,Ci(n),i},e.finishDraft=function(r,n){var i=r&&r[_],o=i.A;return bi(o,n),Ai(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!cs&&se(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var s=Te("Patches").$;return De(r)?s(r,n):this.produce(r,(function(a){return s(a,n)}))},t})(),re=new Cu,Ou=re.produce,Vp=re.produceWithPatches.bind(re),Fp=re.setAutoFreeze.bind(re),Wp=re.setUseProxies.bind(re),zp=re.applyPatches.bind(re),Kp=re.createDraft.bind(re),Gp=re.finishDraft.bind(re),ln=Ou;function ft(t){"@babel/helpers - typeof";return ft=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},ft(t)}function vs(t,e){if(ft(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ft(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gs(t){var e=vs(t,"string");return ft(e)=="symbol"?e:e+""}function ys(t,e,r){return(e=gs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(r),!0).forEach(function(n){ys(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xs(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function G(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 bs=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Di=function(){return Math.random().toString(36).substring(7).split("").join(".")},cn={INIT:"@@redux/INIT"+Di(),REPLACE:"@@redux/REPLACE"+Di(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Di()}};function Tu(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 ki(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(G(1));return r(ki)(t,e)}if(typeof t!="function")throw new Error(G(2));var i=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(G(3));return o}function d(v){if(typeof v!="function")throw new Error(G(4));if(l)throw new Error(G(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(G(6));x=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function p(v){if(!Tu(v))throw new Error(G(7));if(typeof v.type>"u")throw new Error(G(8));if(l)throw new Error(G(9));try{l=!0,o=i(o,v)}finally{l=!1}for(var x=s=a,b=0;b<x.length;b++){var E=x[b];E()}return v}function h(v){if(typeof v!="function")throw new Error(G(10));i=v,p({type:cn.REPLACE})}function m(){var v,x=d;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(G(11));function C(){E.next&&E.next(u())}C();var O=x(C);return{unsubscribe:O}}},v[bs]=function(){return this},v}return p({type:cn.INIT}),n={dispatch:p,subscribe:d,getState:u,replaceReducer:h},n[bs]=m,n}function _u(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:cn.INIT});if(typeof n>"u")throw new Error(G(12));if(typeof r(void 0,{type:cn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(G(13))})}function As(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var o=Object.keys(r),s,a;try{_u(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],b=c[v],E=x(b,u);if(typeof E>"u"){var C=u&&u.type;throw new Error(G(14))}h[v]=E,p=p||E!==b}return p=p||o.length!==Object.keys(c).length,p?h:c}}function jt(){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,i){return function(){return n(i.apply(void 0,arguments))}})}function Es(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(G(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=jt.apply(void 0,a)(i.dispatch),Ii(Ii({},i),{},{dispatch:o})}}}function Ss(t){var e=function(n){var i=n.dispatch,o=n.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,t):s(a)}}};return e}var ws=Ss();ws.withExtraArgument=Ss;var Ui=ws;var Rs=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},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)}})(),Ru=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Bt=function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},Lu=Object.defineProperty,Nu=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertySymbols,Mu=Object.prototype.hasOwnProperty,Iu=Object.prototype.propertyIsEnumerable,Os=function(t,e,r){return e in t?Lu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Xe=function(t,e){for(var r in e||(e={}))Mu.call(e,r)&&Os(t,r,e[r]);if(Cs)for(var n=0,i=Cs(e);n<i.length;n++){var r=i[n];Iu.call(e,r)&&Os(t,r,e[r])}return t},$i=function(t,e){return Nu(t,Pu(e))},Du=function(t,e,r){return new Promise(function(n,i){var o=function(l){try{a(r.next(l))}catch(c){i(c)}},s=function(l){try{a(r.throw(l))}catch(c){i(c)}},a=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var ku=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?jt:jt.apply(null,arguments)},pf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Uu(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 Ze(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return Xe(Xe({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.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 $u=(function(t){Rs(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}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,Bt([void 0],r[0].concat(this)))):new(e.bind.apply(e,Bt([void 0],r.concat(this))))},e})(Array),Hu=(function(t){Rs(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}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,Bt([void 0],r[0].concat(this)))):new(e.bind.apply(e,Bt([void 0],r.concat(this))))},e})(Array);function Bi(t){return me(t)?ln(t,function(){}):t}function ju(t){return typeof t=="boolean"}function Bu(){return function(e){return Vu(e)}}function Vu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new $u;if(r&&(ju(r)?c.push(Ui):c.push(Ui.withExtraArgument(r.extraArgument))),0){if(i)var u;if(s)var d;if(l)var p}return c}var Hi=!0;function Ls(t){var e=Bu(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof i=="function")h=i;else if(Uu(i))h=As(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(e),!Hi&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Hi&&m.some(function(O){return typeof O!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Es.apply(void 0,m),x=jt;l&&(x=ku(Xe({trace:!Hi},typeof l=="object"&&l)));var b=new Hu(v),E=b;Array.isArray(p)?E=Bt([v],p):typeof p=="function"&&(E=p(b));var C=x.apply(void 0,E);return ki(h,u,C)}function Ns(t){var e={},r=[],n,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,i},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return n=o,i}};return t(i),[e,r,n]}function Fu(t){return typeof t=="function"}function Wu(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?Ns(e):[e,r,n],o=i[0],s=i[1],a=i[2],l;if(Fu(t))l=function(){return Bi(t())};else{var c=Bi(t);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=Bt([o[p.type]],s.filter(function(m){var v=m.matcher;return v(p)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(De(m)){var x=m,b=v(x,p);return b===void 0?m:b}else{if(me(m))return ln(m,function(E){return v(E,p)});var b=v(m,p);if(b===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}return m},d)}return u.getInitialState=l,u}function zu(t,e){return t+"/"+e}function Ps(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:Bi(t.initialState),n=t.reducers||{},i=Object.keys(n),o={},s={},a={};i.forEach(function(u){var d=n[u],p=zu(e,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Ze(p,m):Ze(p)});function l(){var u=typeof t.extraReducers=="function"?Ns(t.extraReducers):[t.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,v=u[2],x=v===void 0?void 0:v,b=Xe(Xe({},p),s);return Wu(r,function(E){for(var C in b)E.addCase(C,b[C]);for(var O=0,k=m;O<k.length;O++){var M=k[O];E.addMatcher(M.matcher,M.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:e,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Ku="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Gu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ku[Math.random()*64|0];return e},qu=["name","message","stack","code"],ji=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Ts=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Yu=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=qu;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},vf=(function(){function t(e,r,n){var i=Ze(e+"/fulfilled",function(u,d,p,h){return{payload:u,meta:$i(Xe({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Ze(e+"/pending",function(u,d,p){return{payload:void 0,meta:$i(Xe({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Ze(e+"/rejected",function(u,d,p,h,m){return{payload:h,error:(n&&n.serializeError||Yu)(u||"Rejected"),meta:$i(Xe({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=n?.idGenerator?n.idGenerator(u):Gu(),v=new l,x,b=!1;function E(O){x=O,v.abort()}var C=(function(){return Du(this,null,function(){var O,k,M,ze,mi,Ke,ee;return Ru(this,function(ie){switch(ie.label){case 0:return ie.trys.push([0,4,,5]),ze=(O=n?.condition)==null?void 0:O.call(n,u,{getState:p,extra:h}),Zu(ze)?[4,ze]:[3,2];case 1:ze=ie.sent(),ie.label=2;case 2:if(ze===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=!0,mi=new Promise(function(te,ct){return v.signal.addEventListener("abort",function(){return ct({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(k=n?.getPendingMeta)==null?void 0:k.call(n,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([mi,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(te,ct){return new ji(te,ct)},fulfillWithValue:function(te,ct){return new Ts(te,ct)}})).then(function(te){if(te instanceof ji)throw te;return te instanceof Ts?i(te.payload,m,u,te.meta):i(te,m,u)})])];case 3:return M=ie.sent(),[3,5];case 4:return Ke=ie.sent(),M=Ke instanceof ji?s(null,m,u,Ke.payload,Ke.meta):s(Ke,m,u),[3,5];case 5:return ee=n&&!n.dispatchConditionRejection&&s.match(M)&&M.meta.condition,ee||d(M),[2,M]}})})})();return Object.assign(C,{abort:E,requestId:m,arg:u,unwrap:function(){return C.then(Xu)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t})();function Xu(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Zu(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ms="listener",Is="completed",Ds="cancelled",gf="task-"+Ds,yf="task-"+Is,xf=Ms+"-"+Ds,bf=Ms+"-"+Is;var Vi="listenerMiddleware";var Af=Ze(Vi+"/add"),Ef=Ze(Vi+"/removeAll"),Sf=Ze(Vi+"/remove");var _s,wf=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(_s||(_s=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Ju=function(t){return function(e){setTimeout(e,t)}},Cf=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ju(10);fs();var Qu=Jr(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),un=class extends Qu(Object){};window.ftReduxStores||(window.ftReduxStores={});var ks=class t extends un{static get(e){var r;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,o=window.ftReduxStores[n];if(nn(o))return o;if(i==null)return;let s=Ps({...i,reducers:(r=i.reducers)!==null&&r!==void 0?r:{}}),a=Ls({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=br(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[i.name]=new t(s,a,i.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Qr;let i=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(i));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:i(u)})}}}),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 dn=class{static format(e,r,n,i,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,i,!!o)):this.getIntlDateTime(e,r,n,i,!!o)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,i,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:i?`${a} ${l}`:a}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 pn=f(A()),ed="ft-app-info",_e=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_e.eventName="authentication-change";var Or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Or.eventName="ui-locale-changed";var td={session:(t,e)=>{(0,pn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>w.dispatchEvent(new _e(e.payload)),0))}},w=pn.FtReduxStore.get({name:ed,reducers:td,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 Us=f(A()),fn=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Qf=(0,Us.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(w)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var i,o;return((o=(i=this.metadataDescriptors.find(a=>a.key===n))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1)?a=>dn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return fn([(0,Fi.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),fn([(0,Fi.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),fn([xi({store:w.name,selector:r=>{var n,i;return(i=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&i!==void 0?i:[]}})],e.prototype,"metadataDescriptors",void 0),fn([xi({store:w.name})],e.prototype,"uiLocale",void 0),e});var $s;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})($s||($s={}));var Hs;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Hs||(Hs={}));var js;(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"})(js||(js={}));var Bs;(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"})(Bs||(Bs={}));var Vs;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Vs||(Vs={}));var Fs;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Fs||(Fs={}));var Ws;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ws||(Ws={}));var zs;(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"})(zs||(zs={}));var Ks;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ks||(Ks={}));var Gs;(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"})(Gs||(Gs={}));var qs;(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"})(qs||(qs={}));var Ys;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ys||(Ys={}));var Xs;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Xs||(Xs={}));var Zs;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Zs||(Zs={}));var Js;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Js||(Js={}));var Qs;(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"})(Qs||(Qs={}));var ea;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ea||(ea={}));var ta;(function(t){t.ASC="ASC",t.DESC="DESC"})(ta||(ta={}));var ra;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(ra||(ra={}));var na;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(na||(na={}));var ia;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(ia||(ia={}));var oa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(oa||(oa={}));var sa;(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"})(sa||(sa={}));var aa;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(aa||(aa={}));var la;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(la||(la={}));var ca;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(ca||(ca={}));var ua;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(ua||(ua={}));var I;(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"})(I||(I={}));var ae;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ae||(ae={}));var da;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(da||(da={}));var pa;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(pa||(pa={}));var fa;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(fa||(fa={}));var ha;(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"})(ha||(ha={}));var ma;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(ma||(ma={}));var va;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(va||(va={}));var ga;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ga||(ga={}));var ya;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ya||(ya={}));var xa;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(xa||(xa={}));var ba;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(ba||(ba={}));var Aa;(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"})(Aa||(Aa={}));var hn;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(hn||(hn={}));var rd={[I.PERSONAL_BOOK_SHARE_USER]:[I.PERSONAL_BOOK_USER],[I.HTML_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.PDF_EXPORT_USER]:[I.PERSONAL_BOOK_USER],[I.KHUB_ADMIN]:[I.CONTENT_PUBLISHER],[I.ADMIN]:[I.KHUB_ADMIN,I.USERS_ADMIN,I.PORTAL_ADMIN,I.BEHAVIOR_DATA_USER],[I.GENERATIVE_AI_EXPORT_USER]:[I.GENERATIVE_AI_USER]};function Ea(t,e){return t===e||(rd[t]??[]).some(r=>Ea(r,e))}function Sa(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=>Ea(n,e))}var xn=f(A());var Wi=f(A());var le=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=w.getState(),i=e??n;if(r&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,i,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let i=w.subscribe(()=>{n=t.get(e),n&&(i(),r(n))})}})}};var Vt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:le.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):le.await()}};var B=class extends Vt{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Wi.CacheRegistry,this.cache=e?i.commonCache:new Wi.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 mn=class extends B{async listMySearches(){let{session:e}=w.getState();return Sa(e,I.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var vn=class extends B{async listMyBookmarks(){let e=w.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var gn=class extends B{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=w.getState().session;return!!e?.sessionAuthenticated}};var yn=class extends B{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=w.getState().session;return!!e?.sessionAuthenticated}};var nd="ft-user-assets",id={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(ae).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:i}=e.payload;Ki(t,r,[...zi(t,r),i]),wa(t,r,1,n),Ca(t,i)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;Ki(t,r,zi(t,r).map(i=>i.id===n.id?n:i)),Ca(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:i}=e.payload;Ki(t,r,zi(t,r).filter(o=>o.id!==i)),wa(t,r,-1,n)}},Oa={[ae.SEARCHES]:"savedSearches",[ae.BOOKMARKS]:"bookmarks",[ae.BOOKS]:void 0,[ae.COLLECTIONS]:void 0},zi=(t,e)=>{var r;let n=Oa[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},Ki=(t,e,r)=>{let n=Oa[e];n&&(t[n]=r)},wa=(t,e,r,n)=>{let i=t.assetCounts.allAsset[e];if(i!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,i+r),e===ae.BOOKMARKS&&n)){let o=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,o+r)}},Ca=(t,e)=>{let r=t.assetLabels.map(i=>i.title),n=e.labels.filter(i=>!r.includes(i)).map(i=>({title:i}));t.assetLabels.push(...n)},q=xn.FtReduxStore.get({name:nd,reducers:id,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ae).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Gi=class{constructor(e=new gn,r=new yn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new vn,this.savedSearchesService=new mn,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=w.getState();(0,xn.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(),q.actions.clearAssetCount(),q.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),q.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),q.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();q.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();q.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&q.getState().assetCounts.allAsset[e]!==r.count&&q.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&q.getState().assetCounts.bookmarkByMap[e]!==r.count&&q.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(q.getState().assetCounts.bookmarkByMap).length!==0;e===ae.BOOKMARKS&&r&&q.actions.clearBookmarkCountByMap(),q.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;q.actions.bookmarks(r)}}},od=new Gi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=od);var qi=class{addCommand(e,r=!1){w.commands.add(e,r)}consumeCommand(e){return w.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new qi;var ce=f(A());var Ta,Ft=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},sd=Symbol("clearAfterUnitTest"),bn=class extends(0,ce.withEventBus)(B){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ta]=()=>{this.defaultMessages={},this.cache=new ce.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=w.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 i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,ce.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,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 i;let o=e.toLowerCase(),s=this.resolveContext(o);return new ce.ParametrizedLabelResolver((i=this.defaultMessages[o])!==null&&i!==void 0?i:{},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(i){!(i instanceof ce.CanceledPromiseError)&&r&&console.error(i)}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 i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Ft({loadedContexts:e})),this.dispatchEvent(new Ft({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Ft({loadedContexts:[e]})),this.dispatchEvent(new Ft({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,ce.delay)(0).then(()=>n()).catch(()=>null)))}};Ta=sd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends bn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends bn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Wt=window.FluidTopicsI18nService,An=window.FluidTopicsCustomI18nService;var _a=f(A()),Yi=class{highlightHtml(e,r,n){(0,_a.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new Yi;var Ra=f(A());var Xi=class{isDate(e){var r,n,i,o;return(o=(i=((n=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&o!==void 0?o:!1}format(e,r){var n,i,o,s;if(e==null)return"";try{return Ra.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:w.getState().uiLocale,(i=r?.longFormat)!==null&&i!==void 0?i:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Xi;var La=f(A());var Tr=class{static get(e,r){var n,i,o,s;let a=w.getState(),{lang:l,region:c}=(o=(i=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new La.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Zi=class{urlToSearchRequest(e){return Tr.get().parse(e)}searchRequestToUrl(e){return Tr.get().serialize(e)}};window.FluidTopicsUrlService=new Zi;var ke=f(A());var ht=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};ht.eventName="change";var Ji=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))}},Na=new Ji;var En=class t extends ke.WithEventBus{static build(){return new t(window.history,Na,()=>window.location,!1)}constructor(e,r,n,i){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(i)}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,ke.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new ht(this.currentItem())),0)}installProxies(){let e=r=>(n,i,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};n.apply(i,[c,s,a]),this.setCurrentState(c,!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(ht.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(ht.eventName,e)}currentItem(){return(0,ke.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,ke.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,ke.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,ke.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 i=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,n);)this.hasState(o)&&(i=o),o++;return i}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 i=r??this.currentState.majorStateId,o=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return o==null||o!=i}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=En.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 Pa=f(T());var Ma=Pa.css`
2
+ `;var ka=f(T()),Y=f(N()),vt=f(A());var mt=f(A());function Ia(t,e){let{authenticationRequired:r,session:n}=w.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var Sn=class extends Vt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Qi=class t extends mt.FtStateManager{static build(e){return new t(w,e)}constructor(e,r){super(),this.store=e,this.cache=new mt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Sn,this.cleanSessionDebouncer=new mt.Debouncer,this.reloadDebouncer=new mt.Debouncer(500),this.apiProvider=r??(()=>le.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(_e.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",()=>Ia(()=>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 Or(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)}},Da=Qi.build();var V=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},R=class extends vt.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=Da,this.contextRoot=new gr}render(){return ka.html`
3
3
  <slot></slot>
4
- `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Wt.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};R.elementDefinitions={};R.styles=Ma;G([(0,re.property)()],R.prototype,"baseUrl",void 0);G([(0,re.property)()],R.prototype,"apiIntegrationIdentifier",void 0);G([(0,re.property)()],R.prototype,"apiIntegrationAppVersion",void 0);G([(0,re.property)()],R.prototype,"uiLocale",void 0);G([(0,vt.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);G([(0,vt.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"editorMode",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"noCustom",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);G([(0,re.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],R.prototype,"noCustomComponent",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"withManualResources",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);G([(0,re.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);G([(0,vt.jsonProperty)([])],R.prototype,"messageContexts",void 0);G([(0,vt.jsonProperty)(void 0)],R.prototype,"session",void 0);var $a=f(A());var Ua={"ft-app-context":R};(0,$a.customElements)(Ua);var Ha=f(A()),Je;(function(e){e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.MAP_ATTACHMENT="MAP_ATTACHMENT",e.UD_ATTACHMENT="UD_ATTACHMENT",e.RESOURCE="RESOURCE"})(Je||(Je={}));var Re;(function(e){e.FIT_TO_CONTAINER="fit-to-container",e.ZOOM_REAL_SIZE="zoom-real-size",e.ZOOM_IN="zoom-in",e.ZOOM_OUT="zoom-out",e.ROTATE_LEFT="rotate-left",e.ROTATE_RIGHT="rotate-right"})(Re||(Re={}));var gt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:(0,Ha.deepCopy)(t),composed:!0,bubbles:!0})}};gt.eventName="ft-viewer-loaded";var wn=class extends B{getAsset(t,r,n){let i={[Je.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(t,r),[Je.UD_ATTACHMENT]:()=>this.api.getUdAttachment(t,r),[Je.RESOURCE]:()=>this.api.getMapResource(t,r)};return this.cache.get(r,i[n])}};var Cn=class e extends Dt{static build(t){return new e(Xr(t),new wn)}constructor(t,r){super(t),this.store=t,this.service=r}async load(){let{documentId:t,assetId:r,origin:n}=this.store.getState();if(t&&r&&n){let i=await this.service.getAsset(t,r,n);this.store.actions.document(i.holder),this.store.actions.descriptor({id:i.id,portalUrl:i.portalUrl,filename:i.filename,fingerprint:i.fingerprint,displayName:i.displayName,alt:i.displayName,mimeType:i.mimeType,size:i.size,viewableInCurrentBrowser:i.viewableInCurrentBrowser,contentUrl:i.contentUrl}),this.store.actions.watermark(i.watermark)}}clear(){this.store.clearKeeping("documentId","assetId","origin")}reload(){return this.clear(),this.load()}async init(t,r,n){return this.store.actions.documentId(t),this.store.actions.assetId(r),this.store.actions.origin(n),await this.reload(),this.store.getState()}};var On=f(N());var _r=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Ue=class extends zt.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=Cn.build(this.id||(0,zt.randomId)(6))}render(){return ja.html`
4
+ `}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=>Wt.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())}};R.elementDefinitions={};R.styles=Ma;V([(0,Y.property)()],R.prototype,"baseUrl",void 0);V([(0,Y.property)()],R.prototype,"tenantId",void 0);V([(0,Y.property)()],R.prototype,"apiIntegrationIdentifier",void 0);V([(0,Y.property)()],R.prototype,"apiIntegrationAppVersion",void 0);V([(0,Y.property)()],R.prototype,"uiLocale",void 0);V([(0,vt.jsonProperty)(null)],R.prototype,"availableUiLocales",void 0);V([(0,vt.jsonProperty)(null)],R.prototype,"metadataConfiguration",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"editorMode",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"noCustom",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"openExternalDocumentInNewTab",void 0);V([(0,Y.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],R.prototype,"noCustomComponent",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"withManualResources",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"navigatorOnline",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"forcedOffline",void 0);V([(0,Y.property)({type:Boolean})],R.prototype,"authenticationRequired",void 0);V([(0,vt.jsonProperty)([])],R.prototype,"messageContexts",void 0);V([(0,vt.jsonProperty)(void 0)],R.prototype,"session",void 0);var $a=f(A());var Ua={"ft-app-context":R};(0,$a.customElements)(Ua);var Ha=f(A()),Je;(function(t){t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.UD_ATTACHMENT="UD_ATTACHMENT",t.RESOURCE="RESOURCE"})(Je||(Je={}));var Re;(function(t){t.FIT_TO_CONTAINER="fit-to-container",t.ZOOM_REAL_SIZE="zoom-real-size",t.ZOOM_IN="zoom-in",t.ZOOM_OUT="zoom-out",t.ROTATE_LEFT="rotate-left",t.ROTATE_RIGHT="rotate-right"})(Re||(Re={}));var gt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:(0,Ha.deepCopy)(e),composed:!0,bubbles:!0})}};gt.eventName="ft-viewer-loaded";var wn=class extends B{getAsset(e,r,n){let i={[Je.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(e,r),[Je.UD_ATTACHMENT]:()=>this.api.getUdAttachment(e,r),[Je.RESOURCE]:()=>this.api.getMapResource(e,r)};return this.cache.get(r,i[n])}};var Cn=class t extends It{static build(e){return new t(Xr(e),new wn)}constructor(e,r){super(e),this.store=e,this.service=r}async load(){let{documentId:e,assetId:r,origin:n}=this.store.getState();if(e&&r&&n){let i=await this.service.getAsset(e,r,n);this.store.actions.document(i.holder),this.store.actions.descriptor({id:i.id,portalUrl:i.portalUrl,filename:i.filename,fingerprint:i.fingerprint,displayName:i.displayName,alt:i.displayName,mimeType:i.mimeType,size:i.size,viewableInCurrentBrowser:i.viewableInCurrentBrowser,contentUrl:i.contentUrl}),this.store.actions.watermark(i.watermark)}}clear(){this.store.clearKeeping("documentId","assetId","origin")}reload(){return this.clear(),this.load()}async init(e,r,n){return this.store.actions.documentId(e),this.store.actions.assetId(r),this.store.actions.origin(n),await this.reload(),this.store.getState()}};var On=f(N());var _r=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ue=class extends zt.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=Cn.build(this.id||(0,zt.randomId)(6))}render(){return ja.html`
5
5
  <slot></slot>
6
- `}willUpdate(t){super.willUpdate(t),(t.has("documentId")||t.has("assetId")||t.has("origin"))&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.init(this.documentId,this.assetId,this.origin);this.documentId&&this.assetId&&this.origin&&this.dispatchEvent(new gt(t))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};_r([(0,On.property)()],Ue.prototype,"documentId",void 0);_r([(0,On.property)()],Ue.prototype,"assetId",void 0);_r([(0,On.property)()],Ue.prototype,"origin",void 0);_r([yr({context:gi})],Ue.prototype,"viewerStateManager",void 0);_r([(0,zt.reduxEventListener)({eventName:_e.eventName})],Ue.prototype,"onAuthenticationChange",null);var Ba=f(A()),Y=class extends Ba.FtLitElementRedux{};var ge=f(T()),Et=f(A()),ye=f(N());var Va=f(T()),Fa=f(A()),ad={position:Fa.FtCssVariableFactory.create("--ft-content-watermark-position","Position property of the watermark container","POSITION","sticky")},Wa=Va.css`
6
+ `}willUpdate(e){super.willUpdate(e),(e.has("documentId")||e.has("assetId")||e.has("origin"))&&this.initStateManager()}async initStateManager(){let e=await this.viewerStateManager.init(this.documentId,this.assetId,this.origin);this.documentId&&this.assetId&&this.origin&&this.dispatchEvent(new gt(e))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};_r([(0,On.property)()],Ue.prototype,"documentId",void 0);_r([(0,On.property)()],Ue.prototype,"assetId",void 0);_r([(0,On.property)()],Ue.prototype,"origin",void 0);_r([yr({context:gi})],Ue.prototype,"viewerStateManager",void 0);_r([(0,zt.reduxEventListener)({eventName:_e.eventName})],Ue.prototype,"onAuthenticationChange",null);var Ba=f(A()),X=class extends Ba.FtLitElementRedux{};var ge=f(T()),Et=f(A()),ye=f(N());var Va=f(T()),Fa=f(A()),ad={position:Fa.FtCssVariableFactory.create("--ft-content-watermark-position","Position property of the watermark container","POSITION","sticky")},Wa=Va.css`
7
7
  :host {
8
8
  position: absolute;
9
9
  top: 0;
@@ -22,9 +22,9 @@
22
22
  .ft-watermark {
23
23
  z-index: 79;
24
24
  }
25
- `;var ir=f(T()),At=f(N());var Sl=f(eo()),wl=f(A());var ao=globalThis,Ka=e=>e,Tn=ao.trustedTypes,Ga=Tn?Tn.createPolicy("lit-html",{createHTML:e=>e}):void 0,Qa="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,el="?"+Qe,ld=`<${el}>`,bt=document,_n=()=>bt.createComment(""),Lr=e=>e===null||typeof e!="object"&&typeof e!="function",lo=Array.isArray,cd=e=>lo(e)||typeof e?.[Symbol.iterator]=="function",to=`[
25
+ `;var ir=f(T()),At=f(N());var Sl=f(eo()),wl=f(A());var ao=globalThis,Ka=t=>t,Tn=ao.trustedTypes,Ga=Tn?Tn.createPolicy("lit-html",{createHTML:t=>t}):void 0,Qa="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,el="?"+Qe,ld=`<${el}>`,bt=document,_n=()=>bt.createComment(""),Lr=t=>t===null||typeof t!="object"&&typeof t!="function",lo=Array.isArray,cd=t=>lo(t)||typeof t?.[Symbol.iterator]=="function",to=`[
26
26
  \f\r]`,Rr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qa=/-->/g,Ya=/>/g,yt=RegExp(`>|${to}(?:([^\\s"'>=/]+)(${to}*=${to}*(?:[^
27
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Xa=/'/g,Za=/"/g,tl=/^(?:script|style|textarea|title)$/i,co=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),rl=co(1),nl=co(2),il=co(3),Nr=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Ja=new WeakMap,xt=bt.createTreeWalker(bt,129);function ol(e,t){if(!lo(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ga!==void 0?Ga.createHTML(t):t}var ud=(e,t)=>{let r=e.length-1,n=[],i,o=t===2?"<svg>":t===3?"<math>":"",s=Rr;for(let a=0;a<r;a++){let l=e[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===Rr?u[1]==="!--"?s=qa:u[1]!==void 0?s=Ya:u[2]!==void 0?(tl.test(u[2])&&(i=RegExp("</"+u[2],"g")),s=yt):u[3]!==void 0&&(s=yt):s===yt?u[0]===">"?(s=i??Rr,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?yt:u[3]==='"'?Za:Xa):s===Za||s===Xa?s=yt:s===qa||s===Ya?s=Rr:(s=yt,i=void 0);let h=s===yt&&e[a+1].startsWith("/>")?" ":"";o+=s===Rr?l+ld:d>=0?(n.push(c),l.slice(0,d)+Qa+l.slice(d)+Qe+h):l+Qe+(d===-2?a:h)}return[ol(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},Pr=class e{constructor({strings:t,_$litType$:r},n){let i;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,u]=ud(t,r);if(this.el=e.createElement(c,n),xt.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=xt.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(Qa)){let p=u[s++],h=i.getAttribute(d).split(Qe),m=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?no:m[1]==="?"?io:m[1]==="@"?oo:Gt}),i.removeAttribute(d)}else d.startsWith(Qe)&&(l.push({type:6,index:o}),i.removeAttribute(d));if(tl.test(i.tagName)){let d=i.textContent.split(Qe),p=d.length-1;if(p>0){i.textContent=Tn?Tn.emptyScript:"";for(let h=0;h<p;h++)i.append(d[h],_n()),xt.nextNode(),l.push({type:2,index:++o});i.append(d[p],_n())}}}else if(i.nodeType===8)if(i.data===el)l.push({type:2,index:o});else{let d=-1;for(;(d=i.data.indexOf(Qe,d+1))!==-1;)l.push({type:7,index:o}),d+=Qe.length-1}o++}}static createElement(t,r){let n=bt.createElement("template");return n.innerHTML=t,n}};function Kt(e,t,r=e,n){if(t===Nr)return t;let i=n!==void 0?r._$Co?.[n]:r._$Cl,o=Lr(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(t=Kt(e,i._$AS(e,t.values),i,n)),t}var ro=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,i=(t?.creationScope??bt).importNode(r,!0);xt.currentNode=i;let o=xt.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Rn(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new so(o,this,t)),this._$AV.push(c),l=n[++a]}s!==l?.index&&(o=xt.nextNode(),s++)}return xt.currentNode=bt,i}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},Rn=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,i){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Kt(this,t,r),Lr(t)?t===j||t==null||t===""?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==Nr&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):cd(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==j&&Lr(this._$AH)?this._$AA.nextSibling.data=t:this.T(bt.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=Pr.createElement(ol(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let o=new ro(i,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=Ja.get(t.strings);return r===void 0&&Ja.set(t.strings,r=new Pr(t)),r}k(t){lo(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let o of t)i===r.length?r.push(n=new e(this.O(_n()),this.O(_n()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=Ka(t).nextSibling;Ka(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Gt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,i,o){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(t,r=this,n,i){let o=this.strings,s=!1;if(o===void 0)t=Kt(this,t,r,0),s=!Lr(t)||t!==this._$AH&&t!==Nr,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=Kt(this,a[n+l],r,l),c===Nr&&(c=this._$AH[l]),s||=!Lr(c)||c!==this._$AH[l],c===j?t=j:t!==j&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!i&&this.j(t)}j(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},no=class extends Gt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===j?void 0:t}},io=class extends Gt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==j)}},oo=class extends Gt{constructor(t,r,n,i,o){super(t,r,n,i,o),this.type=5}_$AI(t,r=this){if((t=Kt(this,t,r,0)??j)===Nr)return;let n=this._$AH,i=t===j&&n!==j||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==j&&(n===j||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},so=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Kt(this,t)}};var dd=ao.litHtmlPolyfillSupport;dd?.(Pr,Rn),(ao.litHtmlVersions??=[]).push("3.3.3");var al=Symbol.for(""),pd=e=>{if(e?.r===al)return e?._$litStatic$},uo=e=>({_$litStatic$:e,r:al});var sl=new Map,po=e=>(t,...r)=>{let n=r.length,i,o,s=[],a=[],l,c=0,u=!1;for(;c<n;){for(l=t[c];c<n&&(o=r[c],(i=pd(o))!==void 0);)l+=i+t[++c],u=!0;c!==n&&a.push(o),s.push(l),c++}if(c===n&&s.push(t[n]),u){let d=s.join("$$lit$$");(t=sl.get(d))===void 0&&(s.raw=s,sl.set(d,t=s)),r=a}return e(t,...r)},fo=po(rl),Ov=po(nl),Tv=po(il);var ho=f(N()),bl=f(A());var X;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(X||(X={}));var ue=f(T()),y=f(A()),ll=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.titleFont),$e=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.contentFont),S={fontFamily:$e,fontSize:y.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:y.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:y.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:y.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:y.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ll),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit")},Yt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ll),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit")},Xt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit")},Zt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit")},Jt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit")},Qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit")},er={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit")},tr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit")},rr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase")},nr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-button-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase")},cl=ue.css`
27
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Xa=/'/g,Za=/"/g,tl=/^(?:script|style|textarea|title)$/i,co=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),rl=co(1),nl=co(2),il=co(3),Nr=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),Ja=new WeakMap,xt=bt.createTreeWalker(bt,129);function ol(t,e){if(!lo(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ga!==void 0?Ga.createHTML(e):e}var ud=(t,e)=>{let r=t.length-1,n=[],i,o=e===2?"<svg>":e===3?"<math>":"",s=Rr;for(let a=0;a<r;a++){let l=t[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===Rr?u[1]==="!--"?s=qa:u[1]!==void 0?s=Ya:u[2]!==void 0?(tl.test(u[2])&&(i=RegExp("</"+u[2],"g")),s=yt):u[3]!==void 0&&(s=yt):s===yt?u[0]===">"?(s=i??Rr,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?yt:u[3]==='"'?Za:Xa):s===Za||s===Xa?s=yt:s===qa||s===Ya?s=Rr:(s=yt,i=void 0);let h=s===yt&&t[a+1].startsWith("/>")?" ":"";o+=s===Rr?l+ld:d>=0?(n.push(c),l.slice(0,d)+Qa+l.slice(d)+Qe+h):l+Qe+(d===-2?a:h)}return[ol(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},Pr=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=ud(e,r);if(this.el=t.createElement(c,n),xt.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=xt.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(Qa)){let p=u[s++],h=i.getAttribute(d).split(Qe),m=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?no:m[1]==="?"?io:m[1]==="@"?oo:Gt}),i.removeAttribute(d)}else d.startsWith(Qe)&&(l.push({type:6,index:o}),i.removeAttribute(d));if(tl.test(i.tagName)){let d=i.textContent.split(Qe),p=d.length-1;if(p>0){i.textContent=Tn?Tn.emptyScript:"";for(let h=0;h<p;h++)i.append(d[h],_n()),xt.nextNode(),l.push({type:2,index:++o});i.append(d[p],_n())}}}else if(i.nodeType===8)if(i.data===el)l.push({type:2,index:o});else{let d=-1;for(;(d=i.data.indexOf(Qe,d+1))!==-1;)l.push({type:7,index:o}),d+=Qe.length-1}o++}}static createElement(e,r){let n=bt.createElement("template");return n.innerHTML=e,n}};function Kt(t,e,r=t,n){if(e===Nr)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,o=Lr(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=Kt(t,i._$AS(t,e.values),i,n)),e}var ro=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??bt).importNode(r,!0);xt.currentNode=i;let o=xt.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Rn(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new so(o,this,e)),this._$AV.push(c),l=n[++a]}s!==l?.index&&(o=xt.nextNode(),s++)}return xt.currentNode=bt,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},Rn=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=Kt(this,e,r),Lr(e)?e===j||e==null||e===""?(this._$AH!==j&&this._$AR(),this._$AH=j):e!==this._$AH&&e!==Nr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):cd(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==j&&Lr(this._$AH)?this._$AA.nextSibling.data=e:this.T(bt.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Pr.createElement(ol(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let o=new ro(i,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=Ja.get(e.strings);return r===void 0&&Ja.set(e.strings,r=new Pr(e)),r}k(e){lo(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let o of e)i===r.length?r.push(n=new t(this.O(_n()),this.O(_n()),this,this.options)):n=r[i],n._$AI(o),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=Ka(e).nextSibling;Ka(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Gt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,o){this.type=1,this._$AH=j,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=j}_$AI(e,r=this,n,i){let o=this.strings,s=!1;if(o===void 0)e=Kt(this,e,r,0),s=!Lr(e)||e!==this._$AH&&e!==Nr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Kt(this,a[n+l],r,l),c===Nr&&(c=this._$AH[l]),s||=!Lr(c)||c!==this._$AH[l],c===j?e=j:e!==j&&(e+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!i&&this.j(e)}j(e){e===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},no=class extends Gt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===j?void 0:e}},io=class extends Gt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==j)}},oo=class extends Gt{constructor(e,r,n,i,o){super(e,r,n,i,o),this.type=5}_$AI(e,r=this){if((e=Kt(this,e,r,0)??j)===Nr)return;let n=this._$AH,i=e===j&&n!==j||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,o=e!==j&&(n===j||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},so=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Kt(this,e)}};var dd=ao.litHtmlPolyfillSupport;dd?.(Pr,Rn),(ao.litHtmlVersions??=[]).push("3.3.3");var al=Symbol.for(""),pd=t=>{if(t?.r===al)return t?._$litStatic$},uo=t=>({_$litStatic$:t,r:al});var sl=new Map,po=t=>(e,...r)=>{let n=r.length,i,o,s=[],a=[],l,c=0,u=!1;for(;c<n;){for(l=e[c];c<n&&(o=r[c],(i=pd(o))!==void 0);)l+=i+e[++c],u=!0;c!==n&&a.push(o),s.push(l),c++}if(c===n&&s.push(e[n]),u){let d=s.join("$$lit$$");(e=sl.get(d))===void 0&&(s.raw=s,sl.set(d,e=s)),r=a}return t(e,...r)},fo=po(rl),Ov=po(nl),Tv=po(il);var ho=f(N()),bl=f(A());var Z;(function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"})(Z||(Z={}));var ue=f(T()),y=f(A()),ll=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.titleFont),$e=y.FtCssVariableFactory.extend("--ft-typography-font-family","",y.designSystemVariables.contentFont),S={fontFamily:$e,fontSize:y.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:y.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:y.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:y.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:y.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-font-family","",ll),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-font-size","",S.fontSize,"20px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",S.letterSpacing,"0.15px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-line-height","",S.lineHeight,"1.2"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",S.textTransform,"inherit")},Yt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",ll),fontSize:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",S.letterSpacing,"0.105px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",S.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",S.textTransform,"inherit")},Xt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",S.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",S.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",S.letterSpacing,"0.144px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",S.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",S.textTransform,"inherit")},Zt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",S.letterSpacing,"0.098px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",S.lineHeight,"1.7"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",S.textTransform,"inherit")},Jt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",S.fontSize,"16px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",S.letterSpacing,"0.496px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",S.lineHeight,"1.5"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",S.textTransform,"inherit")},Qt={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",S.letterSpacing,"0.252px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",S.lineHeight,"1.4"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",S.textTransform,"inherit")},er={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",S.fontSize,"12px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",S.letterSpacing,"0.396px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",S.lineHeight,"1.33"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",S.textTransform,"inherit")},tr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",S.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",S.letterSpacing,"0.33px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",S.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",S.textTransform,"inherit")},rr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",S.fontSize,"10px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",S.fontWeight,"normal"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",S.letterSpacing,"1.5px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",S.lineHeight,"1.6"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",S.textTransform,"uppercase")},nr={fontFamily:y.FtCssVariableFactory.extend("--ft-typography-button-font-family","",$e),fontSize:y.FtCssVariableFactory.extend("--ft-typography-button-font-size","",S.fontSize,"14px"),fontWeight:y.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",S.fontWeight,"600"),letterSpacing:y.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",S.letterSpacing,"1.246px"),lineHeight:y.FtCssVariableFactory.extend("--ft-typography-button-line-height","",S.lineHeight,"1.15"),textTransform:y.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",S.textTransform,"uppercase")},cl=ue.css`
28
28
  .ft-typography--title {
29
29
  font-family: ${qt.fontFamily};
30
30
  font-size: ${qt.fontSize};
@@ -119,7 +119,7 @@
119
119
  .ft-typography {
120
120
  vertical-align: inherit;
121
121
  }
122
- `;var xl=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},V=class extends bl.FtLitElement{constructor(){super(...arguments),this.variant=X.body1}render(){return this.element?fo`
122
+ `;var xl=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},F=class extends bl.FtLitElement{constructor(){super(...arguments),this.variant=Z.body1}render(){return this.element?fo`
123
123
  <${uo(this.element)}
124
124
  part="text"
125
125
  class="ft-typography ft-typography--${this.variant}">
@@ -127,7 +127,7 @@
127
127
  </${uo(this.element)}>
128
128
  `:fo`
129
129
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
130
- `}};V.styles=[cl,ul,dl,pl,Ln,fl,hl,ml,vl,gl,yl];xl([(0,ho.property)()],V.prototype,"element",void 0);xl([(0,ho.property)()],V.prototype,"variant",void 0);var El=f(A());var Al={"ft-typography":V};(0,El.customElements)(Al);var Nn=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},ve=class extends wl.FtLitElement{constructor(){super(...arguments),this.height=0,this.resizeObserver=new ResizeObserver(([t])=>{this.height=Math.min(t.contentRect.height,t.contentRect.width)})}render(){var t,r,n;return this.watermark?ir.html`
130
+ `}};F.styles=[cl,ul,dl,pl,Ln,fl,hl,ml,vl,gl,yl];xl([(0,ho.property)()],F.prototype,"element",void 0);xl([(0,ho.property)()],F.prototype,"variant",void 0);var El=f(A());var Al={"ft-typography":F};(0,El.customElements)(Al);var Nn=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},ve=class extends wl.FtLitElement{constructor(){super(...arguments),this.height=0,this.resizeObserver=new ResizeObserver(([e])=>{this.height=Math.min(e.contentRect.height,e.contentRect.width)})}render(){var e,r,n;return this.watermark?ir.html`
131
131
  <style>
132
132
  .ft-watermark {
133
133
  height: ${this.height}px;
@@ -140,24 +140,24 @@
140
140
  <text x="0" y="0"
141
141
  text-anchor="middle"
142
142
  transform="rotate(-45)"
143
- fill="${(t=this.watermark)===null||t===void 0?void 0:t.color}"
143
+ fill="${(e=this.watermark)===null||e===void 0?void 0:e.color}"
144
144
  fill-opacity="${(r=this.watermark)===null||r===void 0?void 0:r.opacity}%">
145
145
  ${(0,Sl.repeat)(((n=this.watermark)===null||n===void 0?void 0:n.text)||[],i=>ir.svg`<tspan x="0" dy="1.2em">${i}</tspan>`)}
146
146
  </text>
147
147
  </svg>
148
148
  </div>
149
- `:ir.nothing}updated(t){if(super.updated(t),t.has("watermark")&&this.watermark){let r=this.svg.getBBox({stroke:!0});this.svg.setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height)}t.has("heightReference")&&this.heightReference&&(this.resizeObserver.disconnect(),this.resizeObserver.observe(this.heightReference))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}};ve.styles=[Wa,Ln];Nn([(0,At.query)(".ft-watermark")],ve.prototype,"svg",void 0);Nn([(0,At.property)({attribute:!1})],ve.prototype,"watermark",void 0);Nn([(0,At.property)({attribute:!1})],ve.prototype,"heightReference",void 0);Nn([(0,At.state)()],ve.prototype,"height",void 0);var Ol=f(A());var Cl={"ft-content-watermark":ve};(0,Ol.customElements)(Cl);var _l=f(mo()),ne=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},P=class extends(0,Et.withConditionalVisibility)(Y){constructor(){super(...arguments),this.viewerType="none",this.inlineSvgAllowed=!1}render(){return ge.html`
149
+ `:ir.nothing}updated(e){if(super.updated(e),e.has("watermark")&&this.watermark){let r=this.svg.getBBox({stroke:!0});this.svg.setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height)}e.has("heightReference")&&this.heightReference&&(this.resizeObserver.disconnect(),this.resizeObserver.observe(this.heightReference))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}};ve.styles=[Wa,Ln];Nn([(0,At.query)(".ft-watermark")],ve.prototype,"svg",void 0);Nn([(0,At.property)({attribute:!1})],ve.prototype,"watermark",void 0);Nn([(0,At.property)({attribute:!1})],ve.prototype,"heightReference",void 0);Nn([(0,At.state)()],ve.prototype,"height",void 0);var Ol=f(A());var Cl={"ft-content-watermark":ve};(0,Ol.customElements)(Cl);var _l=f(mo()),ne=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},P=class extends(0,Et.withConditionalVisibility)(X){constructor(){super(...arguments),this.viewerType="none",this.inlineSvgAllowed=!1}render(){return ge.html`
150
150
  ${this.renderContent()}
151
151
  <ft-content-watermark part="watermark"
152
152
  .watermark=${this.watermark}
153
153
  .exportpartsPrefixes=${["watermark"]}
154
154
  .heightReference=${this}></ft-content-watermark>
155
- `}renderContent(){var t;switch(this.viewerType){case"image":return this.renderImageViewer();case"inline-svg":return this.renderImageViewer();case"video":return this.renderVideoViewer();case"pdf":return this.renderPdfViewer();case"iframe":return this.renderIframeViewer((t=this.descriptor)===null||t===void 0?void 0:t.contentUrl);default:return ge.nothing}}renderImageViewer(){var t,r;return ge.html`
155
+ `}renderContent(){var e;switch(this.viewerType){case"image":return this.renderImageViewer();case"inline-svg":return this.renderImageViewer();case"video":return this.renderVideoViewer();case"pdf":return this.renderPdfViewer();case"iframe":return this.renderIframeViewer((e=this.descriptor)===null||e===void 0?void 0:e.contentUrl);default:return ge.nothing}}renderImageViewer(){var e,r;return ge.html`
156
156
  <div class="image-viewer">
157
157
  <div class="image-viewer-content">
158
158
  <div class="image-container">
159
159
  ${this.viewerType==="image"?ge.html`
160
- <img src="${(t=this.descriptor)===null||t===void 0?void 0:t.contentUrl}"
160
+ <img src="${(e=this.descriptor)===null||e===void 0?void 0:e.contentUrl}"
161
161
  alt="${(r=this.descriptor)===null||r===void 0?void 0:r.alt}"
162
162
  @load=${this.onImageLoad}>
163
163
  `:ge.html`
@@ -167,13 +167,13 @@
167
167
  </div>
168
168
  </div>
169
169
  </div>
170
- `}onImageLoad(){var t;this.initialImageHeight=this.image.naturalHeight===0?this.image.clientHeight:this.image.naturalHeight,this.initialImageWidth=this.image.naturalWidth===0?this.image.clientWidth:this.image.naturalWidth,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}onSvgLoad(){var t;(this.svg.clientWidth===0||this.svg.clientHeight===0)&&(this.svg.style.width="90vw",this.svg.style.height="90vh"),this.initialImageHeight=this.svg.viewBox.baseVal.height===0?this.svg.clientHeight:this.svg.viewBox.baseVal.height,this.initialImageWidth=this.svg.viewBox.baseVal.width===0?this.svg.clientWidth:this.svg.viewBox.baseVal.width,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}getImageToViewerRatio(){if(this.initialImageHeight!=null&&this.initialImageWidth!=null){let t=this.initialImageHeight/this.initialImageWidth,r=this.clientHeight/this.clientWidth;return t>r?this.clientHeight/this.initialImageHeight:this.clientWidth/this.initialImageWidth}}renderVideoViewer(){var t;return ge.html`
171
- <video src="${(t=this.descriptor)===null||t===void 0?void 0:t.contentUrl}" controls></video>
172
- `}renderPdfViewer(){var t;let r=new URLSearchParams({file:this.descriptor.contentUrl});return this.renderIframeViewer(`${(t=le.get())===null||t===void 0?void 0:t.makeAbsolute("/pdf-viewer")}?${r}`)}renderIframeViewer(t){var r;return ge.html`
173
- <iframe src="${t}"
170
+ `}onImageLoad(){var e;this.initialImageHeight=this.image.naturalHeight===0?this.image.clientHeight:this.image.naturalHeight,this.initialImageWidth=this.image.naturalWidth===0?this.image.clientWidth:this.image.naturalWidth,(e=this.viewerStateManager)===null||e===void 0||e.setZoom(Math.min(1,this.getImageToViewerRatio()))}onSvgLoad(){var e;(this.svg.clientWidth===0||this.svg.clientHeight===0)&&(this.svg.style.width="90vw",this.svg.style.height="90vh"),this.initialImageHeight=this.svg.viewBox.baseVal.height===0?this.svg.clientHeight:this.svg.viewBox.baseVal.height,this.initialImageWidth=this.svg.viewBox.baseVal.width===0?this.svg.clientWidth:this.svg.viewBox.baseVal.width,(e=this.viewerStateManager)===null||e===void 0||e.setZoom(Math.min(1,this.getImageToViewerRatio()))}getImageToViewerRatio(){if(this.initialImageHeight!=null&&this.initialImageWidth!=null){let e=this.initialImageHeight/this.initialImageWidth,r=this.clientHeight/this.clientWidth;return e>r?this.clientHeight/this.initialImageHeight:this.clientWidth/this.initialImageWidth}}renderVideoViewer(){var e;return ge.html`
171
+ <video src="${(e=this.descriptor)===null||e===void 0?void 0:e.contentUrl}" controls></video>
172
+ `}renderPdfViewer(){var e;let r=new URLSearchParams({file:this.descriptor.contentUrl});return this.renderIframeViewer(`${(e=le.get())===null||e===void 0?void 0:e.makeAbsolute("/pdf-viewer")}?${r}`)}renderIframeViewer(e){var r;return ge.html`
173
+ <iframe src="${e}"
174
174
  title="${(r=this.descriptor)===null||r===void 0?void 0:r.alt}"
175
175
  ></iframe>
176
- `}willUpdate(t){var r,n,i;super.willUpdate(t),t.has("descriptor")&&(this.isVisible=!!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser),this.initialImageHeight=void 0,this.initialImageWidth=void 0,this.imageHeight=void 0,this.imageWidth=void 0,(n=this.viewerStateManager)===null||n===void 0||n.setZoom(void 0),(i=this.viewerStateManager)===null||i===void 0||i.setRotation(0),this.svgContent=void 0),t.has("zoom")&&(this.imageHeight=this.zoom&&this.initialImageHeight?this.initialImageHeight*this.zoom:void 0,this.imageWidth=this.zoom&&this.initialImageWidth?this.initialImageWidth*this.zoom:void 0)}updated(t){var r,n,i,o,s,a;super.updated(t),!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser)||!(!((n=this.descriptor)===null||n===void 0)&&n.contentUrl)?this.viewerType="none":this.inlineSvgAllowed&&(!((i=this.descriptor)===null||i===void 0)&&i.mimeType.startsWith("image/svg"))?this.viewerType="inline-svg":!((o=this.descriptor)===null||o===void 0)&&o.mimeType.startsWith("image/")?this.viewerType="image":!((s=this.descriptor)===null||s===void 0)&&s.mimeType.startsWith("video/")?this.viewerType="video":((a=this.descriptor)===null||a===void 0?void 0:a.mimeType)==="application/pdf"?this.viewerType="pdf":this.viewerType="iframe"}contentAvailableCallback(t){var r,n,i,o;if(super.contentAvailableCallback(t),(this.viewerType==="image"||this.viewerType==="inline-svg")&&(t.has("zoom")&&this.zoom==null&&((r=this.viewerStateManager)===null||r===void 0||r.setZoom(this.getImageToViewerRatio())),t.has("zoom")||t.has("rotation"))){let s=this.image||this.svg;if(s&&(s.style.transform=`scaleX(${this.zoom}) scaleY(${this.zoom}) rotate(${this.rotation}deg)`),this.imageViewer&&this.imageContainer&&s){let a=(this.imageViewer.scrollTop+this.imageViewer.clientHeight/2)/this.imageViewer.scrollHeight,l=(this.imageViewer.scrollLeft+this.imageViewer.clientWidth/2)/this.imageViewer.scrollWidth,{height:c,width:u}=s.getClientRects()[0];this.imageContainer.style.height=`${c}px`,this.imageContainer.style.width=`${u}px`,this.imageViewer.scrollTop=a*this.imageViewer.scrollHeight-this.imageViewer.clientHeight/2,this.imageViewer.scrollLeft=l*this.imageViewer.scrollWidth-this.imageViewer.clientWidth/2}}this.viewerType==="inline-svg"&&(t.has("descriptor")&&(!((n=this.descriptor)===null||n===void 0)&&n.contentUrl)&&((i=le.get())===null||i===void 0||i.fetch((o=this.descriptor)===null||o===void 0?void 0:o.contentUrl).then(s=>s.text()).then(s=>this.svgContent=s)),t.has("svgContent")&&this.svgContent&&this.onSvgLoad())}};P.elementDefinitions={"ft-content-watermark":ve};P.styles=ge.css`
176
+ `}willUpdate(e){var r,n,i;super.willUpdate(e),e.has("descriptor")&&(this.isVisible=!!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser),this.initialImageHeight=void 0,this.initialImageWidth=void 0,this.imageHeight=void 0,this.imageWidth=void 0,(n=this.viewerStateManager)===null||n===void 0||n.setZoom(void 0),(i=this.viewerStateManager)===null||i===void 0||i.setRotation(0),this.svgContent=void 0),e.has("zoom")&&(this.imageHeight=this.zoom&&this.initialImageHeight?this.initialImageHeight*this.zoom:void 0,this.imageWidth=this.zoom&&this.initialImageWidth?this.initialImageWidth*this.zoom:void 0)}updated(e){var r,n,i,o,s,a;super.updated(e),!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser)||!(!((n=this.descriptor)===null||n===void 0)&&n.contentUrl)?this.viewerType="none":this.inlineSvgAllowed&&(!((i=this.descriptor)===null||i===void 0)&&i.mimeType.startsWith("image/svg"))?this.viewerType="inline-svg":!((o=this.descriptor)===null||o===void 0)&&o.mimeType.startsWith("image/")?this.viewerType="image":!((s=this.descriptor)===null||s===void 0)&&s.mimeType.startsWith("video/")?this.viewerType="video":((a=this.descriptor)===null||a===void 0?void 0:a.mimeType)==="application/pdf"?this.viewerType="pdf":this.viewerType="iframe"}contentAvailableCallback(e){var r,n,i,o;if(super.contentAvailableCallback(e),(this.viewerType==="image"||this.viewerType==="inline-svg")&&(e.has("zoom")&&this.zoom==null&&((r=this.viewerStateManager)===null||r===void 0||r.setZoom(this.getImageToViewerRatio())),e.has("zoom")||e.has("rotation"))){let s=this.image||this.svg;if(s&&(s.style.transform=`scaleX(${this.zoom}) scaleY(${this.zoom}) rotate(${this.rotation}deg)`),this.imageViewer&&this.imageContainer&&s){let a=(this.imageViewer.scrollTop+this.imageViewer.clientHeight/2)/this.imageViewer.scrollHeight,l=(this.imageViewer.scrollLeft+this.imageViewer.clientWidth/2)/this.imageViewer.scrollWidth,{height:c,width:u}=s.getClientRects()[0];this.imageContainer.style.height=`${c}px`,this.imageContainer.style.width=`${u}px`,this.imageViewer.scrollTop=a*this.imageViewer.scrollHeight-this.imageViewer.clientHeight/2,this.imageViewer.scrollLeft=l*this.imageViewer.scrollWidth-this.imageViewer.clientWidth/2}}this.viewerType==="inline-svg"&&(e.has("descriptor")&&(!((n=this.descriptor)===null||n===void 0)&&n.contentUrl)&&((i=le.get())===null||i===void 0||i.fetch((o=this.descriptor)===null||o===void 0?void 0:o.contentUrl).then(s=>s.text()).then(s=>this.svgContent=s)),e.has("svgContent")&&this.svgContent&&this.onSvgLoad())}};P.elementDefinitions={"ft-content-watermark":ve};P.styles=ge.css`
177
177
  :host {
178
178
  display: block;
179
179
  min-height: 100px;
@@ -215,12 +215,12 @@
215
215
  max-height: 100%;
216
216
  border: none;
217
217
  }
218
- `;ne([(0,Et.redux)({store:"viewer"})],P.prototype,"descriptor",void 0);ne([(0,ye.state)()],P.prototype,"viewerType",void 0);ne([(0,ye.state)()],P.prototype,"inlineSvgAllowed",void 0);ne([(0,Et.redux)({store:"viewer",selector:({contentModifiers:e})=>e.zoom})],P.prototype,"zoom",void 0);ne([(0,Et.redux)({store:"viewer",selector:({contentModifiers:e})=>e.rotation})],P.prototype,"rotation",void 0);ne([(0,Et.redux)({store:"viewer"})],P.prototype,"watermark",void 0);ne([(0,ye.query)("img")],P.prototype,"image",void 0);ne([(0,ye.query)("svg")],P.prototype,"svg",void 0);ne([(0,ye.query)(".image-viewer")],P.prototype,"imageViewer",void 0);ne([(0,ye.query)(".image-container")],P.prototype,"imageContainer",void 0);ne([(0,ye.state)()],P.prototype,"imageHeight",void 0);ne([(0,ye.state)()],P.prototype,"imageWidth",void 0);ne([(0,ye.state)()],P.prototype,"svgContent",void 0);var Pn=class extends oe(P){};var lt=f(N());var Pe=f(A()),ur=f(T());var et=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?An:Wt}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let o=i;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...o)=>this.service.resolveMessage(this.name,i,...o)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var sr=f(A());var Rl=f(N());var vo=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},or=new vo;var fd=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Dr=Symbol("i18nAttributes"),Ll=Symbol("i18nListAttributes"),Nl=Symbol("i18nProperties"),Mn=Symbol("i18nContexts"),Mr=Symbol("i18nUnsubs"),tt=(0,sr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?An:Wt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(or.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Dr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Ll])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Nl])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Mn].set(l,{isCustomContext:a}),this[Mr].has(l)||this[Mr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Mn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Mn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Mr].forEach(o=>o()),this[Mr].clear()}}return t=Mn,r=Mr,fd([(0,Rl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Dn=class extends tt(sr.FtLitElement){},In=class extends tt(sr.FtLitElementRedux){};var Pl=f(T());var Ml=Pl.css`
219
- `;var kn=f(T()),Un=f(N()),$n=f(A());var Ir=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},xe=class extends In{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":kn.nothing:kn.html`
218
+ `;ne([(0,Et.redux)({store:"viewer"})],P.prototype,"descriptor",void 0);ne([(0,ye.state)()],P.prototype,"viewerType",void 0);ne([(0,ye.state)()],P.prototype,"inlineSvgAllowed",void 0);ne([(0,Et.redux)({store:"viewer",selector:({contentModifiers:t})=>t.zoom})],P.prototype,"zoom",void 0);ne([(0,Et.redux)({store:"viewer",selector:({contentModifiers:t})=>t.rotation})],P.prototype,"rotation",void 0);ne([(0,Et.redux)({store:"viewer"})],P.prototype,"watermark",void 0);ne([(0,ye.query)("img")],P.prototype,"image",void 0);ne([(0,ye.query)("svg")],P.prototype,"svg",void 0);ne([(0,ye.query)(".image-viewer")],P.prototype,"imageViewer",void 0);ne([(0,ye.query)(".image-container")],P.prototype,"imageContainer",void 0);ne([(0,ye.state)()],P.prototype,"imageHeight",void 0);ne([(0,ye.state)()],P.prototype,"imageWidth",void 0);ne([(0,ye.state)()],P.prototype,"svgContent",void 0);var Pn=class extends oe(P){};var lt=f(N());var Pe=f(A()),ur=f(T());var et=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?An:Wt}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,i)=>{let o=i;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,i)=>(...o)=>this.service.resolveMessage(this.name,i,...o)}),this.rawMessages=new Proxy({},{get:(n,i)=>this.service.resolveRawMessage(this.name,i)}),this.keys=new Proxy({},{get:(n,i)=>()=>i}),this.attributes=new Proxy({},{get:(n,i)=>()=>({context:this.name,key:i,message:this.service.resolveRawMessage(this.name,i)})})}};var sr=f(A());var Rl=f(N());var vo=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-]+$/)}},or=new vo;var fd=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ir=Symbol("i18nAttributes"),Ll=Symbol("i18nListAttributes"),Nl=Symbol("i18nProperties"),Mn=Symbol("i18nContexts"),Mr=Symbol("i18nUnsubs"),tt=(0,sr.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(o){return o??this.useCustomMessageContexts?An:Wt}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(or.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Ir])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Ll])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Nl])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Mn].set(l,{isCustomContext:a}),this[Mr].has(l)||this[Mr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Mn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Mn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Mr].forEach(o=>o()),this[Mr].clear()}}return e=Mn,r=Mr,fd([(0,Rl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),In=class extends tt(sr.FtLitElement){},Dn=class extends tt(sr.FtLitElementRedux){};var Pl=f(T());var Ml=Pl.css`
219
+ `;var kn=f(T()),Un=f(N()),$n=f(A());var Dr=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},xe=class extends Dn{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":kn.nothing:kn.html`
220
220
  <span class="ft-i18n">
221
221
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
222
222
  </span>
223
- `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};xe.elementDefinitions={};xe.styles=Ml;Ir([(0,$n.redux)()],xe.prototype,"editorMode",void 0);Ir([(0,Un.property)()],xe.prototype,"context",void 0);Ir([(0,Un.property)()],xe.prototype,"key",void 0);Ir([(0,$n.jsonProperty)([])],xe.prototype,"args",void 0);Ir([(0,Un.property)()],xe.prototype,"defaultMessage",void 0);var Il=f(A());var Dl={"ft-i18n":xe};(0,Il.customElements)(Dl);var kl=f(T()),be=f(A()),de={size:be.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:be.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:be.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:be.FtCssVariableFactory.extend("--ft-icon-material-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:be.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ul=[kl.css`
223
+ `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};xe.elementDefinitions={};xe.styles=Ml;Dr([(0,$n.redux)()],xe.prototype,"editorMode",void 0);Dr([(0,Un.property)()],xe.prototype,"context",void 0);Dr([(0,Un.property)()],xe.prototype,"key",void 0);Dr([(0,$n.jsonProperty)([])],xe.prototype,"args",void 0);Dr([(0,Un.property)()],xe.prototype,"defaultMessage",void 0);var Dl=f(A());var Il={"ft-i18n":xe};(0,Dl.customElements)(Il);var kl=f(T()),be=f(A()),de={size:be.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:be.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:be.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:be.FtCssVariableFactory.extend("--ft-icon-material-font-family","",be.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:be.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Ul=[kl.css`
224
224
  :host, i.ft-icon {
225
225
  display: inline-flex;
226
226
  align-items: center;
@@ -268,12 +268,12 @@
268
268
  .ft-icon--material {
269
269
  font-family: ${de.materialFontFamily}, "Material Icons", sans-serif;
270
270
  }
271
- `,be.noTextSelect];var Le;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(Le||(Le={}));var kr=f(T()),rt=f(N()),$l=f(A()),Hl=f(mo());var Ae;(function(e){e.ADD_TO_PBK="&#xe800;",e.ALERT="&#xe801;",e.ADD_ALERT="&#xe802;",e.BACK_TO_SEARCH="&#xe803;",e.ADD_BOOKMARK="&#xe804;",e.BOOKMARK="&#xe805;",e.BOOKS="&#xe806;",e.MENU="&#xe807;",e.DOWNLOAD="&#xe808;",e.EDIT="&#xe809;",e.FEEDBACK="&#xe80a;",e.HOME="&#xe80b;",e.MODIFY_PBK="&#xe80c;",e.SCHEDULED="&#xe80d;",e.SEARCH="&#xe80e;",e.EXPORT="&#xe80f;",e.TOC="&#xe810;",e.WRITE_UGC="&#xe811;",e.TRASH="&#xe812;",e.USER="&#xe813;",e.EXTLINK="&#xe814;",e.CALENDAR="&#xe815;",e.OFFLINE="&#xe816;",e.BOOK="&#xe817;",e.DOWNLOAD_PLAIN="&#xe818;",e.CHECK="&#xe819;",e.STAR_PLAIN="&#xe900;",e.TOPICS="&#xe901;",e.DISC="&#xe902;",e.CIRCLE="&#xe903;",e.SHARED="&#xe904;",e.SORT_UNSORTED="&#xe905;",e.SORT_UP="&#xe906;",e.SORT_DOWN="&#xe907;",e.WORKING="&#xe908;",e.CLOSE="&#xe909;",e.ZOOM_OUT="&#xe90a;",e.ZOOM_IN="&#xe90b;",e.ZOOM_REALSIZE="&#xe90c;",e.ZOOM_FULLSCREEN="&#xe90d;",e.ADMIN_RESTRICTED="&#xe90e;",e.ADMIN="&#xe90f;",e.ADMIN_KHUB="&#xe910;",e.ADMIN_THEME="&#xe911;",e.ADMIN_USERS="&#xe912;",e.WARNING="&#xe913;",e.CONTEXT="&#xe914;",e.SEARCH_HOME="&#xe915;",e.STEPS="&#xe916;",e.ICON_EXPAND="&#xe917;",e.ICON_COLLAPSE="&#xe918;",e.INFO="&#xe919;",e.MINUS_PLAIN="&#xe91a;",e.PLUS_PLAIN="&#xe91b;",e.FACET_HAS_DESCENDANT="&#xe91c;",e.TRIANGLE_BOTTOM="&#xe91d;",e.TRIANGLE_LEFT="&#xe91e;",e.TRIANGLE_RIGHT="&#xe91f;",e.TRIANGLE_TOP="&#xe920;",e.THIN_ARROW="&#xe921;",e.SIGN_IN="&#xe922;",e.LOGOUT="&#xe923;",e.TRANSLATE="&#xe924;",e.CLOSE_PLAIN="&#xe925;",e.CHECK_PLAIN="&#xe926;",e.ARTICLE="&#xe927;",e.COLUMNS="&#xe928;",e.ANALYTICS="&#xe929;",e.COLLECTIONS="&#xe92a;",e.ARROW_DOWN="&#xe92b;",e.ARROW_LEFT="&#xe92c;",e.ARROW_RIGHT="&#xe92d;",e.ARROW_UP="&#xe92e;",e.SEARCH_IN_PUBLICATION="&#xe92f;",e.COPY_TO_CLIPBOARD="&#xe930;",e.SHARED_PBK="&#xe931;",e.ATTACHMENTS="&#xe932;",e.STRIPE_ARROW_LEFT="&#xe933;",e.STRIPE_ARROW_RIGHT="&#xe934;",e.FILTERS="&#xe935;",e.DOT="&#xe936;",e.MINUS="&#xe937;",e.PLUS="&#xe938;",e.MAILS_AND_NOTIFICATIONS="&#xe939;",e.SAVE="&#xe93a;",e.LOCKER="&#xe93b;",e.ADMIN_INTEGRATION="&#xe93c;",e.SYNC="&#xe93d;",e.TAG="&#xe93e;",e.BOOK_PLAIN="&#xe93f;",e.UPLOAD="&#xe940;",e.ONLINE="&#xe941;",e.TAG_PLAIN="&#xe942;",e.ACCOUNT_SETTINGS="&#xe943;",e.PRINT="&#xe944;",e.DEFAULT_ROLES="&#xe945;",e.SHORTCUT_MENU="&#xe946;",e.RELATIVES_PLAIN="&#xe947;",e.RELATIVES="&#xe948;",e.PAUSE="&#xe949;",e.PLAY="&#xe94a;",e.ADMIN_PORTAL="&#xe94b;",e.STAR="&#xe94c;",e.THUMBS_DOWN="&#xe94d;",e.THUMBS_DOWN_PLAIN="&#xe94e;",e.THUMBS_UP="&#xe94f;",e.THUMBS_UP_PLAIN="&#xe950;",e.FEEDBACK_PLAIN="&#xe951;",e.RATE_PLAIN="&#xe952;",e.RATE="&#xe953;",e.OFFLINE_SETTINGS="&#xe954;",e.MY_COLLECTIONS="&#xe955;",e.THIN_ARROW_LEFT="&#xe956;",e.THIN_ARROW_RIGHT="&#xe957;",e.RESET="&#xe958;",e.MY_LIBRARY="&#xe959;",e.UNSTRUCTURED_DOC="&#xe95a;",e.CONTEXTUAL="&#xe95b;",e.THIN_ARROW_UP="&#xe95c;",e.ARROW_RIGHT_TO_LINE="&#xe95d;",e.DESKTOP="&#xe95e;",e.TABLET_LANDSCAPE="&#xe95f;",e.TABLET_PORTRAIT="&#xe960;",e.MOBILE_LANDSCAPE="&#xe961;",e.MOBILE_PORTRAIT="&#xe962;",e.DIAGRAM_SUNBURST="&#xe963;",e.DIAGRAM_SANKEY="&#xe964;",e.COMMENT_QUESTION="&#xe965;",e.COMMENT_QUESTION_PLAIN="&#xe966;",e.MESSAGE_BOT="&#xe967;",e.CHART_SIMPLE="&#xe968;",e.BARS_PROGRESS="&#xe969;",e.BOOK_OPEN_GEAR="&#xe96a;",e.BOOK_OPEN_GEAR_SLASH="&#xe96b;",e.LINE_CHART="&#xe96c;",e.STACKED_CHART="&#xe96d;",e.CHART_BAR_STACKED="&#xe96e;",e.CHART_BAR_GROUPED="&#xe96f;",e.EYE_SLASH="&#xe970;",e.X_MARK="&#xe971;",e.EXPAND_WIDE="&#xe972;",e.PIP="&#xe973;",e.PIP_WIDE="&#xe974;",e.LIFE_RING="&#xe975;",e.GLOBE="&#xe976;",e.PIGGY_BANK="&#xe977;",e.EXTLINK_LIGHT="&#xe978;",e.CLONE="&#xe979;",e.CLONE_LINK_SIMPLE="&#xe97a;",e.CHART_BAR_NORMALIZED="&#xe97b;",e.CONSUMER="&#xe97c;",e.OCTAGON_XMARK="&#xe97d;",e.HOURGLASS_HALF="&#xe97e;",e.CLOCK="&#xe97f;",e.CLOCK_THREE="&#xe97f;",e.CALENDAR_DAY="&#xe980;",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",e.WAND_MAGIC_SPARKLES="&#xe982;",e.PAPER_PLANE="&#xe983;",e.CIRCLE_STOP="&#xe984;",e.ARROW_ROTATE_RIGHT="&#xe985;",e.ARROWS_ROTATE="&#xe986;",e.ALIGN_RIGHT="&#xe987;",e.FORMAT_CLEAR="&#xe988;",e.ALIGN_CENTER="&#xe989;",e.ALIGN_LEFT="&#xe98a;",e.PALETTE="&#xe98b;",e.BOLD="&#xe98c;",e.ITALIC="&#xe98d;",e.UNDERLINE="&#xe98e;",e.STRIKETHROUGH="&#xe98f;",e.LINK_SIMPLE_SLASH="&#xe990;",e.LINK_SIMPLE="&#xe991;",e.ROUTE="&#xe992;",e.CIRCLE_USER_SLASH="&#xe993;",e.CIRCLE_USER_CHECK="&#xe994;",e.LIST_MAGNIFYING_GLASS="&#xe995;",e.MEDAL="&#xe996;",e.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",e.ARROW_TURN_DOWN_RIGHT="&#xe998;",e.FLASK="&#xe999;",e.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",e.HOURGLASS_END="&#xe99b;",e.CIRCLE_QUESTION="&#xe99c;",e.GRIP_LINES_SOLID="&#xe99d;",e.TRANSLATE_SPARKLE_SOLID="&#xe99e;",e.CODE="&#xe99f;",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",e.PAPER_PLANE_SLASH="&#xe9a1;",e.COMPRESS="&#xe9a2;",e.EXPAND="&#xe9a3;",e.ARROW_ROTATE_LEFT="&#xe9a4;",e.MOBILE_SMALL="&#xe9a5;",e.SPARKLES="&#xe9a6;",e.HAND_SOLID="&#xe9a7;",e.CLOCK_SOLID="&#xe9a8;",e.CONTEXT_MENU_CURSOR="&#xe9a9;",e.LANGUAGE_SLASH="&#xe9aa;",e.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",e.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",e.BOOKMARK_SLASH="&#xe9ad;",e.CIRCLE_PAUSE="&#xe9ae;",e.CIRCLE_PLAY="&#xe9af;",e.CIRCLE_STOP_PLAIN="&#xe9b0;",e.CIRCLE_ARROW_DOWN="&#xe9b1;",e.SHARE_NODES="&#xe9b2;",e.BELL="&#xe9b3;",e.BELL_SLASH="&#xe9b4;",e.FILE="&#xe9b5;",e.HAND="&#xe9b6;",e.SQUARE_INFO_SOLID="&#xe9b7;",e.FILE_CODE="&#xe9b8;",e.BOX_CODE="&#xe9b9;",e.TOPICS_SOLID="&#xe9ba;",e.PHOTO_FILM="&#xe9bb;",e.HYPHEN_SOLID="&#xe9bc;",e.CROSSHAIRS="&#xe9bd;",e.PERSON_CHALKBOARD="&#xe9be;",e.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",e.BOOK_OPEN_COVER="&#xe9c0;",e.LIGHTBULB="&#xe9c1;",e.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",e.CHART_LINE_USER="&#xe9c3;",e.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",e.EYE="&#xf06e;",e.SHARE="&#xe80f1;"})(Ae||(Ae={}));var g;(function(e){e.UNKNOWN="&#xe90a;",e.ABW="&#xe900;",e.AUDIO="&#xe901;",e.AVI="&#xe902;",e.CHM="&#xe904;",e.CODE="&#xe905;",e.CSV="&#xe903;",e.DITA="&#xe906;",e.EPUB="&#xe907;",e.EXCEL="&#xe908;",e.FLAC="&#xe909;",e.GIF="&#xe90b;",e.GZIP="&#xe90c;",e.HTML="&#xe90d;",e.IMAGE="&#xe90e;",e.JPEG="&#xe90f;",e.JSON="&#xe910;",e.M4A="&#xe911;",e.MOV="&#xe912;",e.MP3="&#xe913;",e.MP4="&#xe914;",e.OGG="&#xe915;",e.PDF="&#xe916;",e.PNG="&#xe917;",e.POWERPOINT="&#xe918;",e.RAR="&#xe91a;",e.STP="&#xe91b;",e.TEXT="&#xe91c;",e.VIDEO="&#xe91e;",e.WAV="&#xe91f;",e.WMA="&#xe920;",e.WORD="&#xe921;",e.XML="&#xe922;",e.YAML="&#xe919;",e.ZIP="&#xe923;"})(g||(g={}));var go=new Map([...["abw"].map(e=>[e,g.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,g.AUDIO]),...["avi"].map(e=>[e,g.AVI]),...["chm","xhs"].map(e=>[e,g.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,g.CODE]),...["csv"].map(e=>[e,g.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,g.DITA]),...["epub"].map(e=>[e,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,g.EXCEL]),...["flac"].map(e=>[e,g.FLAC]),...["gif"].map(e=>[e,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,g.GZIP]),...["html","htm","xhtml"].map(e=>[e,g.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,g.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,g.JPEG]),...["json"].map(e=>[e,g.JSON]),...["m4a","m4p"].map(e=>[e,g.M4A]),...["mov","qt"].map(e=>[e,g.MOV]),...["mp3"].map(e=>[e,g.MP3]),...["mp4","m4v"].map(e=>[e,g.MP4]),...["ogg","oga"].map(e=>[e,g.OGG]),...["pdf","ps"].map(e=>[e,g.PDF]),...["png"].map(e=>[e,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,g.POWERPOINT]),...["rar"].map(e=>[e,g.RAR]),...["stp"].map(e=>[e,g.STP]),...["txt","rtf","md","mdown"].map(e=>[e,g.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,g.VIDEO]),...["wav"].map(e=>[e,g.WAV]),...["wma"].map(e=>[e,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,g.WORD]),...["xml","xsl","rdf"].map(e=>[e,g.XML]),...["yaml","yml","x-yaml"].map(e=>[e,g.YAML]),...["zip"].map(e=>[e,g.ZIP])]),hd=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);function Hn(e,t){var r,n,i,o;e=(e??"").toLowerCase(),t=(t??"").toLowerCase();let[s,a]=(((r=hd.get(e))!==null&&r!==void 0?r:e)+"/").split("/");return(o=(i=(n=go.get(a))!==null&&n!==void 0?n:go.get(t))!==null&&i!==void 0?i:go.get(s))!==null&&o!==void 0?o:g.UNKNOWN}var yo={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Ur=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},F=class extends $l.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=kr.nothing}render(){let t=this.variant&&Object.values(Le).includes(this.variant)?this.variant:Le.fluid_topics,r=t!==Le.material||!!this.value;return kr.html`
272
- <i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
271
+ `,be.noTextSelect];var Le;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Le||(Le={}));var kr=f(T()),rt=f(N()),$l=f(A()),Hl=f(mo());var Ae;(function(t){t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.BOOKS="&#xe806;",t.MENU="&#xe807;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.HOME="&#xe80b;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.EXPORT="&#xe80f;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.USER="&#xe813;",t.EXTLINK="&#xe814;",t.CALENDAR="&#xe815;",t.OFFLINE="&#xe816;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.STAR_PLAIN="&#xe900;",t.TOPICS="&#xe901;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN="&#xe90f;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_THEME="&#xe911;",t.ADMIN_USERS="&#xe912;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.INFO="&#xe919;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.THIN_ARROW="&#xe921;",t.SIGN_IN="&#xe922;",t.LOGOUT="&#xe923;",t.TRANSLATE="&#xe924;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.ARTICLE="&#xe927;",t.COLUMNS="&#xe928;",t.ANALYTICS="&#xe929;",t.COLLECTIONS="&#xe92a;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.COPY_TO_CLIPBOARD="&#xe930;",t.SHARED_PBK="&#xe931;",t.ATTACHMENTS="&#xe932;",t.STRIPE_ARROW_LEFT="&#xe933;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.FILTERS="&#xe935;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.SAVE="&#xe93a;",t.LOCKER="&#xe93b;",t.ADMIN_INTEGRATION="&#xe93c;",t.SYNC="&#xe93d;",t.TAG="&#xe93e;",t.BOOK_PLAIN="&#xe93f;",t.UPLOAD="&#xe940;",t.ONLINE="&#xe941;",t.TAG_PLAIN="&#xe942;",t.ACCOUNT_SETTINGS="&#xe943;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.SHORTCUT_MENU="&#xe946;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.ADMIN_PORTAL="&#xe94b;",t.STAR="&#xe94c;",t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.FEEDBACK_PLAIN="&#xe951;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_COLLECTIONS="&#xe955;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.RESET="&#xe958;",t.MY_LIBRARY="&#xe959;",t.UNSTRUCTURED_DOC="&#xe95a;",t.CONTEXTUAL="&#xe95b;",t.THIN_ARROW_UP="&#xe95c;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.DESKTOP="&#xe95e;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_STACKED="&#xe96e;",t.CHART_BAR_GROUPED="&#xe96f;",t.EYE_SLASH="&#xe970;",t.X_MARK="&#xe971;",t.EXPAND_WIDE="&#xe972;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.EXTLINK_LIGHT="&#xe978;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.CONSUMER="&#xe97c;",t.OCTAGON_XMARK="&#xe97d;",t.HOURGLASS_HALF="&#xe97e;",t.CLOCK="&#xe97f;",t.CLOCK_THREE="&#xe97f;",t.CALENDAR_DAY="&#xe980;",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="&#xe981;",t.WAND_MAGIC_SPARKLES="&#xe982;",t.PAPER_PLANE="&#xe983;",t.CIRCLE_STOP="&#xe984;",t.ARROW_ROTATE_RIGHT="&#xe985;",t.ARROWS_ROTATE="&#xe986;",t.ALIGN_RIGHT="&#xe987;",t.FORMAT_CLEAR="&#xe988;",t.ALIGN_CENTER="&#xe989;",t.ALIGN_LEFT="&#xe98a;",t.PALETTE="&#xe98b;",t.BOLD="&#xe98c;",t.ITALIC="&#xe98d;",t.UNDERLINE="&#xe98e;",t.STRIKETHROUGH="&#xe98f;",t.LINK_SIMPLE_SLASH="&#xe990;",t.LINK_SIMPLE="&#xe991;",t.ROUTE="&#xe992;",t.CIRCLE_USER_SLASH="&#xe993;",t.CIRCLE_USER_CHECK="&#xe994;",t.LIST_MAGNIFYING_GLASS="&#xe995;",t.MEDAL="&#xe996;",t.THUMBS_UP_THUMBS_DOWN_SOLID="&#xe997;",t.ARROW_TURN_DOWN_RIGHT="&#xe998;",t.FLASK="&#xe999;",t.LOCK_KEYHOLE_OPEN_SOLID="&#xe99a;",t.HOURGLASS_END="&#xe99b;",t.CIRCLE_QUESTION="&#xe99c;",t.GRIP_LINES_SOLID="&#xe99d;",t.TRANSLATE_SPARKLE_SOLID="&#xe99e;",t.CODE="&#xe99f;",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="&#xe9a0;",t.PAPER_PLANE_SLASH="&#xe9a1;",t.COMPRESS="&#xe9a2;",t.EXPAND="&#xe9a3;",t.ARROW_ROTATE_LEFT="&#xe9a4;",t.MOBILE_SMALL="&#xe9a5;",t.SPARKLES="&#xe9a6;",t.HAND_SOLID="&#xe9a7;",t.CLOCK_SOLID="&#xe9a8;",t.CONTEXT_MENU_CURSOR="&#xe9a9;",t.LANGUAGE_SLASH="&#xe9aa;",t.MAGNIFYING_GLASS_FLOPPY_DISK="&#xe9ab;",t.CABINET_FILING_FLOPPY_DISK="&#xe9ac;",t.BOOKMARK_SLASH="&#xe9ad;",t.CIRCLE_PAUSE="&#xe9ae;",t.CIRCLE_PLAY="&#xe9af;",t.CIRCLE_STOP_PLAIN="&#xe9b0;",t.CIRCLE_ARROW_DOWN="&#xe9b1;",t.SHARE_NODES="&#xe9b2;",t.BELL="&#xe9b3;",t.BELL_SLASH="&#xe9b4;",t.FILE="&#xe9b5;",t.HAND="&#xe9b6;",t.SQUARE_INFO_SOLID="&#xe9b7;",t.FILE_CODE="&#xe9b8;",t.BOX_CODE="&#xe9b9;",t.TOPICS_SOLID="&#xe9ba;",t.PHOTO_FILM="&#xe9bb;",t.HYPHEN_SOLID="&#xe9bc;",t.CROSSHAIRS="&#xe9bd;",t.PERSON_CHALKBOARD="&#xe9be;",t.CIRCLE_ARROW_DOWN_SLASH="&#xe9bf;",t.BOOK_OPEN_COVER="&#xe9c0;",t.LIGHTBULB="&#xe9c1;",t.MESSAGE_BOT_AGENTIC_SOLID="&#xe9c2;",t.CHART_LINE_USER="&#xe9c3;",t.SERVER_CIRCLE_ARROW_DOWN="&#xe9c4;",t.EYE="&#xf06e;",t.SHARE="&#xe80f1;"})(Ae||(Ae={}));var g;(function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"})(g||(g={}));var go=new Map([...["abw"].map(t=>[t,g.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(t=>[t,g.AUDIO]),...["avi"].map(t=>[t,g.AVI]),...["chm","xhs"].map(t=>[t,g.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(t=>[t,g.CODE]),...["csv"].map(t=>[t,g.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,g.DITA]),...["epub"].map(t=>[t,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,g.EXCEL]),...["flac"].map(t=>[t,g.FLAC]),...["gif"].map(t=>[t,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,g.GZIP]),...["html","htm","xhtml"].map(t=>[t,g.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(t=>[t,g.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,g.JPEG]),...["json"].map(t=>[t,g.JSON]),...["m4a","m4p"].map(t=>[t,g.M4A]),...["mov","qt"].map(t=>[t,g.MOV]),...["mp3"].map(t=>[t,g.MP3]),...["mp4","m4v"].map(t=>[t,g.MP4]),...["ogg","oga"].map(t=>[t,g.OGG]),...["pdf","ps"].map(t=>[t,g.PDF]),...["png"].map(t=>[t,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,g.POWERPOINT]),...["rar"].map(t=>[t,g.RAR]),...["stp"].map(t=>[t,g.STP]),...["txt","rtf","md","mdown"].map(t=>[t,g.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(t=>[t,g.VIDEO]),...["wav"].map(t=>[t,g.WAV]),...["wma"].map(t=>[t,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,g.WORD]),...["xml","xsl","rdf"].map(t=>[t,g.XML]),...["yaml","yml","x-yaml"].map(t=>[t,g.YAML]),...["zip"].map(t=>[t,g.ZIP])]),hd=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);function Hn(t,e){var r,n,i,o;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,a]=(((r=hd.get(t))!==null&&r!==void 0?r:t)+"/").split("/");return(o=(i=(n=go.get(a))!==null&&n!==void 0?n:go.get(e))!==null&&i!==void 0?i:go.get(s))!==null&&o!==void 0?o:g.UNKNOWN}var yo={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Ur=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},W=class extends $l.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=kr.nothing}render(){let e=this.variant&&Object.values(Le).includes(this.variant)?this.variant:Le.fluid_topics,r=e!==Le.material||!!this.value;return kr.html`
272
+ <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
273
273
  ${(0,Hl.unsafeHTML)(this.resolvedIcon)}
274
274
  <slot ?hidden=${r}></slot>
275
275
  </i>
276
- `}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let n=this.value||this.getTextContent();switch(this.variant){case Le.file_format:this.resolvedIcon=(t=g[n.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:n;break;case Le.material:this.resolvedIcon=this.value||kr.nothing;break;default:this.resolvedIcon=(r=Ae[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};F.elementDefinitions={};F.styles=Ul;Ur([(0,rt.property)()],F.prototype,"variant",void 0);Ur([(0,rt.property)()],F.prototype,"value",void 0);Ur([(0,rt.property)({reflect:!0,attribute:"aria-hidden"})],F.prototype,"ariaHidden",void 0);Ur([(0,rt.state)()],F.prototype,"resolvedIcon",void 0);Ur([(0,rt.query)("slot")],F.prototype,"slottedContent",void 0);var Bl=f(A());var jl={"ft-icon":F};(0,Bl.customElements)(jl);var bc=f(T()),fe=f(N()),pe=f(A());var Vl=f(T()),nt=f(A()),$r={distance:nt.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:nt.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:nt.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:nt.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",nt.designSystemVariables.borderRadiusS),maxWidth:nt.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Fl=Vl.css`
276
+ `}getTextContent(){var e,r;return(r=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(n=>n.textContent).join("").trim())!==null&&r!==void 0?r:""}update(e){super.update(e),["value","variant"].some(r=>e.has(r))&&this.resolveIcon()}resolveIcon(){var e,r;let n=this.value||this.getTextContent();switch(this.variant){case Le.file_format:this.resolvedIcon=(e=g[n.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:n;break;case Le.material:this.resolvedIcon=this.value||kr.nothing;break;default:this.resolvedIcon=(r=Ae[n.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:n;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};W.elementDefinitions={};W.styles=Ul;Ur([(0,rt.property)()],W.prototype,"variant",void 0);Ur([(0,rt.property)()],W.prototype,"value",void 0);Ur([(0,rt.property)({reflect:!0,attribute:"aria-hidden"})],W.prototype,"ariaHidden",void 0);Ur([(0,rt.state)()],W.prototype,"resolvedIcon",void 0);Ur([(0,rt.query)("slot")],W.prototype,"slottedContent",void 0);var Bl=f(A());var jl={"ft-icon":W};(0,Bl.customElements)(jl);var bc=f(T()),fe=f(N()),pe=f(A());var Vl=f(T()),nt=f(A()),$r={distance:nt.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:nt.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:nt.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:nt.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",nt.designSystemVariables.borderRadiusS),maxWidth:nt.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Fl=Vl.css`
277
277
  .ft-tooltip--container {
278
278
  display: block;
279
279
  }
@@ -304,7 +304,7 @@
304
304
  position: relative;
305
305
  word-break: break-word;
306
306
  }
307
- `;var zl=["top","right","bottom","left"],Wl=["start","end"],bo=zl.reduce((e,t)=>e.concat(t,t+"-"+Wl[0],t+"-"+Wl[1]),[]),Hr=Math.min,it=Math.max,jr=Math.round;var Ne=e=>({x:e,y:e}),md={left:"right",right:"left",bottom:"top",top:"bottom"};function Kl(e,t,r){return it(e,Hr(t,r))}function jn(e,t){return typeof e=="function"?e(t):e}function Br(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Eo(e){return e==="y"?"height":"width"}function Bn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function So(e){return Ao(Bn(e))}function Gl(e,t,r){r===void 0&&(r=!1);let n=ot(e),i=So(e),o=Eo(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xo(s)),[s,xo(s)]}function ql(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function xo(e){let t=Br(e);return md[t]+e.slice(t.length)}function vd(e){var t,r,n,i;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(i=e.left)!=null?i:0}}function Yl(e){return typeof e!="number"?vd(e):{top:e,right:e,bottom:e,left:e}}function St(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Xl(e,t,r){let{reference:n,floating:i}=e,o=Bn(t),s=So(t),a=Eo(s),l=Br(t),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}let m=ot(t);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Zl(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=jn(t,e),m=Yl(h),x=a[p?d==="floating"?"reference":"floating":d],b=St(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},k=St(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:C,strategy:l}):E);return{top:(b.top-k.top+m.top)/O.y,bottom:(k.bottom-b.bottom+m.bottom)/O.y,left:(b.left-k.left+m.left)/O.x,right:(k.right-b.right+m.right)/O.x}}var gd=50,Jl=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Zl},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Xl(c,n,l),p=n,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:b,fn:E}=x,{x:C,y:O,data:k,reset:M}=await E({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=C??u,d=O??d,m[b]={...m[b],...k},M&&h<gd&&(h++,typeof M=="object"&&(M.placement&&(p=M.placement),M.rects&&(c=M.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):M.rects),{x:u,y:d}=Xl(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:m}};function yd(e,t,r){return(e?[...r.filter(i=>ot(i)===e),...r.filter(i=>ot(i)!==e)]:r.filter(i=>Br(i)===i)).filter(i=>e?ot(i)===e||(t?ql(i)!==i:!1):!0)}var Ql=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=bo,autoAlignment:h=!0,...m}=jn(e,t),v=d!==void 0||p===bo?yd(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,b=v[x];if(b==null)return{};if(a!==b)return{reset:{placement:v[0]}};let E=await l.detectOverflow(t,m),C=Gl(b,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[E[Br(b)],E[C[0]],E[C[1]]],k=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:b,overflows:O}],M=v[x+1];if(M)return{data:{index:x+1,overflows:k},reset:{placement:M}};let ze=k.map(Q=>{let ie=ot(Q.placement);return[Q.placement,ie&&u?Q.overflows.slice(0,2).reduce((ee,ct)=>ee+ct,0):Q.overflows[0],Q.overflows]}).sort((Q,ie)=>Q[1]-ie[1]),Ke=((i=ze.filter(Q=>Q[2].slice(0,ot(Q[0])?2:3).every(ie=>ie<=0))[0])==null?void 0:i[0])||ze[0][0];return Ke!==a?{data:{index:x+1,overflows:k},reset:{placement:Ke}}:{}}}};var ec=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:C,y:O}=E;return{x:C,y:O}}},...c}=jn(e,t),u={x:r,y:n},d=await o.detectOverflow(t,c),p=Bn(i),h=Ao(p),m=u[h],v=u[p],x=(E,C)=>Kl(C+d[E==="y"?"top":"left"],C,C-d[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(p,v));let b=l.fn({...t,[h]:m,[p]:v});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[h]:s,[p]:a}}}}}};function Fn(){return typeof window<"u"}function Ct(e){return rc(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function He(e){var t;return(t=(rc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rc(e){return Fn()?e instanceof Node||e instanceof Z(e).Node:!1}function Ee(e){return Fn()?e instanceof Element||e instanceof Z(e).Element:!1}function je(e){return Fn()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function tc(e){return!Fn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function Vr(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Se(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function nc(e){return/^(table|td|th)$/.test(Ct(e))}function Fr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var xd=/transform|translate|scale|rotate|perspective|filter/,bd=/paint|layout|strict|content/,wt=e=>!!e&&e!=="none",wo;function ar(e){let t=Ee(e)?Se(e):e;return wt(t.transform)||wt(t.translate)||wt(t.scale)||wt(t.rotate)||wt(t.perspective)||!Wn()&&(wt(t.backdropFilter)||wt(t.filter))||xd.test(t.willChange||"")||bd.test(t.contain||"")}function ic(e){let t=st(e);for(;je(t)&&!lr(t);){if(ar(t))return t;if(Fr(t))return null;t=st(t)}return null}function Wn(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function lr(e){return/^(html|body|#document)$/.test(Ct(e))}function Se(e){return Z(e).getComputedStyle(e)}function Wr(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function st(e){if(Ct(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tc(e)&&e.host||He(e);return tc(t)?t.host:t}function oc(e){let t=st(e);return lr(t)?(e.ownerDocument||e).body:je(t)&&Vr(t)?t:oc(t)}function Vn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=oc(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=Z(i);if(o){let a=zn(s);return t.concat(s,s.visualViewport||[],Vr(i)?i:[],a&&r?Vn(a):[])}else return t.concat(i,Vn(i,[],r))}function zn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lc(e){let t=Se(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=je(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=jr(r)!==o||jr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function cc(e){return Ee(e)?e:e.contextElement}function cr(e){let t=cc(e);if(!je(t))return Ne(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=lc(t),s=(o?jr(r.width):r.width)/n,a=(o?jr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Ad=Ne(0);function uc(e){let t=Z(e);return!Wn()||!t.visualViewport?Ad:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ed(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===Z(e)}function zr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=cc(e),s=Ne(1);t&&(n?Ee(n)&&(s=cr(n)):s=cr(e));let a=Ed(o,r,n)?uc(o):Ne(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o&&n){let p=Z(o),h=Ee(n)?Z(n):n,m=p,v=zn(m);for(;v&&h!==m;){let x=cr(v),b=v.getBoundingClientRect(),E=Se(v),C=b.left+(v.clientLeft+parseFloat(E.paddingLeft))*x.x,O=b.top+(v.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=C,c+=O,m=Z(v),v=zn(m)}}return St({width:u,height:d,x:l,y:c})}function Kn(e,t){let r=Wr(e).scrollLeft;return t?t.left+r:zr(He(e)).left+r}function dc(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Kn(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Sd(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",s=He(n),a=t?Fr(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Ne(1),u=Ne(0),d=je(n);if((d||!o)&&((Ct(n)!=="body"||Vr(s))&&(l=Wr(n)),d)){let h=zr(n);c=cr(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let p=s&&!d&&!o?dc(s,l):Ne(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function wd(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cd(e){let t=Wr(e),r=e.ownerDocument.body,n=it(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=it(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+Kn(e),s=-t.scrollTop;return Se(r).direction==="rtl"&&(o+=it(e.clientWidth,r.clientWidth)-n),{width:n,height:i,x:o,y:s}}var Od=25;function Td(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=Z(e),o=He(e),s=i.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Wn()||t==="fixed";n?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(Kn(o)<=0){let p=o.ownerDocument,h=p.body,m=getComputedStyle(h),v=p.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(o.clientWidth-h.clientWidth-v),b=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;b<=Od&&(a-=b)}return{width:a,height:l,x:c,y:u}}function _d(e,t){let r=zr(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=cr(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function sc(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=Td(e,r,t);else if(t==="document")n=Cd(He(e));else if(Ee(t))n=_d(t,r);else{let i=uc(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return St(n)}function Rd(e,t){let r=t.get(e);if(r)return r;let n=Vn(e,[],!1).filter(a=>Ee(a)&&Ct(a)!=="body"),i=null,o=Se(e).position==="fixed",s=o?st(e):e;for(;Ee(s)&&!lr(s);){let a=Se(s),l=ar(s),c=i?i.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):i=a,s=st(s)}return t.set(e,n),n}function Ld(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?Fr(t)?[]:Rd(t,this._c):[].concat(r),n],a=sc(t,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=sc(t,s[p],i);l=it(h.top,l),c=Hr(h.right,c),u=Hr(h.bottom,u),d=it(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Nd(e){let{width:t,height:r}=lc(e);return{width:t,height:r}}function Pd(e,t,r){let n=je(t),i=He(t),o=r==="fixed",s=zr(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=Ne(0);if((n||!o)&&((Ct(t)!=="body"||Vr(i))&&(a=Wr(t)),n)){let p=zr(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}!n&&i&&(l.x=Kn(i));let c=i&&!n&&!o?dc(i,a):Ne(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Co(e){return Se(e).position==="static"}function ac(e,t){if(!je(e)||Se(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return He(e)===r&&(r=r.ownerDocument.body),r}function pc(e,t){let r=Z(e);if(Fr(e))return r;if(!je(e)){let i=st(e);for(;i&&!lr(i);){if(Ee(i)&&!Co(i))return i;i=st(i)}return r}let n=ac(e,t);for(;n&&nc(n)&&Co(n);)n=ac(n,t);return n&&lr(n)&&Co(n)&&!ar(n)?r:n||ic(e)||r}var Md=async function(e){let t=this.getOffsetParent||pc,r=this.getDimensions,n=await r(e.floating);return{reference:Pd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Dd(e){return Se(e).direction==="rtl"}var Gn={convertOffsetParentRelativeRectToViewportRelativeRect:Sd,getDocumentElement:He,getClippingRect:Ld,getOffsetParent:pc,getElementRects:Md,getClientRects:wd,getDimensions:Nd,getScale:cr,isElement:Ee,isRTL:Dd};var fc=Ql,hc=ec;var mc=(e,t,r)=>{let n=new Map,i=r??{},o={...Gn,...i.platform,_c:n};return Jl(e,t,{...i,platform:o})};function vc(e){return Id(e)}function Oo(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Id(e){for(let t=e;t;t=Oo(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Oo(e);t;t=Oo(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||ar(r)||t.tagName==="BODY"))return t}return null}async function gc(e,t,r){let n;return typeof r=="object"?n=r:n={placement:r},mc(e,t,{strategy:n.strategy,platform:{...Gn,getOffsetParent:i=>Gn.getOffsetParent(i,vc)},middleware:[hc({crossAxis:!0}),fc({allowedPlacements:[n.placement]})]})}var yc=f(A());var To=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(n=>typeof n=="string"?or.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},kd=new To;var xc=(e,t)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:yc.hasChanged,converter:or,...t}),r[Dr]=(i=r[Dr])!==null&&i!==void 0?i:new Map,r[Dr].set(n,e??{})};var we=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},U=class extends Dn{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new pe.Debouncer,this.revealDebouncer=new pe.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return bc.html`
307
+ `;var zl=["top","right","bottom","left"],Wl=["start","end"],bo=zl.reduce((t,e)=>t.concat(e,e+"-"+Wl[0],e+"-"+Wl[1]),[]),Hr=Math.min,it=Math.max,jr=Math.round;var Ne=t=>({x:t,y:t}),md={left:"right",right:"left",bottom:"top",top:"bottom"};function Kl(t,e,r){return it(t,Hr(e,r))}function jn(t,e){return typeof t=="function"?t(e):t}function Br(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function Ao(t){return t==="x"?"y":"x"}function Eo(t){return t==="y"?"height":"width"}function Bn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function So(t){return Ao(Bn(t))}function Gl(t,e,r){r===void 0&&(r=!1);let n=ot(t),i=So(t),o=Eo(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=xo(s)),[s,xo(s)]}function ql(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function xo(t){let e=Br(t);return md[e]+t.slice(e.length)}function vd(t){var e,r,n,i;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(i=t.left)!=null?i:0}}function Yl(t){return typeof t!="number"?vd(t):{top:t,right:t,bottom:t,left:t}}function St(t){let{x:e,y:r,width:n,height:i}=t;return{width:n,height:i,top:r,left:e,right:e+n,bottom:r+i,x:e,y:r}}function Xl(t,e,r){let{reference:n,floating:i}=t,o=Bn(e),s=So(e),a=Eo(s),l=Br(e),c=o==="y",u=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,h;switch(l){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-i.width,y:d};break;default:h={x:n.x,y:n.y}}let m=ot(e);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Zl(t,e){var r;e===void 0&&(e={});let{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=jn(e,t),m=Yl(h),x=a[p?d==="floating"?"reference":"floating":d],b=St(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(C))&&await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1},k=St(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:C,strategy:l}):E);return{top:(b.top-k.top+m.top)/O.y,bottom:(k.bottom-b.bottom+m.bottom)/O.y,left:(b.left-k.left+m.left)/O.x,right:(k.right-b.right+m.right)/O.x}}var gd=50,Jl=async(t,e,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Zl},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=Xl(c,n,l),p=n,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:b,fn:E}=x,{x:C,y:O,data:k,reset:M}=await E({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});u=C??u,d=O??d,m[b]={...m[b],...k},M&&h<gd&&(h++,typeof M=="object"&&(M.placement&&(p=M.placement),M.rects&&(c=M.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):M.rects),{x:u,y:d}=Xl(c,p,l)),v=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:m}};function yd(t,e,r){return(t?[...r.filter(i=>ot(i)===t),...r.filter(i=>ot(i)!==t)]:r.filter(i=>Br(i)===i)).filter(i=>t?ot(i)===t||(e?ql(i)!==i:!1):!0)}var Ql=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,i;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:d,allowedPlacements:p=bo,autoAlignment:h=!0,...m}=jn(t,e),v=d!==void 0||p===bo?yd(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,b=v[x];if(b==null)return{};if(a!==b)return{reset:{placement:v[0]}};let E=await l.detectOverflow(e,m),C=Gl(b,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),O=[E[Br(b)],E[C[0]],E[C[1]]],k=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:b,overflows:O}],M=v[x+1];if(M)return{data:{index:x+1,overflows:k},reset:{placement:M}};let ze=k.map(ee=>{let ie=ot(ee.placement);return[ee.placement,ie&&u?ee.overflows.slice(0,2).reduce((te,ct)=>te+ct,0):ee.overflows[0],ee.overflows]}).sort((ee,ie)=>ee[1]-ie[1]),Ke=((i=ze.filter(ee=>ee[2].slice(0,ot(ee[0])?2:3).every(ie=>ie<=0))[0])==null?void 0:i[0])||ze[0][0];return Ke!==a?{data:{index:x+1,overflows:k},reset:{placement:Ke}}:{}}}};var ec=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:i,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:C,y:O}=E;return{x:C,y:O}}},...c}=jn(t,e),u={x:r,y:n},d=await o.detectOverflow(e,c),p=Bn(i),h=Ao(p),m=u[h],v=u[p],x=(E,C)=>Kl(C+d[E==="y"?"top":"left"],C,C-d[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(p,v));let b=l.fn({...e,[h]:m,[p]:v});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[h]:s,[p]:a}}}}}};function Fn(){return typeof window<"u"}function Ct(t){return rc(t)?(t.nodeName||"").toLowerCase():"#document"}function J(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function He(t){var e;return(e=(rc(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function rc(t){return Fn()?t instanceof Node||t instanceof J(t).Node:!1}function Ee(t){return Fn()?t instanceof Element||t instanceof J(t).Element:!1}function je(t){return Fn()?t instanceof HTMLElement||t instanceof J(t).HTMLElement:!1}function tc(t){return!Fn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof J(t).ShadowRoot}function Vr(t){let{overflow:e,overflowX:r,overflowY:n,display:i}=Se(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&i!=="inline"&&i!=="contents"}function nc(t){return/^(table|td|th)$/.test(Ct(t))}function Fr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var xd=/transform|translate|scale|rotate|perspective|filter/,bd=/paint|layout|strict|content/,wt=t=>!!t&&t!=="none",wo;function ar(t){let e=Ee(t)?Se(t):t;return wt(e.transform)||wt(e.translate)||wt(e.scale)||wt(e.rotate)||wt(e.perspective)||!Wn()&&(wt(e.backdropFilter)||wt(e.filter))||xd.test(e.willChange||"")||bd.test(e.contain||"")}function ic(t){let e=st(t);for(;je(e)&&!lr(e);){if(ar(e))return e;if(Fr(e))return null;e=st(e)}return null}function Wn(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function lr(t){return/^(html|body|#document)$/.test(Ct(t))}function Se(t){return J(t).getComputedStyle(t)}function Wr(t){return Ee(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||tc(t)&&t.host||He(t);return tc(e)?e.host:e}function oc(t){let e=st(t);return lr(e)?(t.ownerDocument||t).body:je(e)&&Vr(e)?e:oc(e)}function Vn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=oc(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=J(i);if(o){let a=zn(s);return e.concat(s,s.visualViewport||[],Vr(i)?i:[],a&&r?Vn(a):[])}else return e.concat(i,Vn(i,[],r))}function zn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function lc(t){let e=Se(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=je(t),o=i?t.offsetWidth:r,s=i?t.offsetHeight:n,a=jr(r)!==o||jr(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function cc(t){return Ee(t)?t:t.contextElement}function cr(t){let e=cc(t);if(!je(e))return Ne(1);let r=e.getBoundingClientRect(),{width:n,height:i,$:o}=lc(e),s=(o?jr(r.width):r.width)/n,a=(o?jr(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Ad=Ne(0);function uc(t){let e=J(t);return!Wn()||!e.visualViewport?Ad:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ed(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===J(t)}function zr(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),o=cc(t),s=Ne(1);e&&(n?Ee(n)&&(s=cr(n)):s=cr(t));let a=Ed(o,r,n)?uc(o):Ne(0),l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o&&n){let p=J(o),h=Ee(n)?J(n):n,m=p,v=zn(m);for(;v&&h!==m;){let x=cr(v),b=v.getBoundingClientRect(),E=Se(v),C=b.left+(v.clientLeft+parseFloat(E.paddingLeft))*x.x,O=b.top+(v.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=C,c+=O,m=J(v),v=zn(m)}}return St({width:u,height:d,x:l,y:c})}function Kn(t,e){let r=Wr(t).scrollLeft;return e?e.left+r:zr(He(t)).left+r}function dc(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Kn(t,r),i=r.top+e.scrollTop;return{x:n,y:i}}function Sd(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t,o=i==="fixed",s=He(n),a=e?Fr(e.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Ne(1),u=Ne(0),d=je(n);if((d||!o)&&((Ct(n)!=="body"||Vr(s))&&(l=Wr(n)),d)){let h=zr(n);c=cr(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}let p=s&&!d&&!o?dc(s,l):Ne(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function wd(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Cd(t){let e=Wr(t),r=t.ownerDocument.body,n=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-e.scrollLeft+Kn(t),s=-e.scrollTop;return Se(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-n),{width:n,height:i,x:o,y:s}}var Od=25;function Td(t,e,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",i=J(t),o=He(t),s=i.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!Wn()||e==="fixed";n?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(Kn(o)<=0){let p=o.ownerDocument,h=p.body,m=getComputedStyle(h),v=p.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(o.clientWidth-h.clientWidth-v),b=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;b<=Od&&(a-=b)}return{width:a,height:l,x:c,y:u}}function _d(t,e){let r=zr(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,o=cr(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=n*o.y;return{width:s,height:a,x:l,y:c}}function sc(t,e,r){let n;if(e==="viewport"||e==="layoutViewport")n=Td(t,r,e);else if(e==="document")n=Cd(He(t));else if(Ee(e))n=_d(e,r);else{let i=uc(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return St(n)}function Rd(t,e){let r=e.get(t);if(r)return r;let n=Vn(t,[],!1).filter(a=>Ee(a)&&Ct(a)!=="body"),i=null,o=Se(t).position==="fixed",s=o?st(t):t;for(;Ee(s)&&!lr(s);){let a=Se(s),l=ar(s),c=i?i.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(d=>d!==s):i=a,s=st(s)}return e.set(t,n),n}function Ld(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t,s=[...r==="clippingAncestors"?Fr(e)?[]:Rd(e,this._c):[].concat(r),n],a=sc(e,s[0],i),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=sc(e,s[p],i);l=it(h.top,l),c=Hr(h.right,c),u=Hr(h.bottom,u),d=it(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Nd(t){let{width:e,height:r}=lc(t);return{width:e,height:r}}function Pd(t,e,r){let n=je(e),i=He(e),o=r==="fixed",s=zr(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Ne(0);if((n||!o)&&((Ct(e)!=="body"||Vr(i))&&(a=Wr(e)),n)){let p=zr(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!n&&i&&(l.x=Kn(i));let c=i&&!n&&!o?dc(i,a):Ne(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Co(t){return Se(t).position==="static"}function ac(t,e){if(!je(t)||Se(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return He(t)===r&&(r=r.ownerDocument.body),r}function pc(t,e){let r=J(t);if(Fr(t))return r;if(!je(t)){let i=st(t);for(;i&&!lr(i);){if(Ee(i)&&!Co(i))return i;i=st(i)}return r}let n=ac(t,e);for(;n&&nc(n)&&Co(n);)n=ac(n,e);return n&&lr(n)&&Co(n)&&!ar(n)?r:n||ic(t)||r}var Md=async function(t){let e=this.getOffsetParent||pc,r=this.getDimensions,n=await r(t.floating);return{reference:Pd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Id(t){return Se(t).direction==="rtl"}var Gn={convertOffsetParentRelativeRectToViewportRelativeRect:Sd,getDocumentElement:He,getClippingRect:Ld,getOffsetParent:pc,getElementRects:Md,getClientRects:wd,getDimensions:Nd,getScale:cr,isElement:Ee,isRTL:Id};var fc=Ql,hc=ec;var mc=(t,e,r)=>{let n=new Map,i=r??{},o={...Gn,...i.platform,_c:n};return Jl(t,e,{...i,platform:o})};function vc(t){return Dd(t)}function Oo(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Dd(t){for(let e=t;e;e=Oo(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Oo(t);e;e=Oo(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||ar(r)||e.tagName==="BODY"))return e}return null}async function gc(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},mc(t,e,{strategy:n.strategy,platform:{...Gn,getOffsetParent:i=>Gn.getOffsetParent(i,vc)},middleware:[hc({crossAxis:!0}),fc({allowedPlacements:[n.placement]})]})}var yc=f(A());var To=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(n=>typeof n=="string"?or.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},kd=new To;var xc=(t,e)=>(r,n)=>{var i;r.constructor.createProperty(n,{type:Object,hasChanged:yc.hasChanged,converter:or,...e}),r[Ir]=(i=r[Ir])!==null&&i!==void 0?i:new Map,r[Ir].set(n,t??{})};var we=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},U=class extends In{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new pe.Debouncer,this.revealDebouncer=new pe.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,r;return bc.html`
308
308
  <div part="container"
309
309
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
310
310
  <slot part="slot"></slot>
@@ -313,19 +313,19 @@
313
313
  popover="manual">
314
314
  <div part="tooltip-content" class="ft-tooltip--content">
315
315
  <slot name="text"></slot>
316
- <ft-typography variant="${X.caption}" ?hidden=${!(!((t=this.text)===null||t===void 0)&&t.message)}>
316
+ <ft-typography variant="${Z.caption}" ?hidden=${!(!((e=this.text)===null||e===void 0)&&e.message)}>
317
317
  ${(r=this.text)===null||r===void 0?void 0:r.message}
318
318
  </ft-typography>
319
319
  </div>
320
320
  </div>
321
321
  </div>
322
- `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:t},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&gc(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${pe.designSystemVariables.transitionDuration}, left ${pe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,pe.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};U.elementDefinitions={"ft-typography":V};U.styles=Fl;we([xc()],U.prototype,"text",void 0);we([(0,fe.property)({type:Boolean})],U.prototype,"manual",void 0);we([(0,fe.property)({type:Boolean})],U.prototype,"inline",void 0);we([(0,pe.numberProperty)()],U.prototype,"delay",void 0);we([(0,fe.property)()],U.prototype,"position",void 0);we([(0,pe.jsonProperty)([])],U.prototype,"ignoreMatchingElements",void 0);we([(0,fe.queryAssignedNodes)()],U.prototype,"slotNodes",void 0);we([(0,fe.query)(".ft-tooltip--container")],U.prototype,"container",void 0);we([(0,fe.query)(".ft-tooltip")],U.prototype,"tooltip",void 0);we([(0,fe.query)(".ft-tooltip--content")],U.prototype,"tooltipContent",void 0);we([(0,fe.state)()],U.prototype,"visible",void 0);var Ec=f(A());var Ac={"ft-tooltip":U};(0,Ec.customElements)(Ac);var at=et.build("designedViewer"),Sc={fitToContainerAriaLabel:"Fill available space",zoomRealSizeAriaLabel:"Display content at original size",zoomInAriaLabel:"Zoom in",zoomOutAriaLabel:"Zoom out",rotateLeftAriaLabel:"Rotate left",rotateRightAriaLabel:"Rotate right"};var Be=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},W=class extends(0,Pe.withConditionalVisibility)(tt(Y)){constructor(){super(...arguments),this.disabled=!1,this.tabindex=0,this.role="button",this.ariaLabel="",this.control=Re.FIT_TO_CONTAINER,this.controlDefinitions={[Re.FIT_TO_CONTAINER]:{ariaLabel:()=>at.messages.fitToContainerAriaLabel(),icon:Ae.ZOOM_FULLSCREEN,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(void 0)}},[Re.ZOOM_REAL_SIZE]:{ariaLabel:()=>at.messages.zoomRealSizeAriaLabel(),icon:Ae.ZOOM_REALSIZE,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(1)}},[Re.ZOOM_IN]:{ariaLabel:()=>at.messages.zoomInAriaLabel(),icon:Ae.ZOOM_IN,disabled:()=>{var t;return((t=this.zoom)!==null&&t!==void 0?t:1)>20},run:()=>{var t,r;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)*1.2)}},[Re.ZOOM_OUT]:{ariaLabel:()=>at.messages.zoomOutAriaLabel(),icon:Ae.ZOOM_OUT,disabled:()=>{var t;return((t=this.zoom)!==null&&t!==void 0?t:1)<.05},run:()=>{var t,r;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)/1.2)}},[Re.ROTATE_LEFT]:{ariaLabel:()=>at.messages.rotateLeftAriaLabel(),icon:Ae.ARROW_ROTATE_LEFT,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setRotation(this.rotation-90)}},[Re.ROTATE_RIGHT]:{ariaLabel:()=>at.messages.rotateRightAriaLabel(),icon:Ae.ARROW_ROTATE_RIGHT,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setRotation(this.rotation+90)}}},this.modifyContent=()=>{var t;(t=this.controlDefinitions[this.control])===null||t===void 0||t.run()}}render(){var t;return this.isVisible?ur.html`
322
+ `}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(e){var r,n;e.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let n=this.manual;this.manual=!0;let i=this.text;this.text={message:e},await this.show(r),this.text=i,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&gc(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${pe.designSystemVariables.transitionDuration}, left ${pe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,pe.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};U.elementDefinitions={"ft-typography":F};U.styles=Fl;we([xc()],U.prototype,"text",void 0);we([(0,fe.property)({type:Boolean})],U.prototype,"manual",void 0);we([(0,fe.property)({type:Boolean})],U.prototype,"inline",void 0);we([(0,pe.numberProperty)()],U.prototype,"delay",void 0);we([(0,fe.property)()],U.prototype,"position",void 0);we([(0,pe.jsonProperty)([])],U.prototype,"ignoreMatchingElements",void 0);we([(0,fe.queryAssignedNodes)()],U.prototype,"slotNodes",void 0);we([(0,fe.query)(".ft-tooltip--container")],U.prototype,"container",void 0);we([(0,fe.query)(".ft-tooltip")],U.prototype,"tooltip",void 0);we([(0,fe.query)(".ft-tooltip--content")],U.prototype,"tooltipContent",void 0);we([(0,fe.state)()],U.prototype,"visible",void 0);var Ec=f(A());var Ac={"ft-tooltip":U};(0,Ec.customElements)(Ac);var at=et.build("designedViewer"),Sc={fitToContainerAriaLabel:"Fill available space",zoomRealSizeAriaLabel:"Display content at original size",zoomInAriaLabel:"Zoom in",zoomOutAriaLabel:"Zoom out",rotateLeftAriaLabel:"Rotate left",rotateRightAriaLabel:"Rotate right"};var Be=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},z=class extends(0,Pe.withConditionalVisibility)(tt(X)){constructor(){super(...arguments),this.disabled=!1,this.tabindex=0,this.role="button",this.ariaLabel="",this.control=Re.FIT_TO_CONTAINER,this.controlDefinitions={[Re.FIT_TO_CONTAINER]:{ariaLabel:()=>at.messages.fitToContainerAriaLabel(),icon:Ae.ZOOM_FULLSCREEN,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(void 0)}},[Re.ZOOM_REAL_SIZE]:{ariaLabel:()=>at.messages.zoomRealSizeAriaLabel(),icon:Ae.ZOOM_REALSIZE,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(1)}},[Re.ZOOM_IN]:{ariaLabel:()=>at.messages.zoomInAriaLabel(),icon:Ae.ZOOM_IN,disabled:()=>{var e;return((e=this.zoom)!==null&&e!==void 0?e:1)>20},run:()=>{var e,r;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)*1.2)}},[Re.ZOOM_OUT]:{ariaLabel:()=>at.messages.zoomOutAriaLabel(),icon:Ae.ZOOM_OUT,disabled:()=>{var e;return((e=this.zoom)!==null&&e!==void 0?e:1)<.05},run:()=>{var e,r;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)/1.2)}},[Re.ROTATE_LEFT]:{ariaLabel:()=>at.messages.rotateLeftAriaLabel(),icon:Ae.ARROW_ROTATE_LEFT,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setRotation(this.rotation-90)}},[Re.ROTATE_RIGHT]:{ariaLabel:()=>at.messages.rotateRightAriaLabel(),icon:Ae.ARROW_ROTATE_RIGHT,run:()=>{var e;return(e=this.viewerStateManager)===null||e===void 0?void 0:e.setRotation(this.rotation+90)}}},this.modifyContent=()=>{var e;(e=this.controlDefinitions[this.control])===null||e===void 0||e.run()}}render(){var e;return this.isVisible?ur.html`
323
323
  <slot>
324
324
  <ft-tooltip text="${this.ariaLabel}">
325
- <ft-icon value="${(t=this.controlDefinitions[this.control])===null||t===void 0?void 0:t.icon}"></ft-icon>
325
+ <ft-icon value="${(e=this.controlDefinitions[this.control])===null||e===void 0?void 0:e.icon}"></ft-icon>
326
326
  </ft-tooltip>
327
327
  </slot>
328
- `:ur.nothing}willUpdate(t){var r,n,i,o;super.willUpdate(t),this.updateAriaLabel(),this.disabled=(i=(n=(r=this.controlDefinitions[this.control])===null||r===void 0?void 0:r.disabled)===null||n===void 0?void 0:n.call(r))!==null&&i!==void 0?i:!1,this.isVisible=!!(!((o=this.descriptor)===null||o===void 0)&&o.viewableInCurrentBrowser)&&this.descriptor.mimeType.startsWith("image/")}onI18nUpdate(t){super.onI18nUpdate(t),this.updateAriaLabel()}updateAriaLabel(){var t;this.ariaLabel=(t=this.controlDefinitions[this.control])===null||t===void 0?void 0:t.ariaLabel()}connectedCallback(){super.connectedCallback(),this.addI18nContext(at,Sc),this.updateComplete.then(()=>{var t;return(t=this.tooltip)===null||t===void 0?void 0:t.setupFor(this)}),this.addEventListener("click",this.modifyContent)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.modifyContent)}};W.elementDefinitions={"ft-icon":F,"ft-tooltip":U};W.styles=ur.css`
328
+ `:ur.nothing}willUpdate(e){var r,n,i,o;super.willUpdate(e),this.updateAriaLabel(),this.disabled=(i=(n=(r=this.controlDefinitions[this.control])===null||r===void 0?void 0:r.disabled)===null||n===void 0?void 0:n.call(r))!==null&&i!==void 0?i:!1,this.isVisible=!!(!((o=this.descriptor)===null||o===void 0)&&o.viewableInCurrentBrowser)&&this.descriptor.mimeType.startsWith("image/")}onI18nUpdate(e){super.onI18nUpdate(e),this.updateAriaLabel()}updateAriaLabel(){var e;this.ariaLabel=(e=this.controlDefinitions[this.control])===null||e===void 0?void 0:e.ariaLabel()}connectedCallback(){super.connectedCallback(),this.addI18nContext(at,Sc),this.updateComplete.then(()=>{var e;return(e=this.tooltip)===null||e===void 0?void 0:e.setupFor(this)}),this.addEventListener("click",this.modifyContent)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.modifyContent)}};z.elementDefinitions={"ft-icon":W,"ft-tooltip":U};z.styles=ur.css`
329
329
  :host {
330
330
  display: inline-block;
331
331
  opacity: 1;
@@ -359,37 +359,37 @@
359
359
  background-color: hsl(from ${Pe.designSystemVariables.colorPrimary} h s calc(l + 30));
360
360
  }
361
361
  }
362
- `;Be([(0,lt.property)({type:Boolean,reflect:!0})],W.prototype,"disabled",void 0);Be([(0,lt.property)({reflect:!0})],W.prototype,"tabindex",void 0);Be([(0,lt.property)({reflect:!0})],W.prototype,"role",void 0);Be([(0,lt.property)({reflect:!0,attribute:"aria-label"})],W.prototype,"ariaLabel",void 0);Be([(0,lt.property)()],W.prototype,"control",void 0);Be([(0,Pe.redux)({store:"viewer"})],W.prototype,"descriptor",void 0);Be([(0,Pe.redux)({store:"viewer",selector:({contentModifiers:e})=>e.zoom})],W.prototype,"zoom",void 0);Be([(0,Pe.redux)({store:"viewer",selector:({contentModifiers:e})=>e.rotation})],W.prototype,"rotation",void 0);Be([(0,lt.query)("ft-tooltip")],W.prototype,"tooltip",void 0);var qn=class extends oe(W){};var wc=f(A()),dr=f(T());var Ud=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Ve=class extends Y{render(){return this.filename?dr.html`
363
- <ft-typography variant="${X.body1}" part="filename">
362
+ `;Be([(0,lt.property)({type:Boolean,reflect:!0})],z.prototype,"disabled",void 0);Be([(0,lt.property)({reflect:!0})],z.prototype,"tabindex",void 0);Be([(0,lt.property)({reflect:!0})],z.prototype,"role",void 0);Be([(0,lt.property)({reflect:!0,attribute:"aria-label"})],z.prototype,"ariaLabel",void 0);Be([(0,lt.property)()],z.prototype,"control",void 0);Be([(0,Pe.redux)({store:"viewer"})],z.prototype,"descriptor",void 0);Be([(0,Pe.redux)({store:"viewer",selector:({contentModifiers:t})=>t.zoom})],z.prototype,"zoom",void 0);Be([(0,Pe.redux)({store:"viewer",selector:({contentModifiers:t})=>t.rotation})],z.prototype,"rotation",void 0);Be([(0,lt.query)("ft-tooltip")],z.prototype,"tooltip",void 0);var qn=class extends oe(z){};var wc=f(A()),dr=f(T());var Ud=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ve=class extends X{render(){return this.filename?dr.html`
363
+ <ft-typography variant="${Z.body1}" part="filename">
364
364
  ${this.filename}
365
365
  </ft-typography>
366
- `:dr.nothing}};Ve.elementDefinitions={"ft-typography":V};Ve.styles=dr.css`
366
+ `:dr.nothing}};Ve.elementDefinitions={"ft-typography":F};Ve.styles=dr.css`
367
367
  [part="filename"]::part(text) {
368
368
  margin: unset;
369
369
  }
370
- `;Ud([(0,wc.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],Ve.prototype,"filename",void 0);var Yn=class extends oe(Ve){};var Cc=f(A()),pr=f(T());var $d=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Ot=class extends Y{render(){return this.displayName?pr.html`
371
- <ft-typography variant="${X.title}" part="display-name" element="h2">
370
+ `;Ud([(0,wc.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Ve.prototype,"filename",void 0);var Yn=class extends oe(Ve){};var Cc=f(A()),pr=f(T());var $d=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ot=class extends X{render(){return this.displayName?pr.html`
371
+ <ft-typography variant="${Z.title}" part="display-name" element="h2">
372
372
  ${this.displayName}
373
373
  </ft-typography>
374
- `:pr.nothing}};Ot.elementDefinitions={"ft-typography":V};Ot.styles=pr.css`
374
+ `:pr.nothing}};Ot.elementDefinitions={"ft-typography":F};Ot.styles=pr.css`
375
375
  [part="display-name"]::part(text) {
376
376
  margin: unset;
377
377
  }
378
- `;$d([(0,Cc.redux)({store:"viewer",selector:({descriptor:e})=>e?.displayName})],Ot.prototype,"displayName",void 0);var Xn=class extends oe(Ot){};var Kr=f(A()),Zn=f(T());var Oc=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Fe=class extends Y{render(){var t,r;return this.mimeType?Zn.html`
378
+ `;$d([(0,Cc.redux)({store:"viewer",selector:({descriptor:t})=>t?.displayName})],Ot.prototype,"displayName",void 0);var Xn=class extends oe(Ot){};var Kr=f(A()),Zn=f(T());var Oc=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Fe=class extends X{render(){var e,r;return this.mimeType?Zn.html`
379
379
  <ft-icon part="icon"
380
380
  variant="${Le.file_format}"
381
- value="${Hn(this.mimeType,(0,Kr.last)((r=(t=this.filename)===null||t===void 0?void 0:t.split("."))!==null&&r!==void 0?r:[]))}"></ft-icon>
382
- `:Zn.nothing}};Fe.elementDefinitions={"ft-icon":F};Oc([(0,Kr.redux)({store:"viewer",selector:({descriptor:e})=>e?.mimeType})],Fe.prototype,"mimeType",void 0);Oc([(0,Kr.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],Fe.prototype,"filename",void 0);var Jn=class extends oe(Fe){};var Tc=f(A()),fr=f(T());var Hd=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},We=class extends Y{render(){return this.documentTitle?fr.html`
383
- <ft-typography variant="${X.title}" part="title" element="h1">
381
+ value="${Hn(this.mimeType,(0,Kr.last)((r=(e=this.filename)===null||e===void 0?void 0:e.split("."))!==null&&r!==void 0?r:[]))}"></ft-icon>
382
+ `:Zn.nothing}};Fe.elementDefinitions={"ft-icon":W};Oc([(0,Kr.redux)({store:"viewer",selector:({descriptor:t})=>t?.mimeType})],Fe.prototype,"mimeType",void 0);Oc([(0,Kr.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Fe.prototype,"filename",void 0);var Jn=class extends oe(Fe){};var Tc=f(A()),fr=f(T());var Hd=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},We=class extends X{render(){return this.documentTitle?fr.html`
383
+ <ft-typography variant="${Z.title}" part="title" element="h1">
384
384
  ${this.documentTitle}
385
385
  </ft-typography>
386
- `:fr.nothing}};We.elementDefinitions={"ft-typography":V};We.styles=fr.css`
386
+ `:fr.nothing}};We.elementDefinitions={"ft-typography":F};We.styles=fr.css`
387
387
  [part="title"]::part(text) {
388
388
  margin: unset;
389
389
  }
390
- `;Hd([(0,Tc.redux)({store:"viewer",selector:({document:e})=>e?.title})],We.prototype,"documentTitle",void 0);var Qn=class extends oe(We){};var Rc=f(T()),Lc=f(N());var hr=f(A());var ei=class extends B{getDocument(t){return this.cache.get(t,()=>this.api.getUnstructuredDocument(t))}getAttachments(t){return this.cache.get(`${t}-attachments`,()=>this.api.getUdAttachments(t))}getAttachmentDownloadLink(t,r){return this.makeAbsolute(`${this.api.endpoints.khub.documents.documentId(t).attachments.attachmentId(r).content}?download=true&locationValue=viewer`)}makeAbsolute(t){return this.api.makeAbsolute(t)}async getDocumentRating(t){}async rateDocument(t,r,n){}async unrateDocument(t){}async sendDocumentFeedback(t,r){}};var ti=class e extends Dt{static build(t){return new e(Xr(t),new ei)}constructor(t,r){super(t),this.store=t,this.service=r,t.actions.origin(Je.UNSTRUCTURED_DOCUMENT)}async load(){var t,r;let{documentId:n}=this.store.getState();if(n){let i=await this.service.getDocument(n);this.store.actions.unstructuredDocument(i),this.store.actions.document({type:hn.UNSTRUCTURED_DOCUMENT,id:i.id,lang:(t=i.lang)!==null&&t!==void 0?t:"en-US",title:i.title,metadata:i.metadata,portalUrl:i.viewerUrl});let o=await le.await();this.store.actions.descriptor({id:i.id,portalUrl:i.viewerUrl,filename:i.filename,fingerprint:i.lastEdition,displayName:i.title,alt:(r=i.description)!==null&&r!==void 0?r:i.title,mimeType:i.mimeType,size:0,viewableInCurrentBrowser:i.viewableInCurrentBrowser,contentUrl:o.makeAbsolute(i.contentApiEndpoint)}),this.store.actions.watermark(i.watermark)}return this.store.getState()}clear(){this.store.clearKeeping("documentId","origin")}reload(){return this.clear(),this.load()}setDocumentId(t){return this.store.actions.documentId(t),this.reload()}};var ri=f(A()),_o=f(N());var _c=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Ro=Symbol("ud-viewer-state-manager"),he=(0,ri.applyMixinOnce)(Symbol("toFtUdViewerComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededUdvRequests=[]}get service(){var n;return(n=this.viewerStateManager)===null||n===void 0?void 0:n.service}willUpdate(n){var i,o,s;super.willUpdate(n),n.has("viewerStateManager")&&(this.unregisterFromUdvStateManager(n.get("viewerStateManager")),this.registerToUdvStateManager(this.viewerStateManager)),n.has("neededUdvRequests")&&((i=this.viewerStateManager)===null||i===void 0||i.unregisterComponent(this,(o=n.get("neededUdvRequests"))!==null&&o!==void 0?o:[]),(s=this.viewerStateManager)===null||s===void 0||s.registerComponent(this,this.neededUdvRequests))}registerToUdvStateManager(n){n&&(n.registerComponent(this,this.neededUdvRequests),this.addStore(n.store,"viewer"))}unregisterFromUdvStateManager(n){n&&(n.unregisterComponent(this,this.neededUdvRequests),this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.registerToUdvStateManager(this.viewerStateManager)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterFromUdvStateManager(this.viewerStateManager)}}return _c([xr({context:Ro,subscribe:!0}),(0,_o.state)()],t.prototype,"viewerStateManager",void 0),_c([(0,_o.state)({hasChanged:ri.hasChanged})],t.prototype,"neededUdvRequests",void 0),t});var Lo=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Tt=class extends hr.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=ti.build(this.id||(0,hr.randomId)(6))}render(){return Rc.html`
390
+ `;Hd([(0,Tc.redux)({store:"viewer",selector:({document:t})=>t?.title})],We.prototype,"documentTitle",void 0);var Qn=class extends oe(We){};var Rc=f(T()),Lc=f(N());var hr=f(A());var ei=class extends B{getDocument(e){return this.cache.get(e,()=>this.api.getUnstructuredDocument(e))}getAttachments(e){return this.cache.get(`${e}-attachments`,()=>this.api.getUdAttachments(e))}getAttachmentDownloadLink(e,r){return this.makeAbsolute(`${this.api.endpoints.khub.documents.documentId(e).attachments.attachmentId(r).content}?download=true&locationValue=viewer`)}makeAbsolute(e){return this.api.makeAbsolute(e)}async getDocumentRating(e){}async rateDocument(e,r,n){}async unrateDocument(e){}async sendDocumentFeedback(e,r){}};var ti=class t extends It{static build(e){return new t(Xr(e),new ei)}constructor(e,r){super(e),this.store=e,this.service=r,e.actions.origin(Je.UNSTRUCTURED_DOCUMENT)}async load(){var e,r;let{documentId:n}=this.store.getState();if(n){let i=await this.service.getDocument(n);this.store.actions.unstructuredDocument(i),this.store.actions.document({type:hn.UNSTRUCTURED_DOCUMENT,id:i.id,lang:(e=i.lang)!==null&&e!==void 0?e:"en-US",title:i.title,metadata:i.metadata,portalUrl:i.viewerUrl});let o=await le.await();this.store.actions.descriptor({id:i.id,portalUrl:i.viewerUrl,filename:i.filename,fingerprint:i.lastEdition,displayName:i.title,alt:(r=i.description)!==null&&r!==void 0?r:i.title,mimeType:i.mimeType,size:0,viewableInCurrentBrowser:i.viewableInCurrentBrowser,contentUrl:o.makeAbsolute(i.contentApiEndpoint)}),this.store.actions.watermark(i.watermark)}return this.store.getState()}clear(){this.store.clearKeeping("documentId","origin")}reload(){return this.clear(),this.load()}setDocumentId(e){return this.store.actions.documentId(e),this.reload()}};var ri=f(A()),_o=f(N());var _c=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Ro=Symbol("ud-viewer-state-manager"),he=(0,ri.applyMixinOnce)(Symbol("toFtUdViewerComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededUdvRequests=[]}get service(){var n;return(n=this.viewerStateManager)===null||n===void 0?void 0:n.service}willUpdate(n){var i,o,s;super.willUpdate(n),n.has("viewerStateManager")&&(this.unregisterFromUdvStateManager(n.get("viewerStateManager")),this.registerToUdvStateManager(this.viewerStateManager)),n.has("neededUdvRequests")&&((i=this.viewerStateManager)===null||i===void 0||i.unregisterComponent(this,(o=n.get("neededUdvRequests"))!==null&&o!==void 0?o:[]),(s=this.viewerStateManager)===null||s===void 0||s.registerComponent(this,this.neededUdvRequests))}registerToUdvStateManager(n){n&&(n.registerComponent(this,this.neededUdvRequests),this.addStore(n.store,"viewer"))}unregisterFromUdvStateManager(n){n&&(n.unregisterComponent(this,this.neededUdvRequests),this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.registerToUdvStateManager(this.viewerStateManager)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterFromUdvStateManager(this.viewerStateManager)}}return _c([xr({context:Ro,subscribe:!0}),(0,_o.state)()],e.prototype,"viewerStateManager",void 0),_c([(0,_o.state)({hasChanged:ri.hasChanged})],e.prototype,"neededUdvRequests",void 0),e});var Lo=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Tt=class extends hr.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=ti.build(this.id||(0,hr.randomId)(6))}render(){return Rc.html`
391
391
  <slot></slot>
392
- `}willUpdate(t){super.willUpdate(t),t.has("documentId")&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.setDocumentId(this.documentId);this.documentId&&this.dispatchEvent(new gt(t))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};Lo([(0,Lc.property)()],Tt.prototype,"documentId",void 0);Lo([yr({context:Ro})],Tt.prototype,"viewerStateManager",void 0);Lo([(0,hr.reduxEventListener)({eventName:_e.eventName})],Tt.prototype,"onAuthenticationChange",null);var Nc;(function(e){e.RATING="RATING"})(Nc||(Nc={}));var ni;(function(e){e.udAttachmentsUpdate="ud-attachments-update"})(ni||(ni={}));var ii=class extends he(P){};var oi=class extends he(W){};var si=class extends he(Ve){};var ai=class extends he(We){};var li=class extends he(Fe){};var hi=f(A());var $=f(A()),Pc={itemsGap:$.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:$.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:$.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",$.designSystemVariables.colorOutline),itemBorderRadius:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",$.designSystemVariables.borderRadiusS),itemBackgroundColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",$.designSystemVariables.colorSurface),itemTextColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",$.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",$.designSystemVariables.colorPrimary),itemHoverTextColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",$.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:$.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:$.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var fi=f(A());var ui=f(A()),Ic=f(N());var ci;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(ci||(ci={}));var Mc;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Mc||(Mc={}));var jd=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Po=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},No=Symbol("registerInterval"),Mo=(0,ui.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[No]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[No]):this.dispatchEvent(new Po)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=No,jd([(0,Ic.state)()],r.prototype,"stateManager",void 0),r}),Dc=class extends Mo(ui.FtLitElementRedux){};var Do=et.build("designedReaderAttachments"),kc={download:"Download \u201C{0}\u201D"};var _t=f(T()),mr=f(N()),vr=f(A()),Yc=f(eo());var Xc=f(Io());var zc=f(T()),z=f(N()),Kc=f(Io()),Gr=f(A());var Fc=f(T()),I=f(A()),$c=I.FtCssVariableFactory.extend("--ft-ripple-color","",I.designSystemVariables.colorContent),Me={color:$c,backgroundColor:I.FtCssVariableFactory.extend("--ft-ripple-background-color","",$c),opacityContentOnSurfacePressed:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:I.FtCssVariableFactory.external(I.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:I.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Hc=I.FtCssVariableFactory.extend("--ft-ripple-color","",I.designSystemVariables.colorPrimary),jc={color:Hc,backgroundColor:I.FtCssVariableFactory.extend("--ft-ripple-background-color","",Hc)},Bc=I.FtCssVariableFactory.extend("--ft-ripple-color","",I.designSystemVariables.colorSecondary),Vc={color:Bc,backgroundColor:I.FtCssVariableFactory.extend("--ft-ripple-background-color","",Bc)},Wc=Fc.css`
392
+ `}willUpdate(e){super.willUpdate(e),e.has("documentId")&&this.initStateManager()}async initStateManager(){let e=await this.viewerStateManager.setDocumentId(this.documentId);this.documentId&&this.dispatchEvent(new gt(e))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};Lo([(0,Lc.property)()],Tt.prototype,"documentId",void 0);Lo([yr({context:Ro})],Tt.prototype,"viewerStateManager",void 0);Lo([(0,hr.reduxEventListener)({eventName:_e.eventName})],Tt.prototype,"onAuthenticationChange",null);var Nc;(function(t){t.RATING="RATING"})(Nc||(Nc={}));var ni;(function(t){t.udAttachmentsUpdate="ud-attachments-update"})(ni||(ni={}));var ii=class extends he(P){};var oi=class extends he(z){};var si=class extends he(Ve){};var ai=class extends he(We){};var li=class extends he(Fe){};var hi=f(A());var $=f(A()),Pc={itemsGap:$.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:$.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:$.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",$.designSystemVariables.colorOutline),itemBorderRadius:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",$.designSystemVariables.borderRadiusS),itemBackgroundColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",$.designSystemVariables.colorSurface),itemTextColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",$.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",$.designSystemVariables.colorPrimary),itemHoverTextColor:$.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",$.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:$.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:$.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var fi=f(A());var ui=f(A()),Dc=f(N());var ci;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(ci||(ci={}));var Mc;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Mc||(Mc={}));var jd=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Po=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},No=Symbol("registerInterval"),Mo=(0,ui.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var i;return(i=this.stateManager)===null||i===void 0?void 0:i.service}connectedCallback(){super.connectedCallback(),this[No]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[No]):this.dispatchEvent(new Po)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=No,jd([(0,Dc.state)()],r.prototype,"stateManager",void 0),r}),Ic=class extends Mo(ui.FtLitElementRedux){};var Io=et.build("designedReaderAttachments"),kc={download:"Download \u201C{0}\u201D"};var _t=f(T()),mr=f(N()),vr=f(A()),Yc=f(eo());var Xc=f(Do());var zc=f(T()),K=f(N()),Kc=f(Do()),Gr=f(A());var Fc=f(T()),D=f(A()),$c=D.FtCssVariableFactory.extend("--ft-ripple-color","",D.designSystemVariables.colorContent),Me={color:$c,backgroundColor:D.FtCssVariableFactory.extend("--ft-ripple-background-color","",$c),opacityContentOnSurfacePressed:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:D.FtCssVariableFactory.external(D.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:D.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Hc=D.FtCssVariableFactory.extend("--ft-ripple-color","",D.designSystemVariables.colorPrimary),jc={color:Hc,backgroundColor:D.FtCssVariableFactory.extend("--ft-ripple-background-color","",Hc)},Bc=D.FtCssVariableFactory.extend("--ft-ripple-color","",D.designSystemVariables.colorSecondary),Vc={color:Bc,backgroundColor:D.FtCssVariableFactory.extend("--ft-ripple-background-color","",Bc)},Wc=Fc.css`
393
393
  :host {
394
394
  display: contents;
395
395
  }
@@ -501,19 +501,19 @@
501
501
  opacity: ${Me.opacityContentOnSurfacePressed};
502
502
  transform: translate(-50%, -50%) scale(1);
503
503
  }
504
- `;var J=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},L=class extends Gr.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Gr.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Gr.Debouncer(10),this.moveRipple=t=>{var r,n;let{x:i,y:o}=this.getCoordinates(t),s=(n=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&n!==void 0?n:{x:0,y:0,width:0,height:0};this.originX=Math.round(i!=null?i-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return zc.html`
504
+ `;var Q=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},L=class extends Gr.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new Gr.Debouncer(1e3),this.onTransitionStart=e=>{e.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=e=>{e.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new Gr.Debouncer(10),this.moveRipple=e=>{var r,n;let{x:i,y:o}=this.getCoordinates(e),s=(n=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&n!==void 0?n:{x:0,y:0,width:0,height:0};this.originX=Math.round(i!=null?i-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=e=>{this.moveRipple(e),this.pressed=!this.isIgnored(e)},this.endPress=()=>{this.pressed=!1},this.startHover=e=>{this.hovered=!this.isIgnored(e)},this.endHover=()=>{this.hovered=!1},this.startFocus=e=>{this.focused=this.isFocusVisible(e?.target)&&!this.isIgnored(e)},this.endFocus=()=>{this.focused=!1}}render(){let e={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return zc.html`
505
505
  <style>
506
506
  .ft-ripple .ft-ripple--effect {
507
507
  left: ${this.originX}px;
508
508
  top: ${this.originY}px;
509
509
  }
510
510
  </style>
511
- <div class="${(0,Kc.classMap)(t)}">
511
+ <div class="${(0,Kc.classMap)(e)}">
512
512
  <div class="ft-ripple--background"></div>
513
513
  <div class="ft-ripple--effect"></div>
514
514
  </div>
515
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,n;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let n=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",n,s),t.addEventListener("touchstart",i,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",n,s),t.removeEventListener("touchstart",i,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,n=t,i,o;return r.x!=null?{x:i,y:o}=r:n.touches!=null&&(i=n.touches[0].clientX,o=n.touches[0].clientY),{x:i,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};L.elementDefinitions={};L.styles=Wc;J([(0,z.property)({type:Boolean})],L.prototype,"primary",void 0);J([(0,z.property)({type:Boolean})],L.prototype,"secondary",void 0);J([(0,z.property)({type:Boolean})],L.prototype,"unbounded",void 0);J([(0,z.property)({type:Boolean})],L.prototype,"activated",void 0);J([(0,z.property)({type:Boolean})],L.prototype,"selected",void 0);J([(0,z.property)({type:Boolean})],L.prototype,"disabled",void 0);J([(0,z.state)()],L.prototype,"hovered",void 0);J([(0,z.state)()],L.prototype,"focused",void 0);J([(0,z.state)()],L.prototype,"pressed",void 0);J([(0,z.state)()],L.prototype,"rippling",void 0);J([(0,z.state)()],L.prototype,"originX",void 0);J([(0,z.state)()],L.prototype,"originY",void 0);J([(0,z.query)(".ft-ripple")],L.prototype,"ripple",void 0);J([(0,z.query)(".ft-ripple--effect")],L.prototype,"rippleEffect",void 0);var qc=f(A());var Gc={"ft-ripple":L};(0,qc.customElements)(Gc);var di=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Bd={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},Ce=class extends(0,vr.withAnalytics)(vr.FtLitElementRedux,Bd){constructor(){super(...arguments),this.hideFileFormatIcon=!1,this.hideFilename=!1,this.hideDownloadIcon=!1}render(){if(this.canRender()){let t={"hide-file-format-icon":this.hideFileFormatIcon,"hide-filename":this.hideFilename,"hide-download-icon":this.hideDownloadIcon};return _t.html`
516
- <div part="container" class="${(0,Xc.classMap)(t)}">
515
+ `}contentAvailableCallback(e){super.contentAvailableCallback(e),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(e){var r,n;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(n=this.target)===null||n===void 0||n.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var e,r;let n=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;n&&this.setupFor((r=this.target)!==null&&r!==void 0?r:n)}forceFocusUpdate(){var e;!((e=this.target)===null||e===void 0)&&e.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(e){if(this.setupDebouncer.cancel(),this.target===e)return;this.onDisconnect&&this.onDisconnect(),this.target=e,e.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},n=r("mouseup","contextmenu"),i=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};e.addEventListener("mouseover",this.startHover,s),e.addEventListener("mousemove",this.moveRipple,s),e.addEventListener("mouseleave",this.endHover,s),e.addEventListener("mousedown",n,s),e.addEventListener("touchstart",i,s),e.addEventListener("touchmove",this.moveRipple,s),e.addEventListener("keydown",o,s),e.addEventListener("focus",this.startFocus,s),e.addEventListener("blur",this.endFocus,s),e.addEventListener("focusin",this.startFocus,s),e.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{e.removeAttribute("data-is-ft-ripple-target"),e.removeEventListener("mouseover",this.startHover,s),e.removeEventListener("mousemove",this.moveRipple,s),e.removeEventListener("mouseleave",this.endHover,s),e.removeEventListener("mousedown",n,s),e.removeEventListener("touchstart",i,s),e.removeEventListener("touchmove",this.moveRipple,s),e.removeEventListener("keydown",o,s),e.removeEventListener("focus",this.startFocus,s),e.removeEventListener("blur",this.endFocus,s),e.removeEventListener("focusin",this.startFocus,s),e.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(e){let r=e,n=e,i,o;return r.x!=null?{x:i,y:o}=r:n.touches!=null&&(i=n.touches[0].clientX,o=n.touches[0].clientY),{x:i,y:o}}isFocusVisible(e){return e instanceof HTMLElement?e.matches(":focus-visible"):!0}isIgnored(e){if(this.disabled)return!0;if(e!=null)for(let r of e.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};L.elementDefinitions={};L.styles=Wc;Q([(0,K.property)({type:Boolean})],L.prototype,"primary",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"secondary",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"unbounded",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"activated",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"selected",void 0);Q([(0,K.property)({type:Boolean})],L.prototype,"disabled",void 0);Q([(0,K.state)()],L.prototype,"hovered",void 0);Q([(0,K.state)()],L.prototype,"focused",void 0);Q([(0,K.state)()],L.prototype,"pressed",void 0);Q([(0,K.state)()],L.prototype,"rippling",void 0);Q([(0,K.state)()],L.prototype,"originX",void 0);Q([(0,K.state)()],L.prototype,"originY",void 0);Q([(0,K.query)(".ft-ripple")],L.prototype,"ripple",void 0);Q([(0,K.query)(".ft-ripple--effect")],L.prototype,"rippleEffect",void 0);var qc=f(A());var Gc={"ft-ripple":L};(0,qc.customElements)(Gc);var di=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Bd={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},Ce=class extends(0,vr.withAnalytics)(vr.FtLitElementRedux,Bd){constructor(){super(...arguments),this.hideFileFormatIcon=!1,this.hideFilename=!1,this.hideDownloadIcon=!1}render(){if(this.canRender()){let e={"hide-file-format-icon":this.hideFileFormatIcon,"hide-filename":this.hideFilename,"hide-download-icon":this.hideDownloadIcon};return _t.html`
516
+ <div part="container" class="${(0,Xc.classMap)(e)}">
517
517
  ${(0,Yc.repeat)(this.attachments,r=>r.id,r=>{var n;let i=Hn(r.mimeType,(0,vr.last)(r.file.split(".")));return _t.html`
518
518
  <div part="attachment">
519
519
  <a part="viewer-link" href="${this.getAttachmentViewerLink(r)}"
@@ -524,7 +524,7 @@
524
524
  variant="file-format"
525
525
  value="${i}"
526
526
  style="color: ${(n=yo[i])!==null&&n!==void 0?n:yo[g.UNKNOWN]}"></ft-icon>
527
- <ft-typography part="name" variant="${X.body2}">${r.name}</ft-typography>
527
+ <ft-typography part="name" variant="${Z.body2}">${r.name}</ft-typography>
528
528
  </a>
529
529
  ${r.externalLink?_t.nothing:_t.html`
530
530
  <a part="download-link"
@@ -539,19 +539,19 @@
539
539
  </div>
540
540
  `})}
541
541
  </div>
542
- `}return _t.nothing}getAttachmentAriaLabel(t){var r;let n=t.name,i=t.file;if(n===i)return i;let o=(r=i.includes(".")?i.split(".").pop():t.mimeType)!==null&&r!==void 0?r:"";return n+" "+o}canRender(){var t,r;return((r=(t=this.attachments)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)>0}getAttachmentDownloadLink(t){throw new Error("Not implemented")}getAttachmentDownloadLinkAriaLabel(t){throw new Error("Not implemented")}getAttachmentViewerLink(t){throw new Error("Not implemented")}};Ce.elementDefinitions={"ft-icon":F,"ft-ripple":L,"ft-typography":V};di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideFileFormatIcon",void 0);di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideFilename",void 0);di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideDownloadIcon",void 0);di([(0,mr.state)()],Ce.prototype,"attachments",void 0);var Zc=f(T()),qr=f(A());function pi(e){return Zc.css`
542
+ `}return _t.nothing}getAttachmentAriaLabel(e){var r;let n=e.name,i=e.file;if(n===i)return i;let o=(r=i.includes(".")?i.split(".").pop():e.mimeType)!==null&&r!==void 0?r:"";return n+" "+o}canRender(){var e,r;return((r=(e=this.attachments)===null||e===void 0?void 0:e.length)!==null&&r!==void 0?r:0)>0}getAttachmentDownloadLink(e){throw new Error("Not implemented")}getAttachmentDownloadLinkAriaLabel(e){throw new Error("Not implemented")}getAttachmentViewerLink(e){throw new Error("Not implemented")}};Ce.elementDefinitions={"ft-icon":W,"ft-ripple":L,"ft-typography":F};di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideFileFormatIcon",void 0);di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideFilename",void 0);di([(0,mr.property)({type:Boolean})],Ce.prototype,"hideDownloadIcon",void 0);di([(0,mr.state)()],Ce.prototype,"attachments",void 0);var Zc=f(T()),qr=f(A());function pi(t){return Zc.css`
543
543
  [part="container"] {
544
544
  display: flex;
545
545
  flex-direction: column;
546
- gap: ${e.itemsGap};
546
+ gap: ${t.itemsGap};
547
547
  }
548
548
 
549
549
  [part="attachment"] {
550
550
  border-style: solid;
551
- border-width: ${e.itemBorderWidth};
552
- border-color: ${e.itemBorderColor};
553
- border-radius: ${e.itemBorderRadius};
554
- background-color: ${e.itemBackgroundColor};
551
+ border-width: ${t.itemBorderWidth};
552
+ border-color: ${t.itemBorderColor};
553
+ border-radius: ${t.itemBorderRadius};
554
+ background-color: ${t.itemBackgroundColor};
555
555
  }
556
556
 
557
557
  [part="attachment"], [part="viewer-link"], [part="download-link"] {
@@ -561,14 +561,14 @@
561
561
 
562
562
  [part="viewer-link"], [part="download-link"] {
563
563
  position: relative;
564
- color: ${e.itemTextColor};
564
+ color: ${t.itemTextColor};
565
565
  text-decoration: none;
566
- padding: ${e.itemPadding};
566
+ padding: ${t.itemPadding};
567
567
  align-items: center;
568
568
  }
569
569
 
570
570
  [part="viewer-link"]:hover, [part="download-link"]:hover {
571
- color: ${e.itemHoverTextColor};
571
+ color: ${t.itemHoverTextColor};
572
572
  }
573
573
 
574
574
  [part="viewer-link"] {
@@ -583,16 +583,16 @@
583
583
  }
584
584
 
585
585
  [part~="ripple"] {
586
- ${(0,qr.setVariable)(Me.color,e.itemHoverBackgroundColor)};
587
- ${(0,qr.setVariable)(Me.borderRadius,e.itemBorderRadius)};
586
+ ${(0,qr.setVariable)(Me.color,t.itemHoverBackgroundColor)};
587
+ ${(0,qr.setVariable)(Me.borderRadius,t.itemBorderRadius)};
588
588
  }
589
589
 
590
590
  [part="file-format-icon"] {
591
- ${(0,qr.setVariable)(de.size,e.fileFormatIconSize)};
591
+ ${(0,qr.setVariable)(de.size,t.fileFormatIconSize)};
592
592
  }
593
593
 
594
594
  [part="download-icon"] {
595
- ${(0,qr.setVariable)(de.size,e.downloadIconSize)};
595
+ ${(0,qr.setVariable)(de.size,t.downloadIconSize)};
596
596
  }
597
597
 
598
598
  .hide-file-format-icon [part="file-format-icon"] {
@@ -606,7 +606,7 @@
606
606
  .hide-download-icon [part="download-link"] {
607
607
  display: none;
608
608
  }
609
- `}var Jc=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Rt=class extends Mo(tt(Ce)){constructor(){super(),this.addI18nContext(Do,kc)}update(t){super.update(t),t.has("map")&&this.updateAttachments()}updateAttachments(){var t;this.map?(t=this.service)===null||t===void 0||t.getAttachments().then(r=>this.attachments=r):this.attachments=void 0}getAttachmentDownloadLink(t){var r,n;return(n=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(t.id))!==null&&n!==void 0?n:""}getAttachmentDownloadLinkAriaLabel(t){return Do.messages.download(this.getAttachmentAriaLabel(t))}getAttachmentViewerLink(t){var r,n;return t.externalLink?t.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((n=t.viewerUrl)!==null&&n!==void 0?n:"")}};Rt.styles=pi(Pc);Jc([(0,fi.redux)({store:"reader"})],Rt.prototype,"map",void 0);Jc([(0,fi.reduxEventListener)({eventName:ci.mapAttachmentsUpdate})],Rt.prototype,"updateAttachments",null);var eu=f(A());var Qc={"ft-reader-attachments":Rt};(0,eu.customElements)(Qc);var H=f(A()),tu={itemsGap:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-items-gap","","SIZE","8px"),itemPadding:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-padding","","SIZE","8px"),itemBorderWidth:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-border-width","","SIZE","1px"),itemBorderColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-color","",H.designSystemVariables.colorOutline),itemBorderRadius:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-radius","",H.designSystemVariables.borderRadiusS),itemBackgroundColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-background-color","",H.designSystemVariables.colorSurface),itemTextColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-text-color","",H.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-background-color","",H.designSystemVariables.colorPrimary),itemHoverTextColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-text-color","",H.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-down-icon-size","","SIZE","20px")};var ko=et.build("designedUdViewer"),ru={download:"Download {0}"};var nu=function(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},Lt=class extends he(tt(Ce)){constructor(){super(),this.addI18nContext(ko,ru)}update(t){super.update(t),t.has("document")&&this.updateAttachments()}updateAttachments(){var t;this.document?(t=this.service)===null||t===void 0||t.getAttachments(this.document.id).then(r=>this.attachments=r):this.attachments=void 0}canRender(){return!!this.document&&super.canRender()}getAttachmentDownloadLink(t){var r,n;return(n=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(this.document.id,t.id))!==null&&n!==void 0?n:""}getAttachmentDownloadLinkAriaLabel(t){return ko.messages.download(this.getAttachmentAriaLabel(t))}getAttachmentViewerLink(t){var r,n;return t.externalLink?t.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((n=t.viewerUrl)!==null&&n!==void 0?n:"")}};Lt.styles=pi(tu);nu([(0,hi.redux)({store:"viewer"})],Lt.prototype,"document",void 0);nu([(0,hi.reduxEventListener)({eventName:ni.udAttachmentsUpdate})],Lt.prototype,"updateAttachments",null);var iu={"ft-asset-viewer-content":Pn,"ft-asset-viewer-content-control":qn,"ft-asset-viewer-context":Ue,"ft-asset-viewer-document-title":Qn,"ft-asset-viewer-filename":Yn,"ft-asset-viewer-mime-type-icon":Jn,"ft-asset-viewer-title":Xn,"ft-ud-viewer-attachments":Lt,"ft-ud-viewer-content":ii,"ft-ud-viewer-content-control":oi,"ft-ud-viewer-context":Tt,"ft-ud-viewer-filename":si,"ft-ud-viewer-mime-type-icon":li,"ft-ud-viewer-title":ai};(0,ou.customElements)(iu);})();
609
+ `}var Jc=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Rt=class extends Mo(tt(Ce)){constructor(){super(),this.addI18nContext(Io,kc)}update(e){super.update(e),e.has("map")&&this.updateAttachments()}updateAttachments(){var e;this.map?(e=this.service)===null||e===void 0||e.getAttachments().then(r=>this.attachments=r):this.attachments=void 0}getAttachmentDownloadLink(e){var r,n;return(n=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(e.id))!==null&&n!==void 0?n:""}getAttachmentDownloadLinkAriaLabel(e){return Io.messages.download(this.getAttachmentAriaLabel(e))}getAttachmentViewerLink(e){var r,n;return e.externalLink?e.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((n=e.viewerUrl)!==null&&n!==void 0?n:"")}};Rt.styles=pi(Pc);Jc([(0,fi.redux)({store:"reader"})],Rt.prototype,"map",void 0);Jc([(0,fi.reduxEventListener)({eventName:ci.mapAttachmentsUpdate})],Rt.prototype,"updateAttachments",null);var eu=f(A());var Qc={"ft-reader-attachments":Rt};(0,eu.customElements)(Qc);var H=f(A()),tu={itemsGap:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-items-gap","","SIZE","8px"),itemPadding:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-padding","","SIZE","8px"),itemBorderWidth:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-border-width","","SIZE","1px"),itemBorderColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-color","",H.designSystemVariables.colorOutline),itemBorderRadius:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-radius","",H.designSystemVariables.borderRadiusS),itemBackgroundColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-background-color","",H.designSystemVariables.colorSurface),itemTextColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-text-color","",H.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-background-color","",H.designSystemVariables.colorPrimary),itemHoverTextColor:H.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-text-color","",H.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:H.FtCssVariableFactory.create("--ft-ud-viewer-attachments-down-icon-size","","SIZE","20px")};var ko=et.build("designedUdViewer"),ru={download:"Download {0}"};var nu=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},Lt=class extends he(tt(Ce)){constructor(){super(),this.addI18nContext(ko,ru)}update(e){super.update(e),e.has("document")&&this.updateAttachments()}updateAttachments(){var e;this.document?(e=this.service)===null||e===void 0||e.getAttachments(this.document.id).then(r=>this.attachments=r):this.attachments=void 0}canRender(){return!!this.document&&super.canRender()}getAttachmentDownloadLink(e){var r,n;return(n=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(this.document.id,e.id))!==null&&n!==void 0?n:""}getAttachmentDownloadLinkAriaLabel(e){return ko.messages.download(this.getAttachmentAriaLabel(e))}getAttachmentViewerLink(e){var r,n;return e.externalLink?e.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((n=e.viewerUrl)!==null&&n!==void 0?n:"")}};Lt.styles=pi(tu);nu([(0,hi.redux)({store:"viewer"})],Lt.prototype,"document",void 0);nu([(0,hi.reduxEventListener)({eventName:ni.udAttachmentsUpdate})],Lt.prototype,"updateAttachments",null);var iu={"ft-asset-viewer-content":Pn,"ft-asset-viewer-content-control":qn,"ft-asset-viewer-context":Ue,"ft-asset-viewer-document-title":Qn,"ft-asset-viewer-filename":Yn,"ft-asset-viewer-mime-type-icon":Jn,"ft-asset-viewer-title":Xn,"ft-ud-viewer-attachments":Lt,"ft-ud-viewer-content":ii,"ft-ud-viewer-content-control":oi,"ft-ud-viewer-context":Tt,"ft-ud-viewer-filename":si,"ft-ud-viewer-mime-type-icon":li,"ft-ud-viewer-title":ai};(0,ou.customElements)(iu);})();
610
610
  /*! Bundled license information:
611
611
 
612
612
  @lit/context/lib/context-request-event.js: