@fluid-topics/ft-filter 0.3.57 → 0.3.58
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-filter.light.js +4 -4
- package/build/ft-filter.min.js +217 -217
- package/package.json +10 -10
package/build/ft-filter.min.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){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(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,s=new WeakMap,r=new WeakMap,n=new WeakMap,l=new WeakMap;let a;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,s){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(s))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const l=s.prototype.attributeChangedCallback,a=new Set(s.observedAttributes||[]);f(s,a,l);const h={elementClass:s,connectedCallback:s.prototype.connectedCallback,disconnectedCallback:s.prototype.disconnectedCallback,adoptedCallback:s.prototype.adoptedCallback,attributeChangedCallback:l,formAssociated:s.formAssociated,formAssociatedCallback:s.prototype.formAssociatedCallback,formDisabledCallback:s.prototype.formDisabledCallback,formResetCallback:s.prototype.formResetCallback,formStateRestoreCallback:s.prototype.formStateRestoreCallback,observedAttributes:a};this._definitionsByTag.set(t,h),this._definitionsByClass.set(s,h);let c=i.call(o,t);c||(c=p(t),e.call(o,t,c)),this===window.customElements&&(n.set(s,h),h.standInClass=c);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)r.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(s),this._whenDefinedPromises.delete(t)),s}upgrade(){b.push(this),o.upgrade.apply(o,arguments),b.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=a;if(e)return a=void 0,e;const i=n.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),s.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,c=t=>{let e=t.getRootNode();if(!h(e)){const t=b[b.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=l.get(e)?.getRootNode()||document)}return e.customElements},p=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=c(i)||window.customElements,s=o._getDefinition(e);return s?u(i,s):r.set(i,o),i}connectedCallback(){const t=s.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=s.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):r.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){s.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=s.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=s.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=s.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=s.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,s){const r=t.toLowerCase();if(e.has(r)){const t=this.getAttribute(r);o.call(this,r,s),i.call(this,r,t,s)}else o.call(this,r,s)});const s=t.prototype.removeAttribute;s&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);s.call(this,o),i.call(this,o,t,null)}else s.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),s.set(t,e),a=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let b=[document];const x=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){b.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&l.set(t,this),b.pop(),t}};x(ShadowRoot,"createElement",document),x(ShadowRoot,"importNode",document),x(Element,"insertAdjacentHTML");const y=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){b.push(this),i.set.call(this,t),b.pop()}})};if(y(Element,"innerHTML"),y(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==s.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class r{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),s=e.get(o)||[];this[+i]=t,s.push(t),e.set(o,s)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const n=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=n.get.call(this,[]),e=[];for(const i of t){const t=s.get(i);t&&!0!==t.formAssociated||e.push(i)}return new r(e)}})}}try{window.customElements.define("custom-element",null)}catch(Mi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,s=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}s(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -50,39 +50,39 @@ var l;const a=null!=(null===(l=window.HTMLSlotElement)||void 0===l?void 0:l.prot
|
|
|
50
50
|
* @license
|
|
51
51
|
* Copyright 2017 Google LLC
|
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
53
|
-
*/
|
|
53
|
+
*/function c(t,e){try{return function(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;var i,o,s;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(o=i;0!=o--;)if(!c(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!c(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if((i=(s=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,s[o]))return!1;for(o=i;0!=o--;){var r=s[o];if(!c(t[r],e[r]))return!1}return!0}return t!=t&&e!=e}(t,e)}catch(t){return!1}}const p=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function f(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!c(t,e),...null!=e?e:{}})}
|
|
54
54
|
/**
|
|
55
55
|
* @license
|
|
56
56
|
* Copyright 2019 Google LLC
|
|
57
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
58
|
-
*/const d=window,
|
|
58
|
+
*/const d=window,u=d.ShadowRoot&&(void 0===d.ShadyCSS||d.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,v=Symbol(),b=new WeakMap;class x{constructor(t,e,i){if(this._$cssResult$=!0,i!==v)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(u&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=b.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&b.set(e,t))}return t}toString(){return this.cssText}}const y=t=>new x("string"==typeof t?t:t+"",void 0,v),g=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new x(i,t,v)},m=(t,e)=>{u?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=d.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))},$=u?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return y(e)})(t):t
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/;var
|
|
63
|
+
*/;var w;const k=window,O=k.trustedTypes,S=O?O.emptyScript:"",C=k.reactiveElementPolyfillSupport,E={toAttribute(t,e){switch(e){case Boolean:t=t?S:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},N=(t,e)=>e!==t&&(e==e||t==t),z={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:N};class M extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const s=this[t];this[e]=o,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift($(t))}else void 0!==t&&e.push($(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return m(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=z){var o;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:E).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,s=o._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=o.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:E;this._$El=s,this[s]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||N)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
64
64
|
/**
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2017 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
68
68
|
*/
|
|
69
|
-
var R;
|
|
69
|
+
var R;M.finalized=!0,M.elementProperties=new Map,M.elementStyles=[],M.shadowRootOptions={mode:"open"},null==C||C({ReactiveElement:M}),(null!==(w=k.reactiveElementVersions)&&void 0!==w?w:k.reactiveElementVersions=[]).push("1.4.1");const j=window,B=j.trustedTypes,F=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,U=`lit$${(Math.random()+"").slice(9)}$`,L="?"+U,D=`<${L}>`,A=document,T=(t="")=>A.createComment(t),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,I=t=>_(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,K=/>/g,V=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Z=/'/g,J=/"/g,q=/^(?:script|style|textarea|title)$/i,X=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),Y=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Q=new WeakMap,tt=A.createTreeWalker(A,129,null,!1),et=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=W;for(let e=0;e<i;e++){const i=t[e];let l,a,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===W?"!--"===a[1]?n=H:void 0!==a[1]?n=K:void 0!==a[2]?(q.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=V):void 0!==a[3]&&(n=V):n===V?">"===a[0]?(n=null!=s?s:W,h=-1):void 0===a[1]?h=-2:(h=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?V:'"'===a[3]?J:Z):n===J||n===Z?n=V:n===H||n===K?n=W:(n=V,s=void 0);const p=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===W?i+D:h>=0?(o.push(l),i.slice(0,h)+"$lit$"+i.slice(h)+U+p):i+U+(-2===h?(o.push(void 0),e):p)}const l=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==F?F.createHTML(l):l,o]};class it{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,l=this.parts,[a,h]=et(t,e);if(this.el=it.createElement(a,i),tt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=tt.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(U)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(U),e=/([.?@])?(.*)/.exec(i);l.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?lt:"?"===e[1]?ht:"@"===e[1]?ct:nt})}else l.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(q.test(o.tagName)){const t=o.textContent.split(U),e=t.length-1;if(e>0){o.textContent=B?B.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],T()),tt.nextNode(),l.push({type:2,index:++s});o.append(t[e],T())}}}else if(8===o.nodeType)if(o.data===L)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(U,t+1));)l.push({type:7,index:s}),t+=U.length-1}s++}}static createElement(t,e){const i=A.createElement("template");return i.innerHTML=t,i}}function ot(t,e,i=t,o){var s,r,n,l;if(e===Y)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=P(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(l=i)._$Co)&&void 0!==n?n:l._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=ot(t,a._$AS(t,e.values),a,o)),e}class st{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:A).importNode(i,!0);tt.currentNode=s;let r=tt.nextNode(),n=0,l=0,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new rt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new pt(r,this,t)),this.u.push(e),a=o[++l]}n!==(null==a?void 0:a.index)&&(r=tt.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class rt{constructor(t,e,i,o){var s;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=ot(this,t,e),P(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==Y&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):I(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==G&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=it.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new st(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Q.get(t.strings);return void 0===e&&Q.set(t.strings,e=new it(t)),e}k(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new rt(this.O(T()),this.O(T()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class nt{constructor(t,e,i,o,s){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=ot(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==Y,r&&(this._$AH=t);else{const o=t;let n,l;for(t=s[0],n=0;n<s.length-1;n++)l=ot(this,o[i+n],e,n),l===Y&&(l=this._$AH[n]),r||(r=!P(l)||l!==this._$AH[n]),l===G?t=G:t!==G&&(t+=(null!=l?l:"")+s[n+1]),this._$AH[n]=l}r&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class lt extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const at=B?B.emptyScript:"";class ht extends nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,at):this.element.removeAttribute(this.name)}}class ct extends nt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=ot(this,t,e,0))&&void 0!==i?i:G)===Y)return;const o=this._$AH,s=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==G&&(o===G||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ot(this,t)}}const ft={P:"$lit$",A:U,M:L,C:1,L:et,R:st,D:I,V:ot,I:rt,H:nt,N:ht,U:ct,B:lt,F:pt},dt=j.litHtmlPolyfillSupport;null==dt||dt(it,rt),(null!==(R=j.litHtmlVersions)&&void 0!==R?R:j.litHtmlVersions=[]).push("2.4.0");
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2017 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
74
|
*/
|
|
75
|
-
var
|
|
75
|
+
var ut,vt;class bt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,s;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=r._$litPart$;if(void 0===n){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;r._$litPart$=n=new rt(e.insertBefore(T(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return Y}}bt.finalized=!0,bt._$litElement$=!0,null===(ut=globalThis.litElementHydrateSupport)||void 0===ut||ut.call(globalThis,{LitElement:bt});const xt=globalThis.litElementPolyfillSupport;null==xt||xt({LitElement:bt}),(null!==(vt=globalThis.litElementVersions)&&void 0!==vt?vt:globalThis.litElementVersions=[]).push("3.2.2");class yt{static create(t,e,i){let o=t=>y(null!=t?t:i),s=g`var(${y(t)}, ${o(i)})`;return s.name=t,s.category=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>g`var(${y(t)}, ${o(e)})`,s.breadcrumb=()=>[],s.lastResortDefaultValue=()=>i,s}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),s=g`var(${y(t)}, ${o(i)})`;return s.name=t,s.category=e.category,s.fallbackVariable=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>g`var(${y(t)}, ${o(e)})`,s.breadcrumb=()=>[e.name,...e.breadcrumb()],s.lastResortDefaultValue=()=>i,s}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):y(null!=e?e:t.defaultValue),o=g`var(${y(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>g`var(${y(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function gt(t,e){return y(`${t.name}: ${e}`)}const mt={colorPrimary:yt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:yt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:yt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:yt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:yt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:yt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:yt.create("--ft-color-error","COLOR","#B00020"),colorOutline:yt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:yt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:yt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:yt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:yt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:yt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:yt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:yt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:yt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:yt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:yt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:yt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:yt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:yt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:yt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:yt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:yt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:yt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:yt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:yt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:yt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:yt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:yt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:yt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:yt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:yt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:yt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:yt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:yt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:yt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:yt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:yt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:yt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:yt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:yt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:yt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:yt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:yt.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:yt.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:yt.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:yt.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:yt.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:yt.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:yt.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:yt.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:yt.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:yt.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:yt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:yt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:yt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:yt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:yt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:yt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:yt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:yt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
76
76
|
/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2021 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
80
|
-
*/var
|
|
81
|
-
${t.map((t=>
|
|
80
|
+
*/var $t=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class wt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:o}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const s=this.renderOptions.creationScope=this.attachShadow({...o,customElements:t.registry});return m(s,this.constructor.elementStyles),s}}}(bt)){constructor(){super(),this.exportpartsDebouncer=new e(5),this.constructorName=this.constructor.name,this.constructorPrototype=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this.constructorName&&Object.setPrototypeOf(this,this.constructorPrototype)}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),X`
|
|
81
|
+
${t.map((t=>X`
|
|
82
82
|
<style>${t}</style>
|
|
83
83
|
`))}
|
|
84
84
|
${this.getTemplate()}
|
|
85
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,r,n;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(n=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}
|
|
85
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,r,n;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const h=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(n=null===(r=t.getAttribute("exportparts"))||void 0===r?void 0:r.split(",").map((t=>t.split(":")[1])))&&void 0!==n?n:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>h.add(t)))}if(0===h.size)return void this.removeAttribute("exportparts");const c=[...h.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}$t([o()],wt.prototype,"exportpartsPrefix",void 0),$t([f([])],wt.prototype,"exportpartsPrefixes",void 0),$t([o()],wt.prototype,"customStylesheet",void 0);const kt=g`
|
|
86
86
|
.ft-no-text-select {
|
|
87
87
|
-webkit-touch-callout: none;
|
|
88
88
|
-webkit-user-select: none;
|
|
@@ -91,7 +91,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
91
91
|
-ms-user-select: none;
|
|
92
92
|
user-select: none;
|
|
93
93
|
}
|
|
94
|
-
`;
|
|
94
|
+
`;g`
|
|
95
95
|
.ft-word-wrap {
|
|
96
96
|
white-space: normal;
|
|
97
97
|
word-wrap: break-word;
|
|
@@ -103,7 +103,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
103
103
|
-webkit-hyphens: auto;
|
|
104
104
|
hyphens: auto
|
|
105
105
|
}
|
|
106
|
-
`;const
|
|
106
|
+
`;const Ot=g`
|
|
107
107
|
.ft-safari-ellipsis-fix {
|
|
108
108
|
margin-right: 0;
|
|
109
109
|
|
|
@@ -114,94 +114,94 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
114
114
|
display: inline-block;
|
|
115
115
|
width: 0;
|
|
116
116
|
}
|
|
117
|
-
`;var
|
|
117
|
+
`;var St,Ct,Et;const Nt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Et=null===(Ct=null===(St=window.safari)||void 0===St?void 0:St.pushNotification)||void 0===Ct?void 0:Ct.toString())&&void 0!==Et?Et:""),zt=Symbol.for(""),Mt=t=>{if((null==t?void 0:t.r)===zt)return null==t?void 0:t._$litStatic$},Rt=t=>({_$litStatic$:t,r:zt}),jt=new Map,Bt=(t=>(e,...i)=>{const o=i.length;let s,r;const n=[],l=[];let a,h=0,c=!1;for(;h<o;){for(a=e[h];h<o&&void 0!==(r=i[h],s=Mt(r));)a+=s+e[++h],c=!0;l.push(r),n.push(a),h++}if(h===o&&n.push(e[o]),c){const t=n.join("$$lit$$");void 0===(e=jt.get(t))&&(n.raw=n,jt.set(t,e=n)),i=l}return t(e,...i)})(X);
|
|
118
118
|
/**
|
|
119
119
|
* @license
|
|
120
120
|
* Copyright 2020 Google LLC
|
|
121
121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
122
|
-
*/var
|
|
122
|
+
*/var Ft;!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"}(Ft||(Ft={}));const Ut=yt.extend("--ft-typography-font-family",mt.titleFont),Lt=yt.extend("--ft-typography-font-family",mt.contentFont),Dt={fontFamily:Lt,fontSize:yt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:yt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:yt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:yt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:yt.create("--ft-typography-text-transform","UNKNOWN","inherit")},At=yt.extend("--ft-typography-title-font-family",Ut),Tt=yt.extend("--ft-typography-title-font-size",Dt.fontSize,"20px"),Pt=yt.extend("--ft-typography-title-font-weight",Dt.fontWeight,"normal"),_t=yt.extend("--ft-typography-title-letter-spacing",Dt.letterSpacing,"0.15px"),It=yt.extend("--ft-typography-title-line-height",Dt.lineHeight,"1.2"),Wt=yt.extend("--ft-typography-title-text-transform",Dt.textTransform,"inherit"),Ht=yt.extend("--ft-typography-title-dense-font-family",Ut),Kt=yt.extend("--ft-typography-title-dense-font-size",Dt.fontSize,"14px"),Vt=yt.extend("--ft-typography-title-dense-font-weight",Dt.fontWeight,"normal"),Zt=yt.extend("--ft-typography-title-dense-letter-spacing",Dt.letterSpacing,"0.105px"),Jt=yt.extend("--ft-typography-title-dense-line-height",Dt.lineHeight,"1.7"),qt=yt.extend("--ft-typography-title-dense-text-transform",Dt.textTransform,"inherit"),Xt=yt.extend("--ft-typography-subtitle1-font-family",Lt),Yt=yt.extend("--ft-typography-subtitle1-font-size",Dt.fontSize,"16px"),Gt=yt.extend("--ft-typography-subtitle1-font-weight",Dt.fontWeight,"600"),Qt=yt.extend("--ft-typography-subtitle1-letter-spacing",Dt.letterSpacing,"0.144px"),te=yt.extend("--ft-typography-subtitle1-line-height",Dt.lineHeight,"1.5"),ee=yt.extend("--ft-typography-subtitle1-text-transform",Dt.textTransform,"inherit"),ie=yt.extend("--ft-typography-subtitle2-font-family",Lt),oe=yt.extend("--ft-typography-subtitle2-font-size",Dt.fontSize,"14px"),se=yt.extend("--ft-typography-subtitle2-font-weight",Dt.fontWeight,"normal"),re=yt.extend("--ft-typography-subtitle2-letter-spacing",Dt.letterSpacing,"0.098px"),ne=yt.extend("--ft-typography-subtitle2-line-height",Dt.lineHeight,"1.7"),le=yt.extend("--ft-typography-subtitle2-text-transform",Dt.textTransform,"inherit"),ae=yt.extend("--ft-typography-body1-font-family",Lt),he=yt.extend("--ft-typography-body1-font-size",Dt.fontSize,"16px"),ce=yt.extend("--ft-typography-body1-font-weight",Dt.fontWeight,"normal"),pe=yt.extend("--ft-typography-body1-letter-spacing",Dt.letterSpacing,"0.496px"),fe=yt.extend("--ft-typography-body1-line-height",Dt.lineHeight,"1.5"),de=yt.extend("--ft-typography-body1-text-transform",Dt.textTransform,"inherit"),ue={fontFamily:yt.extend("--ft-typography-body2-font-family",Lt),fontSize:yt.extend("--ft-typography-body2-font-size",Dt.fontSize,"14px"),fontWeight:yt.extend("--ft-typography-body2-font-weight",Dt.fontWeight,"normal"),letterSpacing:yt.extend("--ft-typography-body2-letter-spacing",Dt.letterSpacing,"0.252px"),lineHeight:yt.extend("--ft-typography-body2-line-height",Dt.lineHeight,"1.4"),textTransform:yt.extend("--ft-typography-body2-text-transform",Dt.textTransform,"inherit")},ve=yt.extend("--ft-typography-caption-font-family",Lt),be=yt.extend("--ft-typography-caption-font-size",Dt.fontSize,"12px"),xe=yt.extend("--ft-typography-caption-font-weight",Dt.fontWeight,"normal"),ye=yt.extend("--ft-typography-caption-letter-spacing",Dt.letterSpacing,"0.396px"),ge=yt.extend("--ft-typography-caption-line-height",Dt.lineHeight,"1.33"),me=yt.extend("--ft-typography-caption-text-transform",Dt.textTransform,"inherit"),$e=yt.extend("--ft-typography-breadcrumb-font-family",Lt),we=yt.extend("--ft-typography-breadcrumb-font-size",Dt.fontSize,"10px"),ke=yt.extend("--ft-typography-breadcrumb-font-weight",Dt.fontWeight,"normal"),Oe=yt.extend("--ft-typography-breadcrumb-letter-spacing",Dt.letterSpacing,"0.33px"),Se=yt.extend("--ft-typography-breadcrumb-line-height",Dt.lineHeight,"1.6"),Ce=yt.extend("--ft-typography-breadcrumb-text-transform",Dt.textTransform,"inherit"),Ee=yt.extend("--ft-typography-overline-font-family",Lt),Ne=yt.extend("--ft-typography-overline-font-size",Dt.fontSize,"10px"),ze=yt.extend("--ft-typography-overline-font-weight",Dt.fontWeight,"normal"),Me=yt.extend("--ft-typography-overline-letter-spacing",Dt.letterSpacing,"1.5px"),Re=yt.extend("--ft-typography-overline-line-height",Dt.lineHeight,"1.6"),je=yt.extend("--ft-typography-overline-text-transform",Dt.textTransform,"uppercase"),Be={fontFamily:yt.extend("--ft-typography-button-font-family",Lt),fontSize:yt.extend("--ft-typography-button-font-size",Dt.fontSize,"14px"),fontWeight:yt.extend("--ft-typography-button-font-weight",Dt.fontWeight,"600"),letterSpacing:yt.extend("--ft-typography-button-letter-spacing",Dt.letterSpacing,"1.246px"),lineHeight:yt.extend("--ft-typography-button-line-height",Dt.lineHeight,"1.15"),textTransform:yt.extend("--ft-typography-button-text-transform",Dt.textTransform,"uppercase")},Fe=g`
|
|
123
123
|
.ft-typography--title {
|
|
124
|
-
font-family: ${
|
|
124
|
+
font-family: ${At};
|
|
125
125
|
font-size: ${Tt};
|
|
126
|
-
font-weight: ${
|
|
127
|
-
letter-spacing: ${
|
|
128
|
-
line-height: ${
|
|
129
|
-
text-transform: ${
|
|
126
|
+
font-weight: ${Pt};
|
|
127
|
+
letter-spacing: ${_t};
|
|
128
|
+
line-height: ${It};
|
|
129
|
+
text-transform: ${Wt};
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,Ue=g`
|
|
132
132
|
.ft-typography--title-dense {
|
|
133
|
-
font-family: ${
|
|
134
|
-
font-size: ${
|
|
135
|
-
font-weight: ${
|
|
136
|
-
letter-spacing: ${
|
|
137
|
-
line-height: ${
|
|
138
|
-
text-transform: ${
|
|
139
|
-
}
|
|
140
|
-
`,
|
|
133
|
+
font-family: ${Ht};
|
|
134
|
+
font-size: ${Kt};
|
|
135
|
+
font-weight: ${Vt};
|
|
136
|
+
letter-spacing: ${Zt};
|
|
137
|
+
line-height: ${Jt};
|
|
138
|
+
text-transform: ${qt};
|
|
139
|
+
}
|
|
140
|
+
`,Le=g`
|
|
141
141
|
.ft-typography--subtitle1 {
|
|
142
|
-
font-family: ${
|
|
143
|
-
font-size: ${
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
147
|
-
text-transform: ${
|
|
148
|
-
}
|
|
149
|
-
`,
|
|
142
|
+
font-family: ${Xt};
|
|
143
|
+
font-size: ${Yt};
|
|
144
|
+
font-weight: ${Gt};
|
|
145
|
+
letter-spacing: ${Qt};
|
|
146
|
+
line-height: ${te};
|
|
147
|
+
text-transform: ${ee};
|
|
148
|
+
}
|
|
149
|
+
`,De=g`
|
|
150
150
|
.ft-typography--subtitle2 {
|
|
151
|
-
font-family: ${
|
|
152
|
-
font-size: ${
|
|
153
|
-
font-weight: ${
|
|
154
|
-
letter-spacing: ${
|
|
155
|
-
line-height: ${
|
|
156
|
-
text-transform: ${
|
|
151
|
+
font-family: ${ie};
|
|
152
|
+
font-size: ${oe};
|
|
153
|
+
font-weight: ${se};
|
|
154
|
+
letter-spacing: ${re};
|
|
155
|
+
line-height: ${ne};
|
|
156
|
+
text-transform: ${le};
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
`,
|
|
159
|
+
`,Ae=g`
|
|
160
160
|
.ft-typography--body1 {
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
161
|
+
font-family: ${ae};
|
|
162
|
+
font-size: ${he};
|
|
163
|
+
font-weight: ${ce};
|
|
164
|
+
letter-spacing: ${pe};
|
|
165
|
+
line-height: ${fe};
|
|
166
166
|
text-transform: ${de};
|
|
167
167
|
}
|
|
168
|
-
`,Te=
|
|
168
|
+
`,Te=g`
|
|
169
169
|
.ft-typography--body2 {
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
176
|
-
}
|
|
177
|
-
`,
|
|
170
|
+
font-family: ${ue.fontFamily};
|
|
171
|
+
font-size: ${ue.fontSize};
|
|
172
|
+
font-weight: ${ue.fontWeight};
|
|
173
|
+
letter-spacing: ${ue.letterSpacing};
|
|
174
|
+
line-height: ${ue.lineHeight};
|
|
175
|
+
text-transform: ${ue.textTransform};
|
|
176
|
+
}
|
|
177
|
+
`,Pe=g`
|
|
178
178
|
.ft-typography--caption {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
185
|
-
}
|
|
186
|
-
`,
|
|
179
|
+
font-family: ${ve};
|
|
180
|
+
font-size: ${be};
|
|
181
|
+
font-weight: ${xe};
|
|
182
|
+
letter-spacing: ${ye};
|
|
183
|
+
line-height: ${ge};
|
|
184
|
+
text-transform: ${me};
|
|
185
|
+
}
|
|
186
|
+
`,_e=g`
|
|
187
187
|
.ft-typography--breadcrumb {
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
194
|
-
}
|
|
195
|
-
`,
|
|
188
|
+
font-family: ${$e};
|
|
189
|
+
font-size: ${we};
|
|
190
|
+
font-weight: ${ke};
|
|
191
|
+
letter-spacing: ${Oe};
|
|
192
|
+
line-height: ${Se};
|
|
193
|
+
text-transform: ${Ce};
|
|
194
|
+
}
|
|
195
|
+
`,Ie=g`
|
|
196
196
|
.ft-typography--overline {
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
197
|
+
font-family: ${Ee};
|
|
198
|
+
font-size: ${Ne};
|
|
199
|
+
font-weight: ${ze};
|
|
200
|
+
letter-spacing: ${Me};
|
|
201
201
|
line-height: ${Re};
|
|
202
|
-
text-transform: ${
|
|
202
|
+
text-transform: ${je};
|
|
203
203
|
}
|
|
204
|
-
`,
|
|
204
|
+
`,We=g`
|
|
205
205
|
.ft-typography--button {
|
|
206
206
|
font-family: ${Be.fontFamily};
|
|
207
207
|
font-size: ${Be.fontSize};
|
|
@@ -210,28 +210,28 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
210
210
|
line-height: ${Be.lineHeight};
|
|
211
211
|
text-transform: ${Be.textTransform};
|
|
212
212
|
}
|
|
213
|
-
`,
|
|
213
|
+
`,He=g`
|
|
214
214
|
.ft-typography {
|
|
215
215
|
vertical-align: inherit;
|
|
216
216
|
}
|
|
217
|
-
`;var
|
|
217
|
+
`;var Ke=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ve extends wt{constructor(){super(...arguments),this.variant=Ft.body1}render(){return this.element?Bt`
|
|
218
218
|
<${Rt(this.element)}
|
|
219
219
|
class="ft-typography ft-typography--${this.variant}">
|
|
220
220
|
<slot></slot>
|
|
221
221
|
</${Rt(this.element)}>
|
|
222
222
|
`:Bt`
|
|
223
223
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
224
|
-
`}}function
|
|
224
|
+
`}}function Ze(t,e){return t.flatMap((t=>[t,...Ze(e(t),e)]))}
|
|
225
225
|
/**
|
|
226
226
|
* @license
|
|
227
227
|
* Copyright 2017 Google LLC
|
|
228
228
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
229
|
-
*/
|
|
229
|
+
*/Ve.styles=[Fe,Ue,Le,De,Ae,Te,Pe,_e,Ie,We,He],Ke([o()],Ve.prototype,"element",void 0),Ke([o()],Ve.prototype,"variant",void 0),p("ft-typography")(Ve);const Je=1,qe=2,Xe=t=>(...e)=>({_$litDirective$:t,values:e});class Ye{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
230
230
|
/**
|
|
231
231
|
* @license
|
|
232
232
|
* Copyright 2020 Google LLC
|
|
233
233
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
234
|
-
*/const{I:
|
|
234
|
+
*/const{I:Ge}=ft,Qe=()=>document.createComment(""),ti=(t,e,i)=>{var o;const s=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(Qe(),r),o=s.insertBefore(Qe(),r);i=new Ge(e,o,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,l=n!==t;if(l){let e;null===(o=i._$AQ)||void 0===o||o.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==r||l){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,r),t=e}}}return i},ei=(t,e,i=t)=>(t._$AI(e,i),t),ii={},oi=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const o=t._$AB.nextSibling;for(;i!==o;){const t=i.nextSibling;i.remove(),i=t}},si=(t,e,i)=>{const o=new Map;for(let s=e;s<=i;s++)o.set(t[s],s);return o},ri=Xe(class extends Ye{constructor(t){if(super(t),t.type!==qe)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let o;void 0===i?i=e:void 0!==e&&(o=e);const s=[],r=[];let n=0;for(const e of t)s[n]=o?o(e,n):n,r[n]=i(e,n),n++;return{values:r,keys:s}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,o]){var s;const r=(t=>t._$AH)(t),{values:n,keys:l}=this.ht(e,i,o);if(!Array.isArray(r))return this.ut=l,n;const a=null!==(s=this.ut)&&void 0!==s?s:this.ut=[],h=[];let c,p,f=0,d=r.length-1,u=0,v=n.length-1;for(;f<=d&&u<=v;)if(null===r[f])f++;else if(null===r[d])d--;else if(a[f]===l[u])h[u]=ei(r[f],n[u]),f++,u++;else if(a[d]===l[v])h[v]=ei(r[d],n[v]),d--,v--;else if(a[f]===l[v])h[v]=ei(r[f],n[v]),ti(t,h[v+1],r[f]),f++,v--;else if(a[d]===l[u])h[u]=ei(r[d],n[u]),ti(t,r[f],r[d]),d--,u++;else if(void 0===c&&(c=si(l,u,v),p=si(a,f,d)),c.has(a[f]))if(c.has(a[d])){const e=p.get(l[u]),i=void 0!==e?r[e]:null;if(null===i){const e=ti(t,r[f]);ei(e,n[u]),h[u]=e}else h[u]=ei(i,n[u]),ti(t,r[f],i),r[e]=null;u++}else oi(r[d]),d--;else oi(r[f]),f++;for(;u<=v;){const e=ti(t,h[v+1]);ei(e,n[u]),h[u++]=e}for(;f<=d;){const t=r[f++];null!==t&&oi(t)}return this.ut=l,((t,e=ii)=>{t._$AH=e})(t,h),Y}}),ni=Xe(class extends Ye{constructor(t){var e;if(super(t),t.type!==Je||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const s=t.element.classList;this.nt.forEach((t=>{t in e||(s.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(s.add(t),this.nt.add(t)):(s.remove(t),this.nt.delete(t)))}return Y}}),li=yt.extend("--ft-ripple-color",mt.colorContent),ai={color:li,backgroundColor:yt.extend("--ft-ripple-background-color",li),opacityContentOnSurfacePressed:yt.external(mt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:yt.external(mt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:yt.external(mt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:yt.external(mt.opacityContentOnSurfaceSelected,"Design system")},hi=yt.extend("--ft-ripple-color",mt.colorPrimary),ci=hi,pi=yt.extend("--ft-ripple-background-color",hi),fi=yt.extend("--ft-ripple-color",mt.colorSecondary),di=fi,ui=yt.extend("--ft-ripple-background-color",fi),vi=g`
|
|
235
235
|
:host {
|
|
236
236
|
display: contents;
|
|
237
237
|
}
|
|
@@ -253,15 +253,15 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
.ft-ripple .ft-ripple--background {
|
|
256
|
-
background-color: ${
|
|
256
|
+
background-color: ${ai.backgroundColor};
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
.ft-ripple .ft-ripple--effect {
|
|
260
|
-
background-color: ${
|
|
260
|
+
background-color: ${ai.color};
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
264
|
-
background-color: ${
|
|
264
|
+
background-color: ${ui};
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
@@ -269,11 +269,11 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
272
|
-
background-color: ${
|
|
272
|
+
background-color: ${pi};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
276
|
-
background-color: ${
|
|
276
|
+
background-color: ${ci};
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.ft-ripple .ft-ripple--background {
|
|
@@ -305,19 +305,19 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
308
|
-
opacity: ${
|
|
308
|
+
opacity: ${ai.opacityContentOnSurfaceHover};
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
312
|
-
opacity: ${
|
|
312
|
+
opacity: ${ai.opacityContentOnSurfaceSelected};
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
316
|
-
opacity: ${
|
|
316
|
+
opacity: ${ai.opacityContentOnSurfaceFocused};
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
320
|
-
opacity: ${
|
|
320
|
+
opacity: ${ai.opacityContentOnSurfacePressed};
|
|
321
321
|
transform: translate(-50%, -50%) scale(1);
|
|
322
322
|
}
|
|
323
323
|
`;
|
|
@@ -325,7 +325,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
325
325
|
* @license
|
|
326
326
|
* Copyright 2017 Google LLC
|
|
327
327
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
328
|
-
*/var
|
|
328
|
+
*/var bi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class xi extends wt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return X`
|
|
329
329
|
<style>
|
|
330
330
|
.ft-ripple .ft-ripple--effect,
|
|
331
331
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -338,11 +338,11 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
338
338
|
top: ${this.originY}px;
|
|
339
339
|
}
|
|
340
340
|
</style>
|
|
341
|
-
<div class="${
|
|
341
|
+
<div class="${ni(t)}">
|
|
342
342
|
<div class="ft-ripple--background"></div>
|
|
343
343
|
<div class="ft-ripple--effect"></div>
|
|
344
344
|
</div>
|
|
345
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),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,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
345
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),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,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}xi.elementDefinitions={},xi.styles=vi,bi([o({type:Boolean})],xi.prototype,"primary",void 0),bi([o({type:Boolean})],xi.prototype,"secondary",void 0),bi([o({type:Boolean})],xi.prototype,"unbounded",void 0),bi([o({type:Boolean})],xi.prototype,"activated",void 0),bi([o({type:Boolean})],xi.prototype,"selected",void 0),bi([o({type:Boolean})],xi.prototype,"disabled",void 0),bi([s()],xi.prototype,"hovered",void 0),bi([s()],xi.prototype,"focused",void 0),bi([s()],xi.prototype,"pressed",void 0),bi([s()],xi.prototype,"rippling",void 0),bi([s()],xi.prototype,"rippleSize",void 0),bi([s()],xi.prototype,"originX",void 0),bi([s()],xi.prototype,"originY",void 0),bi([n(".ft-ripple")],xi.prototype,"ripple",void 0),bi([n(".ft-ripple--effect")],xi.prototype,"rippleEffect",void 0),p("ft-ripple")(xi);const yi=yt.create("--ft-tooltip-distance","SIZE","4px"),gi=yt.create("--ft-tooltip-color","COLOR","#FFFFFF"),mi=yt.create("--ft-tooltip-background-color","COLOR","#666666"),$i=yt.create("--ft-tooltip-z-index","NUMBER","1"),wi=yt.external(mt.borderRadiusS,"Design system"),ki=yt.create("--ft-tooltip-max-width","SIZE","150px"),Oi=g`
|
|
346
346
|
.ft-tooltip--container {
|
|
347
347
|
display: block;
|
|
348
348
|
position: relative;
|
|
@@ -358,23 +358,23 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
358
358
|
box-sizing: border-box;
|
|
359
359
|
overflow: hidden;
|
|
360
360
|
width: max-content;
|
|
361
|
-
max-width: ${
|
|
361
|
+
max-width: ${ki};
|
|
362
362
|
text-align: center;
|
|
363
|
-
padding: ${
|
|
364
|
-
z-index: ${
|
|
363
|
+
padding: ${yi};
|
|
364
|
+
z-index: ${$i};
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
.ft-tooltip--content {
|
|
368
368
|
padding: 4px 8px;
|
|
369
|
-
border-radius: ${
|
|
370
|
-
background-color: ${
|
|
371
|
-
color: ${
|
|
369
|
+
border-radius: ${wi};
|
|
370
|
+
background-color: ${mi};
|
|
371
|
+
color: ${gi};
|
|
372
372
|
top: -500px;
|
|
373
373
|
left: -500px;
|
|
374
374
|
position: relative;
|
|
375
375
|
word-break: break-word;
|
|
376
376
|
}
|
|
377
|
-
`;var
|
|
377
|
+
`;var Si=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ci extends wt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return X`
|
|
378
378
|
<div part="container"
|
|
379
379
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
380
380
|
@mouseenter=${this.onHover}
|
|
@@ -392,7 +392,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
392
392
|
</div>
|
|
393
393
|
</div>
|
|
394
394
|
</div>
|
|
395
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${
|
|
395
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${ki})`}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())}}Ci.elementDefinitions={"ft-typography":Ve},Ci.styles=Oi,Si([o()],Ci.prototype,"text",void 0),Si([o({type:Boolean})],Ci.prototype,"manual",void 0),Si([o({type:Boolean})],Ci.prototype,"inline",void 0),Si([o({type:Number})],Ci.prototype,"delay",void 0),Si([o()],Ci.prototype,"position",void 0),Si([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?h({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Ci.prototype,"slotNodes",void 0),Si([n(".ft-tooltip--container")],Ci.prototype,"container",void 0),Si([n("slot")],Ci.prototype,"target",void 0),Si([n(".ft-tooltip")],Ci.prototype,"tooltip",void 0),Si([n(".ft-tooltip--content")],Ci.prototype,"tooltipContent",void 0),Si([s()],Ci.prototype,"visible",void 0),p("ft-tooltip")(Ci);const Ei={color:yt.extend("--ft-loader-color",mt.colorPrimary),size:yt.create("--ft-loader-size","SIZE","80px")},Ni=g`
|
|
396
396
|
:host {
|
|
397
397
|
line-height: 0;
|
|
398
398
|
}
|
|
@@ -401,8 +401,8 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
401
401
|
display: inline-block;
|
|
402
402
|
position: relative;
|
|
403
403
|
|
|
404
|
-
width: ${
|
|
405
|
-
height: ${
|
|
404
|
+
width: ${Ei.size};
|
|
405
|
+
height: ${Ei.size};
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
.ft-loader div {
|
|
@@ -411,7 +411,7 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
411
411
|
width: 25%;
|
|
412
412
|
height: 25%;
|
|
413
413
|
border-radius: 50%;
|
|
414
|
-
background: ${
|
|
414
|
+
background: ${Ei.color};
|
|
415
415
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
416
416
|
}
|
|
417
417
|
|
|
@@ -458,23 +458,23 @@ var ft,ut;class vt extends z{constructor(){super(...arguments),this.renderOption
|
|
|
458
458
|
transform: translate(0, 0);
|
|
459
459
|
}
|
|
460
460
|
100% {
|
|
461
|
-
transform: translate(calc(0.35 * ${
|
|
461
|
+
transform: translate(calc(0.35 * ${Ei.size}), 0);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
`;class
|
|
464
|
+
`;class zi extends wt{render(){return X`
|
|
465
465
|
<div class="ft-loader">
|
|
466
466
|
<div></div>
|
|
467
467
|
<div></div>
|
|
468
468
|
<div></div>
|
|
469
469
|
<div></div>
|
|
470
470
|
</div>
|
|
471
|
-
`}}
|
|
471
|
+
`}}zi.styles=Ni,p("ft-loader")(zi);
|
|
472
472
|
/**
|
|
473
473
|
* @license
|
|
474
474
|
* Copyright 2017 Google LLC
|
|
475
475
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
476
476
|
*/
|
|
477
|
-
class
|
|
477
|
+
class Mi extends Ye{constructor(t){if(super(t),this.it=G,t.type!==qe)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===G||null==t)return this._t=void 0,this.it=t;if(t===Y)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Mi.directiveName="unsafeHTML",Mi.resultType=1;const Ri=Xe(Mi);var ji,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.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ji||(ji={})),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=""}(Bi||(Bi={})),new Map([...["abw"].map((t=>[t,Bi.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,Bi.AUDIO])),...["avi"].map((t=>[t,Bi.AVI])),...["chm","xhs"].map((t=>[t,Bi.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,Bi.CODE])),...["csv"].map((t=>[t,Bi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Bi.DITA])),...["epub"].map((t=>[t,Bi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Bi.EXCEL])),...["flac"].map((t=>[t,Bi.FLAC])),...["gif"].map((t=>[t,Bi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Bi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Bi.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,Bi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Bi.JPEG])),...["json"].map((t=>[t,Bi.JSON])),...["m4a","m4p"].map((t=>[t,Bi.M4A])),...["mov","qt"].map((t=>[t,Bi.MOV])),...["mp3"].map((t=>[t,Bi.MP3])),...["mp4","m4v"].map((t=>[t,Bi.MP4])),...["ogg","oga"].map((t=>[t,Bi.OGG])),...["pdf","ps"].map((t=>[t,Bi.PDF])),...["png"].map((t=>[t,Bi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Bi.POWERPOINT])),...["rar"].map((t=>[t,Bi.RAR])),...["stp"].map((t=>[t,Bi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Bi.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,Bi.VIDEO])),...["wav"].map((t=>[t,Bi.WAV])),...["wma"].map((t=>[t,Bi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Bi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Bi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Bi.YAML])),...["zip"].map((t=>[t,Bi.ZIP]))]);const Fi={size:yt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:yt.extend("--ft-icon-fluid-topics-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:yt.extend("--ft-icon-file-format-font-family",yt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:yt.extend("--ft-icon-material-font-family",yt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:yt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ui=g`
|
|
478
478
|
:host, i.ft-icon {
|
|
479
479
|
display: inline-flex;
|
|
480
480
|
align-items: center;
|
|
@@ -483,14 +483,14 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
:host {
|
|
486
|
-
width: ${
|
|
487
|
-
height: ${
|
|
486
|
+
width: ${Fi.size};
|
|
487
|
+
height: ${Fi.size};
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
i.ft-icon {
|
|
491
491
|
width: 100%;
|
|
492
492
|
height: 100%;
|
|
493
|
-
font-size: ${
|
|
493
|
+
font-size: ${Fi.size};
|
|
494
494
|
line-height: 1;
|
|
495
495
|
font-weight: normal;
|
|
496
496
|
text-transform: none;
|
|
@@ -501,32 +501,32 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
501
501
|
text-rendering: auto;
|
|
502
502
|
-webkit-font-smoothing: antialiased;
|
|
503
503
|
-moz-osx-font-smoothing: grayscale;
|
|
504
|
-
vertical-align: ${
|
|
504
|
+
vertical-align: ${Fi.verticalAlign};
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
i.ft-icon.ft-icon--fluid-topics {
|
|
508
|
-
font-family: ${
|
|
508
|
+
font-family: ${Fi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
509
509
|
|
|
510
510
|
/* Ugly fix because font is broken */
|
|
511
|
-
font-size: calc(0.9 * ${
|
|
511
|
+
font-size: calc(0.9 * ${Fi.size});
|
|
512
512
|
position: relative;
|
|
513
513
|
top: -5%;
|
|
514
514
|
justify-content: center;
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
.ft-icon--file-format {
|
|
518
|
-
font-family: ${
|
|
518
|
+
font-family: ${Fi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
.ft-icon--material {
|
|
522
|
-
font-family: ${
|
|
522
|
+
font-family: ${Fi.materialFontFamily}, "Material Icons", sans-serif;
|
|
523
523
|
}
|
|
524
|
-
`;var
|
|
525
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
524
|
+
`;var Li;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Li||(Li={}));var Di=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Ai extends wt{constructor(){super(...arguments),this.resolvedIcon=G}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:Li.fluid_topics,i="material"!==e||this.value;return X`
|
|
525
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
526
526
|
${Ri(this.resolvedIcon)}
|
|
527
|
-
<slot ?hidden=${
|
|
527
|
+
<slot ?hidden=${i}></slot>
|
|
528
528
|
</i>
|
|
529
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
529
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Li.file_format:this.resolvedIcon=null!==(t=Bi[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Li.material:this.resolvedIcon=this.value||G;break;default:this.resolvedIcon=null!==(e=ji[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ai.elementDefinitions={},Ai.styles=Ui,Di([o()],Ai.prototype,"variant",void 0),Di([o()],Ai.prototype,"value",void 0),Di([s()],Ai.prototype,"resolvedIcon",void 0),Di([n("slot")],Ai.prototype,"slottedContent",void 0),p("ft-icon")(Ai);const Ti=yt.extend("--ft-button-color",mt.colorPrimary),Pi={backgroundColor:yt.extend("--ft-button-background-color",mt.colorSurface),borderRadius:yt.extend("--ft-button-border-radius",mt.borderRadiusL),color:Ti,fontSize:yt.extend("--ft-button-font-size",Be.fontSize),iconSize:yt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:yt.extend("--ft-button-ripple-color",Ti),opacityDisabled:yt.external(mt.colorOpacityDisabled,"Design system")},_i=yt.extend("--ft-button-primary-color",yt.extend("--ft-button-color",mt.colorOnPrimary)),Ii={backgroundColor:yt.extend("--ft-button-primary-background-color",yt.extend("--ft-button-background-color",mt.colorPrimary)),color:_i,rippleColor:yt.extend("--ft-button-primary-ripple-color",_i)},Wi=yt.extend("--ft-button-dense-border-radius",yt.extend("--ft-button-border-radius",mt.borderRadiusM)),Hi=[kt,g`
|
|
530
530
|
:host {
|
|
531
531
|
display: inline-block;
|
|
532
532
|
max-width: 100%;
|
|
@@ -537,7 +537,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
537
537
|
box-shadow: 0px 0px 0px transparent;
|
|
538
538
|
border: 0px solid transparent;
|
|
539
539
|
text-shadow: 0px 0px 0px transparent;
|
|
540
|
-
font-size: ${
|
|
540
|
+
font-size: ${Pi.fontSize};
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
button:hover {
|
|
@@ -566,17 +566,17 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
566
566
|
border: none;
|
|
567
567
|
pointer-events: auto;
|
|
568
568
|
|
|
569
|
-
--ft-button-internal-line-height: calc(${
|
|
570
|
-
--ft-button-internal-color: ${
|
|
571
|
-
${
|
|
569
|
+
--ft-button-internal-line-height: calc(${Pi.fontSize} + 2px);
|
|
570
|
+
--ft-button-internal-color: ${Pi.color};
|
|
571
|
+
${gt(Fi.size,Pi.iconSize)};
|
|
572
572
|
--ft-button-internal-vertical-padding: 6px;
|
|
573
573
|
--ft-button-internal-horizontal-padding: 8px;
|
|
574
|
-
${
|
|
575
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
574
|
+
${gt(ai.color,Pi.rippleColor)};
|
|
575
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Pi.iconSize});
|
|
576
576
|
|
|
577
|
-
border-radius: ${
|
|
577
|
+
border-radius: ${Pi.borderRadius};
|
|
578
578
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
579
|
-
background-color: ${
|
|
579
|
+
background-color: ${Pi.backgroundColor};
|
|
580
580
|
color: var(--ft-button-internal-color);
|
|
581
581
|
-webkit-mask-image: radial-gradient(white, black);
|
|
582
582
|
}
|
|
@@ -588,7 +588,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
588
588
|
.ft-button--dense {
|
|
589
589
|
--ft-button-internal-vertical-padding: 2px;
|
|
590
590
|
--ft-button-internal-horizontal-padding: 4px;
|
|
591
|
-
border-radius: ${
|
|
591
|
+
border-radius: ${Wi};
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
.ft-button--round {
|
|
@@ -597,13 +597,13 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
597
597
|
|
|
598
598
|
.ft-button[disabled] {
|
|
599
599
|
filter: grayscale(1);
|
|
600
|
-
opacity: ${
|
|
600
|
+
opacity: ${Pi.opacityDisabled};
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
.ft-button.ft-button--primary {
|
|
604
|
-
background-color: ${
|
|
605
|
-
--ft-button-internal-color: ${
|
|
606
|
-
${
|
|
604
|
+
background-color: ${Ii.backgroundColor};
|
|
605
|
+
--ft-button-internal-color: ${Ii.color};
|
|
606
|
+
${gt(ai.color,Ii.rippleColor)};
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
.ft-button.ft-button--outlined {
|
|
@@ -622,8 +622,8 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
622
622
|
text-overflow: ellipsis;
|
|
623
623
|
display: block;
|
|
624
624
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
625
|
-
${
|
|
626
|
-
${
|
|
625
|
+
${gt(Be.fontSize,"1em")};
|
|
626
|
+
${gt(Be.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
.ft-button--label[hidden] {
|
|
@@ -646,40 +646,40 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
646
646
|
}
|
|
647
647
|
|
|
648
648
|
ft-loader {
|
|
649
|
-
${
|
|
650
|
-
${
|
|
649
|
+
${gt(Ei.size,Pi.iconSize)};
|
|
650
|
+
${gt(Ei.color,"var(--ft-button-internal-color)")};
|
|
651
651
|
}
|
|
652
|
-
`];var
|
|
652
|
+
`];var Ki=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Vi extends wt{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Li.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(X`
|
|
653
653
|
<button part="button"
|
|
654
|
-
class="${
|
|
654
|
+
class="${ni(t)}"
|
|
655
655
|
aria-label="${this.getLabel()}"
|
|
656
656
|
?disabled=${this.isDisabled()}>
|
|
657
657
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
658
658
|
<ft-typography part="label"
|
|
659
659
|
variant="button"
|
|
660
660
|
element="span"
|
|
661
|
-
class="ft-button--label ${
|
|
661
|
+
class="ft-button--label ${Nt?"ft-safari-ellipsis-fix":""}"
|
|
662
662
|
?hidden=${!this.hasTextContent()}>
|
|
663
663
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
664
664
|
</ft-typography>
|
|
665
665
|
${this.resolveIcon()}
|
|
666
666
|
</button>
|
|
667
|
-
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?
|
|
667
|
+
`)}addTooltipIfNeeded(t){return this.getLabel().trim().length>0&&(this.forceTooltip||!this.hasTextContent()&&!this.hideTooltip)?X`
|
|
668
668
|
<ft-tooltip part="tooltip"
|
|
669
669
|
text="${this.getLabel()}"
|
|
670
670
|
position="${this.tooltipPosition}">
|
|
671
671
|
${t}
|
|
672
672
|
</ft-tooltip>
|
|
673
|
-
`:t}resolveIcon(){return this.loading?
|
|
674
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
675
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:
|
|
673
|
+
`:t}resolveIcon(){return this.loading?X`
|
|
674
|
+
<ft-loader></ft-loader> `:this.icon?X`
|
|
675
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:G}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}}Vi.elementDefinitions={"ft-ripple":xi,"ft-tooltip":Ci,"ft-typography":Ve,"ft-icon":Ai,"ft-loader":zi},Vi.styles=[Ot,Hi],Ki([o({type:Boolean})],Vi.prototype,"primary",void 0),Ki([o({type:Boolean})],Vi.prototype,"outlined",void 0),Ki([o({type:Boolean})],Vi.prototype,"disabled",void 0),Ki([o({type:Boolean})],Vi.prototype,"dense",void 0),Ki([o({type:Boolean})],Vi.prototype,"round",void 0),Ki([o({type:String})],Vi.prototype,"label",void 0),Ki([o({type:String})],Vi.prototype,"icon",void 0),Ki([o({type:String})],Vi.prototype,"iconVariant",void 0),Ki([o({type:Boolean})],Vi.prototype,"trailingIcon",void 0),Ki([o({type:Boolean})],Vi.prototype,"loading",void 0),Ki([o({type:String})],Vi.prototype,"tooltipPosition",void 0),Ki([o({type:Boolean})],Vi.prototype,"hideTooltip",void 0),Ki([o({type:Boolean})],Vi.prototype,"forceTooltip",void 0),Ki([n(".ft-button")],Vi.prototype,"button",void 0),Ki([n(".ft-button--label slot")],Vi.prototype,"slottedContent",void 0),p("ft-button")(Vi);const Zi=yt.extend("--ft-checkbox-text-color",mt.colorOnSurfaceHigh),Ji=yt.external(mt.colorPrimary,"Design system"),qi=yt.external(mt.colorOnPrimary,"Design system"),Xi=yt.extend("--ft-checkbox-border-color",mt.colorOnSurfaceMedium),Yi=yt.external(mt.colorOnSurfaceDisabled,"Design system"),Gi=g`
|
|
676
676
|
* {
|
|
677
677
|
box-sizing: border-box;
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
.ft-checkbox {
|
|
681
681
|
box-sizing: border-box;
|
|
682
|
-
color: ${
|
|
682
|
+
color: ${Zi};
|
|
683
683
|
|
|
684
684
|
display: inline-flex;
|
|
685
685
|
align-items: center;
|
|
@@ -687,7 +687,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
.ft-checkbox--disabled {
|
|
690
|
-
color: ${
|
|
690
|
+
color: ${Yi};
|
|
691
691
|
}
|
|
692
692
|
|
|
693
693
|
input {
|
|
@@ -711,26 +711,26 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
711
711
|
|
|
712
712
|
.ft-checkbox--box {
|
|
713
713
|
display: flex;
|
|
714
|
-
border: 2px solid ${
|
|
714
|
+
border: 2px solid ${Xi};
|
|
715
715
|
border-radius: 2px;
|
|
716
716
|
|
|
717
717
|
width: 18px;
|
|
718
718
|
height: 18px;
|
|
719
719
|
|
|
720
|
-
color: ${
|
|
720
|
+
color: ${qi};
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
|
|
724
724
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
725
725
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
726
|
-
border-color: ${
|
|
727
|
-
background-color: ${
|
|
726
|
+
border-color: ${Ji};
|
|
727
|
+
background-color: ${Ji};
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
731
|
-
border-color: ${
|
|
731
|
+
border-color: ${Yi};
|
|
732
732
|
background-color: transparent;
|
|
733
|
-
color: ${
|
|
733
|
+
color: ${Yi};
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
.ft-checkbox--checkmark {
|
|
@@ -749,8 +749,8 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
749
749
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
750
750
|
opacity: 1;
|
|
751
751
|
}
|
|
752
|
-
`;var
|
|
753
|
-
<label class="${
|
|
752
|
+
`;var Qi=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class to extends wt{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return X`
|
|
753
|
+
<label class="${ni(t)}" for="checkbox-input">
|
|
754
754
|
<div class="ft-checkbox--box-container">
|
|
755
755
|
<ft-ripple
|
|
756
756
|
?disabled=${this.disabled}
|
|
@@ -775,14 +775,14 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
775
775
|
<slot></slot>
|
|
776
776
|
</ft-typography>
|
|
777
777
|
</label>
|
|
778
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
778
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}to.elementDefinitions={"ft-ripple":xi,"ft-typography":Ve},to.styles=Gi,Qi([o()],to.prototype,"name",void 0),Qi([o({type:Boolean,reflect:!0})],to.prototype,"checked",void 0),Qi([o({type:Boolean})],to.prototype,"indeterminate",void 0),Qi([o({type:Boolean})],to.prototype,"disabled",void 0),Qi([n(".ft-checkbox")],to.prototype,"container",void 0),Qi([n("ft-ripple")],to.prototype,"ripple",void 0),p("ft-checkbox")(to);const eo=yt.extend("--ft-radio-text-color",mt.colorOnSurfaceHigh),io=yt.external(mt.colorPrimary,"Design system"),oo=(yt.external(mt.colorOnPrimary,"Design system"),yt.extend("--ft-radio-border-color",mt.colorOnSurfaceMedium)),so=yt.external(mt.colorOnSurfaceDisabled,"Design system"),ro=g`
|
|
779
779
|
* {
|
|
780
780
|
box-sizing: border-box;
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
.ft-radio {
|
|
784
784
|
box-sizing: border-box;
|
|
785
|
-
color: ${
|
|
785
|
+
color: ${eo};
|
|
786
786
|
|
|
787
787
|
display: inline-flex;
|
|
788
788
|
align-items: center;
|
|
@@ -790,7 +790,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
.ft-radio--disabled {
|
|
793
|
-
color: ${
|
|
793
|
+
color: ${so};
|
|
794
794
|
}
|
|
795
795
|
|
|
796
796
|
input {
|
|
@@ -813,7 +813,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
813
813
|
}
|
|
814
814
|
|
|
815
815
|
.ft-radio--box {
|
|
816
|
-
border: 2px solid ${
|
|
816
|
+
border: 2px solid ${oo};
|
|
817
817
|
border-radius: 50%;
|
|
818
818
|
|
|
819
819
|
display: flex;
|
|
@@ -826,7 +826,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
826
826
|
|
|
827
827
|
.ft-radio--box:after {
|
|
828
828
|
content: " ";
|
|
829
|
-
background-color: ${
|
|
829
|
+
background-color: ${io};
|
|
830
830
|
|
|
831
831
|
border-radius: 50%;
|
|
832
832
|
|
|
@@ -838,7 +838,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
838
838
|
}
|
|
839
839
|
|
|
840
840
|
.ft-radio--checked .ft-radio--box {
|
|
841
|
-
border-color: ${
|
|
841
|
+
border-color: ${io};
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
|
|
@@ -847,15 +847,15 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
847
847
|
}
|
|
848
848
|
|
|
849
849
|
.ft-radio--disabled .ft-radio--box {
|
|
850
|
-
border-color: ${
|
|
850
|
+
border-color: ${so};
|
|
851
851
|
background-color: transparent;
|
|
852
852
|
}
|
|
853
853
|
|
|
854
854
|
.ft-radio--disabled .ft-radio--box:after {
|
|
855
|
-
background-color: ${
|
|
855
|
+
background-color: ${so};
|
|
856
856
|
}
|
|
857
|
-
`;var
|
|
858
|
-
<div class="${
|
|
857
|
+
`;var no=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class lo extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class ao extends wt{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return X`
|
|
858
|
+
<div class="${ni(t)}">
|
|
859
859
|
<div class="ft-radio--box-container">
|
|
860
860
|
<ft-ripple
|
|
861
861
|
?disabled=${this.disabled}
|
|
@@ -879,17 +879,17 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
879
879
|
</ft-typography>
|
|
880
880
|
</label>
|
|
881
881
|
</div>
|
|
882
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
882
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new lo(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new lo(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}ao.elementDefinitions={"ft-ripple":xi,"ft-typography":Ve},ao.styles=ro,no([o()],ao.prototype,"value",void 0),no([o()],ao.prototype,"name",void 0),no([o({type:Boolean,reflect:!0})],ao.prototype,"checked",void 0),no([o({type:Boolean})],ao.prototype,"disabled",void 0),no([n(".ft-radio")],ao.prototype,"container",void 0),no([n("ft-ripple")],ao.prototype,"ripple",void 0),no([n("input")],ao.prototype,"input",void 0);const ho=g`
|
|
883
883
|
:host {
|
|
884
884
|
display: contents;
|
|
885
885
|
}
|
|
886
|
-
`;var
|
|
886
|
+
`;var co=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class po extends wt{constructor(){super(...arguments),this.name=""}render(){return X`
|
|
887
887
|
<slot @slotchange=${this.onSlotChange}
|
|
888
888
|
@change=${this.onChange}
|
|
889
889
|
@keydown=${this.onKeyDown}
|
|
890
890
|
@focusin=${this.focusCurrentValue}
|
|
891
891
|
></slot>
|
|
892
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
892
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),i=this.radioButtons.indexOf(e)-1;this.radioButtons[i<0?this.radioButtons.length-1:i].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}po.elementDefinitions={},po.styles=ho,co([o()],po.prototype,"name",void 0),co([h()],po.prototype,"radioButtons",void 0),p("ft-radio")(ao),p("ft-radio-group")(po);const fo={borderRadiusM:yt.external(mt.borderRadiusM,"Design system"),colorOutline:yt.external(mt.colorOutline,"Design system"),colorOnSurface:yt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:yt.external(mt.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:yt.external(mt.colorOnSurfaceDisabled,"Design system"),colorPrimary:yt.external(mt.colorPrimary,"Design system"),colorOnPrimary:yt.external(mt.colorOnPrimary,"Design system"),fontFamily:yt.external(ue.fontFamily,"Body2 typography"),fontSize:yt.external(ue.fontSize,"Body2 typography"),fontWeight:yt.external(ue.fontWeight,"Body2 typography"),letterSpacing:yt.external(ue.letterSpacing,"Body2 typography"),lineHeight:yt.external(ue.lineHeight,"Body2 typography"),textTransform:yt.external(ue.textTransform,"Body2 typography")},uo=g`
|
|
893
893
|
.ft-filter-level--container {
|
|
894
894
|
display: flex;
|
|
895
895
|
flex-direction: column;
|
|
@@ -903,14 +903,14 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
903
903
|
flex-shrink: 0;
|
|
904
904
|
text-decoration: none;
|
|
905
905
|
position: relative;
|
|
906
|
-
border-radius: ${
|
|
906
|
+
border-radius: ${fo.borderRadiusM};
|
|
907
907
|
overflow: hidden;
|
|
908
908
|
display: flex;
|
|
909
909
|
align-items: center;
|
|
910
910
|
padding: 4px 4px;
|
|
911
911
|
gap: 4px;
|
|
912
912
|
cursor: pointer;
|
|
913
|
-
color: ${
|
|
913
|
+
color: ${fo.colorOnSurface};
|
|
914
914
|
}
|
|
915
915
|
|
|
916
916
|
.ft-filter-level--go-back:focus {
|
|
@@ -939,7 +939,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
939
939
|
}
|
|
940
940
|
|
|
941
941
|
ft-button {
|
|
942
|
-
${
|
|
942
|
+
${gt(Pi.color,fo.colorOnSurface)};
|
|
943
943
|
}
|
|
944
944
|
|
|
945
945
|
ft-radio, ft-checkbox {
|
|
@@ -953,11 +953,11 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
953
953
|
|
|
954
954
|
.ft-filter-level--no-values {
|
|
955
955
|
margin: 10px 0;
|
|
956
|
-
color: ${
|
|
956
|
+
color: ${fo.colorOnSurfaceMedium};
|
|
957
957
|
}
|
|
958
|
-
`;var
|
|
958
|
+
`;var vo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class bo extends wt{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const e=t.slice(0,this.limit);return X`
|
|
959
959
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
960
|
-
${null==this.parent?null:
|
|
960
|
+
${null==this.parent?null:X`
|
|
961
961
|
<div tabindex="0"
|
|
962
962
|
part="controls go-back"
|
|
963
963
|
class="ft-filter-level--go-back"
|
|
@@ -969,15 +969,15 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
969
969
|
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
970
970
|
</div>
|
|
971
971
|
`}
|
|
972
|
-
${0===this.options.length&&this.noValuesLabel?
|
|
972
|
+
${0===this.options.length&&this.noValuesLabel?X`
|
|
973
973
|
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
974
974
|
${this.noValuesLabel}
|
|
975
975
|
</ft-typography>
|
|
976
|
-
`:
|
|
977
|
-
${
|
|
976
|
+
`:G}
|
|
977
|
+
${ri(e,(t=>t.value),(t=>{var e;return X`
|
|
978
978
|
<div class="ft-filter-level--option" part="options">
|
|
979
979
|
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
980
|
-
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?
|
|
980
|
+
${this.preventNavigation||t.selected||0===(null!==(e=t.subOptions)&&void 0!==e?e:[]).length?G:X`
|
|
981
981
|
<ft-button icon="chevron_right"
|
|
982
982
|
part="controls navigate-hierarchy"
|
|
983
983
|
label="${t.label}"
|
|
@@ -987,7 +987,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
987
987
|
`}
|
|
988
988
|
</div>
|
|
989
989
|
`}))}
|
|
990
|
-
${e.length<t.length?
|
|
990
|
+
${e.length<t.length?X`
|
|
991
991
|
<ft-button
|
|
992
992
|
class="ft-filter-level--display-more"
|
|
993
993
|
icon="expand_more"
|
|
@@ -996,19 +996,19 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
996
996
|
@click=${this.displayMore}>
|
|
997
997
|
${this.moreValuesButtonLabel}
|
|
998
998
|
</ft-button>
|
|
999
|
-
`:
|
|
999
|
+
`:G}
|
|
1000
1000
|
</div>
|
|
1001
|
-
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return
|
|
1001
|
+
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var e;return X`
|
|
1002
1002
|
<ft-checkbox name="${this.id}"
|
|
1003
1003
|
part="multivalued-option"
|
|
1004
1004
|
data-value="${t.value}"
|
|
1005
1005
|
.checked=${t.selected}
|
|
1006
1006
|
.disabled=${this.disabled}
|
|
1007
|
-
.indeterminate=${
|
|
1007
|
+
.indeterminate=${Ze(null!==(e=t.subOptions)&&void 0!==e?e:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
1008
1008
|
@change=${e=>this.optionsChanged(e,t)}>
|
|
1009
1009
|
${t.renderOption?t.renderOption:t.label}
|
|
1010
1010
|
</ft-checkbox>
|
|
1011
|
-
`}buildMonoValuedOption(t){return
|
|
1011
|
+
`}buildMonoValuedOption(t){return X`
|
|
1012
1012
|
<ft-radio name="${this.id+Math.round(1e6*Math.random())}"
|
|
1013
1013
|
part="monovalued-option"
|
|
1014
1014
|
data-value="${t.value}"
|
|
@@ -1019,7 +1019,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1019
1019
|
@change=${t=>t.stopPropagation()}>
|
|
1020
1020
|
${t.renderOption?t.renderOption:t.label}
|
|
1021
1021
|
</ft-radio>
|
|
1022
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
1022
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}bo.elementDefinitions={"ft-button":Vi,"ft-ripple":xi,"ft-typography":Ve,"ft-checkbox":to,"ft-icon":Ai,"ft-radio":ao},bo.styles=uo,vo([o({type:String})],bo.prototype,"id",void 0),vo([o({type:Object})],bo.prototype,"parent",void 0),vo([o({type:Array})],bo.prototype,"options",void 0),vo([o({type:Boolean})],bo.prototype,"multivalued",void 0),vo([o({type:Boolean})],bo.prototype,"disabled",void 0),vo([o({type:Boolean})],bo.prototype,"hideSelectedOptions",void 0),vo([o({type:Boolean})],bo.prototype,"preventNavigation",void 0),vo([o({type:String})],bo.prototype,"filter",void 0),vo([o({type:String})],bo.prototype,"moreValuesButtonLabel",void 0),vo([o({type:String})],bo.prototype,"noValuesLabel",void 0),vo([o({type:Number})],bo.prototype,"displayedValuesLimit",void 0),vo([n(".ft-filter-level--container")],bo.prototype,"container",void 0),vo([s()],bo.prototype,"displayedPages",void 0);const xo={buttonsColor:yt.extend("--ft-snap-scroll-buttons-color",mt.colorPrimary),buttonsZIndex:yt.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:yt.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:yt.external(mt.colorSurface,"Design system")},yo=g`
|
|
1023
1023
|
.ft-snap-scroll {
|
|
1024
1024
|
box-sizing: border-box;
|
|
1025
1025
|
position: relative;
|
|
@@ -1054,7 +1054,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1054
1054
|
flex-wrap: nowrap;
|
|
1055
1055
|
align-items: flex-start;
|
|
1056
1056
|
justify-content: flex-start;
|
|
1057
|
-
gap: ${
|
|
1057
|
+
gap: ${xo.gap};
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
1060
1060
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1097,11 +1097,11 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1097
1097
|
.ft-snap-scroll--next {
|
|
1098
1098
|
position: absolute;
|
|
1099
1099
|
display: flex;
|
|
1100
|
-
z-index: ${
|
|
1100
|
+
z-index: ${xo.buttonsZIndex};
|
|
1101
1101
|
opacity: 1;
|
|
1102
1102
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1103
|
-
${
|
|
1104
|
-
${
|
|
1103
|
+
${gt(Pi.backgroundColor,"transparent")};
|
|
1104
|
+
${gt(Pi.color,xo.buttonsColor)};
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
1107
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1114,37 +1114,37 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1114
1114
|
top: 0;
|
|
1115
1115
|
left: -1px;
|
|
1116
1116
|
bottom: 0;
|
|
1117
|
-
background: linear-gradient(to right, ${
|
|
1117
|
+
background: linear-gradient(to right, ${xo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1118
1118
|
}
|
|
1119
1119
|
|
|
1120
1120
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1121
1121
|
top: -1px;
|
|
1122
1122
|
left: 0;
|
|
1123
1123
|
right: 0;
|
|
1124
|
-
background: linear-gradient(to bottom, ${
|
|
1124
|
+
background: linear-gradient(to bottom, ${xo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1128
1128
|
top: 0;
|
|
1129
1129
|
right: -1px;
|
|
1130
1130
|
bottom: 0;
|
|
1131
|
-
background: linear-gradient(to left, ${
|
|
1131
|
+
background: linear-gradient(to left, ${xo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
1134
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1135
1135
|
left: 0;
|
|
1136
1136
|
right: 0;
|
|
1137
1137
|
bottom: -1px;
|
|
1138
|
-
background: linear-gradient(to top, ${
|
|
1138
|
+
background: linear-gradient(to top, ${xo.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1139
1139
|
}
|
|
1140
1140
|
|
|
1141
1141
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1142
1142
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1143
1143
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1144
1144
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1145
|
-
background-color: ${
|
|
1145
|
+
background-color: ${xo.colorSurface};
|
|
1146
1146
|
}
|
|
1147
|
-
`;var
|
|
1147
|
+
`;var go=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class mo extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class $o extends wt{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,i=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<i||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=ni({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":Nt}),e=this.controls&&this.withScroll;return X`
|
|
1148
1148
|
<div part="container" class="${t}">
|
|
1149
1149
|
<ft-button
|
|
1150
1150
|
class="ft-snap-scroll--previous"
|
|
@@ -1168,7 +1168,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1168
1168
|
@click=${this.next}
|
|
1169
1169
|
></ft-button>
|
|
1170
1170
|
</div>
|
|
1171
|
-
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1171
|
+
`}updated(t){var e;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new mo(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}$o.elementDefinitions={"ft-button":Vi},$o.styles=yo,go([o({type:Boolean})],$o.prototype,"horizontal",void 0),go([o({type:Boolean})],$o.prototype,"hideScrollbar",void 0),go([o({type:Boolean})],$o.prototype,"controls",void 0),go([o({type:Boolean})],$o.prototype,"limitSize",void 0),go([s()],$o.prototype,"elements",void 0),go([s()],$o.prototype,"currentElement",void 0),go([s()],$o.prototype,"withScroll",void 0),go([s()],$o.prototype,"startReached",void 0),go([s()],$o.prototype,"endReached",void 0),go([n(".ft-snap-scroll--content")],$o.prototype,"contentSlot",void 0),p("ft-snap-scroll")($o);const wo={colorOutline:yt.external(mt.colorOutline,"Design system"),colorOnSurface:yt.external(mt.colorOnSurface,"Design system"),colorOnSurfaceMedium:yt.external(mt.colorOnSurfaceMedium,"Design system"),colorPrimary:yt.external(mt.colorPrimary,"Design system"),colorSurface:yt.external(mt.colorSurface,"Design system"),transitionDuration:yt.external(mt.transitionDuration,"Design system"),transitionTimingFunction:yt.external(mt.transitionTimingFunction,"Design system")},ko=[Pe,g`
|
|
1172
1172
|
:host {
|
|
1173
1173
|
display: flex;
|
|
1174
1174
|
max-height: 100%;
|
|
@@ -1181,7 +1181,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1181
1181
|
flex-direction: column;
|
|
1182
1182
|
max-height: 100%;
|
|
1183
1183
|
max-width: 100%;
|
|
1184
|
-
color: ${
|
|
1184
|
+
color: ${wo.colorOnSurface};
|
|
1185
1185
|
}
|
|
1186
1186
|
|
|
1187
1187
|
.ft-filter--header {
|
|
@@ -1191,13 +1191,13 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1191
1191
|
flex-shrink: 0;
|
|
1192
1192
|
padding: 0 10px;
|
|
1193
1193
|
margin-bottom: 8px;
|
|
1194
|
-
${
|
|
1194
|
+
${gt(Dt.fontSize,"14px")};
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
.ft-filter--header ft-button {
|
|
1198
1198
|
flex-shrink: 0;
|
|
1199
1199
|
margin-left: auto;
|
|
1200
|
-
${
|
|
1200
|
+
${gt(Pi.iconSize,"18px")};
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
1203
|
.ft-filter--label {
|
|
@@ -1205,8 +1205,8 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1205
1205
|
flex-shrink: 1;
|
|
1206
1206
|
flex-grow: 1;
|
|
1207
1207
|
word-break: break-word;
|
|
1208
|
-
${
|
|
1209
|
-
${
|
|
1208
|
+
${gt(Dt.lineHeight,"22px")};
|
|
1209
|
+
${gt(Dt.fontWeight,"bold")};
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
1212
|
.ft-filter--filter {
|
|
@@ -1217,8 +1217,8 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1217
1217
|
padding: 0 10px;
|
|
1218
1218
|
overflow: hidden;
|
|
1219
1219
|
height: 32px;
|
|
1220
|
-
transition: height ${
|
|
1221
|
-
margin ${
|
|
1220
|
+
transition: height ${wo.transitionDuration} ${wo.transitionTimingFunction},
|
|
1221
|
+
margin ${wo.transitionDuration} ${wo.transitionTimingFunction};
|
|
1222
1222
|
transition-delay: 500ms;
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
@@ -1231,15 +1231,15 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1231
1231
|
display: block;
|
|
1232
1232
|
width: 100%;
|
|
1233
1233
|
border-radius: 4px;
|
|
1234
|
-
border: 1px solid ${
|
|
1234
|
+
border: 1px solid ${wo.colorOutline};
|
|
1235
1235
|
padding: 4px;
|
|
1236
|
-
background-color: ${
|
|
1237
|
-
color: ${
|
|
1238
|
-
outline-color: ${
|
|
1236
|
+
background-color: ${wo.colorSurface};
|
|
1237
|
+
color: ${wo.colorOnSurface};
|
|
1238
|
+
outline-color: ${wo.colorPrimary};
|
|
1239
1239
|
}
|
|
1240
1240
|
|
|
1241
1241
|
input::placeholder {
|
|
1242
|
-
color: ${
|
|
1242
|
+
color: ${wo.colorOnSurfaceMedium};
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
1245
1245
|
input:placeholder-shown {
|
|
@@ -1255,7 +1255,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
1257
|
.ft-filter--separator {
|
|
1258
|
-
border-top: 1px solid ${
|
|
1258
|
+
border-top: 1px solid ${wo.colorOutline};
|
|
1259
1259
|
margin: 4px 10px;
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
@@ -1280,14 +1280,14 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1280
1280
|
slot {
|
|
1281
1281
|
display: none;
|
|
1282
1282
|
}
|
|
1283
|
-
`];var
|
|
1283
|
+
`];var Oo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class So extends CustomEvent{constructor(t){super("change",{detail:t})}}class Co extends wt{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new e(300),this.changeDebouncer=new e(10)}get flatOptions(){return Ze(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,s=this.filterPlaceHolder.replace("{0}",this.label);return X`
|
|
1284
1284
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1285
1285
|
part="container">
|
|
1286
|
-
${this.label||i?
|
|
1286
|
+
${this.label||i?X`
|
|
1287
1287
|
<div class="ft-filter--header" part="header">
|
|
1288
1288
|
<ft-typography class="ft-filter--label" variant="overline" part="label">${this.label}
|
|
1289
1289
|
</ft-typography>
|
|
1290
|
-
${i&&!this.hideClearButton?
|
|
1290
|
+
${i&&!this.hideClearButton?X`
|
|
1291
1291
|
<ft-button icon="close" dense @click=${this.clear} part="clear-button">
|
|
1292
1292
|
${this.clearButtonLabel}
|
|
1293
1293
|
</ft-button>
|
|
@@ -1311,8 +1311,8 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1311
1311
|
@slotchange=${this.updateOptionsFromSlot}
|
|
1312
1312
|
@option-change=${this.optionsChanged}></slot>
|
|
1313
1313
|
</div>
|
|
1314
|
-
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return
|
|
1315
|
-
${this.raiseSelectedOptions&&e.length>0?
|
|
1314
|
+
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,e=t.filter((t=>t.selected)),i=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,o=i<0?"ft-filter--level-center":"ft-filter--level-left";return X`
|
|
1315
|
+
${this.raiseSelectedOptions&&e.length>0?X`
|
|
1316
1316
|
<ft-filter-level
|
|
1317
1317
|
id="${this.id}"
|
|
1318
1318
|
?multivalued=${this.multivalued}
|
|
@@ -1331,7 +1331,7 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1331
1331
|
${this.renderLevel(o,this.options)}
|
|
1332
1332
|
${this.displayedLevels.map((e=>t.find((t=>t.value===e)))).map(((t,e)=>{var o;const s=(null==t?void 0:t.value)===this.slideIn||(null==t?void 0:t.value)===this.slideOut?"ft-filter--level-right":e===i?"ft-filter--level-center":"ft-filter--level-left";return this.renderLevel(s,null!==(o=null==t?void 0:t.subOptions)&&void 0!==o?o:[],t)}))}
|
|
1333
1333
|
</ft-snap-scroll>
|
|
1334
|
-
`}renderLevel(t,e,i){return
|
|
1334
|
+
`}renderLevel(t,e,i){return X`
|
|
1335
1335
|
<ft-filter-level
|
|
1336
1336
|
class="${t}"
|
|
1337
1337
|
id="${this.id}"
|
|
@@ -1350,6 +1350,6 @@ class zi extends Xe{constructor(t){if(super(t),this.it=Y,t.type!==Je)throw Error
|
|
|
1350
1350
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1351
1351
|
noValuesLabel="${this.noValuesLabel}"
|
|
1352
1352
|
></ft-filter-level>
|
|
1353
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new
|
|
1353
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new So(this.selectedValues)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Co.elementDefinitions={"ft-button":Vi,"ft-filter-level":bo,"ft-snap-scroll":$o,"ft-typography":Ve},Co.styles=ko,Oo([o({type:String})],Co.prototype,"id",void 0),Oo([o({type:String})],Co.prototype,"label",void 0),Oo([o({type:String})],Co.prototype,"filterPlaceHolder",void 0),Oo([o({type:String})],Co.prototype,"clearButtonLabel",void 0),Oo([o({type:String})],Co.prototype,"moreValuesButtonLabel",void 0),Oo([o({type:String})],Co.prototype,"noValuesLabel",void 0),Oo([f([])],Co.prototype,"options",void 0),Oo([o({type:Boolean})],Co.prototype,"multivalued",void 0),Oo([o({type:Boolean})],Co.prototype,"disabled",void 0),Oo([o({type:Boolean})],Co.prototype,"raiseSelectedOptions",void 0),Oo([o({type:Number})],Co.prototype,"displayedValuesLimit",void 0),Oo([o({type:Boolean})],Co.prototype,"hideClearButton",void 0),Oo([n(".ft-filter--slot")],Co.prototype,"slotElement",void 0),Oo([n(".ft-filter--container")],Co.prototype,"container",void 0),Oo([n(".ft-filter--values")],Co.prototype,"valuesContainer",void 0),Oo([n(".ft-filter--levels")],Co.prototype,"levelsContainer",void 0),Oo([n(".ft-filter--levels ft-filter-level:last-child")],Co.prototype,"lastLevel",void 0),Oo([n(".ft-filter--filter input")],Co.prototype,"filterInput",void 0),Oo([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],Co.prototype,"levels",void 0),Oo([s()],Co.prototype,"withScroll",void 0),Oo([s()],Co.prototype,"filter",void 0),Oo([s()],Co.prototype,"slideIn",void 0),Oo([s()],Co.prototype,"slideOut",void 0);var Eo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class No extends wt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return X`
|
|
1354
1354
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1355
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1355
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}No.elementDefinitions={},Eo([o({type:String})],No.prototype,"label",void 0),Eo([o({type:Object,converter:t=>t})],No.prototype,"value",void 0),Eo([o({type:Boolean,reflect:!0})],No.prototype,"selected",void 0),Eo([o({type:Object})],No.prototype,"subOptions",void 0),Eo([f({})],No.prototype,"renderOption",void 0),Eo([n(".ft-filter-option--slot")],No.prototype,"slotElement",void 0),p("ft-filter")(Co),p("ft-filter-option")(No),t.FtFilter=Co,t.FtFilterChangeEvent=So,t.FtFilterCssVariables=wo,t.FtFilterOption=No,t.styles=ko,Object.defineProperty(t,"i",{value:!0})}({});
|