@fluid-topics/ft-viewer 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-viewer.light.js +61 -61
- package/build/ft-viewer.min.js +46 -46
- package/package.json +9 -9
package/build/ft-viewer.light.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(()=>{var th=Object.create;var al=Object.defineProperty;var ih=Object.getOwnPropertyDescriptor;var rh=Object.getOwnPropertyNames;var nh=Object.getPrototypeOf,oh=Object.prototype.hasOwnProperty;var Ji=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(i){throw e=0,i}};var sh=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rh(e))!oh.call(t,n)&&n!==i&&al(t,n,{get:()=>e[n],enumerable:!(r=ih(e,n))||r.enumerable});return t};var c=(t,e,i)=>(i=t!=null?th(nh(t)):{},sh(e||!t||!t.__esModule?al(i,"default",{value:t,enumerable:!0}):i,t));var h=Ji((Jm,ll)=>{ll.exports=ftGlobals.wcUtils});var $=Ji((Qm,cl)=>{cl.exports=ftGlobals.litDecorators});var x=Ji((_g,fl)=>{fl.exports=ftGlobals.lit});var pr=Ji((dx,bd)=>{bd.exports=ftGlobals.litRepeat});var Da=Ji((zx,eu)=>{eu.exports=ftGlobals.litUnsafeHTML});var it=Ji((iE,Tu)=>{Tu.exports=ftGlobals.litClassMap});var Jf=c(h());var ul=c(h()),pl=c($());var Kt=class extends Event{constructor(e,i,r,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i,this.callback=r,this.subscribe=n??!1}};var Qi=class{constructor(e,i,r,n){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,i.context!==void 0){let o=i;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=i,this.callback=r,this.subscribe=n??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Kt(this.context,this.host,this.t,this.subscribe))}};var kn=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,i=!1){let r=i||!Object.is(e,this.o);this.o=e,r&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[i,{disposer:r}]of this.subscriptions)i(this.o,r)},e!==void 0&&(this.value=e)}addCallback(e,i,r){if(!r)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:i});let{disposer:n}=this.subscriptions.get(e);e(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Fs=class extends Event{constructor(e,i){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i}},er=class extends kn{constructor(e,i,r){super(i.context!==void 0?i.initialValue:r),this.onContextRequest=n=>{if(n.context!==this.context)return;let o=n.contextTarget??n.composedPath()[0];o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.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 Kt(this.context,a,s,!0)));n.stopPropagation()},this.host=e,i.context!==void 0?this.context=i.context:this.context=i,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 Fs(this.context,this.host))}};var Vr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let i=this.pendingContextRequests.get(e.context);if(i===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:r}=i;for(let{elementRef:n,callbackRef:o}of r){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Kt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let i=e.contextTarget??e.composedPath()[0],r=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(i);o===void 0&&n.callbacks.set(i,o=new WeakSet),o.has(r)||(o.add(r),n.requests.push({elementRef:new WeakRef(i),callbackRef:new WeakRef(r)}))}}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 Br({context:t}){return(e,i)=>{let r=new WeakMap;if(typeof i=="object")return{get(){return e.get.call(this)},set(n){return r.get(this).setValue(n),e.set.call(this,n)},init(n){return r.set(this,new er(this,{context:t,initialValue:n})),n}};{e.constructor.addInitializer((s=>{r.set(s,new er(s,{context:t}))}));let n=Object.getOwnPropertyDescriptor(e,i),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){r.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){r.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(e,i,o)}}}function Hr({context:t,subscribe:e}){return(i,r)=>{typeof r=="object"?r.addInitializer((function(){new Qi(this,{context:t,callback:n=>{i.set.call(this,n)},subscribe:e})})):i.constructor.addInitializer((n=>{new Qi(n,{context:t,callback:o=>{n[r]=o},subscribe:e})}))}}var ah=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Vs=Symbol("asset-viewer-state-manager"),Pt=(0,ul.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(t){class e extends t{willUpdate(r){super.willUpdate(r),r.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 ah([Hr({context:Vs,subscribe:!0}),(0,pl.state)()],e.prototype,"viewerStateManager",void 0),e});var hd=c(x()),ur=c(h());var hl=c(h()),lh={setZoom:(t,e)=>{t.contentModifiers.zoom=e.payload},setRotation:(t,e)=>{t.contentModifiers.rotation=e.payload}},Ln=t=>hl.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,configuration:void 0,documentRating:void 0,assetRating:void 0,relatives:void 0},reducers:lh});var ml=c(h()),tr=class extends ml.FtStateManager{constructor(e){super(),this.store=e}setZoom(e){this.store.actions.setZoom(e)}setRotation(e){this.store.actions.setRotation(e)}};var la=c($());var gl=c($(),1);var Bs=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function yl(t,e){return(0,gl.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return zr(t);try{return JSON.parse(i)}catch{return zr(t)}},toAttribute:i=>JSON.stringify(i)},hasChanged:jr,...e??{}})}function ch(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!ir(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!ir(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[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 n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(i=o.length,i!==n(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){let s=o[r];if(!ir(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ir(t,e){try{return ch(t,e)}catch{return!1}}function jr(t,e){return!ir(t,e)}function zr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Dn(t,e){let i=r=>r[t]===!0;return r=>{if(i(r))return r;let n=e(r);return n[t]=!0,n}}var vl=c($(),1);var Hs=t=>{let e=t??{};return(i,r)=>{var n;let o={hasChanged:jr,attribute:!1,...e};(0,vl.property)(o)(i,r);let s=i.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(r,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[r]),store:e.store})}};var In=class{constructor(){this.queue=[]}add(e,i=!1){i&&this.clear(e.type),this.queue.push(e)}consume(e){let i=this.queue.find(r=>r.type===e);return i&&(this.queue=this.queue.filter(r=>r!==i)),i}clear(e){typeof e=="string"?this.queue=this.queue.filter(i=>i.type!==e):this.queue=this.queue.filter(i=>!e.test(i.type))}};var _i=c($(),1);var Mn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,i){return this.callbacks=[e],this.debounce(i)}queue(e,i){return this.callbacks.push(e),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((i,r)=>{this.resolvePromise=i,this.rejectPromise=r})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,i;let r=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(i=this.resolvePromise)!==null&&i!==void 0?i:(()=>null);this.clearPromise();for(let s of r)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var xl=c(x(),1);var Pn=globalThis,dh=Pn.ShadowRoot&&(Pn.ShadyCSS===void 0||Pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var bl=(t,e)=>{if(dh)t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let r=document.createElement("style"),n=Pn.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=i.cssText,t.appendChild(r)}};var Nn=class extends xl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let i={...e.shadowRootOptions,customElements:e.registry},r=this.renderOptions.creationScope=this.attachShadow(i);return bl(r,e.elementStyles),r}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([i,r])=>this.defineScopedElement(i,r))}static defineScopedElement(e,i){Bs(e)(i),this.canDefineScopedElement(e)&&this.registry.define(e,i)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,i){this.scopedRegistryConstructor.defineScopedElement(e,i)}};function Sl(t,e,...i){var r;let n=t.querySelector(e);for(let o of i)n=(r=n?.shadowRoot)===null||r===void 0?void 0:r.querySelector(o);return n}var nr=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Al,wl=Symbol("constructorPrototype"),El=Symbol("constructorName"),Cl=Symbol("exportpartsDebouncer"),_l=Symbol("dynamicDependenciesLoaded"),rr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};rr.eventName="exportparts-updated";var Nt=class extends Nn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Al]=new Mn(5),this.scheduleExportpartsUpdate=()=>{var e,i,r;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(r=(i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)!==null&&r!==void 0&&r)&&this[Cl].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[El]=this.constructor.name,this[wl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[El]&&Object.setPrototypeOf(this,this[wl])}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(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let i=this.constructor;i[_l]||(i[_l]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(rr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(rr.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 rr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:i,selector:r,shadowPath:n}=this.elementToFocus;if(r!=null){let o=[...n??[],r];i=Sl(this.shadowRoot,...o)}i?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||i?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var i,r,n;if(((r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&r!==void 0?r:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var i,r,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,d=e.filter(l).map(f=>f.trim());if(d.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("[part],[exportparts]"))!==null&&r!==void 0?r:[]){let y=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],S=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],T=[...y,...S].filter(l).map(b=>b.trim());for(let b of T)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>d.map(y=>`${f}:${y}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Al=Cl;nr([(0,_i.property)()],Nt.prototype,"exportpartsPrefix",void 0);nr([yl([])],Nt.prototype,"exportpartsPrefixes",void 0);nr([(0,_i.property)({reflect:!0})],Nt.prototype,"exportparts",void 0);nr([(0,_i.property)()],Nt.prototype,"customStylesheet",void 0);nr([(0,_i.property)()],Nt.prototype,"elementToFocus",void 0);nr([(0,_i.state)()],Nt.prototype,"useAdoptedStyleSheets",void 0);function $n(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Wr=Symbol("internalReduxEventsUnsubscribers"),oi=Symbol("internalStoresUnsubscribers"),Ai=Symbol("internalStores"),uh=Dn(Symbol("withRedux"),function(t){var e,i,r;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=new Map,this[r]=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[Ai].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ai].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ai].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ai].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Ai].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ai].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 d=this.getStore(s.store);d&&(s.store?this[oi].has(s.store):this[oi].size>0)&&(this[a]=s.selector(d.getState(),this))}})}subscribeToStore(s,a){var l;this[oi].set(s,a.subscribe(()=>this.updateFromStores())),this[Wr].set(s,[]),$n(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((d,u)=>{if(typeof this[u]=="function"&&(!d.store||a.name===d.store)){let p=f=>this[u](f);a.addEventListener(d.eventName,p),this[Wr].get(s).push(()=>a.removeEventListener(d.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[oi].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[oi].has(s)&&this[oi].get(s)(),this[oi].delete(s),(a=this[Wr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Wr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=oi,i=Ai,r=Wr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Tl=class extends uh(Nt){};function Ce(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 ph=typeof Symbol=="function"&&Symbol.observable||"@@observable",Rl=ph,zs=()=>Math.random().toString(36).substring(7).split("").join("."),fh={INIT:`@@redux/INIT${zs()}`,REPLACE:`@@redux/REPLACE${zs()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zs()}`},Un=fh;function Fn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function js(t,e,i){if(typeof t!="function")throw new Error(Ce(2));if(typeof e=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof e=="function"&&typeof i>"u"&&(i=e,e=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ce(1));return i(js)(t,e)}let r=t,n=e,o=new Map,s=o,a=0,l=!1;function d(){s===o&&(s=new Map,o.forEach((b,R)=>{s.set(R,b)}))}function u(){if(l)throw new Error(Ce(3));return n}function p(b){if(typeof b!="function")throw new Error(Ce(4));if(l)throw new Error(Ce(5));let R=!0;d();let V=a++;return s.set(V,b),function(){if(R){if(l)throw new Error(Ce(6));R=!1,d(),s.delete(V),o=null}}}function f(b){if(!Fn(b))throw new Error(Ce(7));if(typeof b.type>"u")throw new Error(Ce(8));if(typeof b.type!="string")throw new Error(Ce(17));if(l)throw new Error(Ce(9));try{l=!0,n=r(n,b)}finally{l=!1}return(o=s).forEach(V=>{V()}),b}function y(b){if(typeof b!="function")throw new Error(Ce(10));r=b,f({type:Un.REPLACE})}function S(){let b=p;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Ce(11));function V(){let k=R;k.next&&k.next(u())}return V(),{unsubscribe:b(V)}},[Rl](){return this}}}return f({type:Un.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:y,[Rl]:S}}function hh(t){Object.keys(t).forEach(e=>{let i=t[e];if(typeof i(void 0,{type:Un.INIT})>"u")throw new Error(Ce(12));if(typeof i(void 0,{type:Un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function Ol(t){let e=Object.keys(t),i={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(i[a]=t[a])}let r=Object.keys(i),n,o;try{hh(i)}catch(s){o=s}return function(a={},l){if(o)throw o;let d=!1,u={};for(let p=0;p<r.length;p++){let f=r[p],y=i[f],S=a[f],T=y(S,l);if(typeof T>"u"){let b=l&&l.type;throw new Error(Ce(14))}u[f]=T,d=d||T!==S}return d=d||r.length!==Object.keys(a).length,d?u:a}}function Kr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,i)=>(...r)=>e(i(...r)))}function kl(...t){return e=>(i,r)=>{let n=e(i,r),o=()=>{throw new Error(Ce(15))},s={getState:n.getState,dispatch:(l,...d)=>o(l,...d)},a=t.map(l=>l(s));return o=Kr(...a)(n.dispatch),{...n,dispatch:o}}}function Ll(t){return Fn(t)&&"type"in t&&typeof t.type=="string"}var Vl=Symbol.for("immer-nothing"),Dl=Symbol.for("immer-draftable"),De=Symbol.for("immer-state");function xt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Je=Object,sr=Je.getPrototypeOf,zn="constructor",Yn="prototype",qs="configurable",jn="enumerable",Bn="writable",Gr="value",$t=t=>!!t&&!!t[De];function Qe(t){return t?Bl(t)||Xn(t)||!!t[Dl]||!!t[zn]?.[Dl]||Jn(t)||Qn(t):!1}var mh=Je[Yn][zn].toString(),Il=new WeakMap;function Bl(t){if(!t||!ia(t))return!1;let e=sr(t);if(e===null||e===Je[Yn])return!0;let i=Je.hasOwnProperty.call(e,zn)&&e[zn];if(i===Object)return!0;if(!or(i))return!1;let r=Il.get(i);return r===void 0&&(r=Function.toString.call(i),Il.set(i,r)),r===mh}function Zn(t,e,i=!0){Zr(t)===0?(i?Reflect.ownKeys(t):Je.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((r,n)=>e(n,r,t))}function Zr(t){let e=t[De];return e?e.type_:Xn(t)?1:Jn(t)?2:Qn(t)?3:0}var Ws=(t,e,i=Zr(t))=>i===2?t.has(e):Je[Yn].hasOwnProperty.call(t,e),Ys=(t,e,i=Zr(t))=>i===2?t.get(e):t[e],Wn=(t,e,i,r=Zr(t))=>{r===2?t.set(e,i):r===3?t.add(i):t[e]=i};function gh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Xn=Array.isArray,Jn=t=>t instanceof Map,Qn=t=>t instanceof Set,ia=t=>typeof t=="object",or=t=>typeof t=="function",Ks=t=>typeof t=="boolean";function yh(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Gt=t=>t.copy_||t.base_;var ra=t=>t.modified_?t.copy_:t.base_;function Zs(t,e){if(Jn(t))return new Map(t);if(Qn(t))return new Set(t);if(Xn(t))return Array[Yn].slice.call(t);let i=Bl(t);if(e===!0||e==="class_only"&&!i){let r=Je.getOwnPropertyDescriptors(t);delete r[De];let n=Reflect.ownKeys(r);for(let o=0;o<n.length;o++){let s=n[o],a=r[s];a[Bn]===!1&&(a[Bn]=!0,a[qs]=!0),(a.get||a.set)&&(r[s]={[qs]:!0,[Bn]:!0,[jn]:a[jn],[Gr]:t[s]})}return Je.create(sr(t),r)}else{let r=sr(t);if(r!==null&&i)return{...t};let n=Je.create(r);return Je.assign(n,t)}}function na(t,e=!1){return eo(t)||$t(t)||!Qe(t)||(Zr(t)>1&&Je.defineProperties(t,{set:Vn,add:Vn,clear:Vn,delete:Vn}),Je.freeze(t),e&&Zn(t,(i,r)=>{na(r,!0)},!1)),t}function vh(){xt(2)}var Vn={[Gr]:vh};function eo(t){return t===null||!ia(t)?!0:Je.isFrozen(t)}var Kn="MapSet",Xs="Patches",Ml="ArrayMethods",Hl={};function Ci(t){let e=Hl[t];return e||xt(0,t),e}var Pl=t=>!!Hl[t];var qr,zl=()=>qr,bh=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Pl(Kn)?Ci(Kn):void 0,arrayMethodsPlugin_:Pl(Ml)?Ci(Ml):void 0});function Nl(t,e){e&&(t.patchPlugin_=Ci(Xs),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Js(t){Qs(t),t.drafts_.forEach(xh),t.drafts_=null}function Qs(t){t===qr&&(qr=t.parent_)}var $l=t=>qr=bh(qr,t);function xh(t){let e=t[De];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ul(t,e){e.unfinalizedDrafts_=e.drafts_.length;let i=e.drafts_[0];if(t!==void 0&&t!==i){i[De].modified_&&(Js(e),xt(4)),Qe(t)&&(t=Fl(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(i[De].base_,t,e)}else t=Fl(e,i);return Sh(e,t,!0),Js(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Vl?t:void 0}function Fl(t,e){if(eo(e))return e;let i=e[De];if(!i)return Gn(e,t.handledSet_,t);if(!to(i,t))return e;if(!i.modified_)return i.base_;if(!i.finalized_){let{callbacks_:r}=i;if(r)for(;r.length>0;)r.pop()(t);Kl(i,t)}return i.copy_}function Sh(t,e,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&na(e,i)}function jl(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var to=(t,e)=>t.scope_===e,wh=[];function Wl(t,e,i,r){let n=Gt(t),o=t.type_;if(r!==void 0&&Ys(n,r,o)===e){Wn(n,r,i,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Zn(n,(l,d)=>{if($t(d)){let u=a.get(d)||[];u.push(l),a.set(d,u)}})}let s=t.draftLocations_.get(e)??wh;for(let a of s)Wn(n,a,i,o)}function Eh(t,e,i){t.callbacks_.push(function(n){let o=e;if(!o||!to(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=ra(o);Wl(t,o.draft_??o,s,i),Kl(o,n)})}function Kl(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:r}=e;if(r){let n=r.getPath(t);n&&r.generatePatches_(t,n,e)}jl(t)}}function _h(t,e,i){let{scope_:r}=t;if($t(i)){let n=i[De];to(n,r)&&n.callbacks_.push(function(){Hn(t);let s=ra(n);Wl(t,i,s,e)})}else Qe(i)&&t.callbacks_.push(function(){let o=Gt(t);t.type_===3?o.has(i)&&Gn(i,r.handledSet_,r):Ys(o,e,t.type_)===i&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Gn(Ys(t.copy_,e,t.type_),r.handledSet_,r)})}function Gn(t,e,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||$t(t)||e.has(t)||!Qe(t)||eo(t)||(e.add(t),Zn(t,(r,n)=>{if($t(n)){let o=n[De];if(to(o,i)){let s=ra(o);Wn(t,r,s,t.type_),jl(o)}}else Qe(n)&&Gn(n,e,i)})),t}function Ah(t,e){let i=Xn(t),r={type_:i?1:0,scope_:e?e.scope_:zl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=r,o=qn;i&&(n=[r],o=Yr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return r.draft_=a,r.revoke_=s,[a,r]}var qn={get(t,e){if(e===De)return t;let i=t.scope_.arrayMethodsPlugin_,r=t.type_===1&&typeof e=="string";if(r&&i?.isArrayOperationMethod(e))return i.createMethodInterceptor(t,e);let n=Gt(t);if(!Ws(n,e,t.type_))return Th(t,n,e);let o=n[e];if(t.finalized_||!Qe(o)||r&&t.operationMethod&&i?.isMutatingArrayMethod(t.operationMethod)&&yh(e))return o;if(o===Gs(t.base_,e)||Ch(t,e,o)){Hn(t);let s=t.type_===1?+e:e,a=ta(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Gt(t)},ownKeys(t){return Reflect.ownKeys(Gt(t))},set(t,e,i){let r=Gl(Gt(t),e);if(r?.set)return r.set.call(t.draft_,i),!0;if(!t.modified_){let n=Gs(Gt(t),e),o=n?.[De];if(o&&o.base_===i)return t.copy_[e]=i,t.assigned_.set(e,!1),!0;if(gh(i,n)&&(i!==void 0||Ws(t.base_,e,t.type_)))return!0;Hn(t),ea(t)}return t.copy_[e]===i&&(i!==void 0||Ws(t.copy_,e,t.type_))||Number.isNaN(i)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=i,t.assigned_.set(e,!0),_h(t,e,i)),!0},deleteProperty(t,e){return Hn(t),Gs(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ea(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let i=Gt(t),r=Reflect.getOwnPropertyDescriptor(i,e);return r&&{[Bn]:!0,[qs]:t.type_!==1||e!=="length",[jn]:r[jn],[Gr]:i[e]}},defineProperty(){xt(11)},getPrototypeOf(t){return sr(t.base_)},setPrototypeOf(){xt(12)}},Yr={};for(let t in qn){let e=qn[t];Yr[t]=function(){let i=arguments;return i[0]=i[0][0],e.apply(this,i)}}Yr.deleteProperty=function(t,e){return Yr.set.call(this,t,e,void 0)};Yr.set=function(t,e,i){return qn.set.call(this,t[0],e,i,t[0])};function Gs(t,e){let i=t[De];return(i?Gt(i):t)[e]}function Ch(t,e,i){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!Qe(i)||i[De]?!1:t.baseRefs_.has(i)}function Th(t,e,i){let r=Gl(e,i);return r?Gr in r?r[Gr]:r.get?.call(t.draft_):void 0}function Gl(t,e){if(!(e in t))return;let i=sr(t);for(;i;){let r=Object.getOwnPropertyDescriptor(i,e);if(r)return r;i=sr(i)}}function ea(t){t.modified_||(t.modified_=!0,t.parent_&&ea(t.parent_))}function Hn(t){t.copy_||(t.assigned_=new Map,t.copy_=Zs(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Rh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,i,r)=>{if(or(e)&&!or(i)){let o=i;i=e;let s=this;return function(l=o,...d){return s.produce(l,u=>i.call(this,u,...d))}}or(i)||xt(6),r!==void 0&&!or(r)&&xt(7);let n;if(Qe(e)){let o=$l(this),s=ta(o,e,void 0),a=!0;try{n=i(s),a=!1}finally{a?Js(o):Qs(o)}return Nl(o,r),Ul(n,o)}else if(!e||!ia(e)){if(n=i(e),n===void 0&&(n=e),n===Vl&&(n=void 0),this.autoFreeze_&&na(n,!0),r){let o=[],s=[];Ci(Xs).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),r(o,s)}return n}else xt(1,e)},this.produceWithPatches=(e,i)=>{if(or(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,n;return[this.produce(e,i,(s,a)=>{r=s,n=a}),r,n]},Ks(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Ks(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Ks(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Qe(t)||xt(8),$t(t)&&(t=ql(t));let e=$l(this),i=ta(e,t,void 0);return i[De].isManual_=!0,Qs(e),i}finishDraft(t,e){let i=t&&t[De];(!i||!i.isManual_)&&xt(9);let{scope_:r}=i;return Nl(r,e),Ul(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let i;for(i=e.length-1;i>=0;i--){let n=e[i];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}i>-1&&(e=e.slice(i+1));let r=Ci(Xs).applyPatches_;return $t(t)?r(t,e):this.produce(t,n=>r(n,e))}};function ta(t,e,i,r){let[n,o]=Jn(e)?Ci(Kn).proxyMap_(e,i):Qn(e)?Ci(Kn).proxySet_(e,i):Ah(e,i);return(i?.scope_??zl()).drafts_.push(n),o.callbacks_=i?.callbacks_??[],o.key_=r,i&&r!==void 0?Eh(i,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:d}=l;o.modified_&&d&&d.generatePatches_(o,[],l)}),n}function ql(t){return $t(t)||xt(10,t),Yl(t)}function Yl(t){if(!Qe(t)||eo(t))return t;let e=t[De],i,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,i=Zs(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else i=Zs(t,!0);return Zn(i,(n,o)=>{Wn(i,n,Yl(o))},r),e&&(e.finalized_=!1),i}var Oh=new Rh,oa=Oh.produce;function Zl(t){return({dispatch:i,getState:r})=>n=>o=>typeof o=="function"?o(i,r,t):n(o)}var Xl=Zl(),Jl=Zl;var kh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kr:Kr.apply(null,arguments)},ny=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Lh=t=>t&&typeof t.match=="function";function si(t,e){function i(...r){if(e){let n=e(...r);if(!n)throw new Error(qt(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:r[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=r=>Ll(r)&&r.type===t,i}var rc=class Xr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Xr.prototype)}static get[Symbol.species](){return Xr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Xr(...e[0].concat(this)):new Xr(...e.concat(this))}};function Ql(t){return Qe(t)?oa(t,()=>{}):t}function io(t,e,i){return t.has(e)?t.get(e):t.set(e,i(e)).get(e)}function Dh(t){return typeof t=="boolean"}var Ih=()=>function(e){let{thunk:i=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new rc;return i&&(Dh(i)?s.push(Xl):s.push(Jl(i.extraArgument))),s},Mh="RTK_autoBatch";var ec=t=>e=>{setTimeout(e,t)},Ph=(t,e)=>i=>{let r=!1,n=()=>{r||(r=!0,cancelAnimationFrame(o),clearTimeout(s),i())},o=t(n),s=setTimeout(n,e)},Nh=(t={type:"raf"})=>e=>(...i)=>{let r=e(...i),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Ph(window.requestAnimationFrame,100):ec(10):t.type==="callback"?t.queueNotification:ec(t.timeout),d=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let p=()=>n&&u(),f=r.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Mh],o=!n,o&&(s||(s=!0,l(d))),r.dispatch(u)}finally{n=!0}}})},$h=t=>function(i){let{autoBatch:r=!0}=i??{},n=new rc(t);return r&&n.push(Nh(typeof r=="object"?r:void 0)),n};function nc(t){let e=Ih(),{reducer:i=void 0,middleware:r,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof i=="function")l=i;else if(Fn(i))l=Ol(i);else throw new Error(qt(1));let d;typeof r=="function"?d=r(e):d=e();let u=Kr;n&&(u=kh({trace:!1,...typeof n=="object"&&n}));let p=kl(...d),f=$h(p),y=typeof a=="function"?a(f):f(),S=u(...y);return js(l,s,S)}function oc(t){let e={},i=[],r,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(qt(28));if(a in e)throw new Error(qt(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&i.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return i.push({matcher:o,reducer:s}),n},addDefaultCase(o){return r=o,n}};return t(n),[e,i,r]}function Uh(t){return typeof t=="function"}function Fh(t,e){let[i,r,n]=oc(e),o;if(Uh(t))o=()=>Ql(t());else{let a=Ql(t);o=()=>a}function s(a=o(),l){let d=[i[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[n]),d.reduce((u,p)=>{if(p)if($t(u)){let y=p(u,l);return y===void 0?u:y}else{if(Qe(u))return oa(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=o,s}var Vh=(t,e)=>Lh(t)?t.match(e):t(e);function Bh(...t){return e=>t.some(i=>Vh(i,e))}var Hh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zh=(t=21)=>{let e="",i=t;for(;i--;)e+=Hh[Math.random()*64|0];return e},jh=["name","message","stack","code"],sa=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},tc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Wh=t=>{if(typeof t=="object"&&t!==null){let e={};for(let i of jh)typeof t[i]=="string"&&(e[i]=t[i]);return e}return{message:String(t)}},ic="External signal was aborted",Kh=(()=>{function t(e,i,r){let n=si(e+"/fulfilled",(l,d,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),o=si(e+"/pending",(l,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:l,requestStatus:"pending"}})),s=si(e+"/rejected",(l,d,u,p,f)=>({payload:p,error:(r&&r.serializeError||Wh)(l||"Rejected"),meta:{...f||{},arg:u,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:d}={}){return(u,p,f)=>{let y=r?.idGenerator?r.idGenerator(l):zh(),S=new AbortController,T,b;function R(w){b=w,S.abort()}d&&(d.aborted?R(ic):d.addEventListener("abort",()=>R(ic),{once:!0}));let V=(async function(){let w;try{let N=r?.condition?.(l,{getState:p,extra:f});if(qh(N)&&(N=await N),N===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let ae=new Promise((q,le)=>{T=()=>{le({name:"AbortError",message:b||"Aborted"})},S.signal.addEventListener("abort",T,{once:!0})});u(o(y,l,r?.getPendingMeta?.({requestId:y,arg:l},{getState:p,extra:f}))),w=await Promise.race([ae,Promise.resolve(i(l,{dispatch:u,getState:p,extra:f,requestId:y,signal:S.signal,abort:R,rejectWithValue:((q,le)=>new sa(q,le)),fulfillWithValue:((q,le)=>new tc(q,le))})).then(q=>{if(q instanceof sa)throw q;return q instanceof tc?n(q.payload,y,l,q.meta):n(q,y,l)})])}catch(N){w=N instanceof sa?s(null,y,l,N.payload,N.meta):s(N,y,l)}finally{T&&S.signal.removeEventListener("abort",T)}return r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition||u(w),w})();return Object.assign(V,{abort:R,requestId:y,arg:l,unwrap(){return V.then(Gh)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Bh(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Gh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function qh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var sc=Symbol.for("rtk-slice-createasyncthunk"),sy={[sc]:Kh};function Yh(t,e){return`${t}/${e}`}function Zh({creators:t}={}){let e=t?.asyncThunk?.[sc];return function(r){let{name:n,reducerPath:o=n}=r;if(!n)throw new Error(qt(11));typeof process<"u";let s=(typeof r.reducers=="function"?r.reducers(Jh()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(w,k){let N=typeof w=="string"?w:w.type;if(!N)throw new Error(qt(12));if(N in l.sliceCaseReducersByType)throw new Error(qt(13));return l.sliceCaseReducersByType[N]=k,d},addMatcher(w,k){return l.sliceMatchers.push({matcher:w,reducer:k}),d},exposeAction(w,k){return l.actionCreators[w]=k,d},exposeCaseReducer(w,k){return l.sliceCaseReducersByName[w]=k,d}};a.forEach(w=>{let k=s[w],N={reducerName:w,type:Yh(n,w),createNotation:typeof r.reducers=="function"};em(k)?im(N,k,d,e):Qh(N,k,d)});function u(){let[w={},k=[],N=void 0]=typeof r.extraReducers=="function"?oc(r.extraReducers):[r.extraReducers],ae={...w,...l.sliceCaseReducersByType};return Fh(r.initialState,q=>{for(let le in ae)q.addCase(le,ae[le]);for(let le of l.sliceMatchers)q.addMatcher(le.matcher,le.reducer);for(let le of k)q.addMatcher(le.matcher,le.reducer);N&&q.addDefaultCase(N)})}let p=w=>w,f=new Map,y=new WeakMap,S;function T(w,k){return S||(S=u()),S(w,k)}function b(){return S||(S=u()),S.getInitialState()}function R(w,k=!1){function N(q){let le=q[w];return typeof le>"u"&&k&&(le=io(y,N,b)),le}function ae(q=p){let le=io(f,k,()=>new WeakMap);return io(le,q,()=>{let Fr={};for(let[at,Ei]of Object.entries(r.selectors??{}))Fr[at]=Xh(Ei,q,()=>io(y,q,b),k);return Fr})}return{reducerPath:w,getSelectors:ae,get selectors(){return ae(N)},selectSlice:N}}let V={name:n,reducer:T,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...R(o),injectInto(w,{reducerPath:k,...N}={}){let ae=k??o;return w.inject({reducerPath:ae,reducer:T},N),{...V,...R(ae,!0)}}};return V}}function Xh(t,e,i,r){function n(o,...s){let a=e(o);return typeof a>"u"&&r&&(a=i()),t(a,...s)}return n.unwrapped=t,n}var ac=Zh();function Jh(){function t(e,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...i}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...i){return e(...i)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:i}},asyncThunk:t}}function Qh({type:t,reducerName:e,createNotation:i},r,n){let o,s;if("reducer"in r){if(i&&!tm(r))throw new Error(qt(17));o=r.reducer,s=r.prepare}else o=r;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?si(t,s):si(t))}function em(t){return t._reducerDefinitionType==="asyncThunk"}function tm(t){return t._reducerDefinitionType==="reducerWithPrepare"}function im({type:t,reducerName:e},i,r,n){if(!n)throw new Error(qt(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:d,options:u}=i,p=n(t,o,u);r.exposeAction(e,p),s&&r.addCase(p.fulfilled,s),a&&r.addCase(p.pending,a),l&&r.addCase(p.rejected,l),d&&r.addMatcher(p.settled,d),r.exposeCaseReducer(e,{fulfilled:s||ro,pending:a||ro,rejected:l||ro,settled:d||ro})}function ro(){}var lc="listener",cc="completed",dc="cancelled",ay=`task-${dc}`,ly=`task-${cc}`,cy=`${lc}-${dc}`,dy=`${lc}-${cc}`;var{assign:uc}=Object;var aa="listenerMiddleware";var rm=uc(si(`${aa}/add`),{withTypes:()=>rm}),uy=si(`${aa}/removeAll`),nm=uc(si(`${aa}/remove`),{withTypes:()=>nm});function qt(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var om=Dn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(i,r,n){this.eventBus.addEventListener(i,r,n)}dispatchEvent(i){return this.eventBus.dispatchEvent(i)}removeEventListener(i,r,n){this.eventBus.removeEventListener(i,r,n)}}}),no=class extends om(Object){};window.ftReduxStores||(window.ftReduxStores={});var pc=class t extends no{static get(e){var i;let r=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[r];if($n(o))return o;if(n==null)return;let s=ac({...n,reducers:(i=n.reducers)!==null&&i!==void 0?i:{}}),a=nc({reducer:(l,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let u=zr(s.getInitialState());for(let p of d.keeping)u[p]=(l??u)[p];return u}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...d.overwrites};return s.reducer(l,d)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,i,r){super(),this.reduxSlice=e,this.reduxStore=i,this.isFtReduxStore=!0,this.commands=new In,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,d=o[l];return d?(...u)=>{let p=d(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];ir(f,u)||this.setState({[p]:n(u)})}}}),this.eventBus=r??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var oo=class{static format(e,i,r,n,o){return window.moment?window.moment(e).locale(i).format(this.getMomentDateFormat(r,n,!!o)):this.getIntlDateTime(e,i,r,n,!!o)}static getMomentDateFormat(e,i,r){return r?"LT":e?i?"lll":"ll":i?"L LT":"L"}static getIntlDateTime(e,i,r,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(i,{dateStyle:r?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(i,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=r=>String(Math.floor(r)).padStart(2,"0"),i=new Date().getTimezoneOffset();return`${i<0?"+":"-"}${e(Math.abs(i)/60)}:${e(Math.abs(i)%60)}`}};var so=c(h()),sm="ft-app-info",Ut=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ut.eventName="authentication-change";var Ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ti.eventName="ui-locale-changed";var am={session:(t,e)=>{(0,so.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>v.dispatchEvent(new Ut(e.payload)),0))}},v=so.FtReduxStore.get({name:sm,reducers:am,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 fc=c(h()),ao=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},hc=(0,fc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...r){super(r),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(v)}dateFormatOptionsChanged(r){return r.has("metadataDescriptors")||r.has("useLongDateFormat")||r.has("useDateTimeFormat")||r.has("uiLocale")}getDateFormatter(r){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===r))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>oo.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ao([(0,la.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ao([(0,la.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ao([Hs({store:v.name,selector:i=>{var r,n;return(n=(r=i.metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),ao([Hs({store:v.name})],e.prototype,"uiLocale",void 0),e});var mc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(mc||(mc={}));var gc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(gc||(gc={}));var yc;(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"})(yc||(yc={}));var vc;(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"})(vc||(vc={}));var bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(bc||(bc={}));var xc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(xc||(xc={}));var Sc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Sc||(Sc={}));var wc;(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"})(wc||(wc={}));var Ec;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ec||(Ec={}));var _c;(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"})(_c||(_c={}));var Ac;(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"})(Ac||(Ac={}));var Cc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Cc||(Cc={}));var Tc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Tc||(Tc={}));var Rc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Rc||(Rc={}));var _e;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(_e||(_e={}));var Oc;(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"})(Oc||(Oc={}));var kc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(kc||(kc={}));var Lc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Lc||(Lc={}));var Dc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Dc||(Dc={}));var Ic;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ic||(Ic={}));var Mc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Mc||(Mc={}));var lo;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(lo||(lo={}));var Pc;(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"})(Pc||(Pc={}));var Nc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Nc||(Nc={}));var $c;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})($c||($c={}));var Uc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Uc||(Uc={}));var Fc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Fc||(Fc={}));var te;(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"})(te||(te={}));var lt;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(lt||(lt={}));var Vc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Vc||(Vc={}));var Bc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Bc||(Bc={}));var Hc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Hc||(Hc={}));var zc;(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"})(zc||(zc={}));var jc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(jc||(jc={}));var Wc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Wc||(Wc={}));var Kc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Kc||(Kc={}));var Gc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Gc||(Gc={}));var qc;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(qc||(qc={}));var Yc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Yc||(Yc={}));var Zc;(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"})(Zc||(Zc={}));var co;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(co||(co={}));var lm={[te.PERSONAL_BOOK_SHARE_USER]:[te.PERSONAL_BOOK_USER],[te.HTML_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.PDF_EXPORT_USER]:[te.PERSONAL_BOOK_USER],[te.KHUB_ADMIN]:[te.CONTENT_PUBLISHER],[te.ADMIN]:[te.KHUB_ADMIN,te.USERS_ADMIN,te.PORTAL_ADMIN,te.BEHAVIOR_DATA_USER],[te.GENERATIVE_AI_EXPORT_USER]:[te.GENERATIVE_AI_USER]};function Xc(t,e){return t===e||(lm[t]??[]).some(i=>Xc(i,e))}function Jr(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(r=>Xc(r,e))}var mo=c(h());var ca=c(h());var Ft=class t{static get(e){let{baseUrl:i,apiIntegrationIdentifier:r}=v.getState(),n=e??r;if(i&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,n,!0)}static await(e){return new Promise(i=>{let r=t.get(e);if(r)i(r);else{let n=v.subscribe(()=>{r=t.get(e),r&&(n(),i(r))})}})}};var ar=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ft.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ft.await()}};var Te=class extends ar{constructor(e=!0,i){var r;super(i),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(r=n.commonCache)!==null&&r!==void 0?r:new ca.CacheRegistry,this.cache=e?n.commonCache:new ca.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((i,r)=>0|31*i+r.charCodeAt(0),0))}};var uo=class extends Te{async listMySearches(){let{session:e}=v.getState();return Jr(e,te.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var po=class extends Te{async listMyBookmarks(){let e=v.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var fo=class extends Te{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=v.getState().session;return!!e?.sessionAuthenticated}};var ho=class extends Te{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=v.getState().session;return!!e?.sessionAuthenticated}};var cm="ft-user-assets",dm={setAssetCount:(t,e)=>{let{userAssetType:i,count:r}=e.payload.assetCount;t.assetCounts.allAsset[i]=r},clearAssetCount:t=>{Object.values(lt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let i=e.payload.mapId;t.assetCounts.bookmarkByMap[i]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:i,mapId:r,asset:n}=e.payload;ua(t,i,[...da(t,i),n]),Jc(t,i,1,r),Qc(t,n)},editAsset:(t,e)=>{let{assetType:i,asset:r}=e.payload;ua(t,i,da(t,i).map(n=>n.id===r.id?r:n)),Qc(t,r)},removeAsset:(t,e)=>{let{assetType:i,mapId:r,assetId:n}=e.payload;ua(t,i,da(t,i).filter(o=>o.id!==n)),Jc(t,i,-1,r)}},ed={[lt.SEARCHES]:"savedSearches",[lt.BOOKMARKS]:"bookmarks",[lt.BOOKS]:void 0,[lt.COLLECTIONS]:void 0},da=(t,e)=>{var i;let r=ed[e];return r?(i=t[r])!==null&&i!==void 0?i:[]:[]},ua=(t,e,i)=>{let r=ed[e];r&&(t[r]=i)},Jc=(t,e,i,r)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+i),e===lt.BOOKMARKS&&r)){let o=t.assetCounts.bookmarkByMap[r];t.assetCounts.bookmarkByMap[r]=Math.max(0,o+i)}},Qc=(t,e)=>{let i=t.assetLabels.map(n=>n.title),r=e.labels.filter(n=>!i.includes(n)).map(n=>({title:n}));t.assetLabels.push(...r)},$e=mo.FtReduxStore.get({name:cm,reducers:dm,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),pa=class{constructor(e=new fo,i=new ho){this.assetCountsService=e,this.assetLabelsService=i,this.currentSession=v.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new po,this.savedSearchesService=new uo,v.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:i}=v.getState();(0,mo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,i?.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),$e.actions.clearAssetCount(),$e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();$e.actions.assetLabels(e)}async loadAssetCount(e){let i=await this.assetCountsService.getUserAssetCount(e);i&&$e.getState().assetCounts.allAsset[e]!==i.count&&$e.actions.setAssetCount({assetCount:i})}async loadBookmarkByMapId(e){let i=await this.assetCountsService.getUserBookmarkCountByMap(e);i&&$e.getState().assetCounts.bookmarkByMap[e]!==i.count&&$e.actions.setBookmarkCountByMap({count:i.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let i=Object.keys($e.getState().assetCounts.bookmarkByMap).length!==0;e===lt.BOOKMARKS&&i&&$e.actions.clearBookmarkCountByMap(),$e.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 i=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$e.actions.bookmarks(i)}}},um=new pa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=um);var fa=class{addCommand(e,i=!1){v.commands.add(e,i)}consumeCommand(e){return v.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new fa;var ct=c(h());var td,lr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},pm=Symbol("clearAfterUnitTest"),go=class extends(0,ct.withEventBus)(Te){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[td]=()=>{this.defaultMessages={},this.cache=new ct.CacheRegistry,this.listeners={}},this.currentUiLocale=v.getState().uiLocale,v.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=v.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let i=e.name.toLowerCase();this.cache.setFinal(i,e),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,i){var r;if(e=e.toLowerCase(),i&&Object.keys(i).length>0){let n={...(r=this.defaultMessages[e])!==null&&r!==void 0?r:{},...i};(0,ct.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var i,r;return this.fetchContext(e),(r=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&r!==void 0?r:{}}resolveRawMessage(e,i){let r=e.toLowerCase();return this.resolveContext(r)[i]}resolveMessage(e,i,...r){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new ct.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(i,...r)}async fetchContext(e){let i=!this.cache.has(e),r;try{r=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),i&&await this.notify(e)}catch(n){!(n instanceof ct.CanceledPromiseError)&&i&&console.error(n)}return r}subscribe(e,i){var r;return e=e.toLowerCase(),this.listeners[e]=(r=this.listeners[e])!==null&&r!==void 0?r:new Set,this.listeners[e].add(i),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(i)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new lr({loadedContexts:e})),this.dispatchEvent(new lr({loadedContexts:e})),await Promise.all(e.map(i=>this.notify(i,!1)))}async notify(e,i=!0){i&&(document.body.dispatchEvent(new lr({loadedContexts:[e]})),this.dispatchEvent(new lr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,ct.delay)(0).then(()=>r()).catch(()=>null)))}};td=pm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends go{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends go{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var cr=window.FluidTopicsI18nService,yo=window.FluidTopicsCustomI18nService;var id=c(h()),ha=class{highlightHtml(e,i,r){(0,id.highlightHtml)(e,i,r)}};window.FluidTopicsHighlightHtmlService=new ha;var rd=c(h());var ma=class{isDate(e){var i,r,n,o;return(o=(n=((r=(i=v.getState().metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&r!==void 0?r:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,i){var r,n,o,s;if(e==null)return"";try{return rd.DateFormatter.format(e,(r=i?.locale)!==null&&r!==void 0?r:v.getState().uiLocale,(n=i?.longFormat)!==null&&n!==void 0?n:!1,(o=i?.withTime)!==null&&o!==void 0?o:!1,(s=i?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new ma;var nd=c(h());var Qr=class{static get(e,i){var r,n,o,s;let a=v.getState(),{lang:l,region:d}=(o=(n=(r=a.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new nd.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,i??`${l}-${d}`)}};var ga=class{urlToSearchRequest(e){return Qr.get().parse(e)}searchRequestToUrl(e){return Qr.get().serialize(e)}};window.FluidTopicsUrlService=new ga;var Yt=c(h());var Ri=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ri.eventName="change";var ya=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let i=sessionStorage.getItem(this.itemName(e));return i?JSON.parse(i):void 0}set(e,i){sessionStorage.setItem(this.itemName(e),JSON.stringify(i))}},od=new ya;var vo=class t extends Yt.WithEventBus{static build(){return new t(window.history,od,()=>window.location,!1)}constructor(e,i,r,n){var o,s;super(),this.history=e,this.historyStorage=i,this.windowLocation=r,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(n)}setCurrentState(e,i=!1){let r=i&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,r&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Yt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ri(this.currentItem())),0)}installProxies(){let e=i=>(r,n,[o,s,a])=>{let l=i(),d={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};r.apply(n,[d,s,a]),this.setCurrentState(d,!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 i=this.history.length-1;i>=0;i--)e?this.states[i]=this.historyStorage.get(i):setTimeout(()=>this.states[i]=this.historyStorage.get(i),this.history.length-i)}updateCurrentState(e){var i;let r={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title};this.setCurrentState(r)}addHistoryChangeListener(e){this.addEventListener(Ri.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ri.eventName,e)}currentItem(){return(0,Yt.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,Yt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let i=this.states.filter(r=>!!r).filter(r=>r.index<this.currentIndex).reverse();return(0,Yt.deepCopy)(i.find(r=>e(r)))}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,Yt.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 i;let r=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;if(!r)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,r);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,i;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(i=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&i!==void 0?i:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,i){var r;if(!this.hasState(e))return!1;let n=i??this.currentState.majorStateId,o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=vo.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 bo=class{constructor(){this.storeListeners=[]}store(e,i){if(this.isAuthenticated())return;let r=JSON.stringify(i);window.localStorage.setItem(e,r),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:r,storageArea:window.localStorage}))}get(e){var i,r;if(!this.isAuthenticated())return(r=JSON.parse((i=window.localStorage.getItem(e))!==null&&i!==void 0?i:"null"))!==null&&r!==void 0?r:void 0}addStoreListener(e,i){let r=n=>{n.key===e()&&!this.isAuthenticated()&&i()};this.storeListeners.push(r),window.addEventListener("storage",r)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=v.getState().session;return!!e?.sessionAuthenticated}};var sd=c(x());var ad=sd.css`
|
|
2
|
-
`;var cd=c(x()),
|
|
1
|
+
"use strict";(()=>{var th=Object.create;var al=Object.defineProperty;var ih=Object.getOwnPropertyDescriptor;var rh=Object.getOwnPropertyNames;var nh=Object.getPrototypeOf,oh=Object.prototype.hasOwnProperty;var Ji=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(i){throw e=0,i}};var sh=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of rh(e))!oh.call(t,n)&&n!==i&&al(t,n,{get:()=>e[n],enumerable:!(r=ih(e,n))||r.enumerable});return t};var c=(t,e,i)=>(i=t!=null?th(nh(t)):{},sh(e||!t||!t.__esModule?al(i,"default",{value:t,enumerable:!0}):i,t));var h=Ji((Qm,ll)=>{ll.exports=ftGlobals.wcUtils});var $=Ji((eg,cl)=>{cl.exports=ftGlobals.litDecorators});var x=Ji((Ag,fl)=>{fl.exports=ftGlobals.lit});var pr=Ji((px,bd)=>{bd.exports=ftGlobals.litRepeat});var Da=Ji((Wx,eu)=>{eu.exports=ftGlobals.litUnsafeHTML});var it=Ji((nE,Tu)=>{Tu.exports=ftGlobals.litClassMap});var Jf=c(h());var ul=c(h()),pl=c($());var Kt=class extends Event{constructor(e,i,r,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i,this.callback=r,this.subscribe=n??!1}};var Qi=class{constructor(e,i,r,n){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,i.context!==void 0){let o=i;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=i,this.callback=r,this.subscribe=n??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Kt(this.context,this.host,this.t,this.subscribe))}};var kn=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,i=!1){let r=i||!Object.is(e,this.o);this.o=e,r&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[i,{disposer:r}]of this.subscriptions)i(this.o,r)},e!==void 0&&(this.value=e)}addCallback(e,i,r){if(!r)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:i});let{disposer:n}=this.subscriptions.get(e);e(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Fs=class extends Event{constructor(e,i){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i}},er=class extends kn{constructor(e,i,r){super(i.context!==void 0?i.initialValue:r),this.onContextRequest=n=>{if(n.context!==this.context)return;let o=n.contextTarget??n.composedPath()[0];o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.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 Kt(this.context,a,s,!0)));n.stopPropagation()},this.host=e,i.context!==void 0?this.context=i.context:this.context=i,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 Fs(this.context,this.host))}};var Vr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let i=this.pendingContextRequests.get(e.context);if(i===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:r}=i;for(let{elementRef:n,callbackRef:o}of r){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Kt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let i=e.contextTarget??e.composedPath()[0],r=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(i);o===void 0&&n.callbacks.set(i,o=new WeakSet),o.has(r)||(o.add(r),n.requests.push({elementRef:new WeakRef(i),callbackRef:new WeakRef(r)}))}}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 Br({context:t}){return(e,i)=>{let r=new WeakMap;if(typeof i=="object")return{get(){return e.get.call(this)},set(n){return r.get(this).setValue(n),e.set.call(this,n)},init(n){return r.set(this,new er(this,{context:t,initialValue:n})),n}};{e.constructor.addInitializer((s=>{r.set(s,new er(s,{context:t}))}));let n=Object.getOwnPropertyDescriptor(e,i),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){r.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){r.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(e,i,o)}}}function Hr({context:t,subscribe:e}){return(i,r)=>{typeof r=="object"?r.addInitializer((function(){new Qi(this,{context:t,callback:n=>{i.set.call(this,n)},subscribe:e})})):i.constructor.addInitializer((n=>{new Qi(n,{context:t,callback:o=>{n[r]=o},subscribe:e})}))}}var ah=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Vs=Symbol("asset-viewer-state-manager"),Pt=(0,ul.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(t){class e extends t{willUpdate(r){super.willUpdate(r),r.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 ah([Hr({context:Vs,subscribe:!0}),(0,pl.state)()],e.prototype,"viewerStateManager",void 0),e});var hd=c(x()),ur=c(h());var hl=c(h()),lh={setZoom:(t,e)=>{t.contentModifiers.zoom=e.payload},setRotation:(t,e)=>{t.contentModifiers.rotation=e.payload}},Ln=t=>hl.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,configuration:void 0,documentRating:void 0,assetRating:void 0,relatives:void 0},reducers:lh});var ml=c(h()),tr=class extends ml.FtStateManager{constructor(e){super(),this.store=e}setZoom(e){this.store.actions.setZoom(e)}setRotation(e){this.store.actions.setRotation(e)}};var la=c($());var gl=c($(),1);var Bs=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function yl(t,e){return(0,gl.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return zr(t);try{return JSON.parse(i)}catch{return zr(t)}},toAttribute:i=>JSON.stringify(i)},hasChanged:jr,...e??{}})}function ch(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!ir(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!ir(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[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 n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(i=o.length,i!==n(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){let s=o[r];if(!ir(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function ir(t,e){try{return ch(t,e)}catch{return!1}}function jr(t,e){return!ir(t,e)}function zr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Dn(t,e){let i=r=>r[t]===!0;return r=>{if(i(r))return r;let n=e(r);return n[t]=!0,n}}var vl=c($(),1);var Hs=t=>{let e=t??{};return(i,r)=>{var n;let o={hasChanged:jr,attribute:!1,...e};(0,vl.property)(o)(i,r);let s=i.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(r,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[r]),store:e.store})}};var In=class{constructor(){this.queue=[]}add(e,i=!1){i&&this.clear(e.type),this.queue.push(e)}consume(e){let i=this.queue.find(r=>r.type===e);return i&&(this.queue=this.queue.filter(r=>r!==i)),i}clear(e){typeof e=="string"?this.queue=this.queue.filter(i=>i.type!==e):this.queue=this.queue.filter(i=>!e.test(i.type))}};var _i=c($(),1);var Mn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,i){return this.callbacks=[e],this.debounce(i)}queue(e,i){return this.callbacks.push(e),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((i,r)=>{this.resolvePromise=i,this.rejectPromise=r})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,i;let r=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(i=this.resolvePromise)!==null&&i!==void 0?i:(()=>null);this.clearPromise();for(let s of r)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var xl=c(x(),1);var Pn=globalThis,dh=Pn.ShadowRoot&&(Pn.ShadyCSS===void 0||Pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var bl=(t,e)=>{if(dh)t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let r=document.createElement("style"),n=Pn.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=i.cssText,t.appendChild(r)}};var Nn=class extends xl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let i={...e.shadowRootOptions,customElements:e.registry},r=this.renderOptions.creationScope=this.attachShadow(i);return bl(r,e.elementStyles),r}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([i,r])=>this.defineScopedElement(i,r))}static defineScopedElement(e,i){Bs(e)(i),this.canDefineScopedElement(e)&&this.registry.define(e,i)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,i){this.scopedRegistryConstructor.defineScopedElement(e,i)}};function Sl(t,e,...i){var r;let n=t.querySelector(e);for(let o of i)n=(r=n?.shadowRoot)===null||r===void 0?void 0:r.querySelector(o);return n}var nr=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Al,wl=Symbol("constructorPrototype"),El=Symbol("constructorName"),Cl=Symbol("exportpartsDebouncer"),_l=Symbol("dynamicDependenciesLoaded"),rr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};rr.eventName="exportparts-updated";var Nt=class extends Nn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Al]=new Mn(5),this.scheduleExportpartsUpdate=()=>{var e,i,r;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(r=(i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)!==null&&r!==void 0&&r)&&this[Cl].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[El]=this.constructor.name,this[wl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[El]&&Object.setPrototypeOf(this,this[wl])}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(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let i=this.constructor;i[_l]||(i[_l]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(rr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(rr.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 rr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:i,selector:r,shadowPath:n}=this.elementToFocus;if(r!=null){let o=[...n??[],r];i=Sl(this.shadowRoot,...o)}i?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||i?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var i,r,n;if(((r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&r!==void 0?r:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var i,r,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,d=e.filter(l).map(f=>f.trim());if(d.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("[part],[exportparts]"))!==null&&r!==void 0?r:[]){let y=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],S=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],T=[...y,...S].filter(l).map(b=>b.trim());for(let b of T)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>d.map(y=>`${f}:${y}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Al=Cl;nr([(0,_i.property)()],Nt.prototype,"exportpartsPrefix",void 0);nr([yl([])],Nt.prototype,"exportpartsPrefixes",void 0);nr([(0,_i.property)({reflect:!0})],Nt.prototype,"exportparts",void 0);nr([(0,_i.property)()],Nt.prototype,"customStylesheet",void 0);nr([(0,_i.property)()],Nt.prototype,"elementToFocus",void 0);nr([(0,_i.state)()],Nt.prototype,"useAdoptedStyleSheets",void 0);function $n(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Wr=Symbol("internalReduxEventsUnsubscribers"),oi=Symbol("internalStoresUnsubscribers"),Ai=Symbol("internalStores"),uh=Dn(Symbol("withRedux"),function(t){var e,i,r;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=new Map,this[r]=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[Ai].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ai].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ai].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ai].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Ai].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ai].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 d=this.getStore(s.store);d&&(s.store?this[oi].has(s.store):this[oi].size>0)&&(this[a]=s.selector(d.getState(),this))}})}subscribeToStore(s,a){var l;this[oi].set(s,a.subscribe(()=>this.updateFromStores())),this[Wr].set(s,[]),$n(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((d,u)=>{if(typeof this[u]=="function"&&(!d.store||a.name===d.store)){let p=f=>this[u](f);a.addEventListener(d.eventName,p),this[Wr].get(s).push(()=>a.removeEventListener(d.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[oi].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[oi].has(s)&&this[oi].get(s)(),this[oi].delete(s),(a=this[Wr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Wr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=oi,i=Ai,r=Wr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Tl=class extends uh(Nt){};function Te(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 ph=typeof Symbol=="function"&&Symbol.observable||"@@observable",Rl=ph,zs=()=>Math.random().toString(36).substring(7).split("").join("."),fh={INIT:`@@redux/INIT${zs()}`,REPLACE:`@@redux/REPLACE${zs()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zs()}`},Un=fh;function Fn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function js(t,e,i){if(typeof t!="function")throw new Error(Te(2));if(typeof e=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Te(0));if(typeof e=="function"&&typeof i>"u"&&(i=e,e=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Te(1));return i(js)(t,e)}let r=t,n=e,o=new Map,s=o,a=0,l=!1;function d(){s===o&&(s=new Map,o.forEach((b,R)=>{s.set(R,b)}))}function u(){if(l)throw new Error(Te(3));return n}function p(b){if(typeof b!="function")throw new Error(Te(4));if(l)throw new Error(Te(5));let R=!0;d();let V=a++;return s.set(V,b),function(){if(R){if(l)throw new Error(Te(6));R=!1,d(),s.delete(V),o=null}}}function f(b){if(!Fn(b))throw new Error(Te(7));if(typeof b.type>"u")throw new Error(Te(8));if(typeof b.type!="string")throw new Error(Te(17));if(l)throw new Error(Te(9));try{l=!0,n=r(n,b)}finally{l=!1}return(o=s).forEach(V=>{V()}),b}function y(b){if(typeof b!="function")throw new Error(Te(10));r=b,f({type:Un.REPLACE})}function S(){let b=p;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Te(11));function V(){let k=R;k.next&&k.next(u())}return V(),{unsubscribe:b(V)}},[Rl](){return this}}}return f({type:Un.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:y,[Rl]:S}}function hh(t){Object.keys(t).forEach(e=>{let i=t[e];if(typeof i(void 0,{type:Un.INIT})>"u")throw new Error(Te(12));if(typeof i(void 0,{type:Un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Te(13))})}function Ol(t){let e=Object.keys(t),i={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(i[a]=t[a])}let r=Object.keys(i),n,o;try{hh(i)}catch(s){o=s}return function(a={},l){if(o)throw o;let d=!1,u={};for(let p=0;p<r.length;p++){let f=r[p],y=i[f],S=a[f],T=y(S,l);if(typeof T>"u"){let b=l&&l.type;throw new Error(Te(14))}u[f]=T,d=d||T!==S}return d=d||r.length!==Object.keys(a).length,d?u:a}}function Kr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,i)=>(...r)=>e(i(...r)))}function kl(...t){return e=>(i,r)=>{let n=e(i,r),o=()=>{throw new Error(Te(15))},s={getState:n.getState,dispatch:(l,...d)=>o(l,...d)},a=t.map(l=>l(s));return o=Kr(...a)(n.dispatch),{...n,dispatch:o}}}function Ll(t){return Fn(t)&&"type"in t&&typeof t.type=="string"}var Vl=Symbol.for("immer-nothing"),Dl=Symbol.for("immer-draftable"),De=Symbol.for("immer-state");function xt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Je=Object,sr=Je.getPrototypeOf,zn="constructor",Yn="prototype",qs="configurable",jn="enumerable",Bn="writable",Gr="value",$t=t=>!!t&&!!t[De];function Qe(t){return t?Bl(t)||Xn(t)||!!t[Dl]||!!t[zn]?.[Dl]||Jn(t)||Qn(t):!1}var mh=Je[Yn][zn].toString(),Il=new WeakMap;function Bl(t){if(!t||!ia(t))return!1;let e=sr(t);if(e===null||e===Je[Yn])return!0;let i=Je.hasOwnProperty.call(e,zn)&&e[zn];if(i===Object)return!0;if(!or(i))return!1;let r=Il.get(i);return r===void 0&&(r=Function.toString.call(i),Il.set(i,r)),r===mh}function Zn(t,e,i=!0){Zr(t)===0?(i?Reflect.ownKeys(t):Je.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((r,n)=>e(n,r,t))}function Zr(t){let e=t[De];return e?e.type_:Xn(t)?1:Jn(t)?2:Qn(t)?3:0}var Ws=(t,e,i=Zr(t))=>i===2?t.has(e):Je[Yn].hasOwnProperty.call(t,e),Ys=(t,e,i=Zr(t))=>i===2?t.get(e):t[e],Wn=(t,e,i,r=Zr(t))=>{r===2?t.set(e,i):r===3?t.add(i):t[e]=i};function gh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Xn=Array.isArray,Jn=t=>t instanceof Map,Qn=t=>t instanceof Set,ia=t=>typeof t=="object",or=t=>typeof t=="function",Ks=t=>typeof t=="boolean";function yh(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Gt=t=>t.copy_||t.base_;var ra=t=>t.modified_?t.copy_:t.base_;function Zs(t,e){if(Jn(t))return new Map(t);if(Qn(t))return new Set(t);if(Xn(t))return Array[Yn].slice.call(t);let i=Bl(t);if(e===!0||e==="class_only"&&!i){let r=Je.getOwnPropertyDescriptors(t);delete r[De];let n=Reflect.ownKeys(r);for(let o=0;o<n.length;o++){let s=n[o],a=r[s];a[Bn]===!1&&(a[Bn]=!0,a[qs]=!0),(a.get||a.set)&&(r[s]={[qs]:!0,[Bn]:!0,[jn]:a[jn],[Gr]:t[s]})}return Je.create(sr(t),r)}else{let r=sr(t);if(r!==null&&i)return{...t};let n=Je.create(r);return Je.assign(n,t)}}function na(t,e=!1){return eo(t)||$t(t)||!Qe(t)||(Zr(t)>1&&Je.defineProperties(t,{set:Vn,add:Vn,clear:Vn,delete:Vn}),Je.freeze(t),e&&Zn(t,(i,r)=>{na(r,!0)},!1)),t}function vh(){xt(2)}var Vn={[Gr]:vh};function eo(t){return t===null||!ia(t)?!0:Je.isFrozen(t)}var Kn="MapSet",Xs="Patches",Ml="ArrayMethods",Hl={};function Ci(t){let e=Hl[t];return e||xt(0,t),e}var Pl=t=>!!Hl[t];var qr,zl=()=>qr,bh=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Pl(Kn)?Ci(Kn):void 0,arrayMethodsPlugin_:Pl(Ml)?Ci(Ml):void 0});function Nl(t,e){e&&(t.patchPlugin_=Ci(Xs),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Js(t){Qs(t),t.drafts_.forEach(xh),t.drafts_=null}function Qs(t){t===qr&&(qr=t.parent_)}var $l=t=>qr=bh(qr,t);function xh(t){let e=t[De];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Ul(t,e){e.unfinalizedDrafts_=e.drafts_.length;let i=e.drafts_[0];if(t!==void 0&&t!==i){i[De].modified_&&(Js(e),xt(4)),Qe(t)&&(t=Fl(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(i[De].base_,t,e)}else t=Fl(e,i);return Sh(e,t,!0),Js(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Vl?t:void 0}function Fl(t,e){if(eo(e))return e;let i=e[De];if(!i)return Gn(e,t.handledSet_,t);if(!to(i,t))return e;if(!i.modified_)return i.base_;if(!i.finalized_){let{callbacks_:r}=i;if(r)for(;r.length>0;)r.pop()(t);Kl(i,t)}return i.copy_}function Sh(t,e,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&na(e,i)}function jl(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var to=(t,e)=>t.scope_===e,wh=[];function Wl(t,e,i,r){let n=Gt(t),o=t.type_;if(r!==void 0&&Ys(n,r,o)===e){Wn(n,r,i,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Zn(n,(l,d)=>{if($t(d)){let u=a.get(d)||[];u.push(l),a.set(d,u)}})}let s=t.draftLocations_.get(e)??wh;for(let a of s)Wn(n,a,i,o)}function Eh(t,e,i){t.callbacks_.push(function(n){let o=e;if(!o||!to(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=ra(o);Wl(t,o.draft_??o,s,i),Kl(o,n)})}function Kl(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:r}=e;if(r){let n=r.getPath(t);n&&r.generatePatches_(t,n,e)}jl(t)}}function _h(t,e,i){let{scope_:r}=t;if($t(i)){let n=i[De];to(n,r)&&n.callbacks_.push(function(){Hn(t);let s=ra(n);Wl(t,i,s,e)})}else Qe(i)&&t.callbacks_.push(function(){let o=Gt(t);t.type_===3?o.has(i)&&Gn(i,r.handledSet_,r):Ys(o,e,t.type_)===i&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Gn(Ys(t.copy_,e,t.type_),r.handledSet_,r)})}function Gn(t,e,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||$t(t)||e.has(t)||!Qe(t)||eo(t)||(e.add(t),Zn(t,(r,n)=>{if($t(n)){let o=n[De];if(to(o,i)){let s=ra(o);Wn(t,r,s,t.type_),jl(o)}}else Qe(n)&&Gn(n,e,i)})),t}function Ah(t,e){let i=Xn(t),r={type_:i?1:0,scope_:e?e.scope_:zl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=r,o=qn;i&&(n=[r],o=Yr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return r.draft_=a,r.revoke_=s,[a,r]}var qn={get(t,e){if(e===De)return t;let i=t.scope_.arrayMethodsPlugin_,r=t.type_===1&&typeof e=="string";if(r&&i?.isArrayOperationMethod(e))return i.createMethodInterceptor(t,e);let n=Gt(t);if(!Ws(n,e,t.type_))return Th(t,n,e);let o=n[e];if(t.finalized_||!Qe(o)||r&&t.operationMethod&&i?.isMutatingArrayMethod(t.operationMethod)&&yh(e))return o;if(o===Gs(t.base_,e)||Ch(t,e,o)){Hn(t);let s=t.type_===1?+e:e,a=ta(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Gt(t)},ownKeys(t){return Reflect.ownKeys(Gt(t))},set(t,e,i){let r=Gl(Gt(t),e);if(r?.set)return r.set.call(t.draft_,i),!0;if(!t.modified_){let n=Gs(Gt(t),e),o=n?.[De];if(o&&o.base_===i)return t.copy_[e]=i,t.assigned_.set(e,!1),!0;if(gh(i,n)&&(i!==void 0||Ws(t.base_,e,t.type_)))return!0;Hn(t),ea(t)}return t.copy_[e]===i&&(i!==void 0||Ws(t.copy_,e,t.type_))||Number.isNaN(i)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=i,t.assigned_.set(e,!0),_h(t,e,i)),!0},deleteProperty(t,e){return Hn(t),Gs(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ea(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let i=Gt(t),r=Reflect.getOwnPropertyDescriptor(i,e);return r&&{[Bn]:!0,[qs]:t.type_!==1||e!=="length",[jn]:r[jn],[Gr]:i[e]}},defineProperty(){xt(11)},getPrototypeOf(t){return sr(t.base_)},setPrototypeOf(){xt(12)}},Yr={};for(let t in qn){let e=qn[t];Yr[t]=function(){let i=arguments;return i[0]=i[0][0],e.apply(this,i)}}Yr.deleteProperty=function(t,e){return Yr.set.call(this,t,e,void 0)};Yr.set=function(t,e,i){return qn.set.call(this,t[0],e,i,t[0])};function Gs(t,e){let i=t[De];return(i?Gt(i):t)[e]}function Ch(t,e,i){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!Qe(i)||i[De]?!1:t.baseRefs_.has(i)}function Th(t,e,i){let r=Gl(e,i);return r?Gr in r?r[Gr]:r.get?.call(t.draft_):void 0}function Gl(t,e){if(!(e in t))return;let i=sr(t);for(;i;){let r=Object.getOwnPropertyDescriptor(i,e);if(r)return r;i=sr(i)}}function ea(t){t.modified_||(t.modified_=!0,t.parent_&&ea(t.parent_))}function Hn(t){t.copy_||(t.assigned_=new Map,t.copy_=Zs(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Rh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,i,r)=>{if(or(e)&&!or(i)){let o=i;i=e;let s=this;return function(l=o,...d){return s.produce(l,u=>i.call(this,u,...d))}}or(i)||xt(6),r!==void 0&&!or(r)&&xt(7);let n;if(Qe(e)){let o=$l(this),s=ta(o,e,void 0),a=!0;try{n=i(s),a=!1}finally{a?Js(o):Qs(o)}return Nl(o,r),Ul(n,o)}else if(!e||!ia(e)){if(n=i(e),n===void 0&&(n=e),n===Vl&&(n=void 0),this.autoFreeze_&&na(n,!0),r){let o=[],s=[];Ci(Xs).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),r(o,s)}return n}else xt(1,e)},this.produceWithPatches=(e,i)=>{if(or(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,n;return[this.produce(e,i,(s,a)=>{r=s,n=a}),r,n]},Ks(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Ks(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Ks(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Qe(t)||xt(8),$t(t)&&(t=ql(t));let e=$l(this),i=ta(e,t,void 0);return i[De].isManual_=!0,Qs(e),i}finishDraft(t,e){let i=t&&t[De];(!i||!i.isManual_)&&xt(9);let{scope_:r}=i;return Nl(r,e),Ul(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let i;for(i=e.length-1;i>=0;i--){let n=e[i];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}i>-1&&(e=e.slice(i+1));let r=Ci(Xs).applyPatches_;return $t(t)?r(t,e):this.produce(t,n=>r(n,e))}};function ta(t,e,i,r){let[n,o]=Jn(e)?Ci(Kn).proxyMap_(e,i):Qn(e)?Ci(Kn).proxySet_(e,i):Ah(e,i);return(i?.scope_??zl()).drafts_.push(n),o.callbacks_=i?.callbacks_??[],o.key_=r,i&&r!==void 0?Eh(i,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:d}=l;o.modified_&&d&&d.generatePatches_(o,[],l)}),n}function ql(t){return $t(t)||xt(10,t),Yl(t)}function Yl(t){if(!Qe(t)||eo(t))return t;let e=t[De],i,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,i=Zs(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else i=Zs(t,!0);return Zn(i,(n,o)=>{Wn(i,n,Yl(o))},r),e&&(e.finalized_=!1),i}var Oh=globalThis.Iterator,Qg=typeof Oh?.from=="function";var kh=new Rh,oa=kh.produce;function Zl(t){return({dispatch:i,getState:r})=>n=>o=>typeof o=="function"?o(i,r,t):n(o)}var Xl=Zl(),Jl=Zl;var Lh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kr:Kr.apply(null,arguments)},sy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Dh=t=>t&&typeof t.match=="function";function si(t,e){function i(...r){if(e){let n=e(...r);if(!n)throw new Error(qt(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:r[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=r=>Ll(r)&&r.type===t,i}var rc=class Xr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Xr.prototype)}static get[Symbol.species](){return Xr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Xr(...e[0].concat(this)):new Xr(...e.concat(this))}};function Ql(t){return Qe(t)?oa(t,()=>{}):t}function io(t,e,i){return t.has(e)?t.get(e):t.set(e,i(e)).get(e)}function Ih(t){return typeof t=="boolean"}var Mh=()=>function(e){let{thunk:i=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new rc;return i&&(Ih(i)?s.push(Xl):s.push(Jl(i.extraArgument))),s},Ph="RTK_autoBatch";var ec=t=>e=>{setTimeout(e,t)},Nh=(t,e)=>i=>{let r=!1,n=()=>{r||(r=!0,cancelAnimationFrame(o),clearTimeout(s),i())},o=t(n),s=setTimeout(n,e)},$h=(t={type:"raf"})=>e=>(...i)=>{let r=e(...i),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Nh(window.requestAnimationFrame,100):ec(10):t.type==="callback"?t.queueNotification:ec(t.timeout),d=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let p=()=>n&&u(),f=r.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Ph],o=!n,o&&(s||(s=!0,l(d))),r.dispatch(u)}finally{n=!0}}})},Uh=t=>function(i){let{autoBatch:r=!0}=i??{},n=new rc(t);return r&&n.push($h(typeof r=="object"?r:void 0)),n};function nc(t){let e=Mh(),{reducer:i=void 0,middleware:r,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof i=="function")l=i;else if(Fn(i))l=Ol(i);else throw new Error(qt(1));let d;typeof r=="function"?d=r(e):d=e();let u=Kr;n&&(u=Lh({trace:!1,...typeof n=="object"&&n}));let p=kl(...d),f=Uh(p),y=typeof a=="function"?a(f):f(),S=u(...y);return js(l,s,S)}function oc(t){let e={},i=[],r,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(qt(28));if(a in e)throw new Error(qt(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&i.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return i.push({matcher:o,reducer:s}),n},addDefaultCase(o){return r=o,n}};return t(n),[e,i,r]}function Fh(t){return typeof t=="function"}function Vh(t,e){let[i,r,n]=oc(e),o;if(Fh(t))o=()=>Ql(t());else{let a=Ql(t);o=()=>a}function s(a=o(),l){let d=[i[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[n]),d.reduce((u,p)=>{if(p)if($t(u)){let y=p(u,l);return y===void 0?u:y}else{if(Qe(u))return oa(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=o,s}var Bh=(t,e)=>Dh(t)?t.match(e):t(e);function Hh(...t){return e=>t.some(i=>Bh(i,e))}var zh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",jh=(t=21)=>{let e="",i=t;for(;i--;)e+=zh[Math.random()*64|0];return e},Wh=["name","message","stack","code"],sa=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},tc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Kh=t=>{if(typeof t=="object"&&t!==null){let e={};for(let i of Wh)typeof t[i]=="string"&&(e[i]=t[i]);return e}return{message:String(t)}},ic="External signal was aborted",Gh=(()=>{function t(e,i,r){let n=si(e+"/fulfilled",(l,d,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),o=si(e+"/pending",(l,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:l,requestStatus:"pending"}})),s=si(e+"/rejected",(l,d,u,p,f)=>({payload:p,error:(r&&r.serializeError||Kh)(l||"Rejected"),meta:{...f||{},arg:u,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:d}={}){return(u,p,f)=>{let y=r?.idGenerator?r.idGenerator(l):jh(),S=new AbortController,T,b;function R(w){b=w,S.abort()}d&&(d.aborted?R(ic):d.addEventListener("abort",()=>R(ic),{once:!0}));let V=(async function(){let w;try{let N=r?.condition?.(l,{getState:p,extra:f});if(Yh(N)&&(N=await N),N===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let ae=new Promise((q,le)=>{T=()=>{le({name:"AbortError",message:b||"Aborted"})},S.signal.addEventListener("abort",T,{once:!0})});u(o(y,l,r?.getPendingMeta?.({requestId:y,arg:l},{getState:p,extra:f}))),w=await Promise.race([ae,Promise.resolve(i(l,{dispatch:u,getState:p,extra:f,requestId:y,signal:S.signal,abort:R,rejectWithValue:((q,le)=>new sa(q,le)),fulfillWithValue:((q,le)=>new tc(q,le))})).then(q=>{if(q instanceof sa)throw q;return q instanceof tc?n(q.payload,y,l,q.meta):n(q,y,l)})])}catch(N){w=N instanceof sa?s(null,y,l,N.payload,N.meta):s(N,y,l)}finally{T&&S.signal.removeEventListener("abort",T)}return r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition||u(w),w})();return Object.assign(V,{abort:R,requestId:y,arg:l,unwrap(){return V.then(qh)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Hh(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function qh(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Yh(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var sc=Symbol.for("rtk-slice-createasyncthunk"),ly={[sc]:Gh};function Zh(t,e){return`${t}/${e}`}function Xh({creators:t}={}){let e=t?.asyncThunk?.[sc];return function(r){let{name:n,reducerPath:o=n}=r;if(!n)throw new Error(qt(11));typeof process<"u";let s=(typeof r.reducers=="function"?r.reducers(Qh()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(w,k){let N=typeof w=="string"?w:w.type;if(!N)throw new Error(qt(12));if(N in l.sliceCaseReducersByType)throw new Error(qt(13));return l.sliceCaseReducersByType[N]=k,d},addMatcher(w,k){return l.sliceMatchers.push({matcher:w,reducer:k}),d},exposeAction(w,k){return l.actionCreators[w]=k,d},exposeCaseReducer(w,k){return l.sliceCaseReducersByName[w]=k,d}};a.forEach(w=>{let k=s[w],N={reducerName:w,type:Zh(n,w),createNotation:typeof r.reducers=="function"};tm(k)?rm(N,k,d,e):em(N,k,d)});function u(){let[w={},k=[],N=void 0]=typeof r.extraReducers=="function"?oc(r.extraReducers):[r.extraReducers],ae={...w,...l.sliceCaseReducersByType};return Vh(r.initialState,q=>{for(let le in ae)q.addCase(le,ae[le]);for(let le of l.sliceMatchers)q.addMatcher(le.matcher,le.reducer);for(let le of k)q.addMatcher(le.matcher,le.reducer);N&&q.addDefaultCase(N)})}let p=w=>w,f=new Map,y=new WeakMap,S;function T(w,k){return S||(S=u()),S(w,k)}function b(){return S||(S=u()),S.getInitialState()}function R(w,k=!1){function N(q){let le=q[w];return typeof le>"u"&&k&&(le=io(y,N,b)),le}function ae(q=p){let le=io(f,k,()=>new WeakMap);return io(le,q,()=>{let Fr={};for(let[at,Ei]of Object.entries(r.selectors??{}))Fr[at]=Jh(Ei,q,()=>io(y,q,b),k);return Fr})}return{reducerPath:w,getSelectors:ae,get selectors(){return ae(N)},selectSlice:N}}let V={name:n,reducer:T,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...R(o),injectInto(w,{reducerPath:k,...N}={}){let ae=k??o;return w.inject({reducerPath:ae,reducer:T},N),{...V,...R(ae,!0)}}};return V}}function Jh(t,e,i,r){function n(o,...s){let a=e(o);return typeof a>"u"&&r&&(a=i()),t(a,...s)}return n.unwrapped=t,n}var ac=Xh();function Qh(){function t(e,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...i}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...i){return e(...i)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:i}},asyncThunk:t}}function em({type:t,reducerName:e,createNotation:i},r,n){let o,s;if("reducer"in r){if(i&&!im(r))throw new Error(qt(17));o=r.reducer,s=r.prepare}else o=r;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?si(t,s):si(t))}function tm(t){return t._reducerDefinitionType==="asyncThunk"}function im(t){return t._reducerDefinitionType==="reducerWithPrepare"}function rm({type:t,reducerName:e},i,r,n){if(!n)throw new Error(qt(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:d,options:u}=i,p=n(t,o,u);r.exposeAction(e,p),s&&r.addCase(p.fulfilled,s),a&&r.addCase(p.pending,a),l&&r.addCase(p.rejected,l),d&&r.addMatcher(p.settled,d),r.exposeCaseReducer(e,{fulfilled:s||ro,pending:a||ro,rejected:l||ro,settled:d||ro})}function ro(){}var lc="listener",cc="completed",dc="cancelled",cy=`task-${dc}`,dy=`task-${cc}`,uy=`${lc}-${dc}`,py=`${lc}-${cc}`;var{assign:uc}=Object;var aa="listenerMiddleware";var nm=uc(si(`${aa}/add`),{withTypes:()=>nm}),fy=si(`${aa}/removeAll`),om=uc(si(`${aa}/remove`),{withTypes:()=>om});function qt(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var sm=Dn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(i,r,n){this.eventBus.addEventListener(i,r,n)}dispatchEvent(i){return this.eventBus.dispatchEvent(i)}removeEventListener(i,r,n){this.eventBus.removeEventListener(i,r,n)}}}),no=class extends sm(Object){};window.ftReduxStores||(window.ftReduxStores={});var pc=class t extends no{static get(e){var i;let r=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[r];if($n(o))return o;if(n==null)return;let s=ac({...n,reducers:(i=n.reducers)!==null&&i!==void 0?i:{}}),a=nc({reducer:(l,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let u=zr(s.getInitialState());for(let p of d.keeping)u[p]=(l??u)[p];return u}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...d.overwrites};return s.reducer(l,d)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,i,r){super(),this.reduxSlice=e,this.reduxStore=i,this.isFtReduxStore=!0,this.commands=new In,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,d=o[l];return d?(...u)=>{let p=d(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];ir(f,u)||this.setState({[p]:n(u)})}}}),this.eventBus=r??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var oo=class{static format(e,i,r,n,o){return window.moment?window.moment(e).locale(i).format(this.getMomentDateFormat(r,n,!!o)):this.getIntlDateTime(e,i,r,n,!!o)}static getMomentDateFormat(e,i,r){return r?"LT":e?i?"lll":"ll":i?"L LT":"L"}static getIntlDateTime(e,i,r,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(i,{dateStyle:r?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(i,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=r=>String(Math.floor(r)).padStart(2,"0"),i=new Date().getTimezoneOffset();return`${i<0?"+":"-"}${e(Math.abs(i)/60)}:${e(Math.abs(i)%60)}`}};var so=c(h()),am="ft-app-info",Ut=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ut.eventName="authentication-change";var Ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ti.eventName="ui-locale-changed";var lm={session:(t,e)=>{(0,so.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>v.dispatchEvent(new Ut(e.payload)),0))}},v=so.FtReduxStore.get({name:am,reducers:lm,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,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var fc=c(h()),ao=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},hc=(0,fc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...r){super(r),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(v)}dateFormatOptionsChanged(r){return r.has("metadataDescriptors")||r.has("useLongDateFormat")||r.has("useDateTimeFormat")||r.has("uiLocale")}getDateFormatter(r){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===r))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>oo.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ao([(0,la.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ao([(0,la.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ao([Hs({store:v.name,selector:i=>{var r,n;return(n=(r=i.metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),ao([Hs({store:v.name})],e.prototype,"uiLocale",void 0),e});var mc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(mc||(mc={}));var gc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(gc||(gc={}));var yc;(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"})(yc||(yc={}));var vc;(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"})(vc||(vc={}));var bc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(bc||(bc={}));var xc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(xc||(xc={}));var Sc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Sc||(Sc={}));var wc;(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"})(wc||(wc={}));var Ec;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Ec||(Ec={}));var _c;(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"})(_c||(_c={}));var Ac;(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"})(Ac||(Ac={}));var Cc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Cc||(Cc={}));var Tc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Tc||(Tc={}));var Rc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Rc||(Rc={}));var _e;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(_e||(_e={}));var Oc;(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"})(Oc||(Oc={}));var kc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(kc||(kc={}));var Lc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Lc||(Lc={}));var Dc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Dc||(Dc={}));var Ic;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ic||(Ic={}));var Mc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Mc||(Mc={}));var lo;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(lo||(lo={}));var Pc;(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"})(Pc||(Pc={}));var Nc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Nc||(Nc={}));var $c;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})($c||($c={}));var Uc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Uc||(Uc={}));var Fc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Fc||(Fc={}));var ie;(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"})(ie||(ie={}));var lt;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(lt||(lt={}));var Vc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Vc||(Vc={}));var Bc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Bc||(Bc={}));var Hc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Hc||(Hc={}));var zc;(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"})(zc||(zc={}));var jc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(jc||(jc={}));var Wc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Wc||(Wc={}));var Kc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Kc||(Kc={}));var Gc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Gc||(Gc={}));var qc;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(qc||(qc={}));var Yc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Yc||(Yc={}));var Zc;(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"})(Zc||(Zc={}));var co;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(co||(co={}));var cm={[ie.PERSONAL_BOOK_SHARE_USER]:[ie.PERSONAL_BOOK_USER],[ie.HTML_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.PDF_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.KHUB_ADMIN]:[ie.CONTENT_PUBLISHER],[ie.ADMIN]:[ie.KHUB_ADMIN,ie.USERS_ADMIN,ie.PORTAL_ADMIN,ie.BEHAVIOR_DATA_USER],[ie.GENERATIVE_AI_EXPORT_USER]:[ie.GENERATIVE_AI_USER]};function Xc(t,e){return t===e||(cm[t]??[]).some(i=>Xc(i,e))}function Jr(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(r=>Xc(r,e))}var mo=c(h());var ca=c(h());var Ft=class t{static get(e){let{baseUrl:i,apiIntegrationIdentifier:r}=v.getState(),n=e??r;if(i&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,n,!0)}static await(e){return new Promise(i=>{let r=t.get(e);if(r)i(r);else{let n=v.subscribe(()=>{r=t.get(e),r&&(n(),i(r))})}})}};var ar=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ft.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ft.await()}};var Re=class extends ar{constructor(e=!0,i){var r;super(i),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(r=n.commonCache)!==null&&r!==void 0?r:new ca.CacheRegistry,this.cache=e?n.commonCache:new ca.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((i,r)=>0|31*i+r.charCodeAt(0),0))}};var uo=class extends Re{async listMySearches(){let{session:e}=v.getState();return Jr(e,ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var po=class extends Re{async listMyBookmarks(){let e=v.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var fo=class extends Re{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=v.getState().session;return!!e?.sessionAuthenticated}};var ho=class extends Re{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=v.getState().session;return!!e?.sessionAuthenticated}};var dm="ft-user-assets",um={setAssetCount:(t,e)=>{let{userAssetType:i,count:r}=e.payload.assetCount;t.assetCounts.allAsset[i]=r},clearAssetCount:t=>{Object.values(lt).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let i=e.payload.mapId;t.assetCounts.bookmarkByMap[i]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:i,mapId:r,asset:n}=e.payload;ua(t,i,[...da(t,i),n]),Jc(t,i,1,r),Qc(t,n)},editAsset:(t,e)=>{let{assetType:i,asset:r}=e.payload;ua(t,i,da(t,i).map(n=>n.id===r.id?r:n)),Qc(t,r)},removeAsset:(t,e)=>{let{assetType:i,mapId:r,assetId:n}=e.payload;ua(t,i,da(t,i).filter(o=>o.id!==n)),Jc(t,i,-1,r)}},ed={[lt.SEARCHES]:"savedSearches",[lt.BOOKMARKS]:"bookmarks",[lt.BOOKS]:void 0,[lt.COLLECTIONS]:void 0},da=(t,e)=>{var i;let r=ed[e];return r?(i=t[r])!==null&&i!==void 0?i:[]:[]},ua=(t,e,i)=>{let r=ed[e];r&&(t[r]=i)},Jc=(t,e,i,r)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+i),e===lt.BOOKMARKS&&r)){let o=t.assetCounts.bookmarkByMap[r];t.assetCounts.bookmarkByMap[r]=Math.max(0,o+i)}},Qc=(t,e)=>{let i=t.assetLabels.map(n=>n.title),r=e.labels.filter(n=>!i.includes(n)).map(n=>({title:n}));t.assetLabels.push(...r)},$e=mo.FtReduxStore.get({name:dm,reducers:um,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(lt).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),pa=class{constructor(e=new fo,i=new ho){this.assetCountsService=e,this.assetLabelsService=i,this.currentSession=v.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new po,this.savedSearchesService=new uo,v.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:i}=v.getState();(0,mo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,i?.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),$e.actions.clearAssetCount(),$e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();$e.actions.assetLabels(e)}async loadAssetCount(e){let i=await this.assetCountsService.getUserAssetCount(e);i&&$e.getState().assetCounts.allAsset[e]!==i.count&&$e.actions.setAssetCount({assetCount:i})}async loadBookmarkByMapId(e){let i=await this.assetCountsService.getUserBookmarkCountByMap(e);i&&$e.getState().assetCounts.bookmarkByMap[e]!==i.count&&$e.actions.setBookmarkCountByMap({count:i.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let i=Object.keys($e.getState().assetCounts.bookmarkByMap).length!==0;e===lt.BOOKMARKS&&i&&$e.actions.clearBookmarkCountByMap(),$e.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 i=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$e.actions.bookmarks(i)}}},pm=new pa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=pm);var fa=class{addCommand(e,i=!1){v.commands.add(e,i)}consumeCommand(e){return v.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new fa;var ct=c(h());var td,lr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},fm=Symbol("clearAfterUnitTest"),go=class extends(0,ct.withEventBus)(Re){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[td]=()=>{this.defaultMessages={},this.cache=new ct.CacheRegistry,this.listeners={}},this.currentUiLocale=v.getState().uiLocale,v.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=v.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let i=e.name.toLowerCase();this.cache.setFinal(i,e),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,i){var r;if(e=e.toLowerCase(),i&&Object.keys(i).length>0){let n={...(r=this.defaultMessages[e])!==null&&r!==void 0?r:{},...i};(0,ct.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var i,r;return this.fetchContext(e),(r=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&r!==void 0?r:{}}resolveRawMessage(e,i){let r=e.toLowerCase();return this.resolveContext(r)[i]}resolveMessage(e,i,...r){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new ct.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(i,...r)}async fetchContext(e){let i=!this.cache.has(e),r;try{r=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),i&&await this.notify(e)}catch(n){!(n instanceof ct.CanceledPromiseError)&&i&&console.error(n)}return r}subscribe(e,i){var r;return e=e.toLowerCase(),this.listeners[e]=(r=this.listeners[e])!==null&&r!==void 0?r:new Set,this.listeners[e].add(i),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(i)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new lr({loadedContexts:e})),this.dispatchEvent(new lr({loadedContexts:e})),await Promise.all(e.map(i=>this.notify(i,!1)))}async notify(e,i=!0){i&&(document.body.dispatchEvent(new lr({loadedContexts:[e]})),this.dispatchEvent(new lr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,ct.delay)(0).then(()=>r()).catch(()=>null)))}};td=fm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends go{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends go{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var cr=window.FluidTopicsI18nService,yo=window.FluidTopicsCustomI18nService;var id=c(h()),ha=class{highlightHtml(e,i,r){(0,id.highlightHtml)(e,i,r)}};window.FluidTopicsHighlightHtmlService=new ha;var rd=c(h());var ma=class{isDate(e){var i,r,n,o;return(o=(n=((r=(i=v.getState().metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&r!==void 0?r:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,i){var r,n,o,s;if(e==null)return"";try{return rd.DateFormatter.format(e,(r=i?.locale)!==null&&r!==void 0?r:v.getState().uiLocale,(n=i?.longFormat)!==null&&n!==void 0?n:!1,(o=i?.withTime)!==null&&o!==void 0?o:!1,(s=i?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new ma;var nd=c(h());var Qr=class{static get(e,i){var r,n,o,s;let a=v.getState(),{lang:l,region:d}=(o=(n=(r=a.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new nd.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,i??`${l}-${d}`)}};var ga=class{urlToSearchRequest(e){return Qr.get().parse(e)}searchRequestToUrl(e){return Qr.get().serialize(e)}};window.FluidTopicsUrlService=new ga;var Yt=c(h());var Ri=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ri.eventName="change";var ya=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let i=sessionStorage.getItem(this.itemName(e));return i?JSON.parse(i):void 0}set(e,i){sessionStorage.setItem(this.itemName(e),JSON.stringify(i))}},od=new ya;var vo=class t extends Yt.WithEventBus{static build(){return new t(window.history,od,()=>window.location,!1)}constructor(e,i,r,n){var o,s;super(),this.history=e,this.historyStorage=i,this.windowLocation=r,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(n)}setCurrentState(e,i=!1){let r=i&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,r&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Yt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ri(this.currentItem())),0)}installProxies(){let e=i=>(r,n,[o,s,a])=>{let l=i(),d={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};r.apply(n,[d,s,a]),this.setCurrentState(d,!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 i=this.history.length-1;i>=0;i--)e?this.states[i]=this.historyStorage.get(i):setTimeout(()=>this.states[i]=this.historyStorage.get(i),this.history.length-i)}updateCurrentState(e){var i;let r={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title};this.setCurrentState(r)}addHistoryChangeListener(e){this.addEventListener(Ri.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ri.eventName,e)}currentItem(){return(0,Yt.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,Yt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let i=this.states.filter(r=>!!r).filter(r=>r.index<this.currentIndex).reverse();return(0,Yt.deepCopy)(i.find(r=>e(r)))}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,Yt.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 i;let r=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;if(!r)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,r);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,i;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(i=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&i!==void 0?i:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,i){var r;if(!this.hasState(e))return!1;let n=i??this.currentState.majorStateId,o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=vo.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 bo=class{constructor(){this.storeListeners=[]}store(e,i){if(this.isAuthenticated())return;let r=JSON.stringify(i);window.localStorage.setItem(e,r),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:r,storageArea:window.localStorage}))}get(e){var i,r;if(!this.isAuthenticated())return(r=JSON.parse((i=window.localStorage.getItem(e))!==null&&i!==void 0?i:"null"))!==null&&r!==void 0?r:void 0}addStoreListener(e,i){let r=n=>{n.key===e()&&!this.isAuthenticated()&&i()};this.storeListeners.push(r),window.addEventListener("storage",r)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=v.getState().session;return!!e?.sessionAuthenticated}};var sd=c(x());var ad=sd.css`
|
|
2
|
+
`;var cd=c(x()),Ue=c($()),ki=c(h());var Oi=c(h());function ld(t,e){let{authenticationRequired:i,session:r}=v.getState();return i&&!r?.sessionAuthenticated?Promise.resolve(e):t()}var xo=class extends ar{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var va=class t extends Oi.FtStateManager{static build(e){return new t(v,e)}constructor(e,i){super(),this.store=e,this.cache=new Oi.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new xo,this.cleanSessionDebouncer=new Oi.Debouncer,this.reloadDebouncer=new Oi.Debouncer(500),this.apiProvider=i??(()=>Ft.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ut.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 i=await this.apiProvider().getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},i.idleTimeoutInMillis),i});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 i=await this.cache.get("availableContentLocales",()=>ld(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=i.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,i){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:i}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ti(r)))}).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)}setNoCustomCode(e){this.store.actions.noCustomCode(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)}},dr=va.build();var Ae=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},X=class extends ki.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.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=dr,this.contextRoot=new Vr}render(){return cd.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(e){var i;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(r=>cr.addContext(r)),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")&&((i=this.stateManager)===null||i===void 0||i.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};
|
|
4
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var i;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("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>cr.addContext(r)),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")&&((i=this.stateManager)===null||i===void 0||i.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};X.elementDefinitions={};X.styles=ad;Ae([(0,Ue.property)()],X.prototype,"baseUrl",void 0);Ae([(0,Ue.property)()],X.prototype,"tenantId",void 0);Ae([(0,Ue.property)()],X.prototype,"apiIntegrationIdentifier",void 0);Ae([(0,Ue.property)()],X.prototype,"apiIntegrationAppVersion",void 0);Ae([(0,Ue.property)()],X.prototype,"uiLocale",void 0);Ae([(0,ki.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);Ae([(0,ki.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"editorMode",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"noCustom",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);Ae([(0,Ue.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],X.prototype,"noCustomComponent",void 0);Ae([(0,Ue.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],X.prototype,"noCustomCode",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"withManualResources",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);Ae([(0,Ue.property)({type:Boolean})],X.prototype,"authenticationRequired",void 0);Ae([(0,ki.jsonProperty)([])],X.prototype,"messageContexts",void 0);Ae([(0,ki.jsonProperty)(void 0)],X.prototype,"session",void 0);var ud=c(h());var dd={"ft-app-context":X};(0,ud.customElements)(dd);var fd=c(h()),ai;(function(t){t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.UD_ATTACHMENT="UD_ATTACHMENT",t.RESOURCE="RESOURCE"})(ai||(ai={}));var pd;(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"})(pd||(pd={}));var Li=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:(0,fd.deepCopy)(e),composed:!0,bubbles:!0})}};Li.eventName="ft-viewer-loaded";var So=class extends Re{getAsset(e,i,r){let n={[ai.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(e,i),[ai.UD_ATTACHMENT]:()=>this.api.getUdAttachment(e,i),[ai.RESOURCE]:()=>this.api.getMapResource(e,i)};return this.cache.get(i,n[r])}};var wo=class t extends tr{static build(e){return new t(Ln(e),new So)}constructor(e,i){super(e),this.store=e,this.service=i}async load(){let{documentId:e,assetId:i,origin:r}=this.store.getState();if(e&&i&&r){let n=await this.service.getAsset(e,i,r);this.store.actions.document(n.holder),this.store.actions.descriptor({id:n.id,portalUrl:n.portalUrl,filename:n.filename,fingerprint:n.fingerprint,displayName:n.displayName,alt:n.displayName,mimeType:n.mimeType,size:n.size,viewableInCurrentBrowser:n.viewableInCurrentBrowser,contentUrl:n.contentUrl}),this.store.actions.watermark(n.watermark)}}clear(){this.store.clearKeeping("documentId","assetId","origin")}reload(){return this.clear(),this.load()}async init(e,i,r){return this.store.actions.documentId(e),this.store.actions.assetId(i),this.store.actions.origin(r),await this.reload(),this.store.getState()}};var Eo=c($());var en=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Zt=class extends ur.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=wo.build(this.id||(0,ur.randomId)(6))}render(){return hd.html`
|
|
5
5
|
<slot></slot>
|
|
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 Li(e))}connectedCallback(){super.connectedCallback(),this.addStore(v)}onAuthenticationChange(){this.viewerStateManager.reload()}};en([(0,Eo.property)()],Zt.prototype,"documentId",void 0);en([(0,Eo.property)()],Zt.prototype,"assetId",void 0);en([(0,Eo.property)()],Zt.prototype,"origin",void 0);en([Br({context:Vs})],Zt.prototype,"viewerStateManager",void 0);en([(0,ur.reduxEventListener)({eventName:Ut.eventName})],Zt.prototype,"onAuthenticationChange",null);var md=c(h()),je=class extends md.FtLitElementRedux{};var wt=c(x()),Ni=c(h()),Et=c($());var gd=c(x()),yd=c(h()),
|
|
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 Li(e))}connectedCallback(){super.connectedCallback(),this.addStore(v)}onAuthenticationChange(){this.viewerStateManager.reload()}};en([(0,Eo.property)()],Zt.prototype,"documentId",void 0);en([(0,Eo.property)()],Zt.prototype,"assetId",void 0);en([(0,Eo.property)()],Zt.prototype,"origin",void 0);en([Br({context:Vs})],Zt.prototype,"viewerStateManager",void 0);en([(0,ur.reduxEventListener)({eventName:Ut.eventName})],Zt.prototype,"onAuthenticationChange",null);var md=c(h()),je=class extends md.FtLitElementRedux{};var wt=c(x()),Ni=c(h()),Et=c($());var gd=c(x()),yd=c(h()),hm={position:yd.FtCssVariableFactory.create("--ft-content-watermark-position","Position property of the watermark container","POSITION","sticky")},vd=gd.css`
|
|
7
7
|
:host {
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: 0;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.ft-watermark-container {
|
|
17
|
-
position: ${
|
|
17
|
+
position: ${hm.position};
|
|
18
18
|
top: 0;
|
|
19
19
|
text-align: center;
|
|
20
20
|
}
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
.ft-watermark {
|
|
23
23
|
z-index: 79;
|
|
24
24
|
}
|
|
25
|
-
`;var br=c(x()),Pi=c($());var Zd=c(pr()),Xd=c(h());var Aa=globalThis,xd=t=>t,_o=Aa.trustedTypes,Sd=_o?_o.createPolicy("lit-html",{createHTML:t=>t}):void 0,Td="$lit$",li=`lit$${Math.random().toFixed(9).slice(2)}$`,Rd="?"+li,
|
|
25
|
+
`;var br=c(x()),Pi=c($());var Zd=c(pr()),Xd=c(h());var Aa=globalThis,xd=t=>t,_o=Aa.trustedTypes,Sd=_o?_o.createPolicy("lit-html",{createHTML:t=>t}):void 0,Td="$lit$",li=`lit$${Math.random().toFixed(9).slice(2)}$`,Rd="?"+li,mm=`<${Rd}>`,Mi=document,Ao=()=>Mi.createComment(""),rn=t=>t===null||typeof t!="object"&&typeof t!="function",Ca=Array.isArray,gm=t=>Ca(t)||typeof t?.[Symbol.iterator]=="function",ba=`[
|
|
26
26
|
\f\r]`,tn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wd=/-->/g,Ed=/>/g,Di=RegExp(`>|${ba}(?:([^\\s"'>=/]+)(${ba}*=${ba}*(?:[^
|
|
27
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),_d=/'/g,Ad=/"/g,Od=/^(?:script|style|textarea|title)$/i,Ta=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),kd=Ta(1),Ld=Ta(2),Dd=Ta(3),nn=Symbol.for("lit-noChange"),he=Symbol.for("lit-nothing"),Cd=new WeakMap,Ii=Mi.createTreeWalker(Mi,129);function Id(t,e){if(!Ca(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Sd!==void 0?Sd.createHTML(e):e}var gm=(t,e)=>{let i=t.length-1,r=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=tn;for(let a=0;a<i;a++){let l=t[a],d,u,p=-1,f=0;for(;f<l.length&&(s.lastIndex=f,u=s.exec(l),u!==null);)f=s.lastIndex,s===tn?u[1]==="!--"?s=wd:u[1]!==void 0?s=Ed:u[2]!==void 0?(Od.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=Di):u[3]!==void 0&&(s=Di):s===Di?u[0]===">"?(s=n??tn,p=-1):u[1]===void 0?p=-2:(p=s.lastIndex-u[2].length,d=u[1],s=u[3]===void 0?Di:u[3]==='"'?Ad:_d):s===Ad||s===_d?s=Di:s===wd||s===Ed?s=tn:(s=Di,n=void 0);let y=s===Di&&t[a+1].startsWith("/>")?" ":"";o+=s===tn?l+hm:p>=0?(r.push(d),l.slice(0,p)+Td+l.slice(p)+li+y):l+li+(p===-2?a:y)}return[Id(t,o+(t[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},on=class t{constructor({strings:e,_$litType$:i},r){let n;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[d,u]=gm(e,i);if(this.el=t.createElement(d,r),Ii.currentNode=this.el.content,i===2||i===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=Ii.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(Td)){let f=u[s++],y=n.getAttribute(p).split(li),S=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:S[2],strings:y,ctor:S[1]==="."?Sa:S[1]==="?"?wa:S[1]==="@"?Ea:hr}),n.removeAttribute(p)}else p.startsWith(li)&&(l.push({type:6,index:o}),n.removeAttribute(p));if(Od.test(n.tagName)){let p=n.textContent.split(li),f=p.length-1;if(f>0){n.textContent=_o?_o.emptyScript:"";for(let y=0;y<f;y++)n.append(p[y],Ao()),Ii.nextNode(),l.push({type:2,index:++o});n.append(p[f],Ao())}}}else if(n.nodeType===8)if(n.data===Rd)l.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(li,p+1))!==-1;)l.push({type:7,index:o}),p+=li.length-1}o++}}static createElement(e,i){let r=Mi.createElement("template");return r.innerHTML=e,r}};function fr(t,e,i=t,r){if(e===nn)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,o=rn(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(t),n._$AT(t,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=fr(t,n._$AS(t,e.values),n,r)),e}var xa=class{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:i},parts:r}=this._$AD,n=(e?.creationScope??Mi).importNode(i,!0);Ii.currentNode=n;let o=Ii.nextNode(),s=0,a=0,l=r[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new Co(o,o.nextSibling,this,e):l.type===1?d=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(d=new _a(o,this,e)),this._$AV.push(d),l=r[++a]}s!==l?.index&&(o=Ii.nextNode(),s++)}return Ii.currentNode=Mi,n}p(e){let i=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,i),i+=r.strings.length-2):r._$AI(e[i])),i++}},Co=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,r,n){this.type=2,this._$AH=he,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=fr(this,e,i),rn(e)?e===he||e==null||e===""?(this._$AH!==he&&this._$AR(),this._$AH=he):e!==this._$AH&&e!==nn&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):mm(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!==he&&rn(this._$AH)?this._$AA.nextSibling.data=e:this.T(Mi.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=on.createElement(Id(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(i);else{let o=new xa(n,this),s=o.u(this.options);o.p(i),this.T(s),this._$AH=o}}_$AC(e){let i=Cd.get(e.strings);return i===void 0&&Cd.set(e.strings,i=new on(e)),i}k(e){Ca(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,r,n=0;for(let o of e)n===i.length?i.push(r=new t(this.O(Ao()),this.O(Ao()),this,this.options)):r=i[n],r._$AI(o),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let r=xd(e).nextSibling;xd(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},hr=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,r,n,o){this.type=1,this._$AH=he,this._$AN=void 0,this.element=e,this.name=i,this._$AM=n,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=he}_$AI(e,i=this,r,n){let o=this.strings,s=!1;if(o===void 0)e=fr(this,e,i,0),s=!rn(e)||e!==this._$AH&&e!==nn,s&&(this._$AH=e);else{let a=e,l,d;for(e=o[0],l=0;l<o.length-1;l++)d=fr(this,a[r+l],i,l),d===nn&&(d=this._$AH[l]),s||=!rn(d)||d!==this._$AH[l],d===he?e=he:e!==he&&(e+=(d??"")+o[l+1]),this._$AH[l]=d}s&&!n&&this.j(e)}j(e){e===he?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Sa=class extends hr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===he?void 0:e}},wa=class extends hr{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==he)}},Ea=class extends hr{constructor(e,i,r,n,o){super(e,i,r,n,o),this.type=5}_$AI(e,i=this){if((e=fr(this,e,i,0)??he)===nn)return;let r=this._$AH,n=e===he&&r!==he||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==he&&(r===he||n);n&&this.element.removeEventListener(this.name,this,r),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)}},_a=class{constructor(e,i,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){fr(this,e)}};var ym=Aa.litHtmlPolyfillSupport;ym?.(on,Co),(Aa.litHtmlVersions??=[]).push("3.3.3");var Pd=Symbol.for(""),vm=t=>{if(t?.r===Pd)return t?._$litStatic$},Ra=t=>({_$litStatic$:t,r:Pd});var Md=new Map,Oa=t=>(e,...i)=>{let r=i.length,n,o,s=[],a=[],l,d=0,u=!1;for(;d<r;){for(l=e[d];d<r&&(o=i[d],(n=vm(o))!==void 0);)l+=n+e[++d],u=!0;d!==r&&a.push(o),s.push(l),d++}if(d===r&&s.push(e[r]),u){let p=s.join("$$lit$$");(e=Md.get(p))===void 0&&(s.raw=s,Md.set(p,e=s)),i=a}return t(e,...i)},ka=Oa(kd),fx=Oa(Ld),hx=Oa(Dd);var La=c($()),Gd=c(h());var H;(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"})(H||(H={}));var pt=c(x()),g=c(h()),Nd=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.titleFont),Xt=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.contentFont),E={fontFamily:Xt,fontSize:g.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:g.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:g.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:g.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:g.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},ci={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Nd),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-font-size","",E.fontSize,"20px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",E.letterSpacing,"0.15px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-line-height","",E.lineHeight,"1.2"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",E.textTransform,"inherit")},di={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Nd),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",E.letterSpacing,"0.105px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",E.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",E.textTransform,"inherit")},mr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",E.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",E.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",E.letterSpacing,"0.144px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",E.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",E.textTransform,"inherit")},gr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",E.letterSpacing,"0.098px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",E.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",E.textTransform,"inherit")},dt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",E.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",E.letterSpacing,"0.496px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",E.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",E.textTransform,"inherit")},ut={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",E.letterSpacing,"0.252px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",E.lineHeight,"1.4"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",E.textTransform,"inherit")},et={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",E.fontSize,"12px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",E.letterSpacing,"0.396px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",E.lineHeight,"1.33"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",E.textTransform,"inherit")},yr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",E.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",E.letterSpacing,"0.33px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",E.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",E.textTransform,"inherit")},vr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",E.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",E.letterSpacing,"1.5px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",E.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",E.textTransform,"uppercase")},Ue={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-button-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",E.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",E.letterSpacing,"1.246px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-button-line-height","",E.lineHeight,"1.15"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",E.textTransform,"uppercase")},$d=pt.css`
|
|
27
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),_d=/'/g,Ad=/"/g,Od=/^(?:script|style|textarea|title)$/i,Ta=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),kd=Ta(1),Ld=Ta(2),Dd=Ta(3),nn=Symbol.for("lit-noChange"),he=Symbol.for("lit-nothing"),Cd=new WeakMap,Ii=Mi.createTreeWalker(Mi,129);function Id(t,e){if(!Ca(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Sd!==void 0?Sd.createHTML(e):e}var ym=(t,e)=>{let i=t.length-1,r=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=tn;for(let a=0;a<i;a++){let l=t[a],d,u,p=-1,f=0;for(;f<l.length&&(s.lastIndex=f,u=s.exec(l),u!==null);)f=s.lastIndex,s===tn?u[1]==="!--"?s=wd:u[1]!==void 0?s=Ed:u[2]!==void 0?(Od.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=Di):u[3]!==void 0&&(s=Di):s===Di?u[0]===">"?(s=n??tn,p=-1):u[1]===void 0?p=-2:(p=s.lastIndex-u[2].length,d=u[1],s=u[3]===void 0?Di:u[3]==='"'?Ad:_d):s===Ad||s===_d?s=Di:s===wd||s===Ed?s=tn:(s=Di,n=void 0);let y=s===Di&&t[a+1].startsWith("/>")?" ":"";o+=s===tn?l+mm:p>=0?(r.push(d),l.slice(0,p)+Td+l.slice(p)+li+y):l+li+(p===-2?a:y)}return[Id(t,o+(t[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},on=class t{constructor({strings:e,_$litType$:i},r){let n;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[d,u]=ym(e,i);if(this.el=t.createElement(d,r),Ii.currentNode=this.el.content,i===2||i===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=Ii.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(Td)){let f=u[s++],y=n.getAttribute(p).split(li),S=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:S[2],strings:y,ctor:S[1]==="."?Sa:S[1]==="?"?wa:S[1]==="@"?Ea:hr}),n.removeAttribute(p)}else p.startsWith(li)&&(l.push({type:6,index:o}),n.removeAttribute(p));if(Od.test(n.tagName)){let p=n.textContent.split(li),f=p.length-1;if(f>0){n.textContent=_o?_o.emptyScript:"";for(let y=0;y<f;y++)n.append(p[y],Ao()),Ii.nextNode(),l.push({type:2,index:++o});n.append(p[f],Ao())}}}else if(n.nodeType===8)if(n.data===Rd)l.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(li,p+1))!==-1;)l.push({type:7,index:o}),p+=li.length-1}o++}}static createElement(e,i){let r=Mi.createElement("template");return r.innerHTML=e,r}};function fr(t,e,i=t,r){if(e===nn)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,o=rn(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(t),n._$AT(t,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=fr(t,n._$AS(t,e.values),n,r)),e}var xa=class{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:i},parts:r}=this._$AD,n=(e?.creationScope??Mi).importNode(i,!0);Ii.currentNode=n;let o=Ii.nextNode(),s=0,a=0,l=r[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new Co(o,o.nextSibling,this,e):l.type===1?d=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(d=new _a(o,this,e)),this._$AV.push(d),l=r[++a]}s!==l?.index&&(o=Ii.nextNode(),s++)}return Ii.currentNode=Mi,n}p(e){let i=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,i),i+=r.strings.length-2):r._$AI(e[i])),i++}},Co=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,r,n){this.type=2,this._$AH=he,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=fr(this,e,i),rn(e)?e===he||e==null||e===""?(this._$AH!==he&&this._$AR(),this._$AH=he):e!==this._$AH&&e!==nn&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):gm(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!==he&&rn(this._$AH)?this._$AA.nextSibling.data=e:this.T(Mi.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=on.createElement(Id(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(i);else{let o=new xa(n,this),s=o.u(this.options);o.p(i),this.T(s),this._$AH=o}}_$AC(e){let i=Cd.get(e.strings);return i===void 0&&Cd.set(e.strings,i=new on(e)),i}k(e){Ca(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,r,n=0;for(let o of e)n===i.length?i.push(r=new t(this.O(Ao()),this.O(Ao()),this,this.options)):r=i[n],r._$AI(o),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let r=xd(e).nextSibling;xd(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},hr=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,r,n,o){this.type=1,this._$AH=he,this._$AN=void 0,this.element=e,this.name=i,this._$AM=n,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=he}_$AI(e,i=this,r,n){let o=this.strings,s=!1;if(o===void 0)e=fr(this,e,i,0),s=!rn(e)||e!==this._$AH&&e!==nn,s&&(this._$AH=e);else{let a=e,l,d;for(e=o[0],l=0;l<o.length-1;l++)d=fr(this,a[r+l],i,l),d===nn&&(d=this._$AH[l]),s||=!rn(d)||d!==this._$AH[l],d===he?e=he:e!==he&&(e+=(d??"")+o[l+1]),this._$AH[l]=d}s&&!n&&this.j(e)}j(e){e===he?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Sa=class extends hr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===he?void 0:e}},wa=class extends hr{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==he)}},Ea=class extends hr{constructor(e,i,r,n,o){super(e,i,r,n,o),this.type=5}_$AI(e,i=this){if((e=fr(this,e,i,0)??he)===nn)return;let r=this._$AH,n=e===he&&r!==he||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==he&&(r===he||n);n&&this.element.removeEventListener(this.name,this,r),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)}},_a=class{constructor(e,i,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){fr(this,e)}};var vm=Aa.litHtmlPolyfillSupport;vm?.(on,Co),(Aa.litHtmlVersions??=[]).push("3.3.3");var Pd=Symbol.for(""),bm=t=>{if(t?.r===Pd)return t?._$litStatic$},Ra=t=>({_$litStatic$:t,r:Pd});var Md=new Map,Oa=t=>(e,...i)=>{let r=i.length,n,o,s=[],a=[],l,d=0,u=!1;for(;d<r;){for(l=e[d];d<r&&(o=i[d],(n=bm(o))!==void 0);)l+=n+e[++d],u=!0;d!==r&&a.push(o),s.push(l),d++}if(d===r&&s.push(e[r]),u){let p=s.join("$$lit$$");(e=Md.get(p))===void 0&&(s.raw=s,Md.set(p,e=s)),i=a}return t(e,...i)},ka=Oa(kd),mx=Oa(Ld),gx=Oa(Dd);var La=c($()),Gd=c(h());var H;(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"})(H||(H={}));var pt=c(x()),g=c(h()),Nd=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.titleFont),Xt=g.FtCssVariableFactory.extend("--ft-typography-font-family","",g.designSystemVariables.contentFont),E={fontFamily:Xt,fontSize:g.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:g.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:g.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:g.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:g.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},ci={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Nd),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-font-size","",E.fontSize,"20px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",E.letterSpacing,"0.15px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-line-height","",E.lineHeight,"1.2"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",E.textTransform,"inherit")},di={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Nd),fontSize:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",E.letterSpacing,"0.105px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",E.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",E.textTransform,"inherit")},mr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",E.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",E.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",E.letterSpacing,"0.144px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",E.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",E.textTransform,"inherit")},gr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",E.letterSpacing,"0.098px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",E.lineHeight,"1.7"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",E.textTransform,"inherit")},dt={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",E.fontSize,"16px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",E.letterSpacing,"0.496px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",E.lineHeight,"1.5"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",E.textTransform,"inherit")},ut={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",E.letterSpacing,"0.252px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",E.lineHeight,"1.4"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",E.textTransform,"inherit")},et={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",E.fontSize,"12px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",E.letterSpacing,"0.396px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",E.lineHeight,"1.33"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",E.textTransform,"inherit")},yr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",E.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",E.letterSpacing,"0.33px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",E.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",E.textTransform,"inherit")},vr={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",E.fontSize,"10px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",E.fontWeight,"normal"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",E.letterSpacing,"1.5px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",E.lineHeight,"1.6"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",E.textTransform,"uppercase")},Fe={fontFamily:g.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Xt),fontSize:g.FtCssVariableFactory.extend("--ft-typography-button-font-size","",E.fontSize,"14px"),fontWeight:g.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",E.fontWeight,"600"),letterSpacing:g.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",E.letterSpacing,"1.246px"),lineHeight:g.FtCssVariableFactory.extend("--ft-typography-button-line-height","",E.lineHeight,"1.15"),textTransform:g.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",E.textTransform,"uppercase")},$d=pt.css`
|
|
28
28
|
.ft-typography--title {
|
|
29
29
|
font-family: ${ci.fontFamily};
|
|
30
30
|
font-size: ${ci.fontSize};
|
|
@@ -108,12 +108,12 @@
|
|
|
108
108
|
}
|
|
109
109
|
`,jd=pt.css`
|
|
110
110
|
.ft-typography--button {
|
|
111
|
-
font-family: ${
|
|
112
|
-
font-size: ${
|
|
113
|
-
font-weight: ${
|
|
114
|
-
letter-spacing: ${
|
|
115
|
-
line-height: ${
|
|
116
|
-
text-transform: ${
|
|
111
|
+
font-family: ${Fe.fontFamily};
|
|
112
|
+
font-size: ${Fe.fontSize};
|
|
113
|
+
font-weight: ${Fe.fontWeight};
|
|
114
|
+
letter-spacing: ${Fe.letterSpacing};
|
|
115
|
+
line-height: ${Fe.lineHeight};
|
|
116
|
+
text-transform: ${Fe.textTransform};
|
|
117
117
|
}
|
|
118
118
|
`,Wd=pt.css`
|
|
119
119
|
.ft-typography {
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
max-height: 100%;
|
|
216
216
|
border: none;
|
|
217
217
|
}
|
|
218
|
-
`;tt([(0,Ni.redux)({store:"viewer"})],ce.prototype,"descriptor",void 0);tt([(0,Et.state)()],ce.prototype,"viewerType",void 0);tt([(0,Et.state)()],ce.prototype,"inlineSvgAllowed",void 0);tt([(0,Ni.redux)({store:"viewer",selector:({contentModifiers:t})=>t.zoom})],ce.prototype,"zoom",void 0);tt([(0,Ni.redux)({store:"viewer",selector:({contentModifiers:t})=>t.rotation})],ce.prototype,"rotation",void 0);tt([(0,Ni.redux)({store:"viewer"})],ce.prototype,"watermark",void 0);tt([(0,Et.query)("img")],ce.prototype,"image",void 0);tt([(0,Et.query)("svg")],ce.prototype,"svg",void 0);tt([(0,Et.query)(".image-viewer")],ce.prototype,"imageViewer",void 0);tt([(0,Et.query)(".image-container")],ce.prototype,"imageContainer",void 0);tt([(0,Et.state)()],ce.prototype,"imageHeight",void 0);tt([(0,Et.state)()],ce.prototype,"imageWidth",void 0);tt([(0,Et.state)()],ce.prototype,"svgContent",void 0);var Oo=class extends Pt(ce){};var iu=c(h()),xr=c(x());var
|
|
218
|
+
`;tt([(0,Ni.redux)({store:"viewer"})],ce.prototype,"descriptor",void 0);tt([(0,Et.state)()],ce.prototype,"viewerType",void 0);tt([(0,Et.state)()],ce.prototype,"inlineSvgAllowed",void 0);tt([(0,Ni.redux)({store:"viewer",selector:({contentModifiers:t})=>t.zoom})],ce.prototype,"zoom",void 0);tt([(0,Ni.redux)({store:"viewer",selector:({contentModifiers:t})=>t.rotation})],ce.prototype,"rotation",void 0);tt([(0,Ni.redux)({store:"viewer"})],ce.prototype,"watermark",void 0);tt([(0,Et.query)("img")],ce.prototype,"image",void 0);tt([(0,Et.query)("svg")],ce.prototype,"svg",void 0);tt([(0,Et.query)(".image-viewer")],ce.prototype,"imageViewer",void 0);tt([(0,Et.query)(".image-container")],ce.prototype,"imageContainer",void 0);tt([(0,Et.state)()],ce.prototype,"imageHeight",void 0);tt([(0,Et.state)()],ce.prototype,"imageWidth",void 0);tt([(0,Et.state)()],ce.prototype,"svgContent",void 0);var Oo=class extends Pt(ce){};var iu=c(h()),xr=c(x());var xm=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Jt=class extends je{render(){return this.filename?xr.html`
|
|
219
219
|
<ft-typography variant="${H.body1}" part="filename">
|
|
220
220
|
${this.filename}
|
|
221
221
|
</ft-typography>
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
[part="filename"]::part(text) {
|
|
224
224
|
margin: unset;
|
|
225
225
|
}
|
|
226
|
-
`;
|
|
226
|
+
`;xm([(0,iu.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Jt.prototype,"filename",void 0);var ko=class extends Pt(Jt){};var ru=c(h()),Sr=c(x());var Sm=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},$i=class extends je{render(){return this.displayName?Sr.html`
|
|
227
227
|
<ft-typography variant="${H.title}" part="display-name" element="h2">
|
|
228
228
|
${this.displayName}
|
|
229
229
|
</ft-typography>
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
[part="display-name"]::part(text) {
|
|
232
232
|
margin: unset;
|
|
233
233
|
}
|
|
234
|
-
`;
|
|
234
|
+
`;Sm([(0,ru.redux)({store:"viewer",selector:({descriptor:t})=>t?.displayName})],$i.prototype,"displayName",void 0);var Lo=class extends Pt($i){};var ln=c(h()),Io=c(x());var nu=c(x()),_t=c(h()),me={size:_t.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:_t.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",_t.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:_t.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",_t.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:_t.FtCssVariableFactory.extend("--ft-icon-material-font-family","",_t.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:_t.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},ou=[nu.css`
|
|
235
235
|
:host, i.ft-icon {
|
|
236
236
|
display: inline-flex;
|
|
237
237
|
align-items: center;
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
.ft-icon--material {
|
|
280
280
|
font-family: ${me.materialFontFamily}, "Material Icons", sans-serif;
|
|
281
281
|
}
|
|
282
|
-
`,_t.noTextSelect];var Ie;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ie||(Ie={}));var sn=c(x()),pi=c($()),su=c(h()),au=c(Da());var Ui;(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM="",t.HYPHEN_SOLID="",t.CROSSHAIRS="",t.PERSON_CHALKBOARD="",t.CIRCLE_ARROW_DOWN_SLASH="",t.BOOK_OPEN_COVER="",t.LIGHTBULB="",t.MESSAGE_BOT_AGENTIC_SOLID="",t.CHART_LINE_USER="",t.SERVER_CIRCLE_ARROW_DOWN="",t.EYE="",t.SHARE="󨃱"})(Ui||(Ui={}));var m;(function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""})(m||(m={}));var Ia=new Map([...["abw"].map(t=>[t,m.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,m.AUDIO]),...["avi"].map(t=>[t,m.AVI]),...["chm","xhs"].map(t=>[t,m.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,m.CODE]),...["csv"].map(t=>[t,m.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,m.DITA]),...["epub"].map(t=>[t,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,m.EXCEL]),...["flac"].map(t=>[t,m.FLAC]),...["gif"].map(t=>[t,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,m.GZIP]),...["html","htm","xhtml"].map(t=>[t,m.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,m.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,m.JPEG]),...["json"].map(t=>[t,m.JSON]),...["m4a","m4p"].map(t=>[t,m.M4A]),...["mov","qt"].map(t=>[t,m.MOV]),...["mp3"].map(t=>[t,m.MP3]),...["mp4","m4v"].map(t=>[t,m.MP4]),...["ogg","oga"].map(t=>[t,m.OGG]),...["pdf","ps"].map(t=>[t,m.PDF]),...["png"].map(t=>[t,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,m.POWERPOINT]),...["rar"].map(t=>[t,m.RAR]),...["stp"].map(t=>[t,m.STP]),...["txt","rtf","md","mdown"].map(t=>[t,m.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,m.VIDEO]),...["wav"].map(t=>[t,m.WAV]),...["wma"].map(t=>[t,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,m.WORD]),...["xml","xsl","rdf"].map(t=>[t,m.XML]),...["yaml","yml","x-yaml"].map(t=>[t,m.YAML]),...["zip"].map(t=>[t,m.ZIP])]),Sm=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 Do(t,e){var i,r,n,o;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,a]=(((i=Sm.get(t))!==null&&i!==void 0?i:t)+"/").split("/");return(o=(n=(r=Ia.get(a))!==null&&r!==void 0?r:Ia.get(e))!==null&&n!==void 0?n:Ia.get(s))!==null&&o!==void 0?o:m.UNKNOWN}var Ma={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var an=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},z=class extends su.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=sn.nothing}render(){let e=this.variant&&Object.values(Ie).includes(this.variant)?this.variant:Ie.fluid_topics,i=e!==Ie.material||!!this.value;return sn.html`
|
|
282
|
+
`,_t.noTextSelect];var Ie;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(Ie||(Ie={}));var sn=c(x()),pi=c($()),su=c(h()),au=c(Da());var Ui;(function(t){t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.BOOKS="",t.MENU="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.HOME="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.EXPORT="",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.USER="",t.EXTLINK="",t.CALENDAR="",t.OFFLINE="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.STAR_PLAIN="",t.TOPICS="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN="",t.ADMIN_KHUB="",t.ADMIN_THEME="",t.ADMIN_USERS="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.INFO="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.FACET_HAS_DESCENDANT="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.THIN_ARROW="",t.SIGN_IN="",t.LOGOUT="",t.TRANSLATE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.ARTICLE="",t.COLUMNS="",t.ANALYTICS="",t.COLLECTIONS="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SEARCH_IN_PUBLICATION="",t.COPY_TO_CLIPBOARD="",t.SHARED_PBK="",t.ATTACHMENTS="",t.STRIPE_ARROW_LEFT="",t.STRIPE_ARROW_RIGHT="",t.FILTERS="",t.DOT="",t.MINUS="",t.PLUS="",t.MAILS_AND_NOTIFICATIONS="",t.SAVE="",t.LOCKER="",t.ADMIN_INTEGRATION="",t.SYNC="",t.TAG="",t.BOOK_PLAIN="",t.UPLOAD="",t.ONLINE="",t.TAG_PLAIN="",t.ACCOUNT_SETTINGS="",t.PRINT="",t.DEFAULT_ROLES="",t.SHORTCUT_MENU="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.PAUSE="",t.PLAY="",t.ADMIN_PORTAL="",t.STAR="",t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.FEEDBACK_PLAIN="",t.RATE_PLAIN="",t.RATE="",t.OFFLINE_SETTINGS="",t.MY_COLLECTIONS="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.RESET="",t.MY_LIBRARY="",t.UNSTRUCTURED_DOC="",t.CONTEXTUAL="",t.THIN_ARROW_UP="",t.ARROW_RIGHT_TO_LINE="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_STACKED="",t.CHART_BAR_GROUPED="",t.EYE_SLASH="",t.X_MARK="",t.EXPAND_WIDE="",t.PIP="",t.PIP_WIDE="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.EXTLINK_LIGHT="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CHART_BAR_NORMALIZED="",t.CONSUMER="",t.OCTAGON_XMARK="",t.HOURGLASS_HALF="",t.CLOCK="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE="",t.CIRCLE_STOP="",t.ARROW_ROTATE_RIGHT="",t.ARROWS_ROTATE="",t.ALIGN_RIGHT="",t.FORMAT_CLEAR="",t.ALIGN_CENTER="",t.ALIGN_LEFT="",t.PALETTE="",t.BOLD="",t.ITALIC="",t.UNDERLINE="",t.STRIKETHROUGH="",t.LINK_SIMPLE_SLASH="",t.LINK_SIMPLE="",t.ROUTE="",t.CIRCLE_USER_SLASH="",t.CIRCLE_USER_CHECK="",t.LIST_MAGNIFYING_GLASS="",t.MEDAL="",t.THUMBS_UP_THUMBS_DOWN_SOLID="",t.ARROW_TURN_DOWN_RIGHT="",t.FLASK="",t.LOCK_KEYHOLE_OPEN_SOLID="",t.HOURGLASS_END="",t.CIRCLE_QUESTION="",t.GRIP_LINES_SOLID="",t.TRANSLATE_SPARKLE_SOLID="",t.CODE="",t.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",t.PAPER_PLANE_SLASH="",t.COMPRESS="",t.EXPAND="",t.ARROW_ROTATE_LEFT="",t.MOBILE_SMALL="",t.SPARKLES="",t.HAND_SOLID="",t.CLOCK_SOLID="",t.CONTEXT_MENU_CURSOR="",t.LANGUAGE_SLASH="",t.MAGNIFYING_GLASS_FLOPPY_DISK="",t.CABINET_FILING_FLOPPY_DISK="",t.BOOKMARK_SLASH="",t.CIRCLE_PAUSE="",t.CIRCLE_PLAY="",t.CIRCLE_STOP_PLAIN="",t.CIRCLE_ARROW_DOWN="",t.SHARE_NODES="",t.BELL="",t.BELL_SLASH="",t.FILE="",t.HAND="",t.SQUARE_INFO_SOLID="",t.FILE_CODE="",t.BOX_CODE="",t.TOPICS_SOLID="",t.PHOTO_FILM="",t.HYPHEN_SOLID="",t.CROSSHAIRS="",t.PERSON_CHALKBOARD="",t.CIRCLE_ARROW_DOWN_SLASH="",t.BOOK_OPEN_COVER="",t.LIGHTBULB="",t.MESSAGE_BOT_AGENTIC_SOLID="",t.CHART_LINE_USER="",t.SERVER_CIRCLE_ARROW_DOWN="",t.EYE="",t.SHARE="󨃱"})(Ui||(Ui={}));var m;(function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""})(m||(m={}));var Ia=new Map([...["abw"].map(t=>[t,m.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,m.AUDIO]),...["avi"].map(t=>[t,m.AVI]),...["chm","xhs"].map(t=>[t,m.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,m.CODE]),...["csv"].map(t=>[t,m.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,m.DITA]),...["epub"].map(t=>[t,m.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,m.EXCEL]),...["flac"].map(t=>[t,m.FLAC]),...["gif"].map(t=>[t,m.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,m.GZIP]),...["html","htm","xhtml"].map(t=>[t,m.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,m.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,m.JPEG]),...["json"].map(t=>[t,m.JSON]),...["m4a","m4p"].map(t=>[t,m.M4A]),...["mov","qt"].map(t=>[t,m.MOV]),...["mp3"].map(t=>[t,m.MP3]),...["mp4","m4v"].map(t=>[t,m.MP4]),...["ogg","oga"].map(t=>[t,m.OGG]),...["pdf","ps"].map(t=>[t,m.PDF]),...["png"].map(t=>[t,m.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,m.POWERPOINT]),...["rar"].map(t=>[t,m.RAR]),...["stp"].map(t=>[t,m.STP]),...["txt","rtf","md","mdown"].map(t=>[t,m.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,m.VIDEO]),...["wav"].map(t=>[t,m.WAV]),...["wma"].map(t=>[t,m.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,m.WORD]),...["xml","xsl","rdf"].map(t=>[t,m.XML]),...["yaml","yml","x-yaml"].map(t=>[t,m.YAML]),...["zip"].map(t=>[t,m.ZIP])]),wm=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 Do(t,e){var i,r,n,o;t=(t??"").toLowerCase(),e=(e??"").toLowerCase();let[s,a]=(((i=wm.get(t))!==null&&i!==void 0?i:t)+"/").split("/");return(o=(n=(r=Ia.get(a))!==null&&r!==void 0?r:Ia.get(e))!==null&&n!==void 0?n:Ia.get(s))!==null&&o!==void 0?o:m.UNKNOWN}var Ma={[m.ABW]:"#91ABC6",[m.AUDIO]:"#1795E3",[m.AVI]:"#E63324",[m.CHM]:"#71C3EB",[m.CODE]:"#71C3EB",[m.CSV]:"#1F7345",[m.DITA]:"#71C3EB",[m.EPUB]:"#85B926",[m.EXCEL]:"#1F7345",[m.FLAC]:"#1795E3",[m.GIF]:"#59B031",[m.GZIP]:"#F8AB36",[m.HTML]:"#71C3EB",[m.IMAGE]:"#59B031",[m.JPEG]:"#59B031",[m.JSON]:"#71C3EB",[m.M4A]:"#1795E3",[m.MOV]:"#E63324",[m.MP3]:"#1795E3",[m.MP4]:"#E63324",[m.OGG]:"#1795E3",[m.PDF]:"#E44948",[m.PNG]:"#59B031",[m.POWERPOINT]:"#B54A2B",[m.RAR]:"#F8AB36",[m.STP]:"#3764B1",[m.TEXT]:"#3162AB",[m.UNKNOWN]:"#999999",[m.VIDEO]:"#E63324",[m.WAV]:"#1795E3",[m.WMA]:"#1795E3",[m.WORD]:"#3162AB",[m.XML]:"#71C3EB",[m.YAML]:"#71C3EB",[m.ZIP]:"#F8AB36"};var an=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},z=class extends su.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=sn.nothing}render(){let e=this.variant&&Object.values(Ie).includes(this.variant)?this.variant:Ie.fluid_topics,i=e!==Ie.material||!!this.value;return sn.html`
|
|
283
283
|
<i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
|
|
284
284
|
${(0,au.unsafeHTML)(this.resolvedIcon)}
|
|
285
285
|
<slot ?hidden=${i}></slot>
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
<ft-icon part="icon"
|
|
289
289
|
variant="${Ie.file_format}"
|
|
290
290
|
value="${Do(this.mimeType,(0,ln.last)((i=(e=this.filename)===null||e===void 0?void 0:e.split("."))!==null&&i!==void 0?i:[]))}"></ft-icon>
|
|
291
|
-
`:Io.nothing}};Qt.elementDefinitions={"ft-icon":z};du([(0,ln.redux)({store:"viewer",selector:({descriptor:t})=>t?.mimeType})],Qt.prototype,"mimeType",void 0);du([(0,ln.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Qt.prototype,"filename",void 0);var Mo=class extends Pt(Qt){};var uu=c(h()),wr=c(x());var
|
|
291
|
+
`:Io.nothing}};Qt.elementDefinitions={"ft-icon":z};du([(0,ln.redux)({store:"viewer",selector:({descriptor:t})=>t?.mimeType})],Qt.prototype,"mimeType",void 0);du([(0,ln.redux)({store:"viewer",selector:({descriptor:t})=>t?.filename})],Qt.prototype,"filename",void 0);var Mo=class extends Pt(Qt){};var uu=c(h()),wr=c(x());var Em=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},ei=class extends je{render(){return this.documentTitle?wr.html`
|
|
292
292
|
<ft-typography variant="${H.title}" part="title" element="h1">
|
|
293
293
|
${this.documentTitle}
|
|
294
294
|
</ft-typography>
|
|
@@ -296,14 +296,14 @@
|
|
|
296
296
|
[part="title"]::part(text) {
|
|
297
297
|
margin: unset;
|
|
298
298
|
}
|
|
299
|
-
`;
|
|
299
|
+
`;Em([(0,uu.redux)({store:"viewer",selector:({document:t})=>t?.title})],ei.prototype,"documentTitle",void 0);var Po=class extends Pt(ei){};var hu=c(x()),mu=c($());var Vi=c(h());var pu;(function(t){t.RATING="RATING"})(pu||(pu={}));var fi;(function(t){t.udAttachmentsUpdate="ud-attachments-update",t.udRatingUpdate="ud-rating-update",t.clusteringHelperCreated="clustering-helper-created"})(fi||(fi={}));var hi;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING"})(hi||(hi={}));var No=class extends Re{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,i){return this.makeAbsolute(`${this.api.endpoints.khub.documents.documentId(e).attachments.attachmentId(i).content}?download=true&locationValue=viewer`)}makeAbsolute(e){return this.api.makeAbsolute(e)}async awaitMakeAbsolute(e){return(await this.awaitApi).makeAbsolute(e)}async getDocumentRating(e){return(await this.api.getDocumentRating(e)).publication}async rateDocument(e,i,r){return this.api.rateDocument(e,i,r)}async unrateDocument(e){return this.api.unrateDocument(e)}async sendDocumentFeedback(e,i,r){return this.api.sendDocumentFeedback(e,i,r)}isFeatureAccessible(e,{session:i}){switch(e){case hi.FEEDBACK:return Jr(i??[],ie.FEEDBACK_USER);case hi.RATING:return Jr(i??[],ie.RATING_USER);default:return!1}}getConfiguration(){return this.cache.get("configuration",()=>this.api.getViewerConfiguration())}clearConfiguration(){this.cache.clear("configuration")}fetchRelativesForDocument(e,i){let r={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:e,valueFilter:{negative:!1,values:i}}],sort:[],facets:[]};return this.api.search(r)}getRelativesForDocument(e,i){return this.cache.get("document-relatives-"+e+"-"+i.join("-"),()=>this.fetchRelativesForDocument(e,i))}};var Fi=c(h());var $o=class t extends tr{static build(e){return new t(Ln(e),new No)}constructor(e,i,r){super(e),this.store=e,this.service=i,this.clusteringHelperProvider=r,this.metadataForSwitchToRelatives=new Set,e.actions.origin(ai.UNSTRUCTURED_DOCUMENT)}async load(){var e,i;let{documentId:r}=this.store.getState();if(r){let[n]=await Promise.all([this.service.getDocument(r),this.loadConfiguration()]);this.store.actions.unstructuredDocument(n),this.store.actions.document({type:co.UNSTRUCTURED_DOCUMENT,id:n.id,lang:(e=n.lang)!==null&&e!==void 0?e:"en-US",title:n.title,metadata:n.metadata,portalUrl:n.viewerUrl});let o=await this.service.awaitMakeAbsolute(n.contentApiEndpoint);this.store.actions.descriptor({id:n.id,portalUrl:n.viewerUrl,filename:n.filename,fingerprint:n.lastEdition,displayName:n.title,alt:(i=n.description)!==null&&i!==void 0?i:n.title,mimeType:n.mimeType,size:0,viewableInCurrentBrowser:n.viewableInCurrentBrowser,contentUrl:o}),this.store.actions.watermark(n.watermark),this.fetchMapRating(),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}return this.store.getState()}async fetchMapRating(){var e;let{documentId:i}=this.store.getState();i&&this.store.actions.documentRating(await((e=this.service)===null||e===void 0?void 0:e.getDocumentRating(i)))}clear(){this.store.clearKeeping("documentId","origin")}reload(){var e;return this.clear(),(e=this.service)===null||e===void 0||e.clearConfiguration(),this.load()}setDocumentId(e){return this.store.actions.documentId(e),this.reload()}async loadConfiguration(){var e;return(e=this.service)===null||e===void 0?void 0:e.getConfiguration().then(i=>this.store.actions.configuration(i))}async fetchRelatives(){var e,i;let r=(e=this.store.getState().document)===null||e===void 0?void 0:e.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(r!==void 0&&r.length>0){let n=await((i=this.service)===null||i===void 0?void 0:i.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,r)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(fi.clusteringHelperCreated))}createClusteringHelper(){var e,i;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let r=this.store.getState().relatives;if(r){let n=r.find(s=>(0,Fi.accessResultId)(s)==this.store.getState().documentId),o=(i=(e=v.getState().metadataConfiguration)===null||e===void 0?void 0:e.descriptors)!==null&&i!==void 0?i:[];return new Fi.ClusteringHelper(r,n,this.metadataForSwitchToRelatives,o)}}registerMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.add(e),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(e){this.metadataForSwitchToRelatives.delete(e),this.updateClusteringHelper()}async getRelativeDocumentUrlForLocale(e){var i;this.store.getState().relatives==null&&await this.fetchRelatives();let r=Fi.ClusteringHelper.findResultWithMetadataValue((i=this.store.getState().relatives)!==null&&i!==void 0?i:[],"ft:locale",e);return(0,Fi.accessResultUrl)(r)}};var Uo=c(h()),Pa=c($());var fu=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Na=Symbol("ud-viewer-state-manager"),We=(0,Uo.applyMixinOnce)(Symbol("toFtUdViewerComponent"),function(t){class e extends t{constructor(){super(...arguments),this.neededUdvRequests=[]}get service(){var r;return(r=this.viewerStateManager)===null||r===void 0?void 0:r.service}willUpdate(r){var n,o,s;super.willUpdate(r),r.has("viewerStateManager")&&(this.unregisterFromUdvStateManager(r.get("viewerStateManager")),this.registerToUdvStateManager(this.viewerStateManager)),r.has("neededUdvRequests")&&((n=this.viewerStateManager)===null||n===void 0||n.unregisterComponent(this,(o=r.get("neededUdvRequests"))!==null&&o!==void 0?o:[]),(s=this.viewerStateManager)===null||s===void 0||s.registerComponent(this,this.neededUdvRequests))}setUdvStateManager(r){this.clearStateManager(),this.viewerStateManager=r,this.addStore(r.store,"viewer")}clearStateManager(){this.viewerStateManager&&(this.removeStore("viewer"),this.viewerStateManager=void 0)}registerToUdvStateManager(r){r&&(r.registerComponent(this,this.neededUdvRequests),this.addStore(r.store,"viewer"))}unregisterFromUdvStateManager(r){r&&(r.unregisterComponent(this,this.neededUdvRequests),this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.registerToUdvStateManager(this.viewerStateManager)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterFromUdvStateManager(this.viewerStateManager)}}return fu([Hr({context:Na,subscribe:!0}),(0,Pa.state)()],e.prototype,"viewerStateManager",void 0),fu([(0,Pa.state)({hasChanged:Uo.hasChanged})],e.prototype,"neededUdvRequests",void 0),e});var Fo=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},mi=class extends Vi.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=$o.build(this.id||(0,Vi.randomId)(6))}render(){return hu.html`
|
|
300
300
|
<slot></slot>
|
|
301
|
-
`}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 Li(e))}connectedCallback(){super.connectedCallback(),this.addStore(v)}onAuthenticationChange(){this.viewerStateManager.reload()}async reactToUiLocaleChanged(e){var i;if(!((i=v.getState().localesConfiguration)===null||i===void 0)&&i.uiLanguageSetsReaderLanguage){dr===null||dr===void 0||dr.stopReloadDebouncer();let r=await this.viewerStateManager.getRelativeDocumentUrlForLocale(e.detail.uiLocale);r?window.location.assign(r):window.location.reload()}}};Fo([(0,mu.property)()],mi.prototype,"documentId",void 0);Fo([Br({context:Na})],mi.prototype,"viewerStateManager",void 0);Fo([(0,Vi.reduxEventListener)({eventName:Ut.eventName})],mi.prototype,"onAuthenticationChange",null);Fo([(0,Vi.reduxEventListener)({store:v.name,eventName:Ti.eventName})],mi.prototype,"reactToUiLocaleChanged",null);var Vo=class extends We(ce){};var Bo=class extends We(Jt){};var Ho=class extends We(ei){};var zo=class extends We(Qt){};var is=c(h());var ft=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?yo:cr}constructor(e,i=!1){this.name=e,this.custom=i,this.properties=new Proxy({},{get:(r,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(r,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(r,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(r,n)=>()=>n}),this.attributes=new Proxy({},{get:(r,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var _r=c(h());var gu=c($());var $a=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[i,r]=e.split(".");return{context:i,key:r,custom:i!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Er=new $a;var
|
|
301
|
+
`}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 Li(e))}connectedCallback(){super.connectedCallback(),this.addStore(v)}onAuthenticationChange(){this.viewerStateManager.reload()}async reactToUiLocaleChanged(e){var i;if(!((i=v.getState().localesConfiguration)===null||i===void 0)&&i.uiLanguageSetsReaderLanguage){dr===null||dr===void 0||dr.stopReloadDebouncer();let r=await this.viewerStateManager.getRelativeDocumentUrlForLocale(e.detail.uiLocale);r?window.location.assign(r):window.location.reload()}}};Fo([(0,mu.property)()],mi.prototype,"documentId",void 0);Fo([Br({context:Na})],mi.prototype,"viewerStateManager",void 0);Fo([(0,Vi.reduxEventListener)({eventName:Ut.eventName})],mi.prototype,"onAuthenticationChange",null);Fo([(0,Vi.reduxEventListener)({store:v.name,eventName:Ti.eventName})],mi.prototype,"reactToUiLocaleChanged",null);var Vo=class extends We(ce){};var Bo=class extends We(Jt){};var Ho=class extends We(ei){};var zo=class extends We(Qt){};var is=c(h());var ft=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?yo:cr}constructor(e,i=!1){this.name=e,this.custom=i,this.properties=new Proxy({},{get:(r,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(r,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(r,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(r,n)=>()=>n}),this.attributes=new Proxy({},{get:(r,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var _r=c(h());var gu=c($());var $a=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[i,r]=e.split(".");return{context:i,key:r,custom:i!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Er=new $a;var _m=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},dn=Symbol("i18nAttributes"),yu=Symbol("i18nListAttributes"),un=Symbol("i18nProperties"),jo=Symbol("i18nContexts"),cn=Symbol("i18nUnsubs"),ht=(0,_r.applyMixinOnce)(Symbol("withI18n"),function(t){var e,i;class r extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[i]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?yo:cr}i18n(o){let{context:s,key:a,message:l}=o,{custom:d,args:u,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,d);let f=u??(p?p(this):[]);return this.getI18nService(d).resolveMessage(s,a,...f)}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(Er.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 d;return((d=l?.context)===null||d===void 0?void 0:d.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,d=(u,p,f)=>f?.context&&f.key&&o(u,p,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...u})}:f;(s=this[dn])===null||s===void 0||s.forEach((u,p)=>l[p]=d(u,p,l[p])),(a=this[yu])===null||a===void 0||a.forEach((u,p)=>{var f;return l[p]=(f=l[p])===null||f===void 0?void 0:f.map(y=>d(u,p,y))})}updateI18nProperties(o){var s;(s=this[un])===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[jo].set(l,{isCustomContext:a}),this[cn].has(l)||this[cn].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[jo].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[jo].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[cn].forEach(o=>o()),this[cn].clear()}}return e=jo,i=cn,_m([(0,gu.property)({type:Boolean})],r.prototype,"useCustomMessageContexts",void 0),r}),Wo=class extends ht(_r.FtLitElement){},Ko=class extends ht(_r.FtLitElementRedux){};var Go=(t,e)=>(i,r)=>{var n,o;i.constructor.createProperty(r,e??{attribute:!1,type:String});let s={...t,key:(n=t.key)!==null&&n!==void 0?n:r};i[un]=(o=i[un])!==null&&o!==void 0?o:new Map,i[un].set(r,s)};var vu=c(x());var bu=vu.css`
|
|
302
302
|
`;var qo=c(x()),Yo=c($()),Zo=c(h());var pn=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},At=class extends Ko{constructor(){super(),this.editorMode=!1,this.addStore(v)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":qo.nothing:qo.html`
|
|
303
303
|
<span class="ft-i18n">
|
|
304
304
|
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
305
305
|
</span>
|
|
306
|
-
`}update(e){var i;super.update(e),["context","key","defaultMessage"].some(r=>e.has(r))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(i=this.defaultMessage)!==null&&i!==void 0?i:""})}};At.elementDefinitions={};At.styles=bu;pn([(0,Zo.redux)()],At.prototype,"editorMode",void 0);pn([(0,Yo.property)()],At.prototype,"context",void 0);pn([(0,Yo.property)()],At.prototype,"key",void 0);pn([(0,Zo.jsonProperty)([])],At.prototype,"args",void 0);pn([(0,Yo.property)()],At.prototype,"defaultMessage",void 0);var Su=c(h());var xu={"ft-i18n":At};(0,Su.customElements)(xu);var ve=c(h()),wu={itemsGap:ve.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:ve.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:ve.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",ve.designSystemVariables.colorOutline),itemBorderRadius:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",ve.designSystemVariables.borderRadiusS),itemBackgroundColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",ve.designSystemVariables.colorSurface),itemTextColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",ve.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",ve.designSystemVariables.colorPrimary),itemHoverTextColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",ve.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:ve.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:ve.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var ts=c(h());var Jo=c(h()),Au=c($());var Xo;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(Xo||(Xo={}));var Eu;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Eu||(Eu={}));var
|
|
306
|
+
`}update(e){var i;super.update(e),["context","key","defaultMessage"].some(r=>e.has(r))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(i=this.defaultMessage)!==null&&i!==void 0?i:""})}};At.elementDefinitions={};At.styles=bu;pn([(0,Zo.redux)()],At.prototype,"editorMode",void 0);pn([(0,Yo.property)()],At.prototype,"context",void 0);pn([(0,Yo.property)()],At.prototype,"key",void 0);pn([(0,Zo.jsonProperty)([])],At.prototype,"args",void 0);pn([(0,Yo.property)()],At.prototype,"defaultMessage",void 0);var Su=c(h());var xu={"ft-i18n":At};(0,Su.customElements)(xu);var ve=c(h()),wu={itemsGap:ve.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:ve.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:ve.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",ve.designSystemVariables.colorOutline),itemBorderRadius:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",ve.designSystemVariables.borderRadiusS),itemBackgroundColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",ve.designSystemVariables.colorSurface),itemTextColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",ve.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",ve.designSystemVariables.colorPrimary),itemHoverTextColor:ve.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",ve.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:ve.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:ve.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var ts=c(h());var Jo=c(h()),Au=c($());var Xo;(function(t){t.clusteringHelperCreated="clustering-helper-created",t.mapAttachmentsUpdate="map-attachments-update",t.visibleTopicChange="visible-topic-change",t.requestedTopicNotFound="requested-topic-not-found"})(Xo||(Xo={}));var Eu;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Eu||(Eu={}));var Am=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Fa=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Ua=Symbol("registerInterval"),Va=(0,Jo.applyMixinOnce)(Symbol("toFtReaderComponent"),function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[Ua]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ua]):this.dispatchEvent(new Fa)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ua,Am([(0,Au.state)()],i.prototype,"stateManager",void 0),i}),_u=class extends Va(Jo.FtLitElementRedux){};var Ba=ft.build("designedReaderAttachments"),Cu={download:"Download \u201C{0}\u201D"};var Bi=c(x()),Ar=c($()),Cr=c(h()),Fu=c(pr());var Vu=c(it());var Pu=c(x()),Oe=c($()),Nu=c(it()),fn=c(h());var Iu=c(x()),ge=c(h()),Ru=ge.FtCssVariableFactory.extend("--ft-ripple-color","",ge.designSystemVariables.colorContent),G={color:Ru,backgroundColor:ge.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ru),opacityContentOnSurfacePressed:ge.FtCssVariableFactory.external(ge.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ge.FtCssVariableFactory.external(ge.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ge.FtCssVariableFactory.external(ge.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ge.FtCssVariableFactory.external(ge.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ge.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ou=ge.FtCssVariableFactory.extend("--ft-ripple-color","",ge.designSystemVariables.colorPrimary),ku={color:Ou,backgroundColor:ge.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ou)},Lu=ge.FtCssVariableFactory.extend("--ft-ripple-color","",ge.designSystemVariables.colorSecondary),Du={color:Lu,backgroundColor:ge.FtCssVariableFactory.extend("--ft-ripple-background-color","",Lu)},Mu=Iu.css`
|
|
307
307
|
:host {
|
|
308
308
|
display: contents;
|
|
309
309
|
}
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
<div class="ft-ripple--background"></div>
|
|
427
427
|
<div class="ft-ripple--effect"></div>
|
|
428
428
|
</div>
|
|
429
|
-
`}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 i,r;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(i=this.target)===null||i===void 0||i.removeAttribute("data-is-ft-ripple-target")):(r=this.target)===null||r===void 0||r.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,i;let r=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;r&&this.setupFor((i=this.target)!==null&&i!==void 0?i:r)}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 i=(...a)=>l=>{a.forEach(d=>window.addEventListener(d,this.endPress,{once:!0})),this.startPress(l)},r=i("mouseup","contextmenu"),n=i("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&i("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",r,s),e.addEventListener("touchstart",n,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",r,s),e.removeEventListener("touchstart",n,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 i=e,r=e,n,o;return i.x!=null?{x:n,y:o}=i:r.touches!=null&&(n=r.touches[0].clientX,o=r.touches[0].clientY),{x:n,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 i of e.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};M.elementDefinitions={};M.styles=Mu;Ke([(0,Oe.property)({type:Boolean})],M.prototype,"primary",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"secondary",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"unbounded",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"activated",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"selected",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"disabled",void 0);Ke([(0,Oe.state)()],M.prototype,"hovered",void 0);Ke([(0,Oe.state)()],M.prototype,"focused",void 0);Ke([(0,Oe.state)()],M.prototype,"pressed",void 0);Ke([(0,Oe.state)()],M.prototype,"rippling",void 0);Ke([(0,Oe.state)()],M.prototype,"originX",void 0);Ke([(0,Oe.state)()],M.prototype,"originY",void 0);Ke([(0,Oe.query)(".ft-ripple")],M.prototype,"ripple",void 0);Ke([(0,Oe.query)(".ft-ripple--effect")],M.prototype,"rippleEffect",void 0);var Uu=c(h());var $u={"ft-ripple":M};(0,Uu.customElements)($u);var Qo=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},
|
|
429
|
+
`}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 i,r;super.update(e),e.has("disabled")&&(this.disabled?(this.endRipple(),(i=this.target)===null||i===void 0||i.removeAttribute("data-is-ft-ripple-target")):(r=this.target)===null||r===void 0||r.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,i;let r=(e=this.shadowRoot)===null||e===void 0?void 0:e.host.parentElement;r&&this.setupFor((i=this.target)!==null&&i!==void 0?i:r)}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 i=(...a)=>l=>{a.forEach(d=>window.addEventListener(d,this.endPress,{once:!0})),this.startPress(l)},r=i("mouseup","contextmenu"),n=i("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&i("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",r,s),e.addEventListener("touchstart",n,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",r,s),e.removeEventListener("touchstart",n,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 i=e,r=e,n,o;return i.x!=null?{x:n,y:o}=i:r.touches!=null&&(n=r.touches[0].clientX,o=r.touches[0].clientY),{x:n,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 i of e.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};M.elementDefinitions={};M.styles=Mu;Ke([(0,Oe.property)({type:Boolean})],M.prototype,"primary",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"secondary",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"unbounded",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"activated",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"selected",void 0);Ke([(0,Oe.property)({type:Boolean})],M.prototype,"disabled",void 0);Ke([(0,Oe.state)()],M.prototype,"hovered",void 0);Ke([(0,Oe.state)()],M.prototype,"focused",void 0);Ke([(0,Oe.state)()],M.prototype,"pressed",void 0);Ke([(0,Oe.state)()],M.prototype,"rippling",void 0);Ke([(0,Oe.state)()],M.prototype,"originX",void 0);Ke([(0,Oe.state)()],M.prototype,"originY",void 0);Ke([(0,Oe.query)(".ft-ripple")],M.prototype,"ripple",void 0);Ke([(0,Oe.query)(".ft-ripple--effect")],M.prototype,"rippleEffect",void 0);var Uu=c(h());var $u={"ft-ripple":M};(0,Uu.customElements)($u);var Qo=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Cm={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},Ct=class extends(0,Cr.withAnalytics)(Cr.FtLitElementRedux,Cm){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 Bi.html`
|
|
430
430
|
<div part="container" class="${(0,Vu.classMap)(e)}">
|
|
431
431
|
${(0,Fu.repeat)(this.attachments,i=>i.id,i=>{var r;let n=Do(i.mimeType,(0,Cr.last)(i.file.split(".")));return Bi.html`
|
|
432
432
|
<div part="attachment">
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
position: relative;
|
|
552
552
|
word-break: break-word;
|
|
553
553
|
}
|
|
554
|
-
`;var Xu=["top","right","bottom","left"],Zu=["start","end"],za=Xu.reduce((t,e)=>t.concat(e,e+"-"+Zu[0],e+"-"+Zu[1]),[]),gn=Math.min,yi=Math.max,yn=Math.round;var Vt=t=>({x:t,y:t}),Cm={left:"right",right:"left",bottom:"top",top:"bottom"};function Ju(t,e,i){return yi(t,gn(e,i))}function os(t,e){return typeof t=="function"?t(e):t}function vn(t){return t.split("-")[0]}function vi(t){return t.split("-")[1]}function ja(t){return t==="x"?"y":"x"}function Wa(t){return t==="y"?"height":"width"}function ss(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ka(t){return ja(ss(t))}function Qu(t,e,i){i===void 0&&(i=!1);let r=vi(t),n=Ka(t),o=Wa(n),s=n==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Ha(s)),[s,Ha(s)]}function ep(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Ha(t){let e=vn(t);return Cm[e]+t.slice(e.length)}function Tm(t){var e,i,r,n;return{top:(e=t.top)!=null?e:0,right:(i=t.right)!=null?i:0,bottom:(r=t.bottom)!=null?r:0,left:(n=t.left)!=null?n:0}}function tp(t){return typeof t!="number"?Tm(t):{top:t,right:t,bottom:t,left:t}}function ji(t){let{x:e,y:i,width:r,height:n}=t;return{width:r,height:n,top:i,left:e,right:e+r,bottom:i+n,x:e,y:i}}function ip(t,e,i){let{reference:r,floating:n}=t,o=ss(e),s=Ka(e),a=Wa(s),l=vn(e),d=o==="y",u=r.x+r.width/2-n.width/2,p=r.y+r.height/2-n.height/2,f=r[a]/2-n[a]/2,y;switch(l){case"top":y={x:u,y:r.y-n.height};break;case"bottom":y={x:u,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-n.width,y:p};break;default:y={x:r.x,y:r.y}}let S=vi(e);return S&&(y[s]+=f*(S==="end"?1:-1)*(i&&d?-1:1)),y}async function rp(t,e){var i;e===void 0&&(e={});let{x:r,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:y=0}=os(e,t),S=tp(y),b=a[f?p==="floating"?"reference":"floating":p],R=ji(await o.getClippingRect({element:(i=await(o.isElement==null?void 0:o.isElement(b)))==null||i?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),V=p==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(w))&&await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1},N=ji(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:V,offsetParent:w,strategy:l}):V);return{top:(R.top-N.top+S.top)/k.y,bottom:(N.bottom-R.bottom+S.bottom)/k.y,left:(R.left-N.left+S.left)/k.x,right:(N.right-R.right+S.right)/k.x}}var Rm=50,np=async(t,e,i)=>{let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:s}=i,a=s.detectOverflow?s:{...s,detectOverflow:rp},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:p}=ip(d,r,l),f=r,y=0,S={};for(let T=0;T<o.length;T++){let b=o[T];if(!b)continue;let{name:R,fn:V}=b,{x:w,y:k,data:N,reset:ae}=await V({x:u,y:p,initialPlacement:r,placement:f,strategy:n,middlewareData:S,rects:d,platform:a,elements:{reference:t,floating:e}});u=w??u,p=k??p,S[R]={...S[R],...N},ae&&y<Rm&&(y++,typeof ae=="object"&&(ae.placement&&(f=ae.placement),ae.rects&&(d=ae.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):ae.rects),{x:u,y:p}=ip(d,f,l)),T=-1)}return{x:u,y:p,placement:f,strategy:n,middlewareData:S}};function Om(t,e,i){return(t?[...i.filter(n=>vi(n)===t),...i.filter(n=>vi(n)!==t)]:i.filter(n=>vn(n)===n)).filter(n=>t?vi(n)===t||(e?ep(n)!==n:!1):!0)}var op=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,r,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:d}=e,{crossAxis:u=!1,alignment:p,allowedPlacements:f=za,autoAlignment:y=!0,...S}=os(t,e),T=p!==void 0||f===za?Om(p||null,y,f):f,b=((i=s.autoPlacement)==null?void 0:i.index)||0,R=T[b];if(R==null)return{};if(a!==R)return{reset:{placement:T[0]}};let V=await l.detectOverflow(e,S),w=Qu(R,o,await(l.isRTL==null?void 0:l.isRTL(d.floating))),k=[V[vn(R)],V[w[0]],V[w[1]]],N=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:R,overflows:k}],ae=T[b+1];if(ae)return{data:{index:b+1,overflows:N},reset:{placement:ae}};let q=N.map(at=>{let Ei=vi(at.placement);return[at.placement,Ei&&u?at.overflows.slice(0,2).reduce((Qf,eh)=>Qf+eh,0):at.overflows[0],at.overflows]}).sort((at,Ei)=>at[1]-Ei[1]),Fr=((n=q.filter(at=>at[2].slice(0,vi(at[0])?2:3).every(Ei=>Ei<=0))[0])==null?void 0:n[0])||q[0][0];return Fr!==a?{data:{index:b+1,overflows:N},reset:{placement:Fr}}:{}}}};var sp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:i,y:r,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:V=>{let{x:w,y:k}=V;return{x:w,y:k}}},...d}=os(t,e),u={x:i,y:r},p=await o.detectOverflow(e,d),f=ss(n),y=ja(f),S=u[y],T=u[f],b=(V,w)=>Ju(w+p[V==="y"?"top":"left"],w,w-p[V==="y"?"bottom":"right"]);s&&(S=b(y,S)),a&&(T=b(f,T));let R=l.fn({...e,[y]:S,[f]:T});return{...R,data:{x:R.x-i,y:R.y-r,enabled:{[y]:s,[f]:a}}}}}};function ls(){return typeof window<"u"}function Ki(t){return lp(t)?(t.nodeName||"").toLowerCase():"#document"}function Ge(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ti(t){var e;return(e=(lp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lp(t){return ls()?t instanceof Node||t instanceof Ge(t).Node:!1}function Tt(t){return ls()?t instanceof Element||t instanceof Ge(t).Element:!1}function ii(t){return ls()?t instanceof HTMLElement||t instanceof Ge(t).HTMLElement:!1}function ap(t){return!ls()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ge(t).ShadowRoot}function bn(t){let{overflow:e,overflowX:i,overflowY:r,display:n}=Rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+i)&&n!=="inline"&&n!=="contents"}function cp(t){return/^(table|td|th)$/.test(Ki(t))}function xn(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var km=/transform|translate|scale|rotate|perspective|filter/,Lm=/paint|layout|strict|content/,Wi=t=>!!t&&t!=="none",Ga;function Rr(t){let e=Tt(t)?Rt(t):t;return Wi(e.transform)||Wi(e.translate)||Wi(e.scale)||Wi(e.rotate)||Wi(e.perspective)||!cs()&&(Wi(e.backdropFilter)||Wi(e.filter))||km.test(e.willChange||"")||Lm.test(e.contain||"")}function dp(t){let e=bi(t);for(;ii(e)&&!Or(e);){if(Rr(e))return e;if(xn(e))return null;e=bi(e)}return null}function cs(){return Ga==null&&(Ga=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ga}function Or(t){return/^(html|body|#document)$/.test(Ki(t))}function Rt(t){return Ge(t).getComputedStyle(t)}function Sn(t){return Tt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function bi(t){if(Ki(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ap(t)&&t.host||ti(t);return ap(e)?e.host:e}function up(t){let e=bi(t);return Or(e)?(t.ownerDocument||t).body:ii(e)&&bn(e)?e:up(e)}function as(t,e,i){var r;e===void 0&&(e=[]),i===void 0&&(i=!0);let n=up(t),o=n===((r=t.ownerDocument)==null?void 0:r.body),s=Ge(n);if(o){let a=ds(s);return e.concat(s,s.visualViewport||[],bn(n)?n:[],a&&i?as(a):[])}else return e.concat(n,as(n,[],i))}function ds(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function hp(t){let e=Rt(t),i=parseFloat(e.width)||0,r=parseFloat(e.height)||0,n=ii(t),o=n?t.offsetWidth:i,s=n?t.offsetHeight:r,a=yn(i)!==o||yn(r)!==s;return a&&(i=o,r=s),{width:i,height:r,$:a}}function mp(t){return Tt(t)?t:t.contextElement}function kr(t){let e=mp(t);if(!ii(e))return Vt(1);let i=e.getBoundingClientRect(),{width:r,height:n,$:o}=hp(e),s=(o?yn(i.width):i.width)/r,a=(o?yn(i.height):i.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Dm=Vt(0);function gp(t){let e=Ge(t);return!cs()||!e.visualViewport?Dm:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Im(t,e,i){return e===void 0&&(e=!1),!!i&&e&&i===Ge(t)}function wn(t,e,i,r){e===void 0&&(e=!1),i===void 0&&(i=!1);let n=t.getBoundingClientRect(),o=mp(t),s=Vt(1);e&&(r?Tt(r)&&(s=kr(r)):s=kr(t));let a=Im(o,i,r)?gp(o):Vt(0),l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&r){let f=Ge(o),y=Tt(r)?Ge(r):r,S=f,T=ds(S);for(;T&&y!==S;){let b=kr(T),R=T.getBoundingClientRect(),V=Rt(T),w=R.left+(T.clientLeft+parseFloat(V.paddingLeft))*b.x,k=R.top+(T.clientTop+parseFloat(V.paddingTop))*b.y;l*=b.x,d*=b.y,u*=b.x,p*=b.y,l+=w,d+=k,S=Ge(T),T=ds(S)}}return ji({width:u,height:p,x:l,y:d})}function us(t,e){let i=Sn(t).scrollLeft;return e?e.left+i:wn(ti(t)).left+i}function yp(t,e){let i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-us(t,i),n=i.top+e.scrollTop;return{x:r,y:n}}function Mm(t){let{elements:e,rect:i,offsetParent:r,strategy:n}=t,o=n==="fixed",s=ti(r),a=e?xn(e.floating):!1;if(r===s||a&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Vt(1),u=Vt(0),p=ii(r);if((p||!o)&&((Ki(r)!=="body"||bn(s))&&(l=Sn(r)),p)){let y=wn(r);d=kr(r),u.x=y.x+r.clientLeft,u.y=y.y+r.clientTop}let f=s&&!p&&!o?yp(s,l):Vt(0);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:i.y*d.y-l.scrollTop*d.y+u.y+f.y}}function Pm(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Nm(t){let e=Sn(t),i=t.ownerDocument.body,r=yi(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),n=yi(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),o=-e.scrollLeft+us(t),s=-e.scrollTop;return Rt(i).direction==="rtl"&&(o+=yi(t.clientWidth,i.clientWidth)-r),{width:r,height:n,x:o,y:s}}var $m=25;function Um(t,e,i){i===void 0&&(i="viewport");let r=i==="layoutViewport",n=Ge(t),o=ti(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,d=0,u=0;if(s){let f=!cs()||e==="fixed";r?f||(d=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,f&&(d=s.offsetLeft,u=s.offsetTop))}if(us(o)<=0){let f=o.ownerDocument,y=f.body,S=getComputedStyle(y),T=f.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,b=Math.abs(o.clientWidth-y.clientWidth-T),R=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;R<=$m&&(a-=R)}return{width:a,height:l,x:d,y:u}}function Fm(t,e){let i=wn(t,!0,e==="fixed"),r=i.top+t.clientTop,n=i.left+t.clientLeft,o=kr(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,d=r*o.y;return{width:s,height:a,x:l,y:d}}function pp(t,e,i){let r;if(e==="viewport"||e==="layoutViewport")r=Um(t,i,e);else if(e==="document")r=Nm(ti(t));else if(Tt(e))r=Fm(e,i);else{let n=gp(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return ji(r)}function Vm(t,e){let i=e.get(t);if(i)return i;let r=as(t,[],!1).filter(a=>Tt(a)&&Ki(a)!=="body"),n=null,o=Rt(t).position==="fixed",s=o?bi(t):t;for(;Tt(s)&&!Or(s);){let a=Rt(s),l=Rr(s),d=n?n.position:o?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?r=r.filter(p=>p!==s):n=a,s=bi(s)}return e.set(t,r),r}function Bm(t){let{element:e,boundary:i,rootBoundary:r,strategy:n}=t,s=[...i==="clippingAncestors"?xn(e)?[]:Vm(e,this._c):[].concat(i),r],a=pp(e,s[0],n),l=a.top,d=a.right,u=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let y=pp(e,s[f],n);l=yi(y.top,l),d=gn(y.right,d),u=gn(y.bottom,u),p=yi(y.left,p)}return{width:d-p,height:u-l,x:p,y:l}}function Hm(t){let{width:e,height:i}=hp(t);return{width:e,height:i}}function zm(t,e,i){let r=ii(e),n=ti(e),o=i==="fixed",s=wn(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Vt(0);if((r||!o)&&((Ki(e)!=="body"||bn(n))&&(a=Sn(e)),r)){let f=wn(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}!r&&n&&(l.x=us(n));let d=n&&!r&&!o?yp(n,a):Vt(0),u=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:u,y:p,width:s.width,height:s.height}}function qa(t){return Rt(t).position==="static"}function fp(t,e){if(!ii(t)||Rt(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return ti(t)===i&&(i=i.ownerDocument.body),i}function vp(t,e){let i=Ge(t);if(xn(t))return i;if(!ii(t)){let n=bi(t);for(;n&&!Or(n);){if(Tt(n)&&!qa(n))return n;n=bi(n)}return i}let r=fp(t,e);for(;r&&cp(r)&&qa(r);)r=fp(r,e);return r&&Or(r)&&qa(r)&&!Rr(r)?i:r||dp(t)||i}var jm=async function(t){let e=this.getOffsetParent||vp,i=this.getDimensions,r=await i(t.floating);return{reference:zm(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wm(t){return Rt(t).direction==="rtl"}var ps={convertOffsetParentRelativeRectToViewportRelativeRect:Mm,getDocumentElement:ti,getClippingRect:Bm,getOffsetParent:vp,getElementRects:jm,getClientRects:Pm,getDimensions:Hm,getScale:kr,isElement:Tt,isRTL:Wm};var bp=op,xp=sp;var Sp=(t,e,i)=>{let r=new Map,n=i??{},o={...ps,...n.platform,_c:r};return np(t,e,{...n,platform:o})};function wp(t){return Km(t)}function Ya(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Km(t){for(let e=t;e;e=Ya(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ya(t);e;e=Ya(e)){if(!(e instanceof Element))continue;let i=getComputedStyle(e);if(i.display!=="contents"&&(i.position!=="static"||Rr(i)||e.tagName==="BODY"))return e}return null}async function fs(t,e,i){let r;return typeof i=="object"?r=i:r={placement:i},Sp(t,e,{strategy:r.strategy,platform:{...ps,getOffsetParent:n=>ps.getOffsetParent(n,wp)},middleware:[xp({crossAxis:!0}),bp({allowedPlacements:[r.placement]})]})}var Ep=c(h());var Za=class{fromAttribute(e){if(!e)return[];try{let i=JSON.parse(e);return Array.isArray(i)?i.map(r=>typeof r=="string"?Er.fromAttribute(r):r):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Gm=new Za;var _p=(t,e)=>(i,r)=>{var n;i.constructor.createProperty(r,{type:Object,hasChanged:Ep.hasChanged,converter:Er,...e}),i[dn]=(n=i[dn])!==null&&n!==void 0?n:new Map,i[dn].set(r,t??{})};var Ot=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},re=class extends Wo{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 mt.Debouncer,this.revealDebouncer=new mt.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",i=>{i.composedPath().includes(this.container)||this.onOut(i)},{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,i;return Ap.html`
|
|
554
|
+
`;var Xu=["top","right","bottom","left"],Zu=["start","end"],za=Xu.reduce((t,e)=>t.concat(e,e+"-"+Zu[0],e+"-"+Zu[1]),[]),gn=Math.min,yi=Math.max,yn=Math.round;var Vt=t=>({x:t,y:t}),Tm={left:"right",right:"left",bottom:"top",top:"bottom"};function Ju(t,e,i){return yi(t,gn(e,i))}function os(t,e){return typeof t=="function"?t(e):t}function vn(t){return t.split("-")[0]}function vi(t){return t.split("-")[1]}function ja(t){return t==="x"?"y":"x"}function Wa(t){return t==="y"?"height":"width"}function ss(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ka(t){return ja(ss(t))}function Qu(t,e,i){i===void 0&&(i=!1);let r=vi(t),n=Ka(t),o=Wa(n),s=n==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Ha(s)),[s,Ha(s)]}function ep(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Ha(t){let e=vn(t);return Tm[e]+t.slice(e.length)}function Rm(t){var e,i,r,n;return{top:(e=t.top)!=null?e:0,right:(i=t.right)!=null?i:0,bottom:(r=t.bottom)!=null?r:0,left:(n=t.left)!=null?n:0}}function tp(t){return typeof t!="number"?Rm(t):{top:t,right:t,bottom:t,left:t}}function ji(t){let{x:e,y:i,width:r,height:n}=t;return{width:r,height:n,top:i,left:e,right:e+r,bottom:i+n,x:e,y:i}}function ip(t,e,i){let{reference:r,floating:n}=t,o=ss(e),s=Ka(e),a=Wa(s),l=vn(e),d=o==="y",u=r.x+r.width/2-n.width/2,p=r.y+r.height/2-n.height/2,f=r[a]/2-n[a]/2,y;switch(l){case"top":y={x:u,y:r.y-n.height};break;case"bottom":y={x:u,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-n.width,y:p};break;default:y={x:r.x,y:r.y}}let S=vi(e);return S&&(y[s]+=f*(S==="end"?1:-1)*(i&&d?-1:1)),y}async function rp(t,e){var i;e===void 0&&(e={});let{x:r,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:y=0}=os(e,t),S=tp(y),b=a[f?p==="floating"?"reference":"floating":p],R=ji(await o.getClippingRect({element:(i=await(o.isElement==null?void 0:o.isElement(b)))==null||i?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),V=p==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(w))&&await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1},N=ji(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:V,offsetParent:w,strategy:l}):V);return{top:(R.top-N.top+S.top)/k.y,bottom:(N.bottom-R.bottom+S.bottom)/k.y,left:(R.left-N.left+S.left)/k.x,right:(N.right-R.right+S.right)/k.x}}var Om=50,np=async(t,e,i)=>{let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:s}=i,a=s.detectOverflow?s:{...s,detectOverflow:rp},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:p}=ip(d,r,l),f=r,y=0,S={};for(let T=0;T<o.length;T++){let b=o[T];if(!b)continue;let{name:R,fn:V}=b,{x:w,y:k,data:N,reset:ae}=await V({x:u,y:p,initialPlacement:r,placement:f,strategy:n,middlewareData:S,rects:d,platform:a,elements:{reference:t,floating:e}});u=w??u,p=k??p,S[R]={...S[R],...N},ae&&y<Om&&(y++,typeof ae=="object"&&(ae.placement&&(f=ae.placement),ae.rects&&(d=ae.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):ae.rects),{x:u,y:p}=ip(d,f,l)),T=-1)}return{x:u,y:p,placement:f,strategy:n,middlewareData:S}};function km(t,e,i){return(t?[...i.filter(n=>vi(n)===t),...i.filter(n=>vi(n)!==t)]:i.filter(n=>vn(n)===n)).filter(n=>t?vi(n)===t||(e?ep(n)!==n:!1):!0)}var op=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,r,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:d}=e,{crossAxis:u=!1,alignment:p,allowedPlacements:f=za,autoAlignment:y=!0,...S}=os(t,e),T=p!==void 0||f===za?km(p||null,y,f):f,b=((i=s.autoPlacement)==null?void 0:i.index)||0,R=T[b];if(R==null)return{};if(a!==R)return{reset:{placement:T[0]}};let V=await l.detectOverflow(e,S),w=Qu(R,o,await(l.isRTL==null?void 0:l.isRTL(d.floating))),k=[V[vn(R)],V[w[0]],V[w[1]]],N=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:R,overflows:k}],ae=T[b+1];if(ae)return{data:{index:b+1,overflows:N},reset:{placement:ae}};let q=N.map(at=>{let Ei=vi(at.placement);return[at.placement,Ei&&u?at.overflows.slice(0,2).reduce((Qf,eh)=>Qf+eh,0):at.overflows[0],at.overflows]}).sort((at,Ei)=>at[1]-Ei[1]),Fr=((n=q.filter(at=>at[2].slice(0,vi(at[0])?2:3).every(Ei=>Ei<=0))[0])==null?void 0:n[0])||q[0][0];return Fr!==a?{data:{index:b+1,overflows:N},reset:{placement:Fr}}:{}}}};var sp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:i,y:r,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:V=>{let{x:w,y:k}=V;return{x:w,y:k}}},...d}=os(t,e),u={x:i,y:r},p=await o.detectOverflow(e,d),f=ss(n),y=ja(f),S=u[y],T=u[f],b=(V,w)=>Ju(w+p[V==="y"?"top":"left"],w,w-p[V==="y"?"bottom":"right"]);s&&(S=b(y,S)),a&&(T=b(f,T));let R=l.fn({...e,[y]:S,[f]:T});return{...R,data:{x:R.x-i,y:R.y-r,enabled:{[y]:s,[f]:a}}}}}};function ls(){return typeof window<"u"}function Ki(t){return lp(t)?(t.nodeName||"").toLowerCase():"#document"}function Ge(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ti(t){var e;return(e=(lp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lp(t){return ls()?t instanceof Node||t instanceof Ge(t).Node:!1}function Tt(t){return ls()?t instanceof Element||t instanceof Ge(t).Element:!1}function ii(t){return ls()?t instanceof HTMLElement||t instanceof Ge(t).HTMLElement:!1}function ap(t){return!ls()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ge(t).ShadowRoot}function bn(t){let{overflow:e,overflowX:i,overflowY:r,display:n}=Rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+i)&&n!=="inline"&&n!=="contents"}function cp(t){return/^(table|td|th)$/.test(Ki(t))}function xn(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Lm=/transform|translate|scale|rotate|perspective|filter/,Dm=/paint|layout|strict|content/,Wi=t=>!!t&&t!=="none",Ga;function Rr(t){let e=Tt(t)?Rt(t):t;return Wi(e.transform)||Wi(e.translate)||Wi(e.scale)||Wi(e.rotate)||Wi(e.perspective)||!cs()&&(Wi(e.backdropFilter)||Wi(e.filter))||Lm.test(e.willChange||"")||Dm.test(e.contain||"")}function dp(t){let e=bi(t);for(;ii(e)&&!Or(e);){if(Rr(e))return e;if(xn(e))return null;e=bi(e)}return null}function cs(){return Ga==null&&(Ga=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ga}function Or(t){return/^(html|body|#document)$/.test(Ki(t))}function Rt(t){return Ge(t).getComputedStyle(t)}function Sn(t){return Tt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function bi(t){if(Ki(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ap(t)&&t.host||ti(t);return ap(e)?e.host:e}function up(t){let e=bi(t);return Or(e)?(t.ownerDocument||t).body:ii(e)&&bn(e)?e:up(e)}function as(t,e,i){var r;e===void 0&&(e=[]),i===void 0&&(i=!0);let n=up(t),o=n===((r=t.ownerDocument)==null?void 0:r.body),s=Ge(n);if(o){let a=ds(s);return e.concat(s,s.visualViewport||[],bn(n)?n:[],a&&i?as(a):[])}else return e.concat(n,as(n,[],i))}function ds(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function hp(t){let e=Rt(t),i=parseFloat(e.width)||0,r=parseFloat(e.height)||0,n=ii(t),o=n?t.offsetWidth:i,s=n?t.offsetHeight:r,a=yn(i)!==o||yn(r)!==s;return a&&(i=o,r=s),{width:i,height:r,$:a}}function mp(t){return Tt(t)?t:t.contextElement}function kr(t){let e=mp(t);if(!ii(e))return Vt(1);let i=e.getBoundingClientRect(),{width:r,height:n,$:o}=hp(e),s=(o?yn(i.width):i.width)/r,a=(o?yn(i.height):i.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Im=Vt(0);function gp(t){let e=Ge(t);return!cs()||!e.visualViewport?Im:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Mm(t,e,i){return e===void 0&&(e=!1),!!i&&e&&i===Ge(t)}function wn(t,e,i,r){e===void 0&&(e=!1),i===void 0&&(i=!1);let n=t.getBoundingClientRect(),o=mp(t),s=Vt(1);e&&(r?Tt(r)&&(s=kr(r)):s=kr(t));let a=Mm(o,i,r)?gp(o):Vt(0),l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&r){let f=Ge(o),y=Tt(r)?Ge(r):r,S=f,T=ds(S);for(;T&&y!==S;){let b=kr(T),R=T.getBoundingClientRect(),V=Rt(T),w=R.left+(T.clientLeft+parseFloat(V.paddingLeft))*b.x,k=R.top+(T.clientTop+parseFloat(V.paddingTop))*b.y;l*=b.x,d*=b.y,u*=b.x,p*=b.y,l+=w,d+=k,S=Ge(T),T=ds(S)}}return ji({width:u,height:p,x:l,y:d})}function us(t,e){let i=Sn(t).scrollLeft;return e?e.left+i:wn(ti(t)).left+i}function yp(t,e){let i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-us(t,i),n=i.top+e.scrollTop;return{x:r,y:n}}function Pm(t){let{elements:e,rect:i,offsetParent:r,strategy:n}=t,o=n==="fixed",s=ti(r),a=e?xn(e.floating):!1;if(r===s||a&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Vt(1),u=Vt(0),p=ii(r);if((p||!o)&&((Ki(r)!=="body"||bn(s))&&(l=Sn(r)),p)){let y=wn(r);d=kr(r),u.x=y.x+r.clientLeft,u.y=y.y+r.clientTop}let f=s&&!p&&!o?yp(s,l):Vt(0);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:i.y*d.y-l.scrollTop*d.y+u.y+f.y}}function Nm(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function $m(t){let e=Sn(t),i=t.ownerDocument.body,r=yi(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),n=yi(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),o=-e.scrollLeft+us(t),s=-e.scrollTop;return Rt(i).direction==="rtl"&&(o+=yi(t.clientWidth,i.clientWidth)-r),{width:r,height:n,x:o,y:s}}var Um=25;function Fm(t,e,i){i===void 0&&(i="viewport");let r=i==="layoutViewport",n=Ge(t),o=ti(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,d=0,u=0;if(s){let f=!cs()||e==="fixed";r?f||(d=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,f&&(d=s.offsetLeft,u=s.offsetTop))}if(us(o)<=0){let f=o.ownerDocument,y=f.body,S=getComputedStyle(y),T=f.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,b=Math.abs(o.clientWidth-y.clientWidth-T),R=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;R<=Um&&(a-=R)}return{width:a,height:l,x:d,y:u}}function Vm(t,e){let i=wn(t,!0,e==="fixed"),r=i.top+t.clientTop,n=i.left+t.clientLeft,o=kr(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,d=r*o.y;return{width:s,height:a,x:l,y:d}}function pp(t,e,i){let r;if(e==="viewport"||e==="layoutViewport")r=Fm(t,i,e);else if(e==="document")r=$m(ti(t));else if(Tt(e))r=Vm(e,i);else{let n=gp(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return ji(r)}function Bm(t,e){let i=e.get(t);if(i)return i;let r=as(t,[],!1).filter(a=>Tt(a)&&Ki(a)!=="body"),n=null,o=Rt(t).position==="fixed",s=o?bi(t):t;for(;Tt(s)&&!Or(s);){let a=Rt(s),l=Rr(s),d=n?n.position:o?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?r=r.filter(p=>p!==s):n=a,s=bi(s)}return e.set(t,r),r}function Hm(t){let{element:e,boundary:i,rootBoundary:r,strategy:n}=t,s=[...i==="clippingAncestors"?xn(e)?[]:Bm(e,this._c):[].concat(i),r],a=pp(e,s[0],n),l=a.top,d=a.right,u=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let y=pp(e,s[f],n);l=yi(y.top,l),d=gn(y.right,d),u=gn(y.bottom,u),p=yi(y.left,p)}return{width:d-p,height:u-l,x:p,y:l}}function zm(t){let{width:e,height:i}=hp(t);return{width:e,height:i}}function jm(t,e,i){let r=ii(e),n=ti(e),o=i==="fixed",s=wn(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Vt(0);if((r||!o)&&((Ki(e)!=="body"||bn(n))&&(a=Sn(e)),r)){let f=wn(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}!r&&n&&(l.x=us(n));let d=n&&!r&&!o?yp(n,a):Vt(0),u=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:u,y:p,width:s.width,height:s.height}}function qa(t){return Rt(t).position==="static"}function fp(t,e){if(!ii(t)||Rt(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return ti(t)===i&&(i=i.ownerDocument.body),i}function vp(t,e){let i=Ge(t);if(xn(t))return i;if(!ii(t)){let n=bi(t);for(;n&&!Or(n);){if(Tt(n)&&!qa(n))return n;n=bi(n)}return i}let r=fp(t,e);for(;r&&cp(r)&&qa(r);)r=fp(r,e);return r&&Or(r)&&qa(r)&&!Rr(r)?i:r||dp(t)||i}var Wm=async function(t){let e=this.getOffsetParent||vp,i=this.getDimensions,r=await i(t.floating);return{reference:jm(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Km(t){return Rt(t).direction==="rtl"}var ps={convertOffsetParentRelativeRectToViewportRelativeRect:Pm,getDocumentElement:ti,getClippingRect:Hm,getOffsetParent:vp,getElementRects:Wm,getClientRects:Nm,getDimensions:zm,getScale:kr,isElement:Tt,isRTL:Km};var bp=op,xp=sp;var Sp=(t,e,i)=>{let r=new Map,n=i??{},o={...ps,...n.platform,_c:r};return np(t,e,{...n,platform:o})};function wp(t){return Gm(t)}function Ya(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Gm(t){for(let e=t;e;e=Ya(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ya(t);e;e=Ya(e)){if(!(e instanceof Element))continue;let i=getComputedStyle(e);if(i.display!=="contents"&&(i.position!=="static"||Rr(i)||e.tagName==="BODY"))return e}return null}async function fs(t,e,i){let r;return typeof i=="object"?r=i:r={placement:i},Sp(t,e,{strategy:r.strategy,platform:{...ps,getOffsetParent:n=>ps.getOffsetParent(n,wp)},middleware:[xp({crossAxis:!0}),bp({allowedPlacements:[r.placement]})]})}var Ep=c(h());var Za=class{fromAttribute(e){if(!e)return[];try{let i=JSON.parse(e);return Array.isArray(i)?i.map(r=>typeof r=="string"?Er.fromAttribute(r):r):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},qm=new Za;var _p=(t,e)=>(i,r)=>{var n;i.constructor.createProperty(r,{type:Object,hasChanged:Ep.hasChanged,converter:Er,...e}),i[dn]=(n=i[dn])!==null&&n!==void 0?n:new Map,i[dn].set(r,t??{})};var Ot=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},re=class extends Wo{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 mt.Debouncer,this.revealDebouncer=new mt.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",i=>{i.composedPath().includes(this.container)||this.onOut(i)},{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,i;return Ap.html`
|
|
555
555
|
<div part="container"
|
|
556
556
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
557
557
|
<slot part="slot"></slot>
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
<div></div>
|
|
643
643
|
<div></div>
|
|
644
644
|
</div>
|
|
645
|
-
`}};qi.styles=Op;var Ip=c(h());var Dp={"ft-loader":qi};(0,Ip.customElements)(Dp);var xi=c(x()),hs=c(it()),W=c($());var kt=t=>t??he;var Np=c(x()),O=c(h());var Mp=O.FtCssVariableFactory.extend("--ft-button-color","",O.designSystemVariables.colorPrimary),B={backgroundColor:O.FtCssVariableFactory.extend("--ft-button-background-color","",O.designSystemVariables.colorSurface),borderRadius:O.FtCssVariableFactory.extend("--ft-button-border-radius","",O.designSystemVariables.borderRadiusL),color:Mp,fontSize:O.FtCssVariableFactory.extend("--ft-button-font-size","",
|
|
645
|
+
`}};qi.styles=Op;var Ip=c(h());var Dp={"ft-loader":qi};(0,Ip.customElements)(Dp);var xi=c(x()),hs=c(it()),W=c($());var kt=t=>t??he;var Np=c(x()),O=c(h());var Mp=O.FtCssVariableFactory.extend("--ft-button-color","",O.designSystemVariables.colorPrimary),B={backgroundColor:O.FtCssVariableFactory.extend("--ft-button-background-color","",O.designSystemVariables.colorSurface),borderRadius:O.FtCssVariableFactory.extend("--ft-button-border-radius","",O.designSystemVariables.borderRadiusL),color:Mp,fontSize:O.FtCssVariableFactory.extend("--ft-button-font-size","",Fe.fontSize),iconSize:O.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:O.FtCssVariableFactory.extend("--ft-button-ripple-color","",Mp),verticalPadding:O.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:O.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:O.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:O.FtCssVariableFactory.external(O.designSystemVariables.colorOpacityDisabled,"Design system")},Pp=O.FtCssVariableFactory.extend("--ft-button-primary-color","",O.FtCssVariableFactory.extend("--ft-button-color","",O.designSystemVariables.colorOnPrimary)),Xa={backgroundColor:O.FtCssVariableFactory.extend("--ft-button-primary-background-color","",O.FtCssVariableFactory.extend("--ft-button-background-color","",O.designSystemVariables.colorPrimary)),color:Pp,rippleColor:O.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Pp)},Bt={borderRadius:O.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",O.FtCssVariableFactory.extend("--ft-button-border-radius","",O.designSystemVariables.borderRadiusM)),verticalPadding:O.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:O.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:O.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},$p=Np.css`
|
|
646
646
|
:host {
|
|
647
647
|
display: inline-block;
|
|
648
648
|
max-width: 100%;
|
|
@@ -744,8 +744,8 @@
|
|
|
744
744
|
text-overflow: ellipsis;
|
|
745
745
|
display: block;
|
|
746
746
|
margin: 0 ${B.iconPadding};
|
|
747
|
-
${(0,O.setVariable)(
|
|
748
|
-
${(0,O.setVariable)(
|
|
747
|
+
${(0,O.setVariable)(Fe.fontSize,"1em")};
|
|
748
|
+
${(0,O.setVariable)(Fe.lineHeight,"var(--button-internal-line-height)")};
|
|
749
749
|
}
|
|
750
750
|
|
|
751
751
|
.ft-button--dense .ft-button--label {
|
|
@@ -820,7 +820,7 @@
|
|
|
820
820
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
821
821
|
`:xi.html`
|
|
822
822
|
<slot part="icon" name="icon"></slot>
|
|
823
|
-
`}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,i){var r;return(r=this.tooltip)===null||r===void 0?void 0:r.showTemporaryText(e,i)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};L.elementDefinitions={"ft-ripple":M,"ft-tooltip":re,"ft-icon":z,"ft-loader":qi,"ft-typography":U};L.styles=[Ht.safariEllipsisFix,$p,Ht.noTextSelect];L.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let i=e.target.getRootNode();i.host?i.host.hasTextContent=e.boundingClientRect.width>0:L.labelsObserver.unobserve(e.target)}});Y([(0,W.property)({type:Boolean})],L.prototype,"primary",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"outlined",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"dense",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"round",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"disabled",void 0);Y([(0,W.property)()],L.prototype,"icon",void 0);Y([(0,W.property)()],L.prototype,"iconVariant",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"trailingIcon",void 0);Y([(0,W.property)()],L.prototype,"label",void 0);Y([(0,W.property)()],L.prototype,"type",void 0);Y([(0,W.property)()],L.prototype,"href",void 0);Y([(0,W.property)()],L.prototype,"target",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"loading",void 0);Y([(0,W.property)({attribute:"aria-label"})],L.prototype,"ariaLabel",void 0);Y([(0,W.property)()],L.prototype,"ariaHasPopup",void 0);Y([(0,W.property)({attribute:"aria-pressed"})],L.prototype,"ariaPressed",void 0);Y([(0,W.property)()],L.prototype,"tooltipPosition",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"hideTooltip",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"forceTooltip",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"activated",void 0);Y([(0,W.query)(".ft-button")],L.prototype,"button",void 0);Y([(0,W.query)(".ft-button--label")],L.prototype,"labelContainer",void 0);Y([(0,W.state)()],L.prototype,"hasTextContent",void 0);Y([(0,W.query)(".ft-button--label slot")],L.prototype,"slottedContent",void 0);Y([(0,W.query)("[part=tooltip]")],L.prototype,"tooltip",void 0);var Fp=c(h());var Up={"ft-button":L};(0,Fp.customElements)(Up);var ms=c(x()),zt=c($()),zp=c(it()),ri=c(h());var Lr=c(x()),qe=c($()),Dr=c(h());var Hp=c(it());var Vp=c(x()),
|
|
823
|
+
`}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,i){var r;return(r=this.tooltip)===null||r===void 0?void 0:r.showTemporaryText(e,i)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};L.elementDefinitions={"ft-ripple":M,"ft-tooltip":re,"ft-icon":z,"ft-loader":qi,"ft-typography":U};L.styles=[Ht.safariEllipsisFix,$p,Ht.noTextSelect];L.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let i=e.target.getRootNode();i.host?i.host.hasTextContent=e.boundingClientRect.width>0:L.labelsObserver.unobserve(e.target)}});Y([(0,W.property)({type:Boolean})],L.prototype,"primary",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"outlined",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"dense",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"round",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"disabled",void 0);Y([(0,W.property)()],L.prototype,"icon",void 0);Y([(0,W.property)()],L.prototype,"iconVariant",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"trailingIcon",void 0);Y([(0,W.property)()],L.prototype,"label",void 0);Y([(0,W.property)()],L.prototype,"type",void 0);Y([(0,W.property)()],L.prototype,"href",void 0);Y([(0,W.property)()],L.prototype,"target",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"loading",void 0);Y([(0,W.property)({attribute:"aria-label"})],L.prototype,"ariaLabel",void 0);Y([(0,W.property)()],L.prototype,"ariaHasPopup",void 0);Y([(0,W.property)({attribute:"aria-pressed"})],L.prototype,"ariaPressed",void 0);Y([(0,W.property)()],L.prototype,"tooltipPosition",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"hideTooltip",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"forceTooltip",void 0);Y([(0,W.property)({type:Boolean})],L.prototype,"activated",void 0);Y([(0,W.query)(".ft-button")],L.prototype,"button",void 0);Y([(0,W.query)(".ft-button--label")],L.prototype,"labelContainer",void 0);Y([(0,W.state)()],L.prototype,"hasTextContent",void 0);Y([(0,W.query)(".ft-button--label slot")],L.prototype,"slottedContent",void 0);Y([(0,W.query)("[part=tooltip]")],L.prototype,"tooltip",void 0);var Fp=c(h());var Up={"ft-button":L};(0,Fp.customElements)(Up);var ms=c(x()),zt=c($()),zp=c(it()),ri=c(h());var Lr=c(x()),qe=c($()),Dr=c(h());var Hp=c(it());var Vp=c(x()),Ve=c(h());var oe=c(h());var se={textColor:oe.FtCssVariableFactory.extend("--ft-switch-text-color","",oe.designSystemVariables.colorOnSurfaceHigh),backgroundColor:oe.FtCssVariableFactory.extend("--ft-switch-background-color","",oe.designSystemVariables.colorSurface),selectedTextColor:oe.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",oe.designSystemVariables.colorPrimary),selectedBackgroundColor:oe.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",oe.designSystemVariables.colorPrimary),borderColor:oe.FtCssVariableFactory.extend("--ft-switch-border-color","",oe.designSystemVariables.colorOutline),borderRadius:oe.FtCssVariableFactory.extend("--ft-switch-border-radius","",oe.designSystemVariables.borderRadiusL),fontSize:oe.FtCssVariableFactory.extend("--ft-switch-font-size","",Fe.fontSize),iconSize:oe.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:oe.FtCssVariableFactory.extend("--ft-switch-text-color","",oe.designSystemVariables.colorOnSurfaceMedium),rippleColor:oe.FtCssVariableFactory.extend("--ft-switch-ripple-color","",oe.designSystemVariables.colorPrimary),outlineColor:oe.FtCssVariableFactory.extend("--ft-switch-outline-color","",oe.designSystemVariables.colorPrimary)};var xe={borderRadiusLeft:Ve.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",Ve.designSystemVariables.borderRadiusL),borderRadiusRight:Ve.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",Ve.designSystemVariables.borderRadiusL),borderWidthLeft:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},Bp=Vp.css`
|
|
824
824
|
.ft-switch-option {
|
|
825
825
|
position: relative;
|
|
826
826
|
display: inline-block;
|
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
align-items: center;
|
|
846
846
|
justify-content: center;
|
|
847
847
|
overflow: hidden;
|
|
848
|
-
${(0,
|
|
848
|
+
${(0,Ve.setVariable)(me.size,se.iconSize)};
|
|
849
849
|
padding: var(--switch-internal-vertical-padding, 6px) var(--switch-internal-horizontal-padding, 8px);
|
|
850
850
|
background-color: ${se.backgroundColor};
|
|
851
851
|
-webkit-mask-image: radial-gradient(white, black);
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
inset: 0;
|
|
863
863
|
content: "";
|
|
864
864
|
z-index: 1;
|
|
865
|
-
opacity: ${
|
|
865
|
+
opacity: ${Ve.designSystemVariables.opacityPrimaryOnSurfaceSelected};
|
|
866
866
|
}
|
|
867
867
|
|
|
868
868
|
.ft-switch-option--label {
|
|
@@ -872,8 +872,8 @@
|
|
|
872
872
|
text-overflow: ellipsis;
|
|
873
873
|
display: block;
|
|
874
874
|
margin: 0 8px;
|
|
875
|
-
${(0,
|
|
876
|
-
${(0,
|
|
875
|
+
${(0,Ve.setVariable)(Fe.fontSize,se.fontSize)};
|
|
876
|
+
${(0,Ve.setVariable)(Fe.lineHeight,"var(--switch-option-internal-content-height)")}
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
.ft-switch-option--selected .ft-switch-option--label {
|
|
@@ -889,7 +889,7 @@
|
|
|
889
889
|
}
|
|
890
890
|
|
|
891
891
|
.ft-switch-option--ripple {
|
|
892
|
-
${(0,
|
|
892
|
+
${(0,Ve.setVariable)(G.color,se.rippleColor)};
|
|
893
893
|
}
|
|
894
894
|
|
|
895
895
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -932,14 +932,14 @@
|
|
|
932
932
|
</ft-tooltip>
|
|
933
933
|
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.onFocusout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this.onFocusout)}onFocusout(){this.isFocused=!1}onChange(){this.selected=this.unselectable?!this.selected:!0,this.dispatchEvent(new Ja(this.selected))}getLabel(){return this.label||this.getTextContent()}resolveIcon(){return this.icon?Lr.html`
|
|
934
934
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
935
|
-
`:Lr.nothing}getTextContent(){var e,i;return(i=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&i!==void 0?i:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};de.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-tooltip":re,"ft-icon":z};de.styles=[Dr.safariEllipsisFix,Bp];Lt([(0,qe.property)()],de.prototype,"value",void 0);Lt([(0,qe.property)()],de.prototype,"icon",void 0);Lt([(0,qe.property)()],de.prototype,"iconVariant",void 0);Lt([(0,qe.property)()],de.prototype,"label",void 0);Lt([(0,qe.property)()],de.prototype,"tooltipPosition",void 0);Lt([(0,qe.property)({type:Boolean,reflect:!0})],de.prototype,"selected",void 0);Lt([(0,qe.property)({type:Boolean})],de.prototype,"trailingIcon",void 0);Lt([(0,qe.property)({type:Boolean})],de.prototype,"unselectable",void 0);Lt([(0,qe.query)(".ft-switch-option--content slot")],de.prototype,"slottedContent",void 0);Lt([(0,qe.query)(".ft-switch-option--input")],de.prototype,"input",void 0);Lt([(0,qe.state)()],de.prototype,"isFocused",void 0);var Yi=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},el=class extends CustomEvent{constructor(e){super("change",{detail:e})}},
|
|
935
|
+
`:Lr.nothing}getTextContent(){var e,i;return(i=(e=this.slottedContent)===null||e===void 0?void 0:e.assignedNodes().map(r=>r.textContent).join("").trim())!==null&&i!==void 0?i:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};de.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-tooltip":re,"ft-icon":z};de.styles=[Dr.safariEllipsisFix,Bp];Lt([(0,qe.property)()],de.prototype,"value",void 0);Lt([(0,qe.property)()],de.prototype,"icon",void 0);Lt([(0,qe.property)()],de.prototype,"iconVariant",void 0);Lt([(0,qe.property)()],de.prototype,"label",void 0);Lt([(0,qe.property)()],de.prototype,"tooltipPosition",void 0);Lt([(0,qe.property)({type:Boolean,reflect:!0})],de.prototype,"selected",void 0);Lt([(0,qe.property)({type:Boolean})],de.prototype,"trailingIcon",void 0);Lt([(0,qe.property)({type:Boolean})],de.prototype,"unselectable",void 0);Lt([(0,qe.query)(".ft-switch-option--content slot")],de.prototype,"slottedContent",void 0);Lt([(0,qe.query)(".ft-switch-option--input")],de.prototype,"input",void 0);Lt([(0,qe.state)()],de.prototype,"isFocused",void 0);var Yi=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},el=class extends CustomEvent{constructor(e){super("change",{detail:e})}},Be=class extends ri.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.displayFocusWhenUsingKeyboard=!1,this.options=[]}get value(){var e;return(e=this.selectedOption)===null||e===void 0?void 0:e.value}update(e){super.update(e),e.has("selectedOption")&&this.updateOptions(),e.has("unselectable")&&this.options.forEach(i=>i.unselectable=this.unselectable)}render(){let e={"ft-switch":!0,"ft-switch--dense":this.dense};return ms.html`
|
|
936
936
|
<div @keydown=${this.onKeyDown} tabindex="-1" class="${(0,zp.classMap)(e)}" role="radiogroup" aria-label="${this.label}">
|
|
937
937
|
<slot @slotchange=${this.onSlotchange}
|
|
938
938
|
@option-change=${this.onOptionChangeByScript}
|
|
939
939
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
940
940
|
></slot>
|
|
941
941
|
</div>
|
|
942
|
-
`}onKeyDown(e){let i;(e.key=="ArrowDown"||e.key=="ArrowRight")&&(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(e.key=="ArrowUp"||e.key=="ArrowLeft")&&(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),e.key==" "&&(i=this.options.indexOf(e.target)),i!=null&&(e.preventDefault(),this.options[this.fixIndex(i)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(i)].selected=!0)}fixIndex(e){return e<0?this.options.length-1:e>this.options.length-1?0:e}onSlotchange(){var e;this.options=[],(e=this.slottedContent)===null||e===void 0||e.assignedElements().forEach(i=>{i instanceof de&&this.registerOption(i)}),this.selectedOption=this.options.find(i=>i.selected)}registerOption(e){var i;(i=e.shadowRoot)===null||i===void 0||i.querySelectorAll("input").forEach(r=>{r.setAttribute("tabindex","-1")}),e.setAttribute("tabindex","0"),e.unselectable=this.unselectable,this.options.push(e)}onOptionChangeByScript(e){e.stopPropagation();let i=e.target;this.onOptionChange(i)}onOptionChangeByUser(e){var i;e.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(e.target),this.dispatchEvent(new el((i=this.selectedOption)===null||i===void 0?void 0:i.value))}onOptionChange(e){e.selected?this.selectedOption=e:this.selectedOption=this.options.find(i=>i.selected)}private(e){e.selected?this.selectedOption=e:this.selectedOption=this.options.find(i=>i.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(e=>{e.selected=e===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(e.isFocused=e===this.selectedOption)})}};
|
|
942
|
+
`}onKeyDown(e){let i;(e.key=="ArrowDown"||e.key=="ArrowRight")&&(i=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(e.key=="ArrowUp"||e.key=="ArrowLeft")&&(i=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),e.key==" "&&(i=this.options.indexOf(e.target)),i!=null&&(e.preventDefault(),this.options[this.fixIndex(i)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(i)].selected=!0)}fixIndex(e){return e<0?this.options.length-1:e>this.options.length-1?0:e}onSlotchange(){var e;this.options=[],(e=this.slottedContent)===null||e===void 0||e.assignedElements().forEach(i=>{i instanceof de&&this.registerOption(i)}),this.selectedOption=this.options.find(i=>i.selected)}registerOption(e){var i;(i=e.shadowRoot)===null||i===void 0||i.querySelectorAll("input").forEach(r=>{r.setAttribute("tabindex","-1")}),e.setAttribute("tabindex","0"),e.unselectable=this.unselectable,this.options.push(e)}onOptionChangeByScript(e){e.stopPropagation();let i=e.target;this.onOptionChange(i)}onOptionChangeByUser(e){var i;e.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(e.target),this.dispatchEvent(new el((i=this.selectedOption)===null||i===void 0?void 0:i.value))}onOptionChange(e){e.selected?this.selectedOption=e:this.selectedOption=this.options.find(i=>i.selected)}private(e){e.selected?this.selectedOption=e:this.selectedOption=this.options.find(i=>i.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(e=>{e.selected=e===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(e.isFocused=e===this.selectedOption)})}};Be.elementDefinitions={};Be.styles=ms.css`
|
|
943
943
|
:host {
|
|
944
944
|
display: inline-block;
|
|
945
945
|
}
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
--switch-internal-vertical-padding: 2px;
|
|
974
974
|
--switch-internal-horizontal-padding: 4px;
|
|
975
975
|
}
|
|
976
|
-
`;Yi([(0,zt.property)({type:Boolean})],
|
|
976
|
+
`;Yi([(0,zt.property)({type:Boolean})],Be.prototype,"dense",void 0);Yi([(0,zt.property)({type:Boolean})],Be.prototype,"unselectable",void 0);Yi([(0,zt.property)()],Be.prototype,"label",void 0);Yi([(0,zt.query)(".ft-switch slot")],Be.prototype,"slottedContent",void 0);Yi([(0,zt.state)()],Be.prototype,"selectedOption",void 0);Yi([(0,zt.state)()],Be.prototype,"displayFocusWhenUsingKeyboard",void 0);Yi([(0,zt.query)(".ft-switch")],Be.prototype,"ftSwitchDiv",void 0);var Wp=c(h());var jp={"ft-switch":Be,"ft-switch-option":de};(0,Wp.customElements)(jp);var ni=c(h()),Kp=c(x());function gs(t){return Kp.css`
|
|
977
977
|
[part="container"] {
|
|
978
978
|
box-sizing: border-box;
|
|
979
979
|
display: flex;
|
|
@@ -1273,7 +1273,7 @@
|
|
|
1273
1273
|
[role="button"][aria-pressed="true"] ft-icon{
|
|
1274
1274
|
color: ${Xp.colorOnSurfaceMedium};
|
|
1275
1275
|
}
|
|
1276
|
-
`;var jt=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},vs=class extends CustomEvent{constructor(e,i){super("resize",{detail:{width:e,height:i}})}},
|
|
1276
|
+
`;var jt=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},vs=class extends CustomEvent{constructor(e,i){super("resize",{detail:{width:e,height:i}})}},Ce=class extends xs.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=Ie.material,this.cursor="nwse-resize",this.ariaLabel="",this.dragging=!1,this.isAriaPressed=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=e=>this.doDrag(e.clientX,e.clientY),this.doDragFromTouch=e=>this.doDrag(e.touches[0].clientX,e.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return bs.html`
|
|
1277
1277
|
<style>
|
|
1278
1278
|
.ft-resizer {
|
|
1279
1279
|
cursor: ${(0,bs.unsafeCSS)(this.cursor)}
|
|
@@ -1288,7 +1288,7 @@
|
|
|
1288
1288
|
@keydown=${this.initKeydownPress}>
|
|
1289
1289
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon} focusable="false" aria-hidden="true"></ft-icon>
|
|
1290
1290
|
</div>
|
|
1291
|
-
`}initDragFromMouse(e){e.detail>0&&this.initDrag(e.clientX,e.clientY)}initDragFromTouch(e){e.preventDefault(),e.stopPropagation(),this.initDrag(e.touches[0].clientX,e.touches[0].clientY)}initKeydownPress(e){let i=e.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i)&&(e.preventDefault(),e.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=e.currentTarget;i==="Enter"||i===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):i==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(i==="ArrowLeft"?this.fixedWidth-=10:i==="ArrowRight"?this.fixedWidth+=10:i==="ArrowUp"?this.fixedHeight-=10:i==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i)&&this.dispatchEvent(new vs(this.fixedWidth,this.fixedHeight)))}initDrag(e,i){this.dragging=!0,this.startX=e,this.startY=i,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(e,i){let r=this.fixedWidth+e-this.startX,n=this.fixedHeight+i-this.startY;this.dispatchEvent(new vs(r,n))}};
|
|
1291
|
+
`}initDragFromMouse(e){e.detail>0&&this.initDrag(e.clientX,e.clientY)}initDragFromTouch(e){e.preventDefault(),e.stopPropagation(),this.initDrag(e.touches[0].clientX,e.touches[0].clientY)}initKeydownPress(e){let i=e.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i)&&(e.preventDefault(),e.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=e.currentTarget;i==="Enter"||i===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):i==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(i==="ArrowLeft"?this.fixedWidth-=10:i==="ArrowRight"?this.fixedWidth+=10:i==="ArrowUp"?this.fixedHeight-=10:i==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i)&&this.dispatchEvent(new vs(this.fixedWidth,this.fixedHeight)))}initDrag(e,i){this.dragging=!0,this.startX=e,this.startY=i,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(e,i){let r=this.fixedWidth+e-this.startX,n=this.fixedHeight+i-this.startY;this.dispatchEvent(new vs(r,n))}};Ce.elementDefinitions={"ft-icon":z};Ce.styles=[xs.noTextSelect,Qp];jt([(0,rt.property)({type:Number})],Ce.prototype,"initialWidth",void 0);jt([(0,rt.property)({type:Number})],Ce.prototype,"initialHeight",void 0);jt([(0,rt.property)()],Ce.prototype,"icon",void 0);jt([(0,rt.property)()],Ce.prototype,"iconVariant",void 0);jt([(0,rt.property)()],Ce.prototype,"cursor",void 0);jt([(0,rt.property)()],Ce.prototype,"ariaLabel",void 0);jt([(0,rt.state)()],Ce.prototype,"dragging",void 0);jt([(0,rt.state)()],Ce.prototype,"isAriaPressed",void 0);jt([(0,rt.eventOptions)({passive:!0})],Ce.prototype,"initDragFromMouse",null);jt([(0,rt.eventOptions)({passive:!0})],Ce.prototype,"initDragFromTouch",null);var tf=c(h());var ef={"ft-resizer":Ce};(0,tf.customElements)(ef);var Ss=c($());var tl=c(x()),il=c($());function rf(t,e,i){return t?e(t):i?.(t)}var of=c(it()),sf=c(h()),nf=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Zi=class extends sf.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return tl.html`
|
|
1292
1292
|
<div class="${(0,of.classMap)(this.inputLabelClasses)}">
|
|
1293
1293
|
${rf(this.text,()=>tl.html`
|
|
1294
1294
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1342,7 +1342,7 @@
|
|
|
1342
1342
|
${this.helper}
|
|
1343
1343
|
</ft-typography>`:void 0}
|
|
1344
1344
|
</div>
|
|
1345
|
-
`}setValue(e,i=!1){this.value=e,this.setFormValue(e),i&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(e){(e.key==="Enter"||e.key===" ")&&e.stopPropagation()}updateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(e){e.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&e.detail.height<this.maxHeight)&&(this.height=e.detail.height)}};ye.elementDefinitions={"ft-input-label":nt,"ft-resizer":
|
|
1345
|
+
`}setValue(e,i=!1){this.value=e,this.setFormValue(e),i&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(e){(e.key==="Enter"||e.key===" ")&&e.stopPropagation()}updateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(e){e.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&e.detail.height<this.maxHeight)&&(this.height=e.detail.height)}};ye.elementDefinitions={"ft-input-label":nt,"ft-resizer":Ce,"ft-ripple":M,"ft-typography":U};ye.styles=[ui,Zp];yt([(0,Dt.property)({type:String})],ye.prototype,"label",void 0);yt([(0,Dt.property)({reflect:!0})],ye.prototype,"value",void 0);yt([(0,Dt.property)({type:String})],ye.prototype,"helper",void 0);yt([(0,Dt.property)({type:Boolean})],ye.prototype,"outlined",void 0);yt([(0,Dt.property)({type:Boolean})],ye.prototype,"disabled",void 0);yt([(0,Dt.property)({type:Boolean})],ye.prototype,"error",void 0);yt([(0,Wt.numberProperty)({reflect:!0})],ye.prototype,"height",void 0);yt([(0,Wt.numberProperty)()],ye.prototype,"maxHeight",void 0);yt([(0,Dt.query)("textarea")],ye.prototype,"textarea",void 0);yt([(0,Dt.state)()],ye.prototype,"focused",void 0);yt([(0,Wt.ignoreComposingEvents)()],ye.prototype,"onKeyDown",null);yt([(0,Wt.ignoreComposingEvents)()],ye.prototype,"liveUpdateValueFromInputField",null);var uf=c(h());var df={"ft-text-area":ye};(0,uf.customElements)(df);var Ef=c(pr());var J=ft.build("integratedFeedbackComponent"),pf={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review",viewerFeedbackMainTitle:"Send feedback",viewerRatingSectionTitle:"Rate this content",viewerDichotomousRatingSectionTitle:"Did this content solve your problem?",viewerFeedbackSectionTitle:"Write your review"};var Es=class extends CustomEvent{constructor(e){super("live-change",{detail:e})}},_s=class extends CustomEvent{constructor(e){super("change",{detail:e})}},As=class extends CustomEvent{constructor(e){super("invalid",{detail:e})}};var ff=c(x()),A=c(h());var D={fontSize:A.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:A.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:A.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:A.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:A.FtCssVariableFactory.extend("--ft-text-field-helper-color","",A.designSystemVariables.colorOnSurfaceMedium),colorPrimary:A.FtCssVariableFactory.external(A.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:A.FtCssVariableFactory.external(A.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:A.FtCssVariableFactory.external(A.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:A.FtCssVariableFactory.external(A.designSystemVariables.borderRadiusS,"Design system"),colorError:A.FtCssVariableFactory.external(A.designSystemVariables.colorError,"Design system"),prefixColor:A.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",A.designSystemVariables.colorOnSurfaceMedium),iconColor:A.FtCssVariableFactory.extend("--ft-text-field-icon-color","",A.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:A.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:A.FtCssVariableFactory.extend("--ft-text-field-background-color","",A.designSystemVariables.colorSurface),colorOutline:A.FtCssVariableFactory.external(A.designSystemVariables.colorOutline,"Design system"),elevation02:A.FtCssVariableFactory.external(A.designSystemVariables.elevation02,"Design system"),suggestSize:A.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},hf=ff.css`
|
|
1346
1346
|
*:focus {
|
|
1347
1347
|
outline: none;
|
|
1348
1348
|
}
|
|
@@ -1627,7 +1627,7 @@
|
|
|
1627
1627
|
.variant=${this.iconVariant}
|
|
1628
1628
|
.value=${this.icon}
|
|
1629
1629
|
@click=${()=>{var e;return(e=this.input)===null||e===void 0?void 0:e.focus()}}></ft-icon>
|
|
1630
|
-
`:Se.nothing}update(e){super.update(e),(e.has("value")||e.has("filterSuggestions")||e.has("suggestionsProvider"))&&this.updateSuggestions(),e.has("value")&&e.get("value")!=null&&(this.hideSuggestions=!1),e.has("dispatchedValue")&&e.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(e=>e.hidden=!e.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(e=>!e.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),e.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),e.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var e;this.clearWatchAutofill(),((e=this.autocomplete)!==null&&e!==void 0?e:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var i,r,n;!((i=this.input)===null||i===void 0)&&i.matches(":autofill")&&this.dispatchedValue!==((r=this.input)===null||r===void 0?void 0:r.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(e,i=!1){var r,n;this.value!==e&&(this.inputValid=!0,this.setInternalValue(e),this.dispatchEvent(new Es(e))),i&&this.dispatchedValue!==e&&(this.inputValid=(n=(r=this.input)===null||r===void 0?void 0:r.checkValidity())!==null&&n!==void 0?n:!0,this.inputValid?(this.dispatchedValue=e,this.dispatchEvent(new _s(e))):this.dispatchEvent(new As(this.input.validationMessage)))}handleInput(e){var i;let r=((i=this.input)===null||i===void 0?void 0:i.value)||"";this.setValue(r,e.key=="Escape"||e.key=="Enter")}catchComposingEvents(e){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(e){var i;if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault(),e.stopPropagation(),this.hideSuggestions=!1;let r=this.visibleSuggestions.findIndex(o=>o.matches(":focus-within")),n;e.key==="ArrowDown"?n=r<this.visibleSuggestions.length-1?r+1:0:n=r>0?r-1:this.visibleSuggestions.length-1,(i=this.visibleSuggestions[n])===null||i===void 0||i.focus()}(e.key=="Escape"||e.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(e){var i;this.setValue(e.detail,!0),(i=this.input)===null||i===void 0||i.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var e,i;!((e=this.mainPanel)===null||e===void 0)&&e.matches(":focus-within")||(this.focused=!1,this.setValue(((i=this.input)===null||i===void 0?void 0:i.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let e=["bottom","top"];(0,ot.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",e,"fixed","--text-field-internal-suggest-size",0).then(({x:i,y:r})=>{this.suggestionsContainer.style.left=`${i}px`,this.suggestionsContainer.style.top=`${r}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};C.elementDefinitions={"ft-input-label":nt,"ft-ripple":M,"ft-typography":U,"ft-icon":z,"ft-text-field-suggestion":vt};C.styles=[ui,ot.noTextInputDefaultClearButton,hf];F([(0,P.property)()],C.prototype,"label",void 0);F([(0,P.property)({noAccessor:!0})],C.prototype,"value",null);F([(0,P.state)()],C.prototype,"dispatchedValue",void 0);F([(0,P.property)()],C.prototype,"helper",void 0);F([(0,P.property)()],C.prototype,"suggestionsHelper",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"outlined",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"disabled",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"error",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"fixedMenuPosition",void 0);F([(0,P.property)()],C.prototype,"prefix",void 0);F([(0,P.property)()],C.prototype,"icon",void 0);F([(0,P.property)()],C.prototype,"name",void 0);F([(0,P.property)()],C.prototype,"type",void 0);F([(0,P.property)()],C.prototype,"passwordHiddenIcon",void 0);F([(0,P.property)()],C.prototype,"passwordRevealedIcon",void 0);F([(0,P.property)()],C.prototype,"iconVariant",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"filterSuggestions",void 0);F([(0,ot.numberProperty)()],C.prototype,"maxLength",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"password",void 0);F([(0,P.property)({type:String})],C.prototype,"autocomplete",void 0);F([(0,P.property)({attribute:!1})],C.prototype,"suggestionsProvider",void 0);F([(0,P.state)()],C.prototype,"focused",void 0);F([(0,P.state)()],C.prototype,"inputValid",void 0);F([(0,P.state)()],C.prototype,"hidePassword",void 0);F([(0,P.state)()],C.prototype,"hideSuggestions",void 0);F([(0,P.state)()],C.prototype,"visibleSuggestions",void 0);F([(0,P.state)()],C.prototype,"providedSuggestions",void 0);F([(0,P.query)(".ft-text-field--main-panel")],C.prototype,"mainPanel",void 0);F([(0,P.query)(".ft-text-field--input")],C.prototype,"input",void 0);F([(0,P.query)(".ft-text-field-suggestion--new-value")],C.prototype,"newValueSuggestion",void 0);F([(0,P.query)(".ft-text-field--suggestions")],C.prototype,"suggestionsContainer",void 0);F([(0,P.queryAll)("ft-text-field-suggestion")],C.prototype,"providedSuggestionsInDom",void 0);F([(0,P.queryAssignedElements)({selector:"ft-text-field-suggestion"})],C.prototype,"slottedSuggestions",void 0);F([(0,ot.ignoreComposingEvents)()],C.prototype,"handleInput",null);F([(0,ot.ignoreComposingEvents)()],C.prototype,"catchComposingEvents",null);var wf=c(h());var Sf={"ft-text-field":C,"ft-text-field-suggestion":vt};(0,wf.customElements)(Sf);var Ts=class extends CustomEvent{constructor(e){super("send-feedback",{detail:e})}};var we=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},
|
|
1630
|
+
`:Se.nothing}update(e){super.update(e),(e.has("value")||e.has("filterSuggestions")||e.has("suggestionsProvider"))&&this.updateSuggestions(),e.has("value")&&e.get("value")!=null&&(this.hideSuggestions=!1),e.has("dispatchedValue")&&e.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(e=>e.hidden=!e.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(e=>!e.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),e.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),e.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var e;this.clearWatchAutofill(),((e=this.autocomplete)!==null&&e!==void 0?e:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var i,r,n;!((i=this.input)===null||i===void 0)&&i.matches(":autofill")&&this.dispatchedValue!==((r=this.input)===null||r===void 0?void 0:r.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(e,i=!1){var r,n;this.value!==e&&(this.inputValid=!0,this.setInternalValue(e),this.dispatchEvent(new Es(e))),i&&this.dispatchedValue!==e&&(this.inputValid=(n=(r=this.input)===null||r===void 0?void 0:r.checkValidity())!==null&&n!==void 0?n:!0,this.inputValid?(this.dispatchedValue=e,this.dispatchEvent(new _s(e))):this.dispatchEvent(new As(this.input.validationMessage)))}handleInput(e){var i;let r=((i=this.input)===null||i===void 0?void 0:i.value)||"";this.setValue(r,e.key=="Escape"||e.key=="Enter")}catchComposingEvents(e){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(e){var i;if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault(),e.stopPropagation(),this.hideSuggestions=!1;let r=this.visibleSuggestions.findIndex(o=>o.matches(":focus-within")),n;e.key==="ArrowDown"?n=r<this.visibleSuggestions.length-1?r+1:0:n=r>0?r-1:this.visibleSuggestions.length-1,(i=this.visibleSuggestions[n])===null||i===void 0||i.focus()}(e.key=="Escape"||e.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(e){var i;this.setValue(e.detail,!0),(i=this.input)===null||i===void 0||i.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var e,i;!((e=this.mainPanel)===null||e===void 0)&&e.matches(":focus-within")||(this.focused=!1,this.setValue(((i=this.input)===null||i===void 0?void 0:i.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let e=["bottom","top"];(0,ot.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",e,"fixed","--text-field-internal-suggest-size",0).then(({x:i,y:r})=>{this.suggestionsContainer.style.left=`${i}px`,this.suggestionsContainer.style.top=`${r}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};C.elementDefinitions={"ft-input-label":nt,"ft-ripple":M,"ft-typography":U,"ft-icon":z,"ft-text-field-suggestion":vt};C.styles=[ui,ot.noTextInputDefaultClearButton,hf];F([(0,P.property)()],C.prototype,"label",void 0);F([(0,P.property)({noAccessor:!0})],C.prototype,"value",null);F([(0,P.state)()],C.prototype,"dispatchedValue",void 0);F([(0,P.property)()],C.prototype,"helper",void 0);F([(0,P.property)()],C.prototype,"suggestionsHelper",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"outlined",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"disabled",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"error",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"fixedMenuPosition",void 0);F([(0,P.property)()],C.prototype,"prefix",void 0);F([(0,P.property)()],C.prototype,"icon",void 0);F([(0,P.property)()],C.prototype,"name",void 0);F([(0,P.property)()],C.prototype,"type",void 0);F([(0,P.property)()],C.prototype,"passwordHiddenIcon",void 0);F([(0,P.property)()],C.prototype,"passwordRevealedIcon",void 0);F([(0,P.property)()],C.prototype,"iconVariant",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"filterSuggestions",void 0);F([(0,ot.numberProperty)()],C.prototype,"maxLength",void 0);F([(0,P.property)({type:Boolean})],C.prototype,"password",void 0);F([(0,P.property)({type:String})],C.prototype,"autocomplete",void 0);F([(0,P.property)({attribute:!1})],C.prototype,"suggestionsProvider",void 0);F([(0,P.state)()],C.prototype,"focused",void 0);F([(0,P.state)()],C.prototype,"inputValid",void 0);F([(0,P.state)()],C.prototype,"hidePassword",void 0);F([(0,P.state)()],C.prototype,"hideSuggestions",void 0);F([(0,P.state)()],C.prototype,"visibleSuggestions",void 0);F([(0,P.state)()],C.prototype,"providedSuggestions",void 0);F([(0,P.query)(".ft-text-field--main-panel")],C.prototype,"mainPanel",void 0);F([(0,P.query)(".ft-text-field--input")],C.prototype,"input",void 0);F([(0,P.query)(".ft-text-field-suggestion--new-value")],C.prototype,"newValueSuggestion",void 0);F([(0,P.query)(".ft-text-field--suggestions")],C.prototype,"suggestionsContainer",void 0);F([(0,P.queryAll)("ft-text-field-suggestion")],C.prototype,"providedSuggestionsInDom",void 0);F([(0,P.queryAssignedElements)({selector:"ft-text-field-suggestion"})],C.prototype,"slottedSuggestions",void 0);F([(0,ot.ignoreComposingEvents)()],C.prototype,"handleInput",null);F([(0,ot.ignoreComposingEvents)()],C.prototype,"catchComposingEvents",null);var wf=c(h());var Sf={"ft-text-field":C,"ft-text-field-suggestion":vt};(0,wf.customElements)(Sf);var Ts=class extends CustomEvent{constructor(e){super("send-feedback",{detail:e})}};var we=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Q=class extends ht(Mr.FtLitElementRedux){constructor(){super(),this.hideTitle=!1,this.withMoreOptionsButton=!1,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.canAccessFeedback=!1,this.canRateThisContent=!1,this.from="",this.feedbackMessage="",this.addI18nContext(J,pf),this.addStore(v)}get configuredRatingType(){var e,i;return(i=(e=this.ratingSummary)===null||e===void 0?void 0:e.type)!==null&&i!==void 0?i:_e.NO_RATING}get ratingTypeOfDoneRatingOfThisContent(){var e,i,r;return(r=(i=(e=this.ratingSummary)===null||e===void 0?void 0:e.rating)===null||i===void 0?void 0:i.type)!==null&&r!==void 0?r:_e.NO_RATING}get ratingValue(){var e,i,r;return(r=(i=(e=this.ratingSummary)===null||e===void 0?void 0:e.rating)===null||i===void 0?void 0:i.value)!==null&&r!==void 0?r:-1}get ratingDate(){var e,i;let r=(i=(e=this.ratingSummary)===null||e===void 0?void 0:e.rating)===null||i===void 0?void 0:i.date;return typeof r=="string"?(0,Mr.parseDate)(r):r}render(){return!this.canAccessFeedback&&!this.canRateThisContent?ue.nothing:ue.html`
|
|
1631
1631
|
<div part="container">
|
|
1632
1632
|
${this.hideTitle?ue.nothing:ue.html`
|
|
1633
1633
|
<ft-typography variant="${H.title}" part="main-title">
|
|
@@ -1647,11 +1647,11 @@
|
|
|
1647
1647
|
${this.renderRatingDate()}
|
|
1648
1648
|
</ft-typography>
|
|
1649
1649
|
</div>
|
|
1650
|
-
`:ue.nothing}renderRatingDate(){let e=this.ratingDate;if(e==null)return
|
|
1650
|
+
`:ue.nothing}renderRatingDate(){let e=this.ratingDate;if(e==null)return J.messages.notRated();if(e.getTime()>new Date().getTime()-6e4)return J.messages.ratedNow();let i=new Date().toLocaleDateString(),r=e.toLocaleDateString();return i===r?J.messages.ratedToday():J.messages.ratedOn(e)}renderRating(){switch(this.configuredRatingType){case _e.STARS:return ue.html`
|
|
1651
1651
|
<div part="rating rating-stars">
|
|
1652
1652
|
${(0,Ef.repeat)(new Array(5),(e,i)=>i,(e,i)=>{let r=this.ratingTypeOfDoneRatingOfThisContent===_e.STARS&&this.ratingValue>i,n=i+1;return ue.html`
|
|
1653
1653
|
<ft-button round part="rating-stars-${n}"
|
|
1654
|
-
label="${
|
|
1654
|
+
label="${J.messages.starsRating(n)}"
|
|
1655
1655
|
tooltipPosition="top"
|
|
1656
1656
|
.iconVariant=${this.iconVariant}
|
|
1657
1657
|
icon="${r?this.filledStarIcon:this.emptyStarIcon}"
|
|
@@ -1670,14 +1670,14 @@
|
|
|
1670
1670
|
.iconVariant=${this.iconVariant}
|
|
1671
1671
|
icon="${i?this.filledLikeIcon:this.emptyLikeIcon}"
|
|
1672
1672
|
role="radio">
|
|
1673
|
-
${
|
|
1673
|
+
${J.messages.like()}
|
|
1674
1674
|
</ft-switch-option>
|
|
1675
1675
|
<ft-switch-option .value=${0}
|
|
1676
1676
|
?selected=${e}
|
|
1677
1677
|
.iconVariant=${this.iconVariant}
|
|
1678
1678
|
icon="${e?this.filledDislikeIcon:this.emptyDislikeIcon}"
|
|
1679
1679
|
role="radio">
|
|
1680
|
-
${
|
|
1680
|
+
${J.messages.dislike()}
|
|
1681
1681
|
</ft-switch-option>
|
|
1682
1682
|
</ft-switch>
|
|
1683
1683
|
`}case _e.DICHOTOMOUS:{let e=this.ratingTypeOfDoneRatingOfThisContent===_e.DICHOTOMOUS&&this.ratingValue===0,i=this.ratingTypeOfDoneRatingOfThisContent===_e.DICHOTOMOUS&&this.ratingValue===1;return ue.html`
|
|
@@ -1686,11 +1686,11 @@
|
|
|
1686
1686
|
part="rating rating-dichotomous">
|
|
1687
1687
|
<ft-switch-option .value=${1}
|
|
1688
1688
|
?selected=${i}>
|
|
1689
|
-
${
|
|
1689
|
+
${J.messages.dichotomousYes()}
|
|
1690
1690
|
</ft-switch-option>
|
|
1691
1691
|
<ft-switch-option .value=${0}
|
|
1692
1692
|
?selected=${e}>
|
|
1693
|
-
${
|
|
1693
|
+
${J.messages.dichotomousNo()}
|
|
1694
1694
|
</ft-switch-option>
|
|
1695
1695
|
</ft-switch>
|
|
1696
1696
|
`}}return ue.nothing}rate(e){(e??-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:e}))}renderFeedbackSection(){var e,i,r,n,o;if(this.canAccessFeedback){let s=this.feedbackMailLinkBuilder(this.feedbackMessage),a=ue.html`
|
|
@@ -1698,7 +1698,7 @@
|
|
|
1698
1698
|
type="submit" name="submit"
|
|
1699
1699
|
?disabled=${!this.feedbackMessage||!this.validFromEmail()}
|
|
1700
1700
|
part="send-feedback">
|
|
1701
|
-
${
|
|
1701
|
+
${J.messages.okButton()}
|
|
1702
1702
|
</ft-button>
|
|
1703
1703
|
`;s&&(a=ue.html`
|
|
1704
1704
|
<a part="send-feedback-link" href="${s}">
|
|
@@ -1709,7 +1709,7 @@
|
|
|
1709
1709
|
type="button" name="more-options"
|
|
1710
1710
|
@click=${this.onOpenMoreDetails}
|
|
1711
1711
|
part="more-options">
|
|
1712
|
-
${
|
|
1712
|
+
${J.messages.moreOptionsButton()}
|
|
1713
1713
|
</ft-button>
|
|
1714
1714
|
`:ue.nothing;return ue.html`
|
|
1715
1715
|
<form part="feedback-container" autocomplete="on"
|
|
@@ -1720,15 +1720,15 @@
|
|
|
1720
1720
|
${((n=(r=this.session)===null||r===void 0?void 0:r.profile)===null||n===void 0?void 0:n.userId)==null&&(!((o=this.configuration)===null||o===void 0)&&o.mailsSentByFluidTopicsForUnauthenticatedUsers)?ue.html`
|
|
1721
1721
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
1722
1722
|
part="feedback-from-input"
|
|
1723
|
-
label="${
|
|
1723
|
+
label="${J.messages.feedbackfromEmail()}"
|
|
1724
1724
|
@change=${d=>this.from=d.detail.trim()}
|
|
1725
1725
|
?error=${this.from&&!this.validFromEmail()}
|
|
1726
|
-
helper="${this.from&&!this.validFromEmail()?
|
|
1726
|
+
helper="${this.from&&!this.validFromEmail()?J.messages.feedbackfromEmailInvalid():""}"
|
|
1727
1727
|
></ft-text-field>
|
|
1728
1728
|
`:ue.nothing}
|
|
1729
1729
|
<ft-text-area outlined
|
|
1730
1730
|
part="feedback-input"
|
|
1731
|
-
label="${
|
|
1731
|
+
label="${J.messages.feedbackInputLabel()}"
|
|
1732
1732
|
@live-change=${d=>this.feedbackMessage=d.detail.trim()}
|
|
1733
1733
|
></ft-text-area>
|
|
1734
1734
|
<div part="buttons-container">
|
|
@@ -1736,7 +1736,7 @@
|
|
|
1736
1736
|
${a}
|
|
1737
1737
|
</div>
|
|
1738
1738
|
</form>
|
|
1739
|
-
`}return ue.nothing}onFormSubmitEvent(e,i){e.preventDefault(),i?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var e,i,r;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((i=(e=this.session)===null||e===void 0?void 0:e.profile)===null||i===void 0?void 0:i.userId)==null&&(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var e;this.dispatchEvent(new Ts({message:this.feedbackInput.value,...((e=this.configuration)===null||e===void 0?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};
|
|
1739
|
+
`}return ue.nothing}onFormSubmitEvent(e,i){e.preventDefault(),i?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var e,i,r;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((i=(e=this.session)===null||e===void 0?void 0:e.profile)===null||i===void 0?void 0:i.userId)==null&&(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var e;this.dispatchEvent(new Ts({message:this.feedbackInput.value,...((e=this.configuration)===null||e===void 0?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};Q.elementDefinitions={"ft-button":L,"ft-typography":U,"ft-switch":Be,"ft-switch-option":de,"ft-text-area":ye,"ft-text-field":C};we([(0,pe.property)({type:Boolean})],Q.prototype,"hideTitle",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"withMoreOptionsButton",void 0);we([(0,pe.property)()],Q.prototype,"iconVariant",void 0);we([(0,pe.property)()],Q.prototype,"emptyStarIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledStarIcon",void 0);we([(0,pe.property)()],Q.prototype,"emptyLikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledLikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"emptyDislikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledDislikeIcon",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"canAccessFeedback",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"canRateThisContent",void 0);we([(0,pe.property)({attribute:!1})],Q.prototype,"i18nProperties",void 0);we([(0,pe.property)({attribute:!1})],Q.prototype,"ratingSummary",void 0);we([(0,pe.property)()],Q.prototype,"configuration",void 0);we([(0,pe.property)()],Q.prototype,"feedbackMailLinkBuilder",void 0);we([(0,Mr.redux)({store:v.name})],Q.prototype,"session",void 0);we([(0,pe.query)("[part='feedback-input']")],Q.prototype,"feedbackInput",void 0);we([(0,pe.state)()],Q.prototype,"from",void 0);we([(0,pe.state)()],Q.prototype,"feedbackMessage",void 0);var An=class extends Q{};An.styles=gs(ys);var ol=ft.build("inDesignerFeedbackComponent"),_f={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var Rs=ft.fromGwt("server");var Os=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(e,i,r,n,o){var s;this.subject=e,this.url=i,this.configuration=n,this.isAuthenticated=o,this.subjectMetadata=this.filterMetadata(r,n.subjectMetadataIds).map(a=>"["+a.values[a.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(r,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(a=>"["+a.values.join(", ")+"]").join(" ")}filterMetadata(e,i){return i.map(r=>e.find(n=>n.key===r)).filter(r=>r!=null&&r.values.length>0)}shouldUseMailer(){var e,i;let r=this.isAuthenticated&&!(!((e=this.configuration)===null||e===void 0)&&e.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers);return r||n}build(e){var i;if(e!=null&&e.length===0||!this.shouldUseMailer())return;let r=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
|
|
1740
1740
|
${this.bodyMetadata}
|
|
1741
1741
|
${this.url}
|
|
1742
1742
|
_________________________________________________________________
|
|
@@ -1744,7 +1744,7 @@ _________________________________________________________________
|
|
|
1744
1744
|
${e??""}
|
|
1745
1745
|
|
|
1746
1746
|
_________________________________________________________________
|
|
1747
|
-
${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configuration)===null||i===void 0?void 0:i.recipients.join(",")}?subject=${r}&body=${n}`}};var Me=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},
|
|
1747
|
+
${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configuration)===null||i===void 0?void 0:i.recipients.join(",")}?subject=${r}&body=${n}`}};var Me=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},ee=class extends We(ht(je)){get canAccessFeedback(){var e;return(e=this.service)===null||e===void 0?void 0:e.isFeatureAccessible(hi.FEEDBACK,{session:this.session})}get canRateThisContent(){var e;return((e=this.service)===null||e===void 0?void 0:e.isFeatureAccessible(hi.RATING,{session:this.session}))&&this.configuredRatingType!=_e.NO_RATING}get configuredRatingType(){var e,i;return(i=(e=this.ratingSummary)===null||e===void 0?void 0:e.type)!==null&&i!==void 0?i:_e.NO_RATING}constructor(e=new bo){super(),this.guestStorage=e,this.editorMode=!1,this.hideTitle=!1,this.iconVariant=Ie.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Os,this.i18nProperties={feedbackMainTitle:J.properties.viewerFeedbackMainTitle(),ratingSectionTitle:J.properties.viewerRatingSectionTitle(),dichotomousRatingSectionTitle:J.properties.viewerDichotomousRatingSectionTitle(),feedbackSectionTitle:J.properties.viewerFeedbackSectionTitle()},this.loadGuestRating=()=>{let i=this.guestStorage.get(this.guestRatingKey());i&&(this.ratingSummary=i)},this.guestRatingKey=()=>{var i;return"ft-viewer-document-feedback-guest-rating-"+((i=this.document)===null||i===void 0?void 0:i.id)},this.sendRatingDebouncer=new Ye.Debouncer(500),this.addStore(v)}render(){return Af.html`
|
|
1748
1748
|
<ft-viewer-feedback
|
|
1749
1749
|
?hideTitle=${this.hideTitle}
|
|
1750
1750
|
iconVariant="${this.iconVariant}"
|
|
@@ -1765,7 +1765,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
1765
1765
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1766
1766
|
@open-more-options=${this.openMoreOptions}
|
|
1767
1767
|
></ft-viewer-feedback>
|
|
1768
|
-
`}willUpdate(e){var i,r,n;super.willUpdate(e),e.has("editorMode")&&this.editorMode&&this.addI18nContext(ol,_f),["document","configuration","user","mailSubject"].some(o=>e.has(o))&&this.document&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(i=this.document.prettyUrl)!==null&&i!==void 0?i:"",this.document.metadata,this.configuration,((n=(r=this.session)===null||r===void 0?void 0:r.profile)===null||n===void 0?void 0:n.userId)!=null),["session","document"].some(o=>e.has(o))&&this.session&&this.document&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}rate(e){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:e.detail==null?void 0:{type:this.ratingSummary.type,value:e.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(e.detail)))}async sendRating(e){var i,r,n;if(!this.editorMode&&this.ratingSummary)try{e==null?await((i=this.service)===null||i===void 0?void 0:i.unrateDocument(this.document.id)):await((r=this.service)===null||r===void 0?void 0:r.rateDocument(this.document.id,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,e))}catch{this.dispatchEvent(new Ye.FtNotificationEvent({type:"error",message:
|
|
1768
|
+
`}willUpdate(e){var i,r,n;super.willUpdate(e),e.has("editorMode")&&this.editorMode&&this.addI18nContext(ol,_f),["document","configuration","user","mailSubject"].some(o=>e.has(o))&&this.document&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(i=this.document.prettyUrl)!==null&&i!==void 0?i:"",this.document.metadata,this.configuration,((n=(r=this.session)===null||r===void 0?void 0:r.profile)===null||n===void 0?void 0:n.userId)!=null),["session","document"].some(o=>e.has(o))&&this.session&&this.document&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}rate(e){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:e.detail==null?void 0:{type:this.ratingSummary.type,value:e.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(e.detail)))}async sendRating(e){var i,r,n;if(!this.editorMode&&this.ratingSummary)try{e==null?await((i=this.service)===null||i===void 0?void 0:i.unrateDocument(this.document.id)):await((r=this.service)===null||r===void 0?void 0:r.rateDocument(this.document.id,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,e))}catch{this.dispatchEvent(new Ye.FtNotificationEvent({type:"error",message:J.messages.ratingFailure()}))}}async sendFeedback(e){var i;try{this.editorMode?this.dispatchEvent(new Ye.FtNotificationEvent({type:"info",message:ol.messages.feedbackAndRatingDisabledInEditor()})):(await((i=this.service)===null||i===void 0?void 0:i.sendDocumentFeedback(this.document.id,e.detail.message,e.detail.from)),this.dispatchEvent(new Ye.FtNotificationEvent({type:"info",message:J.messages.feedbackSuccess()}))),this.viewerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Ye.FtNotificationEvent({type:"error",message:J.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new ns)}openMoreOptions(){var e,i;this.dispatchEvent(new rs({documentId:this.document.id,documentTitle:this.displayName||"",ratingType:((e=this.ratingSummary)===null||e===void 0?void 0:e.type)||_e.NO_RATING,ratingValue:(i=this.ratingSummary)===null||i===void 0?void 0:i.rating}))}};ee.styles=gs(ys);ee.elementDefinitions={"ft-viewer-feedback":An};ee.storedRatingIfAuthenticated=(t,e)=>{var i,r;return!((i=e.session)===null||i===void 0)&&i.sessionAuthenticated?t.documentRating:(r=e.ratingSummary)!==null&&r!==void 0?r:t.documentRating};Me([(0,Ye.redux)({store:v.name})],ee.prototype,"session",void 0);Me([(0,Ye.redux)({store:"viewer"})],ee.prototype,"document",void 0);Me([(0,Ye.redux)({store:v.name})],ee.prototype,"editorMode",void 0);Me([(0,Ye.redux)({store:"viewer",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.feedback}})],ee.prototype,"configuration",void 0);Me([(0,Ye.redux)({store:"viewer",selector:ee.storedRatingIfAuthenticated})],ee.prototype,"ratingSummary",void 0);Me([(0,It.property)({type:Boolean})],ee.prototype,"hideTitle",void 0);Me([(0,It.property)()],ee.prototype,"iconVariant",void 0);Me([(0,It.property)()],ee.prototype,"emptyStarIcon",void 0);Me([(0,It.property)()],ee.prototype,"filledStarIcon",void 0);Me([(0,It.property)()],ee.prototype,"emptyLikeIcon",void 0);Me([(0,It.property)()],ee.prototype,"filledLikeIcon",void 0);Me([(0,It.property)()],ee.prototype,"emptyDislikeIcon",void 0);Me([(0,It.property)()],ee.prototype,"filledDislikeIcon",void 0);Me([(0,It.query)("ft-viewer-feedback")],ee.prototype,"viewerFeedback",void 0);Me([Go(Rs.properties["mail.file_feedback.subject"](t=>{var e,i;return[((e=t.document)===null||e===void 0?void 0:e.title)||"Document",((i=t.document)===null||i===void 0?void 0:i.filename)||"Filename"]}))],ee.prototype,"mailSubject",void 0);Me([(0,Ye.redux)({store:"viewer",selector:({descriptor:t})=>t?.displayName})],ee.prototype,"displayName",void 0);var Cf=c(h());var ks=class extends We(Cf.FtLitElementRedux){};var bt=c(h()),Mt=c($());var Tf=c(x());var Rf=Tf.css`
|
|
1769
1769
|
:host {
|
|
1770
1770
|
display: inline-block;
|
|
1771
1771
|
}
|
|
@@ -1925,7 +1925,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
1925
1925
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
|
|
1926
1926
|
order: -1;
|
|
1927
1927
|
}
|
|
1928
|
-
`];var
|
|
1928
|
+
`];var He=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ds=class extends CustomEvent{constructor(){super("icon-click")}},ne=class extends Pr.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var e;let i={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":Pr.isSafari};return Ls.html`
|
|
1929
1929
|
<div class="${(0,If.classMap)(i)}"
|
|
1930
1930
|
aria-label="${this.getLabel()}"
|
|
1931
1931
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -1952,7 +1952,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
1952
1952
|
<div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
|
|
1953
1953
|
<ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
|
|
1954
1954
|
</div>
|
|
1955
|
-
`}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Ds))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Ds))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,Pr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};ne.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-icon":z,"ft-button":L};ne.styles=Df;
|
|
1955
|
+
`}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Ds))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Ds))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,Pr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};ne.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-icon":z,"ft-button":L};ne.styles=Df;He([(0,Le.property)({type:Boolean})],ne.prototype,"highlighted",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"removable",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"disabled",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"clickable",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"iconClickable",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"dense",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"multiLine",void 0);He([(0,Le.property)()],ne.prototype,"label",void 0);He([(0,Le.property)()],ne.prototype,"iconLabel",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"hideIconTooltip",void 0);He([(0,Le.property)()],ne.prototype,"icon",void 0);He([(0,Le.property)()],ne.prototype,"iconVariant",void 0);He([(0,Le.property)({type:Boolean})],ne.prototype,"trailingIcon",void 0);He([(0,Le.property)()],ne.prototype,"typographyVariant",void 0);He([(0,Le.query)("ft-typography slot")],ne.prototype,"slottedContent",void 0);var Pf=c(h());var Mf={"ft-chip":ne};(0,Pf.customElements)(Mf);var Bf=c(x()),Ee=c($()),Ur=c(h());var Hf=c(it());var Tn=c(x()),$r=c($()),Ps=c(h());var Nf=c(x()),Is=c(h()),Ym={iconColor:Is.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",Is.designSystemVariables.colorOnSurfaceMedium)},$f=Nf.css`
|
|
1956
1956
|
.ft-floating-menu-item {
|
|
1957
1957
|
cursor: pointer;
|
|
1958
1958
|
display: flex;
|
|
@@ -1972,7 +1972,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
1972
1972
|
}
|
|
1973
1973
|
|
|
1974
1974
|
.ft-floating-menu-item ft-icon {
|
|
1975
|
-
color: ${
|
|
1975
|
+
color: ${Ym.iconColor};
|
|
1976
1976
|
margin-left: 0;
|
|
1977
1977
|
flex-shrink: 0;
|
|
1978
1978
|
flex-grow: 0;
|
|
@@ -2034,7 +2034,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
2034
2034
|
.ft-floating-menu--open .ft-floating-menu--options {
|
|
2035
2035
|
display: block;
|
|
2036
2036
|
}
|
|
2037
|
-
`;var Ne=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ns=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var $s=class extends CustomEvent{constructor(e){super("select",{detail:e})}},
|
|
2037
|
+
`;var Ne=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ns=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var $s=class extends CustomEvent{constructor(e){super("select",{detail:e})}},te=class extends Ur.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=Ie.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=e=>{this.menuOpen=this.menuOpen&&e.composedPath().includes(this.container)}}updated(e){super.updated(e),e.has("menuOpen")&&this.dispatchEvent(new Ns(this.menuOpen))}render(){let e={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Bf.html`
|
|
2038
2038
|
<div part="container" class="${(0,Hf.classMap)(e)}" @keydown=${this.onKeyDown}>
|
|
2039
2039
|
<slot name="toggle"
|
|
2040
2040
|
part="toggle"
|
|
@@ -2065,7 +2065,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
2065
2065
|
</div>
|
|
2066
2066
|
</div>
|
|
2067
2067
|
</div>
|
|
2068
|
-
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new $s(e.detail)),this.closeMenu()}onContentClick(e){(0,Ur.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:i,y:r}=await fs(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${i}px`,this.menuWrapper.style.top=`${r}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};
|
|
2068
|
+
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new $s(e.detail)),this.closeMenu()}onContentClick(e){(0,Ur.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:i,y:r}=await fs(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${i}px`,this.menuWrapper.style.top=`${r}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};te.elementDefinitions={"ft-floating-menu-item":Pe,"ft-button":L};te.styles=Vf;Ne([(0,Ee.property)()],te.prototype,"horizontalAlignment",void 0);Ne([(0,Ee.property)()],te.prototype,"verticalAlignment",void 0);Ne([(0,Ur.jsonProperty)([])],te.prototype,"closeMenuMatchers",void 0);Ne([(0,Ee.property)({type:Boolean})],te.prototype,"primary",void 0);Ne([(0,Ee.property)()],te.prototype,"label",void 0);Ne([(0,Ee.property)()],te.prototype,"tooltipPosition",void 0);Ne([(0,Ee.property)()],te.prototype,"icon",void 0);Ne([(0,Ee.property)()],te.prototype,"iconVariant",void 0);Ne([(0,Ee.property)()],te.prototype,"text",void 0);Ne([(0,Ee.property)({type:Boolean})],te.prototype,"disabled",void 0);Ne([(0,Ee.state)()],te.prototype,"menuOpen",void 0);Ne([(0,Ee.state)()],te.prototype,"forceMenuOpen",void 0);Ne([(0,Ee.query)(".ft-floating-menu")],te.prototype,"container",void 0);Ne([(0,Ee.query)(".ft-floating-menu--wrapper")],te.prototype,"menuWrapper",void 0);Ne([(0,Ee.query)("#actions-button")],te.prototype,"actionButton",void 0);Ne([(0,Ee.queryAssignedElements)({slot:"toggle"})],te.prototype,"customToggle",void 0);var zf=c(x()),Us=c(h()),Zm={color:Us.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",Us.designSystemVariables.colorOnSurfaceMedium)},jf=zf.css`
|
|
2069
2069
|
.ft-floating-menu-label {
|
|
2070
2070
|
padding: 4px 8px;
|
|
2071
2071
|
}
|
|
@@ -2076,7 +2076,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
2076
2076
|
width: max-content;
|
|
2077
2077
|
text-overflow: ellipsis;
|
|
2078
2078
|
overflow: hidden;
|
|
2079
|
-
color: ${
|
|
2079
|
+
color: ${Zm.color}
|
|
2080
2080
|
}
|
|
2081
2081
|
`;var Wf=c(x()),Kf=c(h());var wi=class extends Kf.FtLitElement{render(){return Wf.html`
|
|
2082
2082
|
<div class="ft-floating-menu-label">
|
|
@@ -2084,7 +2084,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
2084
2084
|
<slot></slot>
|
|
2085
2085
|
</ft-typography>
|
|
2086
2086
|
</div>
|
|
2087
|
-
`}};wi.elementDefinitions={"ft-typography":U};wi.styles=jf;var qf=c(h());var Gf={"ft-floating-menu":
|
|
2087
|
+
`}};wi.elementDefinitions={"ft-typography":U};wi.styles=jf;var qf=c(h());var Gf={"ft-floating-menu":te,"ft-floating-menu-item":Pe,"ft-floating-menu-label":wi};(0,qf.customElements)(Gf);var Xe=c(x()),Zf=c(pr());var Rn=c(h());function Xm(t){var e;return((e=(0,Rn.accessResult)(t))===null||e===void 0?void 0:e.openMode)===lo.EXTERNAL}function Yf(t){return Xm(t)?(0,Rn.accessResult)(t).originUrl:(0,Rn.accessResultUrl)(t)}var On=class{constructor(e){this.contentLocales=e}localize(e){var i,r;return e?.key!=="ft:locale"?e:{...e,displayValue:(i=this.findLocaleValue(e))!==null&&i!==void 0?i:e.displayValue,displayTooltipValue:(r=this.findLocaleValue(e))!==null&&r!==void 0?r:e.displayTooltipValue}}findLocaleValue(e){var i;return(i=this.contentLocales.find(r=>r.lang===e.value))===null||i===void 0?void 0:i.label}};var ze=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},fe=class extends hc(ht(ks)){get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}get metadataLabel(){var e,i,r,n,o,s;return this.metadata?this.metadata.label:(s=(n=(r=(i=(e=this.viewerStateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||i===void 0?void 0:i.getMetadataDescriptor(this.key))===null||r===void 0?void 0:r.label)!==null&&n!==void 0?n:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}setUdvStateManager(e){super.setUdvStateManager(e),this.key&&this.useForSwitchingToRelatives&&e.registerMetadataForSwitchToRelatives(this.key)}constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(Tr)}willUpdate(e){var i,r,n,o,s;super.willUpdate(e),e.has("key")&&this.useForSwitchingToRelatives&&(e.get("key")&&((i=this.viewerStateManager)===null||i===void 0||i.unregisterMetadataForSwitchToRelatives(e.get("key"))),this.key&&((r=this.viewerStateManager)===null||r===void 0||r.registerMetadataForSwitchToRelatives(this.key))),e.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.viewerStateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(o=this.viewerStateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(e.has("translateValues")||e.has("metadata")||e.has("hierarchicalValueTruncatingLevel")||e.has("availableContentLocales")||this.dateFormatOptionsChanged(e))&&(this.flatMetadata=this.metadata?bt.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new On((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}updateRelatives(){var e,i,r,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(i=(e=this.viewerStateManager)===null||e===void 0?void 0:e.clusteringHelper)===null||i===void 0?void 0:i.computeClustersItemsForMetadata(this.key,((r=this.document)===null||r===void 0?void 0:r.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return Xe.html`
|
|
2088
2088
|
${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
|
|
2089
2089
|
${this.hideIfEmpty()}
|
|
2090
2090
|
`}hideIfEmpty(){let e=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&e?Xe.html`
|
|
@@ -2134,7 +2134,7 @@ ${Rs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
|
|
|
2134
2134
|
text="${d}">
|
|
2135
2135
|
${u}
|
|
2136
2136
|
</ft-tooltip>
|
|
2137
|
-
`}};fe.elementDefinitions={"ft-chip":ne,"ft-floating-menu":
|
|
2137
|
+
`}};fe.elementDefinitions={"ft-chip":ne,"ft-floating-menu":te,"ft-floating-menu-item":Pe,"ft-floating-menu-label":wi,"ft-ripple":M,"ft-tooltip":re};fe.styles=Rf;ze([(0,Mt.property)(),(0,bt.reduxReactive)()],fe.prototype,"key",void 0);ze([(0,Mt.property)({type:Boolean})],fe.prototype,"multiLine",void 0);ze([(0,Mt.property)({type:Boolean})],fe.prototype,"useForSwitchingToRelatives",void 0);ze([(0,Mt.property)({type:Boolean})],fe.prototype,"displayLabel",void 0);ze([(0,bt.numberProperty)()],fe.prototype,"hierarchicalValueTruncatingLevel",void 0);ze([(0,Mt.property)({type:Boolean})],fe.prototype,"forceTooltip",void 0);ze([(0,Mt.property)({attribute:!1})],fe.prototype,"editorMode",void 0);ze([(0,Mt.property)({type:Boolean})],fe.prototype,"translateValues",void 0);ze([(0,bt.redux)({store:"viewer",selector:(t,e)=>{var i,r;return(r=(i=t.document)===null||i===void 0?void 0:i.metadata)===null||r===void 0?void 0:r.find(n=>n.key===e.key)}})],fe.prototype,"metadata",void 0);ze([(0,Mt.state)()],fe.prototype,"flatMetadata",void 0);ze([(0,bt.redux)({store:"viewer"})],fe.prototype,"document",void 0);ze([(0,Mt.state)()],fe.prototype,"relatives",void 0);ze([(0,bt.redux)({store:v.name})],fe.prototype,"availableContentLocales",void 0);ze([Go(Tr.properties.itemWithNoValueForSwitchToRelatives())],fe.prototype,"noValueMessage",void 0);ze([(0,bt.reduxEventListener)({eventName:fi.clusteringHelperCreated})],fe.prototype,"updateRelatives",null);var Xf={"ft-asset-viewer-content":Oo,"ft-asset-viewer-context":Zt,"ft-asset-viewer-document-title":Po,"ft-asset-viewer-filename":ko,"ft-asset-viewer-mime-type-icon":Mo,"ft-asset-viewer-title":Lo,"ft-ud-viewer-attachments":zi,"ft-ud-viewer-content":Vo,"ft-ud-viewer-context":mi,"ft-ud-viewer-filename":Bo,"ft-ud-viewer-metadata":fe,"ft-ud-viewer-mime-type-icon":zo,"ft-ud-viewer-title":Ho,"ft-ud-viewer-feedback":ee};(0,Jf.customElements)(Xf);})();
|
|
2138
2138
|
/*! Bundled license information:
|
|
2139
2139
|
|
|
2140
2140
|
@lit/context/lib/context-request-event.js:
|