@fluid-topics/ft-reader-feedback 1.1.68 → 1.1.69
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.
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let d=o.call(i,t);d||(d=h(t),e.call(i,t,d)),this===window.customElements&&(a.set(r,c),c.standInClass=d);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)n.delete(t),p(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){y.push(this),i.upgrade.apply(i,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,d=t=>{let e=t.getRootNode();if(!c(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=d(o)||window.customElements,r=i._getDefinition(e);return r?p(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},u=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):u(o)},p=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=g.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){y.push(this),o.set.call(this,t),y.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);f(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let d=o.call(i,t);d||(d=h(t),e.call(i,t,d)),this===window.customElements&&(a.set(r,c),c.standInClass=d);const u=this._awaitingUpgrade.get(t);if(u){this._awaitingUpgrade.delete(t);for(const t of u)n.delete(t),p(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){y.push(this),i.upgrade.apply(i,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,d=t=>{let e=t.getRootNode();if(!c(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},h=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=d(o)||window.customElements,r=i._getDefinition(e);return r?p(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},u=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):u(o)},p=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){u(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=g.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){y.push(this),o.set.call(this,t),y.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(Dl){const t=window.customElements.define;window.customElements.define=(e,o,i)=>{if(null!==o)try{t.bind(window.customElements)(e,o,i)}catch(t){console.info(e,o,i,t)}}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
@@ -140,7 +140,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
140
140
|
.highlight-html-match {
|
|
141
141
|
background: ${Hr};
|
|
142
142
|
}
|
|
143
|
-
`,Gr={className:"highlight-html-match"};
|
|
143
|
+
`,Gr={className:"highlight-html-match"};function Vr(t,e){var o;let i=t.getAttribute("data-highlight-html-query");if((null!=i?i:"")!==(null!=e?e:"")){const i=new Zr(t);if(i.unmark(Gr),e&&e.trim()){i.mark(e.replace(/"[^"]+"/g,""),{...Gr,separateWordSearch:!0});(null!==(o=e.match(/"[^"]+"/g))&&void 0!==o?o:[]).forEach((t=>i.mark(t.replace(/"/g,""),{...Gr,separateWordSearch:!1})))}}t.setAttribute("data-highlight-html-query",null!=e?e:"")}var qr=Object.freeze({__proto__:null,highlightHtml:Vr,highlightHtmlColorCssVariable:Hr,highlightHtmlStyles:Kr});const Yr=ft`
|
|
144
144
|
.ft-no-text-select {
|
|
145
145
|
-webkit-touch-callout: none;
|
|
146
146
|
-webkit-user-select: none;
|
|
@@ -149,7 +149,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
149
149
|
-ms-user-select: none;
|
|
150
150
|
user-select: none;
|
|
151
151
|
}
|
|
152
|
-
`,
|
|
152
|
+
`,Jr=ft`
|
|
153
153
|
.ft-word-wrap {
|
|
154
154
|
white-space: normal;
|
|
155
155
|
word-wrap: break-word;
|
|
@@ -161,7 +161,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
161
161
|
-webkit-hyphens: auto;
|
|
162
162
|
hyphens: auto
|
|
163
163
|
}
|
|
164
|
-
`,
|
|
164
|
+
`,Xr=ft`
|
|
165
165
|
.ft-safari-ellipsis-fix {
|
|
166
166
|
margin-right: 0;
|
|
167
167
|
|
|
@@ -172,7 +172,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
172
172
|
display: inline-block;
|
|
173
173
|
width: 0;
|
|
174
174
|
}
|
|
175
|
-
`;var Xr=Object.freeze({__proto__:null,noTextSelect:qr,safariEllipsisFix:Jr,wordWrap:Yr}),Qr=Object.freeze({__proto__:null});class tn{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var o,i;t=this.resolvePluralKey(t,e);let r=null!==(i=null!==(o=this.labels[t])&&void 0!==o?o:this.defaultLabels[t])&&void 0!==i?i:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,o)=>this.formatValue(t,o))))),r}resolvePluralKey(t,e){for(let o of e)if("number"==typeof o){const e=`${String(t)}[\\=${o}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const o=o=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(o):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(o):t.toLocaleString(o);try{return o(document.documentElement.lang)}catch(t){return o()}}}var en=Object.freeze({__proto__:null,ParametrizedLabelResolver:tn});const on=t=>{const e=null!=t?t:{};return(t,o)=>{var i;const r={hasChanged:(t,e)=>!uo(t,e),attribute:!1,...e};Oe(r)(t,o);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(o,{selector:null!==(i=e.selector)&&void 0!==i?i:t=>t[o],store:e.store})}},rn=t=>(e,o)=>{const i=e.constructor;i.reduxEventListeners=new Map(i.reduxEventListeners),i.reduxEventListeners.set(o,t)};class nn{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function an(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var sn,ln,cn;const dn=Symbol("internalReduxEventsUnsubscribers"),hn=Symbol("internalStoresUnsubscribers"),fn=Symbol("internalStores");class un extends Dr{constructor(){super(...arguments),this[sn]=new Map,this[ln]=new Map,this[cn]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[fn].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[fn].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[fn].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:an(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[fn].delete(e)}setupStore(t,e){this[fn].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[fn].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[hn].has(t.store):this[hn].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[hn].set(t,e.subscribe((()=>this.updateFromStores()))),an(e)&&e.eventBus&&(null===(o=this.reduxConstructor.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const i=t=>this[o](t);e.eventBus.addEventListener(t.eventName,i),this[dn].push((()=>e.eventBus.removeEventListener(t.eventName,i)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[hn].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[dn].forEach((t=>t())),this[dn]=[]}unsubscribeFromStore(t){this[hn].has(t)&&this[hn].get(t)(),this[hn].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function pn(t){for(var e=arguments.length,o=Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function gn(t){return!!t&&!!t[ea]}function yn(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var o=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===oa}(t)||Array.isArray(t)||!!t[ta]||!!(null===(e=t.constructor)||void 0===e?void 0:e[ta])||On(t)||Sn(t))}function bn(t,e,o){void 0===o&&(o=!1),0===mn(t)?(o?Object.keys:ia)(t).forEach((function(i){o&&"symbol"==typeof i||e(i,t[i],t)})):t.forEach((function(o,i){return e(i,o,t)}))}function mn(t){var e=t[ea];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:On(t)?2:Sn(t)?3:0}function vn(t,e){return 2===mn(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function xn(t,e,o){var i=mn(t);2===i?t.set(e,o):3===i?t.add(o):t[e]=o}function wn(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function On(t){return Yn&&t instanceof Map}function Sn(t){return Jn&&t instanceof Set}function Cn(t){return t.o||t.t}function Nn(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ra(t);delete e[ea];for(var o=ia(e),i=0;i<o.length;i++){var r=o[i],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function $n(t,e){return void 0===e&&(e=!1),kn(t)||gn(t)||!yn(t)||(mn(t)>1&&(t.set=t.add=t.clear=t.delete=En),Object.freeze(t),e&&bn(t,(function(t,e){return $n(e,!0)}),!0)),t}function En(){pn(2)}function kn(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function In(t){var e=na[t];return e||pn(18,t),e}function Rn(){return Vn}function Un(t,e){e&&(In("Patches"),t.u=[],t.s=[],t.v=e)}function Ln(t){_n(t),t.p.forEach(Bn),t.p=null}function _n(t){t===Vn&&(Vn=t.l)}function An(t){return Vn={p:[],l:Vn,h:t,m:!0,_:0}}function Bn(t){var e=t[ea];0===e.i||1===e.i?e.j():e.g=!0}function Wn(t,e){e._=e.p.length;var o=e.p[0],i=void 0!==t&&t!==o;return e.h.O||In("ES5").S(e,t,i),i?(o[ea].P&&(Ln(e),pn(4)),yn(t)&&(t=zn(e,t),e.l||Fn(e,t)),e.u&&In("Patches").M(o[ea].t,t,e.u,e.s)):t=zn(e,o,[]),Ln(e),e.u&&e.v(e.u,e.s),t!==Qn?t:void 0}function zn(t,e,o){if(kn(e))return e;var i=e[ea];if(!i)return bn(e,(function(r,n){return Tn(t,i,e,r,n,o)}),!0),e;if(i.A!==t)return e;if(!i.P)return Fn(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var r=4===i.i||5===i.i?i.o=Nn(i.k):i.o,n=r,a=!1;3===i.i&&(n=new Set(r),r.clear(),a=!0),bn(n,(function(e,n){return Tn(t,i,r,e,n,o,a)})),Fn(t,r,!1),o&&t.u&&In("Patches").N(i,o,t.u,t.s)}return i.o}function Tn(t,e,o,i,r,n,a){if(gn(r)){var s=zn(t,r,n&&e&&3!==e.i&&!vn(e.R,i)?n.concat(i):void 0);if(xn(o,i,s),!gn(s))return;t.m=!1}else a&&o.add(r);if(yn(r)&&!kn(r)){if(!t.h.D&&t._<1)return;zn(t,r),e&&e.A.l||Fn(t,r)}}function Fn(t,e,o){void 0===o&&(o=!1),!t.l&&t.h.D&&t.m&&$n(e,o)}function Dn(t,e){var o=t[ea];return(o?Cn(o):t)[e]}function Pn(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var i=Object.getOwnPropertyDescriptor(o,e);if(i)return i;o=Object.getPrototypeOf(o)}}function Mn(t){t.P||(t.P=!0,t.l&&Mn(t.l))}function jn(t){t.o||(t.o=Nn(t.t))}function Zn(t,e,o){var i=On(e)?In("MapSet").F(e,o):Sn(e)?In("MapSet").T(e,o):t.O?function(t,e){var o=Array.isArray(t),i={i:o?1:0,A:e?e.A:Rn(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=i,n=aa;o&&(r=[i],n=sa);var a=Proxy.revocable(r,n),s=a.revoke,l=a.proxy;return i.k=l,i.j=s,l}(e,o):In("ES5").J(e,o);return(o?o.A:Rn()).p.push(i),i}function Hn(t){return gn(t)||pn(22,t),function t(e){if(!yn(e))return e;var o,i=e[ea],r=mn(e);if(i){if(!i.P&&(i.i<4||!In("ES5").K(i)))return i.t;i.I=!0,o=Kn(e,r),i.I=!1}else o=Kn(e,r);return bn(o,(function(e,r){i&&function(t,e){return 2===mn(t)?t.get(e):t[e]}(i.t,e)===r||xn(o,e,t(r))})),3===r?new Set(o):o}(t)}function Kn(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Nn(t)}sn=hn,ln=fn,cn=dn,un.reduxProperties=new Map,un.reduxReactiveProperties=new Set,un.reduxEventListeners=new Map;var Gn,Vn,qn="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Yn="undefined"!=typeof Map,Jn="undefined"!=typeof Set,Xn="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Qn=qn?Symbol.for("immer-nothing"):((Gn={})["immer-nothing"]=!0,Gn),ta=qn?Symbol.for("immer-draftable"):"__$immer_draftable",ea=qn?Symbol.for("immer-state"):"__$immer_state",oa=""+Object.prototype.constructor,ia="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ra=Object.getOwnPropertyDescriptors||function(t){var e={};return ia(t).forEach((function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)})),e},na={},aa={get:function(t,e){if(e===ea)return t;var o=Cn(t);if(!vn(o,e))return function(t,e,o){var i,r=Pn(e,o);return r?"value"in r?r.value:null===(i=r.get)||void 0===i?void 0:i.call(t.k):void 0}(t,o,e);var i=o[e];return t.I||!yn(i)?i:i===Dn(t.t,e)?(jn(t),t.o[e]=Zn(t.A.h,i,t)):i},has:function(t,e){return e in Cn(t)},ownKeys:function(t){return Reflect.ownKeys(Cn(t))},set:function(t,e,o){var i=Pn(Cn(t),e);if(null==i?void 0:i.set)return i.set.call(t.k,o),!0;if(!t.P){var r=Dn(Cn(t),e),n=null==r?void 0:r[ea];if(n&&n.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(wn(o,r)&&(void 0!==o||vn(t.t,e)))return!0;jn(t),Mn(t)}return t.o[e]===o&&(void 0!==o||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Dn(t.t,e)||e in t.t?(t.R[e]=!1,jn(t),Mn(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Cn(t),i=Reflect.getOwnPropertyDescriptor(o,e);return i?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:i.enumerable,value:o[e]}:i},defineProperty:function(){pn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){pn(12)}},sa={};bn(aa,(function(t,e){sa[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),sa.deleteProperty=function(t,e){return sa.set.call(this,t,e,void 0)},sa.set=function(t,e,o){return aa.set.call(this,t[0],e,o,t[0])};var la=function(){function t(t){var e=this;this.O=Xn,this.D=!0,this.produce=function(t,o,i){if("function"==typeof t&&"function"!=typeof o){var r=o;o=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var i=arguments.length,a=Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var i;return(i=o).call.apply(i,[e,t].concat(a))}))}}var a;if("function"!=typeof o&&pn(6),void 0!==i&&"function"!=typeof i&&pn(7),yn(t)){var s=An(e),l=Zn(e,t,void 0),c=!0;try{a=o(l),c=!1}finally{c?Ln(s):_n(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return Un(s,i),Wn(t,s)}),(function(t){throw Ln(s),t})):(Un(s,i),Wn(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=o(t))&&(a=t),a===Qn&&(a=void 0),e.D&&$n(a,!0),i){var d=[],h=[];In("Patches").M(t,a,d,h),i(d,h)}return a}pn(21,t)},this.produceWithPatches=function(t,o){if("function"==typeof t)return function(o){for(var i=arguments.length,r=Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return e.produceWithPatches(o,(function(e){return t.apply(void 0,[e].concat(r))}))};var i,r,n=e.produce(t,o,(function(t,e){i=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,i,r]})):[n,i,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){yn(t)||pn(8),gn(t)&&(t=Hn(t));var e=An(this),o=Zn(this,t,void 0);return o[ea].C=!0,_n(e),o},e.finishDraft=function(t,e){var o=(t&&t[ea]).A;return Un(o,e),Wn(void 0,o)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Xn&&pn(20),this.O=t},e.applyPatches=function(t,e){var o;for(o=e.length-1;o>=0;o--){var i=e[o];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}o>-1&&(e=e.slice(o+1));var r=In("Patches").$;return gn(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),ca=new la,da=ca.produce;function ha(t){return ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(t)}function fa(t){var e=function(t,e){if("object"!==ha(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!==ha(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===ha(e)?e:String(e)}function ua(t,e,o){return(e=fa(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function pa(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function ga(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?pa(Object(o),!0).forEach((function(e){ua(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):pa(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function ya(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. "}ca.produceWithPatches.bind(ca),ca.setAutoFreeze.bind(ca),ca.setUseProxies.bind(ca),ca.applyPatches.bind(ca),ca.createDraft.bind(ca),ca.finishDraft.bind(ca);var ba="function"==typeof Symbol&&Symbol.observable||"@@observable",ma=function(){return Math.random().toString(36).substring(7).split("").join(".")},va={INIT:"@@redux/INIT"+ma(),REPLACE:"@@redux/REPLACE"+ma(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ma()}};function xa(t,e,o){var i;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error(ya(0));if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error(ya(1));return o(xa)(t,e)}if("function"!=typeof t)throw new Error(ya(2));var r=t,n=e,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(ya(3));return n}function h(t){if("function"!=typeof t)throw new Error(ya(4));if(l)throw new Error(ya(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(ya(6));e=!1,c();var o=s.indexOf(t);s.splice(o,1),a=null}}}function f(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(ya(7));if(void 0===t.type)throw new Error(ya(8));if(l)throw new Error(ya(9));try{l=!0,n=r(n,t)}finally{l=!1}for(var e=a=s,o=0;o<e.length;o++){(0,e[o])()}return t}return f({type:va.INIT}),(i={dispatch:f,subscribe:h,getState:d,replaceReducer:function(t){if("function"!=typeof t)throw new Error(ya(10));r=t,f({type:va.REPLACE})}})[ba]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(ya(11));function o(){t.next&&t.next(d())}return o(),{unsubscribe:e(o)}}})[ba]=function(){return this},t},i}function wa(t){for(var e=Object.keys(t),o={},i=0;i<e.length;i++){var r=e[i];"function"==typeof t[r]&&(o[r]=t[r])}var n,a=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:va.INIT}))throw new Error(ya(12));if(void 0===o(void 0,{type:va.PROBE_UNKNOWN_ACTION()}))throw new Error(ya(13))}))}(o)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var i=!1,r={},s=0;s<a.length;s++){var l=a[s],c=o[l],d=t[l],h=c(d,e);if(void 0===h)throw e&&e.type,new Error(ya(14));r[l]=h,i=i||h!==d}return(i=i||a.length!==Object.keys(t).length)?r:t}}function Oa(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Sa(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),i=function(){throw new Error(ya(15))},r={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return i=Oa.apply(void 0,n)(o.dispatch),ga(ga({},o),{},{dispatch:i})}}}function Ca(t){return function(e){var o=e.dispatch,i=e.getState;return function(e){return function(r){return"function"==typeof r?r(o,i,t):e(r)}}}}var Na=Ca();Na.withExtraArgument=Ca;var $a,Ea=Na,ka=($a=function(t,e){return $a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},$a(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}$a(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ia=function(t,e){var o,i,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],i=0}finally{o=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},Ra=function(t,e){for(var o=0,i=e.length,r=t.length;o<i;o++,r++)t[r]=e[o];return t},Ua=Object.defineProperty,La=Object.defineProperties,_a=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertySymbols,Ba=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,za=function(t,e,o){return e in t?Ua(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Ta=function(t,e){for(var o in e||(e={}))Ba.call(e,o)&&za(t,o,e[o]);if(Aa)for(var i=0,r=Aa(e);i<r.length;i++){o=r[i];Wa.call(e,o)&&za(t,o,e[o])}return t},Fa=function(t,e){return La(t,_a(e))},Da="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Oa:Oa.apply(null,arguments)};var Pa=function(t){function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var r=t.apply(this,o)||this;return Object.setPrototypeOf(r,e.prototype),r}return ka(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ra([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ra([void 0],t.concat(this))))},e}(Array),Ma=function(t){function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var r=t.apply(this,o)||this;return Object.setPrototypeOf(r,e.prototype),r}return ka(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ra([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ra([void 0],t.concat(this))))},e}(Array);function ja(t){return yn(t)?da(t,(function(){})):t}function Za(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,o=void 0===e||e;t.immutableCheck,t.serializableCheck;var i=new Pa;o&&(!function(t){return"boolean"==typeof t}(o)?i.push(Ea.withExtraArgument(o.extraArgument)):i.push(Ea));return i}(t)}}function Ha(t){var e,o=Za(),i=t||{},r=i.reducer,n=void 0===r?void 0:r,a=i.middleware,s=void 0===a?o():a,l=i.devTools,c=void 0===l||l,d=i.preloadedState,h=void 0===d?void 0:d,f=i.enhancers,u=void 0===f?void 0:f;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var o=e;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return e===o}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=wa(n)}var p=s;"function"==typeof p&&(p=p(o));var g=Sa.apply(void 0,p),y=Oa;c&&(y=Da(Ta({trace:!1},"object"==typeof c&&c)));var b=new Ma(g),m=b;return Array.isArray(u)?m=Ra([g],u):"function"==typeof u&&(m=u(b)),xa(e,h,y.apply(void 0,m))}function Ka(t,e){function o(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(e){var r=e.apply(void 0,o);if(!r)throw new Error("prepareAction did not return an object");return Ta(Ta({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:o[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(e){return e.type===t},o}function Ga(t){var e,o={},i=[],r={addCase:function(t,e){var i="string"==typeof t?t:t.type;if(i in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[i]=e,r},addMatcher:function(t,e){return i.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[o,i,e]}function Va(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var o,i="function"==typeof t.initialState?t.initialState:ja(t.initialState),r=t.reducers||{},n=Object.keys(r),a={},s={},l={};function c(){var e="function"==typeof t.extraReducers?Ga(t.extraReducers):[t.extraReducers],o=e[0],r=void 0===o?{}:o,n=e[1],a=void 0===n?[]:n,l=e[2],c=void 0===l?void 0:l,d=Ta(Ta({},r),s);return function(t,e,o,i){void 0===o&&(o=[]);var r,n="function"==typeof e?Ga(e):[e,o,i],a=n[0],s=n[1],l=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return ja(t())};else{var c=ja(t);r=function(){return c}}function d(t,e){void 0===t&&(t=r());var o=Ra([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===o.filter((function(t){return!!t})).length&&(o=[l]),o.reduce((function(t,o){if(o){var i;if(gn(t))return void 0===(i=o(t,e))?t:i;if(yn(t))return da(t,(function(t){return o(t,e)}));if(void 0===(i=o(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}return t}),t)}return d.getInitialState=r,d}(i,(function(t){for(var e in d)t.addCase(e,d[e]);for(var o=0,i=a;o<i.length;o++){var r=i[o];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return n.forEach((function(t){var o,i,n=r[t],c=e+"/"+t;"reducer"in n?(o=n.reducer,i=n.prepare):o=n,a[t]=o,s[c]=o,l[t]=i?Ka(c,i):Ka(c)})),{name:e,reducer:function(t,e){return o||(o=c()),o(t,e)},actions:l,caseReducers:a,getInitialState:function(){return o||(o=c()),o.getInitialState()}}}var qa=["name","message","stack","code"],Ya=function(t,e){this.payload=t,this.meta=e},Ja=function(t,e){this.payload=t,this.meta=e},Xa=function(t){if("object"==typeof t&&null!==t){for(var e={},o=0,i=qa;o<i.length;o++){var r=i[o];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function Qa(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,o){var i=Ka(t+"/fulfilled",(function(t,e,o,i){return{payload:t,meta:Fa(Ta({},i||{}),{arg:o,requestId:e,requestStatus:"fulfilled"})}})),r=Ka(t+"/pending",(function(t,e,o){return{payload:void 0,meta:Fa(Ta({},o||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=Ka(t+"/rejected",(function(t,e,i,r,n){return{payload:r,error:(o&&o.serializeError||Xa)(t||"Rejected"),meta:Fa(Ta({},n||{}),{arg:i,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,l,c){var d,h=(null==o?void 0:o.idGenerator)?o.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",o=t;o--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),f=new a;function u(t){d=t,f.abort()}var p=function(){return a=this,p=null,g=function(){var a,p,g,y,b,m;return Ia(this,(function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),y=null==(a=null==o?void 0:o.condition)?void 0:a.call(o,t,{getState:l,extra:c}),null===(x=y)||"object"!=typeof x||"function"!=typeof x.then?[3,2]:[4,y];case 1:y=v.sent(),v.label=2;case 2:if(!1===y||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return f.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:d||"Aborted"})}))})),s(r(h,t,null==(p=null==o?void 0:o.getPendingMeta)?void 0:p.call(o,{requestId:h,arg:t},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:l,extra:c,requestId:h,signal:f.signal,abort:u,rejectWithValue:function(t,e){return new Ya(t,e)},fulfillWithValue:function(t,e){return new Ja(t,e)}})).then((function(e){if(e instanceof Ya)throw e;return e instanceof Ja?i(e.payload,h,t,e.meta):i(e,h,t)}))])];case 3:return g=v.sent(),[3,5];case 4:return m=v.sent(),g=m instanceof Ya?n(null,h,t,m.payload,m.meta):n(m,h,t),[3,5];case 5:return o&&!o.dispatchConditionRejection&&n.match(g)&&g.meta.condition||s(g),[2,g]}var x}))},new Promise((function(t,e){var o=function(t){try{r(g.next(t))}catch(t){e(t)}},i=function(t){try{r(g.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(o,i)};r((g=g.apply(a,p)).next())}));var a,p,g}();return Object.assign(p,{abort:u,requestId:h,arg:t,unwrap:function(){return p.then(Qa)}})}}),{pending:r,rejected:n,fulfilled:i,typePrefix:t})}t.withTypes=function(){return t}}();var ts="listenerMiddleware";Ka(ts+"/add"),Ka(ts+"/removeAll"),Ka(ts+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var o=r[t];return o?o.enumerable=e:r[t]=o={configurable:!0,enumerable:e,get:function(){var e=this[ea];return aa.get(e,t)},set:function(e){var o=this[ea];aa.set(o,t,e)}},o}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][ea];if(!r.P)switch(r.i){case 5:i(r)&&Mn(r);break;case 4:o(r)&&Mn(r)}}}function o(t){for(var e=t.t,o=t.k,i=ia(o),r=i.length-1;r>=0;r--){var n=i[r];if(n!==ea){var a=e[n];if(void 0===a&&!vn(e,n))return!0;var s=o[n],l=s&&s[ea];if(l?l.t!==a:!wn(s,a))return!0}}var c=!!e[ea];return i.length!==ia(e).length+(c?0:1)}function i(t){var e=t.k;if(e.length!==t.t.length)return!0;var o=Object.getOwnPropertyDescriptor(e,e.length-1);if(o&&!o.get)return!0;for(var i=0;i<e.length;i++)if(!e.hasOwnProperty(i))return!0;return!1}var r={};!function(t,e){na[t]||(na[t]=e)}("ES5",{J:function(e,o){var i=Array.isArray(e),r=function(e,o){if(e){for(var i=Array(o.length),r=0;r<o.length;r++)Object.defineProperty(i,""+r,t(r,!0));return i}var n=ra(o);delete n[ea];for(var a=ia(n),s=0;s<a.length;s++){var l=a[s];n[l]=t(l,e||!!n[l].enumerable)}return Object.create(Object.getPrototypeOf(o),n)}(i,e),n={i:i?5:4,A:o?o.A:Rn(),P:!1,I:!1,R:{},l:o,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,ea,{value:n,writable:!0}),r},S:function(t,o,r){r?gn(o)&&o[ea].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var o=e[ea];if(o){var r=o.t,n=o.k,a=o.R,s=o.i;if(4===s)bn(n,(function(e){e!==ea&&(void 0!==r[e]||vn(r,e)?a[e]||t(n[e]):(a[e]=!0,Mn(o)))})),bn(r,(function(t){void 0!==n[t]||vn(n,t)||(a[t]=!1,Mn(o))}));else if(5===s){if(i(o)&&(Mn(o),a.length=!0),n.length<r.length)for(var l=n.length;l<r.length;l++)a[l]=!1;else for(var c=r.length;c<n.length;c++)a[c]=!0;for(var d=Math.min(n.length,r.length),h=0;h<d;h++)n.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(n[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?o(t):i(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class es{static get(t){var e;const o="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,r=window.ftReduxStores[o];if(an(r))return r;if(null==i)return;const n=Va({...i,reducers:null!==(e=i.reducers)&&void 0!==e?e:{}}),a=Ha({reducer:(t,e)=>"CLEAR_FT_REDUX_STORE"===e.type?n.getInitialState():"string"==typeof e.type&&e.type.startsWith("DEFAULT_VALUE_SETTER__")?{...t,...e.overwrites}:n.reducer(t,e)});return window.ftReduxStores[i.name]=new es(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new nn,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,o)=>{const i=e,r=t[i];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[i]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var os=Object.freeze({__proto__:null,FtCommandQueue:nn,FtLitElementRedux:un,FtReduxStore:es,clearAllStores:function(){var t;for(let e of Object.values(null!==(t=window.ftReduxStores)&&void 0!==t?t:{}))an(e)&&e.clear()},isFtReduxStore:an,redux:on,reduxEventListener:rn,reduxReactive:()=>(t,e)=>{var o;const i=t.constructor;i.reduxReactiveProperties=new Set(i.reduxReactiveProperties),null===(o=i.reduxReactiveProperties)||void 0===o||o.add(e)}});var is=Object.freeze({__proto__:null,serializeRequest:function(t,e){var o,i,r,n;const a=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"all"});if((null===(i=e.query)||void 0===i?void 0:i.length)>0&&a.append("query",e.query),e.scope&&"DEFAULT"!==e.scope&&a.append("scope",e.scope.toLowerCase()),e.virtualField&&a.append("virtual-field",e.virtualField.toLowerCase()),e.periodFilter){let t=e.periodFilter.period;const o=t?`_${t.from}_${t.to}`:"";a.append("period",e.periodFilter.periodType.toLowerCase()+o)}if((null===(r=e.sort)||void 0===r?void 0:r.length)>0&&"ft:lastEdition"===e.sort[0].key&&a.append("sort","last_update"),(null===(n=e.filters)||void 0===n?void 0:n.length)>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");a.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${a.toString()}`).href}});const rs=Symbol("elementInternals");function ns(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[rs].form}constructor(...t){super(t),this[rs]=this.attachInternals(),this[rs].role=e}setFormValue(t){this[rs].setFormValue(t)}}}var as,ss,ls,cs,ds=Object.freeze({__proto__:null,toFtFormComponent:ns});const hs=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(ls=null===(ss=null===(as=window.safari)||void 0===as?void 0:as.pushNotification)||void 0===ss?void 0:ss.toString())&&void 0!==ls?ls:""),fs="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;var us;window.ftGlobals=null!==(cs=window.ftGlobals)&&void 0!==cs?cs:{lit:ve,litDecorators:Re,litRepeat:je,litClassMap:He,litStyleMap:qe,litUnsafeHTML:Xe,wcUtils:{...ro,...oo,...ao,...lo,...mo,...Si,...Ei,...Rr,...wi,...Pr,...Mr,...po,...Vr,...Xr,...Qr,...en,...os,...Br,...is,...ds,isSafari:hs,isTouchScreen:fs}},function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(us||(us={}));var ps=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class gs extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const ys=Symbol("registerInterval");class bs extends(function(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[ys]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[ys]):this.dispatchEvent(new gs)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=ys,ps([Se()],o.prototype,"stateManager",void 0),o}(un)){}const ms=xo.extend("--ft-ripple-color","",Oi.colorContent),vs={color:ms,backgroundColor:xo.extend("--ft-ripple-background-color","",ms),opacityContentOnSurfacePressed:xo.external(Oi.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xo.external(Oi.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xo.external(Oi.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xo.external(Oi.opacityContentOnSurfaceSelected,"Design system"),borderRadius:xo.create("--ft-ripple-border-radius","","SIZE","0px")},xs=xo.extend("--ft-ripple-color","",Oi.colorPrimary),ws=xs,Os=xo.extend("--ft-ripple-background-color","",xs),Ss=xo.extend("--ft-ripple-color","",Oi.colorSecondary),Cs=Ss,Ns=xo.extend("--ft-ripple-background-color","",Ss),$s=ft`
|
|
175
|
+
`;var Qr=Object.freeze({__proto__:null,noTextSelect:Yr,safariEllipsisFix:Xr,wordWrap:Jr}),tn=Object.freeze({__proto__:null});class en{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var o,i;t=this.resolvePluralKey(t,e);let r=null!==(i=null!==(o=this.labels[t])&&void 0!==o?o:this.defaultLabels[t])&&void 0!==i?i:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,o)=>this.formatValue(t,o))))),r}resolvePluralKey(t,e){for(let o of e)if("number"==typeof o){const e=`${String(t)}[\\=${o}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const o=o=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(o):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(o):t.toLocaleString(o);try{return o(document.documentElement.lang)}catch(t){return o()}}}var on=Object.freeze({__proto__:null,ParametrizedLabelResolver:en});const rn=t=>{const e=null!=t?t:{};return(t,o)=>{var i;const r={hasChanged:(t,e)=>!uo(t,e),attribute:!1,...e};Oe(r)(t,o);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(o,{selector:null!==(i=e.selector)&&void 0!==i?i:t=>t[o],store:e.store})}},nn=t=>(e,o)=>{const i=e.constructor;i.reduxEventListeners=new Map(i.reduxEventListeners),i.reduxEventListeners.set(o,t)};class an{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function sn(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var ln,cn,dn;const hn=Symbol("internalReduxEventsUnsubscribers"),fn=Symbol("internalStoresUnsubscribers"),un=Symbol("internalStores");class pn extends Dr{constructor(){super(...arguments),this[ln]=new Map,this[cn]=new Map,this[dn]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[un].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[un].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[un].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:sn(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[un].delete(e)}setupStore(t,e){this[un].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[un].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[fn].has(t.store):this[fn].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[fn].set(t,e.subscribe((()=>this.updateFromStores()))),sn(e)&&e.eventBus&&(null===(o=this.reduxConstructor.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const i=t=>this[o](t);e.eventBus.addEventListener(t.eventName,i),this[hn].push((()=>e.eventBus.removeEventListener(t.eventName,i)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[fn].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[hn].forEach((t=>t())),this[hn]=[]}unsubscribeFromStore(t){this[fn].has(t)&&this[fn].get(t)(),this[fn].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function gn(t){for(var e=arguments.length,o=Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function yn(t){return!!t&&!!t[oa]}function bn(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var o=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===ia}(t)||Array.isArray(t)||!!t[ea]||!!(null===(e=t.constructor)||void 0===e?void 0:e[ea])||Sn(t)||Cn(t))}function mn(t,e,o){void 0===o&&(o=!1),0===vn(t)?(o?Object.keys:ra)(t).forEach((function(i){o&&"symbol"==typeof i||e(i,t[i],t)})):t.forEach((function(o,i){return e(i,o,t)}))}function vn(t){var e=t[oa];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Sn(t)?2:Cn(t)?3:0}function xn(t,e){return 2===vn(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function wn(t,e,o){var i=vn(t);2===i?t.set(e,o):3===i?t.add(o):t[e]=o}function On(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Sn(t){return Jn&&t instanceof Map}function Cn(t){return Xn&&t instanceof Set}function Nn(t){return t.o||t.t}function $n(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=na(t);delete e[oa];for(var o=ra(e),i=0;i<o.length;i++){var r=o[i],n=e[r];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[r]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function En(t,e){return void 0===e&&(e=!1),In(t)||yn(t)||!bn(t)||(vn(t)>1&&(t.set=t.add=t.clear=t.delete=kn),Object.freeze(t),e&&mn(t,(function(t,e){return En(e,!0)}),!0)),t}function kn(){gn(2)}function In(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Rn(t){var e=aa[t];return e||gn(18,t),e}function Un(){return qn}function Ln(t,e){e&&(Rn("Patches"),t.u=[],t.s=[],t.v=e)}function _n(t){An(t),t.p.forEach(Wn),t.p=null}function An(t){t===qn&&(qn=t.l)}function Bn(t){return qn={p:[],l:qn,h:t,m:!0,_:0}}function Wn(t){var e=t[oa];0===e.i||1===e.i?e.j():e.g=!0}function zn(t,e){e._=e.p.length;var o=e.p[0],i=void 0!==t&&t!==o;return e.h.O||Rn("ES5").S(e,t,i),i?(o[oa].P&&(_n(e),gn(4)),bn(t)&&(t=Tn(e,t),e.l||Dn(e,t)),e.u&&Rn("Patches").M(o[oa].t,t,e.u,e.s)):t=Tn(e,o,[]),_n(e),e.u&&e.v(e.u,e.s),t!==ta?t:void 0}function Tn(t,e,o){if(In(e))return e;var i=e[oa];if(!i)return mn(e,(function(r,n){return Fn(t,i,e,r,n,o)}),!0),e;if(i.A!==t)return e;if(!i.P)return Dn(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var r=4===i.i||5===i.i?i.o=$n(i.k):i.o,n=r,a=!1;3===i.i&&(n=new Set(r),r.clear(),a=!0),mn(n,(function(e,n){return Fn(t,i,r,e,n,o,a)})),Dn(t,r,!1),o&&t.u&&Rn("Patches").N(i,o,t.u,t.s)}return i.o}function Fn(t,e,o,i,r,n,a){if(yn(r)){var s=Tn(t,r,n&&e&&3!==e.i&&!xn(e.R,i)?n.concat(i):void 0);if(wn(o,i,s),!yn(s))return;t.m=!1}else a&&o.add(r);if(bn(r)&&!In(r)){if(!t.h.D&&t._<1)return;Tn(t,r),e&&e.A.l||Dn(t,r)}}function Dn(t,e,o){void 0===o&&(o=!1),!t.l&&t.h.D&&t.m&&En(e,o)}function Pn(t,e){var o=t[oa];return(o?Nn(o):t)[e]}function Mn(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var i=Object.getOwnPropertyDescriptor(o,e);if(i)return i;o=Object.getPrototypeOf(o)}}function jn(t){t.P||(t.P=!0,t.l&&jn(t.l))}function Zn(t){t.o||(t.o=$n(t.t))}function Hn(t,e,o){var i=Sn(e)?Rn("MapSet").F(e,o):Cn(e)?Rn("MapSet").T(e,o):t.O?function(t,e){var o=Array.isArray(t),i={i:o?1:0,A:e?e.A:Un(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},r=i,n=sa;o&&(r=[i],n=la);var a=Proxy.revocable(r,n),s=a.revoke,l=a.proxy;return i.k=l,i.j=s,l}(e,o):Rn("ES5").J(e,o);return(o?o.A:Un()).p.push(i),i}function Kn(t){return yn(t)||gn(22,t),function t(e){if(!bn(e))return e;var o,i=e[oa],r=vn(e);if(i){if(!i.P&&(i.i<4||!Rn("ES5").K(i)))return i.t;i.I=!0,o=Gn(e,r),i.I=!1}else o=Gn(e,r);return mn(o,(function(e,r){i&&function(t,e){return 2===vn(t)?t.get(e):t[e]}(i.t,e)===r||wn(o,e,t(r))})),3===r?new Set(o):o}(t)}function Gn(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return $n(t)}ln=fn,cn=un,dn=hn,pn.reduxProperties=new Map,pn.reduxReactiveProperties=new Set,pn.reduxEventListeners=new Map;var Vn,qn,Yn="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Jn="undefined"!=typeof Map,Xn="undefined"!=typeof Set,Qn="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ta=Yn?Symbol.for("immer-nothing"):((Vn={})["immer-nothing"]=!0,Vn),ea=Yn?Symbol.for("immer-draftable"):"__$immer_draftable",oa=Yn?Symbol.for("immer-state"):"__$immer_state",ia=""+Object.prototype.constructor,ra="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,na=Object.getOwnPropertyDescriptors||function(t){var e={};return ra(t).forEach((function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)})),e},aa={},sa={get:function(t,e){if(e===oa)return t;var o=Nn(t);if(!xn(o,e))return function(t,e,o){var i,r=Mn(e,o);return r?"value"in r?r.value:null===(i=r.get)||void 0===i?void 0:i.call(t.k):void 0}(t,o,e);var i=o[e];return t.I||!bn(i)?i:i===Pn(t.t,e)?(Zn(t),t.o[e]=Hn(t.A.h,i,t)):i},has:function(t,e){return e in Nn(t)},ownKeys:function(t){return Reflect.ownKeys(Nn(t))},set:function(t,e,o){var i=Mn(Nn(t),e);if(null==i?void 0:i.set)return i.set.call(t.k,o),!0;if(!t.P){var r=Pn(Nn(t),e),n=null==r?void 0:r[oa];if(n&&n.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(On(o,r)&&(void 0!==o||xn(t.t,e)))return!0;Zn(t),jn(t)}return t.o[e]===o&&(void 0!==o||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Pn(t.t,e)||e in t.t?(t.R[e]=!1,Zn(t),jn(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=Nn(t),i=Reflect.getOwnPropertyDescriptor(o,e);return i?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:i.enumerable,value:o[e]}:i},defineProperty:function(){gn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){gn(12)}},la={};mn(sa,(function(t,e){la[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),la.deleteProperty=function(t,e){return la.set.call(this,t,e,void 0)},la.set=function(t,e,o){return sa.set.call(this,t[0],e,o,t[0])};var ca=function(){function t(t){var e=this;this.O=Qn,this.D=!0,this.produce=function(t,o,i){if("function"==typeof t&&"function"!=typeof o){var r=o;o=t;var n=e;return function(t){var e=this;void 0===t&&(t=r);for(var i=arguments.length,a=Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var i;return(i=o).call.apply(i,[e,t].concat(a))}))}}var a;if("function"!=typeof o&&gn(6),void 0!==i&&"function"!=typeof i&&gn(7),bn(t)){var s=Bn(e),l=Hn(e,t,void 0),c=!0;try{a=o(l),c=!1}finally{c?_n(s):An(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return Ln(s,i),zn(t,s)}),(function(t){throw _n(s),t})):(Ln(s,i),zn(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=o(t))&&(a=t),a===ta&&(a=void 0),e.D&&En(a,!0),i){var d=[],h=[];Rn("Patches").M(t,a,d,h),i(d,h)}return a}gn(21,t)},this.produceWithPatches=function(t,o){if("function"==typeof t)return function(o){for(var i=arguments.length,r=Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return e.produceWithPatches(o,(function(e){return t.apply(void 0,[e].concat(r))}))};var i,r,n=e.produce(t,o,(function(t,e){i=t,r=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,i,r]})):[n,i,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){bn(t)||gn(8),yn(t)&&(t=Kn(t));var e=Bn(this),o=Hn(this,t,void 0);return o[oa].C=!0,An(e),o},e.finishDraft=function(t,e){var o=(t&&t[oa]).A;return Ln(o,e),zn(void 0,o)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Qn&&gn(20),this.O=t},e.applyPatches=function(t,e){var o;for(o=e.length-1;o>=0;o--){var i=e[o];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}o>-1&&(e=e.slice(o+1));var r=Rn("Patches").$;return yn(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),da=new ca,ha=da.produce;function fa(t){return fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fa(t)}function ua(t){var e=function(t,e){if("object"!==fa(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!==fa(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===fa(e)?e:String(e)}function pa(t,e,o){return(e=ua(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ga(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function ya(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?ga(Object(o),!0).forEach((function(e){pa(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ga(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function ba(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. "}da.produceWithPatches.bind(da),da.setAutoFreeze.bind(da),da.setUseProxies.bind(da),da.applyPatches.bind(da),da.createDraft.bind(da),da.finishDraft.bind(da);var ma="function"==typeof Symbol&&Symbol.observable||"@@observable",va=function(){return Math.random().toString(36).substring(7).split("").join(".")},xa={INIT:"@@redux/INIT"+va(),REPLACE:"@@redux/REPLACE"+va(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+va()}};function wa(t,e,o){var i;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error(ba(0));if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error(ba(1));return o(wa)(t,e)}if("function"!=typeof t)throw new Error(ba(2));var r=t,n=e,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function d(){if(l)throw new Error(ba(3));return n}function h(t){if("function"!=typeof t)throw new Error(ba(4));if(l)throw new Error(ba(5));var e=!0;return c(),s.push(t),function(){if(e){if(l)throw new Error(ba(6));e=!1,c();var o=s.indexOf(t);s.splice(o,1),a=null}}}function f(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(ba(7));if(void 0===t.type)throw new Error(ba(8));if(l)throw new Error(ba(9));try{l=!0,n=r(n,t)}finally{l=!1}for(var e=a=s,o=0;o<e.length;o++){(0,e[o])()}return t}return f({type:xa.INIT}),(i={dispatch:f,subscribe:h,getState:d,replaceReducer:function(t){if("function"!=typeof t)throw new Error(ba(10));r=t,f({type:xa.REPLACE})}})[ma]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(ba(11));function o(){t.next&&t.next(d())}return o(),{unsubscribe:e(o)}}})[ma]=function(){return this},t},i}function Oa(t){for(var e=Object.keys(t),o={},i=0;i<e.length;i++){var r=e[i];"function"==typeof t[r]&&(o[r]=t[r])}var n,a=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:xa.INIT}))throw new Error(ba(12));if(void 0===o(void 0,{type:xa.PROBE_UNKNOWN_ACTION()}))throw new Error(ba(13))}))}(o)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var i=!1,r={},s=0;s<a.length;s++){var l=a[s],c=o[l],d=t[l],h=c(d,e);if(void 0===h)throw e&&e.type,new Error(ba(14));r[l]=h,i=i||h!==d}return(i=i||a.length!==Object.keys(t).length)?r:t}}function Sa(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ca(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),i=function(){throw new Error(ba(15))},r={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},n=e.map((function(t){return t(r)}));return i=Sa.apply(void 0,n)(o.dispatch),ya(ya({},o),{},{dispatch:i})}}}function Na(t){return function(e){var o=e.dispatch,i=e.getState;return function(e){return function(r){return"function"==typeof r?r(o,i,t):e(r)}}}}var $a=Na();$a.withExtraArgument=Na;var Ea,ka=$a,Ia=(Ea=function(t,e){return Ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},Ea(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ea(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ra=function(t,e){var o,i,r,n,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,i&&(r=2&n[0]?i.return:n[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,n[1])).done)return r;switch(i=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]<r[3])){a.label=n[1];break}if(6===n[0]&&a.label<r[1]){a.label=r[1],r=n;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(n);break}r[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],i=0}finally{o=r=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},Ua=function(t,e){for(var o=0,i=e.length,r=t.length;o<i;o++,r++)t[r]=e[o];return t},La=Object.defineProperty,_a=Object.defineProperties,Aa=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,za=Object.prototype.propertyIsEnumerable,Ta=function(t,e,o){return e in t?La(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Fa=function(t,e){for(var o in e||(e={}))Wa.call(e,o)&&Ta(t,o,e[o]);if(Ba)for(var i=0,r=Ba(e);i<r.length;i++){o=r[i];za.call(e,o)&&Ta(t,o,e[o])}return t},Da=function(t,e){return _a(t,Aa(e))},Pa="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Sa:Sa.apply(null,arguments)};var Ma=function(t){function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var r=t.apply(this,o)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ia(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ua([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ua([void 0],t.concat(this))))},e}(Array),ja=function(t){function e(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var r=t.apply(this,o)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ia(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Ua([void 0],t[0].concat(this)))):new(e.bind.apply(e,Ua([void 0],t.concat(this))))},e}(Array);function Za(t){return bn(t)?ha(t,(function(){})):t}function Ha(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,o=void 0===e||e;t.immutableCheck,t.serializableCheck;var i=new Ma;o&&(!function(t){return"boolean"==typeof t}(o)?i.push(ka.withExtraArgument(o.extraArgument)):i.push(ka));return i}(t)}}function Ka(t){var e,o=Ha(),i=t||{},r=i.reducer,n=void 0===r?void 0:r,a=i.middleware,s=void 0===a?o():a,l=i.devTools,c=void 0===l||l,d=i.preloadedState,h=void 0===d?void 0:d,f=i.enhancers,u=void 0===f?void 0:f;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var o=e;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return e===o}(n))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Oa(n)}var p=s;"function"==typeof p&&(p=p(o));var g=Ca.apply(void 0,p),y=Sa;c&&(y=Pa(Fa({trace:!1},"object"==typeof c&&c)));var b=new ja(g),m=b;return Array.isArray(u)?m=Ua([g],u):"function"==typeof u&&(m=u(b)),wa(e,h,y.apply(void 0,m))}function Ga(t,e){function o(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(e){var r=e.apply(void 0,o);if(!r)throw new Error("prepareAction did not return an object");return Fa(Fa({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:o[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(e){return e.type===t},o}function Va(t){var e,o={},i=[],r={addCase:function(t,e){var i="string"==typeof t?t:t.type;if(i in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[i]=e,r},addMatcher:function(t,e){return i.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[o,i,e]}function qa(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var o,i="function"==typeof t.initialState?t.initialState:Za(t.initialState),r=t.reducers||{},n=Object.keys(r),a={},s={},l={};function c(){var e="function"==typeof t.extraReducers?Va(t.extraReducers):[t.extraReducers],o=e[0],r=void 0===o?{}:o,n=e[1],a=void 0===n?[]:n,l=e[2],c=void 0===l?void 0:l,d=Fa(Fa({},r),s);return function(t,e,o,i){void 0===o&&(o=[]);var r,n="function"==typeof e?Va(e):[e,o,i],a=n[0],s=n[1],l=n[2];if(function(t){return"function"==typeof t}(t))r=function(){return Za(t())};else{var c=Za(t);r=function(){return c}}function d(t,e){void 0===t&&(t=r());var o=Ua([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===o.filter((function(t){return!!t})).length&&(o=[l]),o.reduce((function(t,o){if(o){var i;if(yn(t))return void 0===(i=o(t,e))?t:i;if(bn(t))return ha(t,(function(t){return o(t,e)}));if(void 0===(i=o(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}return t}),t)}return d.getInitialState=r,d}(i,(function(t){for(var e in d)t.addCase(e,d[e]);for(var o=0,i=a;o<i.length;o++){var r=i[o];t.addMatcher(r.matcher,r.reducer)}c&&t.addDefaultCase(c)}))}return n.forEach((function(t){var o,i,n=r[t],c=e+"/"+t;"reducer"in n?(o=n.reducer,i=n.prepare):o=n,a[t]=o,s[c]=o,l[t]=i?Ga(c,i):Ga(c)})),{name:e,reducer:function(t,e){return o||(o=c()),o(t,e)},actions:l,caseReducers:a,getInitialState:function(){return o||(o=c()),o.getInitialState()}}}var Ya=["name","message","stack","code"],Ja=function(t,e){this.payload=t,this.meta=e},Xa=function(t,e){this.payload=t,this.meta=e},Qa=function(t){if("object"==typeof t&&null!==t){for(var e={},o=0,i=Ya;o<i.length;o++){var r=i[o];"string"==typeof t[r]&&(e[r]=t[r])}return e}return{message:String(t)}};function ts(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,o){var i=Ga(t+"/fulfilled",(function(t,e,o,i){return{payload:t,meta:Da(Fa({},i||{}),{arg:o,requestId:e,requestStatus:"fulfilled"})}})),r=Ga(t+"/pending",(function(t,e,o){return{payload:void 0,meta:Da(Fa({},o||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=Ga(t+"/rejected",(function(t,e,i,r,n){return{payload:r,error:(o&&o.serializeError||Qa)(t||"Rejected"),meta:Da(Fa({},n||{}),{arg:i,requestId:e,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(s,l,c){var d,h=(null==o?void 0:o.idGenerator)?o.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",o=t;o--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),f=new a;function u(t){d=t,f.abort()}var p=function(){return a=this,p=null,g=function(){var a,p,g,y,b,m;return Ra(this,(function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),y=null==(a=null==o?void 0:o.condition)?void 0:a.call(o,t,{getState:l,extra:c}),null===(x=y)||"object"!=typeof x||"function"!=typeof x.then?[3,2]:[4,y];case 1:y=v.sent(),v.label=2;case 2:if(!1===y||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return f.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:d||"Aborted"})}))})),s(r(h,t,null==(p=null==o?void 0:o.getPendingMeta)?void 0:p.call(o,{requestId:h,arg:t},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:l,extra:c,requestId:h,signal:f.signal,abort:u,rejectWithValue:function(t,e){return new Ja(t,e)},fulfillWithValue:function(t,e){return new Xa(t,e)}})).then((function(e){if(e instanceof Ja)throw e;return e instanceof Xa?i(e.payload,h,t,e.meta):i(e,h,t)}))])];case 3:return g=v.sent(),[3,5];case 4:return m=v.sent(),g=m instanceof Ja?n(null,h,t,m.payload,m.meta):n(m,h,t),[3,5];case 5:return o&&!o.dispatchConditionRejection&&n.match(g)&&g.meta.condition||s(g),[2,g]}var x}))},new Promise((function(t,e){var o=function(t){try{r(g.next(t))}catch(t){e(t)}},i=function(t){try{r(g.throw(t))}catch(t){e(t)}},r=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(o,i)};r((g=g.apply(a,p)).next())}));var a,p,g}();return Object.assign(p,{abort:u,requestId:h,arg:t,unwrap:function(){return p.then(ts)}})}}),{pending:r,rejected:n,fulfilled:i,typePrefix:t})}t.withTypes=function(){return t}}();var es="listenerMiddleware";Ga(es+"/add"),Ga(es+"/removeAll"),Ga(es+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var o=r[t];return o?o.enumerable=e:r[t]=o={configurable:!0,enumerable:e,get:function(){var e=this[oa];return sa.get(e,t)},set:function(e){var o=this[oa];sa.set(o,t,e)}},o}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][oa];if(!r.P)switch(r.i){case 5:i(r)&&jn(r);break;case 4:o(r)&&jn(r)}}}function o(t){for(var e=t.t,o=t.k,i=ra(o),r=i.length-1;r>=0;r--){var n=i[r];if(n!==oa){var a=e[n];if(void 0===a&&!xn(e,n))return!0;var s=o[n],l=s&&s[oa];if(l?l.t!==a:!On(s,a))return!0}}var c=!!e[oa];return i.length!==ra(e).length+(c?0:1)}function i(t){var e=t.k;if(e.length!==t.t.length)return!0;var o=Object.getOwnPropertyDescriptor(e,e.length-1);if(o&&!o.get)return!0;for(var i=0;i<e.length;i++)if(!e.hasOwnProperty(i))return!0;return!1}var r={};!function(t,e){aa[t]||(aa[t]=e)}("ES5",{J:function(e,o){var i=Array.isArray(e),r=function(e,o){if(e){for(var i=Array(o.length),r=0;r<o.length;r++)Object.defineProperty(i,""+r,t(r,!0));return i}var n=na(o);delete n[oa];for(var a=ra(n),s=0;s<a.length;s++){var l=a[s];n[l]=t(l,e||!!n[l].enumerable)}return Object.create(Object.getPrototypeOf(o),n)}(i,e),n={i:i?5:4,A:o?o.A:Un(),P:!1,I:!1,R:{},l:o,t:e,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,oa,{value:n,writable:!0}),r},S:function(t,o,r){r?yn(o)&&o[oa].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var o=e[oa];if(o){var r=o.t,n=o.k,a=o.R,s=o.i;if(4===s)mn(n,(function(e){e!==oa&&(void 0!==r[e]||xn(r,e)?a[e]||t(n[e]):(a[e]=!0,jn(o)))})),mn(r,(function(t){void 0!==n[t]||xn(n,t)||(a[t]=!1,jn(o))}));else if(5===s){if(i(o)&&(jn(o),a.length=!0),n.length<r.length)for(var l=n.length;l<r.length;l++)a[l]=!1;else for(var c=r.length;c<n.length;c++)a[c]=!0;for(var d=Math.min(n.length,r.length),h=0;h<d;h++)n.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(n[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?o(t):i(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class os{static get(t){var e;const o="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,r=window.ftReduxStores[o];if(sn(r))return r;if(null==i)return;const n=qa({...i,reducers:null!==(e=i.reducers)&&void 0!==e?e:{}}),a=Ka({reducer:(t,e)=>"CLEAR_FT_REDUX_STORE"===e.type?n.getInitialState():"string"==typeof e.type&&e.type.startsWith("DEFAULT_VALUE_SETTER__")?{...t,...e.overwrites}:n.reducer(t,e)});return window.ftReduxStores[i.name]=new os(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new an,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,o)=>{const i=e,r=t[i];return r?(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[i]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var is=Object.freeze({__proto__:null,FtCommandQueue:an,FtLitElementRedux:pn,FtReduxStore:os,clearAllStores:function(){var t;for(let e of Object.values(null!==(t=window.ftReduxStores)&&void 0!==t?t:{}))sn(e)&&e.clear()},isFtReduxStore:sn,redux:rn,reduxEventListener:nn,reduxReactive:()=>(t,e)=>{var o;const i=t.constructor;i.reduxReactiveProperties=new Set(i.reduxReactiveProperties),null===(o=i.reduxReactiveProperties)||void 0===o||o.add(e)}});var rs=Object.freeze({__proto__:null,serializeRequest:function(t,e){var o,i,r,n;const a=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"all"});if((null===(i=e.query)||void 0===i?void 0:i.length)>0&&a.append("query",e.query),e.scope&&"DEFAULT"!==e.scope&&a.append("scope",e.scope.toLowerCase()),e.virtualField&&a.append("virtual-field",e.virtualField.toLowerCase()),e.periodFilter){let t=e.periodFilter.period;const o=t?`_${t.from}_${t.to}`:"";a.append("period",e.periodFilter.periodType.toLowerCase()+o)}if((null===(r=e.sort)||void 0===r?void 0:r.length)>0&&"ft:lastEdition"===e.sort[0].key&&a.append("sort","last_update"),(null===(n=e.filters)||void 0===n?void 0:n.length)>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");a.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${a.toString()}`).href}});const ns=Symbol("elementInternals");function as(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[ns].form}constructor(...t){super(t),this[ns]=this.attachInternals(),this[ns].role=e}setFormValue(t){this[ns].setFormValue(t)}}}var ss,ls,cs,ds,hs=Object.freeze({__proto__:null,toFtFormComponent:as});const fs=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(cs=null===(ls=null===(ss=window.safari)||void 0===ss?void 0:ss.pushNotification)||void 0===ls?void 0:ls.toString())&&void 0!==cs?cs:""),us="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;var ps;window.ftGlobals=null!==(ds=window.ftGlobals)&&void 0!==ds?ds:{lit:ve,litDecorators:Re,litRepeat:je,litClassMap:He,litStyleMap:qe,litUnsafeHTML:Xe,wcUtils:{...ro,...oo,...ao,...lo,...mo,...Si,...Ei,...Rr,...wi,...Pr,...Mr,...po,...qr,...Qr,...tn,...on,...is,...Br,...rs,...hs,isSafari:fs,isTouchScreen:us}},function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(ps||(ps={}));var gs=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ys extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const bs=Symbol("registerInterval");class ms extends(function(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[bs]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[bs]):this.dispatchEvent(new ys)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=bs,gs([Se()],o.prototype,"stateManager",void 0),o}(pn)){}const vs=xo.extend("--ft-ripple-color","",Oi.colorContent),xs={color:vs,backgroundColor:xo.extend("--ft-ripple-background-color","",vs),opacityContentOnSurfacePressed:xo.external(Oi.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xo.external(Oi.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xo.external(Oi.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xo.external(Oi.opacityContentOnSurfaceSelected,"Design system"),borderRadius:xo.create("--ft-ripple-border-radius","","SIZE","0px")},ws=xo.extend("--ft-ripple-color","",Oi.colorPrimary),Os=ws,Ss=xo.extend("--ft-ripple-background-color","",ws),Cs=xo.extend("--ft-ripple-color","",Oi.colorSecondary),Ns=Cs,$s=xo.extend("--ft-ripple-background-color","",Cs),Es=ft`
|
|
176
176
|
:host {
|
|
177
177
|
display: contents;
|
|
178
178
|
}
|
|
@@ -185,7 +185,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
185
185
|
|
|
186
186
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
187
187
|
overflow: hidden;
|
|
188
|
-
border-radius: ${
|
|
188
|
+
border-radius: ${xs.borderRadius};
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
.ft-ripple .ft-ripple--background,
|
|
@@ -219,27 +219,27 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
.ft-ripple .ft-ripple--background {
|
|
222
|
-
background-color: ${
|
|
222
|
+
background-color: ${xs.backgroundColor};
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.ft-ripple .ft-ripple--effect {
|
|
226
|
-
background-color: ${
|
|
226
|
+
background-color: ${xs.color};
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
230
|
-
background-color: ${
|
|
230
|
+
background-color: ${$s};
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
234
|
-
background-color: ${
|
|
234
|
+
background-color: ${Ns};
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
238
|
-
background-color: ${
|
|
238
|
+
background-color: ${Ss};
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
242
|
-
background-color: ${
|
|
242
|
+
background-color: ${Os};
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.ft-ripple .ft-ripple--background {
|
|
@@ -269,32 +269,23 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
272
|
-
opacity: ${
|
|
272
|
+
opacity: ${xs.opacityContentOnSurfaceHover};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
276
|
-
opacity: ${
|
|
276
|
+
opacity: ${xs.opacityContentOnSurfaceSelected};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
280
|
-
opacity: ${
|
|
280
|
+
opacity: ${xs.opacityContentOnSurfaceFocused};
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
284
|
-
opacity: ${
|
|
284
|
+
opacity: ${xs.opacityContentOnSurfacePressed};
|
|
285
285
|
transform: translate(-50%, -50%) scale(1);
|
|
286
286
|
}
|
|
287
|
-
`;const
|
|
287
|
+
`;const ks=xo.extend("--ft-typography-font-family","",Oi.titleFont),Is=xo.extend("--ft-typography-font-family","",Oi.contentFont),Rs={fontFamily:Is,fontSize:xo.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:xo.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:xo.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:xo.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:xo.create("--ft-typography-text-transform","","UNKNOWN","inherit")},Us={fontFamily:xo.extend("--ft-typography-title-font-family","",ks),fontSize:xo.extend("--ft-typography-title-font-size","",Rs.fontSize,"20px"),fontWeight:xo.extend("--ft-typography-title-font-weight","",Rs.fontWeight,"normal"),letterSpacing:xo.extend("--ft-typography-title-letter-spacing","",Rs.letterSpacing,"0.15px"),lineHeight:xo.extend("--ft-typography-title-line-height","",Rs.lineHeight,"1.2"),textTransform:xo.extend("--ft-typography-title-text-transform","",Rs.textTransform,"inherit")},Ls={fontFamily:xo.extend("--ft-typography-title-dense-font-family","",ks),fontSize:xo.extend("--ft-typography-title-dense-font-size","",Rs.fontSize,"14px"),fontWeight:xo.extend("--ft-typography-title-dense-font-weight","",Rs.fontWeight,"normal"),letterSpacing:xo.extend("--ft-typography-title-dense-letter-spacing","",Rs.letterSpacing,"0.105px"),lineHeight:xo.extend("--ft-typography-title-dense-line-height","",Rs.lineHeight,"1.7"),textTransform:xo.extend("--ft-typography-title-dense-text-transform","",Rs.textTransform,"inherit")},_s=xo.extend("--ft-typography-subtitle1-font-family","",Is),As=xo.extend("--ft-typography-subtitle1-font-size","",Rs.fontSize,"16px"),Bs=xo.extend("--ft-typography-subtitle1-font-weight","",Rs.fontWeight,"600"),Ws=xo.extend("--ft-typography-subtitle1-letter-spacing","",Rs.letterSpacing,"0.144px"),zs=xo.extend("--ft-typography-subtitle1-line-height","",Rs.lineHeight,"1.5"),Ts=xo.extend("--ft-typography-subtitle1-text-transform","",Rs.textTransform,"inherit"),Fs=xo.extend("--ft-typography-subtitle2-font-family","",Is),Ds=xo.extend("--ft-typography-subtitle2-font-size","",Rs.fontSize,"14px"),Ps=xo.extend("--ft-typography-subtitle2-font-weight","",Rs.fontWeight,"normal"),Ms=xo.extend("--ft-typography-subtitle2-letter-spacing","",Rs.letterSpacing,"0.098px"),js=xo.extend("--ft-typography-subtitle2-line-height","",Rs.lineHeight,"1.7"),Zs=xo.extend("--ft-typography-subtitle2-text-transform","",Rs.textTransform,"inherit"),Hs={fontFamily:xo.extend("--ft-typography-body1-font-family","",Is),fontSize:xo.extend("--ft-typography-body1-font-size","",Rs.fontSize,"16px"),fontWeight:xo.extend("--ft-typography-body1-font-weight","",Rs.fontWeight,"normal"),letterSpacing:xo.extend("--ft-typography-body1-letter-spacing","",Rs.letterSpacing,"0.496px"),lineHeight:xo.extend("--ft-typography-body1-line-height","",Rs.lineHeight,"1.5"),textTransform:xo.extend("--ft-typography-body1-text-transform","",Rs.textTransform,"inherit")},Ks=xo.extend("--ft-typography-body2-font-family","",Is),Gs=xo.extend("--ft-typography-body2-font-size","",Rs.fontSize,"14px"),Vs=xo.extend("--ft-typography-body2-font-weight","",Rs.fontWeight,"normal"),qs=xo.extend("--ft-typography-body2-letter-spacing","",Rs.letterSpacing,"0.252px"),Ys=xo.extend("--ft-typography-body2-line-height","",Rs.lineHeight,"1.4"),Js=xo.extend("--ft-typography-body2-text-transform","",Rs.textTransform,"inherit"),Xs={fontFamily:xo.extend("--ft-typography-caption-font-family","",Is),fontSize:xo.extend("--ft-typography-caption-font-size","",Rs.fontSize,"12px"),fontWeight:xo.extend("--ft-typography-caption-font-weight","",Rs.fontWeight,"normal"),letterSpacing:xo.extend("--ft-typography-caption-letter-spacing","",Rs.letterSpacing,"0.396px"),lineHeight:xo.extend("--ft-typography-caption-line-height","",Rs.lineHeight,"1.33"),textTransform:xo.extend("--ft-typography-caption-text-transform","",Rs.textTransform,"inherit")},Qs=xo.extend("--ft-typography-breadcrumb-font-family","",Is),tl=xo.extend("--ft-typography-breadcrumb-font-size","",Rs.fontSize,"10px"),el=xo.extend("--ft-typography-breadcrumb-font-weight","",Rs.fontWeight,"normal"),ol=xo.extend("--ft-typography-breadcrumb-letter-spacing","",Rs.letterSpacing,"0.33px"),il=xo.extend("--ft-typography-breadcrumb-line-height","",Rs.lineHeight,"1.6"),rl=xo.extend("--ft-typography-breadcrumb-text-transform","",Rs.textTransform,"inherit"),nl=xo.extend("--ft-typography-overline-font-family","",Is),al=xo.extend("--ft-typography-overline-font-size","",Rs.fontSize,"10px"),sl=xo.extend("--ft-typography-overline-font-weight","",Rs.fontWeight,"normal"),ll=xo.extend("--ft-typography-overline-letter-spacing","",Rs.letterSpacing,"1.5px"),cl=xo.extend("--ft-typography-overline-line-height","",Rs.lineHeight,"1.6"),dl=xo.extend("--ft-typography-overline-text-transform","",Rs.textTransform,"uppercase"),hl={fontFamily:xo.extend("--ft-typography-button-font-family","",Is),fontSize:xo.extend("--ft-typography-button-font-size","",Rs.fontSize,"14px"),fontWeight:xo.extend("--ft-typography-button-font-weight","",Rs.fontWeight,"600"),letterSpacing:xo.extend("--ft-typography-button-letter-spacing","",Rs.letterSpacing,"1.246px"),lineHeight:xo.extend("--ft-typography-button-line-height","",Rs.lineHeight,"1.15"),textTransform:xo.extend("--ft-typography-button-text-transform","",Rs.textTransform,"uppercase")},fl=ft`
|
|
288
288
|
.ft-typography--title {
|
|
289
|
-
font-family: ${Rs.fontFamily};
|
|
290
|
-
font-size: ${Rs.fontSize};
|
|
291
|
-
font-weight: ${Rs.fontWeight};
|
|
292
|
-
letter-spacing: ${Rs.letterSpacing};
|
|
293
|
-
line-height: ${Rs.lineHeight};
|
|
294
|
-
text-transform: ${Rs.textTransform};
|
|
295
|
-
}
|
|
296
|
-
`,fl=ft`
|
|
297
|
-
.ft-typography--title-dense {
|
|
298
289
|
font-family: ${Us.fontFamily};
|
|
299
290
|
font-size: ${Us.fontSize};
|
|
300
291
|
font-weight: ${Us.fontWeight};
|
|
@@ -303,83 +294,92 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
303
294
|
text-transform: ${Us.textTransform};
|
|
304
295
|
}
|
|
305
296
|
`,ul=ft`
|
|
306
|
-
.ft-typography--
|
|
307
|
-
font-family: ${Ls};
|
|
308
|
-
font-size: ${
|
|
309
|
-
font-weight: ${
|
|
310
|
-
letter-spacing: ${
|
|
311
|
-
line-height: ${
|
|
312
|
-
text-transform: ${
|
|
297
|
+
.ft-typography--title-dense {
|
|
298
|
+
font-family: ${Ls.fontFamily};
|
|
299
|
+
font-size: ${Ls.fontSize};
|
|
300
|
+
font-weight: ${Ls.fontWeight};
|
|
301
|
+
letter-spacing: ${Ls.letterSpacing};
|
|
302
|
+
line-height: ${Ls.lineHeight};
|
|
303
|
+
text-transform: ${Ls.textTransform};
|
|
313
304
|
}
|
|
314
305
|
`,pl=ft`
|
|
315
|
-
.ft-typography--
|
|
316
|
-
font-family: ${
|
|
317
|
-
font-size: ${
|
|
318
|
-
font-weight: ${
|
|
319
|
-
letter-spacing: ${
|
|
320
|
-
line-height: ${
|
|
321
|
-
text-transform: ${
|
|
306
|
+
.ft-typography--subtitle1 {
|
|
307
|
+
font-family: ${_s};
|
|
308
|
+
font-size: ${As};
|
|
309
|
+
font-weight: ${Bs};
|
|
310
|
+
letter-spacing: ${Ws};
|
|
311
|
+
line-height: ${zs};
|
|
312
|
+
text-transform: ${Ts};
|
|
322
313
|
}
|
|
323
|
-
|
|
324
314
|
`,gl=ft`
|
|
325
|
-
.ft-typography--
|
|
326
|
-
font-family: ${
|
|
327
|
-
font-size: ${
|
|
328
|
-
font-weight: ${
|
|
329
|
-
letter-spacing: ${
|
|
330
|
-
line-height: ${
|
|
331
|
-
text-transform: ${Zs
|
|
315
|
+
.ft-typography--subtitle2 {
|
|
316
|
+
font-family: ${Fs};
|
|
317
|
+
font-size: ${Ds};
|
|
318
|
+
font-weight: ${Ps};
|
|
319
|
+
letter-spacing: ${Ms};
|
|
320
|
+
line-height: ${js};
|
|
321
|
+
text-transform: ${Zs};
|
|
332
322
|
}
|
|
323
|
+
|
|
333
324
|
`,yl=ft`
|
|
334
|
-
.ft-typography--
|
|
335
|
-
font-family: ${Hs};
|
|
336
|
-
font-size: ${
|
|
337
|
-
font-weight: ${
|
|
338
|
-
letter-spacing: ${
|
|
339
|
-
line-height: ${
|
|
340
|
-
text-transform: ${
|
|
325
|
+
.ft-typography--body1 {
|
|
326
|
+
font-family: ${Hs.fontFamily};
|
|
327
|
+
font-size: ${Hs.fontSize};
|
|
328
|
+
font-weight: ${Hs.fontWeight};
|
|
329
|
+
letter-spacing: ${Hs.letterSpacing};
|
|
330
|
+
line-height: ${Hs.lineHeight};
|
|
331
|
+
text-transform: ${Hs.textTransform};
|
|
341
332
|
}
|
|
342
333
|
`,bl=ft`
|
|
343
|
-
.ft-typography--
|
|
344
|
-
font-family: ${
|
|
345
|
-
font-size: ${
|
|
346
|
-
font-weight: ${
|
|
347
|
-
letter-spacing: ${
|
|
348
|
-
line-height: ${
|
|
349
|
-
text-transform: ${Js
|
|
334
|
+
.ft-typography--body2 {
|
|
335
|
+
font-family: ${Ks};
|
|
336
|
+
font-size: ${Gs};
|
|
337
|
+
font-weight: ${Vs};
|
|
338
|
+
letter-spacing: ${qs};
|
|
339
|
+
line-height: ${Ys};
|
|
340
|
+
text-transform: ${Js};
|
|
350
341
|
}
|
|
351
342
|
`,ml=ft`
|
|
352
|
-
.ft-typography--
|
|
353
|
-
font-family: ${Xs};
|
|
354
|
-
font-size: ${
|
|
355
|
-
font-weight: ${
|
|
356
|
-
letter-spacing: ${
|
|
357
|
-
line-height: ${
|
|
358
|
-
text-transform: ${
|
|
343
|
+
.ft-typography--caption {
|
|
344
|
+
font-family: ${Xs.fontFamily};
|
|
345
|
+
font-size: ${Xs.fontSize};
|
|
346
|
+
font-weight: ${Xs.fontWeight};
|
|
347
|
+
letter-spacing: ${Xs.letterSpacing};
|
|
348
|
+
line-height: ${Xs.lineHeight};
|
|
349
|
+
text-transform: ${Xs.textTransform};
|
|
359
350
|
}
|
|
360
351
|
`,vl=ft`
|
|
361
|
-
.ft-typography--
|
|
362
|
-
font-family: ${
|
|
363
|
-
font-size: ${
|
|
364
|
-
font-weight: ${
|
|
365
|
-
letter-spacing: ${
|
|
366
|
-
line-height: ${
|
|
367
|
-
text-transform: ${
|
|
352
|
+
.ft-typography--breadcrumb {
|
|
353
|
+
font-family: ${Qs};
|
|
354
|
+
font-size: ${tl};
|
|
355
|
+
font-weight: ${el};
|
|
356
|
+
letter-spacing: ${ol};
|
|
357
|
+
line-height: ${il};
|
|
358
|
+
text-transform: ${rl};
|
|
368
359
|
}
|
|
369
360
|
`,xl=ft`
|
|
370
|
-
.ft-typography--
|
|
371
|
-
font-family: ${
|
|
372
|
-
font-size: ${
|
|
373
|
-
font-weight: ${
|
|
374
|
-
letter-spacing: ${
|
|
375
|
-
line-height: ${
|
|
376
|
-
text-transform: ${dl
|
|
361
|
+
.ft-typography--overline {
|
|
362
|
+
font-family: ${nl};
|
|
363
|
+
font-size: ${al};
|
|
364
|
+
font-weight: ${sl};
|
|
365
|
+
letter-spacing: ${ll};
|
|
366
|
+
line-height: ${cl};
|
|
367
|
+
text-transform: ${dl};
|
|
377
368
|
}
|
|
378
369
|
`,wl=ft`
|
|
370
|
+
.ft-typography--button {
|
|
371
|
+
font-family: ${hl.fontFamily};
|
|
372
|
+
font-size: ${hl.fontSize};
|
|
373
|
+
font-weight: ${hl.fontWeight};
|
|
374
|
+
letter-spacing: ${hl.letterSpacing};
|
|
375
|
+
line-height: ${hl.lineHeight};
|
|
376
|
+
text-transform: ${hl.textTransform};
|
|
377
|
+
}
|
|
378
|
+
`,Ol=ft`
|
|
379
379
|
.ft-typography {
|
|
380
380
|
vertical-align: inherit;
|
|
381
381
|
}
|
|
382
|
-
`,
|
|
382
|
+
`,Sl=[Object.keys(qo).map((t=>function(t){const e=qo[t];return ft`
|
|
383
383
|
.ft-typography--${ht(t)} {
|
|
384
384
|
font-family: ${e.fontFamily};
|
|
385
385
|
font-size: ${e.fontSize};
|
|
@@ -388,7 +388,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
388
388
|
line-height: ${e.lineHeight};
|
|
389
389
|
text-transform: ${e.textCase};
|
|
390
390
|
}
|
|
391
|
-
`}(t)))],
|
|
391
|
+
`}(t)))],Cl={color:xo.extend("--ft-loader-color","",Oi.colorPrimary),size:xo.create("--ft-loader-size","","SIZE","80px")},Nl=ft`
|
|
392
392
|
:host {
|
|
393
393
|
line-height: 0;
|
|
394
394
|
}
|
|
@@ -397,8 +397,8 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
397
397
|
display: inline-block;
|
|
398
398
|
position: relative;
|
|
399
399
|
|
|
400
|
-
width: ${
|
|
401
|
-
height: ${
|
|
400
|
+
width: ${Cl.size};
|
|
401
|
+
height: ${Cl.size};
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
.ft-loader div {
|
|
@@ -407,7 +407,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
407
407
|
width: 25%;
|
|
408
408
|
height: 25%;
|
|
409
409
|
border-radius: 50%;
|
|
410
|
-
background: ${
|
|
410
|
+
background: ${Cl.color};
|
|
411
411
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
412
412
|
}
|
|
413
413
|
|
|
@@ -454,10 +454,10 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
454
454
|
transform: translate(0, 0);
|
|
455
455
|
}
|
|
456
456
|
100% {
|
|
457
|
-
transform: translate(calc(0.35 * ${
|
|
457
|
+
transform: translate(calc(0.35 * ${Cl.size}), 0);
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
|
|
460
|
+
`,$l={size:xo.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:xo.extend("--ft-icon-fluid-topics-font-family","",xo.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:xo.extend("--ft-icon-file-format-font-family","",xo.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:xo.extend("--ft-icon-material-font-family","",xo.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:xo.create("--ft-icon-vertical-align","","UNKNOWN","unset")},El=ft`
|
|
461
461
|
:host, i.ft-icon {
|
|
462
462
|
display: inline-flex;
|
|
463
463
|
align-items: center;
|
|
@@ -466,14 +466,14 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
:host {
|
|
469
|
-
width: ${
|
|
470
|
-
height: ${
|
|
469
|
+
width: ${$l.size};
|
|
470
|
+
height: ${$l.size};
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
i.ft-icon {
|
|
474
474
|
width: 100%;
|
|
475
475
|
height: 100%;
|
|
476
|
-
font-size: ${
|
|
476
|
+
font-size: ${$l.size};
|
|
477
477
|
line-height: 1;
|
|
478
478
|
font-weight: normal;
|
|
479
479
|
text-transform: none;
|
|
@@ -484,28 +484,28 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
484
484
|
text-rendering: auto;
|
|
485
485
|
-webkit-font-smoothing: antialiased;
|
|
486
486
|
-moz-osx-font-smoothing: grayscale;
|
|
487
|
-
vertical-align: ${
|
|
487
|
+
vertical-align: ${$l.verticalAlign};
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
i.ft-icon.ft-icon--fluid-topics {
|
|
491
|
-
font-family: ${
|
|
491
|
+
font-family: ${$l.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
492
492
|
|
|
493
493
|
/* Ugly fix because font is broken */
|
|
494
|
-
font-size: calc(0.75 * ${
|
|
495
|
-
line-height: ${
|
|
494
|
+
font-size: calc(0.75 * ${$l.size});
|
|
495
|
+
line-height: ${$l.size};
|
|
496
496
|
position: relative;
|
|
497
497
|
top: -4%;
|
|
498
498
|
justify-content: center;
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
.ft-icon--file-format {
|
|
502
|
-
font-family: ${
|
|
502
|
+
font-family: ${$l.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
.ft-icon--material {
|
|
506
|
-
font-family: ${
|
|
506
|
+
font-family: ${$l.materialFontFamily}, "Material Icons", sans-serif;
|
|
507
507
|
}
|
|
508
|
-
`,
|
|
508
|
+
`,kl=xo.extend("--ft-button-color","",Oi.colorPrimary),Il={backgroundColor:xo.extend("--ft-button-background-color","",Oi.colorSurface),borderRadius:xo.extend("--ft-button-border-radius","",Oi.borderRadiusL),color:kl,fontSize:xo.extend("--ft-button-font-size","",hl.fontSize),iconSize:xo.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:xo.extend("--ft-button-ripple-color","",kl),verticalPadding:xo.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:xo.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:xo.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:xo.external(Oi.colorOpacityDisabled,"Design system")},Rl=xo.extend("--ft-button-primary-color","",xo.extend("--ft-button-color","",Oi.colorOnPrimary)),Ul={backgroundColor:xo.extend("--ft-button-primary-background-color","",xo.extend("--ft-button-background-color","",Oi.colorPrimary)),color:Rl,rippleColor:xo.extend("--ft-button-primary-ripple-color","",Rl)},Ll=xo.extend("--ft-button-dense-border-radius","",xo.extend("--ft-button-border-radius","",Oi.borderRadiusM)),_l=xo.create("--ft-button-dense-vertical-padding","","SIZE","2px"),Al=xo.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),Bl=xo.create("--ft-button-dense-icon-padding","","SIZE","4px"),Wl=[ft`
|
|
509
509
|
:host {
|
|
510
510
|
display: inline-block;
|
|
511
511
|
max-width: 100%;
|
|
@@ -516,7 +516,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
516
516
|
box-shadow: 0px 0px 0px transparent;
|
|
517
517
|
border: 0px solid transparent;
|
|
518
518
|
text-shadow: 0px 0px 0px transparent;
|
|
519
|
-
font-size: ${
|
|
519
|
+
font-size: ${Il.fontSize};
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
button:hover {
|
|
@@ -545,31 +545,31 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
545
545
|
border: none;
|
|
546
546
|
pointer-events: auto;
|
|
547
547
|
|
|
548
|
-
--ft-button-internal-line-height: max(calc(${
|
|
549
|
-
--ft-button-internal-color: ${
|
|
550
|
-
${wo(
|
|
551
|
-
${wo(
|
|
548
|
+
--ft-button-internal-line-height: max(calc(${Il.fontSize} + 2px), ${Il.iconSize});
|
|
549
|
+
--ft-button-internal-color: ${Il.color};
|
|
550
|
+
${wo($l.size,Il.iconSize)};
|
|
551
|
+
${wo(xs.color,Il.rippleColor)};
|
|
552
552
|
|
|
553
|
-
border-radius: ${
|
|
554
|
-
padding: ${
|
|
555
|
-
background-color: ${
|
|
553
|
+
border-radius: ${Il.borderRadius};
|
|
554
|
+
padding: ${Il.verticalPadding} ${Il.horizontalPadding};
|
|
555
|
+
background-color: ${Il.backgroundColor};
|
|
556
556
|
color: var(--ft-button-internal-color);
|
|
557
557
|
-webkit-mask-image: radial-gradient(white, black);
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
.ft-button.ft-button--outlined {
|
|
561
561
|
border: 1px solid var(--ft-button-internal-color);
|
|
562
|
-
padding: calc(${
|
|
562
|
+
padding: calc(${Il.verticalPadding} - 1px) calc(${Il.horizontalPadding} - 1px);
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
.ft-button.ft-button--dense {
|
|
566
|
-
padding: ${
|
|
567
|
-
border-radius: ${
|
|
568
|
-
gap: ${
|
|
566
|
+
padding: ${_l} ${Al};
|
|
567
|
+
border-radius: ${Ll};
|
|
568
|
+
gap: ${Bl};
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
572
|
-
padding: calc(${
|
|
572
|
+
padding: calc(${_l} - 1px) calc(${Al} - 1px);
|
|
573
573
|
}
|
|
574
574
|
|
|
575
575
|
.ft-button:not([disabled]):hover {
|
|
@@ -577,22 +577,22 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
.ft-button--round {
|
|
580
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
580
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${Il.verticalPadding});
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
.ft-button--round.ft-button--dense {
|
|
584
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
584
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${_l});
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
.ft-button[disabled] {
|
|
588
588
|
filter: grayscale(1);
|
|
589
|
-
opacity: ${
|
|
589
|
+
opacity: ${Il.opacityDisabled};
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
.ft-button.ft-button--primary {
|
|
593
|
-
background-color: ${
|
|
594
|
-
--ft-button-internal-color: ${
|
|
595
|
-
${wo(
|
|
593
|
+
background-color: ${Ul.backgroundColor};
|
|
594
|
+
--ft-button-internal-color: ${Ul.color};
|
|
595
|
+
${wo(xs.color,Ul.rippleColor)};
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
.ft-button:focus {
|
|
@@ -605,13 +605,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
605
605
|
white-space: nowrap;
|
|
606
606
|
text-overflow: ellipsis;
|
|
607
607
|
display: block;
|
|
608
|
-
margin: 0 ${
|
|
609
|
-
${wo(
|
|
610
|
-
${wo(
|
|
608
|
+
margin: 0 ${Il.iconPadding};
|
|
609
|
+
${wo(hl.fontSize,"1em")};
|
|
610
|
+
${wo(hl.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
.ft-button--dense .ft-button--label {
|
|
614
|
-
margin: 0 ${
|
|
614
|
+
margin: 0 ${Bl};
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
.ft-button--label[hidden] {
|
|
@@ -624,13 +624,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
.ft-button--label[hidden] + ft-icon {
|
|
627
|
-
margin: 0 calc(${
|
|
628
|
-
padding: 0 ${
|
|
627
|
+
margin: 0 calc(${Il.horizontalPadding} * -1);
|
|
628
|
+
padding: 0 ${Il.verticalPadding};
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
632
|
-
margin: 0 calc(${
|
|
633
|
-
padding: 0 ${
|
|
632
|
+
margin: 0 calc(${Al} * -1);
|
|
633
|
+
padding: 0 ${_l};
|
|
634
634
|
}
|
|
635
635
|
|
|
636
636
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -639,10 +639,10 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
639
639
|
}
|
|
640
640
|
|
|
641
641
|
ft-loader {
|
|
642
|
-
${wo(
|
|
643
|
-
${wo(
|
|
642
|
+
${wo(Cl.size,Il.iconSize)};
|
|
643
|
+
${wo(Cl.color,"var(--ft-button-internal-color)")};
|
|
644
644
|
}
|
|
645
|
-
`,
|
|
645
|
+
`,Yr],zl={textColor:xo.extend("--ft-switch-text-color","",Oi.colorOnSurfaceHigh),backgroundColor:xo.extend("--ft-switch-background-color","",Oi.colorSurface),selectedTextColor:xo.extend("--ft-switch-selected-text-color","",Oi.colorPrimary),selectedBackgroundColor:xo.extend("--ft-switch-selected-background-color","",Oi.colorPrimary),borderColor:xo.extend("--ft-switch-border-color","",Oi.colorOutline),borderRadius:xo.extend("--ft-switch-border-radius","",Oi.borderRadiusL),fontSize:xo.extend("--ft-switch-font-size","",hl.fontSize),iconSize:xo.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:xo.extend("--ft-switch-text-color","",Oi.colorOnSurfaceMedium),rippleColor:xo.extend("--ft-switch-ripple-color","",Oi.colorPrimary),outlineColor:xo.extend("--ft-switch-outline-color","",Oi.colorPrimary)},Tl={feedbackInputMinWidth:xo.create("--ft-reader-feedback-input-min-width","","SIZE","300px"),ratedDateColor:xo.external(Oi.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:xo.extend("--ft-reader-feedback-send-feedback-color","",Oi.colorOnPrimary),sendFeedbackBackgroundColor:xo.extend("--ft-reader-feedback-send-feedback-background-color","",Oi.colorPrimary),filledRatingColor:xo.extend("--ft-reader-feedback-filled-rating-color","",Oi.colorPrimary),emptyRatingColor:xo.extend("--ft-reader-feedback-empty-rating-color","",Oi.colorOnSurfaceMedium),mainTitleFontSize:xo.external(Us.fontSize,"Typography"),sectionTitleFontSize:xo.external(Ls.fontSize,"Typography"),starsBackgroundColor:xo.create("--ft-reader-feedback-stars-background-color","","COLOR",Oi.colorSurface)},Fl=ft`
|
|
646
646
|
.ft-reader-feedback {
|
|
647
647
|
box-sizing: border-box;
|
|
648
648
|
display: flex;
|
|
@@ -655,7 +655,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
655
655
|
flex-direction: row;
|
|
656
656
|
align-items: center;
|
|
657
657
|
margin-left: -6px;
|
|
658
|
-
${wo(
|
|
658
|
+
${wo(Il.backgroundColor,Tl.starsBackgroundColor)}
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
.ft-reader-feedback--rating, .ft-reader-feedback--feedback {
|
|
@@ -668,14 +668,14 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
.ft-reader-feedback--rating {
|
|
671
|
-
${wo(
|
|
672
|
-
${wo(
|
|
673
|
-
${wo(
|
|
674
|
-
${wo(
|
|
671
|
+
${wo(Il.color,Tl.emptyRatingColor)};
|
|
672
|
+
${wo(Il.rippleColor,Tl.filledRatingColor)};
|
|
673
|
+
${wo(zl.textColor,Tl.emptyRatingColor)};
|
|
674
|
+
${wo(zl.selectedTextColor,Tl.filledRatingColor)};
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
.ft-reader-feedback--rating .ft-reader-feedback--active {
|
|
678
|
-
${wo(
|
|
678
|
+
${wo(Il.color,Tl.filledRatingColor)};
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
.ft-reader-feedback--feedback {
|
|
@@ -683,16 +683,16 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
.ft-reader-feedback--rating-date {
|
|
686
|
-
color: ${
|
|
686
|
+
color: ${Tl.ratedDateColor};
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
.ft-reader-feedback--feedback ft-text-area {
|
|
690
|
-
min-width: ${
|
|
690
|
+
min-width: ${Tl.feedbackInputMinWidth};
|
|
691
691
|
}
|
|
692
692
|
|
|
693
693
|
.ft-reader-feedback--send-feedback, .ft-reader-feedback--feedback-link {
|
|
694
|
-
${wo(
|
|
695
|
-
${wo(
|
|
694
|
+
${wo(Il.color,Tl.sendFeedbackColor)};
|
|
695
|
+
${wo(Il.backgroundColor,Tl.sendFeedbackBackgroundColor)};
|
|
696
696
|
}
|
|
697
697
|
|
|
698
698
|
[part="buttons-container"] {
|
|
@@ -703,14 +703,14 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
703
703
|
* @license
|
|
704
704
|
* Copyright 2020 Google LLC
|
|
705
705
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
706
|
-
*/,
|
|
707
|
-
<${
|
|
706
|
+
*/,Dl=Symbol.for(""),Pl=t=>{if(t?.r===Dl)return t?._$litStatic$},Ml=t=>({_$litStatic$:t,r:Dl}),jl=new Map,Zl=(t=>(e,...o)=>{const i=o.length;let r,n;const a=[],s=[];let l,c=0,d=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=Pl(n));)l+=r+e[++c],d=!0;c!==i&&s.push(n),a.push(l),c++}if(c===i&&a.push(e[i]),d){const t=a.join("$$lit$$");void 0===(e=jl.get(t))&&(a.raw=a,jl.set(t,e=a)),o=s}return t(e,...o)})(M);var Hl;!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",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(Hl||(Hl={}));var Kl=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Gl extends Dr{constructor(){super(...arguments),this.variant=Hl.body1}render(){return this.element?Zl`
|
|
707
|
+
<${Ml(this.element)}
|
|
708
708
|
class="ft-typography ft-typography--${this.variant}">
|
|
709
709
|
<slot></slot>
|
|
710
|
-
</${
|
|
711
|
-
`:
|
|
710
|
+
</${Ml(this.element)}>
|
|
711
|
+
`:Zl`
|
|
712
712
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
713
|
-
`}}
|
|
713
|
+
`}}Gl.styles=[fl,ul,pl,gl,yl,bl,ml,vl,xl,wl,Ol,...Sl],Kl([Oe()],Gl.prototype,"element",void 0),Kl([Oe()],Gl.prototype,"variant",void 0),go("ft-typography")(Gl);var Vl=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ql extends Dr{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new so(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new so(10),this.moveRipple=t=>{var e,o;let{x:i,y:r}=this.getCoordinates(t),n=null!==(o=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==o?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return Jt`
|
|
714
714
|
<style>
|
|
715
715
|
.ft-ripple .ft-ripple--effect {
|
|
716
716
|
left: ${this.originX}px;
|
|
@@ -721,7 +721,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
721
721
|
<div class="ft-ripple--background"></div>
|
|
722
722
|
<div class="ft-ripple--effect"></div>
|
|
723
723
|
</div>
|
|
724
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",o,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",o,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}
|
|
724
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",o,n),t.addEventListener("touchstart",i,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",r,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",o,n),t.removeEventListener("touchstart",i,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",r,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}ql.elementDefinitions={},ql.styles=Es,Vl([Oe({type:Boolean})],ql.prototype,"primary",void 0),Vl([Oe({type:Boolean})],ql.prototype,"secondary",void 0),Vl([Oe({type:Boolean})],ql.prototype,"unbounded",void 0),Vl([Oe({type:Boolean})],ql.prototype,"activated",void 0),Vl([Oe({type:Boolean})],ql.prototype,"selected",void 0),Vl([Oe({type:Boolean})],ql.prototype,"disabled",void 0),Vl([Se()],ql.prototype,"hovered",void 0),Vl([Se()],ql.prototype,"focused",void 0),Vl([Se()],ql.prototype,"pressed",void 0),Vl([Se()],ql.prototype,"rippling",void 0),Vl([Se()],ql.prototype,"originX",void 0),Vl([Se()],ql.prototype,"originY",void 0),Vl([$e(".ft-ripple")],ql.prototype,"ripple",void 0),Vl([$e(".ft-ripple--effect")],ql.prototype,"rippleEffect",void 0),go("ft-ripple")(ql);const Yl=xo.create("--ft-tooltip-distance","","SIZE","4px"),Jl=xo.create("--ft-tooltip-color","","COLOR","#FFFFFF"),Xl=xo.create("--ft-tooltip-background-color","","COLOR","#666666"),Ql=xo.create("--ft-tooltip-z-index","","NUMBER","100"),tc=xo.external(Oi.borderRadiusS,"Design system"),ec=xo.create("--ft-tooltip-max-width","","SIZE","150px"),oc=ft`
|
|
725
725
|
.ft-tooltip--container {
|
|
726
726
|
display: block;
|
|
727
727
|
}
|
|
@@ -736,21 +736,21 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
736
736
|
box-sizing: border-box;
|
|
737
737
|
overflow: hidden;
|
|
738
738
|
width: max-content;
|
|
739
|
-
max-width: ${
|
|
739
|
+
max-width: ${ec};
|
|
740
740
|
text-align: center;
|
|
741
|
-
padding: ${
|
|
742
|
-
z-index: ${
|
|
741
|
+
padding: ${Yl};
|
|
742
|
+
z-index: ${Ql};
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
.ft-tooltip--content {
|
|
746
746
|
padding: 4px 8px;
|
|
747
|
-
border-radius: ${
|
|
748
|
-
background-color: ${
|
|
749
|
-
color: ${
|
|
747
|
+
border-radius: ${tc};
|
|
748
|
+
background-color: ${Xl};
|
|
749
|
+
color: ${Jl};
|
|
750
750
|
position: relative;
|
|
751
751
|
word-break: break-word;
|
|
752
752
|
}
|
|
753
|
-
`;var
|
|
753
|
+
`;var ic,rc,nc,ac=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class sc extends Dr{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new so,this.revealDebouncer=new so}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return Jt`
|
|
754
754
|
<div part="container"
|
|
755
755
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
756
756
|
@mouseenter=${this.onHover}
|
|
@@ -768,12 +768,12 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
768
768
|
</div>
|
|
769
769
|
</div>
|
|
770
770
|
</div>
|
|
771
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,null!=t&&await this.hideDebounce.run((()=>{this.hide()}),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Ir(this.slottedElement,this.tooltip,this.position).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}ac.elementDefinitions={"ft-typography":Kl},ac.styles=ec,nc([Oe()],ac.prototype,"text",void 0),nc([Oe({type:Boolean})],ac.prototype,"manual",void 0),nc([Oe({type:Boolean})],ac.prototype,"inline",void 0),nc([Oe({type:Number})],ac.prototype,"delay",void 0),nc([Oe()],ac.prototype,"position",void 0),nc([Ie()],ac.prototype,"slotNodes",void 0),nc([$e(".ft-tooltip--container")],ac.prototype,"container",void 0),nc([$e(".ft-tooltip")],ac.prototype,"tooltip",void 0),nc([$e(".ft-tooltip--content")],ac.prototype,"tooltipContent",void 0),nc([Se()],ac.prototype,"visible",void 0),nc([Ce({passive:!0})],ac.prototype,"onTouch",null),nc([Ce({passive:!0})],ac.prototype,"onHover",null),nc([Ce({passive:!0})],ac.prototype,"onOut",null),nc([Ce({passive:!0})],ac.prototype,"onClick",null),go("ft-tooltip")(ac),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE="",t.OCTAGON_XMARK="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CONSUMER="",t.HOURGLASS_HALF="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE=""}(oc||(oc={})),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=""}(ic||(ic={})),new Map([...["abw"].map((t=>[t,ic.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,ic.AUDIO])),...["avi"].map((t=>[t,ic.AVI])),...["chm","xhs"].map((t=>[t,ic.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,ic.CODE])),...["csv"].map((t=>[t,ic.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,ic.DITA])),...["epub"].map((t=>[t,ic.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,ic.EXCEL])),...["flac"].map((t=>[t,ic.FLAC])),...["gif"].map((t=>[t,ic.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,ic.GZIP])),...["html","htm","xhtml"].map((t=>[t,ic.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,ic.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,ic.JPEG])),...["json"].map((t=>[t,ic.JSON])),...["m4a","m4p"].map((t=>[t,ic.M4A])),...["mov","qt"].map((t=>[t,ic.MOV])),...["mp3"].map((t=>[t,ic.MP3])),...["mp4","m4v"].map((t=>[t,ic.MP4])),...["ogg","oga"].map((t=>[t,ic.OGG])),...["pdf","ps"].map((t=>[t,ic.PDF])),...["png"].map((t=>[t,ic.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,ic.POWERPOINT])),...["rar"].map((t=>[t,ic.RAR])),...["stp"].map((t=>[t,ic.STP])),...["txt","rtf","md","mdown"].map((t=>[t,ic.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,ic.VIDEO])),...["wav"].map((t=>[t,ic.WAV])),...["wma"].map((t=>[t,ic.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,ic.WORD])),...["xml","xsl","rdf"].map((t=>[t,ic.XML])),...["yaml","yml","x-yaml"].map((t=>[t,ic.YAML])),...["zip"].map((t=>[t,ic.ZIP]))]),ic.ABW,ic.AUDIO,ic.AVI,ic.CHM,ic.CODE,ic.CSV,ic.DITA,ic.EPUB,ic.EXCEL,ic.FLAC,ic.GIF,ic.GZIP,ic.HTML,ic.IMAGE,ic.JPEG,ic.JSON,ic.M4A,ic.MOV,ic.MP3,ic.MP4,ic.OGG,ic.PDF,ic.PNG,ic.POWERPOINT,ic.RAR,ic.STP,ic.TEXT,ic.UNKNOWN,ic.VIDEO,ic.WAV,ic.WMA,ic.WORD,ic.XML,ic.YAML,ic.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(rc||(rc={}));var sc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class lc extends Dr{constructor(){super(...arguments),this.resolvedIcon=te}render(){const t=this.variant&&Object.values(rc).includes(this.variant)?this.variant:rc.fluid_topics,e=t!==rc.material||!!this.value;return Jt`
|
|
771
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}async show(t){this.visible=!0,null!=t&&await this.hideDebounce.run((()=>{this.hide()}),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Ir(this.slottedElement,this.tooltip,this.position).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}sc.elementDefinitions={"ft-typography":Gl},sc.styles=oc,ac([Oe()],sc.prototype,"text",void 0),ac([Oe({type:Boolean})],sc.prototype,"manual",void 0),ac([Oe({type:Boolean})],sc.prototype,"inline",void 0),ac([Oe({type:Number})],sc.prototype,"delay",void 0),ac([Oe()],sc.prototype,"position",void 0),ac([Ie()],sc.prototype,"slotNodes",void 0),ac([$e(".ft-tooltip--container")],sc.prototype,"container",void 0),ac([$e(".ft-tooltip")],sc.prototype,"tooltip",void 0),ac([$e(".ft-tooltip--content")],sc.prototype,"tooltipContent",void 0),ac([Se()],sc.prototype,"visible",void 0),ac([Ce({passive:!0})],sc.prototype,"onTouch",null),ac([Ce({passive:!0})],sc.prototype,"onHover",null),ac([Ce({passive:!0})],sc.prototype,"onOut",null),ac([Ce({passive:!0})],sc.prototype,"onClick",null),go("ft-tooltip")(sc),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.CHART_BAR_NORMALIZED="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE="",t.OCTAGON_XMARK="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK="",t.CLONE="",t.CLONE_LINK_SIMPLE="",t.CONSUMER="",t.HOURGLASS_HALF="",t.CLOCK_THREE="",t.CALENDAR_DAY="",t.COMPUTER_MOUSE_MAGNIFYING_GLASS="",t.WAND_MAGIC_SPARKLES="",t.PAPER_PLANE=""}(ic||(ic={})),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=""}(rc||(rc={})),new Map([...["abw"].map((t=>[t,rc.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,rc.AUDIO])),...["avi"].map((t=>[t,rc.AVI])),...["chm","xhs"].map((t=>[t,rc.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,rc.CODE])),...["csv"].map((t=>[t,rc.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,rc.DITA])),...["epub"].map((t=>[t,rc.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,rc.EXCEL])),...["flac"].map((t=>[t,rc.FLAC])),...["gif"].map((t=>[t,rc.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,rc.GZIP])),...["html","htm","xhtml"].map((t=>[t,rc.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,rc.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,rc.JPEG])),...["json"].map((t=>[t,rc.JSON])),...["m4a","m4p"].map((t=>[t,rc.M4A])),...["mov","qt"].map((t=>[t,rc.MOV])),...["mp3"].map((t=>[t,rc.MP3])),...["mp4","m4v"].map((t=>[t,rc.MP4])),...["ogg","oga"].map((t=>[t,rc.OGG])),...["pdf","ps"].map((t=>[t,rc.PDF])),...["png"].map((t=>[t,rc.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,rc.POWERPOINT])),...["rar"].map((t=>[t,rc.RAR])),...["stp"].map((t=>[t,rc.STP])),...["txt","rtf","md","mdown"].map((t=>[t,rc.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,rc.VIDEO])),...["wav"].map((t=>[t,rc.WAV])),...["wma"].map((t=>[t,rc.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,rc.WORD])),...["xml","xsl","rdf"].map((t=>[t,rc.XML])),...["yaml","yml","x-yaml"].map((t=>[t,rc.YAML])),...["zip"].map((t=>[t,rc.ZIP]))]),rc.ABW,rc.AUDIO,rc.AVI,rc.CHM,rc.CODE,rc.CSV,rc.DITA,rc.EPUB,rc.EXCEL,rc.FLAC,rc.GIF,rc.GZIP,rc.HTML,rc.IMAGE,rc.JPEG,rc.JSON,rc.M4A,rc.MOV,rc.MP3,rc.MP4,rc.OGG,rc.PDF,rc.PNG,rc.POWERPOINT,rc.RAR,rc.STP,rc.TEXT,rc.UNKNOWN,rc.VIDEO,rc.WAV,rc.WMA,rc.WORD,rc.XML,rc.YAML,rc.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(nc||(nc={}));var lc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class cc extends Dr{constructor(){super(...arguments),this.resolvedIcon=te}render(){const t=this.variant&&Object.values(nc).includes(this.variant)?this.variant:nc.fluid_topics,e=t!==nc.material||!!this.value;return Jt`
|
|
772
772
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
773
773
|
${Je(this.resolvedIcon)}
|
|
774
774
|
<slot ?hidden=${e}></slot>
|
|
775
775
|
</i>
|
|
776
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
776
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case nc.file_format:this.resolvedIcon=null!==(t=rc[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case nc.material:this.resolvedIcon=this.value||te;break;default:this.resolvedIcon=null!==(e=ic[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}cc.elementDefinitions={},cc.styles=El,lc([Oe()],cc.prototype,"variant",void 0),lc([Oe()],cc.prototype,"value",void 0),lc([Se()],cc.prototype,"resolvedIcon",void 0),lc([$e("slot")],cc.prototype,"slottedContent",void 0),go("ft-icon")(cc);const dc={borderRadiusLeft:xo.extend("--ft-switch-option-border-radius-left","",Oi.borderRadiusL),borderRadiusRight:xo.extend("--ft-switch-option-border-radius-right","",Oi.borderRadiusL),borderWidthLeft:xo.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:xo.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:xo.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},hc=ft`
|
|
777
777
|
.ft-switch-option {
|
|
778
778
|
position: relative;
|
|
779
779
|
display: inline-block;
|
|
@@ -787,20 +787,20 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
787
787
|
}
|
|
788
788
|
|
|
789
789
|
.ft-switch-option--content {
|
|
790
|
-
--ft-switch-option-internal-line-height: calc(${
|
|
791
|
-
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${
|
|
790
|
+
--ft-switch-option-internal-line-height: calc(${zl.fontSize} + 2px);
|
|
791
|
+
--ft-switch-option-internal-content-height: max(var(--ft-switch-option-internal-line-height), ${zl.iconSize});
|
|
792
792
|
|
|
793
793
|
border-style: solid;
|
|
794
|
-
border-color: ${
|
|
795
|
-
border-width: ${
|
|
796
|
-
border-radius: ${
|
|
794
|
+
border-color: ${zl.borderColor};
|
|
795
|
+
border-width: ${dc.borderWidthVertical} ${dc.borderWidthRight} ${dc.borderWidthVertical} ${dc.borderWidthLeft};
|
|
796
|
+
border-radius: ${dc.borderRadiusLeft} ${dc.borderRadiusRight} ${dc.borderRadiusRight} ${dc.borderRadiusLeft};
|
|
797
797
|
display: flex;
|
|
798
798
|
align-items: center;
|
|
799
799
|
justify-content: center;
|
|
800
800
|
overflow: hidden;
|
|
801
|
-
${wo(
|
|
801
|
+
${wo($l.size,zl.iconSize)};
|
|
802
802
|
padding: var(--ft-switch-internal-vertical-padding, 6px) var(--ft-switch-internal-horizontal-padding, 8px);
|
|
803
|
-
background-color: ${
|
|
803
|
+
background-color: ${zl.backgroundColor};
|
|
804
804
|
-webkit-mask-image: radial-gradient(white, black);
|
|
805
805
|
}
|
|
806
806
|
|
|
@@ -809,8 +809,8 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
809
809
|
}
|
|
810
810
|
|
|
811
811
|
.ft-switch-option--selected .ft-switch-option--content:before {
|
|
812
|
-
background-color: ${
|
|
813
|
-
border-radius: ${
|
|
812
|
+
background-color: ${zl.selectedBackgroundColor};
|
|
813
|
+
border-radius: ${dc.borderRadiusLeft} ${dc.borderRadiusRight} ${dc.borderRadiusRight} ${dc.borderRadiusLeft};
|
|
814
814
|
position: absolute;
|
|
815
815
|
inset: 0;
|
|
816
816
|
content: "";
|
|
@@ -819,18 +819,18 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
.ft-switch-option--label {
|
|
822
|
-
color: ${
|
|
822
|
+
color: ${zl.textColor};
|
|
823
823
|
overflow: hidden;
|
|
824
824
|
white-space: nowrap;
|
|
825
825
|
text-overflow: ellipsis;
|
|
826
826
|
display: block;
|
|
827
827
|
margin: 0 8px;
|
|
828
|
-
${wo(
|
|
829
|
-
${wo(
|
|
828
|
+
${wo(hl.fontSize,zl.fontSize)};
|
|
829
|
+
${wo(hl.lineHeight,"var(--ft-switch-option-internal-content-height)")}
|
|
830
830
|
}
|
|
831
831
|
|
|
832
832
|
.ft-switch-option--selected .ft-switch-option--label {
|
|
833
|
-
color: ${
|
|
833
|
+
color: ${zl.selectedTextColor};
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
.ft-switch-option--label[hidden] {
|
|
@@ -838,7 +838,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
838
838
|
}
|
|
839
839
|
|
|
840
840
|
.ft-switch-option--ripple {
|
|
841
|
-
${wo(
|
|
841
|
+
${wo(xs.color,zl.rippleColor)};
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -851,20 +851,20 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
851
851
|
|
|
852
852
|
ft-icon {
|
|
853
853
|
flex-shrink: 0;
|
|
854
|
-
color: ${
|
|
854
|
+
color: ${zl.iconColor};
|
|
855
855
|
}
|
|
856
856
|
|
|
857
857
|
.ft-switch-option--selected ft-icon {
|
|
858
|
-
color: ${
|
|
858
|
+
color: ${zl.selectedTextColor};
|
|
859
859
|
}
|
|
860
|
-
`;var
|
|
860
|
+
`;var fc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class uc extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}}class pc extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}}class gc extends Dr{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}update(t){super.update(t),t.has("selected")&&this.dispatchEvent(new pc(this.selected))}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(Jt`
|
|
861
861
|
<label part="label" for="input" class=${Ze(t)}
|
|
862
862
|
@click=${this.onChange}>
|
|
863
863
|
<div class="ft-switch-option--content">
|
|
864
864
|
<ft-ripple part="ripple" class="ft-switch-option--ripple"></ft-ripple>
|
|
865
865
|
<ft-typography part="text"
|
|
866
866
|
variant="button"
|
|
867
|
-
class="ft-switch-option--label ${
|
|
867
|
+
class="ft-switch-option--label ${fs?"ft-safari-ellipsis-fix":""}"
|
|
868
868
|
?hidden=${!this.hasTextContent()}>
|
|
869
869
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
870
870
|
</ft-typography>
|
|
@@ -879,23 +879,23 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
879
879
|
position="${this.tooltipPosition}">
|
|
880
880
|
${t}
|
|
881
881
|
</ft-tooltip>
|
|
882
|
-
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new
|
|
882
|
+
`}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new uc(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?Jt`
|
|
883
883
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
884
|
-
`:te}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}
|
|
884
|
+
`:te}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}gc.elementDefinitions={"ft-ripple":ql,"ft-typography":Gl,"ft-tooltip":sc,"ft-icon":cc},gc.styles=[Xr,hc],fc([Oe()],gc.prototype,"value",void 0),fc([Oe()],gc.prototype,"icon",void 0),fc([Oe()],gc.prototype,"iconVariant",void 0),fc([Oe()],gc.prototype,"label",void 0),fc([Oe()],gc.prototype,"tooltipPosition",void 0),fc([Oe({type:Boolean,reflect:!0})],gc.prototype,"selected",void 0),fc([Oe({type:Boolean})],gc.prototype,"trailingIcon",void 0),fc([Oe({type:Boolean})],gc.prototype,"unselectable",void 0),fc([$e(".ft-switch-option--content slot")],gc.prototype,"slottedContent",void 0),fc([$e(".ft-switch-option--input")],gc.prototype,"input",void 0);var yc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class bc extends CustomEvent{constructor(t){super("change",{detail:t})}}class mc extends Dr{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return Jt`
|
|
885
885
|
<div @keydown=${this.onKeyDown} tabindex="0" class="${Ze(t)}">
|
|
886
886
|
<slot @slotchange=${this.onSlotchange}
|
|
887
887
|
@option-change=${this.onOptionChangeByScript}
|
|
888
888
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
889
889
|
></slot>
|
|
890
890
|
</div>
|
|
891
|
-
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof
|
|
891
|
+
`}onKeyDown(t){let e;"ArrowDown"!=t.key&&"ArrowRight"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),"ArrowUp"!=t.key&&"ArrowLeft"!=t.key||(e=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),null!=e&&(t.preventDefault(),this.options[this.fixIndex(e)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],null===(t=this.slottedContent)||void 0===t||t.assignedElements().forEach((t=>{t instanceof gc&&this.registerOption(t)})),this.selectedOption=this.options.find((t=>t.selected))}registerOption(t){t.setAttribute("tabindex","-1"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let e=t.target;this.onOptionChange(e)}onOptionChangeByUser(t){var e;t.stopPropagation(),this.onOptionChange(t.target),this.dispatchEvent(new bc(null===(e=this.selectedOption)||void 0===e?void 0:e.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find((t=>t.selected))}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach((t=>{t.selected=t===this.selectedOption}))}}mc.elementDefinitions={},mc.styles=ft`
|
|
892
892
|
:host {
|
|
893
893
|
display: inline-block;
|
|
894
894
|
}
|
|
895
895
|
|
|
896
896
|
.ft-switch {
|
|
897
|
-
border-radius: ${
|
|
898
|
-
outline-color: ${
|
|
897
|
+
border-radius: ${zl.borderRadius};
|
|
898
|
+
outline-color: ${zl.outlineColor};
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
.ft-switch slot {
|
|
@@ -904,25 +904,25 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
904
904
|
}
|
|
905
905
|
|
|
906
906
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
907
|
-
${wo(
|
|
908
|
-
${wo(
|
|
909
|
-
${wo(
|
|
907
|
+
${wo(dc.borderRadiusLeft,"0")};
|
|
908
|
+
${wo(dc.borderRadiusRight,"0")};
|
|
909
|
+
${wo(dc.borderWidthLeft,"0")};
|
|
910
910
|
}
|
|
911
911
|
|
|
912
912
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
913
|
-
${wo(
|
|
914
|
-
${wo(
|
|
913
|
+
${wo(dc.borderRadiusLeft,zl.borderRadius)};
|
|
914
|
+
${wo(dc.borderWidthLeft,"1px")};
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
918
|
-
${wo(
|
|
918
|
+
${wo(dc.borderRadiusRight,zl.borderRadius)};
|
|
919
919
|
}
|
|
920
920
|
|
|
921
921
|
.ft-switch--dense slot::slotted(ft-switch-option) {
|
|
922
922
|
--ft-switch-internal-vertical-padding: 2px;
|
|
923
923
|
--ft-switch-internal-horizontal-padding: 4px;
|
|
924
924
|
}
|
|
925
|
-
`,
|
|
925
|
+
`,yc([Oe({type:Boolean})],mc.prototype,"dense",void 0),yc([Oe({type:Boolean})],mc.prototype,"unselectable",void 0),yc([$e(".ft-switch slot")],mc.prototype,"slottedContent",void 0),yc([Se()],mc.prototype,"selectedOption",void 0),yc([$e(".ft-switch")],mc.prototype,"ftSwitchDiv",void 0),go("ft-switch")(mc),go("ft-switch-option")(gc);const vc=xo.external(Oi.colorOutline,"Design system"),xc=xo.external(Oi.colorOnSurfaceMedium,"Design system"),wc=ft`
|
|
926
926
|
:host {
|
|
927
927
|
display: block;
|
|
928
928
|
}
|
|
@@ -933,14 +933,14 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
933
933
|
|
|
934
934
|
ft-icon {
|
|
935
935
|
transform: rotate(-45deg);
|
|
936
|
-
color: ${
|
|
936
|
+
color: ${vc};
|
|
937
937
|
}
|
|
938
938
|
|
|
939
939
|
.ft-resizer--dragging ft-icon,
|
|
940
940
|
.ft-resizer:hover ft-icon {
|
|
941
|
-
color: ${
|
|
941
|
+
color: ${xc};
|
|
942
942
|
}
|
|
943
|
-
`;var
|
|
943
|
+
`;var Oc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Sc extends CustomEvent{constructor(t,e){super("resize",{detail:{width:t,height:e}})}}class Cc extends Dr{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=nc.material,this.cursor="nwse-resize",this.dragging=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.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 Jt`
|
|
944
944
|
<style>
|
|
945
945
|
.ft-resizer {
|
|
946
946
|
cursor: ${ht(this.cursor)}
|
|
@@ -951,25 +951,25 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
951
951
|
@touchstart=${this.initDragFromTouch}>
|
|
952
952
|
<ft-icon .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
953
953
|
</div>
|
|
954
|
-
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let o=this.fixedWidth+t-this.startX,i=this.fixedHeight+e-this.startY;this.dispatchEvent(new
|
|
954
|
+
`}initDragFromMouse(t){this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initDrag(t,e){this.dragging=!0,this.startX=t,this.startY=e,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,e){let o=this.fixedWidth+t-this.startX,i=this.fixedHeight+e-this.startY;this.dispatchEvent(new Sc(o,i))}}Cc.elementDefinitions={"ft-icon":cc},Cc.styles=[Yr,wc],Oc([Oe({type:Number})],Cc.prototype,"initialWidth",void 0),Oc([Oe({type:Number})],Cc.prototype,"initialHeight",void 0),Oc([Oe()],Cc.prototype,"icon",void 0),Oc([Oe()],Cc.prototype,"iconVariant",void 0),Oc([Oe()],Cc.prototype,"cursor",void 0),Oc([Se()],Cc.prototype,"dragging",void 0),Oc([Ce({passive:!0})],Cc.prototype,"initDragFromMouse",null),Oc([Ce({passive:!0})],Cc.prototype,"initDragFromTouch",null),go("ft-resizer")(Cc);const Nc={fontSize:xo.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:xo.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:xo.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:xo.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:xo.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:xo.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:xo.extend("--ft-input-label-border-color","",Oi.colorOutline),textColor:xo.extend("--ft-input-label-text-color","",Oi.colorOnSurfaceMedium),disabledTextColor:xo.extend("--ft-input-label-disabled-text-color","",Oi.colorOnSurfaceDisabled),colorSurface:xo.external(Oi.colorSurface,"Design system"),borderRadiusS:xo.external(Oi.borderRadiusS,"Design system"),colorError:xo.external(Oi.colorError,"Design system")},$c=ft`
|
|
955
955
|
.ft-input-label {
|
|
956
956
|
position: absolute;
|
|
957
957
|
inset: 0;
|
|
958
958
|
display: flex;
|
|
959
|
-
background-color: ${
|
|
960
|
-
border-radius: ${
|
|
959
|
+
background-color: ${Nc.colorSurface};
|
|
960
|
+
border-radius: ${Nc.borderRadiusS} ${Nc.borderRadiusS} 0 0;
|
|
961
961
|
}
|
|
962
962
|
|
|
963
963
|
.ft-input-label--outlined {
|
|
964
|
-
border-radius: ${
|
|
964
|
+
border-radius: ${Nc.borderRadiusS};
|
|
965
965
|
}
|
|
966
966
|
|
|
967
967
|
.ft-input-label {
|
|
968
|
-
border-color: ${
|
|
968
|
+
border-color: ${Nc.borderColor};
|
|
969
969
|
}
|
|
970
970
|
|
|
971
971
|
.ft-input-label.ft-input-label--in-error {
|
|
972
|
-
border-color: ${
|
|
972
|
+
border-color: ${Nc.colorError}
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
.ft-input-label:before,
|
|
@@ -982,7 +982,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
982
982
|
}
|
|
983
983
|
|
|
984
984
|
.ft-input-label:before {
|
|
985
|
-
width: calc(${
|
|
985
|
+
width: calc(${Nc.horizontalSpacing} - 4px);
|
|
986
986
|
flex-shrink: 0;
|
|
987
987
|
}
|
|
988
988
|
|
|
@@ -998,20 +998,20 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
998
998
|
border-bottom-width: 1px;
|
|
999
999
|
border-bottom-style: solid;
|
|
1000
1000
|
border-color: inherit;
|
|
1001
|
-
color: ${
|
|
1001
|
+
color: ${Nc.textColor};
|
|
1002
1002
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1003
|
-
max-width: calc(${
|
|
1003
|
+
max-width: calc(${Nc.labelMaxWidth} - 2 * (${Nc.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
1004
1004
|
text-overflow: ellipsis;
|
|
1005
|
-
${wo(
|
|
1006
|
-
${wo(
|
|
1005
|
+
${wo(Xs.fontSize,Nc.fontSize)};
|
|
1006
|
+
${wo(Xs.lineHeight,Nc.fontSize)};
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
1009
|
.ft-input-label--in-error .ft-input-label--text {
|
|
1010
|
-
color: ${
|
|
1010
|
+
color: ${Nc.colorError}
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
.ft-input-label--disabled .ft-input-label--text {
|
|
1014
|
-
color: ${
|
|
1014
|
+
color: ${Nc.disabledTextColor};
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
1017
1017
|
.ft-input-label--hidden-text {
|
|
@@ -1028,19 +1028,19 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1028
1028
|
overflow: hidden;
|
|
1029
1029
|
white-space: nowrap;
|
|
1030
1030
|
text-overflow: ellipsis;
|
|
1031
|
-
padding: ${
|
|
1032
|
-
margin: calc(${
|
|
1031
|
+
padding: ${Nc.verticalSpacing} 4px;
|
|
1032
|
+
margin: calc(${Nc.verticalSpacing} * -1) 0;
|
|
1033
1033
|
max-width: 100%;
|
|
1034
1034
|
box-sizing: border-box;
|
|
1035
1035
|
}
|
|
1036
1036
|
|
|
1037
1037
|
.ft-input-label--raised .ft-input-label--text {
|
|
1038
|
-
${wo(
|
|
1039
|
-
${wo(
|
|
1038
|
+
${wo(Xs.fontSize,Nc.raisedFontSize)};
|
|
1039
|
+
${wo(Xs.lineHeight,Nc.raisedFontSize)};
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
1042
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
1043
|
-
top: ${
|
|
1043
|
+
top: ${Nc.verticalSpacing};
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
1046
1046
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -1053,27 +1053,27 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1053
1053
|
.ft-input-label--outlined:before {
|
|
1054
1054
|
border-left-width: 1px;
|
|
1055
1055
|
border-left-style: solid;
|
|
1056
|
-
border-radius: ${
|
|
1056
|
+
border-radius: ${Nc.borderRadiusS} 0 0 ${Nc.borderRadiusS};
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
1059
|
.ft-input-label--outlined:after {
|
|
1060
1060
|
border-right-width: 1px;
|
|
1061
1061
|
border-right-style: solid;
|
|
1062
|
-
border-radius: 0 ${
|
|
1062
|
+
border-radius: 0 ${Nc.borderRadiusS} ${Nc.borderRadiusS} 0;
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
1065
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
1066
1066
|
padding: 2px 4px;
|
|
1067
|
-
z-index: ${
|
|
1068
|
-
background-color: ${
|
|
1069
|
-
border-radius: ${
|
|
1067
|
+
z-index: ${Nc.raisedZIndex};
|
|
1068
|
+
background-color: ${Nc.colorSurface};
|
|
1069
|
+
border-radius: ${Nc.borderRadiusS};
|
|
1070
1070
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1074
1074
|
border-top: none;
|
|
1075
1075
|
}
|
|
1076
|
-
`;var
|
|
1076
|
+
`;var Ec=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class kc extends Dr{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return Jt`
|
|
1077
1077
|
<div class="${Ze(t)}">
|
|
1078
1078
|
${this.text?Jt`
|
|
1079
1079
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -1082,7 +1082,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1082
1082
|
</div>
|
|
1083
1083
|
`:null}
|
|
1084
1084
|
</div>
|
|
1085
|
-
`}}
|
|
1085
|
+
`}}kc.elementDefinitions={},kc.styles=[ml,$c],Ec([Oe({type:String})],kc.prototype,"text",void 0),Ec([Oe({type:Boolean})],kc.prototype,"raised",void 0),Ec([Oe({type:Boolean})],kc.prototype,"outlined",void 0),Ec([Oe({type:Boolean})],kc.prototype,"disabled",void 0),Ec([Oe({type:Boolean})],kc.prototype,"error",void 0),go("ft-input-label")(kc);const Ic={fontSize:xo.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:xo.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:xo.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:xo.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:xo.extend("--ft-text-area-helper-color","",Oi.colorOnSurfaceMedium),colorPrimary:xo.external(Oi.colorPrimary,"Design system"),colorOnSurface:xo.external(Oi.colorOnSurface,"Design system"),colorOnSurfaceDisabled:xo.external(Oi.colorOnSurfaceDisabled,"Design system"),borderRadiusS:xo.external(Oi.borderRadiusS,"Design system"),colorError:xo.external(Oi.colorError,"Design system")},Rc=ft`
|
|
1086
1086
|
*:focus {
|
|
1087
1087
|
outline: none;
|
|
1088
1088
|
}
|
|
@@ -1094,10 +1094,10 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
1096
1096
|
ft-input-label {
|
|
1097
|
-
${wo(
|
|
1098
|
-
${wo(
|
|
1099
|
-
${wo(
|
|
1100
|
-
${wo(
|
|
1097
|
+
${wo(Nc.fontSize,Ic.fontSize)};
|
|
1098
|
+
${wo(Nc.raisedFontSize,Ic.labelSize)};
|
|
1099
|
+
${wo(Nc.verticalSpacing,Ic.verticalSpacing)};
|
|
1100
|
+
${wo(Nc.horizontalSpacing,Ic.horizontalSpacing)};
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
1103
|
.ft-text-area--main-panel {
|
|
@@ -1115,8 +1115,8 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
1117
|
.ft-text-area--input-panel ft-ripple {
|
|
1118
|
-
${wo(
|
|
1119
|
-
${wo(
|
|
1118
|
+
${wo(xs.opacityContentOnSurfaceHover,"0.08")};
|
|
1119
|
+
${wo(xs.opacityContentOnSurfacePressed,"0.04")};
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
1122
|
.ft-text-area--input {
|
|
@@ -1128,12 +1128,12 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1128
1128
|
align-self: stretch;
|
|
1129
1129
|
resize: none;
|
|
1130
1130
|
|
|
1131
|
-
${wo(
|
|
1132
|
-
${wo(
|
|
1133
|
-
color: ${
|
|
1131
|
+
${wo(Hs.fontSize,Ic.fontSize)};
|
|
1132
|
+
${wo(Hs.lineHeight,Ic.fontSize)};
|
|
1133
|
+
color: ${Ic.colorOnSurface};
|
|
1134
1134
|
|
|
1135
|
-
padding: 0 ${
|
|
1136
|
-
margin: calc(${
|
|
1135
|
+
padding: 0 ${Ic.horizontalSpacing};
|
|
1136
|
+
margin: calc(${Ic.verticalSpacing} + ${Ic.labelSize} / 2) 0 ${Ic.verticalSpacing} 0;
|
|
1137
1137
|
|
|
1138
1138
|
border: none;
|
|
1139
1139
|
background: none;
|
|
@@ -1142,7 +1142,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
1144
1144
|
.ft-text-area--disabled .ft-text-area--input {
|
|
1145
|
-
color: ${
|
|
1145
|
+
color: ${Ic.colorOnSurfaceDisabled};
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
1148
|
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
@@ -1150,42 +1150,42 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
1152
|
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
1153
|
-
${wo(
|
|
1154
|
-
${wo(
|
|
1153
|
+
${wo(Nc.borderColor,Ic.colorPrimary)};
|
|
1154
|
+
${wo(Nc.textColor,Ic.colorPrimary)};
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
1157
|
.ft-text-area--filled .ft-text-area--input-panel {
|
|
1158
|
-
border-radius: ${
|
|
1158
|
+
border-radius: ${Ic.borderRadiusS} ${Ic.borderRadiusS} 0 0;
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
1161
|
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
1162
1162
|
align-self: stretch;
|
|
1163
|
-
margin-bottom: ${
|
|
1164
|
-
margin-top: calc(${
|
|
1163
|
+
margin-bottom: ${Ic.verticalSpacing};
|
|
1164
|
+
margin-top: calc(${Ic.labelSize} + 2 * ${Ic.verticalSpacing});
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
1167
|
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
1168
|
-
border-radius: ${
|
|
1168
|
+
border-radius: ${Ic.borderRadiusS};
|
|
1169
1169
|
}
|
|
1170
1170
|
|
|
1171
1171
|
.ft-text-area--helper-text {
|
|
1172
|
-
padding: 0 12px 0 ${
|
|
1173
|
-
color: ${
|
|
1172
|
+
padding: 0 12px 0 ${Ic.horizontalSpacing};
|
|
1173
|
+
color: ${Ic.helperColor};
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
1176
|
.ft-text-area--in-error .ft-text-area--input,
|
|
1177
1177
|
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
1178
|
-
color: ${
|
|
1178
|
+
color: ${Ic.colorError};
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
1181
|
ft-resizer {
|
|
1182
1182
|
position: absolute;
|
|
1183
1183
|
bottom: 0;
|
|
1184
1184
|
}
|
|
1185
|
-
`;var
|
|
1185
|
+
`;var Uc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Lc extends(as(Dr,"textbox")){constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){const t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return Jt`
|
|
1186
1186
|
<style>
|
|
1187
1187
|
.ft-text-area--main-panel {
|
|
1188
|
-
height: calc(4 * ${
|
|
1188
|
+
height: calc(4 * ${Ic.verticalSpacing} + ${Ic.labelSize} + ${Ic.fontSize} + ${this.height}px);
|
|
1189
1189
|
}
|
|
1190
1190
|
|
|
1191
1191
|
ft-resizer {
|
|
@@ -1224,14 +1224,14 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1224
1224
|
${this.helper}
|
|
1225
1225
|
</ft-typography>`:void 0}
|
|
1226
1226
|
</div>
|
|
1227
|
-
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}
|
|
1227
|
+
`}setValue(t,e=!1){this.value=t,this.setFormValue(t),e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}Lc.elementDefinitions={"ft-input-label":kc,"ft-resizer":Cc,"ft-ripple":ql,"ft-typography":Gl},Lc.styles=[yl,Rc],Uc([Oe({type:String})],Lc.prototype,"label",void 0),Uc([Oe({reflect:!0})],Lc.prototype,"value",void 0),Uc([Oe({type:String})],Lc.prototype,"helper",void 0),Uc([Oe({type:Boolean})],Lc.prototype,"outlined",void 0),Uc([Oe({type:Boolean})],Lc.prototype,"disabled",void 0),Uc([Oe({type:Boolean})],Lc.prototype,"error",void 0),Uc([Oe({type:Number,reflect:!0})],Lc.prototype,"height",void 0),Uc([$e("textarea")],Lc.prototype,"textarea",void 0),Uc([Se()],Lc.prototype,"focused",void 0),go("ft-text-area")(Lc);class _c extends Dr{render(){return Jt`
|
|
1228
1228
|
<div class="ft-loader">
|
|
1229
1229
|
<div></div>
|
|
1230
1230
|
<div></div>
|
|
1231
1231
|
<div></div>
|
|
1232
1232
|
<div></div>
|
|
1233
1233
|
</div>
|
|
1234
|
-
`}}
|
|
1234
|
+
`}}_c.styles=Nl,go("ft-loader")(_c);var Ac=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Bc extends(as(Dr,"button")){constructor(){super(),this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.addEventListener("click",(t=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}))}render(){return this.addTooltipIfNeeded(Jt`
|
|
1235
1235
|
<button part="button"
|
|
1236
1236
|
class="${Ze(this.buttonClasses)}"
|
|
1237
1237
|
aria-label="${this.getLabel()}"
|
|
@@ -1240,7 +1240,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1240
1240
|
<ft-typography part="label"
|
|
1241
1241
|
variant=${this.typographyVariant}
|
|
1242
1242
|
element="span"
|
|
1243
|
-
class="ft-button--label ${
|
|
1243
|
+
class="ft-button--label ${fs?"ft-safari-ellipsis-fix":""}"
|
|
1244
1244
|
?hidden=${!this.hasTextContent()}>
|
|
1245
1245
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1246
1246
|
</ft-typography>
|
|
@@ -1254,7 +1254,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1254
1254
|
</ft-tooltip>
|
|
1255
1255
|
`:t}resolveIcon(){return this.loading?Jt`
|
|
1256
1256
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?Jt`
|
|
1257
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:te}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
1257
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:te}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Bc.elementDefinitions={"ft-ripple":ql,"ft-tooltip":sc,"ft-typography":Gl,"ft-icon":cc,"ft-loader":_c},Ac([Oe({type:String,reflect:!0})],Bc.prototype,"role",void 0),Ac([Oe()],Bc.prototype,"type",void 0),Ac([Oe({type:Boolean})],Bc.prototype,"disabled",void 0),Ac([Oe()],Bc.prototype,"label",void 0),Ac([Oe()],Bc.prototype,"icon",void 0),Ac([Oe()],Bc.prototype,"iconVariant",void 0),Ac([Oe({type:Boolean})],Bc.prototype,"trailingIcon",void 0),Ac([Oe({type:Boolean})],Bc.prototype,"loading",void 0),Ac([Oe()],Bc.prototype,"tooltipPosition",void 0),Ac([Oe({type:Boolean})],Bc.prototype,"hideTooltip",void 0),Ac([Oe({type:Boolean})],Bc.prototype,"forceTooltip",void 0),Ac([$e(".ft-button")],Bc.prototype,"button",void 0),Ac([$e(".ft-button--label slot")],Bc.prototype,"slottedContent",void 0);var Wc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class zc extends Bc{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}zc.styles=[Xr,Wl],Wc([Oe({type:Boolean})],zc.prototype,"primary",void 0),Wc([Oe({type:Boolean})],zc.prototype,"outlined",void 0),Wc([Oe({type:Boolean})],zc.prototype,"dense",void 0),Wc([Oe({type:Boolean})],zc.prototype,"round",void 0);const Tc=[ft`
|
|
1258
1258
|
:host {
|
|
1259
1259
|
display: inline-block;
|
|
1260
1260
|
max-width: 100%;
|
|
@@ -1333,13 +1333,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1333
1333
|
/** Primary styles **/
|
|
1334
1334
|
|
|
1335
1335
|
.ft-button--primary {
|
|
1336
|
-
${wo(
|
|
1336
|
+
${wo(Cl.color,Jo.primaryIconColor)};
|
|
1337
1337
|
|
|
1338
|
-
${wo(
|
|
1339
|
-
${wo(
|
|
1340
|
-
${wo(
|
|
1341
|
-
${wo(
|
|
1342
|
-
${wo(
|
|
1338
|
+
${wo(xs.color,Jo.primaryStateLayerColor)};
|
|
1339
|
+
${wo(xs.opacityContentOnSurfaceHover,Jo.primaryHoverStateLayerOpacity)};
|
|
1340
|
+
${wo(xs.opacityContentOnSurfaceFocused,Jo.primaryFocusStateLayerOpacity)};
|
|
1341
|
+
${wo(xs.opacityContentOnSurfaceSelected,Jo.primaryActiveStateLayerOpacity)};
|
|
1342
|
+
${wo(xs.opacityContentOnSurfacePressed,Jo.primaryActiveStateLayerOpacity)};
|
|
1343
1343
|
|
|
1344
1344
|
background-color: ${Jo.primaryBackgroundColor};
|
|
1345
1345
|
color: ${Jo.primaryColor};
|
|
@@ -1357,13 +1357,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1357
1357
|
/** Secondary styles **/
|
|
1358
1358
|
|
|
1359
1359
|
.ft-button--secondary {
|
|
1360
|
-
${wo(
|
|
1360
|
+
${wo(Cl.color,Jo.secondaryIconColor)};
|
|
1361
1361
|
|
|
1362
|
-
${wo(
|
|
1363
|
-
${wo(
|
|
1364
|
-
${wo(
|
|
1365
|
-
${wo(
|
|
1366
|
-
${wo(
|
|
1362
|
+
${wo(xs.color,Jo.secondaryStateLayerColor)};
|
|
1363
|
+
${wo(xs.opacityContentOnSurfaceHover,Jo.secondaryHoverStateLayerOpacity)};
|
|
1364
|
+
${wo(xs.opacityContentOnSurfaceFocused,Jo.secondaryFocusStateLayerOpacity)};
|
|
1365
|
+
${wo(xs.opacityContentOnSurfaceSelected,Jo.secondaryActiveStateLayerOpacity)};
|
|
1366
|
+
${wo(xs.opacityContentOnSurfacePressed,Jo.secondaryActiveStateLayerOpacity)};
|
|
1367
1367
|
|
|
1368
1368
|
background-color: ${Jo.secondaryBackgroundColor};
|
|
1369
1369
|
color: ${Jo.secondaryColor};
|
|
@@ -1382,13 +1382,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1382
1382
|
/** Tertiary styles **/
|
|
1383
1383
|
|
|
1384
1384
|
.ft-button--tertiary {
|
|
1385
|
-
${wo(
|
|
1385
|
+
${wo(Cl.color,Jo.tertiaryIconColor)};
|
|
1386
1386
|
|
|
1387
|
-
${wo(
|
|
1388
|
-
${wo(
|
|
1389
|
-
${wo(
|
|
1390
|
-
${wo(
|
|
1391
|
-
${wo(
|
|
1387
|
+
${wo(xs.color,Jo.tertiaryStateLayerColor)};
|
|
1388
|
+
${wo(xs.opacityContentOnSurfaceHover,Jo.tertiaryHoverStateLayerOpacity)};
|
|
1389
|
+
${wo(xs.opacityContentOnSurfaceFocused,Jo.tertiaryFocusStateLayerOpacity)};
|
|
1390
|
+
${wo(xs.opacityContentOnSurfaceSelected,Jo.tertiaryActiveStateLayerOpacity)};
|
|
1391
|
+
${wo(xs.opacityContentOnSurfacePressed,Jo.tertiaryActiveStateLayerOpacity)};
|
|
1392
1392
|
|
|
1393
1393
|
background-color: ${Jo.tertiaryBackgroundColor};
|
|
1394
1394
|
color: ${Jo.tertiaryColor};
|
|
@@ -1406,13 +1406,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1406
1406
|
/** Neutral styles **/
|
|
1407
1407
|
|
|
1408
1408
|
.ft-button--neutral {
|
|
1409
|
-
${wo(
|
|
1409
|
+
${wo(Cl.color,Jo.neutralIconColor)};
|
|
1410
1410
|
|
|
1411
|
-
${wo(
|
|
1412
|
-
${wo(
|
|
1413
|
-
${wo(
|
|
1414
|
-
${wo(
|
|
1415
|
-
${wo(
|
|
1411
|
+
${wo(xs.backgroundColor,Jo.neutralStateLayerColor)};
|
|
1412
|
+
${wo(xs.opacityContentOnSurfaceHover,Jo.neutralHoverStateLayerOpacity)};
|
|
1413
|
+
${wo(xs.opacityContentOnSurfaceFocused,Jo.neutralFocusStateLayerOpacity)};
|
|
1414
|
+
${wo(xs.opacityContentOnSurfaceSelected,Jo.neutralActiveStateLayerOpacity)};
|
|
1415
|
+
${wo(xs.opacityContentOnSurfacePressed,Jo.neutralActiveStateLayerOpacity)};
|
|
1416
1416
|
|
|
1417
1417
|
background-color: ${Jo.neutralBackgroundColor};
|
|
1418
1418
|
color: ${Jo.neutralColor};
|
|
@@ -1430,8 +1430,8 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1430
1430
|
/** Large styles **/
|
|
1431
1431
|
|
|
1432
1432
|
.ft-button--large {
|
|
1433
|
-
${wo(
|
|
1434
|
-
${wo(
|
|
1433
|
+
${wo($l.size,Jo.largeIconSize)};
|
|
1434
|
+
${wo(Cl.size,Jo.largeIconSize)};
|
|
1435
1435
|
|
|
1436
1436
|
height: ${Jo.largeHeight};
|
|
1437
1437
|
padding: 0 ${Jo.largeHorizontalPadding};
|
|
@@ -1453,8 +1453,8 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1453
1453
|
/** Small styles **/
|
|
1454
1454
|
|
|
1455
1455
|
.ft-button--small {
|
|
1456
|
-
${wo(
|
|
1457
|
-
${wo(
|
|
1456
|
+
${wo($l.size,Jo.smallIconSize)};
|
|
1457
|
+
${wo(Cl.size,Jo.smallIconSize)};
|
|
1458
1458
|
|
|
1459
1459
|
height: ${Jo.smallHeight};
|
|
1460
1460
|
padding: 0 ${Jo.smallHorizontalPadding};
|
|
@@ -1472,15 +1472,15 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1472
1472
|
width: ${Jo.smallIconOnlyWidth};
|
|
1473
1473
|
padding: unset;
|
|
1474
1474
|
}
|
|
1475
|
-
`,
|
|
1476
|
-
`,
|
|
1477
|
-
`,
|
|
1475
|
+
`,Yr];var Fc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Dc extends Bc{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?Hl.caption1medium:Hl.body2medium}}Dc.styles=[Xr,Tc],Fc([Oe({type:Boolean})],Dc.prototype,"primary",void 0),Fc([Oe({type:Boolean})],Dc.prototype,"secondary",void 0),Fc([Oe({type:Boolean})],Dc.prototype,"tertiary",void 0),Fc([Oe({type:Boolean})],Dc.prototype,"neutral",void 0),Fc([Oe({type:Boolean})],Dc.prototype,"small",void 0),go("ft-button")(zc),go("ftds-button")(Dc);const Pc=ft`
|
|
1476
|
+
`,Mc=ft`
|
|
1477
|
+
`,jc=os.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});class Zc{static get(t){const{baseUrl:e,apiIntegrationIdentifier:o}=jc.getState(),i=null!=t?t:o;if(e&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,i,!0)}static await(t){return new Promise((e=>{let o=Zc.get(t);if(o)e(o);else{const i=jc.subscribe((()=>{o=Zc.get(t),o&&(i(),e(o))}))}}))}}class Hc{constructor(t=!0,e){var o;this.overrideApi=e;let i=this.constructor;i.commonCache=null!==(o=i.commonCache)&&void 0!==o?o:new io,this.cache=t?i.commonCache:new io}get api(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:Zc.get()}get awaitApi(){var t;return null!==(t=this.overrideApi)&&void 0!==t?t:Zc.await()}clearCache(){this.cache.clearAll()}}var Kc;const Gc=Symbol("clearAfterUnitTest");class Vc extends Hc{constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Kc]=()=>{this.defaultMessages={},this.cache=new io,this.listeners={}},this.currentUiLocale=jc.getState().uiLocale,jc.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=jc.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const i={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};uo(this.defaultMessages[t],i)||(this.defaultMessages[t]=i,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var i,r,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(r=null===(i=this.cache.getNow(t))||void 0===i?void 0:i.messages)&&void 0!==r?r:{};return new en(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>co(0).then((()=>t())).catch((()=>null)))))}}Kc=Gc,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new class extends Vc{constructor(){super((async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e)))}}),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new class extends Vc{constructor(){super((async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e)))}});const qc=window.FluidTopicsI18nService,Yc=window.FluidTopicsCustomI18nService;var Jc=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Xc extends Dr{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>Zc.get(),this.messageContexts=[],this.cache=new io,this.cleanSessionDebouncer=new so}render(){return Jt`
|
|
1478
1478
|
<slot></slot>
|
|
1479
|
-
`}update(t){super.update(t),t.has("baseUrl")&&(
|
|
1479
|
+
`}update(t){super.update(t),t.has("baseUrl")&&(jc.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&jc.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&jc.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&jc.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&jc.actions.noCustom(this.noCustom),t.has("editorMode")&&jc.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&jc.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&jc.actions.session(this.session),t.has("availableUiLocales")&&jc.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>qc.addContext(t))),t.has("openExternalDocumentInNewTab")&&jc.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&jc.actions.navigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&jc.actions.forcedOffline(this.forcedOffline),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}Xc.elementDefinitions={},Xc.styles=Mc,Jc([Oe()],Xc.prototype,"baseUrl",void 0),Jc([Oe()],Xc.prototype,"apiIntegrationIdentifier",void 0),Jc([Oe()],Xc.prototype,"uiLocale",void 0),Jc([yo(null)],Xc.prototype,"availableUiLocales",void 0),Jc([yo(null)],Xc.prototype,"metadataConfiguration",void 0),Jc([Oe({type:Boolean})],Xc.prototype,"editorMode",void 0),Jc([Oe({type:Boolean})],Xc.prototype,"noCustom",void 0),Jc([Oe({type:Boolean})],Xc.prototype,"openExternalDocumentInNewTab",void 0),Jc([Oe({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Xc.prototype,"noCustomComponent",void 0),Jc([Oe({type:Boolean})],Xc.prototype,"withManualResources",void 0),Jc([Oe({type:Boolean})],Xc.prototype,"navigatorOnline",void 0),Jc([Oe({type:Boolean})],Xc.prototype,"forcedOffline",void 0),Jc([Oe({type:Object})],Xc.prototype,"apiProvider",void 0),Jc([yo([])],Xc.prototype,"messageContexts",void 0),Jc([yo(void 0)],Xc.prototype,"session",void 0);class Qc extends Hc{async listMySearches(){let t=jc.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-searches",(async()=>(await this.awaitApi).listMySearches(t.profile.userId)),3e5):[]}}class td extends Hc{async listMyBookmarks(){let t=jc.getState().session;return(null==t?void 0:t.sessionAuthenticated)?this.cache.get("my-bookmarks",(async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId)),3e5):[]}}const ed=os.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});const od=new class{constructor(){this.currentSession=jc.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new td,this.savedSearchesService=new Qc,jc.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=jc.getState();uo(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ed.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ed.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();const t=await this.savedSearchesService.listMySearches();ed.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;ed.actions.bookmarks(e)}}};window.FluidTopicsAppInfoStoreService=new class{addCommand(t,e=!1){jc.commands.add(t,e)}consumeCommand(t){return jc.commands.consume(t)}};window.FluidTopicsHighlightHtmlService=new class{highlightHtml(t,e){Vr(t,e)}},go("ft-app-context")(Xc);var id=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const rd=Symbol("i18nAttributes"),nd=Symbol("i18nProperties"),ad=Symbol("i18nUnsubs");function sd(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Yc:qc}i18n(t,e,...o){var i;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const r=null!==(i=t.args)&&void 0!==i?i:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e,o;null===(e=this[rd])||void 0===e||e.forEach(((e,o)=>{var i;const r=this.getI18nAttributeValue(o);(null===(i=null==r?void 0:r.context)||void 0===i?void 0:i.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(o,r,e)})),null===(o=this[nd])||void 0===o||o.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,o){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...o})}}update(t){var e,o;super.update(t),null===(e=this[rd])||void 0===e||e.forEach(((e,o)=>{const i=this.getI18nAttributeValue(o);(null==i?void 0:i.context)&&i.key&&(t.has(o)||null!=e.argsProvider)&&(t.has(o)&&this.addI18nContext(i.context),this.updateI18nAttributeMessage(o,i,e))})),null===(o=this[nd])||void 0===o||o.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,o,i;super.connectedCallback(),new Set([...null!==(e=null===(t=this[nd])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(i=null===(o=this[rd])||void 0===o?void 0:o.keys())&&void 0!==i?i:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[ad].has(t)||this[ad].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[ad].forEach((t=>t())),this[ad].clear()}}return e=ad,id([Oe({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class ld extends(sd(Dr)){}class cd extends(sd(pn)){}var dd=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class hd extends cd{constructor(){super(),this.editorMode=!1,this.addStore(jc)}render(){return this.key&&this.context?Jt`
|
|
1480
1480
|
<span class="ft-i18n">
|
|
1481
1481
|
${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
|
|
1482
1482
|
</span>
|
|
1483
|
-
`:this.editorMode?"Select a context and a label key.":te}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}
|
|
1483
|
+
`:this.editorMode?"Select a context and a label key.":te}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}hd.elementDefinitions={},hd.styles=Pc,dd([rn()],hd.prototype,"editorMode",void 0),dd([Oe()],hd.prototype,"context",void 0),dd([Oe()],hd.prototype,"key",void 0),dd([yo([])],hd.prototype,"args",void 0),dd([Oe()],hd.prototype,"defaultMessage",void 0);class fd{static build(t){return new fd(t)}static fromGwt(t){return new fd(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>qc.resolveMessage(this.name,e,...t)})}}const ud=(t,e)=>(o,i)=>{var r,n;o.constructor.createProperty(i,null!=e?e:{attribute:!1,type:String});const a={...t,key:null!==(r=t.key)&&void 0!==r?r:i};o[nd]=null!==(n=o[nd])&&void 0!==n?n:new Map,o[nd].set(i,a)};go("ft-i18n")(hd);const pd=fd.build("integratedFeedbackComponent"),gd={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"},yd={fontSize:xo.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:xo.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:xo.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:xo.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:xo.extend("--ft-text-field-helper-color","",Oi.colorOnSurfaceMedium),colorPrimary:xo.external(Oi.colorPrimary,"Design system"),colorOnSurface:xo.external(Oi.colorOnSurface,"Design system"),colorOnSurfaceDisabled:xo.external(Oi.colorOnSurfaceDisabled,"Design system"),borderRadiusS:xo.external(Oi.borderRadiusS,"Design system"),colorError:xo.external(Oi.colorError,"Design system"),prefixColor:xo.extend("--ft-text-field-prefix-color","",Oi.colorOnSurfaceMedium),iconColor:xo.extend("--ft-text-field-icon-color","",Oi.colorOnSurfaceMedium),floatingZIndex:xo.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),colorSurface:xo.external(Oi.colorSurface,"Design system"),colorOutline:xo.external(Oi.colorOutline,"Design system"),elevation02:xo.external(Oi.elevation02,"Design system"),suggestSize:xo.create("--ft-text-field-suggest-size","","SIZE","300px")},bd=ft`
|
|
1484
1484
|
*:focus {
|
|
1485
1485
|
outline: none;
|
|
1486
1486
|
}
|
|
@@ -1493,16 +1493,16 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1493
1493
|
}
|
|
1494
1494
|
|
|
1495
1495
|
ft-input-label {
|
|
1496
|
-
${wo(
|
|
1497
|
-
${wo(
|
|
1498
|
-
${wo(
|
|
1499
|
-
${wo(
|
|
1496
|
+
${wo(Nc.fontSize,yd.fontSize)};
|
|
1497
|
+
${wo(Nc.raisedFontSize,yd.labelSize)};
|
|
1498
|
+
${wo(Nc.verticalSpacing,yd.verticalSpacing)};
|
|
1499
|
+
${wo(Nc.horizontalSpacing,yd.horizontalSpacing)};
|
|
1500
1500
|
}
|
|
1501
1501
|
|
|
1502
1502
|
.ft-text-field--main-panel {
|
|
1503
1503
|
position: relative;
|
|
1504
1504
|
display: flex;
|
|
1505
|
-
height: calc(4 * ${
|
|
1505
|
+
height: calc(4 * ${yd.verticalSpacing} + ${yd.labelSize} + ${yd.fontSize});
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
1508
|
.ft-text-field--input-panel {
|
|
@@ -1511,24 +1511,24 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1511
1511
|
display: flex;
|
|
1512
1512
|
align-items: center;
|
|
1513
1513
|
overflow: hidden;
|
|
1514
|
-
padding: 0 ${
|
|
1514
|
+
padding: 0 ${yd.horizontalSpacing};
|
|
1515
1515
|
|
|
1516
|
-
${wo(
|
|
1517
|
-
${wo(
|
|
1516
|
+
${wo(Hs.fontSize,yd.fontSize)};
|
|
1517
|
+
${wo(Hs.lineHeight,yd.fontSize)};
|
|
1518
1518
|
}
|
|
1519
1519
|
|
|
1520
1520
|
.ft-text-field--input-panel ft-ripple {
|
|
1521
|
-
${wo(
|
|
1522
|
-
${wo(
|
|
1521
|
+
${wo(xs.opacityContentOnSurfaceHover,"0.08")};
|
|
1522
|
+
${wo(xs.opacityContentOnSurfacePressed,"0.04")};
|
|
1523
1523
|
}
|
|
1524
1524
|
|
|
1525
1525
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
1526
1526
|
align-items: flex-end;
|
|
1527
|
-
padding: 0 ${
|
|
1527
|
+
padding: 0 ${yd.horizontalSpacing} ${yd.verticalSpacing} ${yd.horizontalSpacing};
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
1530
|
.ft-text-field--prefix {
|
|
1531
|
-
color: ${
|
|
1531
|
+
color: ${yd.prefixColor};
|
|
1532
1532
|
margin-right: 2px;
|
|
1533
1533
|
flex-shrink: 1;
|
|
1534
1534
|
overflow: hidden;
|
|
@@ -1547,15 +1547,15 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1547
1547
|
flex-shrink: 1;
|
|
1548
1548
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
1549
1549
|
|
|
1550
|
-
color: ${
|
|
1551
|
-
padding: calc(2 * ${
|
|
1550
|
+
color: ${yd.colorOnSurface};
|
|
1551
|
+
padding: calc(2 * ${yd.verticalSpacing}) 0;
|
|
1552
1552
|
border: none;
|
|
1553
1553
|
background: none;
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
1556
1556
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
1557
1557
|
padding-bottom: 0;
|
|
1558
|
-
padding-top: calc(${
|
|
1558
|
+
padding-top: calc(${yd.labelSize} + 2 * ${yd.verticalSpacing});
|
|
1559
1559
|
}
|
|
1560
1560
|
|
|
1561
1561
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -1564,37 +1564,37 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1564
1564
|
}
|
|
1565
1565
|
|
|
1566
1566
|
.ft-text-field--disabled .ft-text-field--input {
|
|
1567
|
-
color: ${
|
|
1567
|
+
color: ${yd.colorOnSurfaceDisabled};
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
1570
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
1571
|
-
${wo(
|
|
1572
|
-
${wo(
|
|
1571
|
+
${wo(Nc.borderColor,yd.colorPrimary)};
|
|
1572
|
+
${wo(Nc.textColor,yd.colorPrimary)};
|
|
1573
1573
|
}
|
|
1574
1574
|
|
|
1575
1575
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
1576
|
-
border-radius: ${
|
|
1576
|
+
border-radius: ${yd.borderRadiusS} ${yd.borderRadiusS} 0 0;
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
1579
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
1580
|
-
border-radius: ${
|
|
1580
|
+
border-radius: ${yd.borderRadiusS};
|
|
1581
1581
|
}
|
|
1582
1582
|
|
|
1583
1583
|
.ft-text-field--helper-text {
|
|
1584
|
-
padding: 0 12px 0 ${
|
|
1585
|
-
color: ${
|
|
1584
|
+
padding: 0 12px 0 ${yd.horizontalSpacing};
|
|
1585
|
+
color: ${yd.helperColor};
|
|
1586
1586
|
}
|
|
1587
1587
|
|
|
1588
1588
|
.ft-text-field--in-error .ft-text-field--input,
|
|
1589
1589
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
1590
1590
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
1591
|
-
color: ${
|
|
1591
|
+
color: ${yd.colorError};
|
|
1592
1592
|
}
|
|
1593
1593
|
|
|
1594
1594
|
.ft-text-field--icon {
|
|
1595
1595
|
align-self: center;
|
|
1596
1596
|
margin-left: 8px;
|
|
1597
|
-
color: ${
|
|
1597
|
+
color: ${yd.iconColor};
|
|
1598
1598
|
}
|
|
1599
1599
|
|
|
1600
1600
|
.ft-text-field--container {
|
|
@@ -1605,13 +1605,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1605
1605
|
display: none;
|
|
1606
1606
|
flex-direction: column;
|
|
1607
1607
|
position: absolute;
|
|
1608
|
-
z-index: ${
|
|
1609
|
-
background: ${
|
|
1610
|
-
border: 1px solid ${
|
|
1611
|
-
border-radius: 0 0 ${
|
|
1612
|
-
box-shadow: ${
|
|
1608
|
+
z-index: ${yd.floatingZIndex};
|
|
1609
|
+
background: ${yd.colorSurface};
|
|
1610
|
+
border: 1px solid ${yd.colorOutline};
|
|
1611
|
+
border-radius: 0 0 ${yd.borderRadiusS} ${yd.borderRadiusS};
|
|
1612
|
+
box-shadow: ${yd.elevation02};
|
|
1613
1613
|
outline: none;
|
|
1614
|
-
max-height: ${
|
|
1614
|
+
max-height: ${yd.suggestSize};
|
|
1615
1615
|
overflow-y: auto;
|
|
1616
1616
|
}
|
|
1617
1617
|
|
|
@@ -1624,13 +1624,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1624
1624
|
}
|
|
1625
1625
|
|
|
1626
1626
|
.ft-text-field--with-icon {
|
|
1627
|
-
${wo(
|
|
1627
|
+
${wo(Nc.labelMaxWidth,`calc(100% - ${$l.size} - ${Nc.horizontalSpacing})`)};
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
1630
|
.ft-text-field--with-password ft-icon:hover {
|
|
1631
1631
|
cursor: pointer;
|
|
1632
1632
|
}
|
|
1633
|
-
`;var
|
|
1633
|
+
`;var md=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class vd extends(as(Dr,"textbox")){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.prefix=null,this.passwordHiddenIcon=ic.EYE_SLASH,this.passwordRevealedIcon=ic.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--fixed":this.fixedMenuPosition,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.password};return Jt`
|
|
1634
1634
|
<div class="${Ze(t)}">
|
|
1635
1635
|
<div class="ft-text-field--main-panel"
|
|
1636
1636
|
@keydown=${this.handleKeyboardNavigation}
|
|
@@ -1682,7 +1682,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1682
1682
|
.variant=${this.iconVariant}
|
|
1683
1683
|
.value=${this.icon}
|
|
1684
1684
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
1685
|
-
`:te}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&(this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px",Ir(this.mainPanel,this.suggestionsContainer,"bottom").then((({x:t,y:e})=>{this.suggestionsContainer.style.left=`${t}px`,this.suggestionsContainer.style.top=`${e}px`})))}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}
|
|
1685
|
+
`:te}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&(this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px",Ir(this.mainPanel,this.suggestionsContainer,"bottom").then((({x:t,y:e})=>{this.suggestionsContainer.style.left=`${t}px`,this.suggestionsContainer.style.top=`${e}px`})))}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}vd.elementDefinitions={"ft-input-label":kc,"ft-ripple":ql,"ft-typography":Gl,"ft-icon":cc},vd.styles=[yl,bd],md([Oe()],vd.prototype,"label",void 0),md([Oe({noAccessor:!0})],vd.prototype,"value",null),md([Se()],vd.prototype,"dispatchedValue",void 0),md([Oe()],vd.prototype,"helper",void 0),md([Oe({type:Boolean})],vd.prototype,"outlined",void 0),md([Oe({type:Boolean})],vd.prototype,"disabled",void 0),md([Oe({type:Boolean})],vd.prototype,"error",void 0),md([Oe({type:Boolean})],vd.prototype,"fixedMenuPosition",void 0),md([Oe()],vd.prototype,"prefix",void 0),md([Oe()],vd.prototype,"icon",void 0),md([Oe()],vd.prototype,"passwordHiddenIcon",void 0),md([Oe()],vd.prototype,"passwordRevealedIcon",void 0),md([Oe()],vd.prototype,"iconVariant",void 0),md([Oe({type:Boolean})],vd.prototype,"filterSuggestions",void 0),md([Oe({type:Number})],vd.prototype,"maxLength",void 0),md([Oe({type:Boolean})],vd.prototype,"password",void 0),md([Se()],vd.prototype,"focused",void 0),md([Se()],vd.prototype,"hidePassword",void 0),md([Se()],vd.prototype,"hideSuggestions",void 0),md([Se()],vd.prototype,"visibleSuggestions",void 0),md([$e(".ft-text-field--main-panel")],vd.prototype,"mainPanel",void 0),md([$e(".ft-text-field--input")],vd.prototype,"input",void 0),md([$e(".ft-text-field--suggestions")],vd.prototype,"suggestionsContainer",void 0),md([ke({selector:"ft-text-field-suggestion"})],vd.prototype,"suggestions",void 0);const xd=ft`
|
|
1686
1686
|
.ft-text-field-suggestion {
|
|
1687
1687
|
position: relative;
|
|
1688
1688
|
padding: 8px 16px;
|
|
@@ -1707,7 +1707,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1707
1707
|
slot {
|
|
1708
1708
|
pointer-events: none;
|
|
1709
1709
|
}
|
|
1710
|
-
`;var
|
|
1710
|
+
`;var wd=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Od extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class Sd extends Dr{render(){return Jt`
|
|
1711
1711
|
<div class="ft-text-field-suggestion"
|
|
1712
1712
|
tabindex="-1"
|
|
1713
1713
|
@keydown=${this.onKeyDown}
|
|
@@ -1719,15 +1719,15 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1719
1719
|
<slot></slot>
|
|
1720
1720
|
</ft-typography>
|
|
1721
1721
|
</div>
|
|
1722
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new wd(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Od.elementDefinitions={"ft-ripple":Vl,"ft-typography":Kl,"ft-icon":lc},Od.styles=vd,xd([Oe()],Od.prototype,"value",void 0),xd([$e(".ft-text-field-suggestion")],Od.prototype,"container",void 0),xd([Ie()],Od.prototype,"assignedNodes",void 0),go("ft-text-field")(md),go("ft-text-field-suggestion")(Od);class Sd{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,o){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,o)),null==t.tocId?this.extractPagesToc(t.children,e,o):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,o){return t.flatMap((t=>{var i,r,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(i=t.pageToc)&&void 0!==i?i:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:o,children:[]};this.register(s);const l=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...l,...c],[s]}))}convertSectionNodes(t,e,o){return t.flatMap((t=>{var i;let r=null===(i=t.prettyUrl)||void 0===i?void 0:i.replace(/^\//,"");const n={...t,prettyUrl:r,depth:e,parentTocId:o,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var o,i,r,n,a,s;const l={number:this.pages.length+1,title:null!==(o=t.title)&&void 0!==o?o:"",rootTocId:null!==(i=t.tocId)&&void 0!==i?i:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?l.topics:l.hiddenTopics).push(t),d=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return l.breadcrumb.forEach(((t,e)=>{c(t,d[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),l.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),l}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class Cd{convertPaginatedToc(t){return new Sd(t).build()}}var Nd,$d,Ed,kd,Id,Rd,Ud,Ld,_d,Ad,Bd,Wd,zd,Td,Fd,Dd,Pd,Md;!function(t){!function(e){var o={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(o.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,o){t.onload=function(){e(t.result)},t.onerror=function(){o(t.error)}}))}function h(t){var e=new FileReader,o=d(e);return e.readAsArrayBuffer(t),o}function f(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o.arrayBuffer&&o.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=f(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=f(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,o=d(e);return e.readAsText(t),o}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),o=new Array(e.length),i=0;i<e.length;i++)o[i]=String.fromCharCode(e[i]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=n(t),e=a(e);var o=this.map[t];this.map[t]=o?o+", "+e:e},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,e){this.map[n(t)]=a(e)},l.prototype.forEach=function(t,e){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(e,this.map[o],o,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,o){t.push(o)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,o){t.push([o,e])})),s(t)},o.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,e){var o,i,r=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(o=e.method||this.method||"GET",i=o.toUpperCase(),p.indexOf(i)>-1?i:o),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function y(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var o=t.split("="),i=o.shift().replace(/\+/g," "),r=o.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},u.call(g.prototype),u.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,e){if(-1===m.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var o=Error(t);this.stack=o.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,i){return new Promise((function(r,n){var a=new g(t,i);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,o={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var o=t.split(":"),i=o.shift().trim();if(i){var r=o.join(":").trim();e.append(i,r)}})),e)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new b(i,o))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=l,t.Request=g,t.Response=b),e.Headers=l,e.Request=g,e.Response=b,e.fetch=v,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}(Nd||(Nd={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}($d||($d={})),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"}(Ed||(Ed={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(kd||(kd={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Id||(Id={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Rd||(Rd={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(Ud||(Ud={})),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"}(Ld||(Ld={})),function(t){t.ASC="ASC",t.DESC="DESC"}(_d||(_d={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Ad||(Ad={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Bd||(Bd={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Wd||(Wd={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(zd||(zd={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Td||(Td={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Fd||(Fd={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Dd||(Dd={})),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.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(Pd||(Pd={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(Md||(Md={}));const jd={[Pd.PERSONAL_BOOK_SHARE_USER]:[Pd.PERSONAL_BOOK_USER],[Pd.HTML_EXPORT_USER]:[Pd.PERSONAL_BOOK_USER],[Pd.PDF_EXPORT_USER]:[Pd.PERSONAL_BOOK_USER],[Pd.KHUB_ADMIN]:[Pd.CONTENT_PUBLISHER],[Pd.ADMIN]:[Pd.KHUB_ADMIN,Pd.USERS_ADMIN,Pd.PORTAL_ADMIN],[Pd.DEVELOPER]:[Pd.BETA_USER,Pd.DEBUG_USER]};function Zd(t,e){return t===e||(jd[t]??[]).some((t=>Zd(t,e)))}function Hd(t,e){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>Zd(t,e)))}class Kd extends Zc{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,o){super(!1,e),this.converter=t,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return Hd(null!==(e=null===(t=Mc.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getMapNow(){return this.cache.getNow("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getAttachments(){return this.cache.get("map-attachments",(()=>this.fetchAttachments()))}getRelativesForDocument(t,e){return this.cache.get("document-relatives-"+t+"-"+e.join("-"),(()=>this.fetchRelativesForDocument(t,e)))}getRelativesForTopicInMap(t,e,o){return this.cache.get("topic-relatives-"+[t,e,...o].join("-"),(()=>this.fetchRelativesForTopicInMap(t,e,o)))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true`)}getLink(t,e,o){const i=this.getNavigationData(t,e,o),r=this.getReaderLinkPrefix()+(i.prettyUrl?i.prettyUrl:`${i.mapId}/${i.tocId}`),n=new URL(r,this.api.tenantBaseUrl);return null!=i.page&&n.searchParams.set("page",`${i.page}`),i.prettyUrlDuplicated&&n.searchParams.set("tocId",i.tocId),null!=i.section&&n.searchParams.set("section",i.section),n.href}getNavigationData(t,e,o){var i,r;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],l=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(i=null==s?void 0:s.title)&&void 0!==i?i:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=l?l.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==n?void 0:n.duplicatedPrettyUrls.has(null!=l?l:""))&&void 0!==r&&r,section:o}}async getAccurateNavigationData(t,e,o){return await this.getEnrichedToc(),this.getNavigationData(t,e,o)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var o;return e?{type:e.topics.type,rating:null===(o=e.topics)||void 0===o?void 0:o.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,o){return this.makeRateTopicRequest(t,e,o).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=Mc.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,o){return this.makeTopicFeedbackRequest(t,e,o)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),o=[{tocId:e.tocId,title:e.title}],i=this.getTocNodeNow(e.parentTocId);for(;i;)o.unshift({tocId:i.tocId,title:i.title}),i=this.getTocNodeNow(i.parentTocId);return o}isFeatureAccessible(t,{session:e,ratingType:o}){var i;if(!this.isFeatureAvailable(t))return!1;switch(t){case us.FEEDBACK:return Hd(null!=e?e:[],Pd.FEEDBACK_USER);case us.RATING:return Hd(null!=e?e:[],Pd.RATING_USER)&&null!=o&&o!==Ud.NO_RATING;case us.PRINT:return Hd(null!=e?e:[],Pd.PRINT_USER);case us.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case us.COLLECTIONS:return Hd(null!=e?e:[],Pd.COLLECTION_USER);case us.PERSONAL_BOOKS:return Hd(null!=e?e:[],Pd.PERSONAL_BOOK_USER)&&!(null===(i=this.getMapNow())||void 0===i?void 0:i.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}}class Gd extends Kd{static async build(t){return new Gd(new Cd,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){const e=await this.api.getMap(t);return this.fingerprint=e.fingerprint,e}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch((()=>[]))}fetchRelativesForDocument(t,e){return this.api.search({query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",filters:[{negative:!1,values:e,key:t}],sort:[],facets:[]})}fetchRelativesForTopicInMap(t,e,o){return this.api.search({query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",filters:[{negative:!1,values:o,key:e},{negative:!1,values:[t],key:"ft:publicationId"}],sort:[],facets:[]})}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,o){return this.api.rateTopic(this.mapId,t,e,o)}makeTopicFeedbackRequest(t,e,o){return this.api.sendTopicFeedback(this.mapId,t,e,o)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class Vd{static build(t,e){return new Vd((t=>es.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0}}))(t.trim()||"context"),null!=e?e:Gd.build)}constructor(t,e,o){this.store=t,this.clusteringHelperProvider=o,this.metadataForSwitchToRelatives=new Set,this.loadDebouncer=new so(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return ho((()=>this.service))}async navigateToTopic(t,e,o){const i=await this.awaitService(),r=await(null!=o?i.getPage(o):i.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(r),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,r),section:e})}resolveValidNonRootTocId(t,e){var o,i,r;let n=null!==(o="root"===t?void 0:t)&&void 0!==o?o:e.rootTocId;return e.topics.includes(n)?n:null!==(r=null!==(i=e.topics[0])&&void 0!==i?i:e.hiddenTopics[0])&&void 0!==r?r:"root"}async navigateToPage(t){const e=await this.awaitService();let o=await e.getPage(t);this.store.actions.currentPage(o)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;(null===(t=this.service)||void 0===t?void 0:t.mapId)&&null==this.store.getState().map&&await this.loadDebouncer.run((()=>this.fetchData()))}clear(){var t;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),null===(t=this.service)||void 0===t||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(){var t,e,o,i,r;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(e=this.service)||void 0===e?void 0:e.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(i=this.service)||void 0===i?void 0:i.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))]).then((()=>{this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}))}catch(t){!this.errorHandler||t instanceof Qe||this.errorHandler(t)}}fetchRelatives(){var t,e,o;const i=null===(t=this.store.getState().map)||void 0===t?void 0:t.metadata.filter((t=>{var e;return t.key==(null===(e=this.store.getState().configuration)||void 0===e?void 0:e.relativePivotMetadata)})).flatMap((t=>t.values));void 0!==i&&i.length>0?null===(e=this.service)||void 0===e||e.getRelativesForDocument(null===(o=this.store.getState().configuration)||void 0===o?void 0:o.relativePivotMetadata,i).then((t=>{const e=t.results.flatMap((t=>t.entries));this.store.actions.relatives(e),this.updateClusteringHelper()})):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.eventBus.dispatchEvent(new CustomEvent("clustering-helper-created"))}createClusteringHelper(){var t,e;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let o=this.store.getState().relatives;if(o){let i=o.find((t=>{var e;return(null===(e=t.map)||void 0===e?void 0:e.mapId)==this.store.getState().mapId})),r=null!==(e=null===(t=Mc.getState().metadataConfiguration)||void 0===t?void 0:t.descriptors)&&void 0!==e?e:[];return new no(o,i,this.metadataForSwitchToRelatives,r)}}async navigateToRelativeTopicIfFound(t){var e,o,i;const r=await ho((()=>{var t;return null===(t=this.store.getState().configuration)||void 0===t?void 0:t.relativeTopicPivotMetadata})),n=this.store.getState().mapId,a=await this.awaitService(),s=await a.getRelativesForTopicInMap(n,r,[t]);if(null===(i=null===(o=null===(e=null==s?void 0:s.results)||void 0===e?void 0:e[0])||void 0===o?void 0:o.entries)||void 0===i?void 0:i[0]){const t=s.results[0].entries[0].topic.tocId;return await this.navigateToTopic(t),!0}return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),null==this.store.getState().relatives?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}}const qd=ft`
|
|
1723
|
-
`;class
|
|
1722
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Od(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Sd.elementDefinitions={"ft-ripple":ql,"ft-typography":Gl,"ft-icon":cc},Sd.styles=xd,wd([Oe()],Sd.prototype,"value",void 0),wd([$e(".ft-text-field-suggestion")],Sd.prototype,"container",void 0),wd([Ie()],Sd.prototype,"assignedNodes",void 0),go("ft-text-field")(vd),go("ft-text-field-suggestion")(Sd);class Cd{constructor(t){this.paginatedToc=t,this.nodeByTocId={},this.knownPrettyUrls=new Set,this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId}}extractPagesToc(t,e,o){return t.flatMap((t=>(t.pageConfiguration&&this.registerPage(this.buildPage(t,o)),null==t.tocId?this.extractPagesToc(t.children,e,o):[{tocId:t.tocId,title:t.title,depth:e,children:this.extractPagesToc(t.children,e+1,t.tocId)}])))}convertNodes(t,e,o){return t.flatMap((t=>{var i,r,n;if(null==t.tocId)return[...this.convertSectionNodes(null!==(i=t.pageToc)&&void 0!==i?i:[],e,t.tocId),...this.convertNodes(t.children,e,t.tocId)];let a=null===(r=t.prettyUrl)||void 0===r?void 0:r.replace(/^\//,"");const s={tocId:t.tocId,contentId:t.contentId,title:t.title,hasRating:t.hasRating,origin:t.origin,prettyUrl:a,depth:e,parentTocId:o,children:[]};this.register(s);const l=this.convertSectionNodes(null!==(n=t.pageToc)&&void 0!==n?n:[],e+1,t.tocId),c=this.convertNodes(t.children,e+1,s.tocId);return s.children=[...l,...c],[s]}))}convertSectionNodes(t,e,o){return t.flatMap((t=>{var i;let r=null===(i=t.prettyUrl)||void 0===i?void 0:i.replace(/^\//,"");const n={...t,prettyUrl:r,depth:e,parentTocId:o,children:[]};return this.register(n),n.children=this.convertSectionNodes(t.children,e+1,t.tocId),[n]}))}buildPage(t,e){var o,i,r,n,a,s;const l={number:this.pages.length+1,title:null!==(o=t.title)&&void 0!==o?o:"",rootTocId:null!==(i=t.tocId)&&void 0!==i?i:"root",toc:(null!==(r=t.pageToc)&&void 0!==r?r:[]).map((t=>this.nodeByTocId[t.tocId])),topics:[],hiddenTopics:[],breadcrumb:e?this.buildBreadcrumb(this.nodeByTocId[e]):[]},c=(t,e)=>(e?l.topics:l.hiddenTopics).push(t),d=null!==(a=null===(n=t.pageConfiguration)||void 0===n?void 0:n.parentsVisibility)&&void 0!==a?a:[];return l.breadcrumb.forEach(((t,e)=>{c(t,d[e])})),t.tocId&&c(t.tocId,t.pageConfiguration.isVisible),l.topics.push(...this.tocIds(null!==(s=t.pageToc)&&void 0!==s?s:[])),l}registerPage(t){for(let e of[...t.topics,...t.hiddenTopics])this.pageByTocId[e]||(this.pageByTocId[e]=t);this.pages.push(t)}tocIds(t){return t.flatMap((t=>[t.tocId,...this.tocIds(t.children)]))}buildBreadcrumb(t){const e=[t.tocId];for(;null==t?void 0:t.parentTocId;)e.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return e}register(t){t.prettyUrl&&(this.knownPrettyUrls.has(t.prettyUrl)&&this.duplicatedPrettyUrls.add(t.prettyUrl),this.knownPrettyUrls.add(t.prettyUrl)),this.nodeByTocId[t.tocId]=t}}class Nd{convertPaginatedToc(t){return new Cd(t).build()}}var $d,Ed,kd,Id,Rd,Ud,Ld,_d,Ad,Bd,Wd,zd,Td,Fd,Dd,Pd,Md,jd;!function(t){!function(e){var o={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(o.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o.iterable&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,o){t.onload=function(){e(t.result)},t.onerror=function(){o(t.error)}}))}function h(t){var e=new FileReader,o=d(e);return e.readAsArrayBuffer(t),o}function f(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function u(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o.arrayBuffer&&o.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=f(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||r(t))?this._bodyArrayBuffer=f(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,o=d(e);return e.readAsText(t),o}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),o=new Array(e.length),i=0;i<e.length;i++)o[i]=String.fromCharCode(e[i]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}l.prototype.append=function(t,e){t=n(t),e=a(e);var o=this.map[t];this.map[t]=o?o+", "+e:e},l.prototype.delete=function(t){delete this.map[n(t)]},l.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},l.prototype.set=function(t,e){this.map[n(t)]=a(e)},l.prototype.forEach=function(t,e){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(e,this.map[o],o,this)},l.prototype.keys=function(){var t=[];return this.forEach((function(e,o){t.push(o)})),s(t)},l.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),s(t)},l.prototype.entries=function(){var t=[];return this.forEach((function(e,o){t.push([o,e])})),s(t)},o.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,e){var o,i,r=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=(o=e.method||this.method||"GET",i=o.toUpperCase(),p.indexOf(i)>-1?i:o),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function y(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var o=t.split("="),i=o.shift().replace(/\+/g," "),r=o.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}})),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},u.call(g.prototype),u.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var m=[301,302,303,307,308];b.redirect=function(t,e){if(-1===m.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var o=Error(t);this.stack=o.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,i){return new Promise((function(r,n){var a=new g(t,i);if(a.signal&&a.signal.aborted)return n(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,o={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var o=t.split(":"),i=o.shift().trim();if(i){var r=o.join(":").trim();e.append(i,r)}})),e)};o.url="responseURL"in s?s.responseURL:o.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new b(i,o))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=l,t.Request=g,t.Response=b),e.Headers=l,e.Request=g,e.Response=b,e.fetch=v,Object.defineProperty(e,"W",{value:!0})}({})}("undefined"!=typeof self?self:void 0),function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"}($d||($d={})),function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"}(Ed||(Ed={})),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"}(kd||(kd={})),function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"}(Id||(Id={})),function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"}(Rd||(Rd={})),function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"}(Ud||(Ud={})),function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"}(Ld||(Ld={})),function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"}(_d||(_d={})),function(t){t.ASC="ASC",t.DESC="DESC"}(Ad||(Ad={})),function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"}(Bd||(Bd={})),function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"}(Wd||(Wd={})),function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"}(zd||(zd={})),function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"}(Td||(Td={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"}(Fd||(Fd={})),function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"}(Dd||(Dd={})),function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"}(Pd||(Pd={})),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.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"}(Md||(Md={})),function(t){t.VALID="VALID",t.INVALID="INVALID"}(jd||(jd={}));const Zd={[Md.PERSONAL_BOOK_SHARE_USER]:[Md.PERSONAL_BOOK_USER],[Md.HTML_EXPORT_USER]:[Md.PERSONAL_BOOK_USER],[Md.PDF_EXPORT_USER]:[Md.PERSONAL_BOOK_USER],[Md.KHUB_ADMIN]:[Md.CONTENT_PUBLISHER],[Md.ADMIN]:[Md.KHUB_ADMIN,Md.USERS_ADMIN,Md.PORTAL_ADMIN],[Md.DEVELOPER]:[Md.BETA_USER,Md.DEBUG_USER]};function Hd(t,e){return t===e||(Zd[t]??[]).some((t=>Hd(t,e)))}function Kd(t,e){if(null==t)return!1;return(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some((t=>Hd(t,e)))}class Gd extends Hc{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,e,o){super(!1,e),this.converter=t,this._mapId=o,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.registerFinal("configuration",(()=>this.api.getReaderConfiguration())),this.cache.register("map",(()=>this.withMapId((t=>this.fetchMap(t))))),this.cache.register("enrichedToc",(()=>this.withMapId((t=>this.fetchPages(t).then((t=>this.converter.convertPaginatedToc(t))))))),this.cache.register("ratingSummary",(()=>{var t,e;return Kd(null!==(e=null===(t=jc.getState().session)||void 0===t?void 0:t.profile.roles)&&void 0!==e?e:[],"RATING_USER")?this.withMapId((t=>this.fetchMapRating(t))):Promise.resolve()}))}clear(){this.cache.clearAll()}getMap(){return this.cache.get("map")}getMapNow(){return this.cache.getNow("map")}getConfiguration(){return this.cache.get("configuration")}getEnrichedToc(){return this.cache.get("enrichedToc")}get enrichedToc(){return this.cache.getNow("enrichedToc")}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(){return(await this.getEnrichedToc()).toc}async getPagesToc(){return(await this.getEnrichedToc()).pagesToc}async getTocNode(t){return(await this.getEnrichedToc()).nodeByTocId[t]}getTocNodeNow(t){var e;return null===(e=this.enrichedToc)||void 0===e?void 0:e.nodeByTocId[t]}async getPage(t){const e=await this.getEnrichedToc();return e.pages[t-1]||e.pages[0]}async getPageByTocId(t){const e=await this.getEnrichedToc();return e.pageByTocId[t]||e.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,(()=>this.fetchTopicMetadata(t)))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,(()=>this.fetchTopicHTMLContent(t)))}getAttachments(){return this.cache.get("map-attachments",(()=>this.fetchAttachments()))}getRelativesForDocument(t,e){return this.cache.get("document-relatives-"+t+"-"+e.join("-"),(()=>this.fetchRelativesForDocument(t,e)))}getRelativesForTopicInMap(t,e,o){return this.cache.get("topic-relatives-"+[t,e,...o].join("-"),(()=>this.fetchRelativesForTopicInMap(t,e,o)))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true`)}getLink(t,e,o){const i=this.getNavigationData(t,e,o),r=this.getReaderLinkPrefix()+(i.prettyUrl?i.prettyUrl:`${i.mapId}/${i.tocId}`),n=new URL(r,this.api.tenantBaseUrl);return null!=i.page&&n.searchParams.set("page",`${i.page}`),i.prettyUrlDuplicated&&n.searchParams.set("tocId",i.tocId),null!=i.section&&n.searchParams.set("section",i.section),n.href}getNavigationData(t,e,o){var i,r;t=t||"root";const n=this.enrichedToc,a=null==n?void 0:n.pageByTocId[t],s=null==n?void 0:n.nodeByTocId[t],l=null==s?void 0:s.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:null!==(i=null==s?void 0:s.title)&&void 0!==i?i:"",page:e&&a&&a.number!==e?e:void 0,prettyUrl:null!=l?l.replace(/^r\//,""):void 0,prettyUrlDuplicated:null!==(r=null==n?void 0:n.duplicatedPrettyUrls.has(null!=l?l:""))&&void 0!==r&&r,section:o}}async getAccurateNavigationData(t,e,o){return await this.getEnrichedToc(),this.getNavigationData(t,e,o)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then((t=>null==t?void 0:t.publication))}getTopicRating(t){return this.getRatingSummary().then((e=>{var o;return e?{type:e.topics.type,rating:null===(o=e.topics)||void 0===o?void 0:o.ratings.find((e=>e.tocId===t))}:void 0}))}rateMap(t,e){return this.makeRateMapRequest(t,e).then((()=>this.clearRatingIfNecessary()))}unrateMap(){return this.makeUnrateMapRequest().then((()=>this.clearRatingIfNecessary()))}sendMapFeedback(t,e){return this.makeMapFeedbackRequest(t,e)}rateTopic(t,e,o){return this.makeRateTopicRequest(t,e,o).then((()=>this.clearRatingIfNecessary()))}unrateTopic(t){return this.makeUnrateTopicRequest(t).then((()=>this.clearRatingIfNecessary()))}async clearRatingIfNecessary(){const t=jc.getState().session;(null==t?void 0:t.sessionAuthenticated)&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,e,o){return this.makeTopicFeedbackRequest(t,e,o)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t){let e=this.getTocNodeNow(t),o=[{tocId:e.tocId,title:e.title}],i=this.getTocNodeNow(e.parentTocId);for(;i;)o.unshift({tocId:i.tocId,title:i.title}),i=this.getTocNodeNow(i.parentTocId);return o}isFeatureAccessible(t,{session:e,ratingType:o}){var i;if(!this.isFeatureAvailable(t))return!1;switch(t){case ps.FEEDBACK:return Kd(null!=e?e:[],Md.FEEDBACK_USER);case ps.RATING:return Kd(null!=e?e:[],Md.RATING_USER)&&null!=o&&o!==Ld.NO_RATING;case ps.PRINT:return Kd(null!=e?e:[],Md.PRINT_USER);case ps.BOOKMARK:return!!(null==e?void 0:e.sessionAuthenticated);case ps.COLLECTIONS:return Kd(null!=e?e:[],Md.COLLECTION_USER);case ps.PERSONAL_BOOKS:return Kd(null!=e?e:[],Md.PERSONAL_BOOK_USER)&&!(null===(i=this.getMapNow())||void 0===i?void 0:i.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}}class Vd extends Gd{static async build(t){return new Vd(new Nd,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t){const e=await this.api.getMap(t);return this.fingerprint=e.fingerprint,e}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t){return await this.getMap(),this.api.getPages(t,this.fingerprint)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch((()=>[]))}fetchRelativesForDocument(t,e){return this.api.search({query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",filters:[{negative:!1,values:e,key:t}],sort:[],facets:[]})}fetchRelativesForTopicInMap(t,e,o){return this.api.search({query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",filters:[{negative:!1,values:o,key:e},{negative:!1,values:[t],key:"ft:publicationId"}],sort:[],facets:[]})}makeMapFeedbackRequest(t,e){return this.api.sendMapFeedback(this.mapId,t,e)}makeRateMapRequest(t,e){return this.api.rateMap(this.mapId,t,e)}makeRateTopicRequest(t,e,o){return this.api.rateTopic(this.mapId,t,e,o)}makeTopicFeedbackRequest(t,e,o){return this.api.sendTopicFeedback(this.mapId,t,e,o)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}}class qd{static build(t,e){return new qd((t=>os.get({name:"ft-reader-"+t,initialState:{mapId:void 0,visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0}}))(t.trim()||"context"),null!=e?e:Vd.build)}constructor(t,e,o){this.store=t,this.clusteringHelperProvider=o,this.metadataForSwitchToRelatives=new Set,this.loadDebouncer=new so(10),this.initService(e)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return ho((()=>this.service))}async navigateToTopic(t,e,o){const i=await this.awaitService(),r=await(null!=o?i.getPage(o):i.getPageByTocId(null!=t?t:"root"));this.store.actions.currentPage(r),this.store.actions.scrollTarget({tocId:this.resolveValidNonRootTocId(t,r),section:e})}resolveValidNonRootTocId(t,e){var o,i,r;let n=null!==(o="root"===t?void 0:t)&&void 0!==o?o:e.rootTocId;return e.topics.includes(n)?n:null!==(r=null!==(i=e.topics[0])&&void 0!==i?i:e.hiddenTopics[0])&&void 0!==r?r:"root"}async navigateToPage(t){const e=await this.awaitService();let o=await e.getPage(t);this.store.actions.currentPage(o)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;(null===(t=this.service)||void 0===t?void 0:t.mapId)&&null==this.store.getState().map&&await this.loadDebouncer.run((()=>this.fetchData()))}clear(){var t;this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),null===(t=this.service)||void 0===t||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(){var t,e,o,i,r;try{await Promise.all([null===(t=this.service)||void 0===t?void 0:t.getConfiguration().then((t=>this.store.actions.configuration(t))),null===(e=this.service)||void 0===e?void 0:e.getMap().then((t=>this.store.actions.map(t))),null===(o=this.service)||void 0===o?void 0:o.getToc().then((t=>this.store.actions.toc(t))),null===(i=this.service)||void 0===i?void 0:i.getPagesToc().then((t=>this.store.actions.pagesToc(t))),null===(r=this.service)||void 0===r?void 0:r.getPaginationConfiguration().then((t=>this.store.actions.paginationConfiguration(t)))]).then((()=>{this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}))}catch(t){!this.errorHandler||t instanceof Qe||this.errorHandler(t)}}fetchRelatives(){var t,e,o;const i=null===(t=this.store.getState().map)||void 0===t?void 0:t.metadata.filter((t=>{var e;return t.key==(null===(e=this.store.getState().configuration)||void 0===e?void 0:e.relativePivotMetadata)})).flatMap((t=>t.values));void 0!==i&&i.length>0?null===(e=this.service)||void 0===e||e.getRelativesForDocument(null===(o=this.store.getState().configuration)||void 0===o?void 0:o.relativePivotMetadata,i).then((t=>{const e=t.results.flatMap((t=>t.entries));this.store.actions.relatives(e),this.updateClusteringHelper()})):this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.eventBus.dispatchEvent(new CustomEvent("clustering-helper-created"))}createClusteringHelper(){var t,e;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let o=this.store.getState().relatives;if(o){let i=o.find((t=>{var e;return(null===(e=t.map)||void 0===e?void 0:e.mapId)==this.store.getState().mapId})),r=null!==(e=null===(t=jc.getState().metadataConfiguration)||void 0===t?void 0:t.descriptors)&&void 0!==e?e:[];return new no(o,i,this.metadataForSwitchToRelatives,r)}}async navigateToRelativeTopicIfFound(t){var e,o,i;const r=await ho((()=>{var t;return null===(t=this.store.getState().configuration)||void 0===t?void 0:t.relativeTopicPivotMetadata})),n=this.store.getState().mapId,a=await this.awaitService(),s=await a.getRelativesForTopicInMap(n,r,[t]);if(null===(i=null===(o=null===(e=null==s?void 0:s.results)||void 0===e?void 0:e[0])||void 0===o?void 0:o.entries)||void 0===i?void 0:i[0]){const t=s.results[0].entries[0].topic.tocId;return await this.navigateToTopic(t),!0}return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),null==this.store.getState().relatives?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}}const Yd=ft`
|
|
1723
|
+
`;class Jd extends CustomEvent{constructor(t,e){super("ft-reader-map-loaded",{detail:{map:t,toc:e}})}}class Xd extends CustomEvent{constructor(t,e){super("ft-reader-visible-topics-change",{detail:{visibleTopics:e}})}}class Qd extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}}class th extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}}class eh extends Event{constructor(){super("ft-reader-map-not-found")}}class oh extends Event{constructor(){super("ft-reader-map-unauthorized")}}class ih extends Event{constructor(){super("ft-reader-map-forbidden")}}class rh extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}}var nh=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ah extends pn{constructor(){super(),this.visibleTopics=[],this.scrollToTargetDebouncer=new so(5),this.navigationDebouncer=new so(10),this.mapLoadedEventDebouncer=new so(50),this.addStore(jc)}render(){return Jt`
|
|
1724
1724
|
${this.importStyleIfNeeded()}
|
|
1725
1725
|
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
1726
1726
|
`}importStyleIfNeeded(){var t,e;const o=null===(t=this.stateManager.service)||void 0===t?void 0:t.themeStylesheet();return!o||window.location.href.startsWith(null!==(e=this.baseUrl)&&void 0!==e?e:"")?te:Jt`
|
|
1727
1727
|
<style>
|
|
1728
1728
|
@import "${o}"
|
|
1729
1729
|
</style>
|
|
1730
|
-
`}get stateManager(){return null==this._stateManager&&(this._stateManager=
|
|
1730
|
+
`}get stateManager(){return null==this._stateManager&&(this._stateManager=qd.build(this.id||(""+Math.round(999e3*Math.random())).padStart(6,"0"),this.readerServiceProvider),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"reader")),this._stateManager}connectedCallback(){super.connectedCallback(),this.stateManager.setMapId(this.mapId),this.stateManager.awaitService().then((t=>{const e=t.fontsStylesheet();if(e&&!window.location.href.startsWith(this.baseUrl)&&!document.querySelector(`head link[href="${e}"]`)){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),document.head.append(t)}}))}update(t){super.update(t),t.has("readerServiceProvider")&&this.readerServiceProvider&&this.stateManager.initService(this.readerServiceProvider),t.has("mapId")&&this.mapId&&(this.stateManager.setMapId(this.mapId),this.lastNotifiedNotFoundRelative=void 0),t.has("searchInDocumentQuery")&&null!=this.searchInDocumentQuery&&this.stateManager.setSearchInDocumentQuery(this.searchInDocumentQuery),["tocId","section","page","mapId","topicPivot"].some((e=>t.has(e)))&&this.mapId&&this.navigateToTarget()}contentAvailableCallback(t){var e;if(super.contentAvailableCallback(t),(t.has("map")||t.has("toc"))&&this.sendLoadedEventIfLoaded(),t.has("scrollTarget")&&null==(null===(e=this.scrollTarget)||void 0===e?void 0:e.tocId)){const e=t.get("scrollTarget");null!=(null==e?void 0:e.tocId)&&this.scrollToTargetDebouncer.run((()=>{var t;return this.stateManager.service.getAccurateNavigationData(e.tocId,null===(t=this.currentPage)||void 0===t?void 0:t.number,e.section).then((t=>this.dispatchEvent(new Qd(t))))}))}t.has("visibleTopics")&&Promise.all(this.visibleTopics.map((t=>{var e;return this.stateManager.service.getAccurateNavigationData(t,null===(e=this.currentPage)||void 0===e?void 0:e.number)}))).then((t=>{let e=t.filter((t=>null!=t&&""!==t.topicTitle)).map((t=>{var e;return{tocId:t.tocId,title:t.topicTitle,page:t.page,prettyUrl:t.prettyUrl,prettyUrlDuplicated:t.prettyUrlDuplicated,breadcrumb:null===(e=this.stateManager.service)||void 0===e?void 0:e.buildBreadcrumb(t.tocId)}}));this.dispatchEvent(new Xd(this.map,e))}))}clear(){this.stateManager.clear()}async reload(){this.clear(),await this.navigateToTarget()}async navigateToTarget(){await this.stateManager.load(),await this.navigationDebouncer.run((async()=>{if(null!=this.topicPivot){await this.stateManager.navigateToRelativeTopicIfFound(this.topicPivot)||this.lastNotifiedNotFoundRelative===this.mapId+this.topicPivot?this.lastNotifiedNotFoundRelative=void 0:(this.dispatchEvent(new rh),this.lastNotifiedNotFoundRelative=this.mapId+this.topicPivot)}else null!=this.tocId?await this.stateManager.navigateToTopic(this.tocId,this.section,this.page):null!=this.page&&await this.stateManager.navigateToPage(this.page)}))}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){t.setReaderStateManager(this.stateManager)}handleLoadError(t){const e=t;401===e.status?this.dispatchEvent(new oh):403===e.status?this.dispatchEvent(new ih):404===e.status?this.dispatchEvent(new eh):this.dispatchEvent(new th(t))}reloadBookmarks(){od.reloadBookmarks()}async reloadRating(){var t,e;await(null===(t=this.stateManager.service)||void 0===t?void 0:t.reloadRating()),null===(e=this.stateManager.store)||void 0===e||e.eventBus.dispatchEvent(new CustomEvent("rating-changed"))}sendLoadedEventIfLoaded(){this.mapLoadedEventDebouncer.run((()=>{this.map&&this.toc&&this.dispatchEvent(new Jd(this.map,this.toc))}))}}var sh;ah.styles=Yd,nh([rn({store:jc.name})],ah.prototype,"baseUrl",void 0),nh([Oe()],ah.prototype,"mapId",void 0),nh([Oe()],ah.prototype,"tocId",void 0),nh([Oe()],ah.prototype,"section",void 0),nh([Oe()],ah.prototype,"topicPivot",void 0),nh([Oe()],ah.prototype,"searchInDocumentQuery",void 0),nh([Oe({type:Number,converter:{fromAttribute:t=>+(null!=t?t:"NaN")>0?+t:sh}})],ah.prototype,"page",void 0),nh([rn({store:"reader"})],ah.prototype,"map",void 0),nh([rn({store:"reader"})],ah.prototype,"toc",void 0),nh([rn({store:"reader"})],ah.prototype,"visibleTopics",void 0),nh([rn({store:"reader"})],ah.prototype,"currentPage",void 0),nh([rn({store:"reader"})],ah.prototype,"scrollTarget",void 0),nh([Oe({attribute:!1})],ah.prototype,"readerServiceProvider",void 0),go("ft-reader-context")(ah);class lh extends CustomEvent{constructor(t){super("send-feedback",{detail:t})}}class ch extends CustomEvent{constructor(t){super("ft-reader-topic-feedback",{composed:!0,bubbles:!0,detail:t})}}class dh extends CustomEvent{constructor(t){super("ft-reader-feedback",{composed:!0,bubbles:!0,detail:t})}}class hh extends CustomEvent{constructor(t){super("ft-reader-mailer-topic-feedback",{composed:!0,bubbles:!0,detail:{topic:t}})}}class fh extends CustomEvent{constructor(){super("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0})}}var uh=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ph extends(sd(ms)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.ratingAllowed=!1,this.from="",this.feedbackMessage="",this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.addI18nContext(pd,gd)}get canAccessFeedback(){var t;return null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(ps.FEEDBACK,{session:this.session})}get canAccessRating(){var t,e;return null===(t=this.service)||void 0===t?void 0:t.isFeatureAccessible(ps.RATING,{session:this.session,ratingType:null===(e=this.ratingSummary)||void 0===e?void 0:e.type})}get configuredRatingType(){var t,e;return null!==(e=this.ratingAllowed?null===(t=this.ratingSummary)||void 0===t?void 0:t.type:"NO_RATING")&&void 0!==e?e:"NO_RATING"}get ratingType(){var t,e,o;return null!==(o=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.type)&&void 0!==o?o:"NO_RATING"}get ratingValue(){var t,e,o;return null!==(o=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.value)&&void 0!==o?o:-1}get ratingDate(){var t,e;const o=null===(e=null===(t=this.ratingSummary)||void 0===t?void 0:t.rating)||void 0===e?void 0:e.date;return"string"==typeof o?fo(o):o}render(){return this.canAccessFeedback||this.canAccessRating?Jt`
|
|
1731
1731
|
<div class="ft-reader-feedback">
|
|
1732
1732
|
${this.hideTitle?te:Jt`
|
|
1733
1733
|
<ft-typography variant="title" part="main-title">
|
|
@@ -1747,11 +1747,11 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1747
1747
|
${this.renderRatingDate()}
|
|
1748
1748
|
</ft-typography>
|
|
1749
1749
|
</div>
|
|
1750
|
-
`:te}renderRatingDate(){const t=this.ratingDate;if(null==t)return
|
|
1750
|
+
`:te}renderRatingDate(){const t=this.ratingDate;if(null==t)return pd.messages.notRated();if(t.getTime()>(new Date).getTime()-6e4)return pd.messages.ratedNow();return(new Date).toLocaleDateString()===t.toLocaleDateString()?pd.messages.ratedToday():pd.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case"STARS":return Jt`
|
|
1751
1751
|
<div class="ft-reader-feedback--stars" part="rating rating-stars">
|
|
1752
1752
|
${Me(new Array(5),((t,e)=>e),((t,e)=>{let o="STARS"===this.ratingType&&this.ratingValue>e;const i=e+1;return Jt`
|
|
1753
1753
|
<ft-button round part="rating-stars-${i}"
|
|
1754
|
-
label="${
|
|
1754
|
+
label="${pd.messages.starsRating(i)}"
|
|
1755
1755
|
tooltipPosition="top"
|
|
1756
1756
|
.iconVariant=${this.iconVariant}
|
|
1757
1757
|
icon="${o?this.filledStarIcon:this.emptyStarIcon}"
|
|
@@ -1768,13 +1768,13 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1768
1768
|
?selected=${e}
|
|
1769
1769
|
.iconVariant=${this.iconVariant}
|
|
1770
1770
|
icon="${e?this.filledLikeIcon:this.emptyLikeIcon}">
|
|
1771
|
-
${
|
|
1771
|
+
${pd.messages.like()}
|
|
1772
1772
|
</ft-switch-option>
|
|
1773
1773
|
<ft-switch-option .value=${0}
|
|
1774
1774
|
?selected=${t}
|
|
1775
1775
|
.iconVariant=${this.iconVariant}
|
|
1776
1776
|
icon="${t?this.filledDislikeIcon:this.emptyDislikeIcon}">
|
|
1777
|
-
${
|
|
1777
|
+
${pd.messages.dislike()}
|
|
1778
1778
|
</ft-switch-option>
|
|
1779
1779
|
</ft-switch>
|
|
1780
1780
|
`;case"DICHOTOMOUS":const o="DICHOTOMOUS"===this.ratingType&&0===this.ratingValue,i="DICHOTOMOUS"===this.ratingType&&1===this.ratingValue;return Jt`
|
|
@@ -1783,11 +1783,11 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1783
1783
|
part="rating rating-dichotomous">
|
|
1784
1784
|
<ft-switch-option .value=${1}
|
|
1785
1785
|
?selected=${i}>
|
|
1786
|
-
${
|
|
1786
|
+
${pd.messages.dichotomousYes()}
|
|
1787
1787
|
</ft-switch-option>
|
|
1788
1788
|
<ft-switch-option .value=${0}
|
|
1789
1789
|
?selected=${o}>
|
|
1790
|
-
${
|
|
1790
|
+
${pd.messages.dichotomousNo()}
|
|
1791
1791
|
</ft-switch-option>
|
|
1792
1792
|
</ft-switch>
|
|
1793
1793
|
`}return te}rate(t){(null!=t?t:-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){var t,e,o,i,r;if(this.canAccessFeedback){const n=this.feedbackMailLinkBuilder(this.feedbackMessage);let a=Jt`
|
|
@@ -1796,7 +1796,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1796
1796
|
class="ft-reader-feedback--send-feedback"
|
|
1797
1797
|
?disabled=${!this.feedbackMessage||!this.validFromEmail()}
|
|
1798
1798
|
part="send-feedback">
|
|
1799
|
-
${
|
|
1799
|
+
${pd.messages.okButton()}
|
|
1800
1800
|
</ft-button>
|
|
1801
1801
|
`;n&&(a=Jt`
|
|
1802
1802
|
<a class="ft-reader-feedback--feedback-link" href="${n}">
|
|
@@ -1808,7 +1808,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1808
1808
|
class="ft-reader-feedback--more-options"
|
|
1809
1809
|
@click="${this.onOpenMoreDetails}"
|
|
1810
1810
|
part="more-options">
|
|
1811
|
-
${
|
|
1811
|
+
${pd.messages.moreOptionsButton()}
|
|
1812
1812
|
</ft-button>
|
|
1813
1813
|
`:te;return Jt`
|
|
1814
1814
|
<form class="ft-reader-feedback--feedback" part="feedback-container" autocomplete="on"
|
|
@@ -1819,15 +1819,15 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1819
1819
|
${null==(null===(i=null===(o=this.session)||void 0===o?void 0:o.profile)||void 0===i?void 0:i.userId)&&(null===(r=this.configuration)||void 0===r?void 0:r.mailsSentByFluidTopicsForUnauthenticatedUsers)?Jt`
|
|
1820
1820
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
1821
1821
|
class="ft-reader-feedback--from-input"
|
|
1822
|
-
label=${
|
|
1822
|
+
label=${pd.messages.feedbackfromEmail()}
|
|
1823
1823
|
@change=${t=>this.from=t.detail.trim()}
|
|
1824
1824
|
?error=${this.from&&!this.validFromEmail()}
|
|
1825
|
-
helper=${this.from&&!this.validFromEmail()?
|
|
1825
|
+
helper=${this.from&&!this.validFromEmail()?pd.messages.feedbackfromEmailInvalid():""}
|
|
1826
1826
|
/>
|
|
1827
1827
|
`:te}
|
|
1828
1828
|
<ft-text-area outlined
|
|
1829
1829
|
class="ft-reader-feedback--feedback-input" part="feedback-input"
|
|
1830
|
-
label="${
|
|
1830
|
+
label="${pd.messages.feedbackInputLabel()}"
|
|
1831
1831
|
@live-change=${t=>this.feedbackMessage=t.detail.trim()}
|
|
1832
1832
|
></ft-text-area>
|
|
1833
1833
|
<div part="buttons-container">
|
|
@@ -1835,7 +1835,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1835
1835
|
${a}
|
|
1836
1836
|
</div>
|
|
1837
1837
|
</form>
|
|
1838
|
-
`}return te}onFormSubmitEvent(t,e){t.preventDefault(),e?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,e,o;return!(null==(null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)&&(null===(o=this.configuration)||void 0===o?void 0:o.mailsSentByFluidTopicsForUnauthenticatedUsers))||/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new
|
|
1838
|
+
`}return te}onFormSubmitEvent(t,e){t.preventDefault(),e?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,e,o;return!(null==(null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)&&(null===(o=this.configuration)||void 0===o?void 0:o.mailsSentByFluidTopicsForUnauthenticatedUsers))||/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new lh({message:this.feedbackInput.value,...(null===(t=this.configuration)||void 0===t?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout((()=>this.feedbackInput.value=""),0)}}ph.elementDefinitions={"ft-button":zc,"ft-typography":Gl,"ft-switch":mc,"ft-switch-option":gc,"ft-text-area":Lc,"ft-text-field":vd},ph.styles=Fl,uh([Oe({type:Boolean})],ph.prototype,"editorMode",void 0),uh([Oe({type:Boolean})],ph.prototype,"hideTitle",void 0),uh([Oe({type:Boolean})],ph.prototype,"withMoreOptionsButton",void 0),uh([Oe({type:Boolean})],ph.prototype,"ratingAllowed",void 0),uh([Oe({attribute:!1})],ph.prototype,"i18nProperties",void 0),uh([Oe({attribute:!1})],ph.prototype,"ratingSummary",void 0),uh([Oe({attribute:!1})],ph.prototype,"session",void 0),uh([$e(".ft-reader-feedback--feedback-input")],ph.prototype,"feedbackInput",void 0),uh([Se()],ph.prototype,"from",void 0),uh([Se()],ph.prototype,"feedbackMessage",void 0),uh([Oe()],ph.prototype,"iconVariant",void 0),uh([Oe()],ph.prototype,"emptyStarIcon",void 0),uh([Oe()],ph.prototype,"filledStarIcon",void 0),uh([Oe()],ph.prototype,"emptyLikeIcon",void 0),uh([Oe()],ph.prototype,"filledLikeIcon",void 0),uh([Oe()],ph.prototype,"emptyDislikeIcon",void 0),uh([Oe()],ph.prototype,"filledDislikeIcon",void 0),uh([rn({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],ph.prototype,"configuration",void 0),uh([Oe()],ph.prototype,"feedbackMailLinkBuilder",void 0);const gh=fd.fromGwt("server");class yh{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,e,o,i,r){var n;this.subject=t,this.url=e,this.configuration=i,this.isAuthenticated=r,this.subjectMetadata=this.filterMetadata(o,i.subjectMetadataIds).map((t=>"["+t.values[t.values.length-1]+"]")).join(""),this.bodyMetadata=this.filterMetadata(o,null!==(n=i.bodyMetadataIds)&&void 0!==n?n:[]).map((t=>"["+t.values.join(", ")+"]")).join(" ")}filterMetadata(t,e){return e.map((e=>t.find((t=>t.key===e)))).filter((t=>null!=t&&t.values.length>0))}shouldUseMailer(){var t,e;const o=this.isAuthenticated&&!(null===(t=this.configuration)||void 0===t?void 0:t.mailsSentByFluidTopics),i=!this.isAuthenticated&&!(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers);return o||i}build(t){var e;if(null!=t&&0===t.length||!this.shouldUseMailer())return;const o=encodeURIComponent(this.subject+" "+this.subjectMetadata),i=encodeURIComponent(`\n${this.bodyMetadata}\n${this.url}\n_________________________________________________________________\n\n${null!=t?t:""}\n\n_________________________________________________________________\n${gh.messages["mail.feedback.disclaimer"]()}`);return`mailto:${null===(e=this.configuration)||void 0===e?void 0:e.recipients.join(",")}?subject=${o}&body=${i}`}}const bh=fd.build("inDesignerFeedbackComponent"),mh={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var vh=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class xh extends(sd(ms)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=nc.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 yh,this.i18nProperties={feedbackMainTitle:pd.properties.mapFeedbackMainTitle(),ratingSectionTitle:pd.properties.mapRatingSectionTitle(),dichotomousRatingSectionTitle:pd.properties.mapDichotomousRatingSectionTitle(),feedbackSectionTitle:pd.properties.mapFeedbackSectionTitle()},this.updateDebouncer=new so(100),this.sendRatingDebouncer=new so(500),this.addStore(jc)}render(){return Jt`
|
|
1839
1839
|
<ft-reader-feedback
|
|
1840
1840
|
ratingAllowed
|
|
1841
1841
|
.i18nProperties=${this.i18nProperties}
|
|
@@ -1857,7 +1857,7 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1857
1857
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1858
1858
|
@open-more-options=${this.openMoreOptions}
|
|
1859
1859
|
></ft-reader-feedback>
|
|
1860
|
-
`}update(t){var e,o,i,r;super.update(t),t.has("map")&&this.map&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(
|
|
1860
|
+
`}update(t){var e,o,i,r;super.update(t),t.has("map")&&this.map&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(bh,mh),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(o=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==o?o:"",this.map.metadata,this.configuration,null!=(null===(r=null===(i=this.session)||void 0===i?void 0:i.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.map&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&await this.fetchRatingSummary()}))}async fetchRatingSummary(){var t;this.ratingSummary=await(null===(t=this.service)||void 0===t?void 0:t.getMapRating())}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,o,i;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(o=this.service)||void 0===o?void 0:o.rateMap(null===(i=this.ratingSummary)||void 0===i?void 0:i.type,t))}catch{this.dispatchEvent(new Ci({type:"error",message:pd.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Ci({type:"info",message:bh.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new Ci({type:"info",message:bh.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new Ci({type:"info",message:pd.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Ci({type:"error",message:pd.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new fh)}openMoreOptions(){var t,e,o;this.dispatchEvent(new dh({mapId:this.map.id,mapTitle:this.map.title,mapMetadata:(null===(t=this.map)||void 0===t?void 0:t.metadata)||[],ratingType:(null===(e=this.ratingSummary)||void 0===e?void 0:e.type)||Ld.NO_RATING,ratingValue:null===(o=this.ratingSummary)||void 0===o?void 0:o.rating}))}}xh.elementDefinitions={"ft-reader-feedback":ph},vh([rn({store:jc.name})],xh.prototype,"session",void 0),vh([rn({store:"reader"})],xh.prototype,"map",void 0),vh([rn({store:jc.name})],xh.prototype,"editorMode",void 0),vh([rn({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],xh.prototype,"configuration",void 0),vh([Se()],xh.prototype,"ratingSummary",void 0),vh([Oe({type:Boolean})],xh.prototype,"hideTitle",void 0),vh([Oe({type:Boolean})],xh.prototype,"withMoreOptionsButton",void 0),vh([Oe()],xh.prototype,"iconVariant",void 0),vh([Oe()],xh.prototype,"emptyStarIcon",void 0),vh([Oe()],xh.prototype,"filledStarIcon",void 0),vh([Oe()],xh.prototype,"emptyLikeIcon",void 0),vh([Oe()],xh.prototype,"filledLikeIcon",void 0),vh([Oe()],xh.prototype,"emptyDislikeIcon",void 0),vh([Oe()],xh.prototype,"filledDislikeIcon",void 0),vh([$e("ft-reader-feedback")],xh.prototype,"readerFeedback",void 0),vh([ud(gh.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],xh.prototype,"mailSubject",void 0),vh([nn({eventName:"rating-changed"})],xh.prototype,"fetchRatingSummary",null);var wh=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Oh extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const Sh=Symbol("registerInterval");class Ch extends(function(t){var e;class o extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[Sh]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[Sh]):this.dispatchEvent(new Oh)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=Sh,wh([Se()],o.prototype,"tocNode",void 0),wh([Se()],o.prototype,"disableContextInteractions",void 0),o}(ms)){}var Nh=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class $h extends(sd(Ch)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.withMoreOptionsButton=!1,this.iconVariant=nc.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 yh,this.i18nProperties={feedbackMainTitle:pd.properties.topicFeedbackMainTitle(),ratingSectionTitle:pd.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:pd.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:pd.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new so(100),this.sendRatingDebouncer=new so(500),this.addStore(jc)}render(){var t;return Jt`
|
|
1861
1861
|
<ft-reader-feedback
|
|
1862
1862
|
.i18nProperties=${this.i18nProperties}
|
|
1863
1863
|
?ratingAllowed=${null===(t=this.tocNode)||void 0===t?void 0:t.hasRating}
|
|
@@ -1879,4 +1879,4 @@ function ke(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=$
|
|
|
1879
1879
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1880
1880
|
@open-more-options=${this.openMoreOptions}
|
|
1881
1881
|
></ft-reader-feedback>
|
|
1882
|
-
`}update(t){var e,o,i,r;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(
|
|
1882
|
+
`}update(t){var e,o,i,r;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),t.has("editorMode")&&this.editorMode&&this.addI18nContext(bh,mh),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(o=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==o?o:"",this.map.metadata,this.configuration,null!=(null===(r=null===(i=this.session)||void 0===i?void 0:i.profile)||void 0===r?void 0:r.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(e=null===(t=this.session)||void 0===t?void 0:t.profile)||void 0===e?void 0:e.userId)||null==this.ratingSummary)&&await this.fetchRatingSummary()}))}async fetchRatingSummary(){var t;this.ratingSummary=await(null===(t=this.service)||void 0===t?void 0:t.getTopicRating(this.tocNode.tocId))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,o,i;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(o=this.service)||void 0===o?void 0:o.rateTopic(this.tocNode.tocId,null===(i=this.ratingSummary)||void 0===i?void 0:i.type,t))}catch{this.dispatchEvent(new Ci({type:"error",message:pd.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new Ci({type:"info",message:bh.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new Ci({type:"info",message:pd.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new Ci({type:"info",message:bh.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new Ci({type:"error",message:pd.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new hh(t))}openMoreOptions(){var t,e,o,i,r,n,a,s;this.dispatchEvent(new ch({mapId:this.map.id,mapTitle:this.map.title,tocId:this.tocNode.tocId,topicTitle:this.tocNode.title,topicUrl:null!==(e=null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocNode.tocId))&&void 0!==e?e:"",mapMetadata:(null===(o=this.map)||void 0===o?void 0:o.metadata)||[],breadcrumb:(null===(r=null===(i=this.stateManager)||void 0===i?void 0:i.service)||void 0===r?void 0:r.buildBreadcrumb(this.tocNode.tocId))||[],ratingType:((null===(n=this.tocNode)||void 0===n?void 0:n.hasRating)?null===(a=this.ratingSummary)||void 0===a?void 0:a.type:Ld.NO_RATING)||Ld.NO_RATING,ratingValue:null===(s=this.ratingSummary)||void 0===s?void 0:s.rating}))}}$h.elementDefinitions={"ft-reader-feedback":ph},Nh([rn({store:jc.name})],$h.prototype,"session",void 0),Nh([rn({store:"reader"})],$h.prototype,"map",void 0),Nh([rn({store:jc.name})],$h.prototype,"editorMode",void 0),Nh([rn({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],$h.prototype,"configuration",void 0),Nh([Se()],$h.prototype,"ratingSummary",void 0),Nh([Oe({type:Boolean})],$h.prototype,"hideTitle",void 0),Nh([Oe({type:Boolean})],$h.prototype,"withMoreOptionsButton",void 0),Nh([Oe()],$h.prototype,"iconVariant",void 0),Nh([Oe()],$h.prototype,"emptyStarIcon",void 0),Nh([Oe()],$h.prototype,"filledStarIcon",void 0),Nh([Oe()],$h.prototype,"emptyLikeIcon",void 0),Nh([Oe()],$h.prototype,"filledLikeIcon",void 0),Nh([Oe()],$h.prototype,"emptyDislikeIcon",void 0),Nh([Oe()],$h.prototype,"filledDislikeIcon",void 0),Nh([$e("ft-reader-feedback")],$h.prototype,"readerFeedback",void 0),Nh([ud(gh.properties["mail.feedback.subject"]((t=>{var e,o;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(o=t.map)||void 0===o?void 0:o.title]})))],$h.prototype,"mailSubject",void 0),Nh([nn({eventName:"rating-changed"})],$h.prototype,"fetchRatingSummary",null),go("ft-reader-map-feedback")(xh),go("ft-reader-topic-feedback")($h),t.FtReaderFeedbackCssVariables=Tl,t.FtReaderMapFeedback=xh,t.FtReaderTopicFeedback=$h,t.styles=Fl}({});
|