@fluid-topics/ft-filterable-table 1.1.0 → 1.1.2
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-filterable-table.min.js +317 -313
- package/package.json +6 -6
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subject to an additional IP rights grant found at
|
|
13
13
|
* http://polymer.github.io/PATENTS.txt
|
|
14
14
|
*/
|
|
15
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let p=o.call(i,t);p||(p=f(t),e.call(i,t,p)),this===window.customElements&&(a.set(r,c),c.standInClass=p);const h=this._awaitingUpgrade.get(t);if(h){this._awaitingUpgrade.delete(t);for(const t of h)n.delete(t),u(t,c,!0)}const
|
|
15
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,i=window.customElements,r=new WeakMap,n=new WeakMap,a=new WeakMap,s=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,r){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(r))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const s=r.prototype.attributeChangedCallback,l=new Set(r.observedAttributes||[]);d(r,l,s);const c={elementClass:r,connectedCallback:r.prototype.connectedCallback,disconnectedCallback:r.prototype.disconnectedCallback,adoptedCallback:r.prototype.adoptedCallback,attributeChangedCallback:s,formAssociated:r.formAssociated,formAssociatedCallback:r.prototype.formAssociatedCallback,formDisabledCallback:r.prototype.formDisabledCallback,formResetCallback:r.prototype.formResetCallback,formStateRestoreCallback:r.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(r,c);let p=o.call(i,t);p||(p=f(t),e.call(i,t,p)),this===window.customElements&&(a.set(r,c),c.standInClass=p);const h=this._awaitingUpgrade.get(t);if(h){this._awaitingUpgrade.delete(t);for(const t of h)n.delete(t),u(t,c,!0)}const g=this._whenDefinedPromises.get(t);return void 0!==g&&(g.resolve(r),this._whenDefinedPromises.delete(t)),r}upgrade(){y.push(this),i.upgrade.apply(i,arguments),y.pop()}get(t){const e=this._definitionsByTag.get(t);return e?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let o=this._whenDefinedPromises.get(t);return void 0===o&&(o={},o.promise=new Promise((t=>o.resolve=t)),this._whenDefinedPromises.set(t,o)),o.promise}_upgradeWhenDefined(t,e,o){let i=this._awaitingUpgrade.get(e);i||this._awaitingUpgrade.set(e,i=new Set),o?i.add(t):i.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const o=a.get(this.constructor);if(!o)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],o.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),r.set(e,o),e},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!c(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),c(e)||(e=s.get(e)?.getRootNode()||document)}return e.customElements},f=e=>class{static get formAssociated(){return!0}constructor(){const o=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(o,HTMLElement.prototype);const i=p(o)||window.customElements,r=i._getDefinition(e);return r?u(o,r):n.set(o,i),o}connectedCallback(){const t=r.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=r.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){const t=r.get(this);t?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=r.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=r.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=r.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=r.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},d=(t,e,o)=>{if(0===e.size||void 0===o)return;const i=t.prototype.setAttribute;i&&(t.prototype.setAttribute=function(t,r){const n=t.toLowerCase();if(e.has(n)){const t=this.getAttribute(n);i.call(this,n,r),o.call(this,n,t,r)}else i.call(this,n,r)});const r=t.prototype.removeAttribute;r&&(t.prototype.removeAttribute=function(t){const i=t.toLowerCase();if(e.has(i)){const t=this.getAttribute(i);r.call(this,i),o.call(this,i,t,null)}else r.call(this,i)});const n=t.prototype.toggleAttribute;n&&(t.prototype.toggleAttribute=function(t,i){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);n.call(this,r,i);const e=this.getAttribute(r);o.call(this,r,t,e)}else n.call(this,r,i)})},h=e=>{const o=Object.getPrototypeOf(e);if(o!==window.HTMLElement)return o===t?Object.setPrototypeOf(e,window.HTMLElement):h(o)},u=(t,e,o=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),r.set(t,e),l=t;try{new e.elementClass}catch(t){h(e.elementClass),new e.elementClass}e.attributeChangedCallback&&e.observedAttributes.forEach((o=>{t.hasAttribute(o)&&e.attributeChangedCallback.call(t,o,null,t.getAttribute(o))})),o&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},g=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=g.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,o=void 0)=>{const i=(o?Object.getPrototypeOf(o):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=i.apply(o||this,arguments);return void 0!==t&&s.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const m=(t,e)=>{const o=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...o,set(t){y.push(this),o.set.call(this,t),y.pop()}})};if(m(Element,"innerHTML"),m(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,o=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...o){const i=e.call(this,...o);return t.set(i,this),i},o.forEach((e=>{const o=window.ElementInternals.prototype,i=o[e];o[e]=function(...e){const o=t.get(this);if(!0===r.get(o).formAssociated)return i?.call(this,...e);throw new DOMException(`Failed to execute ${i} on 'ElementInternals': The target element is not a form-associated custom element.`)}}));class i extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const e=new Map;t.forEach(((t,o)=>{const i=t.getAttribute("name"),r=e.get(i)||[];this[+o]=t,r.push(t),e.set(i,r)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new i(t))}))}namedItem(t){return this[t]}}const a=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=a.get.call(this,[]),e=[];for(const o of t){const t=r.get(o);t&&!0!==t.formAssociated||e.push(o)}return new n(e)}})}}try{window.customElements.define("custom-element",null)}catch(co){const t=window.customElements.define;window.customElements.define=(e,o,i)=>{if(null!==o)try{t.bind(window.customElements)(e,o,i)}catch(t){console.info(e,o,i,t)}}}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 o=[...this.callbacks];this.callbacks=[];const i=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,r=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of o)try{await t()}catch(t){return void i(t)}r(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
16
16
|
/**
|
|
17
17
|
* @license
|
|
18
18
|
* Copyright 2019 Google LLC
|
|
@@ -22,7 +22,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/,{is:l,defineProperty:c,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:d,getPrototypeOf:h}=Object,u=globalThis,
|
|
25
|
+
*/,{is:l,defineProperty:c,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:d,getPrototypeOf:h}=Object,u=globalThis,g=u.trustedTypes,y=g?g.emptyScript:"",b=u.reactiveElementPolyfillSupport,m=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},v=(t,e)=>!l(t,e),O={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:v};Symbol.metadata??=Symbol("metadata"),u.litPropertyMetadata??=new WeakMap;let $=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,e=O){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&c(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:r}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const n=i?.call(this);r.call(this,e),this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??O}static _$Ei(){if(this.hasOwnProperty(m("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(m("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(m("properties"))){const t=this.properties,e=[...f(t),...d(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(s(t))}else void 0!==t&&e.push(s(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"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,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(i)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=o.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(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,e,o){this._$AK(t,o)}_$EO(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const r=(void 0!==o.converter?.toAttribute?o.converter:x).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=i,this[i]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o,i=!1,r){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??v)(i?r:this[t],e))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.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,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}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){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[m("elementProperties")]=new Map,$[m("finalized")]=new Map,b?.({ReactiveElement:$}),(u.reactiveElementVersions??=[]).push("2.0.2");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
@@ -60,24 +60,24 @@ function R(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not(
|
|
|
60
60
|
* Copyright 2017 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
62
|
*/
|
|
63
|
-
const W=globalThis,L=W.trustedTypes,z=L?L.createPolicy("lit-html",{createHTML:t=>t}):void 0,Z="$lit$",K=`lit$${(Math.random()+"").slice(9)}$`,F="?"+K,D=`<${F}>`,B=document,A=()=>B.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,H=t=>P(t)||"function"==typeof t?.[Symbol.iterator],j="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,G=/>/g,V=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,J=/"/g,q=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),Q=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),et=new WeakMap,ot=B.createTreeWalker(B,129);function it(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(e):e}const rt=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",a=T;for(let e=0;e<o;e++){const o=t[e];let s,l,c=-1,p=0;for(;p<o.length&&(a.lastIndex=p,l=a.exec(o),null!==l);)p=a.lastIndex,a===T?"!--"===l[1]?a=_:void 0!==l[1]?a=G:void 0!==l[2]?(q.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=V):void 0!==l[3]&&(a=V):a===V?">"===l[0]?(a=r??T,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?V:'"'===l[3]?J:Y):a===J||a===Y?a=V:a===_||a===G?a=T:(a=V,r=void 0);const f=a===V&&t[e+1].startsWith("/>")?" ":"";n+=a===T?o+D:c>=0?(i.push(s),o.slice(0,c)+Z+o.slice(c)+K+f):o+K+(-2===c?e:f)}return[it(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};let nt=class t{constructor({strings:e,_$litType$:o},i){let r;this.parts=[];let n=0,a=0;const s=e.length-1,l=this.parts,[c,p]=rt(e,o);if(this.el=t.createElement(c,i),ot.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=ot.nextNode())&&l.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Z)){const e=p[a++],o=r.getAttribute(t).split(K),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:o,ctor:"."===i[1]?pt:"?"===i[1]?ft:"@"===i[1]?dt:ct}),r.removeAttribute(t)}else t.startsWith(K)&&(l.push({type:6,index:n}),r.removeAttribute(t));if(q.test(r.tagName)){const t=r.textContent.split(K),e=t.length-1;if(e>0){r.textContent=L?L.emptyScript:"";for(let o=0;o<e;o++)r.append(t[o],A()),ot.nextNode(),l.push({type:2,index:++n});r.append(t[e],A())}}}else if(8===r.nodeType)if(r.data===F)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(K,t+1));)l.push({type:7,index:n}),t+=K.length-1}n++}}static createElement(t,e){const o=B.createElement("template");return o.innerHTML=t,o}};function at(t,e,o=t,i){if(e===Q)return e;let r=void 0!==i?o._$Co?.[i]:o._$Cl;const n=M(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=r:o._$Cl=r),void 0!==r&&(e=at(t,r._$AS(t,e.values),r,i)),e}let st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??B).importNode(e,!0);ot.currentNode=i;let r=ot.nextNode(),n=0,a=0,s=o[0];for(;void 0!==s;){if(n===s.index){let e;2===s.type?e=new lt(r,r.nextSibling,this,t):1===s.type?e=new s.ctor(r,s.name,s.strings,this,t):6===s.type&&(e=new ht(r,this,t)),this._$AV.push(e),s=o[++a]}n!==s?.index&&(r=ot.nextNode(),n++)}return ot.currentNode=B,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},lt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=at(this,t,e),M(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):H(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==tt&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(B.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=nt.createElement(it(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new st(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new nt(t)),e}T(e){P(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let i,r=0;for(const n of e)r===o.length?o.push(i=new t(this.k(A()),this.k(A()),this,this.options)):i=o[r],i._$AI(n),r++;r<o.length&&(this._$AR(i&&i._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},ct=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,r){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=tt}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=at(this,t,e,0),n=!M(t)||t!==this._$AH&&t!==Q,n&&(this._$AH=t);else{const i=t;let a,s;for(t=r[0],a=0;a<r.length-1;a++)s=at(this,i[o+a],e,a),s===Q&&(s=this._$AH[a]),n||=!M(s)||s!==this._$AH[a],s===tt?t=tt:t!==tt&&(t+=(s??"")+r[a+1]),this._$AH[a]=s}n&&!i&&this.O(t)}O(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},pt=class extends ct{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===tt?void 0:t}},ft=class extends ct{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}},dt=class extends ct{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){if((t=at(this,t,e,0)??tt)===Q)return;const o=this._$AH,i=t===tt&&o!==tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==tt&&(o===tt||i);i&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){at(this,t)}};const ut={j:Z,P:K,A:F,C:1,M:rt,L:st,R:H,V:at,D:lt,I:ct,H:ft,N:dt,U:pt,B:ht},
|
|
63
|
+
const W=globalThis,L=W.trustedTypes,z=L?L.createPolicy("lit-html",{createHTML:t=>t}):void 0,Z="$lit$",K=`lit$${(Math.random()+"").slice(9)}$`,F="?"+K,D=`<${F}>`,B=document,A=()=>B.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,H=t=>P(t)||"function"==typeof t?.[Symbol.iterator],j="[ \t\n\f\r]",T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,G=/>/g,V=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,J=/"/g,q=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),Q=Symbol.for("lit-noChange"),tt=Symbol.for("lit-nothing"),et=new WeakMap,ot=B.createTreeWalker(B,129);function it(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(e):e}const rt=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",a=T;for(let e=0;e<o;e++){const o=t[e];let s,l,c=-1,p=0;for(;p<o.length&&(a.lastIndex=p,l=a.exec(o),null!==l);)p=a.lastIndex,a===T?"!--"===l[1]?a=_:void 0!==l[1]?a=G:void 0!==l[2]?(q.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=V):void 0!==l[3]&&(a=V):a===V?">"===l[0]?(a=r??T,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?V:'"'===l[3]?J:Y):a===J||a===Y?a=V:a===_||a===G?a=T:(a=V,r=void 0);const f=a===V&&t[e+1].startsWith("/>")?" ":"";n+=a===T?o+D:c>=0?(i.push(s),o.slice(0,c)+Z+o.slice(c)+K+f):o+K+(-2===c?e:f)}return[it(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};let nt=class t{constructor({strings:e,_$litType$:o},i){let r;this.parts=[];let n=0,a=0;const s=e.length-1,l=this.parts,[c,p]=rt(e,o);if(this.el=t.createElement(c,i),ot.currentNode=this.el.content,2===o){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=ot.nextNode())&&l.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Z)){const e=p[a++],o=r.getAttribute(t).split(K),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:o,ctor:"."===i[1]?pt:"?"===i[1]?ft:"@"===i[1]?dt:ct}),r.removeAttribute(t)}else t.startsWith(K)&&(l.push({type:6,index:n}),r.removeAttribute(t));if(q.test(r.tagName)){const t=r.textContent.split(K),e=t.length-1;if(e>0){r.textContent=L?L.emptyScript:"";for(let o=0;o<e;o++)r.append(t[o],A()),ot.nextNode(),l.push({type:2,index:++n});r.append(t[e],A())}}}else if(8===r.nodeType)if(r.data===F)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(K,t+1));)l.push({type:7,index:n}),t+=K.length-1}n++}}static createElement(t,e){const o=B.createElement("template");return o.innerHTML=t,o}};function at(t,e,o=t,i){if(e===Q)return e;let r=void 0!==i?o._$Co?.[i]:o._$Cl;const n=M(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=r:o._$Cl=r),void 0!==r&&(e=at(t,r._$AS(t,e.values),r,i)),e}let st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??B).importNode(e,!0);ot.currentNode=i;let r=ot.nextNode(),n=0,a=0,s=o[0];for(;void 0!==s;){if(n===s.index){let e;2===s.type?e=new lt(r,r.nextSibling,this,t):1===s.type?e=new s.ctor(r,s.name,s.strings,this,t):6===s.type&&(e=new ht(r,this,t)),this._$AV.push(e),s=o[++a]}n!==s?.index&&(r=ot.nextNode(),n++)}return ot.currentNode=B,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},lt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=at(this,t,e),M(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==Q&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):H(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==tt&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(B.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=nt.createElement(it(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new st(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new nt(t)),e}T(e){P(this._$AH)||(this._$AH=[],this._$AR());const o=this._$AH;let i,r=0;for(const n of e)r===o.length?o.push(i=new t(this.k(A()),this.k(A()),this,this.options)):i=o[r],i._$AI(n),r++;r<o.length&&(this._$AR(i&&i._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}},ct=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,r){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=tt}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=at(this,t,e,0),n=!M(t)||t!==this._$AH&&t!==Q,n&&(this._$AH=t);else{const i=t;let a,s;for(t=r[0],a=0;a<r.length-1;a++)s=at(this,i[o+a],e,a),s===Q&&(s=this._$AH[a]),n||=!M(s)||s!==this._$AH[a],s===tt?t=tt:t!==tt&&(t+=(s??"")+r[a+1]),this._$AH[a]=s}n&&!i&&this.O(t)}O(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},pt=class extends ct{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===tt?void 0:t}},ft=class extends ct{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}},dt=class extends ct{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){if((t=at(this,t,e,0)??tt)===Q)return;const o=this._$AH,i=t===tt&&o!==tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==tt&&(o===tt||i);i&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){at(this,t)}};const ut={j:Z,P:K,A:F,C:1,M:rt,L:st,R:H,V:at,D:lt,I:ct,H:ft,N:dt,U:pt,B:ht},gt=W.litHtmlPolyfillSupport;gt?.(nt,lt),(W.litHtmlVersions??=[]).push("3.1.0");
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2019 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
const
|
|
69
|
+
const yt=globalThis,bt=yt.ShadowRoot&&(void 0===yt.ShadyCSS||yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mt=Symbol(),xt=new WeakMap;let vt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==mt)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(bt&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=xt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&xt.set(e,t))}return t}toString(){return this.cssText}};const Ot=t=>new vt("string"==typeof t?t:t+"",void 0,mt),$t=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,o,i)=>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.")})(o)+t[i+1]),t[0]);return new vt(o,t,mt)},St=bt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return Ot(e)})(t):t
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
-
*/,{is:wt,defineProperty:Nt,getOwnPropertyDescriptor:Ct,getOwnPropertyNames:Et,getOwnPropertySymbols:kt,getPrototypeOf:Rt}=Object,Ut=globalThis,It=Ut.trustedTypes,Wt=It?It.emptyScript:"",Lt=Ut.reactiveElementPolyfillSupport,zt=(t,e)=>t,Zt={toAttribute(t,e){switch(e){case Boolean:t=t?Wt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},Kt=(t,e)=>!wt(t,e),Ft={attribute:!0,type:String,converter:Zt,reflect:!1,hasChanged:Kt};Symbol.metadata??=Symbol("metadata"),Ut.litPropertyMetadata??=new WeakMap;class Dt 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,e=Ft){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&Nt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:r}=Ct(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const n=i?.call(this);r.call(this,e),this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ft}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;const t=Rt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){const t=this.properties,e=[...Et(t),...kt(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(St(t))}else void 0!==t&&e.push(St(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"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,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(bt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=
|
|
74
|
+
*/,{is:wt,defineProperty:Nt,getOwnPropertyDescriptor:Ct,getOwnPropertyNames:Et,getOwnPropertySymbols:kt,getPrototypeOf:Rt}=Object,Ut=globalThis,It=Ut.trustedTypes,Wt=It?It.emptyScript:"",Lt=Ut.reactiveElementPolyfillSupport,zt=(t,e)=>t,Zt={toAttribute(t,e){switch(e){case Boolean:t=t?Wt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(t){o=null}}return o}},Kt=(t,e)=>!wt(t,e),Ft={attribute:!0,type:String,converter:Zt,reflect:!1,hasChanged:Kt};Symbol.metadata??=Symbol("metadata"),Ut.litPropertyMetadata??=new WeakMap;class Dt 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,e=Ft){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&Nt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:r}=Ct(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return i?.call(this)},set(e){const n=i?.call(this);r.call(this,e),this.requestUpdate(t,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ft}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;const t=Rt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){const t=this.properties,e=[...Et(t),...kt(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const o=this._$Eu(t,e);void 0!==o&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(St(t))}else void 0!==t&&e.push(St(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"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,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(bt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const o of e){const e=document.createElement("style"),i=yt.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(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,e,o){this._$AK(t,o)}_$EO(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const r=(void 0!==o.converter?.toAttribute?o.converter:Zt).toAttribute(e,o.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Zt;this._$Em=i,this[i]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,o,i=!1,r){if(void 0!==t){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??Kt)(i?r:this[t],e))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),!0===o.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,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t)!0!==o.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],o)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$E_?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}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){}}Dt.elementStyles=[],Dt.shadowRootOptions={mode:"open"},Dt[zt("elementProperties")]=new Map,Dt[zt("finalized")]=new Map,Lt?.({ReactiveElement:Dt}),(Ut.reactiveElementVersions??=[]).push("2.0.2");
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright 2017 Google LLC
|
|
78
78
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
79
|
*/
|
|
80
|
-
const Bt=globalThis,At=Bt.trustedTypes,Mt=At?At.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pt="$lit$",Ht=`lit$${(Math.random()+"").slice(9)}$`,jt="?"+Ht,Tt=`<${jt}>`,_t=document,Gt=()=>_t.createComment(""),Vt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Yt=Array.isArray,Jt="[ \t\n\f\r]",qt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xt=/-->/g,Qt=/>/g,te=RegExp(`>|${Jt}(?:([^\\s"'>=/]+)(${Jt}*=${Jt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ee=/'/g,oe=/"/g,ie=/^(?:script|style|textarea|title)$/i,re=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),ne=Symbol.for("lit-noChange"),ae=Symbol.for("lit-nothing"),se=new WeakMap,le=_t.createTreeWalker(_t,129);function ce(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Mt?Mt.createHTML(e):e}const pe=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",a=qt;for(let e=0;e<o;e++){const o=t[e];let s,l,c=-1,p=0;for(;p<o.length&&(a.lastIndex=p,l=a.exec(o),null!==l);)p=a.lastIndex,a===qt?"!--"===l[1]?a=Xt:void 0!==l[1]?a=Qt:void 0!==l[2]?(ie.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=te):void 0!==l[3]&&(a=te):a===te?">"===l[0]?(a=r??qt,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?te:'"'===l[3]?oe:ee):a===oe||a===ee?a=te:a===Xt||a===Qt?a=qt:(a=te,r=void 0);const f=a===te&&t[e+1].startsWith("/>")?" ":"";n+=a===qt?o+Tt:c>=0?(i.push(s),o.slice(0,c)+Pt+o.slice(c)+Ht+f):o+Ht+(-2===c?e:f)}return[ce(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class fe{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,n=0;const a=t.length-1,s=this.parts,[l,c]=pe(t,e);if(this.el=fe.createElement(l,o),le.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=le.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Pt)){const e=c[n++],o=i.getAttribute(t).split(Ht),a=/([.?@])?(.*)/.exec(e);s.push({type:1,index:r,name:a[2],strings:o,ctor:"."===a[1]?
|
|
80
|
+
const Bt=globalThis,At=Bt.trustedTypes,Mt=At?At.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pt="$lit$",Ht=`lit$${(Math.random()+"").slice(9)}$`,jt="?"+Ht,Tt=`<${jt}>`,_t=document,Gt=()=>_t.createComment(""),Vt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Yt=Array.isArray,Jt="[ \t\n\f\r]",qt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xt=/-->/g,Qt=/>/g,te=RegExp(`>|${Jt}(?:([^\\s"'>=/]+)(${Jt}*=${Jt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ee=/'/g,oe=/"/g,ie=/^(?:script|style|textarea|title)$/i,re=(t=>(e,...o)=>({_$litType$:t,strings:e,values:o}))(1),ne=Symbol.for("lit-noChange"),ae=Symbol.for("lit-nothing"),se=new WeakMap,le=_t.createTreeWalker(_t,129);function ce(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Mt?Mt.createHTML(e):e}const pe=(t,e)=>{const o=t.length-1,i=[];let r,n=2===e?"<svg>":"",a=qt;for(let e=0;e<o;e++){const o=t[e];let s,l,c=-1,p=0;for(;p<o.length&&(a.lastIndex=p,l=a.exec(o),null!==l);)p=a.lastIndex,a===qt?"!--"===l[1]?a=Xt:void 0!==l[1]?a=Qt:void 0!==l[2]?(ie.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=te):void 0!==l[3]&&(a=te):a===te?">"===l[0]?(a=r??qt,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,s=l[1],a=void 0===l[3]?te:'"'===l[3]?oe:ee):a===oe||a===ee?a=te:a===Xt||a===Qt?a=qt:(a=te,r=void 0);const f=a===te&&t[e+1].startsWith("/>")?" ":"";n+=a===qt?o+Tt:c>=0?(i.push(s),o.slice(0,c)+Pt+o.slice(c)+Ht+f):o+Ht+(-2===c?e:f)}return[ce(t,n+(t[o]||"<?>")+(2===e?"</svg>":"")),i]};class fe{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let r=0,n=0;const a=t.length-1,s=this.parts,[l,c]=pe(t,e);if(this.el=fe.createElement(l,o),le.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=le.nextNode())&&s.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Pt)){const e=c[n++],o=i.getAttribute(t).split(Ht),a=/([.?@])?(.*)/.exec(e);s.push({type:1,index:r,name:a[2],strings:o,ctor:"."===a[1]?ge:"?"===a[1]?ye:"@"===a[1]?be:ue}),i.removeAttribute(t)}else t.startsWith(Ht)&&(s.push({type:6,index:r}),i.removeAttribute(t));if(ie.test(i.tagName)){const t=i.textContent.split(Ht),e=t.length-1;if(e>0){i.textContent=At?At.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],Gt()),le.nextNode(),s.push({type:2,index:++r});i.append(t[e],Gt())}}}else if(8===i.nodeType)if(i.data===jt)s.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(Ht,t+1));)s.push({type:7,index:r}),t+=Ht.length-1}r++}}static createElement(t,e){const o=_t.createElement("template");return o.innerHTML=t,o}}function de(t,e,o=t,i){if(e===ne)return e;let r=void 0!==i?o._$Co?.[i]:o._$Cl;const n=Vt(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=r:o._$Cl=r),void 0!==r&&(e=de(t,r._$AS(t,e.values),r,i)),e}class he{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=ae,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=de(this,t,e),Vt(t)?t===ae||null==t||""===t?(this._$AH!==ae&&this._$AR(),this._$AH=ae):t!==this._$AH&&t!==ne&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>Yt(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==ae&&Vt(this._$AH)?this._$AA.nextSibling.data=t:this.$(_t.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=fe.createElement(ce(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??_t).importNode(e,!0);le.currentNode=i;let r=le.nextNode(),n=0,a=0,s=o[0];for(;void 0!==s;){if(n===s.index){let e;2===s.type?e=new he(r,r.nextSibling,this,t):1===s.type?e=new s.ctor(r,s.name,s.strings,this,t):6===s.type&&(e=new me(r,this,t)),this._$AV.push(e),s=o[++a]}n!==s?.index&&(r=le.nextNode(),n++)}return le.currentNode=_t,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}(i,this),o=t.u(this.options);t.p(e),this.$(o),this._$AH=t}}_$AC(t){let e=se.get(t.strings);return void 0===e&&se.set(t.strings,e=new fe(t)),e}T(t){Yt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const r of t)i===e.length?e.push(o=new he(this.k(Gt()),this.k(Gt()),this,this.options)):o=e[i],o._$AI(r),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ue{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,r){this.type=1,this._$AH=ae,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=ae}_$AI(t,e=this,o,i){const r=this.strings;let n=!1;if(void 0===r)t=de(this,t,e,0),n=!Vt(t)||t!==this._$AH&&t!==ne,n&&(this._$AH=t);else{const i=t;let a,s;for(t=r[0],a=0;a<r.length-1;a++)s=de(this,i[o+a],e,a),s===ne&&(s=this._$AH[a]),n||=!Vt(s)||s!==this._$AH[a],s===ae?t=ae:t!==ae&&(t+=(s??"")+r[a+1]),this._$AH[a]=s}n&&!i&&this.O(t)}O(t){t===ae?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ge extends ue{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===ae?void 0:t}}class ye extends ue{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==ae)}}class be extends ue{constructor(t,e,o,i,r){super(t,e,o,i,r),this.type=5}_$AI(t,e=this){if((t=de(this,t,e,0)??ae)===ne)return;const o=this._$AH,i=t===ae&&o!==ae||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==ae&&(o===ae||i);i&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class me{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){de(this,t)}}const xe=Bt.litHtmlPolyfillSupport;xe?.(fe,he),(Bt.litHtmlVersions??=[]).push("3.1.0");
|
|
81
81
|
/**
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2017 Google LLC
|
|
@@ -88,7 +88,11 @@ let ve=class extends Dt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
88
88
|
* @license
|
|
89
89
|
* Copyright 2019 Google LLC
|
|
90
90
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
91
|
-
*/class We extends ve{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{Ie?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=Ue.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Le,ze=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Ze=Symbol("constructorPrototype"),Ke=Symbol("constructorName"),Fe=Symbol("exportpartsDebouncer");class De extends We{constructor(){super(),this[Le]=new e(5),this[Ke]=this.constructor.name,this[Ze]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ke]&&Object.setPrototypeOf(this,this[Ze])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,o;if((null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==o?o:[]).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[Fe].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,o,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==o?o:[]){const e=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],o=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...o).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const p=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}Le=Fe,ze([N()],De.prototype,"exportpartsPrefix",void 0),ze([function(t,e){const o=()=>JSON.parse(JSON.stringify(t));return N({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!U(t,e),...null!=e?e:{}})}([])],De.prototype,"exportpartsPrefixes",void 0),ze([N()],De.prototype,"customStylesheet",void 0);const Be
|
|
91
|
+
*/class We extends ve{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,o])=>t.registry.define(e,o))));const e={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(e);return((t,e)=>{Ie?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const o=document.createElement("style"),i=Ue.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=e.cssText,t.appendChild(o)}))})(o,t.elementStyles),o}}var Le,ze=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Ze=Symbol("constructorPrototype"),Ke=Symbol("constructorName"),Fe=Symbol("exportpartsDebouncer");class De extends We{constructor(){super(),this[Le]=new e(5),this[Ke]=this.constructor.name,this[Ze]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ke]&&Object.setPrototypeOf(this,this[Ze])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,o;if((null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==o?o:[]).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[Fe].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,o,i,r,n,a;const s=t=>null!=t&&t.trim().length>0,l=t.filter(s).map((t=>t.trim()));if(0===l.length)return void this.removeAttribute("exportparts");const c=new Set;for(let t of null!==(o=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==o?o:[]){const e=null!==(r=null===(i=t.getAttribute("part"))||void 0===i?void 0:i.split(" "))&&void 0!==r?r:[],o=null!==(a=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==a?a:[];new Array(...e,...o).filter(s).map((t=>t.trim())).forEach((t=>c.add(t)))}if(0===c.size)return void this.removeAttribute("exportparts");const p=[...c.values()].flatMap((t=>l.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...p].join(", "))}}Le=Fe,ze([N()],De.prototype,"exportpartsPrefix",void 0),ze([function(t,e){const o=()=>JSON.parse(JSON.stringify(t));return N({type:Object,converter:{fromAttribute:t=>{if(null==t)return o();try{return JSON.parse(t)}catch{return o()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!U(t,e),...null!=e?e:{}})}([])],De.prototype,"exportpartsPrefixes",void 0),ze([N()],De.prototype,"customStylesheet",void 0);const Be=Se.create("--ft-utils-highlight-html-background-color","","COLOR","#FFF26E");$t`
|
|
92
|
+
.highlight-html-match {
|
|
93
|
+
background: ${Be};
|
|
94
|
+
}
|
|
95
|
+
`;const Ae=$t`
|
|
92
96
|
.ft-no-text-select {
|
|
93
97
|
-webkit-touch-callout: none;
|
|
94
98
|
-webkit-user-select: none;
|
|
@@ -109,7 +113,7 @@ let ve=class extends Dt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
109
113
|
-webkit-hyphens: auto;
|
|
110
114
|
hyphens: auto
|
|
111
115
|
}
|
|
112
|
-
`;const
|
|
116
|
+
`;const Me=$t`
|
|
113
117
|
.ft-safari-ellipsis-fix {
|
|
114
118
|
margin-right: 0;
|
|
115
119
|
|
|
@@ -120,17 +124,17 @@ let ve=class extends Dt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
120
124
|
display: inline-block;
|
|
121
125
|
width: 0;
|
|
122
126
|
}
|
|
123
|
-
`;window.ftReduxStores||(window.ftReduxStores={});const
|
|
127
|
+
`;window.ftReduxStores||(window.ftReduxStores={});const Pe=Symbol("elementInternals");function He(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Pe].form}constructor(...t){super(t),this[Pe]=this.attachInternals(),this[Pe].role=e}setFormValue(t){this[Pe].setFormValue(t)}}}var je,Te,_e;const Ge=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(_e=null===(Te=null===(je=window.safari)||void 0===je?void 0:je.pushNotification)||void 0===Te?void 0:Te.toString())&&void 0!==_e?_e:""),Ve=1,Ye=2,Je=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
124
128
|
/**
|
|
125
129
|
* @license
|
|
126
130
|
* Copyright 2017 Google LLC
|
|
127
131
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
128
|
-
*/let
|
|
132
|
+
*/let qe=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
|
|
129
133
|
/**
|
|
130
134
|
* @license
|
|
131
135
|
* Copyright 2020 Google LLC
|
|
132
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
133
|
-
*/const{D:
|
|
137
|
+
*/const{D:Xe}=ut,Qe=()=>document.createComment(""),to=(t,e,o)=>{const i=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===o){const e=i.insertBefore(Qe(),r),n=i.insertBefore(Qe(),r);o=new Xe(e,n,t,t.options)}else{const e=o._$AB.nextSibling,n=o._$AM,a=n!==t;if(a){let e;o._$AQ?.(t),o._$AM=t,void 0!==o._$AP&&(e=t._$AU)!==n._$AU&&o._$AP(e)}if(e!==r||a){let t=o._$AA;for(;t!==e;){const e=t.nextSibling;i.insertBefore(t,r),t=e}}}return o},eo=(t,e,o=t)=>(t._$AI(e,o),t),oo={},io=t=>{t._$AP?.(!1,!0);let e=t._$AA;const o=t._$AB.nextSibling;for(;e!==o;){const t=e.nextSibling;e.remove(),e=t}},ro=(t,e,o)=>{const i=new Map;for(let r=e;r<=o;r++)i.set(t[r],r);return i},no=Je(class extends qe{constructor(t){if(super(t),t.type!==Ye)throw Error("repeat() can only be used in text expressions")}ht(t,e,o){let i;void 0===o?o=e:void 0!==e&&(i=e);const r=[],n=[];let a=0;for(const e of t)r[a]=i?i(e,a):a,n[a]=o(e,a),a++;return{values:n,keys:r}}render(t,e,o){return this.ht(t,e,o).values}update(t,[e,o,i]){const r=(t=>t._$AH)(t),{values:n,keys:a}=this.ht(e,o,i);if(!Array.isArray(r))return this.dt=a,n;const s=this.dt??=[],l=[];let c,p,f=0,d=r.length-1,h=0,u=n.length-1;for(;f<=d&&h<=u;)if(null===r[f])f++;else if(null===r[d])d--;else if(s[f]===a[h])l[h]=eo(r[f],n[h]),f++,h++;else if(s[d]===a[u])l[u]=eo(r[d],n[u]),d--,u--;else if(s[f]===a[u])l[u]=eo(r[f],n[u]),to(t,l[u+1],r[f]),f++,u--;else if(s[d]===a[h])l[h]=eo(r[d],n[h]),to(t,r[f],r[d]),d--,h++;else if(void 0===c&&(c=ro(a,h,u),p=ro(s,f,d)),c.has(s[f]))if(c.has(s[d])){const e=p.get(a[h]),o=void 0!==e?r[e]:null;if(null===o){const e=to(t,r[f]);eo(e,n[h]),l[h]=e}else l[h]=eo(o,n[h]),to(t,r[f],o),r[e]=null;h++}else io(r[d]),d--;else io(r[f]),f++;for(;h<=u;){const e=to(t,l[u+1]);eo(e,n[h]),l[h++]=e}for(;f<=d;){const t=r[f++];null!==t&&io(t)}return this.dt=a,((t,e=oo)=>{t._$AH=e})(t,l),Q}});
|
|
134
138
|
/**
|
|
135
139
|
* @license
|
|
136
140
|
* Copyright 2017 Google LLC
|
|
@@ -141,107 +145,107 @@ let ve=class extends Dt{constructor(){super(...arguments),this.renderOptions={ho
|
|
|
141
145
|
* Copyright 2017 Google LLC
|
|
142
146
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
143
147
|
*/
|
|
144
|
-
let
|
|
148
|
+
let ao=class extends qe{constructor(t){if(super(t),this.et=tt,t.type!==Ye)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===tt||null==t)return this.vt=void 0,this.et=t;if(t===Q)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 e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}};ao.directiveName="unsafeHTML",ao.resultType=1;const so=Je(ao),lo=Je(class extends qe{constructor(t){if(super(t),t.type!==Ve||"class"!==t.name||t.strings?.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]){if(void 0===this.it){this.it=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]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const o=t.element.classList;for(const t of this.it)t in e||(o.remove(t),this.it.delete(t));for(const t in e){const i=!!e[t];i===this.it.has(t)||this.st?.has(t)||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return Q}}),co=Symbol.for(""),po=t=>{if(t?.r===co)return t?._$litStatic$},fo=t=>({_$litStatic$:t,r:co}),ho=new Map,uo=(t=>(e,...o)=>{const i=o.length;let r,n;const a=[],s=[];let l,c=0,p=!1;for(;c<i;){for(l=e[c];c<i&&void 0!==(n=o[c],r=po(n));)l+=r+e[++c],p=!0;c!==i&&s.push(n),a.push(l),c++}if(c===i&&a.push(e[i]),p){const t=a.join("$$lit$$");void 0===(e=ho.get(t))&&(a.raw=a,ho.set(t,e=a)),o=s}return t(e,...o)})(X);
|
|
145
149
|
/**
|
|
146
150
|
* @license
|
|
147
151
|
* Copyright 2018 Google LLC
|
|
148
152
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
149
|
-
*/var
|
|
153
|
+
*/var go;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button",t.display="display",t.title1="title-1",t.title2="title-2",t.title3="title-3",t.body1regular="body-1-regular",t.body1medium="body-1-medium",t.body1semibold="body-1-semibold",t.body2regular="body-2-regular",t.body2medium="body-2-medium",t.body2semibold="body-2-semibold",t.label1medium="label-1-medium",t.label1semibold="label-1-semibold",t.label1bold="label-1-bold",t.label2medium="label-2-medium",t.label2semibold="label-2-semibold",t.label2bold="label-2-bold",t.caption1medium="caption-1-medium",t.caption1semibold="caption-1-semibold",t.caption1bold="caption-1-bold",t.caption2medium="caption-2-medium",t.caption2semibold="caption-2-semibold",t.caption2bold="caption-2-bold"}(go||(go={}));const yo=Se.extend("--ft-typography-font-family","",Re.titleFont),bo=Se.extend("--ft-typography-font-family","",Re.contentFont),mo={fontFamily:bo,fontSize:Se.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:Se.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:Se.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:Se.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:Se.create("--ft-typography-text-transform","","UNKNOWN","inherit")},xo=Se.extend("--ft-typography-title-font-family","",yo),vo=Se.extend("--ft-typography-title-font-size","",mo.fontSize,"20px"),Oo=Se.extend("--ft-typography-title-font-weight","",mo.fontWeight,"normal"),$o=Se.extend("--ft-typography-title-letter-spacing","",mo.letterSpacing,"0.15px"),So=Se.extend("--ft-typography-title-line-height","",mo.lineHeight,"1.2"),wo=Se.extend("--ft-typography-title-text-transform","",mo.textTransform,"inherit"),No=Se.extend("--ft-typography-title-dense-font-family","",yo),Co=Se.extend("--ft-typography-title-dense-font-size","",mo.fontSize,"14px"),Eo=Se.extend("--ft-typography-title-dense-font-weight","",mo.fontWeight,"normal"),ko=Se.extend("--ft-typography-title-dense-letter-spacing","",mo.letterSpacing,"0.105px"),Ro=Se.extend("--ft-typography-title-dense-line-height","",mo.lineHeight,"1.7"),Uo=Se.extend("--ft-typography-title-dense-text-transform","",mo.textTransform,"inherit"),Io=Se.extend("--ft-typography-subtitle1-font-family","",bo),Wo=Se.extend("--ft-typography-subtitle1-font-size","",mo.fontSize,"16px"),Lo=Se.extend("--ft-typography-subtitle1-font-weight","",mo.fontWeight,"600"),zo=Se.extend("--ft-typography-subtitle1-letter-spacing","",mo.letterSpacing,"0.144px"),Zo=Se.extend("--ft-typography-subtitle1-line-height","",mo.lineHeight,"1.5"),Ko=Se.extend("--ft-typography-subtitle1-text-transform","",mo.textTransform,"inherit"),Fo=Se.extend("--ft-typography-subtitle2-font-family","",bo),Do=Se.extend("--ft-typography-subtitle2-font-size","",mo.fontSize,"14px"),Bo=Se.extend("--ft-typography-subtitle2-font-weight","",mo.fontWeight,"normal"),Ao=Se.extend("--ft-typography-subtitle2-letter-spacing","",mo.letterSpacing,"0.098px"),Mo=Se.extend("--ft-typography-subtitle2-line-height","",mo.lineHeight,"1.7"),Po=Se.extend("--ft-typography-subtitle2-text-transform","",mo.textTransform,"inherit"),Ho={fontFamily:Se.extend("--ft-typography-body1-font-family","",bo),fontSize:Se.extend("--ft-typography-body1-font-size","",mo.fontSize,"16px"),fontWeight:Se.extend("--ft-typography-body1-font-weight","",mo.fontWeight,"normal"),letterSpacing:Se.extend("--ft-typography-body1-letter-spacing","",mo.letterSpacing,"0.496px"),lineHeight:Se.extend("--ft-typography-body1-line-height","",mo.lineHeight,"1.5"),textTransform:Se.extend("--ft-typography-body1-text-transform","",mo.textTransform,"inherit")},jo=Se.extend("--ft-typography-body2-font-family","",bo),To=Se.extend("--ft-typography-body2-font-size","",mo.fontSize,"14px"),_o=Se.extend("--ft-typography-body2-font-weight","",mo.fontWeight,"normal"),Go=Se.extend("--ft-typography-body2-letter-spacing","",mo.letterSpacing,"0.252px"),Vo=Se.extend("--ft-typography-body2-line-height","",mo.lineHeight,"1.4"),Yo=Se.extend("--ft-typography-body2-text-transform","",mo.textTransform,"inherit"),Jo={fontFamily:Se.extend("--ft-typography-caption-font-family","",bo),fontSize:Se.extend("--ft-typography-caption-font-size","",mo.fontSize,"12px"),fontWeight:Se.extend("--ft-typography-caption-font-weight","",mo.fontWeight,"normal"),letterSpacing:Se.extend("--ft-typography-caption-letter-spacing","",mo.letterSpacing,"0.396px"),lineHeight:Se.extend("--ft-typography-caption-line-height","",mo.lineHeight,"1.33"),textTransform:Se.extend("--ft-typography-caption-text-transform","",mo.textTransform,"inherit")},qo=Se.extend("--ft-typography-breadcrumb-font-family","",bo),Xo=Se.extend("--ft-typography-breadcrumb-font-size","",mo.fontSize,"10px"),Qo=Se.extend("--ft-typography-breadcrumb-font-weight","",mo.fontWeight,"normal"),ti=Se.extend("--ft-typography-breadcrumb-letter-spacing","",mo.letterSpacing,"0.33px"),ei=Se.extend("--ft-typography-breadcrumb-line-height","",mo.lineHeight,"1.6"),oi=Se.extend("--ft-typography-breadcrumb-text-transform","",mo.textTransform,"inherit"),ii=Se.extend("--ft-typography-overline-font-family","",bo),ri=Se.extend("--ft-typography-overline-font-size","",mo.fontSize,"10px"),ni=Se.extend("--ft-typography-overline-font-weight","",mo.fontWeight,"normal"),ai=Se.extend("--ft-typography-overline-letter-spacing","",mo.letterSpacing,"1.5px"),si=Se.extend("--ft-typography-overline-line-height","",mo.lineHeight,"1.6"),li=Se.extend("--ft-typography-overline-text-transform","",mo.textTransform,"uppercase"),ci={fontFamily:Se.extend("--ft-typography-button-font-family","",bo),fontSize:Se.extend("--ft-typography-button-font-size","",mo.fontSize,"14px"),fontWeight:Se.extend("--ft-typography-button-font-weight","",mo.fontWeight,"600"),letterSpacing:Se.extend("--ft-typography-button-letter-spacing","",mo.letterSpacing,"1.246px"),lineHeight:Se.extend("--ft-typography-button-line-height","",mo.lineHeight,"1.15"),textTransform:Se.extend("--ft-typography-button-text-transform","",mo.textTransform,"uppercase")},pi=$t`
|
|
150
154
|
.ft-typography--title {
|
|
151
|
-
font-family: ${
|
|
152
|
-
font-size: ${
|
|
153
|
-
font-weight: ${
|
|
154
|
-
letter-spacing: ${
|
|
155
|
-
line-height: ${
|
|
156
|
-
text-transform: ${
|
|
157
|
-
}
|
|
158
|
-
`,pi=$t`
|
|
159
|
-
.ft-typography--title-dense {
|
|
160
|
-
font-family: ${wo};
|
|
161
|
-
font-size: ${No};
|
|
162
|
-
font-weight: ${Co};
|
|
163
|
-
letter-spacing: ${Eo};
|
|
164
|
-
line-height: ${ko};
|
|
165
|
-
text-transform: ${Ro};
|
|
155
|
+
font-family: ${xo};
|
|
156
|
+
font-size: ${vo};
|
|
157
|
+
font-weight: ${Oo};
|
|
158
|
+
letter-spacing: ${$o};
|
|
159
|
+
line-height: ${So};
|
|
160
|
+
text-transform: ${wo};
|
|
166
161
|
}
|
|
167
162
|
`,fi=$t`
|
|
168
|
-
.ft-typography--
|
|
169
|
-
font-family: ${
|
|
170
|
-
font-size: ${
|
|
171
|
-
font-weight: ${
|
|
172
|
-
letter-spacing: ${
|
|
173
|
-
line-height: ${
|
|
174
|
-
text-transform: ${
|
|
163
|
+
.ft-typography--title-dense {
|
|
164
|
+
font-family: ${No};
|
|
165
|
+
font-size: ${Co};
|
|
166
|
+
font-weight: ${Eo};
|
|
167
|
+
letter-spacing: ${ko};
|
|
168
|
+
line-height: ${Ro};
|
|
169
|
+
text-transform: ${Uo};
|
|
175
170
|
}
|
|
176
171
|
`,di=$t`
|
|
172
|
+
.ft-typography--subtitle1 {
|
|
173
|
+
font-family: ${Io};
|
|
174
|
+
font-size: ${Wo};
|
|
175
|
+
font-weight: ${Lo};
|
|
176
|
+
letter-spacing: ${zo};
|
|
177
|
+
line-height: ${Zo};
|
|
178
|
+
text-transform: ${Ko};
|
|
179
|
+
}
|
|
180
|
+
`,hi=$t`
|
|
177
181
|
.ft-typography--subtitle2 {
|
|
178
|
-
font-family: ${
|
|
179
|
-
font-size: ${
|
|
180
|
-
font-weight: ${
|
|
181
|
-
letter-spacing: ${
|
|
182
|
-
line-height: ${
|
|
183
|
-
text-transform: ${
|
|
182
|
+
font-family: ${Fo};
|
|
183
|
+
font-size: ${Do};
|
|
184
|
+
font-weight: ${Bo};
|
|
185
|
+
letter-spacing: ${Ao};
|
|
186
|
+
line-height: ${Mo};
|
|
187
|
+
text-transform: ${Po};
|
|
184
188
|
}
|
|
185
189
|
|
|
186
|
-
`,
|
|
190
|
+
`,ui=$t`
|
|
187
191
|
.ft-typography--body1 {
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
192
|
+
font-family: ${Ho.fontFamily};
|
|
193
|
+
font-size: ${Ho.fontSize};
|
|
194
|
+
font-weight: ${Ho.fontWeight};
|
|
195
|
+
letter-spacing: ${Ho.letterSpacing};
|
|
196
|
+
line-height: ${Ho.lineHeight};
|
|
197
|
+
text-transform: ${Ho.textTransform};
|
|
194
198
|
}
|
|
195
|
-
`,
|
|
199
|
+
`,gi=$t`
|
|
196
200
|
.ft-typography--body2 {
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
201
|
-
line-height: ${
|
|
202
|
-
text-transform: ${
|
|
201
|
+
font-family: ${jo};
|
|
202
|
+
font-size: ${To};
|
|
203
|
+
font-weight: ${_o};
|
|
204
|
+
letter-spacing: ${Go};
|
|
205
|
+
line-height: ${Vo};
|
|
206
|
+
text-transform: ${Yo};
|
|
203
207
|
}
|
|
204
208
|
`,yi=$t`
|
|
205
209
|
.ft-typography--caption {
|
|
206
|
-
font-family: ${
|
|
207
|
-
font-size: ${
|
|
208
|
-
font-weight: ${
|
|
209
|
-
letter-spacing: ${
|
|
210
|
-
line-height: ${
|
|
211
|
-
text-transform: ${
|
|
212
|
-
}
|
|
213
|
-
`,gi=$t`
|
|
214
|
-
.ft-typography--breadcrumb {
|
|
215
|
-
font-family: ${Jo};
|
|
216
|
-
font-size: ${qo};
|
|
217
|
-
font-weight: ${Xo};
|
|
218
|
-
letter-spacing: ${Qo};
|
|
219
|
-
line-height: ${ti};
|
|
220
|
-
text-transform: ${ei};
|
|
210
|
+
font-family: ${Jo.fontFamily};
|
|
211
|
+
font-size: ${Jo.fontSize};
|
|
212
|
+
font-weight: ${Jo.fontWeight};
|
|
213
|
+
letter-spacing: ${Jo.letterSpacing};
|
|
214
|
+
line-height: ${Jo.lineHeight};
|
|
215
|
+
text-transform: ${Jo.textTransform};
|
|
221
216
|
}
|
|
222
217
|
`,bi=$t`
|
|
223
|
-
.ft-typography--
|
|
224
|
-
font-family: ${
|
|
225
|
-
font-size: ${
|
|
226
|
-
font-weight: ${
|
|
227
|
-
letter-spacing: ${
|
|
228
|
-
line-height: ${
|
|
229
|
-
text-transform: ${
|
|
218
|
+
.ft-typography--breadcrumb {
|
|
219
|
+
font-family: ${qo};
|
|
220
|
+
font-size: ${Xo};
|
|
221
|
+
font-weight: ${Qo};
|
|
222
|
+
letter-spacing: ${ti};
|
|
223
|
+
line-height: ${ei};
|
|
224
|
+
text-transform: ${oi};
|
|
230
225
|
}
|
|
231
226
|
`,mi=$t`
|
|
232
|
-
.ft-typography--
|
|
233
|
-
font-family: ${
|
|
234
|
-
font-size: ${
|
|
235
|
-
font-weight: ${
|
|
236
|
-
letter-spacing: ${
|
|
237
|
-
line-height: ${
|
|
238
|
-
text-transform: ${li
|
|
227
|
+
.ft-typography--overline {
|
|
228
|
+
font-family: ${ii};
|
|
229
|
+
font-size: ${ri};
|
|
230
|
+
font-weight: ${ni};
|
|
231
|
+
letter-spacing: ${ai};
|
|
232
|
+
line-height: ${si};
|
|
233
|
+
text-transform: ${li};
|
|
239
234
|
}
|
|
240
235
|
`,xi=$t`
|
|
236
|
+
.ft-typography--button {
|
|
237
|
+
font-family: ${ci.fontFamily};
|
|
238
|
+
font-size: ${ci.fontSize};
|
|
239
|
+
font-weight: ${ci.fontWeight};
|
|
240
|
+
letter-spacing: ${ci.letterSpacing};
|
|
241
|
+
line-height: ${ci.lineHeight};
|
|
242
|
+
text-transform: ${ci.textTransform};
|
|
243
|
+
}
|
|
244
|
+
`,vi=$t`
|
|
241
245
|
.ft-typography {
|
|
242
246
|
vertical-align: inherit;
|
|
243
247
|
}
|
|
244
|
-
`,
|
|
248
|
+
`,Oi=[Object.keys(Ce).map((t=>function(t){const e=Ce[t];return $t`
|
|
245
249
|
.ft-typography--${Ot(t)} {
|
|
246
250
|
font-family: ${e.fontFamily};
|
|
247
251
|
font-size: ${e.fontSize};
|
|
@@ -250,32 +254,32 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
250
254
|
line-height: ${e.lineHeight};
|
|
251
255
|
text-transform: ${e.textCase};
|
|
252
256
|
}
|
|
253
|
-
`}(t)))];var
|
|
254
|
-
<${
|
|
257
|
+
`}(t)))];var $i=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Si extends De{constructor(){super(...arguments),this.variant=go.body1}render(){return this.element?uo`
|
|
258
|
+
<${fo(this.element)}
|
|
255
259
|
class="ft-typography ft-typography--${this.variant}">
|
|
256
260
|
<slot></slot>
|
|
257
|
-
</${
|
|
258
|
-
`:
|
|
261
|
+
</${fo(this.element)}>
|
|
262
|
+
`:uo`
|
|
259
263
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
260
|
-
`}}
|
|
264
|
+
`}}Si.styles=[pi,fi,di,hi,ui,gi,yi,bi,mi,xi,vi,...Oi],$i([N()],Si.prototype,"element",void 0),$i([N()],Si.prototype,"variant",void 0),I("ft-typography")(Si);const wi={fontSize:Se.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:Se.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:Se.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:Se.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:Se.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:Se.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:Se.extend("--ft-input-label-border-color","",Re.colorOutline),textColor:Se.extend("--ft-input-label-text-color","",Re.colorOnSurfaceMedium),disabledTextColor:Se.extend("--ft-input-label-disabled-text-color","",Re.colorOnSurfaceDisabled),colorSurface:Se.external(Re.colorSurface,"Design system"),borderRadiusS:Se.external(Re.borderRadiusS,"Design system"),colorError:Se.external(Re.colorError,"Design system")},Ni=$t`
|
|
261
265
|
.ft-input-label {
|
|
262
266
|
position: absolute;
|
|
263
267
|
inset: 0;
|
|
264
268
|
display: flex;
|
|
265
|
-
background-color: ${
|
|
266
|
-
border-radius: ${
|
|
269
|
+
background-color: ${wi.colorSurface};
|
|
270
|
+
border-radius: ${wi.borderRadiusS} ${wi.borderRadiusS} 0 0;
|
|
267
271
|
}
|
|
268
272
|
|
|
269
273
|
.ft-input-label--outlined {
|
|
270
|
-
border-radius: ${
|
|
274
|
+
border-radius: ${wi.borderRadiusS};
|
|
271
275
|
}
|
|
272
276
|
|
|
273
277
|
.ft-input-label {
|
|
274
|
-
border-color: ${
|
|
278
|
+
border-color: ${wi.borderColor};
|
|
275
279
|
}
|
|
276
280
|
|
|
277
281
|
.ft-input-label.ft-input-label--in-error {
|
|
278
|
-
border-color: ${
|
|
282
|
+
border-color: ${wi.colorError}
|
|
279
283
|
}
|
|
280
284
|
|
|
281
285
|
.ft-input-label:before,
|
|
@@ -288,7 +292,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
288
292
|
}
|
|
289
293
|
|
|
290
294
|
.ft-input-label:before {
|
|
291
|
-
width: calc(${
|
|
295
|
+
width: calc(${wi.horizontalSpacing} - 4px);
|
|
292
296
|
flex-shrink: 0;
|
|
293
297
|
}
|
|
294
298
|
|
|
@@ -304,20 +308,20 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
304
308
|
border-bottom-width: 1px;
|
|
305
309
|
border-bottom-style: solid;
|
|
306
310
|
border-color: inherit;
|
|
307
|
-
color: ${
|
|
311
|
+
color: ${wi.textColor};
|
|
308
312
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
309
|
-
max-width: calc(${
|
|
313
|
+
max-width: calc(${wi.labelMaxWidth} - 2 * (${wi.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
310
314
|
text-overflow: ellipsis;
|
|
311
|
-
${we(
|
|
312
|
-
${we(
|
|
315
|
+
${we(Jo.fontSize,wi.fontSize)};
|
|
316
|
+
${we(Jo.lineHeight,wi.fontSize)};
|
|
313
317
|
}
|
|
314
318
|
|
|
315
319
|
.ft-input-label--in-error .ft-input-label--text {
|
|
316
|
-
color: ${
|
|
320
|
+
color: ${wi.colorError}
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
.ft-input-label--disabled .ft-input-label--text {
|
|
320
|
-
color: ${
|
|
324
|
+
color: ${wi.disabledTextColor};
|
|
321
325
|
}
|
|
322
326
|
|
|
323
327
|
.ft-input-label--hidden-text {
|
|
@@ -334,19 +338,19 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
334
338
|
overflow: hidden;
|
|
335
339
|
white-space: nowrap;
|
|
336
340
|
text-overflow: ellipsis;
|
|
337
|
-
padding: ${
|
|
338
|
-
margin: calc(${
|
|
341
|
+
padding: ${wi.verticalSpacing} 4px;
|
|
342
|
+
margin: calc(${wi.verticalSpacing} * -1) 0;
|
|
339
343
|
max-width: 100%;
|
|
340
344
|
box-sizing: border-box;
|
|
341
345
|
}
|
|
342
346
|
|
|
343
347
|
.ft-input-label--raised .ft-input-label--text {
|
|
344
|
-
${we(
|
|
345
|
-
${we(
|
|
348
|
+
${we(Jo.fontSize,wi.raisedFontSize)};
|
|
349
|
+
${we(Jo.lineHeight,wi.raisedFontSize)};
|
|
346
350
|
}
|
|
347
351
|
|
|
348
352
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
349
|
-
top: ${
|
|
353
|
+
top: ${wi.verticalSpacing};
|
|
350
354
|
}
|
|
351
355
|
|
|
352
356
|
.ft-input-label--outlined .ft-input-label--text,
|
|
@@ -359,28 +363,28 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
359
363
|
.ft-input-label--outlined:before {
|
|
360
364
|
border-left-width: 1px;
|
|
361
365
|
border-left-style: solid;
|
|
362
|
-
border-radius: ${
|
|
366
|
+
border-radius: ${wi.borderRadiusS} 0 0 ${wi.borderRadiusS};
|
|
363
367
|
}
|
|
364
368
|
|
|
365
369
|
.ft-input-label--outlined:after {
|
|
366
370
|
border-right-width: 1px;
|
|
367
371
|
border-right-style: solid;
|
|
368
|
-
border-radius: 0 ${
|
|
372
|
+
border-radius: 0 ${wi.borderRadiusS} ${wi.borderRadiusS} 0;
|
|
369
373
|
}
|
|
370
374
|
|
|
371
375
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
|
|
372
376
|
padding: 2px 4px;
|
|
373
|
-
z-index: ${
|
|
374
|
-
background-color: ${
|
|
375
|
-
border-radius: ${
|
|
377
|
+
z-index: ${wi.raisedZIndex};
|
|
378
|
+
background-color: ${wi.colorSurface};
|
|
379
|
+
border-radius: ${wi.borderRadiusS};
|
|
376
380
|
top: calc((var(--ft-typography-caption-line-height) / -2) + 2px);
|
|
377
381
|
}
|
|
378
382
|
|
|
379
383
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
380
384
|
border-top: none;
|
|
381
385
|
}
|
|
382
|
-
`;var
|
|
383
|
-
<div class="${
|
|
386
|
+
`;var Ci=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ei extends De{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return re`
|
|
387
|
+
<div class="${lo(t)}">
|
|
384
388
|
${this.text?re`
|
|
385
389
|
<div class="ft-input-label--text ft-typography--caption">
|
|
386
390
|
<span class="ft-input-label--floating-text">${this.text}</span>
|
|
@@ -388,7 +392,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
388
392
|
</div>
|
|
389
393
|
`:null}
|
|
390
394
|
</div>
|
|
391
|
-
`}}
|
|
395
|
+
`}}Ei.elementDefinitions={},Ei.styles=[yi,Ni],Ci([N({type:String})],Ei.prototype,"text",void 0),Ci([N({type:Boolean})],Ei.prototype,"raised",void 0),Ci([N({type:Boolean})],Ei.prototype,"outlined",void 0),Ci([N({type:Boolean})],Ei.prototype,"disabled",void 0),Ci([N({type:Boolean})],Ei.prototype,"error",void 0),I("ft-input-label")(Ei);const ki=Se.extend("--ft-ripple-color","",Re.colorContent),Ri={color:ki,backgroundColor:Se.extend("--ft-ripple-background-color","",ki),opacityContentOnSurfacePressed:Se.external(Re.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:Se.external(Re.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:Se.external(Re.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:Se.external(Re.opacityContentOnSurfaceSelected,"Design system"),borderRadius:Se.create("--ft-ripple-border-radius","","SIZE","0px")},Ui=Se.extend("--ft-ripple-color","",Re.colorPrimary),Ii=Ui,Wi=Se.extend("--ft-ripple-background-color","",Ui),Li=Se.extend("--ft-ripple-color","",Re.colorSecondary),zi=Li,Zi=Se.extend("--ft-ripple-background-color","",Li),Ki=$t`
|
|
392
396
|
:host {
|
|
393
397
|
display: contents;
|
|
394
398
|
}
|
|
@@ -401,7 +405,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
401
405
|
|
|
402
406
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
403
407
|
overflow: hidden;
|
|
404
|
-
border-radius: ${
|
|
408
|
+
border-radius: ${Ri.borderRadius};
|
|
405
409
|
}
|
|
406
410
|
|
|
407
411
|
.ft-ripple .ft-ripple--background,
|
|
@@ -435,27 +439,27 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
435
439
|
}
|
|
436
440
|
|
|
437
441
|
.ft-ripple .ft-ripple--background {
|
|
438
|
-
background-color: ${
|
|
442
|
+
background-color: ${Ri.backgroundColor};
|
|
439
443
|
}
|
|
440
444
|
|
|
441
445
|
.ft-ripple .ft-ripple--effect {
|
|
442
|
-
background-color: ${
|
|
446
|
+
background-color: ${Ri.color};
|
|
443
447
|
}
|
|
444
448
|
|
|
445
449
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
446
|
-
background-color: ${
|
|
450
|
+
background-color: ${Zi};
|
|
447
451
|
}
|
|
448
452
|
|
|
449
453
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
450
|
-
background-color: ${
|
|
454
|
+
background-color: ${zi};
|
|
451
455
|
}
|
|
452
456
|
|
|
453
457
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
454
|
-
background-color: ${
|
|
458
|
+
background-color: ${Wi};
|
|
455
459
|
}
|
|
456
460
|
|
|
457
461
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
458
|
-
background-color: ${
|
|
462
|
+
background-color: ${Ii};
|
|
459
463
|
}
|
|
460
464
|
|
|
461
465
|
.ft-ripple .ft-ripple--background {
|
|
@@ -485,33 +489,33 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
485
489
|
}
|
|
486
490
|
|
|
487
491
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
488
|
-
opacity: ${
|
|
492
|
+
opacity: ${Ri.opacityContentOnSurfaceHover};
|
|
489
493
|
}
|
|
490
494
|
|
|
491
495
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
492
|
-
opacity: ${
|
|
496
|
+
opacity: ${Ri.opacityContentOnSurfaceSelected};
|
|
493
497
|
}
|
|
494
498
|
|
|
495
499
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
496
|
-
opacity: ${
|
|
500
|
+
opacity: ${Ri.opacityContentOnSurfaceFocused};
|
|
497
501
|
}
|
|
498
502
|
|
|
499
503
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
500
|
-
opacity: ${
|
|
504
|
+
opacity: ${Ri.opacityContentOnSurfacePressed};
|
|
501
505
|
transform: translate(-50%, -50%) scale(1);
|
|
502
506
|
}
|
|
503
|
-
`;var
|
|
507
|
+
`;var Fi,Di,Bi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ai extends De{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new 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.setupDebouncer=new e(10),this.moveRipple=t=>{var e,o;let{x:i,y:r}=this.getCoordinates(t),n=null!==(o=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==o?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=i?i-n.x:n.width/2),this.originY=Math.round(null!=r?r-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(null==t?void 0:t.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return re`
|
|
504
508
|
<style>
|
|
505
509
|
.ft-ripple .ft-ripple--effect {
|
|
506
510
|
left: ${this.originX}px;
|
|
507
511
|
top: ${this.originY}px;
|
|
508
512
|
}
|
|
509
513
|
</style>
|
|
510
|
-
<div class="${
|
|
514
|
+
<div class="${lo(t)}">
|
|
511
515
|
<div class="ft-ripple--background"></div>
|
|
512
516
|
<div class="ft-ripple--effect"></div>
|
|
513
517
|
</div>
|
|
514
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),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",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Bi.elementDefinitions={},Bi.styles=Zi,Di([N({type:Boolean})],Bi.prototype,"primary",void 0),Di([N({type:Boolean})],Bi.prototype,"secondary",void 0),Di([N({type:Boolean})],Bi.prototype,"unbounded",void 0),Di([N({type:Boolean})],Bi.prototype,"activated",void 0),Di([N({type:Boolean})],Bi.prototype,"selected",void 0),Di([N({type:Boolean})],Bi.prototype,"disabled",void 0),Di([C()],Bi.prototype,"hovered",void 0),Di([C()],Bi.prototype,"focused",void 0),Di([C()],Bi.prototype,"pressed",void 0),Di([C()],Bi.prototype,"rippling",void 0),Di([C()],Bi.prototype,"originX",void 0),Di([C()],Bi.prototype,"originY",void 0),Di([k(".ft-ripple")],Bi.prototype,"ripple",void 0),Di([k(".ft-ripple--effect")],Bi.prototype,"rippleEffect",void 0),I("ft-ripple")(Bi),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Ki||(Ki={})),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=""}(Fi||(Fi={})),new Map([...["abw"].map((t=>[t,Fi.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,Fi.AUDIO])),...["avi"].map((t=>[t,Fi.AVI])),...["chm","xhs"].map((t=>[t,Fi.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,Fi.CODE])),...["csv"].map((t=>[t,Fi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Fi.DITA])),...["epub"].map((t=>[t,Fi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Fi.EXCEL])),...["flac"].map((t=>[t,Fi.FLAC])),...["gif"].map((t=>[t,Fi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Fi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Fi.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,Fi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Fi.JPEG])),...["json"].map((t=>[t,Fi.JSON])),...["m4a","m4p"].map((t=>[t,Fi.M4A])),...["mov","qt"].map((t=>[t,Fi.MOV])),...["mp3"].map((t=>[t,Fi.MP3])),...["mp4","m4v"].map((t=>[t,Fi.MP4])),...["ogg","oga"].map((t=>[t,Fi.OGG])),...["pdf","ps"].map((t=>[t,Fi.PDF])),...["png"].map((t=>[t,Fi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Fi.POWERPOINT])),...["rar"].map((t=>[t,Fi.RAR])),...["stp"].map((t=>[t,Fi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Fi.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,Fi.VIDEO])),...["wav"].map((t=>[t,Fi.WAV])),...["wma"].map((t=>[t,Fi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Fi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Fi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Fi.YAML])),...["zip"].map((t=>[t,Fi.ZIP]))]);const Ai={size:Se.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Se.extend("--ft-icon-fluid-topics-font-family","",Se.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Se.extend("--ft-icon-file-format-font-family","",Se.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Se.extend("--ft-icon-material-font-family","",Se.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Se.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Mi=$t`
|
|
518
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(o=this.target)||void 0===o||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const o=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;o&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:o)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},o=e("mouseup","contextmenu"),i=e("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",o),t.addEventListener("touchstart",i),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),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",o),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,o=t;let i,r;return null!=e.x?({x:i,y:r}=e):null!=o.touches&&(i=o.touches[0].clientX,r=o.touches[0].clientY),{x:i,y:r}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}Ai.elementDefinitions={},Ai.styles=Ki,Bi([N({type:Boolean})],Ai.prototype,"primary",void 0),Bi([N({type:Boolean})],Ai.prototype,"secondary",void 0),Bi([N({type:Boolean})],Ai.prototype,"unbounded",void 0),Bi([N({type:Boolean})],Ai.prototype,"activated",void 0),Bi([N({type:Boolean})],Ai.prototype,"selected",void 0),Bi([N({type:Boolean})],Ai.prototype,"disabled",void 0),Bi([C()],Ai.prototype,"hovered",void 0),Bi([C()],Ai.prototype,"focused",void 0),Bi([C()],Ai.prototype,"pressed",void 0),Bi([C()],Ai.prototype,"rippling",void 0),Bi([C()],Ai.prototype,"originX",void 0),Bi([C()],Ai.prototype,"originY",void 0),Bi([k(".ft-ripple")],Ai.prototype,"ripple",void 0),Bi([k(".ft-ripple--effect")],Ai.prototype,"rippleEffect",void 0),I("ft-ripple")(Ai),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(Fi||(Fi={})),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=""}(Di||(Di={})),new Map([...["abw"].map((t=>[t,Di.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,Di.AUDIO])),...["avi"].map((t=>[t,Di.AVI])),...["chm","xhs"].map((t=>[t,Di.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,Di.CODE])),...["csv"].map((t=>[t,Di.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Di.DITA])),...["epub"].map((t=>[t,Di.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Di.EXCEL])),...["flac"].map((t=>[t,Di.FLAC])),...["gif"].map((t=>[t,Di.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Di.GZIP])),...["html","htm","xhtml"].map((t=>[t,Di.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,Di.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Di.JPEG])),...["json"].map((t=>[t,Di.JSON])),...["m4a","m4p"].map((t=>[t,Di.M4A])),...["mov","qt"].map((t=>[t,Di.MOV])),...["mp3"].map((t=>[t,Di.MP3])),...["mp4","m4v"].map((t=>[t,Di.MP4])),...["ogg","oga"].map((t=>[t,Di.OGG])),...["pdf","ps"].map((t=>[t,Di.PDF])),...["png"].map((t=>[t,Di.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Di.POWERPOINT])),...["rar"].map((t=>[t,Di.RAR])),...["stp"].map((t=>[t,Di.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Di.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,Di.VIDEO])),...["wav"].map((t=>[t,Di.WAV])),...["wma"].map((t=>[t,Di.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Di.WORD])),...["xml","xsl","rdf"].map((t=>[t,Di.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Di.YAML])),...["zip"].map((t=>[t,Di.ZIP]))]);const Mi={size:Se.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Se.extend("--ft-icon-fluid-topics-font-family","",Se.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Se.extend("--ft-icon-file-format-font-family","",Se.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Se.extend("--ft-icon-material-font-family","",Se.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Se.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Pi=$t`
|
|
515
519
|
:host, i.ft-icon {
|
|
516
520
|
display: inline-flex;
|
|
517
521
|
align-items: center;
|
|
@@ -520,14 +524,14 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
520
524
|
}
|
|
521
525
|
|
|
522
526
|
:host {
|
|
523
|
-
width: ${
|
|
524
|
-
height: ${
|
|
527
|
+
width: ${Mi.size};
|
|
528
|
+
height: ${Mi.size};
|
|
525
529
|
}
|
|
526
530
|
|
|
527
531
|
i.ft-icon {
|
|
528
532
|
width: 100%;
|
|
529
533
|
height: 100%;
|
|
530
|
-
font-size: ${
|
|
534
|
+
font-size: ${Mi.size};
|
|
531
535
|
line-height: 1;
|
|
532
536
|
font-weight: normal;
|
|
533
537
|
text-transform: none;
|
|
@@ -538,33 +542,33 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
538
542
|
text-rendering: auto;
|
|
539
543
|
-webkit-font-smoothing: antialiased;
|
|
540
544
|
-moz-osx-font-smoothing: grayscale;
|
|
541
|
-
vertical-align: ${
|
|
545
|
+
vertical-align: ${Mi.verticalAlign};
|
|
542
546
|
}
|
|
543
547
|
|
|
544
548
|
i.ft-icon.ft-icon--fluid-topics {
|
|
545
|
-
font-family: ${
|
|
549
|
+
font-family: ${Mi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
546
550
|
|
|
547
551
|
/* Ugly fix because font is broken */
|
|
548
|
-
font-size: calc(0.75 * ${
|
|
549
|
-
line-height: ${
|
|
552
|
+
font-size: calc(0.75 * ${Mi.size});
|
|
553
|
+
line-height: ${Mi.size};
|
|
550
554
|
position: relative;
|
|
551
555
|
top: -4%;
|
|
552
556
|
justify-content: center;
|
|
553
557
|
}
|
|
554
558
|
|
|
555
559
|
.ft-icon--file-format {
|
|
556
|
-
font-family: ${
|
|
560
|
+
font-family: ${Mi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
557
561
|
}
|
|
558
562
|
|
|
559
563
|
.ft-icon--material {
|
|
560
|
-
font-family: ${
|
|
564
|
+
font-family: ${Mi.materialFontFamily}, "Material Icons", sans-serif;
|
|
561
565
|
}
|
|
562
|
-
`;var
|
|
566
|
+
`;var Hi;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Hi||(Hi={}));var ji=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ti extends De{constructor(){super(...arguments),this.resolvedIcon=ae}render(){const t=this.variant&&Object.values(Hi).includes(this.variant)?this.variant:Hi.fluid_topics,e=t!==Hi.material||!!this.value;return re`
|
|
563
567
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
564
|
-
${
|
|
568
|
+
${so(this.resolvedIcon)}
|
|
565
569
|
<slot ?hidden=${e}></slot>
|
|
566
570
|
</i>
|
|
567
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case
|
|
571
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Hi.file_format:this.resolvedIcon=null!==(t=Di[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Hi.material:this.resolvedIcon=this.value||ae;break;default:this.resolvedIcon=null!==(e=Fi[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ti.elementDefinitions={},Ti.styles=Pi,ji([N()],Ti.prototype,"variant",void 0),ji([N()],Ti.prototype,"value",void 0),ji([C()],Ti.prototype,"resolvedIcon",void 0),ji([k("slot")],Ti.prototype,"slottedContent",void 0),I("ft-icon")(Ti);const _i={labelSize:Se.create("--ft-select-label-size","","SIZE","11px"),selectedOptionSize:Se.create("--ft-select-selected-option-size","","SIZE","14px"),verticalSpacing:Se.create("--ft-select-vertical-spacing","","SIZE","4px"),horizontalSpacing:Se.create("--ft-select-horizontal-spacing","","SIZE","16px"),optionsHeight:Se.create("--ft-select-options-height","","SIZE","unset"),selectedOptionColor:Se.extend("--ft-select-selected-option-color","",Re.colorOnSurface),helperColor:Se.extend("--ft-select-helper-color","",Re.colorOnSurfaceMedium),optionsColor:Se.extend("--ft-select-options-color","",Re.colorOnSurface),optionsZIndex:Se.create("--ft-select-options-z-index","","NUMBER","3"),colorSurface:Se.external(Re.colorSurface,"Design system"),colorOnSurfaceDisabled:Se.external(Re.colorOnSurfaceDisabled,"Design system"),colorPrimary:Se.external(Re.colorPrimary,"Design system"),borderRadiusS:Se.external(Re.borderRadiusS,"Design system"),elevation02:Se.external(Re.elevation02,"Design system"),colorError:Se.external(Re.colorError,"Design system")},Gi=$t`
|
|
568
572
|
*:focus {
|
|
569
573
|
outline: none;
|
|
570
574
|
}
|
|
@@ -578,7 +582,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
578
582
|
.ft-select--main-panel {
|
|
579
583
|
position: relative;
|
|
580
584
|
display: flex;
|
|
581
|
-
height: calc(4 * ${
|
|
585
|
+
height: calc(4 * ${_i.verticalSpacing} + ${_i.labelSize} + ${_i.selectedOptionSize});
|
|
582
586
|
}
|
|
583
587
|
|
|
584
588
|
.ft-select--input-panel {
|
|
@@ -587,17 +591,17 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
587
591
|
display: flex;
|
|
588
592
|
align-items: center;
|
|
589
593
|
overflow: hidden;
|
|
590
|
-
padding-left: ${
|
|
591
|
-
padding-right: ${
|
|
594
|
+
padding-left: ${_i.horizontalSpacing};
|
|
595
|
+
padding-right: ${_i.horizontalSpacing};
|
|
592
596
|
gap: 8px;
|
|
593
|
-
color: ${
|
|
594
|
-
${we(
|
|
597
|
+
color: ${_i.selectedOptionColor};
|
|
598
|
+
${we(Ri.color,_i.selectedOptionColor)};
|
|
595
599
|
}
|
|
596
600
|
|
|
597
601
|
.ft-select--input-panel,
|
|
598
602
|
.ft-select--option {
|
|
599
|
-
${we(
|
|
600
|
-
${we(
|
|
603
|
+
${we(Ri.opacityContentOnSurfaceHover,"0.08")};
|
|
604
|
+
${we(Ri.opacityContentOnSurfacePressed,"0.04")};
|
|
601
605
|
}
|
|
602
606
|
|
|
603
607
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -607,7 +611,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
607
611
|
|
|
608
612
|
.ft-select--disabled .ft-select--input-panel,
|
|
609
613
|
.ft-select--disabled .ft-select--option {
|
|
610
|
-
color: ${
|
|
614
|
+
color: ${_i.colorOnSurfaceDisabled};
|
|
611
615
|
}
|
|
612
616
|
|
|
613
617
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -616,20 +620,20 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
616
620
|
}
|
|
617
621
|
|
|
618
622
|
ft-input-label {
|
|
619
|
-
${we(
|
|
620
|
-
${we(
|
|
621
|
-
${we(
|
|
622
|
-
${we(
|
|
623
|
-
${we(
|
|
623
|
+
${we(wi.fontSize,_i.selectedOptionSize)};
|
|
624
|
+
${we(wi.raisedFontSize,_i.labelSize)};
|
|
625
|
+
${we(wi.verticalSpacing,_i.verticalSpacing)};
|
|
626
|
+
${we(wi.horizontalSpacing,_i.horizontalSpacing)};
|
|
627
|
+
${we(wi.labelMaxWidth,`calc(100% - ${Mi.size} - 8px)`)};
|
|
624
628
|
}
|
|
625
629
|
|
|
626
630
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
627
|
-
color: ${
|
|
631
|
+
color: ${_i.colorPrimary};
|
|
628
632
|
}
|
|
629
633
|
|
|
630
634
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
631
|
-
${we(
|
|
632
|
-
${we(
|
|
635
|
+
${we(wi.borderColor,_i.colorPrimary)};
|
|
636
|
+
${we(wi.textColor,_i.colorPrimary)};
|
|
633
637
|
}
|
|
634
638
|
|
|
635
639
|
.ft-select--selected-option {
|
|
@@ -639,12 +643,12 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
639
643
|
overflow: hidden;
|
|
640
644
|
white-space: nowrap;
|
|
641
645
|
text-overflow: ellipsis;
|
|
642
|
-
${we(
|
|
643
|
-
${we(
|
|
646
|
+
${we(Ho.fontSize,_i.selectedOptionSize)};
|
|
647
|
+
${we(Ho.lineHeight,_i.selectedOptionSize)};
|
|
644
648
|
}
|
|
645
649
|
|
|
646
650
|
.ft-select--in-error .ft-select--selected-option {
|
|
647
|
-
color: ${
|
|
651
|
+
color: ${_i.colorError};
|
|
648
652
|
}
|
|
649
653
|
|
|
650
654
|
ft-icon {
|
|
@@ -656,16 +660,16 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
656
660
|
}
|
|
657
661
|
|
|
658
662
|
.ft-select--filled .ft-select--input-panel {
|
|
659
|
-
border-radius: ${
|
|
663
|
+
border-radius: ${_i.borderRadiusS} ${_i.borderRadiusS} 0 0;
|
|
660
664
|
}
|
|
661
665
|
|
|
662
666
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
663
667
|
align-self: stretch;
|
|
664
|
-
padding-top: calc(${
|
|
668
|
+
padding-top: calc(${_i.labelSize} + 2 * ${_i.verticalSpacing});
|
|
665
669
|
}
|
|
666
670
|
|
|
667
671
|
.ft-select--outlined .ft-select--input-panel {
|
|
668
|
-
border-radius: ${
|
|
672
|
+
border-radius: ${_i.borderRadiusS};
|
|
669
673
|
}
|
|
670
674
|
|
|
671
675
|
.ft-select--options {
|
|
@@ -674,10 +678,10 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
674
678
|
top: 100%;
|
|
675
679
|
left: 0;
|
|
676
680
|
right: 0;
|
|
677
|
-
color: ${
|
|
678
|
-
background: ${
|
|
679
|
-
z-index: ${
|
|
680
|
-
box-shadow: ${
|
|
681
|
+
color: ${_i.optionsColor};
|
|
682
|
+
background: ${_i.colorSurface};
|
|
683
|
+
z-index: ${_i.optionsZIndex};
|
|
684
|
+
box-shadow: ${_i.elevation02};
|
|
681
685
|
}
|
|
682
686
|
|
|
683
687
|
.ft-select--fixed .ft-select--options {
|
|
@@ -688,13 +692,13 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
688
692
|
|
|
689
693
|
.ft-select--options-displayed .ft-select--options {
|
|
690
694
|
display: block;
|
|
691
|
-
max-height: ${
|
|
695
|
+
max-height: ${_i.optionsHeight};
|
|
692
696
|
overflow-y: auto;
|
|
693
697
|
}
|
|
694
698
|
|
|
695
699
|
.ft-select--option {
|
|
696
700
|
position: relative;
|
|
697
|
-
padding: 4px ${
|
|
701
|
+
padding: 4px ${_i.horizontalSpacing};
|
|
698
702
|
min-height: 32px;
|
|
699
703
|
display: flex;
|
|
700
704
|
align-items: center;
|
|
@@ -706,15 +710,15 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
706
710
|
}
|
|
707
711
|
|
|
708
712
|
.ft-select--helper-text {
|
|
709
|
-
padding: 0 ${
|
|
710
|
-
color: ${
|
|
713
|
+
padding: 0 ${_i.horizontalSpacing};
|
|
714
|
+
color: ${_i.helperColor};
|
|
711
715
|
}
|
|
712
716
|
|
|
713
717
|
.ft-select--in-error .ft-select--helper-text {
|
|
714
|
-
color: ${
|
|
718
|
+
color: ${_i.colorError};
|
|
715
719
|
}
|
|
716
|
-
`;var
|
|
717
|
-
<div class="${
|
|
720
|
+
`;var Vi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Yi extends De{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return re``}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Yi.elementDefinitions={},Vi([N({type:String})],Yi.prototype,"label",void 0),Vi([N({type:Object,converter:t=>t})],Yi.prototype,"value",void 0),Vi([N({type:Boolean,reflect:!0})],Yi.prototype,"selected",void 0);class Ji extends De{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,i,r;let n=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const s=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,l={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":n,"ft-select--has-option-selected":s,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return re`
|
|
721
|
+
<div class="${lo(l)}" part="container">
|
|
718
722
|
<div class="ft-select--main-panel" part="main-panel">
|
|
719
723
|
<ft-input-label text="${this.label}"
|
|
720
724
|
part="label"
|
|
@@ -741,7 +745,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
741
745
|
part="options"
|
|
742
746
|
@keydown=${this.onOptionsKeyDown}
|
|
743
747
|
innerrole="listbox">
|
|
744
|
-
${
|
|
748
|
+
${no(this.options,(t=>t.value),(t=>this.renderOption(t)))}
|
|
745
749
|
</div>
|
|
746
750
|
</div>
|
|
747
751
|
${this.helper?re`
|
|
@@ -752,7 +756,7 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
752
756
|
@option-change=${this.updateOptionsFromSlot}
|
|
753
757
|
></slot>
|
|
754
758
|
`}renderOption(t){let e=this.selectedOption===t;return re`
|
|
755
|
-
<div class="${
|
|
759
|
+
<div class="${lo({"ft-select--option":!0,"ft-select--option-selected":e,"ft-typography--body2":!0})}"
|
|
756
760
|
part="option"
|
|
757
761
|
tabindex="0"
|
|
758
762
|
data-value="${t.value}"
|
|
@@ -761,13 +765,13 @@ let no=class extends Je{constructor(t){if(super(t),this.et=tt,t.type!==Ve)throw
|
|
|
761
765
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
762
766
|
<span>${t.label}</span>
|
|
763
767
|
</div>
|
|
764
|
-
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,o,i,r,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!U(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}
|
|
768
|
+
`}update(t){super.update(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,o;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(o=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===o||o.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let o=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));o&&o.length>0&&(this.options=o)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,o,i,r,n;let a;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),a=null!==(i=null===(o=this.focusedOption)||void 0===o?void 0:o.previousElementSibling)&&void 0!==i?i:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),a=null!==(n=null===(r=this.focusedOption)||void 0===r?void 0:r.nextElementSibling)&&void 0!==n?n:this.firstOption}null==a||a.focus()}onOptionKeyDown(t,e){var o;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(o=this.mainPanel)||void 0===o||o.focus())}selectOption(t){var e,o;if(!U(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ji.elementDefinitions={"ft-input-label":Ei,"ft-typography":Si,"ft-ripple":Ai,"ft-icon":Ti},Ji.styles=[gi,yi,Gi],Vi([N({type:String})],Ji.prototype,"label",void 0),Vi([N({type:String})],Ji.prototype,"helper",void 0),Vi([N({type:Boolean})],Ji.prototype,"outlined",void 0),Vi([N({type:Boolean})],Ji.prototype,"disabled",void 0),Vi([N({type:Boolean})],Ji.prototype,"error",void 0),Vi([N({type:Boolean})],Ji.prototype,"fixedMenuPosition",void 0),Vi([N({type:Array})],Ji.prototype,"options",void 0),Vi([C()],Ji.prototype,"selectedOption",void 0),Vi([C()],Ji.prototype,"optionsDisplayed",void 0),Vi([C()],Ji.prototype,"focusOptions",void 0),Vi([k(".ft-select")],Ji.prototype,"container",void 0),Vi([k(".ft-select--options")],Ji.prototype,"optionsMenu",void 0),Vi([k(".ft-select--input-panel")],Ji.prototype,"mainPanel",void 0),Vi([k(".ft-select--option:first-child")],Ji.prototype,"firstOption",void 0),Vi([k(".ft-select--option:focus")],Ji.prototype,"focusedOption",void 0),Vi([k(".ft-select--option.ft-select--option-selected")],Ji.prototype,"selectedOptionElement",void 0),Vi([k(".ft-select--option:last-child")],Ji.prototype,"lastOption",void 0),Vi([k("slot")],Ji.prototype,"optionsSlot",void 0),I("ft-select")(Ji),I("ft-select-option")(Yi);
|
|
765
769
|
/**
|
|
766
770
|
* @license
|
|
767
771
|
* Copyright 2018 Google LLC
|
|
768
772
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
769
773
|
*/
|
|
770
|
-
const
|
|
774
|
+
const qi={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:Se.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:Se.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:Se.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:Se.extend("--ft-text-field-helper-color","",Re.colorOnSurfaceMedium),colorPrimary:Se.external(Re.colorPrimary,"Design system"),colorOnSurface:Se.external(Re.colorOnSurface,"Design system"),colorOnSurfaceDisabled:Se.external(Re.colorOnSurfaceDisabled,"Design system"),borderRadiusS:Se.external(Re.borderRadiusS,"Design system"),colorError:Se.external(Re.colorError,"Design system"),prefixColor:Se.extend("--ft-text-field-prefix-color","",Re.colorOnSurfaceMedium),iconColor:Se.extend("--ft-text-field-icon-color","",Re.colorOnSurfaceMedium),floatingZIndex:Se.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),colorSurface:Se.external(Re.colorSurface,"Design system"),colorOutline:Se.external(Re.colorOutline,"Design system"),elevation02:Se.external(Re.elevation02,"Design system"),suggestSize:Se.create("--ft-text-field-suggest-size","","SIZE","300px")},Xi=$t`
|
|
771
775
|
*:focus {
|
|
772
776
|
outline: none;
|
|
773
777
|
}
|
|
@@ -780,16 +784,16 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
780
784
|
}
|
|
781
785
|
|
|
782
786
|
ft-input-label {
|
|
783
|
-
${we(
|
|
784
|
-
${we(
|
|
785
|
-
${we(
|
|
786
|
-
${we(
|
|
787
|
+
${we(wi.fontSize,qi.fontSize)};
|
|
788
|
+
${we(wi.raisedFontSize,qi.labelSize)};
|
|
789
|
+
${we(wi.verticalSpacing,qi.verticalSpacing)};
|
|
790
|
+
${we(wi.horizontalSpacing,qi.horizontalSpacing)};
|
|
787
791
|
}
|
|
788
792
|
|
|
789
793
|
.ft-text-field--main-panel {
|
|
790
794
|
position: relative;
|
|
791
795
|
display: flex;
|
|
792
|
-
height: calc(4 * ${
|
|
796
|
+
height: calc(4 * ${qi.verticalSpacing} + ${qi.labelSize} + ${qi.fontSize});
|
|
793
797
|
}
|
|
794
798
|
|
|
795
799
|
.ft-text-field--input-panel {
|
|
@@ -798,24 +802,24 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
798
802
|
display: flex;
|
|
799
803
|
align-items: center;
|
|
800
804
|
overflow: hidden;
|
|
801
|
-
padding: 0 ${
|
|
805
|
+
padding: 0 ${qi.horizontalSpacing};
|
|
802
806
|
|
|
803
|
-
${we(
|
|
804
|
-
${we(
|
|
807
|
+
${we(Ho.fontSize,qi.fontSize)};
|
|
808
|
+
${we(Ho.lineHeight,qi.fontSize)};
|
|
805
809
|
}
|
|
806
810
|
|
|
807
811
|
.ft-text-field--input-panel ft-ripple {
|
|
808
|
-
${we(
|
|
809
|
-
${we(
|
|
812
|
+
${we(Ri.opacityContentOnSurfaceHover,"0.08")};
|
|
813
|
+
${we(Ri.opacityContentOnSurfacePressed,"0.04")};
|
|
810
814
|
}
|
|
811
815
|
|
|
812
816
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
813
817
|
align-items: flex-end;
|
|
814
|
-
padding: 0 ${
|
|
818
|
+
padding: 0 ${qi.horizontalSpacing} ${qi.verticalSpacing} ${qi.horizontalSpacing};
|
|
815
819
|
}
|
|
816
820
|
|
|
817
821
|
.ft-text-field--prefix {
|
|
818
|
-
color: ${
|
|
822
|
+
color: ${qi.prefixColor};
|
|
819
823
|
margin-right: 2px;
|
|
820
824
|
flex-shrink: 1;
|
|
821
825
|
overflow: hidden;
|
|
@@ -834,15 +838,15 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
834
838
|
flex-shrink: 1;
|
|
835
839
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
836
840
|
|
|
837
|
-
color: ${
|
|
838
|
-
padding: calc(2 * ${
|
|
841
|
+
color: ${qi.colorOnSurface};
|
|
842
|
+
padding: calc(2 * ${qi.verticalSpacing}) 0;
|
|
839
843
|
border: none;
|
|
840
844
|
background: none;
|
|
841
845
|
}
|
|
842
846
|
|
|
843
847
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
844
848
|
padding-bottom: 0;
|
|
845
|
-
padding-top: calc(${
|
|
849
|
+
padding-top: calc(${qi.labelSize} + 2 * ${qi.verticalSpacing});
|
|
846
850
|
}
|
|
847
851
|
|
|
848
852
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -851,37 +855,37 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
851
855
|
}
|
|
852
856
|
|
|
853
857
|
.ft-text-field--disabled .ft-text-field--input {
|
|
854
|
-
color: ${
|
|
858
|
+
color: ${qi.colorOnSurfaceDisabled};
|
|
855
859
|
}
|
|
856
860
|
|
|
857
861
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
858
|
-
${we(
|
|
859
|
-
${we(
|
|
862
|
+
${we(wi.borderColor,qi.colorPrimary)};
|
|
863
|
+
${we(wi.textColor,qi.colorPrimary)};
|
|
860
864
|
}
|
|
861
865
|
|
|
862
866
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
863
|
-
border-radius: ${
|
|
867
|
+
border-radius: ${qi.borderRadiusS} ${qi.borderRadiusS} 0 0;
|
|
864
868
|
}
|
|
865
869
|
|
|
866
870
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
867
|
-
border-radius: ${
|
|
871
|
+
border-radius: ${qi.borderRadiusS};
|
|
868
872
|
}
|
|
869
873
|
|
|
870
874
|
.ft-text-field--helper-text {
|
|
871
|
-
padding: 0 12px 0 ${
|
|
872
|
-
color: ${
|
|
875
|
+
padding: 0 12px 0 ${qi.horizontalSpacing};
|
|
876
|
+
color: ${qi.helperColor};
|
|
873
877
|
}
|
|
874
878
|
|
|
875
879
|
.ft-text-field--in-error .ft-text-field--input,
|
|
876
880
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
877
881
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
878
|
-
color: ${
|
|
882
|
+
color: ${qi.colorError};
|
|
879
883
|
}
|
|
880
884
|
|
|
881
885
|
.ft-text-field--icon {
|
|
882
886
|
align-self: center;
|
|
883
887
|
margin-left: 8px;
|
|
884
|
-
color: ${
|
|
888
|
+
color: ${qi.iconColor};
|
|
885
889
|
}
|
|
886
890
|
|
|
887
891
|
.ft-text-field--container {
|
|
@@ -894,13 +898,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
894
898
|
position: absolute;
|
|
895
899
|
left: 0;
|
|
896
900
|
right: 0;
|
|
897
|
-
z-index: ${
|
|
898
|
-
background: ${
|
|
899
|
-
border: 1px solid ${
|
|
900
|
-
border-radius: 0 0 ${
|
|
901
|
-
box-shadow: ${
|
|
901
|
+
z-index: ${qi.floatingZIndex};
|
|
902
|
+
background: ${qi.colorSurface};
|
|
903
|
+
border: 1px solid ${qi.colorOutline};
|
|
904
|
+
border-radius: 0 0 ${qi.borderRadiusS} ${qi.borderRadiusS};
|
|
905
|
+
box-shadow: ${qi.elevation02};
|
|
902
906
|
outline: none;
|
|
903
|
-
max-height: ${
|
|
907
|
+
max-height: ${qi.suggestSize};
|
|
904
908
|
overflow-y: auto;
|
|
905
909
|
}
|
|
906
910
|
|
|
@@ -917,14 +921,14 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
917
921
|
}
|
|
918
922
|
|
|
919
923
|
.ft-text-field--with-icon {
|
|
920
|
-
${we(
|
|
924
|
+
${we(wi.labelMaxWidth,`calc(100% - ${Mi.size} - ${wi.horizontalSpacing})`)};
|
|
921
925
|
}
|
|
922
926
|
|
|
923
927
|
.ft-text-field--with-password ft-icon:hover {
|
|
924
928
|
cursor: pointer;
|
|
925
929
|
}
|
|
926
|
-
`;var
|
|
927
|
-
<div class="${
|
|
930
|
+
`;var Qi=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class tr extends(He(De,"textbox")){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.passwordHiddenIcon=Fi.EYE_SLASH,this.passwordRevealedIcon=Fi.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.hidePassword=!0,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){const e=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",e)}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":this.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.password};return re`
|
|
931
|
+
<div class="${lo(t)}">
|
|
928
932
|
<div class="ft-text-field--main-panel"
|
|
929
933
|
@keydown=${this.handleKeyboardNavigation}
|
|
930
934
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -974,7 +978,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
974
978
|
.variant=${this.iconVariant}
|
|
975
979
|
.value=${this.icon}
|
|
976
980
|
@click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
|
|
977
|
-
`:ae}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,o;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),i=null===(o=this.suggestionsContainer)||void 0===o?void 0:o.getBoundingClientRect();t&&i&&(this.suggestionsOnTop=t.bottom+i.height>window.innerHeight&&t.top-i.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}
|
|
981
|
+
`:ae}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,o;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),i=null===(o=this.suggestionsContainer)||void 0===o?void 0:o.getBoundingClientRect();t&&i&&(this.suggestionsOnTop=t.bottom+i.height>window.innerHeight&&t.top-i.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const o=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(o,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const o=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let i;i="ArrowDown"===t.key?o<this.visibleSuggestions.length-1?o+1:0:o>0?o-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[i])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}tr.elementDefinitions={"ft-input-label":Ei,"ft-ripple":Ai,"ft-typography":Si,"ft-icon":Ti},tr.styles=[ui,Xi],Qi([N()],tr.prototype,"label",void 0),Qi([N({noAccessor:!0})],tr.prototype,"value",null),Qi([C()],tr.prototype,"dispatchedValue",void 0),Qi([N()],tr.prototype,"helper",void 0),Qi([N({type:Boolean})],tr.prototype,"outlined",void 0),Qi([N({type:Boolean})],tr.prototype,"disabled",void 0),Qi([N({type:Boolean})],tr.prototype,"error",void 0),Qi([N()],tr.prototype,"prefix",void 0),Qi([N()],tr.prototype,"icon",void 0),Qi([N()],tr.prototype,"passwordHiddenIcon",void 0),Qi([N()],tr.prototype,"passwordRevealedIcon",void 0),Qi([N()],tr.prototype,"iconVariant",void 0),Qi([N({type:Boolean})],tr.prototype,"filterSuggestions",void 0),Qi([N({type:Number})],tr.prototype,"maxLength",void 0),Qi([N({type:Boolean})],tr.prototype,"password",void 0),Qi([C()],tr.prototype,"focused",void 0),Qi([C()],tr.prototype,"hidePassword",void 0),Qi([C()],tr.prototype,"suggestionsOnTop",void 0),Qi([C()],tr.prototype,"hideSuggestions",void 0),Qi([C()],tr.prototype,"visibleSuggestions",void 0),Qi([k(".ft-text-field--main-panel")],tr.prototype,"mainPanel",void 0),Qi([k(".ft-text-field--input")],tr.prototype,"input",void 0),Qi([k(".ft-text-field--suggestions")],tr.prototype,"suggestionsContainer",void 0),Qi([function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return E(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}({selector:"ft-text-field-suggestion"})],tr.prototype,"suggestions",void 0);const er=$t`
|
|
978
982
|
.ft-text-field-suggestion {
|
|
979
983
|
position: relative;
|
|
980
984
|
padding: 8px 16px;
|
|
@@ -999,7 +1003,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
999
1003
|
slot {
|
|
1000
1004
|
pointer-events: none;
|
|
1001
1005
|
}
|
|
1002
|
-
`;var
|
|
1006
|
+
`;var or=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ir extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}}class rr extends De{render(){return re`
|
|
1003
1007
|
<div class="ft-text-field-suggestion"
|
|
1004
1008
|
tabindex="-1"
|
|
1005
1009
|
@keydown=${this.onKeyDown}
|
|
@@ -1011,7 +1015,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1011
1015
|
<slot></slot>
|
|
1012
1016
|
</ft-typography>
|
|
1013
1017
|
</div>
|
|
1014
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new
|
|
1018
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new ir(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}rr.elementDefinitions={"ft-ripple":Ai,"ft-typography":Si,"ft-icon":Ti},rr.styles=er,or([N()],rr.prototype,"value",void 0),or([k(".ft-text-field-suggestion")],rr.prototype,"container",void 0),or([R()],rr.prototype,"assignedNodes",void 0),I("ft-text-field")(tr),I("ft-text-field-suggestion")(rr);const nr={color:Se.extend("--ft-loader-color","",Re.colorPrimary),size:Se.create("--ft-loader-size","","SIZE","80px")},ar=$t`
|
|
1015
1019
|
:host {
|
|
1016
1020
|
line-height: 0;
|
|
1017
1021
|
}
|
|
@@ -1020,8 +1024,8 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1020
1024
|
display: inline-block;
|
|
1021
1025
|
position: relative;
|
|
1022
1026
|
|
|
1023
|
-
width: ${
|
|
1024
|
-
height: ${
|
|
1027
|
+
width: ${nr.size};
|
|
1028
|
+
height: ${nr.size};
|
|
1025
1029
|
}
|
|
1026
1030
|
|
|
1027
1031
|
.ft-loader div {
|
|
@@ -1030,7 +1034,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1030
1034
|
width: 25%;
|
|
1031
1035
|
height: 25%;
|
|
1032
1036
|
border-radius: 50%;
|
|
1033
|
-
background: ${
|
|
1037
|
+
background: ${nr.color};
|
|
1034
1038
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
1035
1039
|
}
|
|
1036
1040
|
|
|
@@ -1077,10 +1081,10 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1077
1081
|
transform: translate(0, 0);
|
|
1078
1082
|
}
|
|
1079
1083
|
100% {
|
|
1080
|
-
transform: translate(calc(0.35 * ${
|
|
1084
|
+
transform: translate(calc(0.35 * ${nr.size}), 0);
|
|
1081
1085
|
}
|
|
1082
1086
|
}
|
|
1083
|
-
`,
|
|
1087
|
+
`,sr=Se.extend("--ft-button-color","",Re.colorPrimary),lr={backgroundColor:Se.extend("--ft-button-background-color","",Re.colorSurface),borderRadius:Se.extend("--ft-button-border-radius","",Re.borderRadiusL),color:sr,fontSize:Se.extend("--ft-button-font-size","",ci.fontSize),iconSize:Se.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:Se.extend("--ft-button-ripple-color","",sr),verticalPadding:Se.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:Se.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:Se.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:Se.external(Re.colorOpacityDisabled,"Design system")},cr=Se.extend("--ft-button-primary-color","",Se.extend("--ft-button-color","",Re.colorOnPrimary)),pr={backgroundColor:Se.extend("--ft-button-primary-background-color","",Se.extend("--ft-button-background-color","",Re.colorPrimary)),color:cr,rippleColor:Se.extend("--ft-button-primary-ripple-color","",cr)},fr=Se.extend("--ft-button-dense-border-radius","",Se.extend("--ft-button-border-radius","",Re.borderRadiusM)),dr=Se.create("--ft-button-dense-vertical-padding","","SIZE","2px"),hr=Se.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),ur=Se.create("--ft-button-dense-icon-padding","","SIZE","4px"),gr=[$t`
|
|
1084
1088
|
:host {
|
|
1085
1089
|
display: inline-block;
|
|
1086
1090
|
max-width: 100%;
|
|
@@ -1091,7 +1095,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1091
1095
|
box-shadow: 0px 0px 0px transparent;
|
|
1092
1096
|
border: 0px solid transparent;
|
|
1093
1097
|
text-shadow: 0px 0px 0px transparent;
|
|
1094
|
-
font-size: ${
|
|
1098
|
+
font-size: ${lr.fontSize};
|
|
1095
1099
|
}
|
|
1096
1100
|
|
|
1097
1101
|
button:hover {
|
|
@@ -1120,31 +1124,31 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1120
1124
|
border: none;
|
|
1121
1125
|
pointer-events: auto;
|
|
1122
1126
|
|
|
1123
|
-
--ft-button-internal-line-height: max(calc(${
|
|
1124
|
-
--ft-button-internal-color: ${
|
|
1125
|
-
${we(
|
|
1126
|
-
${we(
|
|
1127
|
+
--ft-button-internal-line-height: max(calc(${lr.fontSize} + 2px), ${lr.iconSize});
|
|
1128
|
+
--ft-button-internal-color: ${lr.color};
|
|
1129
|
+
${we(Mi.size,lr.iconSize)};
|
|
1130
|
+
${we(Ri.color,lr.rippleColor)};
|
|
1127
1131
|
|
|
1128
|
-
border-radius: ${
|
|
1129
|
-
padding: ${
|
|
1130
|
-
background-color: ${
|
|
1132
|
+
border-radius: ${lr.borderRadius};
|
|
1133
|
+
padding: ${lr.verticalPadding} ${lr.horizontalPadding};
|
|
1134
|
+
background-color: ${lr.backgroundColor};
|
|
1131
1135
|
color: var(--ft-button-internal-color);
|
|
1132
1136
|
-webkit-mask-image: radial-gradient(white, black);
|
|
1133
1137
|
}
|
|
1134
1138
|
|
|
1135
1139
|
.ft-button.ft-button--outlined {
|
|
1136
1140
|
border: 1px solid var(--ft-button-internal-color);
|
|
1137
|
-
padding: calc(${
|
|
1141
|
+
padding: calc(${lr.verticalPadding} - 1px) calc(${lr.horizontalPadding} - 1px);
|
|
1138
1142
|
}
|
|
1139
1143
|
|
|
1140
1144
|
.ft-button.ft-button--dense {
|
|
1141
|
-
padding: ${
|
|
1142
|
-
border-radius: ${
|
|
1143
|
-
gap: ${
|
|
1145
|
+
padding: ${dr} ${hr};
|
|
1146
|
+
border-radius: ${fr};
|
|
1147
|
+
gap: ${ur};
|
|
1144
1148
|
}
|
|
1145
1149
|
|
|
1146
1150
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
1147
|
-
padding: calc(${
|
|
1151
|
+
padding: calc(${dr} - 1px) calc(${hr} - 1px);
|
|
1148
1152
|
}
|
|
1149
1153
|
|
|
1150
1154
|
.ft-button:not([disabled]):hover {
|
|
@@ -1152,22 +1156,22 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1152
1156
|
}
|
|
1153
1157
|
|
|
1154
1158
|
.ft-button--round {
|
|
1155
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
1159
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${lr.verticalPadding});
|
|
1156
1160
|
}
|
|
1157
1161
|
|
|
1158
1162
|
.ft-button--round.ft-button--dense {
|
|
1159
|
-
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${
|
|
1163
|
+
border-radius: calc(var(--ft-button-internal-line-height) / 2 + ${dr});
|
|
1160
1164
|
}
|
|
1161
1165
|
|
|
1162
1166
|
.ft-button[disabled] {
|
|
1163
1167
|
filter: grayscale(1);
|
|
1164
|
-
opacity: ${
|
|
1168
|
+
opacity: ${lr.opacityDisabled};
|
|
1165
1169
|
}
|
|
1166
1170
|
|
|
1167
1171
|
.ft-button.ft-button--primary {
|
|
1168
|
-
background-color: ${
|
|
1169
|
-
--ft-button-internal-color: ${
|
|
1170
|
-
${we(
|
|
1172
|
+
background-color: ${pr.backgroundColor};
|
|
1173
|
+
--ft-button-internal-color: ${pr.color};
|
|
1174
|
+
${we(Ri.color,pr.rippleColor)};
|
|
1171
1175
|
}
|
|
1172
1176
|
|
|
1173
1177
|
.ft-button:focus {
|
|
@@ -1180,13 +1184,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1180
1184
|
white-space: nowrap;
|
|
1181
1185
|
text-overflow: ellipsis;
|
|
1182
1186
|
display: block;
|
|
1183
|
-
margin: 0 ${
|
|
1184
|
-
${we(
|
|
1185
|
-
${we(
|
|
1187
|
+
margin: 0 ${lr.iconPadding};
|
|
1188
|
+
${we(ci.fontSize,"1em")};
|
|
1189
|
+
${we(ci.lineHeight,"var(--ft-button-internal-line-height)")};
|
|
1186
1190
|
}
|
|
1187
1191
|
|
|
1188
1192
|
.ft-button--dense .ft-button--label {
|
|
1189
|
-
margin: 0 ${
|
|
1193
|
+
margin: 0 ${ur};
|
|
1190
1194
|
}
|
|
1191
1195
|
|
|
1192
1196
|
.ft-button--label[hidden] {
|
|
@@ -1199,13 +1203,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1199
1203
|
}
|
|
1200
1204
|
|
|
1201
1205
|
.ft-button--label[hidden] + ft-icon {
|
|
1202
|
-
margin: 0 calc(${
|
|
1203
|
-
padding: 0 ${
|
|
1206
|
+
margin: 0 calc(${lr.horizontalPadding} * -1);
|
|
1207
|
+
padding: 0 ${lr.verticalPadding};
|
|
1204
1208
|
}
|
|
1205
1209
|
|
|
1206
1210
|
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
1207
|
-
margin: 0 calc(${
|
|
1208
|
-
padding: 0 ${
|
|
1211
|
+
margin: 0 calc(${hr} * -1);
|
|
1212
|
+
padding: 0 ${dr};
|
|
1209
1213
|
}
|
|
1210
1214
|
|
|
1211
1215
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -1214,10 +1218,10 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1214
1218
|
}
|
|
1215
1219
|
|
|
1216
1220
|
ft-loader {
|
|
1217
|
-
${we(
|
|
1218
|
-
${we(
|
|
1221
|
+
${we(nr.size,lr.iconSize)};
|
|
1222
|
+
${we(nr.color,"var(--ft-button-internal-color)")};
|
|
1219
1223
|
}
|
|
1220
|
-
`,
|
|
1224
|
+
`,Ae],yr=Se.create("--ft-tooltip-distance","","SIZE","4px"),br=Se.create("--ft-tooltip-color","","COLOR","#FFFFFF"),mr=Se.create("--ft-tooltip-background-color","","COLOR","#666666"),xr=Se.create("--ft-tooltip-z-index","","NUMBER","100"),vr=Se.external(Re.borderRadiusS,"Design system"),Or=Se.create("--ft-tooltip-max-width","","SIZE","150px"),$r=$t`
|
|
1221
1225
|
.ft-tooltip--container {
|
|
1222
1226
|
display: block;
|
|
1223
1227
|
}
|
|
@@ -1232,21 +1236,21 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1232
1236
|
box-sizing: border-box;
|
|
1233
1237
|
overflow: hidden;
|
|
1234
1238
|
width: max-content;
|
|
1235
|
-
max-width: ${
|
|
1239
|
+
max-width: ${Or};
|
|
1236
1240
|
text-align: center;
|
|
1237
1241
|
padding: ${yr};
|
|
1238
|
-
z-index: ${
|
|
1242
|
+
z-index: ${xr};
|
|
1239
1243
|
}
|
|
1240
1244
|
|
|
1241
1245
|
.ft-tooltip--content {
|
|
1242
1246
|
padding: 4px 8px;
|
|
1243
|
-
border-radius: ${
|
|
1244
|
-
background-color: ${
|
|
1245
|
-
color: ${
|
|
1247
|
+
border-radius: ${vr};
|
|
1248
|
+
background-color: ${mr};
|
|
1249
|
+
color: ${br};
|
|
1246
1250
|
position: relative;
|
|
1247
1251
|
word-break: break-word;
|
|
1248
1252
|
}
|
|
1249
|
-
`;var
|
|
1253
|
+
`;var Sr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class wr extends De{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 re`
|
|
1250
1254
|
<div part="container"
|
|
1251
1255
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
1252
1256
|
@mouseenter=${this.onHover}
|
|
@@ -1264,23 +1268,23 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1264
1268
|
</div>
|
|
1265
1269
|
</div>
|
|
1266
1270
|
</div>
|
|
1267
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}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=this.tooltip.offsetWidth,o=this.tooltip.offsetHeight,i=(t.offsetHeight-o)/2,r=(t.offsetWidth-e)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-o-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,p=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,p))+"px";let f=-l.y,d=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(f,d))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${
|
|
1271
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}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=this.tooltip.offsetWidth,o=this.tooltip.offsetHeight,i=(t.offsetHeight-o)/2,r=(t.offsetWidth-e)/2;let n=0,a=0;switch(this.tooltip.style.top="0",this.tooltip.style.left="0",this.validPosition){case"top":a=t.offsetTop-o-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"bottom":a=t.offsetTop+t.offsetHeight-this.tooltip.offsetTop,n=t.offsetLeft+r-this.tooltip.offsetLeft;break;case"left":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft-e-this.tooltip.offsetLeft;break;case"right":a=t.offsetTop+i-this.tooltip.offsetTop,n=t.offsetLeft+t.offsetWidth-this.tooltip.offsetLeft}const s=this.tooltip.style;s.left=n+"px",s.top=a+"px";const l=this.tooltip.getBoundingClientRect();let c=-l.x,p=l.x+l.width-window.innerWidth;s.left=n+Math.round(this.correctOutOfWindowPixels(c,p))+"px";let f=-l.y,d=l.y+l.height-window.innerHeight;s.top=a+Math.round(this.correctOutOfWindowPixels(f,d))+"px",s.maxWidth=`max(${t.offsetWidth}px, ${Or})`}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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}wr.elementDefinitions={"ft-typography":Si},wr.styles=$r,Sr([N()],wr.prototype,"text",void 0),Sr([N({type:Boolean})],wr.prototype,"manual",void 0),Sr([N({type:Boolean})],wr.prototype,"inline",void 0),Sr([N({type:Number})],wr.prototype,"delay",void 0),Sr([N()],wr.prototype,"position",void 0),Sr([R()],wr.prototype,"slotNodes",void 0),Sr([k(".ft-tooltip--container")],wr.prototype,"container",void 0),Sr([k(".ft-tooltip")],wr.prototype,"tooltip",void 0),Sr([k(".ft-tooltip--content")],wr.prototype,"tooltipContent",void 0),Sr([C()],wr.prototype,"visible",void 0),I("ft-tooltip")(wr);class Nr extends De{render(){return re`
|
|
1268
1272
|
<div class="ft-loader">
|
|
1269
1273
|
<div></div>
|
|
1270
1274
|
<div></div>
|
|
1271
1275
|
<div></div>
|
|
1272
1276
|
<div></div>
|
|
1273
1277
|
</div>
|
|
1274
|
-
`}}
|
|
1278
|
+
`}}Nr.styles=ar,I("ft-loader")(Nr);var Cr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Er extends(He(De,"button")){constructor(){super(...arguments),this.role="button",this.type="button",this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{var e;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):"submit"==this.type&&(null===(e=this.form)||void 0===e||e.requestSubmit())}}render(){return this.addTooltipIfNeeded(re`
|
|
1275
1279
|
<button part="button"
|
|
1276
|
-
class="${
|
|
1280
|
+
class="${lo(this.buttonClasses)}"
|
|
1277
1281
|
aria-label="${this.getLabel()}"
|
|
1278
1282
|
?disabled=${this.isDisabled()}>
|
|
1279
1283
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
1280
1284
|
<ft-typography part="label"
|
|
1281
1285
|
variant=${this.typographyVariant}
|
|
1282
1286
|
element="span"
|
|
1283
|
-
class="ft-button--label ${
|
|
1287
|
+
class="ft-button--label ${Ge?"ft-safari-ellipsis-fix":""}"
|
|
1284
1288
|
?hidden=${!this.hasTextContent()}>
|
|
1285
1289
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
1286
1290
|
</ft-typography>
|
|
@@ -1294,7 +1298,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1294
1298
|
</ft-tooltip>
|
|
1295
1299
|
`:t}resolveIcon(){return this.loading?re`
|
|
1296
1300
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?re`
|
|
1297
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:ae}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}}
|
|
1301
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:ae}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}}Er.elementDefinitions={"ft-ripple":Ai,"ft-tooltip":wr,"ft-typography":Si,"ft-icon":Ti,"ft-loader":Nr},Cr([N({type:String,reflect:!0})],Er.prototype,"role",void 0),Cr([N()],Er.prototype,"type",void 0),Cr([N({type:Boolean})],Er.prototype,"disabled",void 0),Cr([N()],Er.prototype,"label",void 0),Cr([N()],Er.prototype,"icon",void 0),Cr([N()],Er.prototype,"iconVariant",void 0),Cr([N({type:Boolean})],Er.prototype,"trailingIcon",void 0),Cr([N({type:Boolean})],Er.prototype,"loading",void 0),Cr([N()],Er.prototype,"tooltipPosition",void 0),Cr([N({type:Boolean})],Er.prototype,"hideTooltip",void 0),Cr([N({type:Boolean})],Er.prototype,"forceTooltip",void 0),Cr([k(".ft-button")],Er.prototype,"button",void 0),Cr([k(".ft-button--label slot")],Er.prototype,"slottedContent",void 0);var kr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Rr extends Er{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}get typographyVariant(){return"button"}}Rr.styles=[Me,gr],kr([N({type:Boolean})],Rr.prototype,"primary",void 0),kr([N({type:Boolean})],Rr.prototype,"outlined",void 0),kr([N({type:Boolean})],Rr.prototype,"dense",void 0),kr([N({type:Boolean})],Rr.prototype,"round",void 0);const Ur=[$t`
|
|
1298
1302
|
:host {
|
|
1299
1303
|
display: inline-block;
|
|
1300
1304
|
max-width: 100%;
|
|
@@ -1373,13 +1377,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1373
1377
|
/** Primary styles **/
|
|
1374
1378
|
|
|
1375
1379
|
.ft-button--primary {
|
|
1376
|
-
${we(
|
|
1380
|
+
${we(nr.color,ke.primaryIconColor)};
|
|
1377
1381
|
|
|
1378
|
-
${we(
|
|
1379
|
-
${we(
|
|
1380
|
-
${we(
|
|
1381
|
-
${we(
|
|
1382
|
-
${we(
|
|
1382
|
+
${we(Ri.color,ke.primaryStateLayerColor)};
|
|
1383
|
+
${we(Ri.opacityContentOnSurfaceHover,ke.primaryStateLayerOpacityHover)};
|
|
1384
|
+
${we(Ri.opacityContentOnSurfaceFocused,ke.primaryStateLayerOpacityFocus)};
|
|
1385
|
+
${we(Ri.opacityContentOnSurfaceSelected,ke.primaryStateLayerOpacityActive)};
|
|
1386
|
+
${we(Ri.opacityContentOnSurfacePressed,ke.primaryStateLayerOpacityActive)};
|
|
1383
1387
|
|
|
1384
1388
|
background-color: ${ke.primaryBackgroundColor};
|
|
1385
1389
|
color: ${ke.primaryColor};
|
|
@@ -1397,13 +1401,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1397
1401
|
/** Secondary styles **/
|
|
1398
1402
|
|
|
1399
1403
|
.ft-button--secondary {
|
|
1400
|
-
${we(
|
|
1404
|
+
${we(nr.color,ke.secondaryIconColor)};
|
|
1401
1405
|
|
|
1402
|
-
${we(
|
|
1403
|
-
${we(
|
|
1404
|
-
${we(
|
|
1405
|
-
${we(
|
|
1406
|
-
${we(
|
|
1406
|
+
${we(Ri.color,ke.secondaryStateLayerColor)};
|
|
1407
|
+
${we(Ri.opacityContentOnSurfaceHover,ke.secondaryStateLayerOpacityHover)};
|
|
1408
|
+
${we(Ri.opacityContentOnSurfaceFocused,ke.secondaryStateLayerOpacityFocus)};
|
|
1409
|
+
${we(Ri.opacityContentOnSurfaceSelected,ke.secondaryStateLayerOpacityActive)};
|
|
1410
|
+
${we(Ri.opacityContentOnSurfacePressed,ke.secondaryStateLayerOpacityActive)};
|
|
1407
1411
|
|
|
1408
1412
|
background-color: ${ke.secondaryBackgroundColor};
|
|
1409
1413
|
color: ${ke.secondaryColor};
|
|
@@ -1422,13 +1426,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1422
1426
|
/** Tertiary styles **/
|
|
1423
1427
|
|
|
1424
1428
|
.ft-button--tertiary {
|
|
1425
|
-
${we(
|
|
1429
|
+
${we(nr.color,ke.tertiaryIconColor)};
|
|
1426
1430
|
|
|
1427
|
-
${we(
|
|
1428
|
-
${we(
|
|
1429
|
-
${we(
|
|
1430
|
-
${we(
|
|
1431
|
-
${we(
|
|
1431
|
+
${we(Ri.color,ke.tertiaryStateLayerColor)};
|
|
1432
|
+
${we(Ri.opacityContentOnSurfaceHover,ke.tertiaryStateLayerOpacityHover)};
|
|
1433
|
+
${we(Ri.opacityContentOnSurfaceFocused,ke.tertiaryStateLayerOpacityFocus)};
|
|
1434
|
+
${we(Ri.opacityContentOnSurfaceSelected,ke.tertiaryStateLayerOpacityActive)};
|
|
1435
|
+
${we(Ri.opacityContentOnSurfacePressed,ke.tertiaryStateLayerOpacityActive)};
|
|
1432
1436
|
|
|
1433
1437
|
background-color: ${ke.tertiaryBackgroundColor};
|
|
1434
1438
|
color: ${ke.tertiaryColor};
|
|
@@ -1446,13 +1450,13 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1446
1450
|
/** Neutral styles **/
|
|
1447
1451
|
|
|
1448
1452
|
.ft-button--neutral {
|
|
1449
|
-
${we(
|
|
1453
|
+
${we(nr.color,ke.neutralIconColor)};
|
|
1450
1454
|
|
|
1451
|
-
${we(
|
|
1452
|
-
${we(
|
|
1453
|
-
${we(
|
|
1454
|
-
${we(
|
|
1455
|
-
${we(
|
|
1455
|
+
${we(Ri.backgroundColor,ke.neutralStateLayerColor)};
|
|
1456
|
+
${we(Ri.opacityContentOnSurfaceHover,ke.neutralStateLayerOpacityHover)};
|
|
1457
|
+
${we(Ri.opacityContentOnSurfaceFocused,ke.neutralStateLayerOpacityFocus)};
|
|
1458
|
+
${we(Ri.opacityContentOnSurfaceSelected,ke.neutralStateLayerOpacityActive)};
|
|
1459
|
+
${we(Ri.opacityContentOnSurfacePressed,ke.neutralStateLayerOpacityActive)};
|
|
1456
1460
|
|
|
1457
1461
|
background-color: ${ke.neutralBackgroundColor};
|
|
1458
1462
|
color: ${ke.neutralColor};
|
|
@@ -1470,8 +1474,8 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1470
1474
|
/** Large styles **/
|
|
1471
1475
|
|
|
1472
1476
|
.ft-button--large {
|
|
1473
|
-
${we(
|
|
1474
|
-
${we(
|
|
1477
|
+
${we(Mi.size,ke.largeIconSize)};
|
|
1478
|
+
${we(nr.size,ke.largeIconSize)};
|
|
1475
1479
|
|
|
1476
1480
|
height: ${ke.largeHeight};
|
|
1477
1481
|
padding: 0 ${ke.largeHorizontalPadding};
|
|
@@ -1493,8 +1497,8 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1493
1497
|
/** Small styles **/
|
|
1494
1498
|
|
|
1495
1499
|
.ft-button--small {
|
|
1496
|
-
${we(
|
|
1497
|
-
${we(
|
|
1500
|
+
${we(Mi.size,ke.smallIconSize)};
|
|
1501
|
+
${we(nr.size,ke.smallIconSize)};
|
|
1498
1502
|
|
|
1499
1503
|
height: ${ke.smallHeight};
|
|
1500
1504
|
padding: 0 ${ke.smallHorizontalPadding};
|
|
@@ -1512,7 +1516,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1512
1516
|
width: ${ke.smallIconOnlyWidth};
|
|
1513
1517
|
padding: unset;
|
|
1514
1518
|
}
|
|
1515
|
-
`,
|
|
1519
|
+
`,Ae];var Ir=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Wr extends Er{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?go.caption1medium:go.body2medium}}Wr.styles=[Me,Ur],Ir([N({type:Boolean})],Wr.prototype,"primary",void 0),Ir([N({type:Boolean})],Wr.prototype,"secondary",void 0),Ir([N({type:Boolean})],Wr.prototype,"tertiary",void 0),Ir([N({type:Boolean})],Wr.prototype,"neutral",void 0),Ir([N({type:Boolean})],Wr.prototype,"small",void 0),I("ft-button")(Rr),I("ftds-button")(Wr);class Lr extends CustomEvent{constructor(t){super("row-click",{detail:t})}}const zr={headerBackground:Se.create("--ft-filterable-table-header-background","","COLOR","whitesmoke"),oddRowBackground:Se.create("--ft-filterable-table-odd-row-background","","COLOR","#FFFFFF"),evenRowBackground:Se.create("--ft-filterable-table-even-row-background","","COLOR","#fdfdfd"),rowHoverBackground:Se.create("--ft-filterable-table-row-hover-background","","COLOR","#fafafa"),stickyHeaderZIndex:Se.create("--ft-filterable-table-sticky-header-zindex","","NUMBER","100"),cellVerticalBorderWidth:Se.create("--ft-filterable-table-cell-vertical-border-width","","SIZE","1px"),colorOnSurfaceHigh:Se.external(Re.colorOnSurfaceHigh,"Design system"),titleFont:Se.external(Re.titleFont,"Design system"),contentFont:Se.external(Re.contentFont,"Design system")},Zr=$t`
|
|
1516
1520
|
:host {
|
|
1517
1521
|
display: block;
|
|
1518
1522
|
}
|
|
@@ -1528,15 +1532,15 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1528
1532
|
.header-cell {
|
|
1529
1533
|
display: flex;
|
|
1530
1534
|
flex-direction: column;
|
|
1531
|
-
background: ${
|
|
1532
|
-
color: ${
|
|
1535
|
+
background: ${zr.headerBackground};
|
|
1536
|
+
color: ${zr.colorOnSurfaceHigh};
|
|
1533
1537
|
padding: .5rem 1rem;
|
|
1534
|
-
font-family: ${
|
|
1538
|
+
font-family: ${zr.titleFont};
|
|
1535
1539
|
}
|
|
1536
1540
|
|
|
1537
1541
|
.header-cell--sticky {
|
|
1538
1542
|
top: 0;
|
|
1539
|
-
z-index: ${
|
|
1543
|
+
z-index: ${zr.stickyHeaderZIndex};
|
|
1540
1544
|
position: sticky;
|
|
1541
1545
|
}
|
|
1542
1546
|
|
|
@@ -1554,8 +1558,8 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1554
1558
|
}
|
|
1555
1559
|
|
|
1556
1560
|
.column-title-container ft-button {
|
|
1557
|
-
${we(
|
|
1558
|
-
${we(
|
|
1561
|
+
${we(lr.backgroundColor,zr.headerBackground)};
|
|
1562
|
+
${we(lr.color,zr.colorOnSurfaceHigh)};
|
|
1559
1563
|
}
|
|
1560
1564
|
|
|
1561
1565
|
.column-title {
|
|
@@ -1584,31 +1588,31 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1584
1588
|
|
|
1585
1589
|
.cell {
|
|
1586
1590
|
padding: 1rem;
|
|
1587
|
-
border-left-color: ${
|
|
1591
|
+
border-left-color: ${zr.headerBackground};
|
|
1588
1592
|
border-left-style: solid;
|
|
1589
|
-
border-left-width: ${
|
|
1590
|
-
border-bottom: 1px solid ${
|
|
1593
|
+
border-left-width: ${zr.cellVerticalBorderWidth};
|
|
1594
|
+
border-bottom: 1px solid ${zr.headerBackground};
|
|
1591
1595
|
overflow-x: auto;
|
|
1592
1596
|
display: flex;
|
|
1593
1597
|
align-items: center;
|
|
1594
|
-
font-family: ${
|
|
1598
|
+
font-family: ${zr.contentFont};
|
|
1595
1599
|
}
|
|
1596
1600
|
|
|
1597
1601
|
/* Even is 2n+1 and odd is 2n because of the header */
|
|
1598
1602
|
.row:nth-child(2n) > .cell {
|
|
1599
|
-
background: ${
|
|
1603
|
+
background: ${zr.oddRowBackground};
|
|
1600
1604
|
}
|
|
1601
1605
|
|
|
1602
1606
|
.row:nth-child(2n + 1) > .cell {
|
|
1603
|
-
background: ${
|
|
1607
|
+
background: ${zr.evenRowBackground};
|
|
1604
1608
|
}
|
|
1605
1609
|
|
|
1606
1610
|
.row:hover > .cell {
|
|
1607
|
-
background: ${
|
|
1611
|
+
background: ${zr.rowHoverBackground};
|
|
1608
1612
|
}
|
|
1609
1613
|
|
|
1610
1614
|
.cell:last-of-type {
|
|
1611
|
-
border-right: 1px solid ${
|
|
1615
|
+
border-right: 1px solid ${zr.headerBackground};
|
|
1612
1616
|
}
|
|
1613
1617
|
|
|
1614
1618
|
.row:last-of-type .cell:first-of-type {
|
|
@@ -1622,7 +1626,7 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1622
1626
|
.hidden {
|
|
1623
1627
|
visibility: hidden;
|
|
1624
1628
|
}
|
|
1625
|
-
`;var
|
|
1629
|
+
`;var Kr=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Fr=t=>re`${t}`,Dr=(t,e)=>t-e;class Br extends De{constructor(){super(...arguments),this.data=[],this.columns=[],this.stickyHeaders=!1,this.filters=[],this.selectData=[]}init(t,e,o){this.data=t,this.columns=e,this.sort=o}render(){let t=this.sortData(this.filterData());return re`
|
|
1626
1630
|
<style>
|
|
1627
1631
|
.table {
|
|
1628
1632
|
grid-template-columns: repeat(${this.columns.length}, minmax(min-content, auto));
|
|
@@ -1630,17 +1634,17 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1630
1634
|
</style>
|
|
1631
1635
|
<div class="table">
|
|
1632
1636
|
<div class="header">
|
|
1633
|
-
${
|
|
1637
|
+
${no(this.columns,((t,e)=>"header-cell-"+e),((t,e)=>this.renderHeader(t,e)))}
|
|
1634
1638
|
</div>
|
|
1635
|
-
${
|
|
1639
|
+
${no(t,((t,e)=>"row-"+e),((t,e)=>re`
|
|
1636
1640
|
<div class="row"
|
|
1637
|
-
@click=${()=>this.dispatchEvent(new
|
|
1638
|
-
${
|
|
1641
|
+
@click=${()=>this.dispatchEvent(new Lr(t))}>
|
|
1642
|
+
${no(this.columns,((t,o)=>"cell-"+o+"-"+e),((o,i)=>this.renderCell(o,i,t,e)))}
|
|
1639
1643
|
</div>
|
|
1640
1644
|
`))}
|
|
1641
1645
|
</div>
|
|
1642
|
-
`}filterData(){return this.filters.reduce(((t,e,o)=>{var i;const r=this.columns[o];if(e&&e.value)switch(null!==(i=r.filter)&&void 0!==i?i:"text"){case"text":return t.filter((t=>this.getValueAsString(r,t,o).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(r,t,o)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const o=this.columns[this.currentSort.column],i=null!==(e=o.comparator)&&void 0!==e?e:
|
|
1643
|
-
<div class="${
|
|
1646
|
+
`}filterData(){return this.filters.reduce(((t,e,o)=>{var i;const r=this.columns[o];if(e&&e.value)switch(null!==(i=r.filter)&&void 0!==i?i:"text"){case"text":return t.filter((t=>this.getValueAsString(r,t,o).toLowerCase().includes(e.value.toLowerCase())));case"select":return t.filter((t=>this.getValueAsString(r,t,o)===e.value))}return t}),this.data)}sortData(t){var e;if(this.currentSort){const o=this.columns[this.currentSort.column],i=null!==(e=o.comparator)&&void 0!==e?e:Dr,r="asc"===this.currentSort.order?i:(t,e)=>-i(t,e);return[...t].sort(((t,e)=>r(this.getValue(o,t),this.getValue(o,e))))}return t}update(t){super.update(t),t.has("sort")&&(this.currentSort=this.sort),(t.has("data")||t.has("columns"))&&this.updateSelectData()}updateSelectData(){this.selectData=[];const t=this.data,e=this.columns;for(let o in e){const i=e[o];"select"===i.filter&&(this.selectData[o]=[...new Set(t.map(((t,e)=>this.getValueAsString(i,t,e))))].sort(((t,e)=>t.localeCompare(e))))}this.requestUpdate()}renderHeader(t,e){const o={"header-cell":!0,"header-cell--sticky":this.stickyHeaders};return re`
|
|
1647
|
+
<div class="${lo(o)}"
|
|
1644
1648
|
part="${this.columnPart("header-cell",e)}">
|
|
1645
1649
|
<div class="column-title-container">
|
|
1646
1650
|
<span class="column-title"
|
|
@@ -1681,9 +1685,9 @@ const Ji={fontSize:Se.create("--ft-text-field-font-size","","SIZE","14px"),label
|
|
|
1681
1685
|
`))}
|
|
1682
1686
|
</ft-select>
|
|
1683
1687
|
</div>
|
|
1684
|
-
`:ae}return ae}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,i){var r;const n=null!==(r=t.render)&&void 0!==r?r:
|
|
1688
|
+
`:ae}return ae}columnPart(t,e){return`${t} ${t}-column-${e}`}renderCell(t,e,o,i){var r;const n=null!==(r=t.render)&&void 0!==r?r:Fr;return re`
|
|
1685
1689
|
<div class="cell"
|
|
1686
1690
|
part="${this.columnPart("cell",e)} cell-row-${i} cell-column-${e}-row-${i}">
|
|
1687
|
-
${(t=>{const e=n(t,i);return"string"==typeof e?
|
|
1691
|
+
${(t=>{const e=n(t,i);return"string"==typeof e?so(e):e})(this.getValue(t,o))}
|
|
1688
1692
|
</div>
|
|
1689
|
-
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,o){const i=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(i,o):(t=>""+t)(i)}}
|
|
1693
|
+
`}getValue(t,e){return"string"==typeof t.getter?e[t.getter]:t.getter(e)}getValueAsString(t,e,o){const i=this.getValue(t,e);return"function"==typeof t.stringify?t.stringify(i,o):(t=>""+t)(i)}}Br.styles=Zr,Kr([N({attribute:!1})],Br.prototype,"data",void 0),Kr([N({attribute:!1})],Br.prototype,"columns",void 0),Kr([N({attribute:!1})],Br.prototype,"sort",void 0),Kr([N()],Br.prototype,"stickyHeaders",void 0),Kr([C()],Br.prototype,"currentSort",void 0),I("ft-filterable-table")(Br),t.FtFilterableTable=Br,t.FtFilterableTableCssVariables=zr,t.RowClickEvent=Lr,t.styles=Zr}({});
|