@fluid-topics/ft-reader-toc 0.3.50 → 0.3.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/ft-reader-toc.js +4 -4
- package/build/ft-reader-toc.light.js +13 -10
- package/build/ft-reader-toc.min.js +170 -167
- package/package.json +7 -7
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,a=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,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);d(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,r=new WeakMap,s=new WeakMap,a=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,n){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(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);d(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(s.set(n,h),h.standInClass=c);const f=this._awaitingUpgrade.get(t);if(f){this._awaitingUpgrade.delete(t);for(const t of f)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.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 i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=s.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):r.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,n),i.call(this,r,t,n)}else o.call(this,r,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},f=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):f(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){f(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const b=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(b(Element,"innerHTML"),b(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,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const s=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=s.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(wi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -44,7 +44,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2019 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const d=window,f=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u=Symbol(),v=new WeakMap;class
|
|
47
|
+
*/const d=window,f=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u=Symbol(),v=new WeakMap;class y{constructor(t,e,i){if(this._$cssResult$=!0,i!==u)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(f&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=v.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&v.set(e,t))}return t}toString(){return this.cssText}}const x=t=>new y("string"==typeof t?t:t+"",void 0,u),b=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new y(i,t,u)},g=(t,e)=>{f?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=d.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},m=f?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return x(e)})(t):t
|
|
48
48
|
/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
@@ -61,7 +61,7 @@ var R;z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRoot
|
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
63
|
*/
|
|
64
|
-
var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,n;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let s=r._$litPart$;if(void 0===s){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=s=new nt(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}}vt.finalized=!0,vt._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:vt});const
|
|
64
|
+
var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,n;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let s=r._$litPart$;if(void 0===s){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=s=new nt(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}}vt.finalized=!0,vt._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:vt});const yt=globalThis.litElementPolyfillSupport;null==yt||yt({LitElement:vt}),(null!==(ut=globalThis.litElementVersions)&&void 0!==ut?ut:globalThis.litElementVersions=[]).push("3.2.2");class xt{static create(t,e,i){let o=t=>x(null!=t?t:i),n=b`var(${x(t)}, ${o(i)})`;return n.name=t,n.category=e,n.defaultValue=i,n.defaultCssValue=o,n.get=e=>b`var(${x(t)}, ${o(e)})`,n.breadcrumb=()=>[],n.lastResortDefaultValue=()=>i,n}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),n=b`var(${x(t)}, ${o(i)})`;return n.name=t,n.category=e.category,n.fallbackVariable=e,n.defaultValue=i,n.defaultCssValue=o,n.get=e=>b`var(${x(t)}, ${o(e)})`,n.breadcrumb=()=>[e.name,...e.breadcrumb()],n.lastResortDefaultValue=()=>i,n}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):x(null!=e?e:t.defaultValue),o=b`var(${x(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>b`var(${x(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function bt(t,e){return x(`${t.name}: ${e}`)}const gt={colorPrimary:xt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:xt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:xt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:xt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:xt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:xt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:xt.create("--ft-color-error","COLOR","#B00020"),colorOutline:xt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:xt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:xt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:xt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:xt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:xt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:xt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:xt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:xt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:xt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:xt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:xt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:xt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:xt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:xt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:xt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:xt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:xt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:xt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:xt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:xt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:xt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:xt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:xt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:xt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:xt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:xt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:xt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:xt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:xt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:xt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:xt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:xt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:xt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:xt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:xt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:xt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:xt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:xt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:xt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:xt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:xt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:xt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:xt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:xt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:xt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:xt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:xt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:xt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:xt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:xt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:xt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:xt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:xt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:xt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
65
65
|
/**
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2021 Google LLC
|
|
@@ -71,7 +71,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
71
71
|
<style>${t}</style>
|
|
72
72
|
`))}
|
|
73
73
|
${this.getTemplate()}
|
|
74
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,n,r,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],i=null!==(s=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}mt([o()],wt.prototype,"exportpartsPrefix",void 0),mt([c([])],wt.prototype,"exportpartsPrefixes",void 0);const $t=b`
|
|
74
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,n,r,s;const a=t=>null!=t&&t.trim().length>0,l=t.filter(a).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(n=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==n?n:[],i=null!==(s=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==s?s:[];new Array(...e,...i).filter(a).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}mt([o()],wt.prototype,"exportpartsPrefix",void 0),mt([c([])],wt.prototype,"exportpartsPrefixes",void 0),mt([o()],wt.prototype,"customStylesheet",void 0);const $t=b`
|
|
75
75
|
.ft-no-text-select {
|
|
76
76
|
-webkit-touch-callout: none;
|
|
77
77
|
-webkit-user-select: none;
|
|
@@ -92,129 +92,129 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
92
92
|
-webkit-hyphens: auto;
|
|
93
93
|
hyphens: auto
|
|
94
94
|
}
|
|
95
|
-
`;class Ot{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>n=n.replace(new RegExp(`\\{${e}\\}`,"g"),t))),n}}const St=(t,e)=>
|
|
95
|
+
`;class Ot{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,o;let n=null!==(o=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==o?o:"";return e.forEach(((t,e)=>n=n.replace(new RegExp(`\\{${e}\\}`,"g"),t))),n}}const St=(t,e)=>{var i;const o="function"==typeof t?{}:null!=t?t:{};return e=null!==(i=null!=e?e:o.hasChanged)&&void 0!==i?i:(t,e)=>!p(t,e),(i,n)=>{var r;i.constructor.createProperty(n,{attribute:!1,hasChanged:e});const s=i;s.reduxProperties=s.reduxProperties||new Map;const a=null!==(r="function"==typeof t?t:o.selector)&&void 0!==r?r:t=>t[n];s.reduxProperties.set(n,{selector:a,store:o.store})}};class kt extends wt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Ct(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Ct(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t)))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function Ct(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}var Nt,Et,zt;const Rt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(zt=null===(Et=null===(Nt=window.safari)||void 0===Nt?void 0:Nt.pushNotification)||void 0===Et?void 0:Et.toString())&&void 0!==zt?zt:""),Mt=1,At=2,jt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
96
96
|
/**
|
|
97
97
|
* @license
|
|
98
98
|
* Copyright 2017 Google LLC
|
|
99
99
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
100
|
-
*/class
|
|
100
|
+
*/class Ut{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
101
101
|
/**
|
|
102
102
|
* @license
|
|
103
103
|
* Copyright 2020 Google LLC
|
|
104
104
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
105
|
-
*/const{I:
|
|
105
|
+
*/const{I:Ft}=pt,Lt=()=>document.createComment(""),Bt=(t,e,i)=>{var o;const n=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=n.insertBefore(Lt(),r),o=n.insertBefore(Lt(),r);i=new Ft(e,o,t,t.options)}else{const e=i._$AB.nextSibling,s=i._$AM,a=s!==t;if(a){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==s._$AU&&i._$AP(e)}if(e!==r||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;n.insertBefore(t,r),t=e}}}return i},Tt=(t,e,i=t)=>(t._$AI(e,i),t),It={},Pt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},_t=(t,e,i)=>{const o=new Map;for(let n=e;n<=i;n++)o.set(t[n],n);return o},Dt=jt(class extends Ut{constructor(t){if(super(t),t.type!==At)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const n=[],r=[];let s=0;for(const e of t)n[s]=o?o(e,s):s,r[s]=i(e,s),s++;return{values:r,keys:n}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var n;const r=(t=>t._$AH)(t),{values:s,keys:a}=this.ht(e,i,o);if(!Array.isArray(r))return this.ut=a,s;const l=null!==(n=this.ut)&&void 0!==n?n:this.ut=[],h=[];let c,p,d=0,f=r.length-1,u=0,v=s.length-1;for(;d<=f&&u<=v;)if(null===r[d])d++;else if(null===r[f])f--;else if(l[d]===a[u])h[u]=Tt(r[d],s[u]),d++,u++;else if(l[f]===a[v])h[v]=Tt(r[f],s[v]),f--,v--;else if(l[d]===a[v])h[v]=Tt(r[d],s[v]),Bt(t,h[v+1],r[d]),d++,v--;else if(l[f]===a[u])h[u]=Tt(r[f],s[u]),Bt(t,r[d],r[f]),f--,u++;else if(void 0===c&&(c=_t(a,u,v),p=_t(l,d,f)),c.has(l[d]))if(c.has(l[f])){const e=p.get(a[u]),i=void 0!==e?r[e]:null;if(null===i){const e=Bt(t,r[d]);Tt(e,s[u]),h[u]=e}else h[u]=Tt(i,s[u]),Bt(t,r[d],i),r[e]=null;u++}else Pt(r[f]),f--;else Pt(r[d]),d++;for(;u<=v;){const e=Bt(t,h[v+1]);Tt(e,s[u]),h[u++]=e}for(;d<=f;){const t=r[d++];null!==t&&Pt(t)}return this.ut=a,((t,e=It)=>{t._$AH=e})(t,h),q}}),Wt=jt(class extends Ut{constructor(t){var e;if(super(t),t.type!==Mt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return q}}),Ht=jt(class extends Ut{constructor(t){var e;if(super(t),t.type!==Mt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const o=t[i];return null==o?e:e+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?i.removeProperty(t):i[t]="")}));for(const t in e){const o=e[t];null!=o&&(this.vt.add(t),t.includes("-")?i.setProperty(t,o):i[t]=o)}return q}});
|
|
106
106
|
/**
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2017 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
110
|
-
*/var
|
|
110
|
+
*/var Kt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Zt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class Vt extends(function(t){class e extends t{constructor(){super(...arguments),this.registerIntervalReader=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store)}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this.registerIntervalReader=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this.registerIntervalReader):this.dispatchEvent(new Zt)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Kt([n()],e.prototype,"stateManager",void 0),e}(kt)){}
|
|
111
111
|
/**
|
|
112
112
|
* @license
|
|
113
113
|
* Copyright 2020 Google LLC
|
|
114
114
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
115
|
-
*/const
|
|
115
|
+
*/const Xt=Symbol.for(""),Jt=t=>{if((null==t?void 0:t.r)===Xt)return null==t?void 0:t._$litStatic$},qt=t=>({_$litStatic$:t,r:Xt}),Yt=new Map,Gt=(t=>(e,...i)=>{const o=i.length;let n,r;const s=[],a=[];let l,h=0,c=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(r=i[h],n=Jt(r));)l+=n+e[++h],c=!0;a.push(r),s.push(l),h++}if(h===o&&s.push(e[o]),c){const t=s.join("$$lit$$");void 0===(e=Yt.get(t))&&(s.raw=s,Yt.set(t,e=s)),i=a}return t(e,...i)})(J);var Qt;!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"}(Qt||(Qt={}));const te=xt.extend("--ft-typography-font-family",gt.titleFont),ee=xt.extend("--ft-typography-font-family",gt.contentFont),ie={fontFamily:ee,fontSize:xt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:xt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:xt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:xt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:xt.create("--ft-typography-text-transform","UNKNOWN","inherit")},oe=xt.extend("--ft-typography-title-font-family",te),ne=xt.extend("--ft-typography-title-font-size",ie.fontSize,"20px"),re=xt.extend("--ft-typography-title-font-weight",ie.fontWeight,"normal"),se=xt.extend("--ft-typography-title-letter-spacing",ie.letterSpacing,"0.15px"),ae=xt.extend("--ft-typography-title-line-height",ie.lineHeight,"1.2"),le=xt.extend("--ft-typography-title-text-transform",ie.textTransform,"inherit"),he=xt.extend("--ft-typography-title-dense-font-family",te),ce=xt.extend("--ft-typography-title-dense-font-size",ie.fontSize,"14px"),pe=xt.extend("--ft-typography-title-dense-font-weight",ie.fontWeight,"normal"),de=xt.extend("--ft-typography-title-dense-letter-spacing",ie.letterSpacing,"0.105px"),fe=xt.extend("--ft-typography-title-dense-line-height",ie.lineHeight,"1.7"),ue=xt.extend("--ft-typography-title-dense-text-transform",ie.textTransform,"inherit"),ve=xt.extend("--ft-typography-subtitle1-font-family",ee),ye=xt.extend("--ft-typography-subtitle1-font-size",ie.fontSize,"16px"),xe=xt.extend("--ft-typography-subtitle1-font-weight",ie.fontWeight,"600"),be=xt.extend("--ft-typography-subtitle1-letter-spacing",ie.letterSpacing,"0.144px"),ge=xt.extend("--ft-typography-subtitle1-line-height",ie.lineHeight,"1.5"),me=xt.extend("--ft-typography-subtitle1-text-transform",ie.textTransform,"inherit"),we=xt.extend("--ft-typography-subtitle2-font-family",ee),$e=xt.extend("--ft-typography-subtitle2-font-size",ie.fontSize,"14px"),Oe=xt.extend("--ft-typography-subtitle2-font-weight",ie.fontWeight,"normal"),Se=xt.extend("--ft-typography-subtitle2-letter-spacing",ie.letterSpacing,"0.098px"),ke=xt.extend("--ft-typography-subtitle2-line-height",ie.lineHeight,"1.7"),Ce=xt.extend("--ft-typography-subtitle2-text-transform",ie.textTransform,"inherit"),Ne=xt.extend("--ft-typography-body1-font-family",ee),Ee=xt.extend("--ft-typography-body1-font-size",ie.fontSize,"16px"),ze=xt.extend("--ft-typography-body1-font-weight",ie.fontWeight,"normal"),Re=xt.extend("--ft-typography-body1-letter-spacing",ie.letterSpacing,"0.496px"),Me=xt.extend("--ft-typography-body1-line-height",ie.lineHeight,"1.5"),Ae=xt.extend("--ft-typography-body1-text-transform",ie.textTransform,"inherit"),je=xt.extend("--ft-typography-body2-font-family",ee),Ue=xt.extend("--ft-typography-body2-font-size",ie.fontSize,"14px"),Fe=xt.extend("--ft-typography-body2-font-weight",ie.fontWeight,"normal"),Le=xt.extend("--ft-typography-body2-letter-spacing",ie.letterSpacing,"0.252px"),Be=xt.extend("--ft-typography-body2-line-height",ie.lineHeight,"1.4"),Te=xt.extend("--ft-typography-body2-text-transform",ie.textTransform,"inherit"),Ie=xt.extend("--ft-typography-caption-font-family",ee),Pe=xt.extend("--ft-typography-caption-font-size",ie.fontSize,"12px"),_e=xt.extend("--ft-typography-caption-font-weight",ie.fontWeight,"normal"),De=xt.extend("--ft-typography-caption-letter-spacing",ie.letterSpacing,"0.396px"),We=xt.extend("--ft-typography-caption-line-height",ie.lineHeight,"1.33"),He=xt.extend("--ft-typography-caption-text-transform",ie.textTransform,"inherit"),Ke=xt.extend("--ft-typography-breadcrumb-font-family",ee),Ze=xt.extend("--ft-typography-breadcrumb-font-size",ie.fontSize,"10px"),Ve=xt.extend("--ft-typography-breadcrumb-font-weight",ie.fontWeight,"normal"),Xe=xt.extend("--ft-typography-breadcrumb-letter-spacing",ie.letterSpacing,"0.33px"),Je=xt.extend("--ft-typography-breadcrumb-line-height",ie.lineHeight,"1.6"),qe=xt.extend("--ft-typography-breadcrumb-text-transform",ie.textTransform,"inherit"),Ye=xt.extend("--ft-typography-overline-font-family",ee),Ge=xt.extend("--ft-typography-overline-font-size",ie.fontSize,"10px"),Qe=xt.extend("--ft-typography-overline-font-weight",ie.fontWeight,"normal"),ti=xt.extend("--ft-typography-overline-letter-spacing",ie.letterSpacing,"1.5px"),ei=xt.extend("--ft-typography-overline-line-height",ie.lineHeight,"1.6"),ii=xt.extend("--ft-typography-overline-text-transform",ie.textTransform,"uppercase"),oi={fontFamily:xt.extend("--ft-typography-button-font-family",ee),fontSize:xt.extend("--ft-typography-button-font-size",ie.fontSize,"14px"),fontWeight:xt.extend("--ft-typography-button-font-weight",ie.fontWeight,"600"),letterSpacing:xt.extend("--ft-typography-button-letter-spacing",ie.letterSpacing,"1.246px"),lineHeight:xt.extend("--ft-typography-button-line-height",ie.lineHeight,"1.15"),textTransform:xt.extend("--ft-typography-button-text-transform",ie.textTransform,"uppercase")},ni=b`
|
|
116
116
|
.ft-typography--title {
|
|
117
|
-
font-family: ${
|
|
118
|
-
font-size: ${
|
|
119
|
-
font-weight: ${
|
|
120
|
-
letter-spacing: ${
|
|
121
|
-
line-height: ${
|
|
122
|
-
text-transform: ${
|
|
123
|
-
}
|
|
124
|
-
`,ni=b`
|
|
125
|
-
.ft-typography--title-dense {
|
|
126
|
-
font-family: ${le};
|
|
127
|
-
font-size: ${he};
|
|
128
|
-
font-weight: ${ce};
|
|
129
|
-
letter-spacing: ${pe};
|
|
130
|
-
line-height: ${de};
|
|
131
|
-
text-transform: ${fe};
|
|
117
|
+
font-family: ${oe};
|
|
118
|
+
font-size: ${ne};
|
|
119
|
+
font-weight: ${re};
|
|
120
|
+
letter-spacing: ${se};
|
|
121
|
+
line-height: ${ae};
|
|
122
|
+
text-transform: ${le};
|
|
132
123
|
}
|
|
133
124
|
`,ri=b`
|
|
125
|
+
.ft-typography--title-dense {
|
|
126
|
+
font-family: ${he};
|
|
127
|
+
font-size: ${ce};
|
|
128
|
+
font-weight: ${pe};
|
|
129
|
+
letter-spacing: ${de};
|
|
130
|
+
line-height: ${fe};
|
|
131
|
+
text-transform: ${ue};
|
|
132
|
+
}
|
|
133
|
+
`,si=b`
|
|
134
134
|
.ft-typography--subtitle1 {
|
|
135
|
-
font-family: ${
|
|
136
|
-
font-size: ${
|
|
135
|
+
font-family: ${ve};
|
|
136
|
+
font-size: ${ye};
|
|
137
137
|
font-weight: ${xe};
|
|
138
|
-
letter-spacing: ${
|
|
139
|
-
line-height: ${
|
|
140
|
-
text-transform: ${
|
|
138
|
+
letter-spacing: ${be};
|
|
139
|
+
line-height: ${ge};
|
|
140
|
+
text-transform: ${me};
|
|
141
141
|
}
|
|
142
|
-
`,
|
|
142
|
+
`,ai=b`
|
|
143
143
|
.ft-typography--subtitle2 {
|
|
144
|
-
font-family: ${
|
|
145
|
-
font-size: ${
|
|
146
|
-
font-weight: ${
|
|
147
|
-
letter-spacing: ${
|
|
148
|
-
line-height: ${
|
|
149
|
-
text-transform: ${
|
|
144
|
+
font-family: ${we};
|
|
145
|
+
font-size: ${$e};
|
|
146
|
+
font-weight: ${Oe};
|
|
147
|
+
letter-spacing: ${Se};
|
|
148
|
+
line-height: ${ke};
|
|
149
|
+
text-transform: ${Ce};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
`,ai=b`
|
|
153
|
-
.ft-typography--body1 {
|
|
154
|
-
font-family: ${Ce};
|
|
155
|
-
font-size: ${Ne};
|
|
156
|
-
font-weight: ${Ee};
|
|
157
|
-
letter-spacing: ${ze};
|
|
158
|
-
line-height: ${Re};
|
|
159
|
-
text-transform: ${Me};
|
|
160
|
-
}
|
|
161
152
|
`,li=b`
|
|
162
|
-
.ft-typography--
|
|
163
|
-
font-family: ${
|
|
164
|
-
font-size: ${
|
|
165
|
-
font-weight: ${
|
|
166
|
-
letter-spacing: ${
|
|
167
|
-
line-height: ${
|
|
168
|
-
text-transform: ${
|
|
153
|
+
.ft-typography--body1 {
|
|
154
|
+
font-family: ${Ne};
|
|
155
|
+
font-size: ${Ee};
|
|
156
|
+
font-weight: ${ze};
|
|
157
|
+
letter-spacing: ${Re};
|
|
158
|
+
line-height: ${Me};
|
|
159
|
+
text-transform: ${Ae};
|
|
169
160
|
}
|
|
170
161
|
`,hi=b`
|
|
171
|
-
.ft-typography--
|
|
172
|
-
font-family: ${
|
|
173
|
-
font-size: ${
|
|
174
|
-
font-weight: ${
|
|
175
|
-
letter-spacing: ${
|
|
176
|
-
line-height: ${
|
|
177
|
-
text-transform: ${
|
|
162
|
+
.ft-typography--body2 {
|
|
163
|
+
font-family: ${je};
|
|
164
|
+
font-size: ${Ue};
|
|
165
|
+
font-weight: ${Fe};
|
|
166
|
+
letter-spacing: ${Le};
|
|
167
|
+
line-height: ${Be};
|
|
168
|
+
text-transform: ${Te};
|
|
178
169
|
}
|
|
179
170
|
`,ci=b`
|
|
180
|
-
.ft-typography--
|
|
181
|
-
font-family: ${
|
|
182
|
-
font-size: ${
|
|
183
|
-
font-weight: ${
|
|
184
|
-
letter-spacing: ${
|
|
185
|
-
line-height: ${
|
|
186
|
-
text-transform: ${
|
|
171
|
+
.ft-typography--caption {
|
|
172
|
+
font-family: ${Ie};
|
|
173
|
+
font-size: ${Pe};
|
|
174
|
+
font-weight: ${_e};
|
|
175
|
+
letter-spacing: ${De};
|
|
176
|
+
line-height: ${We};
|
|
177
|
+
text-transform: ${He};
|
|
187
178
|
}
|
|
188
179
|
`,pi=b`
|
|
189
|
-
.ft-typography--
|
|
190
|
-
font-family: ${
|
|
191
|
-
font-size: ${
|
|
192
|
-
font-weight: ${
|
|
193
|
-
letter-spacing: ${
|
|
194
|
-
line-height: ${
|
|
195
|
-
text-transform: ${
|
|
180
|
+
.ft-typography--breadcrumb {
|
|
181
|
+
font-family: ${Ke};
|
|
182
|
+
font-size: ${Ze};
|
|
183
|
+
font-weight: ${Ve};
|
|
184
|
+
letter-spacing: ${Xe};
|
|
185
|
+
line-height: ${Je};
|
|
186
|
+
text-transform: ${qe};
|
|
196
187
|
}
|
|
197
188
|
`,di=b`
|
|
198
|
-
.ft-typography--
|
|
199
|
-
font-family: ${
|
|
200
|
-
font-size: ${
|
|
201
|
-
font-weight: ${
|
|
202
|
-
letter-spacing: ${
|
|
203
|
-
line-height: ${
|
|
204
|
-
text-transform: ${ii
|
|
189
|
+
.ft-typography--overline {
|
|
190
|
+
font-family: ${Ye};
|
|
191
|
+
font-size: ${Ge};
|
|
192
|
+
font-weight: ${Qe};
|
|
193
|
+
letter-spacing: ${ti};
|
|
194
|
+
line-height: ${ei};
|
|
195
|
+
text-transform: ${ii};
|
|
205
196
|
}
|
|
206
197
|
`,fi=b`
|
|
198
|
+
.ft-typography--button {
|
|
199
|
+
font-family: ${oi.fontFamily};
|
|
200
|
+
font-size: ${oi.fontSize};
|
|
201
|
+
font-weight: ${oi.fontWeight};
|
|
202
|
+
letter-spacing: ${oi.letterSpacing};
|
|
203
|
+
line-height: ${oi.lineHeight};
|
|
204
|
+
text-transform: ${oi.textTransform};
|
|
205
|
+
}
|
|
206
|
+
`,ui=b`
|
|
207
207
|
.ft-typography {
|
|
208
208
|
vertical-align: inherit;
|
|
209
209
|
}
|
|
210
|
-
`;var
|
|
211
|
-
<${
|
|
210
|
+
`;var vi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class yi extends wt{constructor(){super(...arguments),this.variant=Qt.body1}render(){return this.element?Gt`
|
|
211
|
+
<${qt(this.element)}
|
|
212
212
|
class="ft-typography ft-typography--${this.variant}">
|
|
213
213
|
<slot></slot>
|
|
214
|
-
</${
|
|
215
|
-
`:
|
|
214
|
+
</${qt(this.element)}>
|
|
215
|
+
`:Gt`
|
|
216
216
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
217
|
-
`}}
|
|
217
|
+
`}}yi.styles=[ni,ri,si,ai,li,hi,ci,pi,di,fi,ui],vi([o()],yi.prototype,"element",void 0),vi([o()],yi.prototype,"variant",void 0),h("ft-typography")(yi);const xi=xt.extend("--ft-reader-internal-link-outline-color",gt.colorPrimary),bi=b`
|
|
218
218
|
:host {
|
|
219
219
|
display: contents;
|
|
220
220
|
}
|
|
@@ -227,34 +227,35 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
227
227
|
text-decoration: none;
|
|
228
228
|
color: inherit;
|
|
229
229
|
}
|
|
230
|
-
`;var
|
|
230
|
+
`;var gi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class mi extends Vt{constructor(){super(...arguments),this.removeStyle=!1}render(){var t;let e=Wt({"ft-reader-link":!0,"ft-reader-link--remove-style":this.removeStyle});return J`
|
|
231
231
|
<a class=${e}
|
|
232
232
|
href="${null===(t=this.service)||void 0===t?void 0:t.getLink(this.tocId,this.pageNumber,this.section)}"
|
|
233
233
|
@click=${t=>this.onLinkClick(t)}>
|
|
234
234
|
<slot></slot>
|
|
235
235
|
</a>
|
|
236
|
-
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}
|
|
236
|
+
`}onLinkClick(t){var e;t.ctrlKey||t.metaKey||(t.stopPropagation(),t.preventDefault(),this.tocId&&(null===(e=this.stateManager)||void 0===e||e.navigateToTopic(this.tocId,this.section,this.pageNumber)),this.click())}}mi.styles=bi,gi([o()],mi.prototype,"tocId",void 0),gi([o()],mi.prototype,"section",void 0),gi([o({type:Number})],mi.prototype,"pageNumber",void 0),gi([o({type:Boolean})],mi.prototype,"removeStyle",void 0),h("ft-reader-internal-link")(mi);
|
|
237
237
|
/**
|
|
238
238
|
* @license
|
|
239
239
|
* Copyright 2017 Google LLC
|
|
240
240
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
241
241
|
*/
|
|
242
|
-
class
|
|
242
|
+
class wi extends Ut{constructor(t){if(super(t),this.it=Y,t.type!==At)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Y||null==t)return this._t=void 0,this.it=t;if(t===q)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}wi.directiveName="unsafeHTML",wi.resultType=1;const $i=jt(wi);var Oi,Si;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",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_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.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_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=""}(Oi||(Oi={})),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=""}(Si||(Si={})),new Map([...["abw"].map((t=>[t,Si.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,Si.AUDIO])),...["avi"].map((t=>[t,Si.AVI])),...["chm","xhs"].map((t=>[t,Si.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,Si.CODE])),...["csv"].map((t=>[t,Si.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Si.DITA])),...["epub"].map((t=>[t,Si.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Si.EXCEL])),...["flac"].map((t=>[t,Si.FLAC])),...["gif"].map((t=>[t,Si.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Si.GZIP])),...["html","htm","xhtml"].map((t=>[t,Si.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Si.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Si.JPEG])),...["json"].map((t=>[t,Si.JSON])),...["m4a","m4p"].map((t=>[t,Si.M4A])),...["mov","qt"].map((t=>[t,Si.MOV])),...["mp3"].map((t=>[t,Si.MP3])),...["mp4","m4v"].map((t=>[t,Si.MP4])),...["ogg","oga"].map((t=>[t,Si.OGG])),...["pdf","ps"].map((t=>[t,Si.PDF])),...["png"].map((t=>[t,Si.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Si.POWERPOINT])),...["rar"].map((t=>[t,Si.RAR])),...["stp"].map((t=>[t,Si.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Si.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,Si.VIDEO])),...["wav"].map((t=>[t,Si.WAV])),...["wma"].map((t=>[t,Si.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Si.WORD])),...["xml","xsl","rdf"].map((t=>[t,Si.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Si.YAML])),...["zip"].map((t=>[t,Si.ZIP]))]);const ki={size:xt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:xt.extend("--ft-icon-fluid-topics-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:xt.extend("--ft-icon-file-format-font-family",xt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:xt.extend("--ft-icon-material-font-family",xt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:xt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ci=b`
|
|
243
243
|
:host, i.ft-icon {
|
|
244
244
|
display: inline-flex;
|
|
245
245
|
align-items: center;
|
|
246
|
-
|
|
246
|
+
flex-shrink: 0;
|
|
247
|
+
flex-grow: 0;
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
:host {
|
|
250
|
-
width: ${
|
|
251
|
-
height: ${
|
|
251
|
+
width: ${ki.size};
|
|
252
|
+
height: ${ki.size};
|
|
252
253
|
}
|
|
253
254
|
|
|
254
255
|
i.ft-icon {
|
|
255
256
|
width: 100%;
|
|
256
257
|
height: 100%;
|
|
257
|
-
font-size: ${
|
|
258
|
+
font-size: ${ki.size};
|
|
258
259
|
line-height: 1;
|
|
259
260
|
font-weight: normal;
|
|
260
261
|
text-transform: none;
|
|
@@ -265,31 +266,32 @@ class mi extends jt{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
265
266
|
text-rendering: auto;
|
|
266
267
|
-webkit-font-smoothing: antialiased;
|
|
267
268
|
-moz-osx-font-smoothing: grayscale;
|
|
268
|
-
vertical-align: ${
|
|
269
|
+
vertical-align: ${ki.verticalAlign};
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
i.ft-icon.ft-icon--fluid-topics {
|
|
272
|
-
font-family: ${
|
|
273
|
+
font-family: ${ki.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
273
274
|
|
|
274
275
|
/* Ugly fix because font is broken */
|
|
275
|
-
font-size: calc(0.9 * ${
|
|
276
|
+
font-size: calc(0.9 * ${ki.size});
|
|
276
277
|
position: relative;
|
|
277
278
|
top: -5%;
|
|
279
|
+
justify-content: center;
|
|
278
280
|
}
|
|
279
281
|
|
|
280
282
|
.ft-icon--file-format {
|
|
281
|
-
font-family: ${
|
|
283
|
+
font-family: ${ki.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
282
284
|
}
|
|
283
285
|
|
|
284
286
|
.ft-icon--material {
|
|
285
|
-
font-family: ${
|
|
287
|
+
font-family: ${ki.materialFontFamily}, "Material Icons", sans-serif;
|
|
286
288
|
}
|
|
287
|
-
`;var
|
|
289
|
+
`;var Ni;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ni||(Ni={}));var Ei=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class zi extends wt{constructor(){super(...arguments),this.variant=Ni.fluid_topics,this.resolvedIcon=Y}render(){const t="material"!==this.variant||this.value;return J`
|
|
288
290
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
289
|
-
${
|
|
291
|
+
${$i(this.resolvedIcon)}
|
|
290
292
|
<slot ?hidden=${t}></slot>
|
|
291
293
|
</i>
|
|
292
|
-
`}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 i=this.value||this.textContent;switch(this.variant){case
|
|
294
|
+
`}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 i=this.value||this.textContent;switch(this.variant){case Ni.file_format:this.resolvedIcon=null!==(t=Si[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ni.fluid_topics:this.resolvedIcon=null!==(e=Oi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||Y}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}zi.elementDefinitions={},zi.styles=Ci,Ei([o()],zi.prototype,"variant",void 0),Ei([o()],zi.prototype,"value",void 0),Ei([n()],zi.prototype,"resolvedIcon",void 0),Ei([s("slot")],zi.prototype,"slottedContent",void 0),h("ft-icon")(zi);const Ri=xt.extend("--ft-ripple-color",gt.colorContent),Mi={color:Ri,backgroundColor:xt.extend("--ft-ripple-background-color",Ri),opacityContentOnSurfacePressed:xt.external(gt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(gt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(gt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(gt.opacityContentOnSurfaceSelected,"Design system")},Ai=xt.extend("--ft-ripple-color",gt.colorPrimary),ji=Ai,Ui=xt.extend("--ft-ripple-background-color",Ai),Fi=xt.extend("--ft-ripple-color",gt.colorSecondary),Li=Fi,Bi=xt.extend("--ft-ripple-background-color",Fi),Ti=b`
|
|
293
295
|
:host {
|
|
294
296
|
display: contents;
|
|
295
297
|
}
|
|
@@ -311,27 +313,27 @@ class mi extends jt{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
311
313
|
}
|
|
312
314
|
|
|
313
315
|
.ft-ripple .ft-ripple--background {
|
|
314
|
-
background-color: ${
|
|
316
|
+
background-color: ${Mi.backgroundColor};
|
|
315
317
|
}
|
|
316
318
|
|
|
317
319
|
.ft-ripple .ft-ripple--effect {
|
|
318
|
-
background-color: ${
|
|
320
|
+
background-color: ${Mi.color};
|
|
319
321
|
}
|
|
320
322
|
|
|
321
323
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
322
|
-
background-color: ${
|
|
324
|
+
background-color: ${Bi};
|
|
323
325
|
}
|
|
324
326
|
|
|
325
327
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
326
|
-
background-color: ${
|
|
328
|
+
background-color: ${Li};
|
|
327
329
|
}
|
|
328
330
|
|
|
329
331
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
330
|
-
background-color: ${
|
|
332
|
+
background-color: ${Ui};
|
|
331
333
|
}
|
|
332
334
|
|
|
333
335
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
334
|
-
background-color: ${
|
|
336
|
+
background-color: ${ji};
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
.ft-ripple .ft-ripple--background {
|
|
@@ -363,22 +365,22 @@ class mi extends jt{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
363
365
|
}
|
|
364
366
|
|
|
365
367
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
366
|
-
opacity: ${
|
|
368
|
+
opacity: ${Mi.opacityContentOnSurfaceHover};
|
|
367
369
|
}
|
|
368
370
|
|
|
369
371
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
370
|
-
opacity: ${
|
|
372
|
+
opacity: ${Mi.opacityContentOnSurfaceSelected};
|
|
371
373
|
}
|
|
372
374
|
|
|
373
375
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
374
|
-
opacity: ${
|
|
376
|
+
opacity: ${Mi.opacityContentOnSurfaceFocused};
|
|
375
377
|
}
|
|
376
378
|
|
|
377
379
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
378
|
-
opacity: ${
|
|
380
|
+
opacity: ${Mi.opacityContentOnSurfacePressed};
|
|
379
381
|
transform: translate(-50%, -50%) scale(1);
|
|
380
382
|
}
|
|
381
|
-
`;var
|
|
383
|
+
`;var Ii=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Pi extends wt{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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(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.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.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.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 J`
|
|
382
384
|
<style>
|
|
383
385
|
.ft-ripple .ft-ripple--effect,
|
|
384
386
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -391,11 +393,11 @@ class mi extends jt{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
391
393
|
top: ${this.originY}px;
|
|
392
394
|
}
|
|
393
395
|
</style>
|
|
394
|
-
<div class="${
|
|
396
|
+
<div class="${Wt(t)}">
|
|
395
397
|
<div class="ft-ripple--background"></div>
|
|
396
398
|
<div class="ft-ripple--effect"></div>
|
|
397
399
|
</div>
|
|
398
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(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)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}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.resizeObserver.disconnect(),this.endRipple()}}
|
|
400
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(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)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}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.resizeObserver.disconnect(),this.endRipple()}}Pi.elementDefinitions={},Pi.styles=Ti,Ii([o({type:Boolean})],Pi.prototype,"primary",void 0),Ii([o({type:Boolean})],Pi.prototype,"secondary",void 0),Ii([o({type:Boolean})],Pi.prototype,"unbounded",void 0),Ii([o({type:Boolean})],Pi.prototype,"activated",void 0),Ii([o({type:Boolean})],Pi.prototype,"selected",void 0),Ii([o({type:Boolean})],Pi.prototype,"disabled",void 0),Ii([n()],Pi.prototype,"hovered",void 0),Ii([n()],Pi.prototype,"focused",void 0),Ii([n()],Pi.prototype,"pressed",void 0),Ii([n()],Pi.prototype,"rippling",void 0),Ii([n()],Pi.prototype,"rippleSize",void 0),Ii([n()],Pi.prototype,"originX",void 0),Ii([n()],Pi.prototype,"originY",void 0),Ii([s(".ft-ripple")],Pi.prototype,"ripple",void 0),Ii([s(".ft-ripple--effect")],Pi.prototype,"rippleEffect",void 0),h("ft-ripple")(Pi);const _i=xt.create("--ft-tooltip-distance","SIZE","4px"),Di=xt.create("--ft-tooltip-color","COLOR","#FFFFFF"),Wi=xt.create("--ft-tooltip-background-color","COLOR","#666666"),Hi=xt.create("--ft-tooltip-z-index","NUMBER","1"),Ki=xt.external(gt.borderRadiusS,"Design system"),Zi=xt.create("--ft-tooltip-max-width","SIZE","150px"),Vi=b`
|
|
399
401
|
.ft-tooltip--container {
|
|
400
402
|
display: block;
|
|
401
403
|
position: relative;
|
|
@@ -411,23 +413,23 @@ class mi extends jt{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
411
413
|
box-sizing: border-box;
|
|
412
414
|
overflow: hidden;
|
|
413
415
|
width: max-content;
|
|
414
|
-
max-width: ${
|
|
416
|
+
max-width: ${Zi};
|
|
415
417
|
text-align: center;
|
|
416
|
-
padding: ${
|
|
417
|
-
z-index: ${
|
|
418
|
+
padding: ${_i};
|
|
419
|
+
z-index: ${Hi};
|
|
418
420
|
}
|
|
419
421
|
|
|
420
422
|
.ft-tooltip--content {
|
|
421
423
|
padding: 4px 8px;
|
|
422
|
-
border-radius: ${
|
|
423
|
-
background-color: ${
|
|
424
|
-
color: ${
|
|
424
|
+
border-radius: ${Ki};
|
|
425
|
+
background-color: ${Wi};
|
|
426
|
+
color: ${Di};
|
|
425
427
|
top: -500px;
|
|
426
428
|
left: -500px;
|
|
427
429
|
position: relative;
|
|
428
430
|
word-break: break-word;
|
|
429
431
|
}
|
|
430
|
-
`;var
|
|
432
|
+
`;var Xi=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ji extends wt{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 e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return J`
|
|
431
433
|
<div part="container"
|
|
432
434
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
433
435
|
@mouseenter=${this.onHover}
|
|
@@ -445,13 +447,13 @@ class mi extends jt{constructor(t){if(super(t),this.it=Y,t.type!==Mt)throw Error
|
|
|
445
447
|
</div>
|
|
446
448
|
</div>
|
|
447
449
|
</div>
|
|
448
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&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();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${e.width}px, ${
|
|
450
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&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();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${e.width}px, ${Zi})`}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())}}Ji.elementDefinitions={"ft-typography":yi},Ji.styles=Vi,Xi([o()],Ji.prototype,"text",void 0),Xi([o({type:Boolean})],Ji.prototype,"manual",void 0),Xi([o({type:Boolean})],Ji.prototype,"inline",void 0),Xi([o({type:Number})],Ji.prototype,"delay",void 0),Xi([o()],Ji.prototype,"position",void 0),Xi([
|
|
449
451
|
/**
|
|
450
452
|
* @license
|
|
451
453
|
* Copyright 2017 Google LLC
|
|
452
454
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
453
455
|
*/
|
|
454
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
456
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return r({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),r=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),s=null!=r?l(r,t):[];return i?s.filter((t=>t.matches(i))):s},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Ji.prototype,"slotNodes",void 0),Xi([s(".ft-tooltip--container")],Ji.prototype,"container",void 0),Xi([s("slot")],Ji.prototype,"target",void 0),Xi([s(".ft-tooltip")],Ji.prototype,"tooltip",void 0),Xi([s(".ft-tooltip--content")],Ji.prototype,"tooltipContent",void 0),Xi([n()],Ji.prototype,"visible",void 0),h("ft-tooltip")(Ji);const qi={color:xt.extend("--ft-loader-color",gt.colorPrimary),size:xt.create("--ft-loader-size","SIZE","80px")},Yi=b`
|
|
455
457
|
:host {
|
|
456
458
|
line-height: 0;
|
|
457
459
|
}
|
|
@@ -460,8 +462,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
460
462
|
display: inline-block;
|
|
461
463
|
position: relative;
|
|
462
464
|
|
|
463
|
-
width: ${
|
|
464
|
-
height: ${
|
|
465
|
+
width: ${qi.size};
|
|
466
|
+
height: ${qi.size};
|
|
465
467
|
}
|
|
466
468
|
|
|
467
469
|
.ft-loader div {
|
|
@@ -470,7 +472,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
470
472
|
width: 25%;
|
|
471
473
|
height: 25%;
|
|
472
474
|
border-radius: 50%;
|
|
473
|
-
background: ${
|
|
475
|
+
background: ${qi.color};
|
|
474
476
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
475
477
|
}
|
|
476
478
|
|
|
@@ -517,17 +519,17 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
517
519
|
transform: translate(0, 0);
|
|
518
520
|
}
|
|
519
521
|
100% {
|
|
520
|
-
transform: translate(calc(0.35 * ${
|
|
522
|
+
transform: translate(calc(0.35 * ${qi.size}), 0);
|
|
521
523
|
}
|
|
522
524
|
}
|
|
523
|
-
`;class
|
|
525
|
+
`;class Gi extends wt{render(){return J`
|
|
524
526
|
<div class="ft-loader">
|
|
525
527
|
<div></div>
|
|
526
528
|
<div></div>
|
|
527
529
|
<div></div>
|
|
528
530
|
<div></div>
|
|
529
531
|
</div>
|
|
530
|
-
`}}
|
|
532
|
+
`}}Gi.styles=Yi,h("ft-loader")(Gi);const Qi=xt.extend("--ft-button-color",gt.colorPrimary),to={backgroundColor:xt.extend("--ft-button-background-color",gt.colorSurface),borderRadius:xt.extend("--ft-button-border-radius",gt.borderRadiusL),color:Qi,fontSize:xt.extend("--ft-button-font-size",oi.fontSize),iconSize:xt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:xt.extend("--ft-button-ripple-color",Qi),opacityDisabled:xt.external(gt.colorOpacityDisabled,"Design system")},eo=xt.extend("--ft-button-primary-color",xt.extend("--ft-button-color",gt.colorOnPrimary)),io={backgroundColor:xt.extend("--ft-button-primary-background-color",xt.extend("--ft-button-background-color",gt.colorPrimary)),color:eo,rippleColor:xt.extend("--ft-button-primary-ripple-color",eo)},oo=xt.extend("--ft-button-dense-border-radius",xt.extend("--ft-button-border-radius",gt.borderRadiusM)),no=[$t,b`
|
|
531
533
|
:host {
|
|
532
534
|
display: inline-block;
|
|
533
535
|
max-width: 100%;
|
|
@@ -538,7 +540,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
538
540
|
box-shadow: 0px 0px 0px transparent;
|
|
539
541
|
border: 0px solid transparent;
|
|
540
542
|
text-shadow: 0px 0px 0px transparent;
|
|
541
|
-
font-size: ${
|
|
543
|
+
font-size: ${to.fontSize};
|
|
542
544
|
}
|
|
543
545
|
|
|
544
546
|
button:hover {
|
|
@@ -567,17 +569,17 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
567
569
|
border: none;
|
|
568
570
|
pointer-events: auto;
|
|
569
571
|
|
|
570
|
-
--ft-button-internal-line-height: calc(${
|
|
571
|
-
--ft-button-internal-color: ${
|
|
572
|
-
${bt(
|
|
572
|
+
--ft-button-internal-line-height: calc(${to.fontSize} + 2px);
|
|
573
|
+
--ft-button-internal-color: ${to.color};
|
|
574
|
+
${bt(ki.size,to.iconSize)};
|
|
573
575
|
--ft-button-internal-vertical-padding: 6px;
|
|
574
576
|
--ft-button-internal-horizontal-padding: 8px;
|
|
575
|
-
${bt(
|
|
576
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
577
|
+
${bt(Mi.color,to.rippleColor)};
|
|
578
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${to.iconSize});
|
|
577
579
|
|
|
578
|
-
border-radius: ${
|
|
580
|
+
border-radius: ${to.borderRadius};
|
|
579
581
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
580
|
-
background-color: ${
|
|
582
|
+
background-color: ${to.backgroundColor};
|
|
581
583
|
color: var(--ft-button-internal-color);
|
|
582
584
|
-webkit-mask-image: radial-gradient(white, black);
|
|
583
585
|
}
|
|
@@ -589,7 +591,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
589
591
|
.ft-button--dense {
|
|
590
592
|
--ft-button-internal-vertical-padding: 2px;
|
|
591
593
|
--ft-button-internal-horizontal-padding: 4px;
|
|
592
|
-
border-radius: ${
|
|
594
|
+
border-radius: ${oo};
|
|
593
595
|
}
|
|
594
596
|
|
|
595
597
|
.ft-button--round {
|
|
@@ -598,13 +600,13 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
598
600
|
|
|
599
601
|
.ft-button[disabled] {
|
|
600
602
|
filter: grayscale(1);
|
|
601
|
-
opacity: ${
|
|
603
|
+
opacity: ${to.opacityDisabled};
|
|
602
604
|
}
|
|
603
605
|
|
|
604
606
|
.ft-button.ft-button--primary {
|
|
605
|
-
background-color: ${
|
|
606
|
-
--ft-button-internal-color: ${
|
|
607
|
-
${bt(
|
|
607
|
+
background-color: ${io.backgroundColor};
|
|
608
|
+
--ft-button-internal-color: ${io.color};
|
|
609
|
+
${bt(Mi.color,io.rippleColor)};
|
|
608
610
|
}
|
|
609
611
|
|
|
610
612
|
.ft-button.ft-button--outlined {
|
|
@@ -623,8 +625,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
623
625
|
text-overflow: ellipsis;
|
|
624
626
|
display: block;
|
|
625
627
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
626
|
-
${bt(
|
|
627
|
-
${bt(
|
|
628
|
+
${bt(oi.fontSize,"1em")};
|
|
629
|
+
${bt(oi.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
628
630
|
}
|
|
629
631
|
|
|
630
632
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -657,17 +659,18 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
657
659
|
}
|
|
658
660
|
|
|
659
661
|
ft-loader {
|
|
660
|
-
${bt(
|
|
661
|
-
${bt(
|
|
662
|
+
${bt(qi.size,to.iconSize)};
|
|
663
|
+
${bt(qi.color,"var(--ft-button-internal-color)")};
|
|
662
664
|
}
|
|
663
|
-
`];var
|
|
665
|
+
`];var ro,so=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class ao extends wt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ni.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"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-button--safari-fix":Rt,"ft-no-text-select":!0};return this.addTooltipIfNeeded(J`
|
|
664
666
|
<button part="button"
|
|
665
|
-
class="${
|
|
667
|
+
class="${Wt(t)}"
|
|
666
668
|
aria-label="${this.getLabel()}"
|
|
667
669
|
?disabled=${this.isDisabled()}>
|
|
668
670
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
669
671
|
<ft-typography part="label"
|
|
670
672
|
variant="button"
|
|
673
|
+
element="span"
|
|
671
674
|
class="ft-button--label"
|
|
672
675
|
?hidden=${!this.hasTextContent()}>
|
|
673
676
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
@@ -682,7 +685,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
682
685
|
</ft-tooltip>
|
|
683
686
|
`:t}resolveIcon(){return this.loading?J`
|
|
684
687
|
<ft-loader></ft-loader> `:this.icon?J`
|
|
685
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}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}}
|
|
688
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}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}}ao.elementDefinitions={"ft-ripple":Pi,"ft-tooltip":Ji,"ft-typography":yi,"ft-icon":zi,"ft-loader":Gi},ao.styles=no,so([o({type:Boolean})],ao.prototype,"primary",void 0),so([o({type:Boolean})],ao.prototype,"outlined",void 0),so([o({type:Boolean})],ao.prototype,"disabled",void 0),so([o({type:Boolean})],ao.prototype,"dense",void 0),so([o({type:Boolean})],ao.prototype,"round",void 0),so([o({type:String})],ao.prototype,"label",void 0),so([o({type:String})],ao.prototype,"icon",void 0),so([o({type:String})],ao.prototype,"iconVariant",void 0),so([o({type:Boolean})],ao.prototype,"trailingIcon",void 0),so([o({type:Boolean})],ao.prototype,"loading",void 0),so([o({type:String})],ao.prototype,"tooltipPosition",void 0),so([o({type:Boolean})],ao.prototype,"hideTooltip",void 0),so([o({type:Boolean})],ao.prototype,"forceTooltip",void 0),so([s(".ft-button")],ao.prototype,"button",void 0),so([s(".ft-button--label slot")],ao.prototype,"slottedContent",void 0),h("ft-button")(ao),function(t){t.S="S",t.M="M",t.L="L",t.XL="XL",t.XXL="XXL"}(ro||(ro={}));const lo=b`
|
|
686
689
|
.ft-size-watcher--pixel {
|
|
687
690
|
width: 0;
|
|
688
691
|
height: 0;
|
|
@@ -701,34 +704,34 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
701
704
|
.ft-size-watcher--local .ft-size-watcher--watcher {
|
|
702
705
|
width: 100%;
|
|
703
706
|
}
|
|
704
|
-
`;var
|
|
707
|
+
`;var ho=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class co extends CustomEvent{constructor(t,e){super("change",{detail:{size:t,category:e}})}}class po extends wt{constructor(){super(...arguments),this.debounceTimeout=100,this.local=!1,this.size=0,this.category=ro.S,this.resizeObserver=new ResizeObserver((()=>this.updateSize())),this.debouncer=new e}render(){return J`
|
|
705
708
|
<div class="ft-size-watcher--pixel ${this.local?"ft-size-watcher--local":""}">
|
|
706
709
|
<div class="ft-size-watcher--watcher"></div>
|
|
707
710
|
</div>
|
|
708
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=
|
|
711
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.watcher&&this.resizeObserver.observe(this.watcher),this.updateSize()}updateSize(){this.debouncer.run((()=>{this.watcher&&this.size!==this.watcher.clientWidth&&(this.size=this.watcher.clientWidth,this.size<768?this.category=ro.S:this.size<976?this.category=ro.M:this.size<1024?this.category=ro.L:this.size<1440?this.category=ro.XL:this.category=ro.XXL,this.dispatchEvent(new co(this.size,this.category)))}),this.debounceTimeout)}}po.elementDefinitions={},po.styles=lo,ho([o({type:Number})],po.prototype,"debounceTimeout",void 0),ho([o({type:Boolean})],po.prototype,"local",void 0),ho([o({type:Number,reflect:!0})],po.prototype,"size",void 0),ho([o({type:String,reflect:!0})],po.prototype,"category",void 0),ho([s(".ft-size-watcher--watcher")],po.prototype,"watcher",void 0),h("ft-size-watcher")(po);const fo={expand:"Expand {0}",collapse:"Collapse {0}",expandAll:"Expand all",expandAllLong:"Expand all table of contents",collapseAll:"Collapse all",collapseAllLong:"Collapse all table of contents"},uo={tabulationSize:xt.create("--ft-reader-toc-tabulation-size","SIZE","16px"),verticalSpacing:xt.create("--ft-reader-toc-vertical-spacing","SIZE","4px"),textColor:xt.extend("--ft-reader-toc-text-color",gt.colorOnSurface),hoverColor:xt.extend("--ft-reader-toc-hover-color",gt.colorPrimary),highlightedTextColor:xt.extend("--ft-reader-toc-highlighted-text-color",gt.colorPrimary),highlightedFontWeight:xt.create("--ft-reader-toc-highlighted-font-weight","UNKNOWN","bold"),highlightedBackgroundColor:xt.create("--ft-reader-toc-highlighted-background-color","COLOR","transparent"),iconFontSize:xt.create("--ft-reader-toc-icon-font-size","SIZE","16px")},vo=b`
|
|
709
712
|
.ft-reader-toc {
|
|
710
|
-
color: ${
|
|
713
|
+
color: ${uo.textColor};
|
|
711
714
|
}
|
|
712
715
|
|
|
713
716
|
.ft-reader-toc--node-highlighted > .ft-reader-toc--link-container {
|
|
714
|
-
background-color: ${
|
|
715
|
-
color: ${
|
|
716
|
-
${bt(
|
|
717
|
+
background-color: ${uo.highlightedBackgroundColor};
|
|
718
|
+
color: ${uo.highlightedTextColor};
|
|
719
|
+
${bt(ie.fontWeight,uo.highlightedFontWeight)}
|
|
717
720
|
}
|
|
718
721
|
|
|
719
722
|
.ft-reader-toc--link-container {
|
|
720
723
|
display: flex;
|
|
721
724
|
gap: 4px;
|
|
722
|
-
padding: ${
|
|
725
|
+
padding: ${uo.verticalSpacing} 4px; /* left padding is override on inline style */
|
|
723
726
|
align-items: center;
|
|
724
727
|
}
|
|
725
728
|
|
|
726
729
|
.ft-reader-toc--link-container ft-reader-internal-link:hover {
|
|
727
|
-
color: ${
|
|
730
|
+
color: ${uo.hoverColor};
|
|
728
731
|
}
|
|
729
732
|
|
|
730
733
|
ft-button {
|
|
731
|
-
${bt(
|
|
734
|
+
${bt(to.iconSize,uo.iconFontSize)};
|
|
732
735
|
}
|
|
733
736
|
|
|
734
737
|
.ft-reader-toc--toggle-container {
|
|
@@ -736,11 +739,11 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
736
739
|
}
|
|
737
740
|
|
|
738
741
|
.ft-reader-toc-mobile .ft-reader-toc--toggle-container {
|
|
739
|
-
width: calc(${
|
|
742
|
+
width: calc(${uo.iconFontSize} + 12px); /*--ft-button-internal-horizontal-padding: 8px; in ft-button NOT dense*/
|
|
740
743
|
}
|
|
741
744
|
|
|
742
745
|
.ft-reader-toc-desktop .ft-reader-toc--toggle-container {
|
|
743
|
-
width: calc(${
|
|
746
|
+
width: calc(${uo.iconFontSize} + 4px); /*--ft-button-internal-horizontal-padding: 4px; in ft-button dense*/
|
|
744
747
|
}
|
|
745
748
|
|
|
746
749
|
.ft-reader-toc-expanded .ft-reader-toc--toggle-container {
|
|
@@ -763,7 +766,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
763
766
|
.ft-reader-toc-expand-collapse-all-justify ft-button {
|
|
764
767
|
flex-grow: 1;
|
|
765
768
|
}
|
|
766
|
-
`;var
|
|
769
|
+
`;var yo=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class xo extends Vt{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=Ni.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.expandCollapseAllIconVariant=Ni.fluid_topics,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scope="pages",this.hideIfEmpty=!1,this.empty=!0,this.labels={},this.labelResolver=new Ot(fo,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ro.M,this.nodesToExpandExist=!1}get isCurrentPageToc(){return"current-page"===this.scope}update(t){var e,i,o;super.update(t),t.has("toc")&&(this.nodesToExpandExist=(null!==(e=this.toc)&&void 0!==e?e:[]).some((t=>t.children.length>0))),t.has("labels")&&(this.labelResolver=new Ot(fo,this.labels)),t.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes(null!==(i=this.highlightedTocIds)&&void 0!==i?i:[])),this.empty=0===(null!==(o=this.toc)&&void 0!==o?o:[]).length}render(){var t;const e={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===ro.S,"ft-reader-toc-desktop":this.viewportSize!==ro.S,"ft-reader-toc-loaded":null!=this.currentPage,"ft-reader-toc-expanded":this.expanded};return J`
|
|
767
770
|
${this.hideIfEmpty&&this.empty?J`
|
|
768
771
|
<style>
|
|
769
772
|
:host {
|
|
@@ -771,10 +774,10 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
771
774
|
}
|
|
772
775
|
</style>
|
|
773
776
|
`:Y}
|
|
774
|
-
<div class=${
|
|
777
|
+
<div class=${Wt(e)}>
|
|
775
778
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
776
779
|
${this.renderExpandCollapseAll()}
|
|
777
|
-
${
|
|
780
|
+
${Dt(null!==(t=this.toc)&&void 0!==t?t:[],(t=>t.tocId),(t=>this.renderNode(t)))}
|
|
778
781
|
</div>
|
|
779
782
|
`}renderExpandCollapseAll(){return this.expandCollapseAll&&!this.expanded&&this.nodesToExpandExist?J`
|
|
780
783
|
<div part="expand-collapse-all-container"
|
|
@@ -791,16 +794,16 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
791
794
|
${this.expandCollapseAllHideLabel?"":this.labelResolver.resolve(this.expandAll?"collapseAll":"expandAll")}
|
|
792
795
|
</ft-button>
|
|
793
796
|
</div>
|
|
794
|
-
`:Y}renderNode(t){var e,i,o;const n=null===(e=this.highlightedTocIds)||void 0===e?void 0:e.includes(t.tocId),r=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||(this.expandAll||this.automaticallyExpandedNodes.has(t.tocId))&&!this.manuallyCollapsedNodes.has(t.tocId),s=t.children.length>0,a=this.isCurrentPageToc?(null!==(o=null===(i=this.currentPage)||void 0===i?void 0:i.breadcrumb.length)&&void 0!==o?o:0)+1:0,l=t.depth-1-a,h={"padding-left":`calc( ${
|
|
797
|
+
`:Y}renderNode(t){var e,i,o;const n=null===(e=this.highlightedTocIds)||void 0===e?void 0:e.includes(t.tocId),r=this.expanded||this.manuallyExpandedNodes.has(t.tocId)||(this.expandAll||this.automaticallyExpandedNodes.has(t.tocId))&&!this.manuallyCollapsedNodes.has(t.tocId),s=t.children.length>0,a=this.isCurrentPageToc?(null!==(o=null===(i=this.currentPage)||void 0===i?void 0:i.breadcrumb.length)&&void 0!==o?o:0)+1:0,l=t.depth-1-a,h={"padding-left":`calc( ${uo.tabulationSize} * ${l} + 4px)`};return J`
|
|
795
798
|
<div class="ft-reader-toc--node ${n?"ft-reader-toc--node-highlighted":""}">
|
|
796
|
-
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${
|
|
799
|
+
<div class="ft-reader-toc--link-container" data-depth="${t.depth}" style=${Ht(h)}>
|
|
797
800
|
${this.nodesToExpandExist&&!this.expanded?J`
|
|
798
801
|
<div class="ft-reader-toc--toggle-container">
|
|
799
802
|
${s?J`
|
|
800
803
|
<ft-button
|
|
801
804
|
part="expand-collapse-node"
|
|
802
805
|
round hideTooltip
|
|
803
|
-
?dense=${this.viewportSize!==
|
|
806
|
+
?dense=${this.viewportSize!==ro.S}
|
|
804
807
|
label="${this.labelResolver.resolve(r?"collapse":"expand",t.title)}"
|
|
805
808
|
iconVariant="${this.iconVariant}"
|
|
806
809
|
icon="${r?this.collapseIcon||"MINUS":this.expandIcon||"PLUS"}"
|
|
@@ -823,8 +826,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
823
826
|
${s?J`
|
|
824
827
|
<div class="ft-reader-toc--node-children" id="${t.tocId}-children"
|
|
825
828
|
?hidden=${!r}>
|
|
826
|
-
${r?
|
|
829
|
+
${r?Dt(t.children,(t=>t.tocId),(t=>this.renderNode(t))):Y}
|
|
827
830
|
</div>
|
|
828
831
|
`:Y}
|
|
829
832
|
</div>
|
|
830
|
-
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}xo.elementDefinitions={"ft-button":
|
|
833
|
+
`}buildAutomaticallyExpandedNodes(t){var e,i;let o=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let n of t){let t=n;for(;t&&!o.has(t);)o.add(t),this.manuallyCollapsedNodes.delete(t),t=null===(i=null===(e=this.service)||void 0===e?void 0:e.getTocNodeNow(t))||void 0===i?void 0:i.parentTocId}return o}manuallyToggle(t,e){e?(this.manuallyCollapsedNodes.add(t),this.manuallyExpandedNodes.delete(t)):(this.manuallyExpandedNodes.add(t),this.manuallyCollapsedNodes.delete(t)),this.requestUpdate()}onViewportSizeChange(t){this.viewportSize=t.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}}xo.elementDefinitions={"ft-button":ao,"ft-reader-internal-link":mi,"ft-size-watcher":po,"ft-typography":yi},xo.styles=vo,yo([o({type:Boolean})],xo.prototype,"expanded",void 0),yo([o()],xo.prototype,"iconVariant",void 0),yo([o()],xo.prototype,"collapseIcon",void 0),yo([o()],xo.prototype,"expandIcon",void 0),yo([o({type:Boolean})],xo.prototype,"expandCollapseAll",void 0),yo([o({type:Boolean})],xo.prototype,"expandCollapseAllHideLabel",void 0),yo([o({type:Boolean})],xo.prototype,"expandCollapseAllTrailingIcon",void 0),yo([o()],xo.prototype,"expandCollapseAllAlignment",void 0),yo([o({type:Boolean})],xo.prototype,"expandCollapseAllHideIcon",void 0),yo([o()],xo.prototype,"expandCollapseAllIconVariant",void 0),yo([o()],xo.prototype,"collapseAllIcon",void 0),yo([o()],xo.prototype,"expandAllIcon",void 0),yo([o({type:Boolean})],xo.prototype,"autoCollapse",void 0),yo([o()],xo.prototype,"scope",void 0),yo([o({type:Boolean})],xo.prototype,"hideIfEmpty",void 0),yo([o({type:Boolean,reflect:!0})],xo.prototype,"empty",void 0),yo([c({})],xo.prototype,"labels",void 0),yo([St(((t,e)=>{var i,o,n;return e.isCurrentPageToc?(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)?null===(o=t.currentPage)||void 0===o?void 0:o.toc:void 0:(null===(n=t.paginationConfiguration)||void 0===n?void 0:n.splitCurrentPageToc)?t.pagesToc:t.toc}))],xo.prototype,"toc",void 0),yo([St((t=>{var e;return null===(e=t.paginationConfiguration)||void 0===e?void 0:e.splitCurrentPageToc}))],xo.prototype,"splitToc",void 0),yo([St()],xo.prototype,"currentPage",void 0),yo([St(((t,e)=>{var i,o;return(null===(i=t.paginationConfiguration)||void 0===i?void 0:i.splitCurrentPageToc)&&!e.isCurrentPageToc?[null===(o=t.currentPage)||void 0===o?void 0:o.rootTocId]:t.visibleTopics}))],xo.prototype,"highlightedTocIds",void 0),yo([n({hasChanged:(t,e)=>!p(t,e)})],xo.prototype,"automaticallyExpandedNodes",void 0),yo([n({hasChanged:(t,e)=>!p(t,e)})],xo.prototype,"manuallyExpandedNodes",void 0),yo([n({hasChanged:(t,e)=>!p(t,e)})],xo.prototype,"manuallyCollapsedNodes",void 0),yo([n()],xo.prototype,"expandAll",void 0),yo([n()],xo.prototype,"viewportSize",void 0),h("ft-reader-toc")(xo),t.DEFAULT_LABELS=fo,t.FtReaderToc=xo,t.FtReaderTocCssVariables=uo,t.styles=vo,Object.defineProperty(t,"i",{value:!0})}({});
|