@fluid-topics/ft-icon 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-icon.min.js +26 -22
- package/package.json +3 -3
package/build/ft-icon.min.js
CHANGED
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,o=window.customElements.define,e=window.customElements.get,r=window.customElements,i=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap;let c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,i){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(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=i.prototype.attributeChangedCallback,c=new Set(i.observedAttributes||[]);h(i,c,s);const l={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,l),this._definitionsByClass.set(i,l);let p=e.call(r,t);p||(p=f(t),o.call(r,t,p)),this===window.customElements&&(n.set(i,l),l.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)a.delete(t),y(t,l,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){u.push(this),r.upgrade.apply(r,arguments),u.pop()}get(t){const o=this._definitionsByTag.get(t);return o?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const o=this._getDefinition(t);if(void 0!==o)return Promise.resolve(o.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,o,e){let r=this._awaitingUpgrade.get(o);r||this._awaitingUpgrade.set(o,r=new Set),e?r.add(t):r.delete(t)}},window.HTMLElement=function(){let o=c;if(o)return c=void 0,o;const e=n.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return o=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(o,this.constructor.prototype),i.set(o,e),o},window.HTMLElement.prototype=t.prototype;const l=t=>t===document||t instanceof ShadowRoot,p=t=>{let o=t.getRootNode();if(!l(o)){const t=u[u.length-1];if(t instanceof CustomElementRegistry)return t;o=t.getRootNode(),l(o)||(o=s.get(o)?.getRootNode()||document)}return o.customElements},f=o=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const r=p(e)||window.customElements,i=r._getDefinition(o);return i?y(e,i):a.set(e,r),e}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!1)}adoptedCallback(){const t=i.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,o,e)=>{if(0===o.size||void 0===e)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const a=t.toLowerCase();if(o.has(a)){const t=this.getAttribute(a);r.call(this,a,i),e.call(this,a,t,i)}else r.call(this,a,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(o.has(r)){const t=this.getAttribute(r);i.call(this,r),e.call(this,r,t,null)}else i.call(this,r)});const a=t.prototype.toggleAttribute;a&&(t.prototype.toggleAttribute=function(t,r){const i=t.toLowerCase();if(o.has(i)){const t=this.getAttribute(i);a.call(this,i,r);const o=this.getAttribute(i);e.call(this,i,t,o)}else a.call(this,i,r)})},d=o=>{const e=Object.getPrototypeOf(o);if(e!==window.HTMLElement)return e===t?Object.setPrototypeOf(o,window.HTMLElement):d(e)},y=(t,o,e=!1)=>{Object.setPrototypeOf(t,o.elementClass.prototype),i.set(t,o),c=t;try{new o.elementClass}catch(t){d(o.elementClass),new o.elementClass}o.attributeChangedCallback&&o.observedAttributes.forEach((e=>{t.hasAttribute(e)&&o.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&o.connectedCallback&&t.isConnected&&o.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const o=g.apply(this,arguments);return t.customElements&&(o.customElements=t.customElements),o};let u=[document];const b=(t,o,e=void 0)=>{const r=(e?Object.getPrototypeOf(e):t.prototype)[o];t.prototype[o]=function(){u.push(this);const t=r.apply(e||this,arguments);return void 0!==t&&s.set(t,this),u.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,o)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,o);Object.defineProperty(t.prototype,o,{...e,set(t){u.push(this),e.set.call(this,t),u.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,o=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const r=o.call(this,...e);return t.set(r,this),r},e.forEach((o=>{const e=window.ElementInternals.prototype,r=e[o];e[o]=function(...o){const e=t.get(this);if(!0===i.get(e).formAssociated)return r?.call(this,...o);throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class a{constructor(t){const o=new Map;t.forEach(((t,e)=>{const r=t.getAttribute("name"),i=o.get(r)||[];this[+e]=t,i.push(t),o.set(r,i)})),this.length=t.length,o.forEach(((t,o)=>{t&&(1===t.length?this[o]=t[0]:this[o]=new r(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),o=[];for(const e of t){const t=i.get(e);t&&!0!==t.formAssociated||o.push(e)}return new a(o)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,o=window.customElements.define,e=window.customElements.get,r=window.customElements,i=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap;let c;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,i){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(i))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=i.prototype.attributeChangedCallback,c=new Set(i.observedAttributes||[]);h(i,c,s);const l={elementClass:i,connectedCallback:i.prototype.connectedCallback,disconnectedCallback:i.prototype.disconnectedCallback,adoptedCallback:i.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:i.formAssociated,formAssociatedCallback:i.prototype.formAssociatedCallback,formDisabledCallback:i.prototype.formDisabledCallback,formResetCallback:i.prototype.formResetCallback,formStateRestoreCallback:i.prototype.formStateRestoreCallback,observedAttributes:c};this._definitionsByTag.set(t,l),this._definitionsByClass.set(i,l);let p=e.call(r,t);p||(p=f(t),o.call(r,t,p)),this===window.customElements&&(n.set(i,l),l.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)a.delete(t),y(t,l,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(i),this._whenDefinedPromises.delete(t)),i}upgrade(){u.push(this),r.upgrade.apply(r,arguments),u.pop()}get(t){const o=this._definitionsByTag.get(t);return o?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const o=this._getDefinition(t);if(void 0!==o)return Promise.resolve(o.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,o,e){let r=this._awaitingUpgrade.get(o);r||this._awaitingUpgrade.set(o,r=new Set),e?r.add(t):r.delete(t)}},window.HTMLElement=function(){let o=c;if(o)return c=void 0,o;const e=n.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return o=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(o,this.constructor.prototype),i.set(o,e),o},window.HTMLElement.prototype=t.prototype;const l=t=>t===document||t instanceof ShadowRoot,p=t=>{let o=t.getRootNode();if(!l(o)){const t=u[u.length-1];if(t instanceof CustomElementRegistry)return t;o=t.getRootNode(),l(o)||(o=s.get(o)?.getRootNode()||document)}return o.customElements},f=o=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const r=p(e)||window.customElements,i=r._getDefinition(o);return i?y(e,i):a.set(e,r),e}connectedCallback(){const t=i.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!0)}disconnectedCallback(){const t=i.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,o,!1)}adoptedCallback(){const t=i.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=i.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=i.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=i.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=i.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},h=(t,o,e)=>{if(0===o.size||void 0===e)return;const r=t.prototype.setAttribute;r&&(t.prototype.setAttribute=function(t,i){const a=t.toLowerCase();if(o.has(a)){const t=this.getAttribute(a);r.call(this,a,i),e.call(this,a,t,i)}else r.call(this,a,i)});const i=t.prototype.removeAttribute;i&&(t.prototype.removeAttribute=function(t){const r=t.toLowerCase();if(o.has(r)){const t=this.getAttribute(r);i.call(this,r),e.call(this,r,t,null)}else i.call(this,r)});const a=t.prototype.toggleAttribute;a&&(t.prototype.toggleAttribute=function(t,r){const i=t.toLowerCase();if(o.has(i)){const t=this.getAttribute(i);a.call(this,i,r);const o=this.getAttribute(i);e.call(this,i,t,o)}else a.call(this,i,r)})},d=o=>{const e=Object.getPrototypeOf(o);if(e!==window.HTMLElement)return e===t?Object.setPrototypeOf(o,window.HTMLElement):d(e)},y=(t,o,e=!1)=>{Object.setPrototypeOf(t,o.elementClass.prototype),i.set(t,o),c=t;try{new o.elementClass}catch(t){d(o.elementClass),new o.elementClass}o.attributeChangedCallback&&o.observedAttributes.forEach((e=>{t.hasAttribute(e)&&o.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&o.connectedCallback&&t.isConnected&&o.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const o=g.apply(this,arguments);return t.customElements&&(o.customElements=t.customElements),o};let u=[document];const b=(t,o,e=void 0)=>{const r=(e?Object.getPrototypeOf(e):t.prototype)[o];t.prototype[o]=function(){u.push(this);const t=r.apply(e||this,arguments);return void 0!==t&&s.set(t,this),u.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,o)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,o);Object.defineProperty(t.prototype,o,{...e,set(t){u.push(this),e.set.call(this,t),u.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,o=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const r=o.call(this,...e);return t.set(r,this),r},e.forEach((o=>{const e=window.ElementInternals.prototype,r=e[o];e[o]=function(...o){const e=t.get(this);if(!0===i.get(e).formAssociated)return r?.call(this,...o);throw new DOMException(`Failed to execute ${r} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class r extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class a{constructor(t){const o=new Map;t.forEach(((t,e)=>{const r=t.getAttribute("name"),i=o.get(r)||[];this[+e]=t,i.push(t),o.set(r,i)})),this.length=t.length,o.forEach(((t,o)=>{t&&(1===t.length?this[o]=t[0]:this[o]=new r(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),o=[];for(const e of t){const t=i.get(e);t&&!0!==t.formAssociated||o.push(e)}return new a(o)}})}}try{window.customElements.define("custom-element",null)}catch(ko){const t=window.customElements.define;window.customElements.define=(o,e,r)=>{if(null!==e)try{t.bind(window.customElements)(o,e,r)}catch(t){console.info(o,e,r,t)}}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
-
*/const
|
|
20
|
+
*/const o=globalThis,e=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),i=new WeakMap;const a=t=>new class{constructor(t,o,e){if(this._$cssResult$=!0,e!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o;const o=this.t;if(e&&void 0===t){const e=void 0!==o&&1===o.length;e&&(t=i.get(o)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(o,t))}return t}toString(){return this.cssText}}("string"==typeof t?t:t+"",void 0,r),n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let o="";for(const e of t.cssRules)o+=e.cssText;return a(o)})(t):t
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/,{is:
|
|
25
|
+
*/,{is:s,defineProperty:c,getOwnPropertyDescriptor:l,getOwnPropertyNames:p,getOwnPropertySymbols:f,getPrototypeOf:h}=Object,d=globalThis,y=d.trustedTypes,g=y?y.emptyScript:"",u=d.reactiveElementPolyfillSupport,b=(t,o)=>t,m={toAttribute(t,o){switch(o){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,o){let e=t;switch(o){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(t){e=null}}return e}},O=(t,o)=>!s(t,o),x={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:O};Symbol.metadata??=Symbol("metadata"),d.litPropertyMetadata??=new WeakMap;let N=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,o=x){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(t,o),!o.noAccessor){const e=Symbol(),r=this.getPropertyDescriptor(t,e,o);void 0!==r&&c(this.prototype,t,r)}}static getPropertyDescriptor(t,o,e){const{get:r,set:i}=l(this.prototype,t)??{get(){return this[o]},set(t){this[o]=t}};return{get(){return r?.call(this)},set(o){const a=r?.call(this);i.call(this,o),this.requestUpdate(t,a,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=h(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,o=[...p(t),...f(t)];for(const e of o)this.createProperty(e,t[e])}const t=this[Symbol.metadata];if(null!==t){const o=litPropertyMetadata.get(t);if(void 0!==o)for(const[t,e]of o)this.elementProperties.set(t,e)}this._$Eh=new Map;for(const[t,o]of this.elementProperties){const e=this._$Eu(t,o);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const o=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)o.unshift(n(t))}else void 0!==t&&o.push(n(t));return o}static _$Eu(t,o){const e=o.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$ES(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$E_??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$E_?.delete(t)}_$ES(){const t=new Map,o=this.constructor.elementProperties;for(const e of o.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,r)=>{if(e)t.adoptedStyleSheets=r.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of r){const r=document.createElement("style"),i=o.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=e.cssText,t.appendChild(r)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$E_?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$E_?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,o,e){this._$AK(t,e)}_$EO(t,o){const e=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,e);if(void 0!==r&&!0===e.reflect){const i=(void 0!==e.converter?.toAttribute?e.converter:m).toAttribute(o,e.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,o){const e=this.constructor,r=e._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=e.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:m;this._$Em=r,this[r]=i.fromAttribute(o,t.type),this._$Em=null}}requestUpdate(t,o,e,r=!1,i){if(void 0!==t){if(e??=this.constructor.getPropertyOptions(t),!(e.hasChanged??O)(r?i:this[t],o))return;this.C(t,o,e)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,o,e){this._$AL.has(t)||this._$AL.set(t,o),!0===e.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,o]of this._$Ep)this[t]=o;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[o,e]of t)!0!==e.wrapped||this._$AL.has(o)||void 0===this[o]||this.C(o,this[o],e)}let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(o)):this._$ET()}catch(o){throw t=!1,this._$ET(),o}t&&this._$AE(o)}willUpdate(t){}_$AE(t){this._$E_?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[b("elementProperties")]=new Map,N[b("finalized")]=new Map,u?.({ReactiveElement:N}),(d.reactiveElementVersions??=[]).push("2.0.2");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
29
29
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const v={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:O},w=(t=v,o,e)=>{const{kind:r,metadata:i}=e;let a=globalThis.litPropertyMetadata.get(i);if(void 0===a&&globalThis.litPropertyMetadata.set(i,a=new Map),a.set(e.name,t),"accessor"===r){const{name:r}=e;return{set(e){const i=o.get.call(this);o.set.call(this,e),this.requestUpdate(r,i,t)},init(o){return void 0!==o&&this.C(r,void 0,t),o}}}if("setter"===r){const{name:r}=e;return function(e){const i=this[r];o.call(this,e),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)};function S(t){return(o,e)=>"object"==typeof e?w(t,o,e):((t,o,e)=>{const r=o.hasOwnProperty(e);return o.constructor.createProperty(e,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(o,e):void 0})(t,o,e)
|
|
32
32
|
/**
|
|
33
33
|
* @license
|
|
34
34
|
* Copyright 2017 Google LLC
|
|
@@ -39,12 +39,12 @@ const w={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:x},S=(t=w,o,
|
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
|
-
const
|
|
42
|
+
const C=(t,o,e)=>(e.configurable=!0,e.enumerable=!0,e)
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/;function U(t,o){try{return function(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var e,r,i;if(Array.isArray(t)){if((e=t.length)!=o.length)return!1;for(r=e;0!=r--;)if(!U(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!U(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if((e=(i=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=e;0!=r--;)if(!Object.prototype.hasOwnProperty.call(o,i[r]))return!1;for(r=e;0!=r--;){var a=i[r];if(!U(t[a],o[a]))return!1}return!0}return t!=t&&o!=o}(t,o)}catch(t){return!1}}
|
|
47
|
+
*/;class R{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,o)=>{this.resolvePromise=t,this.rejectPromise=o}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,o;const e=[...this.callbacks];this.callbacks=[];const r=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,i=null!==(o=this.resolvePromise)&&void 0!==o?o:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){return void r(t)}i(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}function U(t,o){try{return function(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var e,r,i;if(Array.isArray(t)){if((e=t.length)!=o.length)return!1;for(r=e;0!=r--;)if(!U(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!U(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if((e=(i=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=e;0!=r--;)if(!Object.prototype.hasOwnProperty.call(o,i[r]))return!1;for(r=e;0!=r--;){var a=i[r];if(!U(t[a],o[a]))return!1}return!0}return t!=t&&o!=o}(t,o)}catch(t){return!1}}
|
|
48
48
|
/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2017 Google LLC
|
|
@@ -79,7 +79,11 @@ class fo extends It{constructor(){super(...arguments),this.renderOptions={host:t
|
|
|
79
79
|
* Copyright 2019 Google LLC
|
|
80
80
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
81
|
*/
|
|
82
|
-
const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class xo extends fo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Oo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=mo.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var No,vo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const wo=Symbol("constructorPrototype"),So=Symbol("constructorName"),Co=Symbol("exportpartsDebouncer");class Ro extends xo{constructor(){super(),this[No]=new
|
|
82
|
+
const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class xo extends fo{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([o,e])=>t.registry.define(o,e))));const o={...t.shadowRootOptions,customElements:t.registry},e=this.renderOptions.creationScope=this.attachShadow(o);return((t,o)=>{Oo?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((o=>{const e=document.createElement("style"),r=mo.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=o.cssText,t.appendChild(e)}))})(e,t.elementStyles),e}}var No,vo=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};const wo=Symbol("constructorPrototype"),So=Symbol("constructorName"),Co=Symbol("exportpartsDebouncer");class Ro extends xo{constructor(){super(),this[No]=new R(5),this[So]=this.constructor.name,this[wo]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[So]&&Object.setPrototypeOf(this,this[wo])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var o,e;if((null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==e?e:[]).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[Co].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 o,e,r,i,a,n;const s=t=>null!=t&&t.trim().length>0,c=t.filter(s).map((t=>t.trim()));if(0===c.length)return void this.removeAttribute("exportparts");const l=new Set;for(let t of null!==(e=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelectorAll("[part],[exportparts]"))&&void 0!==e?e:[]){const o=null!==(i=null===(r=t.getAttribute("part"))||void 0===r?void 0:r.split(" "))&&void 0!==i?i:[],e=null!==(n=null===(a=t.getAttribute("exportparts"))||void 0===a?void 0:a.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...o,...e).filter(s).map((t=>t.trim())).forEach((t=>l.add(t)))}if(0===l.size)return void this.removeAttribute("exportparts");const p=[...l.values()].flatMap((t=>c.map((o=>`${t}:${o}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}No=Co,vo([S()],Ro.prototype,"exportpartsPrefix",void 0),vo([function(t,o){const e=()=>JSON.parse(JSON.stringify(t));return S({type:Object,converter:{fromAttribute:t=>{if(null==t)return e();try{return JSON.parse(t)}catch{return e()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,o)=>!U(t,o),...null!=o?o:{}})}([])],Ro.prototype,"exportpartsPrefixes",void 0),vo([S()],Ro.prototype,"customStylesheet",void 0);const Uo=go.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");var Eo,Io;dt`
|
|
83
|
+
.highlight-html-match {
|
|
84
|
+
background: ${Uo};
|
|
85
|
+
}
|
|
86
|
+
`,dt`
|
|
83
87
|
.ft-no-text-select {
|
|
84
88
|
-webkit-touch-callout: none;
|
|
85
89
|
-webkit-user-select: none;
|
|
@@ -111,18 +115,18 @@ const mo=window,Oo=mo.ShadowRoot&&(void 0===mo.ShadyCSS||mo.ShadyCSS.nativeShado
|
|
|
111
115
|
display: inline-block;
|
|
112
116
|
width: 0;
|
|
113
117
|
}
|
|
114
|
-
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(
|
|
118
|
+
`,window.ftReduxStores||(window.ftReduxStores={}),navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(Io=null===(Eo=window.safari)||void 0===Eo?void 0:Eo.pushNotification)||void 0===Io||Io.toString());
|
|
115
119
|
/**
|
|
116
120
|
* @license
|
|
117
121
|
* Copyright 2017 Google LLC
|
|
118
122
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
119
123
|
*/
|
|
120
|
-
const
|
|
124
|
+
const Lo=2;class Wo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e){this._$Ct=t,this._$AM=o,this._$Ci=e}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}}
|
|
121
125
|
/**
|
|
122
126
|
* @license
|
|
123
127
|
* Copyright 2017 Google LLC
|
|
124
128
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
125
|
-
*/class
|
|
129
|
+
*/class ko extends Wo{constructor(t){if(super(t),this.et=Y,t.type!==Lo)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Y||null==t)return this.vt=void 0,this.et=t;if(t===H)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const o=[t];return o.raw=o,this.vt={_$litType$:this.constructor.resultType,strings:o,values:[]}}}ko.directiveName="unsafeHTML",ko.resultType=1;const Ko=(t=>(...o)=>({_$litDirective$:t,values:o}))(ko);var Zo,$o;t.FtIcons=void 0,(Zo=t.FtIcons||(t.FtIcons={})).THUMBS_DOWN="",Zo.THUMBS_DOWN_PLAIN="",Zo.THUMBS_UP="",Zo.THUMBS_UP_PLAIN="",Zo.STAR="",Zo.STAR_PLAIN="",Zo.DESKTOP="",Zo.LIFE_RING="",Zo.GLOBE="",Zo.PIGGY_BANK="",Zo.TABLET_LANDSCAPE="",Zo.TABLET_PORTRAIT="",Zo.MOBILE_LANDSCAPE="",Zo.MOBILE_PORTRAIT="",Zo.ARROW_RIGHT_TO_LINE="",Zo.THIN_ARROW_UP="",Zo.CONTEXTUAL="",Zo.CHART_SIMPLE="",Zo.BARS_PROGRESS="",Zo.LINE_CHART="",Zo.STACKED_CHART="",Zo.BOOK_OPEN_GEAR="",Zo.BOOK_OPEN_GEAR_SLASH="",Zo.DIAGRAM_SUNBURST="",Zo.DIAGRAM_SANKEY="",Zo.UNSTRUCTURED_DOC="",Zo.RESET="",Zo.THIN_ARROW_LEFT="",Zo.THIN_ARROW_RIGHT="",Zo.MY_COLLECTIONS="",Zo.OFFLINE_SETTINGS="",Zo.MY_LIBRARY="",Zo.RATE_PLAIN="",Zo.RATE="",Zo.FEEDBACK_PLAIN="",Zo.PAUSE="",Zo.PLAY="",Zo.RELATIVES_PLAIN="",Zo.RELATIVES="",Zo.SHORTCUT_MENU="",Zo.PRINT="",Zo.DEFAULT_ROLES="",Zo.ACCOUNT_SETTINGS="",Zo.ONLINE="",Zo.OFFLINE="",Zo.UPLOAD="",Zo.BOOK_PLAIN="",Zo.SYNC="",Zo.SHARED_PBK="",Zo.COLLECTIONS="",Zo.SEARCH_IN_PUBLICATION="",Zo.BOOKS="",Zo.LOCKER="",Zo.ARROW_DOWN="",Zo.ARROW_LEFT="",Zo.ARROW_RIGHT="",Zo.ARROW_UP="",Zo.SAVE="",Zo.MAILS_AND_NOTIFICATIONS="",Zo.DOT="",Zo.MINUS="",Zo.PLUS="",Zo.FILTERS="",Zo.STRIPE_ARROW_RIGHT="",Zo.STRIPE_ARROW_LEFT="",Zo.ATTACHMENTS="",Zo.ADD_BOOKMARK="",Zo.BOOKMARK="",Zo.EXPORT="",Zo.MENU="",Zo.TAG="",Zo.TAG_PLAIN="",Zo.COPY_TO_CLIPBOARD="",Zo.COLUMNS="",Zo.ARTICLE="",Zo.CLOSE_PLAIN="",Zo.CHECK_PLAIN="",Zo.LOGOUT="",Zo.SIGN_IN="",Zo.THIN_ARROW="",Zo.TRIANGLE_BOTTOM="",Zo.TRIANGLE_LEFT="",Zo.TRIANGLE_RIGHT="",Zo.TRIANGLE_TOP="",Zo.FACET_HAS_DESCENDANT="",Zo.MINUS_PLAIN="",Zo.PLUS_PLAIN="",Zo.INFO="",Zo.ICON_EXPAND="",Zo.ICON_COLLAPSE="",Zo.ADD_TO_PBK="",Zo.ALERT="",Zo.ADD_ALERT="",Zo.BACK_TO_SEARCH="",Zo.DOWNLOAD="",Zo.EDIT="",Zo.FEEDBACK="",Zo.MODIFY_PBK="",Zo.SCHEDULED="",Zo.SEARCH="",Zo.SHARE="󨃱",Zo.TOC="",Zo.WRITE_UGC="",Zo.TRASH="",Zo.EXTLINK="",Zo.EXTLINK_LIGHT="",Zo.CALENDAR="",Zo.BOOK="",Zo.DOWNLOAD_PLAIN="",Zo.CHECK="",Zo.TOPICS="",Zo.EYE="",Zo.EYE_SLASH="",Zo.DISC="",Zo.CIRCLE="",Zo.SHARED="",Zo.SORT_UNSORTED="",Zo.SORT_UP="",Zo.SORT_DOWN="",Zo.WORKING="",Zo.CLOSE="",Zo.ZOOM_OUT="",Zo.ZOOM_IN="",Zo.ZOOM_REALSIZE="",Zo.ZOOM_FULLSCREEN="",Zo.ADMIN_RESTRICTED="",Zo.ADMIN_THEME="",Zo.WARNING="",Zo.CONTEXT="",Zo.SEARCH_HOME="",Zo.STEPS="",Zo.HOME="",Zo.TRANSLATE="",Zo.USER="",Zo.ADMIN="",Zo.ANALYTICS="",Zo.ADMIN_KHUB="",Zo.ADMIN_USERS="",Zo.ADMIN_INTEGRATION="",Zo.ADMIN_PORTAL="",Zo.COMMENT_QUESTION="",Zo.COMMENT_QUESTION_PLAIN="",Zo.MESSAGE_BOT="",Zo.PIP="",Zo.PIP_WIDE="",Zo.EXPAND_WIDE="",Zo.X_MARK="",t.FtFileFormatIcons=void 0,($o=t.FtFileFormatIcons||(t.FtFileFormatIcons={})).UNKNOWN="",$o.ABW="",$o.AUDIO="",$o.AVI="",$o.CHM="",$o.CODE="",$o.CSV="",$o.DITA="",$o.EPUB="",$o.EXCEL="",$o.FLAC="",$o.GIF="",$o.GZIP="",$o.HTML="",$o.IMAGE="",$o.JPEG="",$o.JSON="",$o.M4A="",$o.MOV="",$o.MP3="",$o.MP4="",$o.OGG="",$o.PDF="",$o.PNG="",$o.POWERPOINT="",$o.RAR="",$o.STP="",$o.TEXT="",$o.VIDEO="",$o.WAV="",$o.WMA="",$o.WORD="",$o.XML="",$o.YAML="",$o.ZIP="";const Ao=new Map([...["abw"].map((o=>[o,t.FtFileFormatIcons.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((o=>[o,t.FtFileFormatIcons.AUDIO])),...["avi"].map((o=>[o,t.FtFileFormatIcons.AVI])),...["chm","xhs"].map((o=>[o,t.FtFileFormatIcons.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((o=>[o,t.FtFileFormatIcons.CODE])),...["csv"].map((o=>[o,t.FtFileFormatIcons.CSV])),...["dita","ditamap","ditaval"].map((o=>[o,t.FtFileFormatIcons.DITA])),...["epub"].map((o=>[o,t.FtFileFormatIcons.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((o=>[o,t.FtFileFormatIcons.EXCEL])),...["flac"].map((o=>[o,t.FtFileFormatIcons.FLAC])),...["gif"].map((o=>[o,t.FtFileFormatIcons.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((o=>[o,t.FtFileFormatIcons.GZIP])),...["html","htm","xhtml"].map((o=>[o,t.FtFileFormatIcons.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((o=>[o,t.FtFileFormatIcons.IMAGE])),...["jpeg","jpg","jpe"].map((o=>[o,t.FtFileFormatIcons.JPEG])),...["json"].map((o=>[o,t.FtFileFormatIcons.JSON])),...["m4a","m4p"].map((o=>[o,t.FtFileFormatIcons.M4A])),...["mov","qt"].map((o=>[o,t.FtFileFormatIcons.MOV])),...["mp3"].map((o=>[o,t.FtFileFormatIcons.MP3])),...["mp4","m4v"].map((o=>[o,t.FtFileFormatIcons.MP4])),...["ogg","oga"].map((o=>[o,t.FtFileFormatIcons.OGG])),...["pdf","ps"].map((o=>[o,t.FtFileFormatIcons.PDF])),...["png"].map((o=>[o,t.FtFileFormatIcons.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((o=>[o,t.FtFileFormatIcons.POWERPOINT])),...["rar"].map((o=>[o,t.FtFileFormatIcons.RAR])),...["stp"].map((o=>[o,t.FtFileFormatIcons.STP])),...["txt","rtf","md","mdown"].map((o=>[o,t.FtFileFormatIcons.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((o=>[o,t.FtFileFormatIcons.VIDEO])),...["wav"].map((o=>[o,t.FtFileFormatIcons.WAV])),...["wma"].map((o=>[o,t.FtFileFormatIcons.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((o=>[o,t.FtFileFormatIcons.WORD])),...["xml","xsl","rdf"].map((o=>[o,t.FtFileFormatIcons.XML])),...["yaml","yml","x-yaml"].map((o=>[o,t.FtFileFormatIcons.YAML])),...["zip"].map((o=>[o,t.FtFileFormatIcons.ZIP]))]),Fo=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);const Mo={size:go.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:go.extend("--ft-icon-fluid-topics-font-family","",go.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:go.extend("--ft-icon-file-format-font-family","",go.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:go.extend("--ft-icon-material-font-family","",go.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:go.create("--ft-icon-vertical-align","","UNKNOWN","unset")},zo=dt`
|
|
126
130
|
:host, i.ft-icon {
|
|
127
131
|
display: inline-flex;
|
|
128
132
|
align-items: center;
|
|
@@ -131,14 +135,14 @@ const Io=2;class Lo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
|
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
:host {
|
|
134
|
-
width: ${
|
|
135
|
-
height: ${
|
|
138
|
+
width: ${Mo.size};
|
|
139
|
+
height: ${Mo.size};
|
|
136
140
|
}
|
|
137
141
|
|
|
138
142
|
i.ft-icon {
|
|
139
143
|
width: 100%;
|
|
140
144
|
height: 100%;
|
|
141
|
-
font-size: ${
|
|
145
|
+
font-size: ${Mo.size};
|
|
142
146
|
line-height: 1;
|
|
143
147
|
font-weight: normal;
|
|
144
148
|
text-transform: none;
|
|
@@ -149,30 +153,30 @@ const Io=2;class Lo{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,e)
|
|
|
149
153
|
text-rendering: auto;
|
|
150
154
|
-webkit-font-smoothing: antialiased;
|
|
151
155
|
-moz-osx-font-smoothing: grayscale;
|
|
152
|
-
vertical-align: ${
|
|
156
|
+
vertical-align: ${Mo.verticalAlign};
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
i.ft-icon.ft-icon--fluid-topics {
|
|
156
|
-
font-family: ${
|
|
160
|
+
font-family: ${Mo.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
157
161
|
|
|
158
162
|
/* Ugly fix because font is broken */
|
|
159
|
-
font-size: calc(0.75 * ${
|
|
160
|
-
line-height: ${
|
|
163
|
+
font-size: calc(0.75 * ${Mo.size});
|
|
164
|
+
line-height: ${Mo.size};
|
|
161
165
|
position: relative;
|
|
162
166
|
top: -4%;
|
|
163
167
|
justify-content: center;
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
.ft-icon--file-format {
|
|
167
|
-
font-family: ${
|
|
171
|
+
font-family: ${Mo.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
168
172
|
}
|
|
169
173
|
|
|
170
174
|
.ft-icon--material {
|
|
171
|
-
font-family: ${
|
|
175
|
+
font-family: ${Mo.materialFontFamily}, "Material Icons", sans-serif;
|
|
172
176
|
}
|
|
173
|
-
`;var
|
|
177
|
+
`;var Bo;t.FtIconVariants=void 0,(Bo=t.FtIconVariants||(t.FtIconVariants={})).fluid_topics="fluid-topics",Bo.file_format="file-format",Bo.material="material";var Do,Po=function(t,o,e,r){for(var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,e):r,s=t.length-1;s>=0;s--)(i=t[s])&&(n=(a<3?i(n):a>3?i(o,e,n):i(o,e))||n);return a>3&&n&&Object.defineProperty(o,e,n),n};class _o extends Ro{constructor(){super(...arguments),this.resolvedIcon=Vt}render(){const o=this.variant&&Object.values(t.FtIconVariants).includes(this.variant)?this.variant:t.FtIconVariants.fluid_topics,e=o!==t.FtIconVariants.material||!!this.value;return Jt`
|
|
174
178
|
<i class="ft-icon ft-icon--${o}" part="icon icon-${o}">
|
|
175
|
-
${
|
|
179
|
+
${Ko(this.resolvedIcon)}
|
|
176
180
|
<slot ?hidden=${e}></slot>
|
|
177
181
|
</i>
|
|
178
|
-
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var o,e;let r=this.value||this.textContent;switch(this.variant){case t.FtIconVariants.file_format:this.resolvedIcon=null!==(o=t.FtFileFormatIcons[r.replace("-","_").toUpperCase()])&&void 0!==o?o:r;break;case t.FtIconVariants.material:this.resolvedIcon=this.value||Vt;break;default:this.resolvedIcon=null!==(e=t.FtIcons[r.replace("-","_").toUpperCase()])&&void 0!==e?e:r}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}
|
|
182
|
+
`}get textContent(){var t,o;return null!==(o=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==o?o:""}update(t){super.update(t),["value","variant"].some((o=>t.has(o)))&&this.resolveIcon()}resolveIcon(){var o,e;let r=this.value||this.textContent;switch(this.variant){case t.FtIconVariants.file_format:this.resolvedIcon=null!==(o=t.FtFileFormatIcons[r.replace("-","_").toUpperCase()])&&void 0!==o?o:r;break;case t.FtIconVariants.material:this.resolvedIcon=this.value||Vt;break;default:this.resolvedIcon=null!==(e=t.FtIcons[r.replace("-","_").toUpperCase()])&&void 0!==e?e:r}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}_o.elementDefinitions={},_o.styles=zo,Po([S()],_o.prototype,"variant",void 0),Po([S()],_o.prototype,"value",void 0),Po([function(t){return S({...t,state:!0,attribute:!1})}()],_o.prototype,"resolvedIcon",void 0),Po([function(t,o){return(e,r,i)=>{const a=o=>o.renderRoot?.querySelector(t)??null;if(o){const{get:t,set:o}="object"==typeof r?e:i??(()=>{const t=Symbol();return{get(){return this[t]},set(o){this[t]=o}}})();return C(0,0,{get(){let e=t.call(this);return void 0===e&&(e=a(this),(null!==e||this.hasUpdated)&&o.call(this,e)),e}})}return C(0,0,{get(){return a(this)}})}}("slot")],_o.prototype,"slottedContent",void 0),(Do="ft-icon",t=>{window.customElements.get(Do)||window.customElements.define(Do,t)})(_o),t.FtIcon=_o,t.FtIconCssVariables=Mo,t.resolveFileFormatIcon=function(o,e){var r,i,a,n;o=(null!=o?o:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[s,c]=((null!==(r=Fo.get(o))&&void 0!==r?r:o)+"/").split("/");return null!==(n=null!==(a=null!==(i=Ao.get(c))&&void 0!==i?i:Ao.get(e))&&void 0!==a?a:Ao.get(s))&&void 0!==n?n:t.FtFileFormatIcons.UNKNOWN},t.styles=zo}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-icon",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Typography components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.1.3",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "0d44a470e710f185c37e42ee87be4481a3bdf793"
|
|
27
27
|
}
|